diff --git a/packages/nc-gui/components/cell/Checkbox.vue b/packages/nc-gui/components/cell/Checkbox.vue index 61fdeed407..94a87c5a0c 100644 --- a/packages/nc-gui/components/cell/Checkbox.vue +++ b/packages/nc-gui/components/cell/Checkbox.vue @@ -7,6 +7,7 @@ import { getMdiIcon, inject, parseProp, + useProject, useSelectedCellKeyupListener, } from '#imports' @@ -26,10 +27,7 @@ const emits = defineEmits() const active = inject(ActiveCellInj, ref(false)) -let vModel = $computed({ - get: () => !!props.modelValue && props.modelValue !== '0' && props.modelValue !== 0, - set: (val: boolean) => emits('update:modelValue', val), -}) +const { isMssql } = useProject() const column = inject(ColumnInj) @@ -48,6 +46,11 @@ const checkboxMeta = $computed(() => { } }) +let vModel = $computed({ + get: () => !!props.modelValue && props.modelValue !== '0' && props.modelValue !== 0, + set: (val: any) => emits('update:modelValue', isMssql(column?.value?.base_id) ? +val : val), +}) + function onClick(force?: boolean, event?: MouseEvent) { if ( (event?.target as HTMLElement)?.classList?.contains('nc-checkbox') || diff --git a/packages/nc-gui/components/cell/attachment/Image.vue b/packages/nc-gui/components/cell/attachment/Image.vue index 8c3669be0f..625096b106 100644 --- a/packages/nc-gui/components/cell/attachment/Image.vue +++ b/packages/nc-gui/components/cell/attachment/Image.vue @@ -1,4 +1,6 @@ + + diff --git a/packages/nc-gui/components/smartsheet/Form.vue b/packages/nc-gui/components/smartsheet/Form.vue index 6adeda9da5..05a26b2304 100644 --- a/packages/nc-gui/components/smartsheet/Form.vue +++ b/packages/nc-gui/components/smartsheet/Form.vue @@ -727,18 +727,20 @@ watch(view, (nextView) => { }, ]" > - + + +
{{ element.description }}
diff --git a/packages/nc-gui/components/smartsheet/TableDataCell.vue b/packages/nc-gui/components/smartsheet/TableDataCell.vue index b40604fd6b..a78d4751ff 100644 --- a/packages/nc-gui/components/smartsheet/TableDataCell.vue +++ b/packages/nc-gui/components/smartsheet/TableDataCell.vue @@ -11,7 +11,7 @@ provide(CurrentCellInj, el) diff --git a/packages/nc-gui/components/smartsheet/expanded-form/index.vue b/packages/nc-gui/components/smartsheet/expanded-form/index.vue index 0c1e5285c7..d1dc2d97f8 100644 --- a/packages/nc-gui/components/smartsheet/expanded-form/index.vue +++ b/packages/nc-gui/components/smartsheet/expanded-form/index.vue @@ -329,7 +329,7 @@ export default { -
@@ -343,7 +343,7 @@ export default { :active="true" @update:model-value="changedColumns.add(col.title)" /> -
+ diff --git a/packages/nc-gui/components/template/Editor.vue b/packages/nc-gui/components/template/Editor.vue index 214ce1da20..455611e3a7 100644 --- a/packages/nc-gui/components/template/Editor.vue +++ b/packages/nc-gui/components/template/Editor.vue @@ -3,6 +3,7 @@ import dayjs from 'dayjs' import utc from 'dayjs/plugin/utc' import type { ColumnType, TableType } from 'nocodb-sdk' import { UITypes, isSystemColumn, isVirtualCol } from 'nocodb-sdk' +import type { CheckboxChangeEvent } from 'ant-design-vue/es/checkbox/interface' import { srcDestMappingColumns, tableColumns } from './utils' import { Empty, @@ -87,6 +88,8 @@ const isImporting = ref(false) const importingTips = ref>({}) +const checkAllRecord = ref([]) + const uiTypeOptions = ref( (Object.keys(UITypes) as (keyof typeof UITypes)[]) .filter( @@ -615,6 +618,13 @@ function handleEditableTnChange(idx: number) { function isSelectDisabled(uidt: string, disableSelect = false) { return (uidt === UITypes.SingleSelect || uidt === UITypes.MultiSelect) && disableSelect } + +function handleCheckAllRecord(event: CheckboxChangeEvent, tableName: string) { + const isChecked = event.target.checked + for (const record of srcDestMapping.value[tableName]) { + record.enabled = isChecked + } +}