Browse Source

fix(nc-gui): add col title to changedColumns if they are preset only for kanban

pull/3563/head
Wing-Kam Wong 2 years ago
parent
commit
fe22ed15aa
  1. 13
      packages/nc-gui/components/smartsheet/expanded-form/index.vue
  2. 5
      packages/nc-gui/pages/signup/[[token]].vue

13
packages/nc-gui/components/smartsheet/expanded-form/index.vue

@ -5,6 +5,7 @@ import type { Ref } from 'vue'
import {
FieldsInj,
IsFormInj,
IsKanbanInj,
MetaInj,
ReloadRowDataHookInj,
computedInject,
@ -50,18 +51,20 @@ const fields = computedInject(FieldsInj, (_fields) => {
return _fields?.value ?? []
})
const isKanban = inject(IsKanbanInj, ref(false))
provide(MetaInj, meta)
const { commentsDrawer, changedColumns, state: rowState, isNew, loadRow } = useProvideExpandedFormStore(meta, row)
if (props.loadRow) {
await loadRow()
loadRow()
}
if (props.rowId) {
try {
await loadRow(props.rowId)
} catch (e) {
loadRow(props.rowId)
} catch (e: any) {
if (e.response?.status === 404) {
// todo: i18n
message.error('Record not found')
@ -108,12 +111,14 @@ reloadHook.on(() => {
provide(ReloadRowDataHookInj, reloadHook)
// adding column titles to changedColumns if they are preset (e.g. kanban)
if (isKanban.value) {
// adding column titles to changedColumns if they are preset
for (const [k, v] of Object.entries(row.value.row)) {
if (v) {
changedColumns.value.add(k)
}
}
}
</script>
<script lang="ts">

5
packages/nc-gui/pages/signup/[[token]].vue

@ -85,7 +85,10 @@ function resetError() {
<div
class="bg-white mt-[60px] relative flex flex-col justify-center gap-2 w-full max-w-[500px] mx-auto p-8 md:(rounded-lg border-1 border-gray-200 shadow-xl)"
>
<LazyGeneralNocoIcon class="color-transition hover:(ring ring-accent) hover:(ring ring-accent ring-opacity-100)" :animate="isLoading" />
<LazyGeneralNocoIcon
class="color-transition hover:(ring ring-accent) hover:(ring ring-accent ring-opacity-100)"
:animate="isLoading"
/>
<h1 class="prose-2xl font-bold self-center my-4">
{{ $t('general.signUp') }}

Loading…
Cancel
Save