|
|
|
@ -29,6 +29,8 @@ const { isSharedBase } = storeToRefs(useBase())
|
|
|
|
|
|
|
|
|
|
const filterQueryRef = ref() |
|
|
|
|
|
|
|
|
|
const { t } = useI18n() |
|
|
|
|
|
|
|
|
|
const { $e } = useNuxtApp() |
|
|
|
|
|
|
|
|
|
const { |
|
|
|
@ -55,8 +57,6 @@ const isPublic = inject(IsPublicInj, ref(false))
|
|
|
|
|
|
|
|
|
|
const isExpandedFormCloseAfterSave = ref(false) |
|
|
|
|
|
|
|
|
|
const createdRecord = ref() |
|
|
|
|
|
|
|
|
|
isChildrenExcludedLoading.value = true |
|
|
|
|
|
|
|
|
|
const isForm = inject(IsFormInj, ref(false)) |
|
|
|
@ -167,8 +167,6 @@ watch(expandedFormDlg, () => {
|
|
|
|
|
loadChildrenList() |
|
|
|
|
} |
|
|
|
|
loadChildrenExcludedList(rowState.value) |
|
|
|
|
} else { |
|
|
|
|
createdRecord.value = undefined |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
@ -192,11 +190,33 @@ const addNewRecord = () => {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const onCreatedRecord = (record: any) => { |
|
|
|
|
createdRecord.value = record |
|
|
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
createdRecord.value = undefined |
|
|
|
|
}, 10000) |
|
|
|
|
const msgVNode = h( |
|
|
|
|
'div', |
|
|
|
|
{ |
|
|
|
|
class: 'ml-1 inline-flex flex-col gap-1 items-start', |
|
|
|
|
}, |
|
|
|
|
[ |
|
|
|
|
h( |
|
|
|
|
'span', |
|
|
|
|
{ |
|
|
|
|
class: 'font-semibold', |
|
|
|
|
}, |
|
|
|
|
t('activity.recordCreatedLinked'), |
|
|
|
|
), |
|
|
|
|
h( |
|
|
|
|
'span', |
|
|
|
|
{ |
|
|
|
|
class: 'text-gray-500', |
|
|
|
|
}, |
|
|
|
|
t('activity.gotSavedLinkedSuccessfully', { |
|
|
|
|
tableName: relatedTableMeta.value?.title, |
|
|
|
|
recordTitle: record[relatedTableDisplayValueProp.value], |
|
|
|
|
}), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
message.success(msgVNode) |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
@ -218,23 +238,6 @@ const onCreatedRecord = (record: any) => {
|
|
|
|
|
:display-value="row.row[displayValueProp]" |
|
|
|
|
:header="$t('activity.addNewLink')" |
|
|
|
|
/> |
|
|
|
|
<div class="relative !xs:hidden my-3 bg-gray-50 border-gray-50 border-b-2"> |
|
|
|
|
<div v-if="createdRecord" class="absolute flex flex-row justify-center left-0 right-0 -top-3"> |
|
|
|
|
<div class="flex text-green-500 bg-green-100 pl-1.5 pr-0.75 py-0.5 rounded-md items-center"> |
|
|
|
|
<div> |
|
|
|
|
{{ |
|
|
|
|
$t('activity.gotSavedLinkedSuccessfully', { |
|
|
|
|
tableName: relatedTableMeta?.title, |
|
|
|
|
recordTitle: createdRecord?.[relatedTableDisplayValueProp], |
|
|
|
|
}) |
|
|
|
|
}} |
|
|
|
|
</div> |
|
|
|
|
<NcButton size="xxsmall" type="text" class="ml-1 !h-5.5 !w-4 !hover:(bg-green-200 text-gray-800)"> |
|
|
|
|
<GeneralIcon icon="close" class="text-gray-500 !text-xs !h-3.5 !w-3.5" @click="createdRecord = undefined" /> |
|
|
|
|
</NcButton> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="flex mt-2 mb-2 items-center gap-2"> |
|
|
|
|
<div |
|
|
|
|
class="flex items-center border-1 p-1 rounded-md w-full border-gray-200" |
|
|
|
|