Started migrating Forms

This commit is contained in:
R40fendt
2026-02-02 12:18:27 +01:00
parent 9e34a12e23
commit 8c29559fc9
4 changed files with 35 additions and 154 deletions

View File

@@ -1,11 +1,40 @@
<script lang="ts" setup>
import RitzenbergenLib from "../../ritzenbergenlib.ts";
import RitzenbergenLib from "../../ritzenbergenlib";
import FormResults from "../FormResults.vue";
import { ref, defineProps } from "vue";
import Modal from "../Modal.vue";
import { Formular } from "../../dto/formular.dto";
async function init() {
forms.value=await RitzenbergenLib.graphqlClient.request<Formular[]>(`
{
formulare {
id
name
minitext
ispublic
fields {
id
formular
name
displayname
displayvalue
placeholder
type
title
required
maxlength
min
max
checked
value
}
}
}
`
);
}
const Formular = RitzenbergenLib.Formular;
const Field = RitzenbergenLib.Field;
const forms = ref([] as Formular[]);
const props=defineProps({
@@ -16,11 +45,7 @@ const props=defineProps({
}
});
Formular.getForms().then((f) => {
forms.value = f;
});
init();
function submit($event: Event) {
const url = new URL(