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.

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