Просмотр исходного кода

Padronização de status na tela de Agenda

Gustavo Zanatta 6 часов назад
Родитель
Сommit
06e27b2043
1 измененных файлов с 6 добавлено и 1 удалено
  1. 6 1
      src/pages/agenda/CalendarPage.vue

+ 6 - 1
src/pages/agenda/CalendarPage.vue

@@ -250,6 +250,7 @@
                 <q-space />
 
                 <q-rating
+                  v-if="item.client_reviewed || canReview(item)"
                   class="q-mr-sm"
                   color="amber"
                   icon="mdi-star-outline"
@@ -274,7 +275,7 @@
                 />
 
                 <q-btn
-                  v-else
+                  v-else-if="canReview(item)"
                   class="btn-rate"
                   color="secondary"
                   no-caps
@@ -427,7 +428,11 @@ const openDetailsDialog = (schedule) => {
   });
 };
 
+const canReview = (item) => item.status !== "cancelled";
+
 const openRatingDialog = (schedule) => {
+  if (!canReview(schedule)) return;
+
   $q.dialog({
     component: ScheduleRatingDialog,
     componentProps: { schedule },