|
|
@@ -6,23 +6,25 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <DashboardHeaderBar
|
|
|
- :data="headerBar"
|
|
|
- :notifications="notifications"
|
|
|
-/>
|
|
|
- <DashboardSummaryInfos :data="summaryInfos" />
|
|
|
- <DashboardPriceSuggest :data="priceSuggestion"/>
|
|
|
- <DashboardTodayServices v-if="todayServices?.length > 0" :data="todayServices" @refresh="loadDashboard" @rate="openRatingDialog" />
|
|
|
- <DashboardScrollAreaSchedules />
|
|
|
- <DashboardSolicitations
|
|
|
- v-if="solicitations?.length > 0"
|
|
|
- :data="solicitations"
|
|
|
- @accept="(item) => openDetailsDialog(item, 'confirm-accept')"
|
|
|
- @reject="(item) => openDetailsDialog(item, 'confirm-reject')"
|
|
|
- @view-details="(item) => openDetailsDialog(item)"
|
|
|
- />
|
|
|
- <DashboardNextSchedules v-if="nextSchedules?.length > 0" :data="nextSchedules" @view-details="(item) => openNextScheduleDialog(item)" />
|
|
|
- <DashboardOpportunities v-if="opportunities?.length > 0" :data="opportunities"/>
|
|
|
+ <q-pull-to-refresh color="primary" @refresh="onRefresh">
|
|
|
+ <DashboardHeaderBar
|
|
|
+ :data="headerBar"
|
|
|
+ :notifications="notifications"
|
|
|
+ />
|
|
|
+ <DashboardSummaryInfos :data="summaryInfos" />
|
|
|
+ <DashboardPriceSuggest :data="priceSuggestion"/>
|
|
|
+ <DashboardTodayServices v-if="todayServices?.length > 0" :data="todayServices" @refresh="loadDashboard" @rate="openRatingDialog" />
|
|
|
+ <DashboardScrollAreaSchedules />
|
|
|
+ <DashboardSolicitations
|
|
|
+ v-if="solicitations?.length > 0"
|
|
|
+ :data="solicitations"
|
|
|
+ @accept="(item) => openDetailsDialog(item, 'confirm-accept')"
|
|
|
+ @reject="(item) => openDetailsDialog(item, 'confirm-reject')"
|
|
|
+ @view-details="(item) => openDetailsDialog(item)"
|
|
|
+ />
|
|
|
+ <DashboardNextSchedules v-if="nextSchedules?.length > 0" :data="nextSchedules" @view-details="(item) => openNextScheduleDialog(item)" />
|
|
|
+ <DashboardOpportunities v-if="opportunities?.length > 0" :data="opportunities"/>
|
|
|
+ </q-pull-to-refresh>
|
|
|
</template>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -86,6 +88,14 @@ const loadDashboard = async () => {
|
|
|
|
|
|
}
|
|
|
|
|
|
+const onRefresh = async (done) => {
|
|
|
+ try {
|
|
|
+ await loadDashboard();
|
|
|
+ } finally {
|
|
|
+ done();
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
const handleScheduleAction = async (id, status) => {
|
|
|
try {
|
|
|
await updateScheduleStatus(id, status);
|