feat(frontend): Add ComplianceStatus and first validation

This commit is contained in:
2025-03-01 08:45:12 +01:00
parent 12ba5da7be
commit c07e03d593
7 changed files with 172 additions and 7 deletions

View File

@@ -0,0 +1,27 @@
<template>
<USwitch v-model="modelValue" :label="label" />
</template>
<script setup lang="ts">
import type { FormOptionDto } from '~/.api-client'
const props = defineProps<{
label?: string
formOptions: FormOptionDto[]
}>()
const emit = defineEmits<{
(e: 'update:formOptions', value: FormOptionDto[]): void
}>()
const modelValue = computed({
get: () => props.formOptions?.[0].value === 'true',
set: (val) => {
if (props.formOptions?.[0]) {
const updatedModelValue = [...props.formOptions]
updatedModelValue[0] = { ...updatedModelValue[0], value: val.toString() }
emit('update:formOptions', updatedModelValue)
}
}
})
</script>