mirror of
https://github.com/speatzle/nfsense.git
synced 2025-09-13 15:19:08 +00:00
Move edit to end of path
This commit is contained in:
parent
4c78d1da66
commit
54460ca3d5
8 changed files with 12 additions and 12 deletions
27
client/src/pages/[subsystem]/[entity]/edit/[id].vue
Normal file
27
client/src/pages/[subsystem]/[entity]/edit/[id].vue
Normal file
|
@ -0,0 +1,27 @@
|
|||
<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>
|
26
client/src/pages/[subsystem]/[entity]/edit/index.vue
Normal file
26
client/src/pages/[subsystem]/[entity]/edit/index.vue
Normal file
|
@ -0,0 +1,26 @@
|
|||
<script setup lang="ts">
|
||||
import { editTypes } from "../../../../definitions";
|
||||
|
||||
const props = $defineProps<{subsystem: string, entity: string}>();
|
||||
const { subsystem, entity } = $(props);
|
||||
|
||||
let data = $ref({});
|
||||
|
||||
async function create() {
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
<template>
|
||||
<div v-if="editTypes[subsystem][entity]">
|
||||
<PageHeader :title="'Edit ' + editTypes[subsystem][entity].title">
|
||||
<button @click="create">Create</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>
|
Loading…
Add table
Add a link
Reference in a new issue