From 9461e2f7d2dc7167f8404a7a0bb9d481df654c2a Mon Sep 17 00:00:00 2001 From: DarkPhoenix2704 Date: Wed, 6 Mar 2024 10:54:33 +0000 Subject: [PATCH] fix(nc-gui): dblclick interaction --- .../nc-gui/components/nc/ErrorBoundary.vue | 8 +++--- .../smartsheet/calendar/DayView/DateField.vue | 13 ++++++++++ .../calendar/DayView/DateTimeField.vue | 26 ++++++++++++++----- .../smartsheet/calendar/MonthView.vue | 14 ++++++++++ .../calendar/WeekView/DateField.vue | 22 +++++++++++++--- .../calendar/WeekView/DateTimeField.vue | 14 ++++++++++ 6 files changed, 84 insertions(+), 13 deletions(-) diff --git a/packages/nc-gui/components/nc/ErrorBoundary.vue b/packages/nc-gui/components/nc/ErrorBoundary.vue index 83da1797ed..98474d193e 100644 --- a/packages/nc-gui/components/nc/ErrorBoundary.vue +++ b/packages/nc-gui/components/nc/ErrorBoundary.vue @@ -29,7 +29,7 @@ export default { const copyError = async () => { try { - if (error.value) await copy(`message: ${error.value.message}\n\n${error.value.stack}`) + if (error.value) await copy(`message: ${error.value?.message}\n\n${error.value?.stack}`) message.info('Error message copied to clipboard.') } catch (e) { message.error('Something went wrong while copying to clipboard, please copy from browser console.') @@ -95,9 +95,9 @@ export default { >
- Message: {{ error.message }} + Message: {{ error?.message }}
-
{{ error.stack }}
+
{{ error?.stack }}
@@ -107,7 +107,7 @@ export default { Copy Error
- +
Reload diff --git a/packages/nc-gui/components/smartsheet/calendar/DayView/DateField.vue b/packages/nc-gui/components/smartsheet/calendar/DayView/DateField.vue index 7d6e5c8864..82fe9a7977 100644 --- a/packages/nc-gui/components/smartsheet/calendar/DayView/DateField.vue +++ b/packages/nc-gui/components/smartsheet/calendar/DayView/DateField.vue @@ -183,6 +183,17 @@ const dropEvent = (event: DragEvent) => { updateRowProperty(newRow, updateProperty, false) } } + +// TODO: Add Support for multiple ranges when multiple ranges are supported +const newRecord = () => { + if (!isUIAllowed('dataEdit') || !calendarRange.value?.length) return + const record = { + row: { + [calendarRange.value[0].fk_from_col!.title!]: selectedDate.value.format('YYYY-MM-DD HH:mm:ssZ'), + }, + } + emit('newRecord', record) +}