diff --git a/src/components/blocks/TabsBlock.vue b/src/components/blocks/TabsBlock.vue index a334792..9adc4b9 100644 --- a/src/components/blocks/TabsBlock.vue +++ b/src/components/blocks/TabsBlock.vue @@ -17,10 +17,31 @@ + + + +
diff --git a/src/components/form/BadgeSelectField.vue b/src/components/form/BadgeSelectField.vue new file mode 100644 index 0000000..a0426f5 --- /dev/null +++ b/src/components/form/BadgeSelectField.vue @@ -0,0 +1,124 @@ + + + + + diff --git a/src/components/form/SelectField.vue b/src/components/form/SelectField.vue index c7eebde..d7305a8 100644 --- a/src/components/form/SelectField.vue +++ b/src/components/form/SelectField.vue @@ -15,6 +15,15 @@ @click="toggle" > {{ selectedLabel }} + { return found ? found[props.optionLabel] : props.placeholder }) +const hasValue = computed(() => + props.multiple + ? Array.isArray(props.modelValue) && props.modelValue.length > 0 + : props.modelValue !== undefined && props.modelValue !== null && props.modelValue !== '' +) + +const showClear = computed(() => props.clearable && !props.disabled && hasValue.value) + +const clearSelection = () => { + const cleared = props.multiple ? [] : null + emit('update:modelValue', cleared) + emit('change', cleared) +} + const select = (opt) => { if (props.disabled) return const value = opt[props.optionValue] @@ -275,6 +299,24 @@ onBeforeUnmount(() => unmountFloating()) } } + &__clear { + display: inline-flex; + align-items: center; + justify-content: center; + padding: 0; + margin-inline-end: 0.375rem; + border: none; + background: transparent; + color: var(--color-thd-gray); + cursor: pointer; + flex-shrink: 0; + transition: color 0.15s; + + &:hover { + color: var(--color-error); + } + } + &__error { margin-top: 0.25rem; font-family: var(--font-family-fa); diff --git a/src/features/admin/missionary/pages/AdminMissionaryRequestsPage.vue b/src/features/admin/missionary/pages/AdminMissionaryRequestsPage.vue new file mode 100644 index 0000000..b7a429f --- /dev/null +++ b/src/features/admin/missionary/pages/AdminMissionaryRequestsPage.vue @@ -0,0 +1,127 @@ + + + + + diff --git a/src/features/admin/router.js b/src/features/admin/router.js index 0b37cf0..42c1748 100644 --- a/src/features/admin/router.js +++ b/src/features/admin/router.js @@ -252,4 +252,15 @@ export default [ subtitle: 'جلسات مشاوره را پیگیری کرده و پاسخگوی نیازهای کاربران باشید.', }, }, + { + path: '/missionary-requests', + name: 'admin-missionary-requests', + component: () => import('@/features/admin/missionary/pages/AdminMissionaryRequestsPage.vue'), + meta: { + layout: 'admin', + role: 'admin', + title: 'مدیریت مبلغین', + subtitle: 'درخواست‌های اعزام مبلغین را مشاهده و مدیریت نمایید.', + }, + }, ] diff --git a/src/features/auth/components/studentRegister/MediaRecorder.vue b/src/features/auth/components/studentRegister/MediaRecorder.vue index 8cf3191..0be5b7d 100644 --- a/src/features/auth/components/studentRegister/MediaRecorder.vue +++ b/src/features/auth/components/studentRegister/MediaRecorder.vue @@ -92,7 +92,7 @@ const props = defineProps({ maxSeconds: { type: Number, default: 120 }, context: { type: String, default: 'verification' }, subType: { type: String, default: '' }, - purpose: { type: String, default: '' }, + purpose: { type: String, default: 'video' }, error: { type: String, default: '' }, }) diff --git a/src/features/student/missionary/components/MissionaryDispatchItem.vue b/src/features/missionary/components/MissionaryDispatchItem.vue similarity index 92% rename from src/features/student/missionary/components/MissionaryDispatchItem.vue rename to src/features/missionary/components/MissionaryDispatchItem.vue index f495d05..29f97f6 100644 --- a/src/features/student/missionary/components/MissionaryDispatchItem.vue +++ b/src/features/missionary/components/MissionaryDispatchItem.vue @@ -19,11 +19,6 @@
- - - import BaseButton from '@/components/BaseButton.vue' import SvgIcon from '@/components/icons/SvgIcon.vue' -import CircleButton from '@/components/CircleButton.vue' defineProps({ dispatch: { type: Object, required: true }, @@ -87,7 +81,7 @@ const emit = defineEmits(['show-details']) &__title-wrap { display: flex; flex-direction: column; - align-items: flex-end; + align-items: flex-start; text-align: end; gap: 0.35rem; } @@ -167,7 +161,7 @@ const emit = defineEmits(['show-details']) &__btn { min-width: 8rem; - height: 2rem; + height: 2.5rem; padding: 0 1.25rem; } } diff --git a/src/features/student/missionary/components/MissionaryNarrativeItem.vue b/src/features/missionary/components/MissionaryNarrativeItem.vue similarity index 82% rename from src/features/student/missionary/components/MissionaryNarrativeItem.vue rename to src/features/missionary/components/MissionaryNarrativeItem.vue index ba1ba3d..21891b9 100644 --- a/src/features/student/missionary/components/MissionaryNarrativeItem.vue +++ b/src/features/missionary/components/MissionaryNarrativeItem.vue @@ -15,20 +15,23 @@
-
- +
+ - + - - -
@@ -43,7 +46,7 @@ defineProps({ narrative: { type: Object, required: true }, }) -const emit = defineEmits(['show-details']) +const emit = defineEmits(['show-details', 'edit', 'delete']) diff --git a/src/features/missionary/components/MissionaryRequestItem.vue b/src/features/missionary/components/MissionaryRequestItem.vue index e9b6303..7995b2b 100644 --- a/src/features/missionary/components/MissionaryRequestItem.vue +++ b/src/features/missionary/components/MissionaryRequestItem.vue @@ -1,56 +1,56 @@