Vendor app Client: Maiora
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

124 regels
5.2 KiB

  1. <div class="widget-heading-holder">
  2. <header> Order List ({{ getFilteredOrders(filterOption.orderstatus_id).length }}) </header>
  3. <div class="filter-container">
  4. <div class="selector-container">
  5. <div class="selector">
  6. <div class="container" (click)="showFilter = !showFilter">
  7. <div class="selected-value">
  8. Status : <span> {{ filterOption.orderStatus }} </span>
  9. </div>
  10. <button>
  11. <i class="icon" [ngClass]="{'ion-md-arrow-dropdown': !showFilter, 'ion-md-arrow-dropup': showFilter}"></i>
  12. </button>
  13. </div>
  14. <ul *ngIf="showFilter">
  15. <li *ngFor="let option of orderStatus" (click)="filterOption = option; showFilter = false">
  16. {{ option.orderStatus }}
  17. </li>
  18. </ul>
  19. </div>
  20. </div>
  21. <div class="search-input">
  22. <input type="text" placeholder="Quick Search: By Order ID" [(ngModel)]="searchTerm" (input)="searchOrders()">
  23. <button> <i class="icon ion-md-search"></i> </button>
  24. </div>
  25. </div>
  26. </div>
  27. <table class="order-table" *ngIf="orderList">
  28. <tbody>
  29. <tr class="heading-row">
  30. <th> Order ID </th>
  31. <th> Items </th>
  32. <th> Pickup Time </th>
  33. <th> Quantity </th>
  34. <th> Amount </th>
  35. <th> Action </th>
  36. </tr>
  37. <tr *ngFor="let order of getFilteredOrders(filterOption.orderstatus_id)">
  38. <td> {{ order.orders_id }} </td>
  39. <td>
  40. <div>
  41. <span *ngFor="let item of order.orderedlist" class="item">
  42. {{ item.menuitems.menu_item_name }}
  43. </span>
  44. </div>
  45. </td>
  46. <td>
  47. <div *ngFor="let item of order.orderedlist">
  48. {{ getFormattedDate(item.pickup_time, 'DD MMM @ hh:mm a') }}
  49. </div>
  50. </td>
  51. <td>
  52. <div *ngFor="let item of order.orderedlist">
  53. {{ item.quantity }}
  54. </div>
  55. </td>
  56. <td>
  57. <div *ngFor="let item of order.orderedlist">
  58. &#x20B9; {{ getFixedDecimalPoints(item.total_price) }}
  59. </div>
  60. </td>
  61. <td>
  62. <div class="status" [ngClass]="{'success': order.orderstatus.orderstatus_id === 1,
  63. 'failed' : order.orderstatus.orderstatus_id === 2 || order.orderstatus.orderstatus_id === 4 || order.orderstatus.orderstatus_id === 5 }"
  64. *ngIf="order.orderstatus.orderstatus_id !== 6">
  65. {{ getOrderStatus(order.orderstatus.orderstatus_id).orderStatus }}
  66. </div>
  67. <div class="action-buttons" *ngIf="order.orderstatus.orderstatus_id === 6">
  68. <button class="round-button accept" (click)="order.orderstatus.orderstatus_id = 1; updateOrder(order)"> Confirm </button>
  69. <button class="round-button" (click)="order.orderstatus.orderstatus_id = 4; updateOrder(order)"> Reject </button>
  70. </div>
  71. <div class="action-buttons" *ngIf="order.orderstatus.orderstatus_id === 1 || order.orderstatus.orderstatus_id === 7">
  72. <button class="round-button accept" *ngIf="order.orderstatus.orderstatus_id !== 7" (click)="order.orderstatus.orderstatus_id = 7; updateOrder(order)"> Ready </button>
  73. <button class="round-button accept" (click)="order.orderstatus.orderstatus_id = 3; updateOrder(order)"> Delivered </button>
  74. </div>
  75. </td>
  76. </tr>
  77. </tbody>
  78. </table>
  79. <ul class="order-list">
  80. <li class="card" *ngFor="let order of getFilteredOrders(filterOption.orderstatus_id)">
  81. <div class="header">
  82. <span> Order ID : {{ order.orders_id }} </span>
  83. </div>
  84. <div class="info" *ngFor="let item of order.orderedlist">
  85. <div> {{ item.menuitems.menu_item_name }} x {{ item.quantity }} = &#x20B9; {{ getFixedDecimalPoints(item.total_price) }} </div>
  86. </div>
  87. <div class="order-status-holder">
  88. <div class="status" [ngClass]="{'success': order.orderstatus.orderstatus_id === 1,
  89. 'failed' : order.orderstatus.orderstatus_id === 2 || order.orderstatus.orderstatus_id === 4 || order.orderstatus.orderstatus_id === 5 }"
  90. *ngIf="order.orderstatus.orderstatus_id !== 6">
  91. {{ getOrderStatus(order.orderstatus.orderstatus_id).orderStatus }}
  92. </div>
  93. <div class="action-buttons" *ngIf="order.orderstatus.orderstatus_id === 6">
  94. <button (click)="order.orderstatus.orderstatus_id = 1; updateOrder(order)"> Confirm </button>
  95. <button (click)="order.orderstatus.orderstatus_id = 4; updateOrder(order)"> Reject </button>
  96. </div>
  97. </div>
  98. </li>
  99. </ul>
  100. <section class="popup" [ngClass]="{'active' : showRejectionPopup }">
  101. <div class="popup-box">
  102. <header> Reason to Reject the Order </header>
  103. <select>
  104. <option selected> Item not available </option>
  105. <option> The customer was impatient </option>
  106. <option> Other </option>
  107. </select>
  108. <div class="action-buttons">
  109. <button class="rect-button" (click)="showRejectionPopup = false"> Reject </button>
  110. <button class="rect-button" (click)="showRejectionPopup = false"> Cancel </button>
  111. </div>
  112. </div>
  113. </section>