|
@@ -257,14 +257,17 @@
|
|
|
import { avatarColors, formatCurrency, getFirstName } from 'src/helpers/utils';
|
|
import { avatarColors, formatCurrency, getFirstName } from 'src/helpers/utils';
|
|
|
import { getProviderCalendar } from 'src/api/providerCalendar';
|
|
import { getProviderCalendar } from 'src/api/providerCalendar';
|
|
|
import { labelsPeriodTypes } from 'src/helpers/labelsPeriodTypes.js';
|
|
import { labelsPeriodTypes } from 'src/helpers/labelsPeriodTypes.js';
|
|
|
-import { onMounted, ref } from 'vue';
|
|
|
|
|
|
|
+import { nextTick, onMounted, ref } from 'vue';
|
|
|
import { useI18n } from 'vue-i18n';
|
|
import { useI18n } from 'vue-i18n';
|
|
|
import { useQuasar } from 'quasar';
|
|
import { useQuasar } from 'quasar';
|
|
|
|
|
+import { useRoute, useRouter } from 'vue-router';
|
|
|
|
|
|
|
|
import NextSchedulesDetailsDialog from 'src/components/dashboard/NextSchedulesDetailsDialog.vue';
|
|
import NextSchedulesDetailsDialog from 'src/components/dashboard/NextSchedulesDetailsDialog.vue';
|
|
|
import ScheduleRatingDialog from 'src/components/dashboard/ScheduleRatingDialog.vue';
|
|
import ScheduleRatingDialog from 'src/components/dashboard/ScheduleRatingDialog.vue';
|
|
|
|
|
|
|
|
const $q = useQuasar();
|
|
const $q = useQuasar();
|
|
|
|
|
+const route = useRoute();
|
|
|
|
|
+const router = useRouter();
|
|
|
const { t } = useI18n();
|
|
const { t } = useI18n();
|
|
|
|
|
|
|
|
|
|
|
|
@@ -390,9 +393,26 @@ const openRatingDialog = (schedule) => {
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+const openScheduleFromQuery = async () => {
|
|
|
|
|
+ const scheduleId = Number(route.query.scheduleId);
|
|
|
|
|
+
|
|
|
|
|
+ if (!scheduleId) return;
|
|
|
|
|
+
|
|
|
|
|
+ await router.replace({ path: route.path, query: {} });
|
|
|
|
|
+ await nextTick();
|
|
|
|
|
+
|
|
|
|
|
+ const schedule = [...upcomingSchedules.value, ...completedSchedules.value].find(
|
|
|
|
|
+ (item) => item.id === scheduleId,
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
|
|
+ if (schedule) openDetailsDialog(schedule);
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
|
await loadCalendar();
|
|
await loadCalendar();
|
|
|
loading.value = false;
|
|
loading.value = false;
|
|
|
|
|
+
|
|
|
|
|
+ await openScheduleFromQuery();
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|