Browse Source

Fix: Misc bug fixes (#8748)

* fix(nc-gui): hide deprecated fields and width of modal if field is att

* fix(nocodb): duplicate table/base if kanban view is prasent
pull/8752/head
Ramesh Mane 5 months ago committed by GitHub
parent
commit
6176e1871b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      packages/nc-gui/components/smartsheet/column/EditOrAdd.vue
  2. 2
      packages/nocodb/src/models/KanbanView.ts
  3. 3
      packages/nocodb/src/modules/jobs/jobs/export-import/export.service.ts
  4. 6
      packages/nocodb/src/modules/jobs/jobs/export-import/import.service.ts

6
packages/nc-gui/components/smartsheet/column/EditOrAdd.vue

@ -115,12 +115,13 @@ const showDeprecated = ref(false)
const isSystemField = (t: { name: UITypes }) =>
[UITypes.CreatedBy, UITypes.CreatedTime, UITypes.LastModifiedBy, UITypes.LastModifiedTime].includes(t.name)
const uiFilters = (t: { name: UITypes; virtual?: number }) => {
const uiFilters = (t: { name: UITypes; virtual?: number; deprecated?: boolean }) => {
const systemFiledNotEdited = !isSystemField(t) || formState.value.uidt === t.name || !isEdit.value
const geoDataToggle = geoDataToggleCondition(t) && (!isEdit.value || !t.virtual || t.name === formState.value.uidt)
const specificDBType = t.name === UITypes.SpecificDBType && isXcdbBase(meta.value?.source_id)
const showDeprecatedField = !t.deprecated || showDeprecated.value
return systemFiledNotEdited && geoDataToggle && !specificDBType
return systemFiledNotEdited && geoDataToggle && !specificDBType && showDeprecatedField
}
const uiTypesOptions = computed<typeof uiTypes>(() => {
@ -329,7 +330,6 @@ const filterOption = (input: string, option: { value: UITypes }) => {
'w-[384px]': !props.embedMode,
'min-w-500px': formState.uidt === UITypes.LinkToAnotherRecord || formState.uidt === UITypes.Links,
'!w-116 overflow-visible': formState.uidt === UITypes.Formula && !props.embedMode,
'!w-[500px]': formState.uidt === UITypes.Attachment && !props.embedMode && !appInfo.ee,
'!w-[600px]': formState.uidt === UITypes.LinkToAnotherRecord || formState.uidt === UITypes.Links,
'shadow-lg border-1 border-gray-200 shadow-gray-300 rounded-xl p-5': !embedMode,
}"

2
packages/nocodb/src/models/KanbanView.ts

@ -109,7 +109,7 @@ export default class KanbanView implements KanbanType {
insertObj.meta = {
fk_cover_image_object_fit:
parseMetaProp(insertObj)?.fk_cover_image_object_fit || 'cover',
parseMetaProp(insertObj)?.fk_cover_image_object_fit || 'fit',
};
insertObj.meta = stringifyMetaProp(insertObj);

3
packages/nocodb/src/modules/jobs/jobs/export-import/export.service.ts

@ -279,6 +279,9 @@ export class ExportService {
if (view.type === ViewTypes.KANBAN) {
const meta = parseMetaProp(view.view) as Record<string, any>;
for (const [k, v] of Object.entries(meta)) {
// keep non-array meta as it is
if (!Array.isArray(v)) continue;
const colId = idMap.get(k as string);
for (const op of v) {
op.fk_column_id = idMap.get(op.fk_column_id);

6
packages/nocodb/src/modules/jobs/jobs/export-import/import.service.ts

@ -1563,6 +1563,12 @@ export class ImportService {
case 'meta': {
const meta = {};
for (const [mk, mv] of Object.entries(v as any)) {
// copy non-array meta as it is
if (!Array.isArray(mv)) {
meta[mk] = mv;
continue;
}
const tempVal = [];
for (const vl of mv as any) {
if (vl.fk_column_id) {

Loading…
Cancel
Save