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.

108 lines
3.1 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
  1. <template>
  2. <div class="booking-info-item tw-p-[15px] tw-mb-[20px] tw-bg-white tw-rounded-xl xl:tw-p-[20px]">
  3. <div :class="[
  4. 'info-content',
  5. ' tw-flex',
  6. 'tw-justify-start',
  7. 'tw-items-start',
  8. ' -tw-mx-[7px]',
  9. 'xl:-tw-mx-[8px]',
  10. ]">
  11. <div class="element content-img tw-max-w-[52px] tw-px-[7px] md:tw-max-w-[116px] xl:tw-px-[8px]">
  12. <img class="tw-rounded" :src="info.preview_image" />
  13. </div>
  14. <div class="element content-text tw-px-[7px] xl:tw-px-[8px]">
  15. <div :class="['tw-text-secondary-default confirmed t18 tw-font-medium tw-mb-[12px]']">
  16. {{ $t(mybookingStatusMap(info.bookingStatus)) }}
  17. </div>
  18. <h3 class="t12 tw-font-bold tw-mb-[10px] xl:tw-text-[16px] xl:tw-leading-[21px]">
  19. {{ info.name }}
  20. </h3>
  21. <div class="id tw-body-5 tw-mb-[10px]">#{{ orderStatus.bookingNo }}</div>
  22. <template v-if="info.bookingItems && info.bookingItems.length>0">
  23. <div class="detail tw-body-5 tw-mb-[10px]" v-for="(item,index) in info.bookingItems" :key="index">
  24. {{ item }}
  25. </div>
  26. </template>
  27. <div v-show="info.exhibitionName" class="date tw-body-5 tw-mb-[10px]">
  28. {{ $t('Exhibition Name') }}{{ info.exhibitionName }}
  29. </div>
  30. <div class="date tw-body-5 tw-mb-[10px]">
  31. {{ $t('Service Date:') }}{{ orderStatus.service_date }}{{ $t('(Local time)') }}
  32. </div>
  33. <div class="date tw-body-5 tw-mb-[10px]">
  34. {{ $t('Booking Date:') }}{{ orderStatus.created_at }}
  35. </div>
  36. <div class="total t16 tw-font-normal tw-text-primary-1">${{ total.toLocaleString() }} {{ orderStatus.currency }}</div>
  37. </div>
  38. </div>
  39. </div>
  40. </template>
  41. <script>
  42. import elementTextarea from "@/components/newComponent/form/ElementTextarea";
  43. import elementPromoCode from "@/components/newComponent/form/ElementPromoCode";
  44. import elementTimePicker from "@/components/newComponent/form/ElementTimePicker";
  45. import moment from "moment";
  46. import { mybookingStatusMap, bookingColor } from "@/plugins/util.js";
  47. export default {
  48. components: {
  49. elementTextarea,
  50. elementPromoCode,
  51. elementTimePicker,
  52. moment,
  53. },
  54. props: {
  55. totalPrice: {
  56. type: Number
  57. },
  58. info: {
  59. type: Object,
  60. },
  61. orderStatus: {
  62. type: Object
  63. }
  64. },
  65. data() {
  66. return {};
  67. },
  68. computed: {
  69. // bookDate() {
  70. // return this.orderStatus.created_at;
  71. // // return moment(this.orderStatus.created_at).format("YYYY.MM.DD H:mm");
  72. // },
  73. total() {
  74. return parseFloat(this.totalPrice).toLocaleString();
  75. },
  76. },
  77. methods: {
  78. bookingColor,
  79. mybookingStatusMap
  80. },
  81. };
  82. </script>
  83. <style lang="scss" scoped>
  84. .bounce-enter-active {
  85. animation: bounce-in 0.3s ease-out;
  86. }
  87. .bounce-leave-active {
  88. animation: bounce-in 0.3s cubic-bezier(1, 0.5, 0.8, 1) reverse;
  89. }
  90. @keyframes bounce-in {
  91. 0% {
  92. opacity: 0;
  93. transform: translateY(-10px);
  94. }
  95. 50% {
  96. opacity: 0.5;
  97. transform: translateY(-5px);
  98. }
  99. 100% {
  100. opacity: 1;
  101. transform: translateY(0);
  102. }
  103. }
  104. </style>