diff --git a/components/AssMea.vue b/components/AssMea.vue
index 86c5b97..16c0386 100644
--- a/components/AssMea.vue
+++ b/components/AssMea.vue
@@ -52,6 +52,7 @@
import { ref, onMounted } from "vue";
import { FilterMatchMode } from "primevue/api";
import { useToast } from 'primevue/usetoast';
+const config = useRuntimeConfig();
interface cMeasures {
id: number;
@@ -76,7 +77,7 @@ let params: any;
params = inject('dialogRef');
-const {data: measures } = await useFetch('http://ubodroid-2:8081/api/v1/meas');
+const {data: measures } = await useFetch(config.public.apiHostname + 'api/v1/meas');
diff --git a/components/Carousel.vue b/components/Carousel.vue
deleted file mode 100644
index 754c27b..0000000
--- a/components/Carousel.vue
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/components/Evaluated.vue b/components/Evaluated.vue
index 73ccac9..e189906 100644
--- a/components/Evaluated.vue
+++ b/components/Evaluated.vue
@@ -50,7 +50,7 @@ import { useToast } from 'primevue/usetoast';
import { useDialog } from "primevue/usedialog";
import UpdPhoto from "./UpdPhoto.vue";
import internal from "stream";
-
+const config = useRuntimeConfig();
interface cItemExt {
id: number;
@@ -71,7 +71,7 @@ let imgurl = ref();
const imgref = ref();
//imgref.value='1679468897186c75b5379eb6691871da30ef18b98a_1.jpg';
const {data: itemsext } = await awaitItemsext();
-const {data: typen } = await useFetch('http://ubodroid-2:8081/api/v1/typ');
+const {data: typen } = await useFetch(config.public.apiHostname + 'api/v1/typ');
async function openDetail(id) {
await navigateTo({
@@ -86,7 +86,7 @@ async function openDetail(id) {
};
async function awaitItemsext() {
- const res = await useFetch('http://ubodroid-2:8081/api/v1/ite');
+ const res = await useFetch(config.public.apiHostname + 'api/v1/ite');
let r: any;
@@ -108,7 +108,7 @@ async function openEval(id) {
}
async function openFrontview(iid: number) {
- const itemext = await useFetch('http://ubodroid-2:8081/api/v1/ite/'+iid);
+ const itemext = await useFetch(config.public.apiHostname + 'api/v1/ite/'+iid);
let ite: cItemExt;
console.log(itemext.data.value);
ite = itemext.data.value;
@@ -139,7 +139,7 @@ async function doUpdate(t: cItemExt) {
fd.append('itembid', t.itemb.id.toString());
fd.append('frontviewid', t.frontviewid.toString());
console.log('fd = ', fd);
- await $fetch('http://ubodroid-2:8081/api/v1/ite/'+t.id,{
+ await $fetch(config.public.apiHostname + 'api/v1/ite/'+t.id,{
method: 'PUT',
body: fd
});
@@ -163,7 +163,7 @@ async function doUpdate(t: cItemExt) {
fd.append('abmessungenid', t.abmessungenid.toString());
fd.append('frontviewid', t.frontviewid.toString());
console.log('fd = ', fd);
- await $fetch('http://ubodroid-2:8081/api/v1/itb',{
+ await $fetch(config.public.apiHostname + 'api/v1/itb',{
method: 'POST',
body: fd
});
diff --git a/components/Itembdetail.vue b/components/Itembdetail.vue
index 5d28f86..69a2f5d 100644
--- a/components/Itembdetail.vue
+++ b/components/Itembdetail.vue
@@ -130,8 +130,7 @@ const route = useRoute();
const qid = route.query.id;
const toast = useToast();
const deleteItemBDialog = ref(false);
-
-
+const config = useRuntimeConfig();
interface cItemB {
id: number;
@@ -146,8 +145,8 @@ interface cItemB {
}
//const itemsb = ref();
-const {data: itemsbd } = await useFetch('http://ubodroid-2:8081/api/v1/itb/'+qid);
-const {data: images } = await useFetch('http://ubodroid-2:8081/api/v1/pho/itb/'+qid);
+const {data: itemsbd } = await useFetch(config.public.apiHostname + 'api/v1/itb/'+qid);
+const {data: images } = await useFetch(config.public.apiHostname + 'api/v1/pho/itb/'+qid);
const mea = ref({id: 0, kurz: '', brust:0, laenget:0, schulterbreite:0, taillenumfangt:0, hueftumfang:0, innennaht:0, laengeb:0, taillenumfangb:0});
@@ -183,7 +182,7 @@ async function doDelete() {
let fd = new FormData();
//fd.append('bezeichnung', bezeichnung.value);
fd.append('id', qid.toString());
- await $fetch('http://ubodroid-2:8081/api/v1/itb/'+qid, { method: 'DELETE', body: fd } );
+ await $fetch(config.public.apiHostname + 'api/v1/itb/'+qid, { method: 'DELETE', body: fd } );
toast.add({ severity: 'success', summary: 'Item deleted', detail: '', life: 3000 });
deleteItemBDialog.value = false;
diff --git a/components/Itemextdetail.vue b/components/Itemextdetail.vue
index 65d2e46..79b8771 100644
--- a/components/Itemextdetail.vue
+++ b/components/Itemextdetail.vue
@@ -147,7 +147,7 @@ const route = useRoute();
const qid = route.query.id;
const toast = useToast();
const deleteItemBDialog = ref(false);
-
+const config = useRuntimeConfig();
interface cItemB {
@@ -163,8 +163,8 @@ interface cItemB {
}
//const itemsb = ref();
-const {data: itemext } = await useFetch('http://ubodroid-2:8081/api/v1/ite/'+qid);
-const {data: images } = await useFetch('http://ubodroid-2:8081/api/v1/pho/ite/'+qid);
+const {data: itemext } = await useFetch(config.public.apiHostname + 'api/v1/ite/'+qid);
+const {data: images } = await useFetch(config.public.apiHostname + 'api/v1/pho/ite/'+qid);
const mea = ref({id: 0, kurz: '', brust:0, laenget:0, schulterbreite:0, taillenumfangt:0, hueftumfang:0, innennaht:0, laengeb:0, taillenumfangb:0});
@@ -200,7 +200,7 @@ async function doDelete() {
let fd = new FormData();
//fd.append('bezeichnung', bezeichnung.value);
fd.append('id', qid.toString());
- await $fetch('http://ubodroid-2:8081/api/v1/ite/'+qid, { method: 'DELETE', body: fd } );
+ await $fetch(config.public.apiHostname + 'api/v1/ite/'+qid, { method: 'DELETE', body: fd } );
toast.add({ severity: 'success', summary: 'Item deleted', detail: '', life: 3000 });
deleteItemBDialog.value = false;
diff --git a/components/LinkItemB.vue b/components/LinkItemB.vue
index dbc3255..396906f 100644
--- a/components/LinkItemB.vue
+++ b/components/LinkItemB.vue
@@ -53,6 +53,8 @@ import { ref } from "vue";
import { FilterMatchMode } from "primevue/api";
import { useToast } from 'primevue/usetoast';
+const config = useRuntimeConfig();
+
interface cItemB {
id: number;
bezeichnung: string;
@@ -79,7 +81,7 @@ const toast = useToast();
//const createTypDialog = ref(false);
const itemb = ref({id: 0, bezeichnung: '', kurzbeschreibung: '', groesse: '', farbe: '', typid: 0, material: '', abmessungenid: 1, frontviewid: 4});
-const {data: itembs } = await useFetch('http://ubodroid-2:8081/api/v1/itb');
+const {data: itembs } = await useFetch(config.public.apiHostname + 'api/v1/itb');
const columns = [
diff --git a/components/LinkItemExt.vue b/components/LinkItemExt.vue
index 983d273..9129116 100644
--- a/components/LinkItemExt.vue
+++ b/components/LinkItemExt.vue
@@ -53,6 +53,8 @@ import { ref } from "vue";
import { FilterMatchMode } from "primevue/api";
import { useToast } from 'primevue/usetoast';
+const config = useRuntimeConfig();
+
interface cItemB {
id: number;
bezeichnung: string;
@@ -79,7 +81,7 @@ const toast = useToast();
//const createTypDialog = ref(false);
const itemb = ref({id: 0, bezeichnung: '', kurzbeschreibung: '', groesse: '', farbe: '', typid: 0, material: '', abmessungenid: 1, frontviewid: 4});
-const {data: itemexts } = await useFetch('http://ubodroid-2:8081/api/v1/ite');
+const {data: itemexts } = await useFetch(config.public.apiHostname + 'api/v1/ite');
const columns = [
diff --git a/components/Measure.vue b/components/Measure.vue
index 5b34b27..fa10a05 100644
--- a/components/Measure.vue
+++ b/components/Measure.vue
@@ -67,6 +67,8 @@
import { useDialog } from "primevue/usedialog";
import UpdMeas from "./UpdMeas.vue";
+const config = useRuntimeConfig();
+
interface cMeasures {
id: number;
kurz: string;
@@ -90,7 +92,7 @@ import UpdMeas from "./UpdMeas.vue";
const createTypDialog = ref(false);
const mea = ref({id: 0, kurz: '', brust:0, laenget:0, schulterbreite:0, taillenumfangt:0, hueftumfang:0, innennaht:0, laengeb:0, taillenumfangb:0});
- const {data: measures } = await useFetch('http://ubodroid-2:8081/api/v1/meas');
+ const {data: measures } = await useFetch(config.public.apiHostname + 'api/v1/meas');
const columns = [
{ field: 'id', header: '#'},
@@ -147,7 +149,7 @@ import UpdMeas from "./UpdMeas.vue";
fd.append('laengeb', t.laengeb.toString());
fd.append('taillenumfangb', t.taillenumfangb.toString());
- await $fetch('http://ubodroid-2:8081/api/v1/meas',{
+ await $fetch(config.public.apiHostname + 'api/v1/meas',{
method: 'POST',
body: fd
});
@@ -182,7 +184,7 @@ import UpdMeas from "./UpdMeas.vue";
fd.append('laengeb', t.laengeb.toString());
fd.append('taillenumfangb', t.taillenumfangb.toString());
- await $fetch('http://ubodroid-2:8081/api/v1/meas/'+t.id,{
+ await $fetch(config.public.apiHostname + 'api/v1/meas/'+t.id,{
method: 'PUT',
body: fd
});
@@ -196,7 +198,7 @@ import UpdMeas from "./UpdMeas.vue";
let fd = new FormData();
fd.append('id', id.value.toString());
- const res = await $fetch('http://ubodroid-2:8081/api/v1/meas/'+id.value,{
+ const res = await $fetch(config.public.apiHostname + 'api/v1/meas/'+id.value,{
method: 'DELETE',
body: fd
});
diff --git a/components/Photo.vue b/components/Photo.vue
index 85f2d32..3b3ef7c 100644
--- a/components/Photo.vue
+++ b/components/Photo.vue
@@ -69,6 +69,8 @@ import { ref, defineProps } from "vue";
import { useDialog } from 'primevue/usedialog';
const pfad = '/photos';
+const config = useRuntimeConfig();
+
interface cPho {
id: number;
pfad: string;
@@ -83,7 +85,7 @@ import LinkItemExt from "./LinkItemExt.vue";
const toast = useToast();
const dialog = useDialog();
const uploadedFiles = ref([]);
-const {data: photos } = await useFetch('http://ubodroid-2:8081/api/v1/pho');
+const {data: photos } = await useFetch(config.public.apiHostname + 'api/v1/pho');
const onAdvancedUpload = async (event) => {
const files = event.files;
@@ -97,7 +99,7 @@ const onAdvancedUpload = async (event) => {
console.log('files = ', i, file);
}
- const imgUpload = await $fetch("http://ubodroid-2:8081/api/v1/upload", {
+ const imgUpload = await $fetch(config.public.apiHostname + "api/v1/upload", {
method: "POST",
body: fd,
});
@@ -115,7 +117,7 @@ const onAdvancedUpload = async (event) => {
async function linkToB (id: number) {
- const photo = await useFetch('http://ubodroid-2:8081/api/v1/pho/'+id);
+ const photo = await useFetch(config.public.apiHostname + 'api/v1/pho/'+id);
let pho: cPho;
console.log(photo.data.value);
pho = photo.data.value;
@@ -133,7 +135,7 @@ async function linkToB (id: number) {
}
async function linkToE(id: number) {
- const photo = await useFetch('http://ubodroid-2:8081/api/v1/pho/'+id);
+ const photo = await useFetch(config.public.apiHostname + 'api/v1/pho/'+id);
let pho: cPho;
console.log(photo.data.value);
pho = photo.data.value;
@@ -159,7 +161,7 @@ async function doUpdate(ref: any, pho: cPho, updext: boolean){
}
fd.append('itembid', ref.id.toString());
fd.append('itemextid', pho.itemextid.toString());
- const updPho = await $fetch("http://ubodroid-2:8081/api/v1/pho/"+pho.id, {
+ const updPho = await $fetch(config.public.apiHostname + "api/v1/pho/"+pho.id, {
method: "PUT",
body: fd,
});
diff --git a/components/Typ.vue b/components/Typ.vue
index 563687f..f26c981 100644
--- a/components/Typ.vue
+++ b/components/Typ.vue
@@ -94,6 +94,8 @@
import { FilterMatchMode } from "primevue/api";
import { useToast } from 'primevue/usetoast';
+ const config = useRuntimeConfig();
+
interface cTyp {
id: number;
bezeichnung: string;
@@ -109,7 +111,7 @@
const checkForm = (event: Event) => {
event.target.classList.add("was-validated");
};
- const {data: typen } = await useFetch('http://ubodroid-2:8081/api/v1/typ');
+ const {data: typen } = await useFetch(config.public.apiHostname + 'api/v1/typ');
const columns = [
{ field: 'id', header: '#'},
@@ -139,7 +141,7 @@
async function onSubmit(t: cTyp) {
let fd = new FormData();
fd.append('bezeichnung', t.bezeichnung);
- await $fetch('http://ubodroid-2:8081/api/v1/typ',{
+ await $fetch(config.public.apiHostname + 'api/v1/typ',{
method: 'POST',
body: fd
});
@@ -153,7 +155,7 @@
let fd = new FormData();
fd.append('bezeichnung', bezeichnung.value);
fd.append('id', id.value)
- await $fetch('http://ubodroid-2:8081/api/v1/typ/'+id.value,{
+ await $fetch(config.public.apiHostname + 'api/v1/typ/'+id.value,{
method: 'PUT',
body: fd
});
@@ -166,7 +168,7 @@
let fd = new FormData();
fd.append('bezeichnung', bezeichnung.value);
fd.append('id', id.value)
- await $fetch('http://ubodroid-2:8081/api/v1/typ/'+id.value,{
+ await $fetch(config.public.apiHostname + 'api/v1/typ/'+id.value,{
method: 'DELETE',
body: fd
});
diff --git a/components/UpdEval.vue b/components/UpdEval.vue
index 025c64d..8f1f53b 100644
--- a/components/UpdEval.vue
+++ b/components/UpdEval.vue
@@ -160,7 +160,7 @@ const qid = params.value.data.id;
//console.log('isUpdate = ', isUpdate);
const toast = useToast();
-
+const config = useRuntimeConfig();
interface cItemB {
@@ -187,12 +187,12 @@ interface cItemExt {
frontviewid: number;
}
-const {data: itemext} = await useFetch('http://ubodroid-2:8081/api/v1/ite/'+qid);
+const {data: itemext} = await useFetch(config.public.apiHostname + 'api/v1/ite/'+qid);
//const itemsb = ref();
//const {data: itemsbd } = await useFetch('http://ubodroid-2:8081/api/v1/itb/'+qid);
-const {data: images } = await useFetch('http://ubodroid-2:8081/api/v1/pho/ite/'+qid);
+const {data: images } = await useFetch(config.public.apiHostname + 'api/v1/pho/ite/'+qid);
//const mea = ref({id: 0, kurz: '', brust:0, laenget:0, schulterbreite:0, taillenumfangt:0, hueftumfang:0, innennaht:0, laengeb:0, taillenumfangb:0});
@@ -211,7 +211,7 @@ async function doCreate(ite: cItemExt) {
fd.append('frontviewid', ite.frontviewid.toString());
console.log('fd = ', fd);
- let insert = await $fetch('http://ubodroid-2:8081/api/v1/ite', {
+ let insert = await $fetch(config.public.apiHostname + 'api/v1/ite', {
method: 'POST',
body: fd
});
@@ -234,7 +234,7 @@ async function doUpdate(ite: cItemExt) {
fd.append('frontviewid', ite.frontview.id.toString());
fd.append('id', qid.toString());
console.log('fd = ', fd);
- let upd = await $fetch('http://ubodroid-2:8081/api/v1/ite/'+qid, {
+ let upd = await $fetch(config.public.apiHostname + 'api/v1/ite/'+qid, {
method: 'PUT',
body: fd
});
diff --git a/components/UpdPhoto.vue b/components/UpdPhoto.vue
index 208c23d..2d06b98 100644
--- a/components/UpdPhoto.vue
+++ b/components/UpdPhoto.vue
@@ -63,6 +63,8 @@
import { ref } from "vue";
import { FilterMatchMode } from "primevue/api";
+const config = useRuntimeConfig();
+
const pfad = '/photos';
let params: any;
params = inject('dialogRef');
@@ -101,7 +103,7 @@ import { useToast } from 'primevue/usetoast';
const toast = useToast();
const uploadedFiles = ref([]);
-const {data: photos } = await useFetch('http://ubodroid-2:8081/api/v1/pho');
+const {data: photos } = await useFetch(config.public.apiHostname + 'api/v1/pho');
diff --git a/components/Upditemext.vue b/components/Upditemext.vue
index 29df1cb..db5634d 100644
--- a/components/Upditemext.vue
+++ b/components/Upditemext.vue
@@ -139,6 +139,8 @@ import { useToast } from "primevue/usetoast";
import { ref } from "vue";
import { useDialog } from 'primevue/usedialog';
+const config = useRuntimeConfig();
+
const dialog = useDialog();
const responsiveOptions = ref();
@@ -181,12 +183,12 @@ interface cItemExt {
let itemext = ref({id: 0, zuhause: false, draussen: false, genehmigt: false, bemerkung: '', bewertung: 0, favorit: false, itembid: 0, frontviewid: 4});
if(isUpdate) {
- const {data: itemext} = await useFetch('http://ubodroid-2:8081/api/v1/ite/'+qid);
+ const {data: itemext} = await useFetch(config.public.apiHostname + 'api/v1/ite/'+qid);
}
//const itemsb = ref();
-const {data: itemsbd } = await useFetch('http://ubodroid-2:8081/api/v1/itb/'+qid);
-const {data: images } = await useFetch('http://ubodroid-2:8081/api/v1/pho/itb/'+qid);
+const {data: itemsbd } = await useFetch(config.public.apiHostname + 'api/v1/itb/'+qid);
+const {data: images } = await useFetch(config.public.apiHostname + 'api/v1/pho/itb/'+qid);
const mea = ref({id: 0, kurz: '', brust:0, laenget:0, schulterbreite:0, taillenumfangt:0, hueftumfang:0, innennaht:0, laengeb:0, taillenumfangb:0});
@@ -207,7 +209,7 @@ async function doCreate(ite: cItemExt) {
fd.append('frontviewid', ite.frontviewid.toString());
console.log('fd = ', fd);
- let insert = await $fetch('http://ubodroid-2:8081/api/v1/ite', {
+ let insert = await $fetch(config.public.apiHostname + 'api/v1/ite', {
method: 'POST',
body: fd
});
@@ -230,7 +232,7 @@ async function doUpdate(ite: cItemExt) {
fd.append('frontviewid', ite.frontviewid.toString());
console.log('fd = ', fd);
- let upd = await $fetch('http://ubodroid-2:8081/api/v1/ite/'+qid, {
+ let upd = await $fetch(config.public.apiHostname + 'api/v1/ite/'+qid, {
method: 'PUT',
body: fd
});
diff --git a/components/upditemb.vue b/components/upditemb.vue
index f2231ee..3b4adbd 100644
--- a/components/upditemb.vue
+++ b/components/upditemb.vue
@@ -116,6 +116,8 @@
import { useToast } from "primevue/usetoast";
import { ref, onMounted } from "vue";
+const config = useRuntimeConfig();
+
interface cItemB {
id: number;
@@ -133,7 +135,7 @@ interface cItemB {
const toast = useToast();
// const itemb = {id: 0, bezeichnung: '', kurzbeschreibung: '', groesse: '', farbe: '', typid: 0, material: '', abmessungenid: 1, frontviewid: 4};
-const {data: typen } = await useFetch('http://ubodroid-2:8081/api/v1/typ');
+const {data: typen } = await useFetch(config.public.apiHostname + 'api/v1/typ');
let blubb, assm: any;
@@ -157,7 +159,7 @@ const hideDialog = () => {
};
async function modifyItem() {
- const res = await useFetch('http://ubodroid-2:8081/api/v1/itb/'+blubb);
+ const res = await useFetch(config.public.apiHostname + 'api/v1/itb/'+blubb);
console.log(res);
res.data.value.abmessungen.id = assm;
return res;
@@ -175,7 +177,7 @@ async function doUpdate(t: cItemB) {
fd.append('abmessungenid', t.abmessungen.id.toString());
fd.append('frontviewid', t.frontview.id.toString());
console.log('fd = ', fd);
- await $fetch('http://ubodroid-2:8081/api/v1/itb/'+blubb,{
+ await $fetch(config.public.apiHostname + 'api/v1/itb/'+blubb,{
method: 'PUT',
body: fd
});