diff --git a/client/src/pages/[subsystem]/[entity]/edit/index.vue b/client/src/pages/[subsystem]/[entity]/edit/index.vue index 31586e5..e7b097d 100644 --- a/client/src/pages/[subsystem]/[entity]/edit/index.vue +++ b/client/src/pages/[subsystem]/[entity]/edit/index.vue @@ -7,16 +7,18 @@ const p = getPlugins(); const props = $defineProps<{subsystem: string, entity: string}>(); const { subsystem, entity } = $(props); -async function create(value: any) { - console.debug('value', value); +let vm: any = $ref({}); + +async function create() { + console.debug('value', vm); let res: any; if (editTypes[subsystem][entity].idType == 'Number') { - res = await apiCall(`${subsystem }.${entity}.create`, value); + res = await apiCall(`${subsystem }.${entity}.create`, vm); } else { // TODO find way to only have a name/id field in the form on create and not put it into the value - let id = value.name; - delete value.name; - res = await apiCall(`${subsystem }.${entity}.create`, {id: id, thing: value}); + let id = vm.name; + delete vm.name; + res = await apiCall(`${subsystem }.${entity}.create`, {id: id, thing: vm}); } if (res.Error === null) { @@ -32,7 +34,15 @@ async function create(value: any) {
- + +
+
+ +
+ +
+
+

{{ vm }}