major(fullstack): Add dynamic section spawning, removal of app. form create DTOs,
This commit is contained in:
@@ -40,7 +40,8 @@
|
||||
<div>
|
||||
<h3 class="font-semibold text-lg">{{ currentTemplate.name }}</h3>
|
||||
<p class="text-sm text-muted mt-1">
|
||||
{{ $t('templates.lastModified') }} {{ formatDate(new Date(currentTemplate.modifiedAt)) }}
|
||||
{{ $t('templates.lastModified') }}
|
||||
{{ currentTemplate.modifiedAt ? formatDate(new Date(currentTemplate.modifiedAt)) : '-' }}
|
||||
</p>
|
||||
</div>
|
||||
<UBadge v-if="hasUnsavedChanges" :label="$t('templates.unsavedChanges')" color="warning" variant="subtle" />
|
||||
@@ -206,17 +207,20 @@ async function saveTemplate() {
|
||||
|
||||
try {
|
||||
const parsedData = JSON.parse(editorContent.value)
|
||||
const dataWithDates = convertDates(parsedData) as ApplicationFormDto
|
||||
const dataWithDates = convertDates(parsedData)
|
||||
|
||||
if (currentTemplate.value?.id) {
|
||||
currentTemplate.value = await updateApplicationFormTemplate(currentTemplate.value.id, dataWithDates)
|
||||
currentTemplate.value = await updateApplicationFormTemplate(
|
||||
currentTemplate.value.id,
|
||||
dataWithDates as ApplicationFormDto
|
||||
)
|
||||
toast.add({
|
||||
title: $t('common.success'),
|
||||
description: $t('templates.updated'),
|
||||
color: 'success'
|
||||
})
|
||||
} else {
|
||||
currentTemplate.value = await createApplicationFormTemplate(dataWithDates)
|
||||
currentTemplate.value = await createApplicationFormTemplate(dataWithDates as ApplicationFormDto)
|
||||
toast.add({
|
||||
title: $t('common.success'),
|
||||
description: $t('templates.created'),
|
||||
|
||||
Reference in New Issue
Block a user