profile-page.component.html 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <div>
  2. <br>
  3. <table>
  4. <tr>
  5. <th>ID</th>
  6. <th>Username</th>
  7. <th>Email</th>
  8. <th>Roles</th>
  9. <th>Actions</th>
  10. </tr>
  11. <tr>
  12. <td>{{user_info.id}}</td>
  13. <td>{{user_info.username}}</td>
  14. <td>{{user_info.email}}</td>
  15. <td>{{user_info.roles}}</td>
  16. <td>
  17. <button class="button change-role"
  18. (click)="sendEmail()"
  19. style="margin-left:2px; margin-right: 2px">Send Billing on Email
  20. </button>
  21. <button class="button change-role"
  22. (click)="deleteAccount()"
  23. style="margin-left:2px; margin-right: 2px">Delete User
  24. </button>
  25. </td>
  26. </tr>
  27. </table>
  28. <br>
  29. <div><b>Reservations</b></div>
  30. <br>
  31. <table>
  32. <tr>
  33. <th>ID</th>
  34. <th>Boat</th>
  35. <th>Date</th>
  36. <th>From</th>
  37. <th>To</th>
  38. <th>Cost</th>
  39. <th>Status</th>
  40. <th>Actions</th>
  41. </tr>
  42. <tr *ngFor="let res of reservations_info">
  43. <td>{{res.id}}</td>
  44. <td *ngIf="isANumber(res.boatId)">⏳⌛</td>
  45. <td *ngIf="!isANumber(res.boatId)">{{res.boatId}}</td>
  46. <td>{{res.date}}</td>
  47. <td>{{res.startHour}}:00</td>
  48. <td>{{res.endHour}}:00</td>
  49. <td>{{res.bill.totalCost}}</td>
  50. <td>{{res.bill.status}}</td>
  51. <td>
  52. <button
  53. *ngIf="res.bill.status === 'Pending'"
  54. class="button change-role"
  55. (click)="confirmReservation(res.bill.id)"
  56. style="margin-left:2px; margin-right: 2px">
  57. Confirm
  58. </button>
  59. <button
  60. *ngIf="res.bill.status !== 'Cancelled' && res.bill.status !== 'Completed' && res.bill.status !== 'Active'"
  61. class="button change-role"
  62. (click)="cancelReservation(res.bill.id)"
  63. style="margin-left:2px; margin-right: 2px">
  64. Cancel
  65. </button>
  66. </td>
  67. </tr>
  68. </table>
  69. <br>
  70. </div>