feat: add profile, class unenroll, notify toggles, and keep sidebar width
Give admins a profile password page, class removal, and SMS/email/bot checkboxes, and stop the sidebar from shrinking on edit pages.
This commit is contained in:
@@ -120,6 +120,8 @@
|
||||
<label class="font-semibold text-sm">تاریخ سررسید *</label>
|
||||
<DatePicker v-model="createForm.dueDate" class="w-full text-sm" placeholder="1403/01/01" />
|
||||
</div>
|
||||
|
||||
<NotifyChannelsField :notify="createNotify" />
|
||||
</div>
|
||||
<template #footer>
|
||||
<Button label="انصراف" text severity="secondary" @click="showCreateModal = false" />
|
||||
@@ -148,6 +150,7 @@ import DataTableWrapper from '@/components/common/DataTableWrapper.vue';
|
||||
import ConfirmDeleteDialog from '@/components/common/ConfirmDeleteDialog.vue';
|
||||
import PermissionGate from '@/components/common/PermissionGate.vue';
|
||||
import StatusTag from '@/components/common/StatusTag.vue';
|
||||
import NotifyChannelsField from '@/components/common/NotifyChannelsField.vue';
|
||||
import Button from 'primevue/button';
|
||||
import Column from 'primevue/column';
|
||||
import Tag from 'primevue/tag';
|
||||
@@ -182,6 +185,7 @@ const createForm = reactive({
|
||||
amount: 0,
|
||||
dueDate: ''
|
||||
});
|
||||
const createNotify = reactive({ sms: true, email: true, bot: true });
|
||||
|
||||
const deleteDialogVisible = ref(false);
|
||||
const selectedPayment = ref(null);
|
||||
@@ -238,6 +242,9 @@ const resetCreateForm = () => {
|
||||
createForm.classes = [];
|
||||
createForm.amount = 0;
|
||||
createForm.dueDate = '';
|
||||
createNotify.sms = true;
|
||||
createNotify.email = true;
|
||||
createNotify.bot = true;
|
||||
};
|
||||
|
||||
const openCreateModal = () => {
|
||||
@@ -270,7 +277,7 @@ const handleCreatePayment = async () => {
|
||||
|
||||
isCreating.value = true;
|
||||
try {
|
||||
await paymentApi.create(createForm);
|
||||
await paymentApi.create({ ...createForm, notify: { ...createNotify } });
|
||||
showSuccess('صورتحساب جدید با موفقیت ایجاد شد');
|
||||
showCreateModal.value = false;
|
||||
loadData();
|
||||
|
||||
Reference in New Issue
Block a user