|
@@ -13,7 +13,7 @@
|
|
|
/>
|
|
/>
|
|
|
<DashboardRegistrationIncomplete v-if="!registrationComplete" />
|
|
<DashboardRegistrationIncomplete v-if="!registrationComplete" />
|
|
|
<DashboardSummaryInfos v-else :data="summaryInfos" />
|
|
<DashboardSummaryInfos v-else :data="summaryInfos" />
|
|
|
- <DashboardPaymentIncomplete v-if="!hasPaymentMethods" />
|
|
|
|
|
|
|
+ <DashboardPaymentIncomplete v-if="showPaymentBanner" />
|
|
|
<DashboardPendingSchedules
|
|
<DashboardPendingSchedules
|
|
|
v-if="pendingServicePackages.length > 0"
|
|
v-if="pendingServicePackages.length > 0"
|
|
|
:data="pendingServicePackages"
|
|
:data="pendingServicePackages"
|
|
@@ -62,6 +62,7 @@ import { onMounted, ref, computed } from 'vue';
|
|
|
import { useI18n } from 'vue-i18n';
|
|
import { useI18n } from 'vue-i18n';
|
|
|
import { LocalStorage, useQuasar } from 'quasar';
|
|
import { LocalStorage, useQuasar } from 'quasar';
|
|
|
import { dadosDashboard } from 'src/api/dashboard';
|
|
import { dadosDashboard } from 'src/api/dashboard';
|
|
|
|
|
+import { updateMe } from 'src/api/user';
|
|
|
import { userStore } from 'src/stores/user';
|
|
import { userStore } from 'src/stores/user';
|
|
|
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';
|
|
@@ -87,6 +88,7 @@ const todaySchedules = ref([]);
|
|
|
const notifications = ref([]);
|
|
const notifications = ref([]);
|
|
|
const loading = ref(true);
|
|
const loading = ref(true);
|
|
|
const registrationComplete = computed(() => store.user?.registration_complete ?? true);
|
|
const registrationComplete = computed(() => store.user?.registration_complete ?? true);
|
|
|
|
|
+const showPaymentBanner = ref(false);
|
|
|
|
|
|
|
|
const successModalKey = ref(
|
|
const successModalKey = ref(
|
|
|
route.query.success ??
|
|
route.query.success ??
|
|
@@ -239,6 +241,14 @@ const openRatingDialog = (schedule) => {
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
|
await reloadDashboard();
|
|
await reloadDashboard();
|
|
|
maybeOpenSuccessModal();
|
|
maybeOpenSuccessModal();
|
|
|
|
|
+
|
|
|
|
|
+ const isFirstAccess = store.user?.client?.first_access ?? false;
|
|
|
|
|
+ showPaymentBanner.value = isFirstAccess && !hasPaymentMethods.value;
|
|
|
|
|
+
|
|
|
|
|
+ if (isFirstAccess) {
|
|
|
|
|
+ updateMe({ first_access: false }).catch(() => {});
|
|
|
|
|
+ store.markFirstAccessSeen();
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|