nfsense/client/src/pages/edit/[subsystem]/[entity]/[id].vue
Samuel Lorch 4c78d1da66
Nice form (#11)
* wip

* vee-validate experiments

* get test enabled form working

* Make PillBar Properly work with ModelValue

* Register NumberBox Globally

* Rework NiceForm

* Use new form props

* Rework Definitions for new Form
2023-04-03 22:59:20 +02:00

27 lines
781 B
Vue

<script setup lang="ts">
import { editTypes } from "../../../../definitions";
const props = $defineProps<{subsystem: string, entity: string, id: string}>();
const { subsystem, entity, id } = $(props);
let data = $ref({} as {});
async function update() {
}
</script>
<template>
<div v-if="editTypes[subsystem][entity]">
<PageHeader :title="'Edit ' + editTypes[subsystem][entity].title">
<button @click="update">Update</button>
<button @click="$router.go(-1)">Discard</button>
</PageHeader>
<NiceForm class="scroll cl-secondary" :title="editTypes[subsystem][entity].title" :sections="editTypes[subsystem][entity].sections" v-model="data"/>
</div>
<div v-else>
<PageHeader title="Error"/>
No editType for this Entity
</div>
</template>