From e0bced0dfceede517f87724415e3b2ea400db2fd Mon Sep 17 00:00:00 2001 From: DarkPhoenix2704 Date: Tue, 20 Feb 2024 07:16:03 +0000 Subject: [PATCH] fix(nc-gui): enable multiple range creation --- packages/nc-gui/components/dlg/ViewCreate.vue | 25 +++++++++++++- .../components/smartsheet/calendar/index.vue | 6 ++-- .../smartsheet/toolbar/CalendarRange.vue | 33 +++++++++++++------ 3 files changed, 51 insertions(+), 13 deletions(-) diff --git a/packages/nc-gui/components/dlg/ViewCreate.vue b/packages/nc-gui/components/dlg/ViewCreate.vue index a5b292a5af..6b7c84d3e8 100644 --- a/packages/nc-gui/components/dlg/ViewCreate.vue +++ b/packages/nc-gui/components/dlg/ViewCreate.vue @@ -225,6 +225,13 @@ async function onSubmit() { } } +const addCalendarRange = async () => { + form.calendarRange.push({ + fk_from_column_id: viewSelectFieldOptions.value[0], + fk_to_column_id: null, + }) +} + const isMetaLoading = ref(false) onMounted(async () => { @@ -424,7 +431,7 @@ onMounted(async () => { /> + + + + + + Add another date field +
diff --git a/packages/nc-gui/components/smartsheet/calendar/index.vue b/packages/nc-gui/components/smartsheet/calendar/index.vue index 4d17eb05c5..402a796f1c 100644 --- a/packages/nc-gui/components/smartsheet/calendar/index.vue +++ b/packages/nc-gui/components/smartsheet/calendar/index.vue @@ -57,6 +57,8 @@ const { const showSideMenu = ref(true) +const calendarRangeDropdown = ref(false) + const router = useRouter() const route = useRoute() @@ -152,7 +154,7 @@ const headerText = computed(() => { - +
{{ headerText }} @@ -161,7 +163,7 @@ const headerText = computed(() => {