Browse Source

fix: Added custom New Record Header for Create record modal in Links moda

pull/6938/head
Muhammed Mustafa 1 year ago
parent
commit
d6f89ac756
  1. 5
      packages/nc-gui/components/smartsheet/expanded-form/index.vue
  2. 7
      packages/nc-gui/components/virtual-cell/components/ListItems.vue
  3. 1
      packages/nc-gui/lang/en.json

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

@ -42,6 +42,7 @@ interface Props {
firstRow?: boolean firstRow?: boolean
lastRow?: boolean lastRow?: boolean
closeAfterSave?: boolean closeAfterSave?: boolean
newRecordHeader?: string
} }
const props = defineProps<Props>() const props = defineProps<Props>()
@ -496,7 +497,9 @@ export default {
{{ displayValue }} {{ displayValue }}
</span> </span>
</div> </div>
<div v-if="row.rowMeta?.new" class="flex items-center truncate font-bold text-gray-800 text-xl">New Record</div> <div v-if="row.rowMeta?.new" class="flex items-center truncate font-bold text-gray-800 text-xl">
{{ props.newRecordHeader ?? $t('activity.newRecord') }}
</div>
</div> </div>
<div class="flex gap-2"> <div class="flex gap-2">
<NcButton <NcButton

7
packages/nc-gui/components/virtual-cell/components/ListItems.vue

@ -354,6 +354,13 @@ const addNewRecord = () => {
:state="newRowState" :state="newRowState"
use-meta-fields use-meta-fields
:close-after-save="isExpandedFormCloseAfterSave" :close-after-save="isExpandedFormCloseAfterSave"
:new-record-header="
isExpandedFormCloseAfterSave
? $t('activity.tableNameCreateNewRecord', {
tableName: relatedTableMeta?.title,
})
: undefined
"
/> />
</Suspense> </Suspense>
</NcModal> </NcModal>

1
packages/nc-gui/lang/en.json

@ -795,6 +795,7 @@
"linkRecord": "Link record", "linkRecord": "Link record",
"addNewRecord": "Add new record", "addNewRecord": "Add new record",
"newRecord": "New record", "newRecord": "New record",
"tableNameCreateNewRecord": "{tableName}: Create new record",
"useConnectionUrl": "Use Connection URL", "useConnectionUrl": "Use Connection URL",
"toggleCommentsDraw": "Toggle comments draw", "toggleCommentsDraw": "Toggle comments draw",
"expandRecord": "Expand Record", "expandRecord": "Expand Record",

Loading…
Cancel
Save