fix [P-290]: добавление файла к событию

This commit is contained in:
Inna committed 2025-09-29 08:25:21 +03:00
1 parent fc041bda3c
commit 739d2f03be
5 files changed
+15 -13

No files matched your search

@@ -66,8 +66,12 @@ export default {
type: Array,
default: () => [],
},
newFiles: {
type: Array,
default: [],
},
},
emits: ['update:files', 'postFiles'],
emits: ['update:files', 'update: newFiles', 'postFiles'],
setup(props, { emit }) {
const localNewFiles = ref([]);
@@ -80,6 +84,7 @@ export default {
(newVal) => {
localNewFiles.value = [...newVal];
},
{ immediate: true },
);
const formatFileSize = (bytes) => {
@@ -176,6 +181,8 @@ export default {
// Обработка изменения новых файлов
const handleFilesChange = (files) => {
if (!files) {
// localNewFiles.value = [];
emit('postFiles', []);
@@ -377,12 +377,8 @@ export default {
});
onMounted(async () => {
try {
const currentYear = new Date().getFullYear();
await calendarStore.fetchHolidays(currentYear);
} catch (error) {
console.error('Failed to load holidays:', error);
}
const currentYear = new Date().getFullYear();
calendarStore.fetchHolidays(currentYear);
});
watch(selectedDate, (newDate) => {
@@ -234,7 +234,6 @@ export default {
],
calendar: [(val) => !!val || 'Выберите календарь'],
};
console.log(propsEvent.value);
const repeatRules = [
{ type: 'Не повторять', rule: null, id: 1 },
{
+4 -3
View File
@@ -205,11 +205,12 @@ export const useCalendarStore = defineStore('calendarStore', () => {
// Проверка на исключение (рабочая суббота или праздничный будний день)
const isExceptionDay = holidaysForMonth.includes(normalizedCurrentDate);
return {
const result = {
isNonWorking: (isWeekend && !isExceptionDay) || (!isWeekend && isExceptionDay),
isWeekendForStyling: isWeekend && !isExceptionDay, // только для серого фона
isHoliday: !isWeekend && isExceptionDay, // только праздничный будний
isWeekendForStyling: isWeekend && !isExceptionDay,
isHoliday: !isWeekend && isExceptionDay,
};
return result;
};
// Открыть диалог создания/редактирования