feat(dashboard): add professor user selection, loading overlays on all edit/detail views, and SMS bypass management
This commit is contained in:
@@ -8,7 +8,8 @@
|
||||
<Button label="انصراف" text severity="secondary" @click="$router.push('/sessions')" />
|
||||
</PageHeader>
|
||||
|
||||
<div class="surface-card p-4 sm:p-5 border-round border-1 border-color shadow-sm">
|
||||
<div class="surface-card p-4 sm:p-5 border-round border-1 border-color shadow-sm relative overflow-hidden">
|
||||
<LoadingOverlay :loading="isFetching" message="در حال دریافت اطلاعات جلسه..." />
|
||||
<form @submit.prevent="handleSubmit" class="grid">
|
||||
<div class="col-12 md:col-6 flex flex-column gap-2">
|
||||
<label class="font-semibold text-sm">انتخاب دوره *</label>
|
||||
@@ -102,6 +103,7 @@ import { professorApi } from '@/api/professorApi';
|
||||
import { usePersianDate } from '@/composables/usePersianDate';
|
||||
import { useToast } from '@/composables/useToast';
|
||||
import PageHeader from '@/components/common/PageHeader.vue';
|
||||
import LoadingOverlay from '@/components/common/LoadingOverlay.vue';
|
||||
import AdminNotesField from '@/components/common/AdminNotesField.vue';
|
||||
import InputText from 'primevue/inputtext';
|
||||
import Textarea from 'primevue/textarea';
|
||||
@@ -117,6 +119,7 @@ const { toLatinDigits, toJalaliPickerValue, toGregorianIso, getTodayJalali } = u
|
||||
const sessionId = route.params.id;
|
||||
const isEditMode = computed(() => !!sessionId);
|
||||
|
||||
const isFetching = ref(false);
|
||||
const isSubmitting = ref(false);
|
||||
const courses = ref([]);
|
||||
const classes = ref([]);
|
||||
@@ -163,6 +166,7 @@ const onCourseChange = async () => {
|
||||
};
|
||||
|
||||
const fetchData = async () => {
|
||||
isFetching.value = true;
|
||||
try {
|
||||
const [cResult, pResult] = await Promise.allSettled([
|
||||
courseApi.getAll({ limit: 100 }),
|
||||
@@ -205,6 +209,8 @@ const fetchData = async () => {
|
||||
}
|
||||
} catch (err) {
|
||||
showError(err);
|
||||
} finally {
|
||||
isFetching.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user