+
Планы группы
+
+
+
+
+
+ Удалить
+
+
-
-
-
diff --git a/front/src/components/support/ChangeRecordManager.vue b/front/src/components/support/ChangeRecordManager.vue
index 8041ed9..fd7f4f7 100644
--- a/front/src/components/support/ChangeRecordManager.vue
+++ b/front/src/components/support/ChangeRecordManager.vue
@@ -20,6 +20,7 @@
label="Группа расходов"
name="spendingGroupId"
v-if="isReady"
+ :rules="[{ required: true, message: 'Пожалуйста, выберите группу расходов' }]"
>
@@ -35,12 +36,13 @@
- Сохранить
+ Сохранить
@@ -49,7 +51,6 @@
import { computed, inject, reactive, ref } from 'vue';
import { ChangeRecordDto, SpendingGroupViewModel } from '../../core/api/data-contracts';
import { useUserStore } from '../../store';
-import router from '../../router';
import { ChangeRecordService } from '../../core/services/change-record-service';
import { GroupService } from '../../core/services/group-service';
import { useAsyncState } from '@vueuse/core';
@@ -70,7 +71,7 @@ const { state: groupList, isReady } = useAsyncState(() => groupService.getList()
const pickedChangedAt = ref();
const formState = reactive({
userId: store.user.id,
- sum: 0,
+ sum: -1,
changedAt: new Date().toISOString(),
spendingGroupId: null
});
@@ -88,5 +89,7 @@ const onFinishFailed = (errorInfo: any) => {
const disabled = computed(() => {
return formState.sum && formState.sum >= 0;
});
-
+const disabledForm = computed(() => {
+ return !(formState.sum && formState.changedAt && (formState.spendingGroupId || formState.sum > 0));
+})
diff --git a/front/src/components/support/PlanManager.vue b/front/src/components/support/PlanManager.vue
index 2efe8cc..40578b9 100644
--- a/front/src/components/support/PlanManager.vue
+++ b/front/src/components/support/PlanManager.vue
@@ -33,15 +33,14 @@
- Добавить
+ Добавить
diff --git a/front/src/components/support/SpendingGroupManager.vue b/front/src/components/support/SpendingGroupManager.vue
index 28a760a..c77aaff 100644
--- a/front/src/components/support/SpendingGroupManager.vue
+++ b/front/src/components/support/SpendingGroupManager.vue
@@ -15,13 +15,13 @@
- Сохранить
+ Сохранить
\ No newline at end of file