feat(frontend,backend): Create and load comments
This commit is contained in:
@@ -36,14 +36,14 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ComplianceStatus, type PagedApplicationFormDto, type UserDto } from '~/.api-client'
|
||||
import { ComplianceStatus, type PagedApplicationFormDto } from '~/.api-client'
|
||||
import { useApplicationFormValidator } from '~/composables/useApplicationFormValidator'
|
||||
import type { FormElementId } from '~/types/FormElement'
|
||||
|
||||
const { getAllApplicationFormTemplates } = useApplicationFormTemplate()
|
||||
const { createApplicationForm } = useApplicationForm()
|
||||
const { validateFormElements, getHighestComplianceStatus } = useApplicationFormValidator()
|
||||
const { user, selectedOrganization } = useAuth()
|
||||
const { userDto, selectedOrganization } = useAuth()
|
||||
|
||||
const { data } = await useAsyncData<PagedApplicationFormDto>(async () => {
|
||||
return await getAllApplicationFormTemplates()
|
||||
@@ -93,12 +93,8 @@ const ampelStatusEmoji = computed(() => {
|
||||
|
||||
async function onSubmit() {
|
||||
if (applicationFormTemplate.value) {
|
||||
const userDto: UserDto = {
|
||||
id: user.value?.id ?? '',
|
||||
name: user.value?.name ?? 'Unknown'
|
||||
}
|
||||
applicationFormTemplate.value.createdBy = userDto
|
||||
applicationFormTemplate.value.lastModifiedBy = userDto
|
||||
applicationFormTemplate.value.createdBy = userDto.value
|
||||
applicationFormTemplate.value.lastModifiedBy = userDto.value
|
||||
applicationFormTemplate.value.organizationId = selectedOrganization.value?.id ?? ''
|
||||
|
||||
await createApplicationForm(applicationFormTemplate.value)
|
||||
|
||||
Reference in New Issue
Block a user