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.

149 lines
4.7 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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div
  3. class="card tw-bg-white tw-rounded-[25px] md:tw-rounded-[30px] tw-border tw-border-solid tw-border-neutrals-200 tw-relative tw-shadow-[0px_1px_1px_0px_rgba(0,0,0,0.03)] tw-shadow-neutral-200"
  4. >
  5. <div class="tw-absolute like tw-w-[20px] tw-h-[18px]">
  6. <!-- <like
  7. :like="service.liked"
  8. :serviceId="service.id"
  9. :isForUserprofile="service.isUserProfile"
  10. @remove-relation="$emit('remove-relation')"
  11. ></like> -->
  12. </div>
  13. <div
  14. class="tw-grid tw-grid-cols-1 md:tw-grid-cols-[35%_65%] xl:tw-grid-cols-[264px_auto]"
  15. >
  16. <nuxt-link :to="localePath(`/service/${service.ServiceID}`)"
  17. class="tw-w-full tw-h-auto tw-overflow-hidden tw-mb-[10px] tw-rounded-t-[25px] md:tw-mb-0 md:tw-rounded-bl-[25px] md:tw-rounded-tr-none cursor-pointer"
  18. >
  19. <img
  20. :src="service.PreviewFile"
  21. class="tw-w-full tw-h-full tw-transition tw-duration-200 tw-ease-in-out xl:hover:tw-scale-110"
  22. />
  23. </nuxt-link>
  24. <div class="tw-px-4 tw-pb-[9px] md:tw-px-5 md:tw-py-[10px]">
  25. <div
  26. class="tw-body-4 tw-text-[#757575] tw-flex tw-items-center tw-mb-1 md:tw-pt-[10px] md:tw-pb-[5px]"
  27. >
  28. <span>{{ service.PlaceName }}</span>
  29. <!-- <div
  30. v-if="service.city"
  31. class="circle-decoration-location tw-bg-[#757575] tw-h-1 tw-w-1 tw-mx-[6px]"
  32. ></div>
  33. <nuxt-link
  34. :to="localePath(`/service?city=${service.city}`)"
  35. class="tw-text-neutrals-600"
  36. >
  37. <span>{{ service.cityName }}</span>
  38. </nuxt-link> -->
  39. </div>
  40. <nuxt-link :to="localePath(`/service/${service.ServiceID}`)">
  41. <h2
  42. class="tw-body-4 md:tw-body-3 cursor-pointer lg:tw-body-2 tw-text-black tw-font-bold tw-mb-[10px] md:tw-mt-[7px]"
  43. >
  44. {{ service.ServiceName }}
  45. </h2>
  46. </nuxt-link>
  47. <div
  48. class="tw-mb-[10px] tw-bg-neutrals-100 tw-rounded-[10px] tw-w-fit tw-px-[10px] tw-py-1 tw-text-hint tw-body-4 tw-font-normal"
  49. >
  50. {{ service.ServiceCategoryName }}
  51. </div>
  52. <!-- <div class="tw-flex tw-justify-end">
  53. <div
  54. :class="[
  55. 'tw-mb-[8px]',
  56. 'tw-text-right',
  57. 'tw-bg-primary-1',
  58. 'tw-text-white',
  59. 'tw-text-size-[12px]',
  60. 'tw-w-fit',
  61. 'tw-rounded-[10px]',
  62. 'tw-py-[4px]',
  63. 'tw-px-[10px]',
  64. 'tw-text-right',
  65. ]"
  66. >
  67. 10% OFF
  68. </div>
  69. </div> -->
  70. <div class="tw-flex tw-justify-between">
  71. <div class="tw-flex tw-justify-start tw-items-center tw-mb-[10px]">
  72. <!-- <span v-if="service.rating" class="tw-body-3 tw-text-primary-1">{{
  73. service.rating || 0
  74. }}</span>
  75. <img
  76. v-if="service.rating"
  77. class="tw-mr-[6px]"
  78. src="~/assets/svg/reviewStar.svg"
  79. alt=""
  80. />
  81. <span v-if="service.reviews" class="tw-text-[#757575]">{{
  82. `(${service.reviews || 0}reviews)`
  83. }}</span> -->
  84. </div>
  85. <div class="tw-flex tw-justify-end md:tw-py-2">
  86. <!-- <div
  87. class="tw-body-3 tw-text-right tw-text-base-hint tw-line-through md:tw-body-2"
  88. >
  89. ${{ formatTotal(40500) }}
  90. </div> -->
  91. <div
  92. class="tw-body-3 tw-font-bold tw-text-primary-1 tw-ml-[8px] md:tw-body-2"
  93. >
  94. ${{ formatTotal(service.MinPrice) }}&nbsp;{{ service.CurrencyName }}
  95. <!-- {{ service.payment_currency }} -->
  96. <span
  97. class="tw-body-3 tw-text-primary-2 tw-font-bold md:tw-body-2"
  98. >{{ $t("up") }}</span
  99. >
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. </div>
  106. </template>
  107. <script>
  108. import like from "@/components/newComponent/like/like.vue";
  109. export default {
  110. props: {
  111. service: {
  112. type: Object,
  113. },
  114. },
  115. components: {
  116. like,
  117. },
  118. computed: {
  119. formatTotal() {
  120. return function (total) {
  121. if(total==undefined || total ==null || total ==""){
  122. total = 0;
  123. }
  124. if (typeof total === "String") {
  125. const totalNumber = parseInt(total);
  126. return totalNumber.toLocaleString();
  127. } else {
  128. return total.toLocaleString();
  129. }
  130. };
  131. },
  132. },
  133. };
  134. </script>
  135. <style lang="scss" scoped>
  136. .card {
  137. -webkit-mask-image: -webkit-radial-gradient(white, black);
  138. }
  139. .like {
  140. left: 25px;
  141. top: 25px;
  142. @media screen and (min-width: 768px) {
  143. left: initial;
  144. right: 25px;
  145. }
  146. }
  147. </style>