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.

98 lines
2.6 KiB

2 years ago
  1. <template>
  2. <div class="booking-info-item tw-p-[15px] tw-mb-[20px] tw-bg-neutrals-0 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="confirmed t14 tw-text-complementary-1 tw-mb-[12px]">
  16. </div>
  17. <h3 class="t12 tw-font-bold tw-mb-[10px] xl:tw-text-[16px] xl:tw-leading-[21px]">
  18. {{ info.name }}
  19. </h3>
  20. <div class="id tw-body-5 tw-mb-[10px]">#{{ orderStatus.order_display_id }}</div>
  21. <div class="detail tw-body-5 tw-mb-[10px]">
  22. Pick Up Service, Taipei City, Standard Car for 4 people] x 1
  23. </div>
  24. <div v-show="orderStatus.service_date" class="date tw-body-5 tw-mb-[10px]">
  25. {{ $t('Service Date:') }} {{ orderStatus.service_date }} {{ $t('(Local time)') }}
  26. </div>
  27. <div class="date tw-body-5 tw-mb-[10px]">
  28. {{ $t('Booking Date:') }} {{ bookDate }}
  29. </div>
  30. <div class="total t14 tw-font-bold tw-text-primary-1">${{ total }} {{ orderStatus.currency }}</div>
  31. </div>
  32. </div>
  33. </div>
  34. </template>
  35. <script>
  36. import elementTextarea from "@/components/newComponent/form/ElementTextarea";
  37. import elementPromoCode from "@/components/newComponent/form/ElementPromoCode";
  38. import elementTimePicker from "@/components/newComponent/form/ElementTimePicker";
  39. import moment from "moment";
  40. export default {
  41. components: {
  42. elementTextarea,
  43. elementPromoCode,
  44. elementTimePicker,
  45. moment
  46. },
  47. props: {
  48. totalPrice: {
  49. type: Number
  50. },
  51. info: {
  52. type: Object,
  53. },
  54. orderStatus: {
  55. type: Object
  56. }
  57. },
  58. data() {
  59. return {};
  60. },
  61. computed: {
  62. bookDate() {
  63. return moment(this.orderStatus.created_at).format("YYYY.MM.DD H:mm");
  64. },
  65. total() {
  66. return (parseFloat(this.totalPrice * 110 / 100)).toLocaleString();
  67. },
  68. },
  69. methods: {},
  70. };
  71. </script>
  72. <style lang="scss" scoped>
  73. .bounce-enter-active {
  74. animation: bounce-in 0.3s ease-out;
  75. }
  76. .bounce-leave-active {
  77. animation: bounce-in 0.3s cubic-bezier(1, 0.5, 0.8, 1) reverse;
  78. }
  79. @keyframes bounce-in {
  80. 0% {
  81. opacity: 0;
  82. transform: translateY(-10px);
  83. }
  84. 50% {
  85. opacity: 0.5;
  86. transform: translateY(-5px);
  87. }
  88. 100% {
  89. opacity: 1;
  90. transform: translateY(0);
  91. }
  92. }
  93. </style>