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.

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