[ Swapsteem Development ] - Enabled Trade reviews for Buyers and Sellers

Repository

https://github.com/nirvanaitsolutions/swapsteem

Bug Fixes

  • What was the issue(s)?
    In the prevoius UI, the user had to wait for 10 seconds before being edirected to our web app after a steemconnect sign transaction. It could be resolved using a simple feature provided by steemconnect,
  • What was the solution?
    I added auto_return=1 to the steemconnect url to enable instant redirect as soon as a steemconnect transaction is signed.

New Features

  • What feature(s) did you add?
Implemented Review feature once the steem amount is released.
  • How did you implement it/them?
    To implement the feature requested, first I had to create new fields in Order and Profile Components for trade reviews.
   <h2 mat-dialog-title>Review</h2>
  review works! <form (ngSubmit)="submitReview(form)" novalidate #form="ngForm">
</p>    <mat-dialog-content class="mat-typography">
  <div class="rating-box">
    <div>
      <strong>
          Rate *
      </strong>
    </div>
    <div>
      <bar-rating name="rating" [(ngModel)]="reviewData.review_score" [max]="5" required></bar-rating>
    </div>
  </div>
  <mat-form-field>
    <textarea matInput #message maxlength="500" name="review_text" placeholder="Please enter your review" [(ngModel)]="reviewData.review_text">
        </textarea>
    <mat-hint align="end">{{message.value.length}} / 500mat-hint>
  </mat-form-field>
</mat-dialog-content>
<mat-dialog-actions align="end">
  <button mat-button mat-dialog-close>Cancel</button>
  <button mat-button type="submit" cdkFocusInitial>Submit</button>
</mat-dialog-actions>
</form> 

This way we are getting the user reviews and send them to the api as shown below.

 submitReview(form) {
    if (form.valid) {
      this.ngxService.start();
      this.apiService.createReview(Object.assign({}, this.reviewData, this.data)).subscribe((res) => {
        this.ngxService.stop();
        this.dialogRef.close(res);
      })
    }
  }

This process is repeated for the Buyer after seller Review.

review1.PNG

After the Review You will be shown a confirmation of the trade as shown below.
ord_cmplt.PNG

Additional libraries used

  • MatInputModule,
  • MatDialogModule,
  • MatButtonModule,
  • BarRatingModule,
  • MatFormFieldModule,
  • MatProgressSpinnerModule

Related Merged PRs

GitHub Account

https://github.com/Shubh1692

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now