|
|
@ -45,6 +45,7 @@ const readOnly = inject(ReadonlyInj, false) |
|
|
|
const isLocked = inject(IsLockedInj, false) |
|
|
|
const isLocked = inject(IsLockedInj, false) |
|
|
|
|
|
|
|
|
|
|
|
const reloadViewDataHook = inject(ReloadViewDataHookInj) |
|
|
|
const reloadViewDataHook = inject(ReloadViewDataHookInj) |
|
|
|
|
|
|
|
const openNewRecordFormHook = inject(OpenNewRecordFormHookInj) |
|
|
|
|
|
|
|
|
|
|
|
const { isUIAllowed } = useUIPermission() |
|
|
|
const { isUIAllowed } = useUIPermission() |
|
|
|
|
|
|
|
|
|
|
@ -87,6 +88,7 @@ const { |
|
|
|
deleteSelectedRows, |
|
|
|
deleteSelectedRows, |
|
|
|
selectedAllRecords, |
|
|
|
selectedAllRecords, |
|
|
|
loadAggCommentsCount, |
|
|
|
loadAggCommentsCount, |
|
|
|
|
|
|
|
removeLastEmptyRow, |
|
|
|
} = useViewData(meta, view as any, xWhere) |
|
|
|
} = useViewData(meta, view as any, xWhere) |
|
|
|
|
|
|
|
|
|
|
|
const { loadGridViewColumns, updateWidth, resizingColWidth, resizingCol } = useGridViewColumnWidth(view as any) |
|
|
|
const { loadGridViewColumns, updateWidth, resizingColWidth, resizingCol } = useGridViewColumnWidth(view as any) |
|
|
@ -107,6 +109,17 @@ reloadViewDataHook?.on(async () => { |
|
|
|
loadAggCommentsCount() |
|
|
|
loadAggCommentsCount() |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const expandForm = (row: Row, state?: Record<string, any>) => { |
|
|
|
|
|
|
|
expandedFormRow.value = row |
|
|
|
|
|
|
|
expandedFormRowState.value = state |
|
|
|
|
|
|
|
expandedFormDlg.value = true |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
openNewRecordFormHook?.on(async () => { |
|
|
|
|
|
|
|
const newRow = await addEmptyRow() |
|
|
|
|
|
|
|
expandForm(newRow) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const selectCell = (row: number, col: number) => { |
|
|
|
const selectCell = (row: number, col: number) => { |
|
|
|
selected.row = row |
|
|
|
selected.row = row |
|
|
|
selected.col = col |
|
|
|
selected.col = col |
|
|
@ -293,12 +306,6 @@ const onNavigate = (dir: NavigateDir) => { |
|
|
|
break |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const expandForm = (row: Row, state: Record<string, any>) => { |
|
|
|
|
|
|
|
expandedFormRow.value = row |
|
|
|
|
|
|
|
expandedFormRowState.value = state |
|
|
|
|
|
|
|
expandedFormDlg.value = true |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
@ -504,6 +511,7 @@ const expandForm = (row: Row, state: Record<string, any>) => { |
|
|
|
:row="expandedFormRow" |
|
|
|
:row="expandedFormRow" |
|
|
|
:state="expandedFormRowState" |
|
|
|
:state="expandedFormRowState" |
|
|
|
:meta="meta" |
|
|
|
:meta="meta" |
|
|
|
|
|
|
|
@remove-last-empty-row="removeLastEmptyRow" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|