Started migrating Forms
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user