Browse Source

QR Code: enable auto updating of cell if referenced value cell is changed

pull/4142/head
Daniel Spaude 2 years ago
parent
commit
606cf1fd95
No known key found for this signature in database
GPG Key ID: 654A3D1FA4F35FFE
  1. 1
      packages/nc-gui/components/smartsheet/Cell.vue
  2. 6
      packages/nc-gui/composables/useSharedView.ts
  3. 8
      packages/nc-gui/composables/useViewData.ts

1
packages/nc-gui/components/smartsheet/Cell.vue

@ -80,7 +80,6 @@ const {
isRating,
isCurrency,
isAttachment,
isQrCode,
isTextArea,
isString,
isInt,

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

@ -36,7 +36,11 @@ export function useSharedView() {
(meta.value as TableType)?.columns
?.filter(
(f: Record<string, any>) =>
f.show && f.uidt !== UITypes.Rollup && f.uidt !== UITypes.Lookup && f.uidt !== UITypes.Formula,
f.show &&
f.uidt !== UITypes.Rollup &&
f.uidt !== UITypes.Lookup &&
f.uidt !== UITypes.Formula &&
f.uidt !== UITypes.QrCode,
)
.sort((a: Record<string, any>, b: Record<string, any>) => a.order - b.order)
.map((c: Record<string, any>) => ({ ...c, required: !!(c.required || 0) })) ?? [],

8
packages/nc-gui/composables/useViewData.ts

@ -282,7 +282,13 @@ export function useViewData(
Object.assign(
toUpdate.row,
metaValue!.columns!.reduce<Record<string, any>>((acc: Record<string, any>, col: ColumnType) => {
if (col.uidt === UITypes.Formula || col.uidt === UITypes.Rollup || col.au || col.cdf?.includes(' on update '))
if (
col.uidt === UITypes.Formula ||
col.uidt === UITypes.QrCode ||
col.uidt === UITypes.Rollup ||
col.au ||
col.cdf?.includes(' on update ')
)
acc[col.title!] = updatedRowData[col.title!]
return acc
}, {} as Record<string, any>),

Loading…
Cancel
Save