|
|
@@ -23,7 +23,6 @@
|
|
|
<q-icon name="mdi-star" color="warning" size="sm" />
|
|
|
<span class="text-fav-name">{{ Number(item.average_rating).toFixed(1) }}</span>
|
|
|
</div>
|
|
|
- <!-- <span class="text-fav-price">{{ bestPrice(item) }}</span> -->
|
|
|
</div>
|
|
|
<div class="col-4 column q-mt-auto">
|
|
|
<q-btn
|
|
|
@@ -31,6 +30,7 @@
|
|
|
padding="1px 5px"
|
|
|
size="sm"
|
|
|
:label="$t('dashboard_client.favorites.view_schedule')"
|
|
|
+ @click="goToScheduling(item)"
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -41,18 +41,12 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-// import { formatCurrency } from 'src/helpers/utils';
|
|
|
-// import { useI18n } from 'vue-i18n';
|
|
|
-
|
|
|
-// import { formatCurrency } from 'src/helpers/utils';
|
|
|
-// import { useI18n } from 'vue-i18n';
|
|
|
+import { useQuasar } from 'quasar';
|
|
|
+import SchedulingDialog from 'src/pages/search/components/SchedulingDialog.vue';
|
|
|
|
|
|
defineProps({ data: { type: Array, default: () => [] } });
|
|
|
|
|
|
-// const { t } = useI18n();
|
|
|
-
|
|
|
-// const { t } = useI18n();
|
|
|
-
|
|
|
+const $q = useQuasar();
|
|
|
const avatarColors = [
|
|
|
{ background: '#ffd5df', color: '#932e57' },
|
|
|
{ background: '#d7e8ff', color: '#2158a8' },
|
|
|
@@ -60,31 +54,12 @@ const avatarColors = [
|
|
|
{ background: '#ffe5cc', color: '#8a4500' },
|
|
|
];
|
|
|
|
|
|
-// const bestPrice = (item) => {
|
|
|
-// const prices = [
|
|
|
-// item.daily_price_2h,
|
|
|
-// item.daily_price_4h,
|
|
|
-// item.daily_price_6h,
|
|
|
-// item.daily_price_8h,
|
|
|
-// ].filter(p => p != null && Number(p) > 0);
|
|
|
-
|
|
|
-// if (!prices.length) return t('dashboard_client.favorites.no_price');
|
|
|
-// const min = Math.min(...prices.map(Number));
|
|
|
-// return t('dashboard_client.favorites.from') + ' ' + formatCurrency(min);
|
|
|
-// };
|
|
|
-
|
|
|
-/*const bestPrice = (item) => {
|
|
|
- const prices = [
|
|
|
- item.daily_price_2h,
|
|
|
- item.daily_price_4h,
|
|
|
- item.daily_price_6h,
|
|
|
- item.daily_price_8h,
|
|
|
- ].filter(p => p != null && Number(p) > 0);
|
|
|
-
|
|
|
- if (!prices.length) return t('dashboard_client.favorites.no_price');
|
|
|
- const min = Math.min(...prices.map(Number));
|
|
|
- return t('dashboard_client.favorites.from') + ' ' + formatCurrency(min);
|
|
|
-};*/
|
|
|
+const goToScheduling = (provider) => {
|
|
|
+ $q.dialog({
|
|
|
+ component: SchedulingDialog,
|
|
|
+ componentProps: { provider },
|
|
|
+ });
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|