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.

135 lines
4.8 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div
  3. class="BookingInfo tw-flex tw-flex-col xl:tw-flex-row xl:tw-justify-between tw-bg-white tw-rounded-[20px] tw-text-base-primary tw-p-5"
  4. v-if="BookingOrder.Currency && BookingOrder.OnSiteService.Provider"
  5. >
  6. <div class="tw-mb-[30px] xl:tw-mb-0">
  7. <div
  8. class="tw-body-4 tw-text-error-default tw-font-bold tw-mb-[12px] tw-mt-[4px] md:tw-body-2 md:tw-mt-[8px]"
  9. >
  10. <span :class="bookingColor(mybookingStatusMap(BookingOrder.BookingStatus))"
  11. >{{ $t(mybookingStatusMap(BookingOrder.BookingStatus)) }} ,&nbsp;</span
  12. >
  13. <span v-if="BookingOrder.PaymentStatus != null" :class="bookingColor(mypaymentStatusMap(BookingOrder.PaymentStatus))">{{
  14. $t(mypaymentStatusMap(BookingOrder.PaymentStatus))
  15. }}</span>
  16. </div>
  17. <div class="tw-flex tw-items-center tw-mb-[11px] md:tw-mb-[18px]">
  18. <div class="tw-body-4 tw-text-neutrals-800 tw-mr-[11px] md:tw-body-3">
  19. {{ BookingOrder.BookingNo }}
  20. </div>
  21. <button
  22. class="tw-body-5 tw-py-[4px] tw-px-[10px] tw-rounded-[12px] tw-bg-complementary-3 tw-text-complementary-1 md:tw-body-4 hover:tw-text-[#A0B5FF] no-print"
  23. @click="copy(BookingOrder.BookingNo)"
  24. >
  25. {{ $t("Copy") }}
  26. </button>
  27. </div>
  28. <div
  29. class="tw-body-4 tw-text-neutrals-800 tw-mb-[14px] md:tw-body-3 md:tw-mb-[18px]"
  30. >
  31. {{ $t("Booking Date:") }}&nbsp;{{ new Date(BookingOrder.BookingDate).toLocaleString() }}
  32. </div>
  33. <div
  34. class="tw-flex tw-flex-col md:tw-flex-row-reverse md:tw-justify-end"
  35. >
  36. <div v-if="BookingOrder.PaymentType != '3'"
  37. class="tw-grid tw-grid-cols-[20px_auto] tw-gap-[4px] tw-items-center tw-mb-[14px]"
  38. >
  39. <img src="~/assets/svg/Alert.svg" />
  40. <div class="tw-body-4 tw-text-warning-default">Remittance only</div>
  41. </div>
  42. <div class="tw-body-4 tw-flex md:tw-body-3">
  43. <div class="tw-mr-[4px]">{{ $t("Total Amount") }}:&nbsp;</div>
  44. <div
  45. class="tw-text-primary-1 tw-font-bold tw-mr-[12px] md:tw-mr-[28px]"
  46. >
  47. ${{ BookingOrder.TotalPrice }}&nbsp;
  48. {{ BookingOrder.Currency.CurrencyName }}
  49. </div>
  50. <button
  51. class="tw-text-complementary-1 tw-flex md:tw-mr-[33px] hover:tw-text-[#A0B5FF] no-print"
  52. @click="$emit('view-details')"
  53. >
  54. {{ $t("View Details") }}
  55. </button>
  56. </div>
  57. </div>
  58. </div>
  59. <div class="tw-flex tw-flex-col lg:tw-pr-[0px] no-print">
  60. <div
  61. class="tw-grid tw-cols-2 tw-gap-[10px] tw-body-3 tw-mb-[22px] lg:tw-cols-1 no-print"
  62. >
  63. <!-- <button
  64. class="tw-col-span-2 tw-bg-primary-1 tw-py-[10px] tw-px-[121px] tw-rounded-[16px] tw-text-neutrals-0 hover:tw-bg-primary-2"
  65. >
  66. Go to Pay
  67. </button> -->
  68. <button v-if="BookingOrder.OnSiteService.Provider.ProviderStatus"
  69. class="tw-py-[10px] tw-px-[19px] tw-rounded-[12px] tw-text-neutrals-400 tw-border-solid tw-border-neutrals-400 tw-border-[1px] xl:tw-col-span-2 hover:tw-bg-neutrals-100 no-print"
  70. @click="$emit('cancel-booking')"
  71. >
  72. {{ $t("Cancel Booking") }}
  73. </button>
  74. <button
  75. class="tw-py-[10px] tw-px-[35px] tw-rounded-[12px] tw-text-primary-1 tw-border-solid tw-border-primary-1 tw-border-[1px] xl:tw-col-span-2 hover:tw-bg-primary-3 no-print"
  76. @click="$emit('contact-us')"
  77. >
  78. {{ $t("Contact Us") }}
  79. </button>
  80. </div>
  81. <div
  82. class="tw-grid tw-grid-cols-[16px_auto] tw-gap-[10px] tw-items-center tw-mb-[21px] lg:tw-mb-[9px] xl:tw-place-self-end no-print"
  83. >
  84. <img src="~/assets/svg/fi_help-circle.svg"/>
  85. <button
  86. class="tw-text-complementary-1 tw-flex md:tw-mr-[33px] hover:tw-text-[#A0B5FF] no-print"
  87. @click="$emit('cancellation-policy')"
  88. >
  89. {{ $t("Cancellation Policy") }}
  90. </button>
  91. </div>
  92. </div>
  93. </div>
  94. </template>
  95. <script>
  96. import { bookingStatusMap, paymentStatusMap, mybookingStatusMap, mypaymentStatusMap, bookingColor } from '@/plugins/util.js'
  97. import { runInThisContext } from 'vm';
  98. export default {
  99. data(){
  100. return {
  101. printprint: false,
  102. };
  103. },
  104. components: {
  105. mybookingStatusMap,
  106. bookingStatusMap,
  107. paymentStatusMap,
  108. mypaymentStatusMap,
  109. bookingColor
  110. },
  111. props: {
  112. BookingOrder: {
  113. type: Object,
  114. },
  115. },
  116. methods: {
  117. bookingStatusMap,
  118. paymentStatusMap,
  119. mybookingStatusMap,
  120. mypaymentStatusMap,
  121. bookingColor,
  122. async copy(copyText){
  123. window.navigator.clipboard.writeText(copyText);
  124. }
  125. },
  126. updated() {
  127. console.log(this.BookingOrder);
  128. },
  129. };
  130. </script>
  131. <style lang="scss" scoped>
  132. </style>