|
|
@ -11,11 +11,13 @@ import { |
|
|
|
IsGridInj, |
|
|
|
IsGridInj, |
|
|
|
IsLockedInj, |
|
|
|
IsLockedInj, |
|
|
|
MetaInj, |
|
|
|
MetaInj, |
|
|
|
|
|
|
|
NavigateDir, |
|
|
|
OpenNewRecordFormHookInj, |
|
|
|
OpenNewRecordFormHookInj, |
|
|
|
PaginationDataInj, |
|
|
|
PaginationDataInj, |
|
|
|
ReadonlyInj, |
|
|
|
ReadonlyInj, |
|
|
|
ReloadRowDataHookInj, |
|
|
|
ReloadRowDataHookInj, |
|
|
|
ReloadViewDataHookInj, |
|
|
|
ReloadViewDataHookInj, |
|
|
|
|
|
|
|
SmartsheetStoreEvents, |
|
|
|
computed, |
|
|
|
computed, |
|
|
|
createEventHook, |
|
|
|
createEventHook, |
|
|
|
enumColor, |
|
|
|
enumColor, |
|
|
@ -42,7 +44,6 @@ import { |
|
|
|
watch, |
|
|
|
watch, |
|
|
|
} from '#imports' |
|
|
|
} from '#imports' |
|
|
|
import type { Row } from '~/lib' |
|
|
|
import type { Row } from '~/lib' |
|
|
|
import { NavigateDir, SmartsheetStoreEvents } from '~/lib' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { t } = useI18n() |
|
|
|
const { t } = useI18n() |
|
|
|
|
|
|
|
|
|
|
@ -545,17 +546,17 @@ watch( |
|
|
|
{ immediate: true }, |
|
|
|
{ immediate: true }, |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
const columnPosition = ref<Pick<ColumnReqType, 'column_order'> | null>(null) |
|
|
|
const columnOrder = ref<Pick<ColumnReqType, 'column_order'> | null>(null) |
|
|
|
|
|
|
|
|
|
|
|
eventBus.on(async (event, payload) => { |
|
|
|
eventBus.on(async (event, payload) => { |
|
|
|
if (event === SmartsheetStoreEvents.FIELD_ADD) { |
|
|
|
if (event === SmartsheetStoreEvents.FIELD_ADD) { |
|
|
|
columnPosition.value = payload |
|
|
|
columnOrder.value = payload |
|
|
|
addColumnDropdown.value = true |
|
|
|
addColumnDropdown.value = true |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const closeAddColumnMenu = () => { |
|
|
|
const closeAddColumnDropdown = () => { |
|
|
|
columnPosition.value = null |
|
|
|
columnOrder.value = null |
|
|
|
addColumnDropdown.value = false |
|
|
|
addColumnDropdown.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
@ -633,9 +634,9 @@ const closeAddColumnMenu = () => { |
|
|
|
<template #overlay> |
|
|
|
<template #overlay> |
|
|
|
<SmartsheetColumnEditOrAddProvider |
|
|
|
<SmartsheetColumnEditOrAddProvider |
|
|
|
v-if="addColumnDropdown" |
|
|
|
v-if="addColumnDropdown" |
|
|
|
:column-position="columnPosition" |
|
|
|
:column-position="columnOrder" |
|
|
|
@submit="closeAddColumnMenu" |
|
|
|
@submit="closeAddColumnDropdown" |
|
|
|
@cancel="closeAddColumnMenu" |
|
|
|
@cancel="closeAddColumnDropdown" |
|
|
|
@click.stop |
|
|
|
@click.stop |
|
|
|
@keydown.stop |
|
|
|
@keydown.stop |
|
|
|
/> |
|
|
|
/> |
|
|
|