Browse Source

chore(gui): lint

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4046/head
Pranav C 2 years ago
parent
commit
d269fb4263
  1. 2
      packages/nc-gui/components/smartsheet/Grid.vue
  2. 6
      packages/nc-gui/composables/useSmartsheetRowStore.ts

2
packages/nc-gui/components/smartsheet/Grid.vue

@ -582,7 +582,7 @@ watch(
<!-- Clear cell -->
<a-menu-item
v-if="contextMenuTarget && !isVirtualCol(fields[contextMenuTarget.col])"
@click="clearCell(contextMenuTarget)"
@click="clearCell(contextMenuTarget, fields[contextMenuTarget.col])"
>
<div v-e="['a:row:clear']" class="nc-project-menu-item">{{ $t('activity.clearCell') }}</div>
</a-menu-item>

6
packages/nc-gui/composables/useSmartsheetRowStore.ts

@ -122,7 +122,7 @@ const [useProvideSmartsheetRowStore, useSmartsheetRowStore] = useInjectionState(
// clear LTAR cell
const clearLTARCell = async (column: ColumnType) => {
if(!column || column.uidt!==UITypes.LinkToAnotherRecord) return
if (!column || column.uidt !== UITypes.LinkToAnotherRecord) return
const relatedTableMeta = metas.value?.[(<LinkToAnotherRecordType>column?.colOptions)?.fk_related_model_id as string]
@ -130,7 +130,7 @@ const [useProvideSmartsheetRowStore, useSmartsheetRowStore] = useInjectionState(
state.value[column.title!] = null
} else if (currentRow.value) {
if ((<LinkToAnotherRecordType>column.colOptions)?.type === RelationTypes.BELONGS_TO) {
if(!currentRow.value.row[column.title!]) return
if (!currentRow.value.row[column.title!]) return
await $api.dbTableRow.nestedRemove(
NOCO,
project.value.title as string,
@ -151,7 +151,7 @@ const [useProvideSmartsheetRowStore, useSmartsheetRowStore] = useInjectionState(
column.title as string,
extractPkFromRow(link, relatedTableMeta?.columns as ColumnType[]),
)
}
}
}
}
}

Loading…
Cancel
Save