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
lastRow?: boolean
closeAfterSave?: boolean
newRecordHeader?: string
}
const props = defineProps<Props>()
@ -496,7 +497,9 @@ export default {
{{ displayValue }}
</span>
</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 class="flex gap-2">
<NcButton

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

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

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

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

Loading…
Cancel
Save