Przeglądaj źródła

ajuste botao agendar dos favoritos e redirecionamento correto

Gustavo Zanatta 1 tydzień temu
rodzic
commit
5727d3f188
1 zmienionych plików z 12 dodań i 2 usunięć
  1. 12 2
      src/components/profile/ProfileFavoritesDialog.vue

+ 12 - 2
src/components/profile/ProfileFavoritesDialog.vue

@@ -353,7 +353,8 @@
                   size="sm"
                   style="background: #a63df7; color: white"
                   unelevated
-                  :label="$t('profile.favorites.schedule_btn')"
+                  :label="$t('dashboard_client.favorites.view_schedule')"
+                  @click="goToScheduling(item)"
                 />
               </div>
             </div>
@@ -386,6 +387,7 @@ import { userStore } from "src/stores/user";
 
 import ProfileFavoriteCodeDialog from "./ProfileFavoriteCodeDialog.vue";
 import ProfileFavoriteRemoveDialog from "./ProfileFavoriteRemoveDialog.vue";
+import SchedulingDialog from "src/pages/search/components/SchedulingDialog.vue";
 
 defineEmits([...useDialogPluginComponent.emits]);
 
@@ -403,7 +405,7 @@ const CLIENT_APP_STORE_URL =
 const favorites = ref([]);
 const highlightIndex = ref(0);
 const loading = ref(false);
-const selectedHours = ref("8h");
+const selectedHours = ref("6h");
 
 const highlightedFavorite = computed(
   () => favorites.value[highlightIndex.value] ?? null,
@@ -533,6 +535,14 @@ const loadFavorites = async () => {
   }
 };
 
+const goToScheduling = (provider) => {
+  $q.dialog({
+    component: SchedulingDialog,
+    componentProps: { provider },
+  });
+  dialogRef.value.hide();
+};
+
 onMounted(loadFavorites);
 </script>