feat(fontend,backend): Add createdBy and lastModifiedBy fields
This commit is contained in:
@@ -46,6 +46,7 @@ definePageMeta({
|
||||
const { getAllApplicationFormTemplates } = useApplicationFormTemplate()
|
||||
const { createApplicationForm } = useApplicationForm()
|
||||
const { validateFormElements, getHighestComplianceStatus } = useApplicationFormValidator()
|
||||
const { data: session } = await useSession(useFetch)
|
||||
|
||||
const { data } = await useAsyncData<PagedApplicationFormDto>(async () => {
|
||||
return await getAllApplicationFormTemplates()
|
||||
@@ -95,6 +96,9 @@ const ampelStatusEmoji = computed(() => {
|
||||
|
||||
async function onSubmit() {
|
||||
if (applicationFormTemplate.value) {
|
||||
applicationFormTemplate.value.createdBy = session.value?.user?.name ?? 'Unknown'
|
||||
applicationFormTemplate.value.lastModifiedBy = session.value?.user?.name ?? 'Unknown'
|
||||
|
||||
await createApplicationForm(applicationFormTemplate.value)
|
||||
await navigateTo('/')
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user