Compare commits

..

No commits in common. 'master' and 'v0.1.0' have entirely different histories.

  1. 2
      components/About.vue
  2. 3
      components/AssMea.vue
  3. 12
      components/Bought.vue
  4. 39
      components/Carousel.vue
  5. 14
      components/Evaluated.vue
  6. 9
      components/Itembdetail.vue
  7. 8
      components/Itemextdetail.vue
  8. 4
      components/LinkItemB.vue
  9. 4
      components/LinkItemExt.vue
  10. 10
      components/Measure.vue
  11. 12
      components/Photo.vue
  12. 10
      components/Typ.vue
  13. 10
      components/UpdEval.vue
  14. 4
      components/UpdPhoto.vue
  15. 12
      components/Upditemext.vue
  16. 16
      components/upditemb.vue
  17. 5
      nuxt.config.ts
  18. 1
      todo.md

2
components/About.vue

@ -4,7 +4,7 @@
<template #content> <template #content>
<Panel header="About this software" class="rounded-4 bg-white"> <Panel header="About this software" class="rounded-4 bg-white">
<span style="font-size:xx-large;">Wardrobe Master</span> <span style="font-size:xx-large;">Wardrobe Master</span>
<p>Version: 0.1.2</p> <p>Version: 0.1.0</p>
</Panel> </Panel>
</template> </template>
</Card> </Card>

3
components/AssMea.vue

@ -52,7 +52,6 @@
import { ref, onMounted } from "vue"; import { ref, onMounted } from "vue";
import { FilterMatchMode } from "primevue/api"; import { FilterMatchMode } from "primevue/api";
import { useToast } from 'primevue/usetoast'; import { useToast } from 'primevue/usetoast';
const config = useRuntimeConfig();
interface cMeasures { interface cMeasures {
id: number; id: number;
@ -77,7 +76,7 @@ let params: any;
params = inject('dialogRef'); params = inject('dialogRef');
const {data: measures } = await useFetch(config.public.apiHostname + 'api/v1/meas'); const {data: measures } = await useFetch('http://ubodroid-2:8081/api/v1/meas');

12
components/Bought.vue

@ -87,8 +87,6 @@ import { useDialog } from "primevue/usedialog";
import UpdPhoto from "./UpdPhoto.vue"; import UpdPhoto from "./UpdPhoto.vue";
import Upditemext from "./Upditemext.vue"; import Upditemext from "./Upditemext.vue";
const config = useRuntimeConfig();
console.log (config.public.apiHostname);
interface cItemB { interface cItemB {
id: number; id: number;
@ -109,7 +107,7 @@ let imgurl = ref();
const imgref = ref(); const imgref = ref();
//imgref.value='1679468897186c75b5379eb6691871da30ef18b98a_1.jpg'; //imgref.value='1679468897186c75b5379eb6691871da30ef18b98a_1.jpg';
const {data: itemsb } = await awaitItemsb(); const {data: itemsb } = await awaitItemsb();
const {data: typen } = await useFetch(config.public.apiHostname + 'api/v1/typ'); const {data: typen } = await useFetch('http://ubodroid-2:8081/api/v1/typ');
async function openDetail(id) { async function openDetail(id) {
await navigateTo({ await navigateTo({
@ -124,7 +122,7 @@ async function openDetail(id) {
}; };
async function awaitItemsb() { async function awaitItemsb() {
const res = await useFetch(config.public.apiHostname + 'api/v1/itb'); const res = await useFetch('http://ubodroid-2:8081/api/v1/itb');
let r: any; let r: any;
@ -146,7 +144,7 @@ async function openEval(id: number) {
} }
async function openFrontview(iid: number) { async function openFrontview(iid: number) {
const itemb = await useFetch(config.public.apiHostname + 'api/v1/itb/'+iid); const itemb = await useFetch('http://ubodroid-2:8081/api/v1/itb/'+iid);
let itb: cItemB; let itb: cItemB;
console.log(itemb.data.value); console.log(itemb.data.value);
itb = itemb.data.value; itb = itemb.data.value;
@ -177,7 +175,7 @@ async function doUpdate(t: cItemB) {
fd.append('abmessungenid', t.abmessungen.id.toString()); fd.append('abmessungenid', t.abmessungen.id.toString());
fd.append('frontviewid', t.frontviewid.toString()); fd.append('frontviewid', t.frontviewid.toString());
console.log('fd = ', fd); console.log('fd = ', fd);
await $fetch(config.public.apiHostname + 'api/v1/itb/'+t.id,{ await $fetch('http://ubodroid-2:8081/api/v1/itb/'+t.id,{
method: 'PUT', method: 'PUT',
body: fd body: fd
}); });
@ -207,7 +205,7 @@ const onNew = () => {
fd.append('abmessungenid', t.abmessungenid.toString()); fd.append('abmessungenid', t.abmessungenid.toString());
fd.append('frontviewid', t.frontviewid.toString()); fd.append('frontviewid', t.frontviewid.toString());
console.log('fd = ', fd); console.log('fd = ', fd);
await $fetch(config.public.apiHostname + 'api/v1/itb',{ await $fetch('http://ubodroid-2:8081/api/v1/itb',{
method: 'POST', method: 'POST',
body: fd body: fd
}); });

39
components/Carousel.vue

@ -0,0 +1,39 @@
<template>
<section
class="w-50 vh-30 m-auto d-flex align-items-center justify-content-center"
>
<ClientOnly fallbackTag="div">
<MDBCarousel v-model="carousel" :items="items1" fade />
<template #fallback>
<MDBSpinner />
</template>
</ClientOnly>
</section>
</template>
<script setup lang="ts">
import { MDBCarousel, MDBSpinner } from "mdb-vue-ui-kit";
const items1 = [
{
src: "https://mdbootstrap.com/img/Photos/Slides/img%20(15).webp",
alt: "...",
label: "First slide label",
caption: "Nulla vitae elit libero, a pharetra augue mollis interdum.",
},
{
src: "https://mdbootstrap.com/img/Photos/Slides/img%20(22).webp",
alt: "...",
label: "Second slide label",
caption: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
},
{
src: "https://mdbootstrap.com/img/Photos/Slides/img%20(23).webp",
alt: "...",
label: "Third slide label",
caption: "Praesent commodo cursus magna, vel scelerisque nisl consectetur.",
},
];
const carousel = useState("carousel", () => 0);
</script>

14
components/Evaluated.vue

@ -13,7 +13,7 @@
<img class="w-9 sm:w-16rem xl:w-10rem shadow-2 block xl:block mx-auto border-round" :src="slotProps.data.frontview.imgurl" :alt="slotProps.data.kurzbeschreibung" /> <img class="w-9 sm:w-16rem xl:w-10rem shadow-2 block xl:block mx-auto border-round" :src="slotProps.data.frontview.imgurl" :alt="slotProps.data.kurzbeschreibung" />
<div class="flex flex-column sm:flex-row justify-content-between align-items-center xl:align-items-start flex-1 gap-4"> <div class="flex flex-column sm:flex-row justify-content-between align-items-center xl:align-items-start flex-1 gap-4">
<div class="flex flex-column align-items-center sm:align-items-start gap-3"> <div class="flex flex-column align-items-center sm:align-items-start gap-3">
<div class="text-2xl font-bold text-900">{{ slotProps.data.genehmigt }}</div> <div class="text-2xl font-bold text-900">{{ slotProps.data.itemb.kurzbeschreibung }}</div>
<div class="flex align-items-center gap-3"> <div class="flex align-items-center gap-3">
<span class="flex align-items-center gap-2"> <span class="flex align-items-center gap-2">
<i class="pi pi-tag"></i> <i class="pi pi-tag"></i>
@ -50,7 +50,7 @@ import { useToast } from 'primevue/usetoast';
import { useDialog } from "primevue/usedialog"; import { useDialog } from "primevue/usedialog";
import UpdPhoto from "./UpdPhoto.vue"; import UpdPhoto from "./UpdPhoto.vue";
import internal from "stream"; import internal from "stream";
const config = useRuntimeConfig();
interface cItemExt { interface cItemExt {
id: number; id: number;
@ -71,7 +71,7 @@ let imgurl = ref();
const imgref = ref(); const imgref = ref();
//imgref.value='1679468897186c75b5379eb6691871da30ef18b98a_1.jpg'; //imgref.value='1679468897186c75b5379eb6691871da30ef18b98a_1.jpg';
const {data: itemsext } = await awaitItemsext(); const {data: itemsext } = await awaitItemsext();
const {data: typen } = await useFetch(config.public.apiHostname + 'api/v1/typ'); const {data: typen } = await useFetch('http://ubodroid-2:8081/api/v1/typ');
async function openDetail(id) { async function openDetail(id) {
await navigateTo({ await navigateTo({
@ -86,7 +86,7 @@ async function openDetail(id) {
}; };
async function awaitItemsext() { async function awaitItemsext() {
const res = await useFetch(config.public.apiHostname + 'api/v1/ite'); const res = await useFetch('http://ubodroid-2:8081/api/v1/ite');
let r: any; let r: any;
@ -108,7 +108,7 @@ async function openEval(id) {
} }
async function openFrontview(iid: number) { async function openFrontview(iid: number) {
const itemext = await useFetch(config.public.apiHostname + 'api/v1/ite/'+iid); const itemext = await useFetch('http://ubodroid-2:8081/api/v1/ite/'+iid);
let ite: cItemExt; let ite: cItemExt;
console.log(itemext.data.value); console.log(itemext.data.value);
ite = 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('itembid', t.itemb.id.toString());
fd.append('frontviewid', t.frontviewid.toString()); fd.append('frontviewid', t.frontviewid.toString());
console.log('fd = ', fd); console.log('fd = ', fd);
await $fetch(config.public.apiHostname + 'api/v1/ite/'+t.id,{ await $fetch('http://ubodroid-2:8081/api/v1/ite/'+t.id,{
method: 'PUT', method: 'PUT',
body: fd body: fd
}); });
@ -163,7 +163,7 @@ async function doUpdate(t: cItemExt) {
fd.append('abmessungenid', t.abmessungenid.toString()); fd.append('abmessungenid', t.abmessungenid.toString());
fd.append('frontviewid', t.frontviewid.toString()); fd.append('frontviewid', t.frontviewid.toString());
console.log('fd = ', fd); console.log('fd = ', fd);
await $fetch(config.public.apiHostname + 'api/v1/itb',{ await $fetch('http://ubodroid-2:8081/api/v1/itb',{
method: 'POST', method: 'POST',
body: fd body: fd
}); });

9
components/Itembdetail.vue

@ -130,7 +130,8 @@ const route = useRoute();
const qid = route.query.id; const qid = route.query.id;
const toast = useToast(); const toast = useToast();
const deleteItemBDialog = ref(false); const deleteItemBDialog = ref(false);
const config = useRuntimeConfig();
interface cItemB { interface cItemB {
id: number; id: number;
@ -145,8 +146,8 @@ interface cItemB {
} }
//const itemsb = ref(); //const itemsb = ref();
const {data: itemsbd } = await useFetch(config.public.apiHostname + 'api/v1/itb/'+qid); const {data: itemsbd } = await useFetch('http://ubodroid-2:8081/api/v1/itb/'+qid);
const {data: images } = await useFetch(config.public.apiHostname + 'api/v1/pho/itb/'+qid); const {data: images } = await useFetch('http://ubodroid-2:8081/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}); const mea = ref({id: 0, kurz: '', brust:0, laenget:0, schulterbreite:0, taillenumfangt:0, hueftumfang:0, innennaht:0, laengeb:0, taillenumfangb:0});
@ -182,7 +183,7 @@ async function doDelete() {
let fd = new FormData(); let fd = new FormData();
//fd.append('bezeichnung', bezeichnung.value); //fd.append('bezeichnung', bezeichnung.value);
fd.append('id', qid.toString()); fd.append('id', qid.toString());
await $fetch(config.public.apiHostname + 'api/v1/itb/'+qid, { method: 'DELETE', body: fd } ); await $fetch('http://ubodroid-2:8081/api/v1/itb/'+qid, { method: 'DELETE', body: fd } );
toast.add({ severity: 'success', summary: 'Item deleted', detail: '', life: 3000 }); toast.add({ severity: 'success', summary: 'Item deleted', detail: '', life: 3000 });
deleteItemBDialog.value = false; deleteItemBDialog.value = false;

8
components/Itemextdetail.vue

@ -147,7 +147,7 @@ const route = useRoute();
const qid = route.query.id; const qid = route.query.id;
const toast = useToast(); const toast = useToast();
const deleteItemBDialog = ref(false); const deleteItemBDialog = ref(false);
const config = useRuntimeConfig();
interface cItemB { interface cItemB {
@ -163,8 +163,8 @@ interface cItemB {
} }
//const itemsb = ref(); //const itemsb = ref();
const {data: itemext } = await useFetch(config.public.apiHostname + 'api/v1/ite/'+qid); const {data: itemext } = await useFetch('http://ubodroid-2:8081/api/v1/ite/'+qid);
const {data: images } = await useFetch(config.public.apiHostname + 'api/v1/pho/ite/'+qid); const {data: images } = await useFetch('http://ubodroid-2:8081/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}); 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(); let fd = new FormData();
//fd.append('bezeichnung', bezeichnung.value); //fd.append('bezeichnung', bezeichnung.value);
fd.append('id', qid.toString()); fd.append('id', qid.toString());
await $fetch(config.public.apiHostname + 'api/v1/ite/'+qid, { method: 'DELETE', body: fd } ); await $fetch('http://ubodroid-2:8081/api/v1/ite/'+qid, { method: 'DELETE', body: fd } );
toast.add({ severity: 'success', summary: 'Item deleted', detail: '', life: 3000 }); toast.add({ severity: 'success', summary: 'Item deleted', detail: '', life: 3000 });
deleteItemBDialog.value = false; deleteItemBDialog.value = false;

4
components/LinkItemB.vue

@ -53,8 +53,6 @@ import { ref } from "vue";
import { FilterMatchMode } from "primevue/api"; import { FilterMatchMode } from "primevue/api";
import { useToast } from 'primevue/usetoast'; import { useToast } from 'primevue/usetoast';
const config = useRuntimeConfig();
interface cItemB { interface cItemB {
id: number; id: number;
bezeichnung: string; bezeichnung: string;
@ -81,7 +79,7 @@ const toast = useToast();
//const createTypDialog = ref(false); //const createTypDialog = ref(false);
const itemb = ref({id: 0, bezeichnung: '', kurzbeschreibung: '', groesse: '', farbe: '', typid: 0, material: '', abmessungenid: 1, frontviewid: 4}); const itemb = ref({id: 0, bezeichnung: '', kurzbeschreibung: '', groesse: '', farbe: '', typid: 0, material: '', abmessungenid: 1, frontviewid: 4});
const {data: itembs } = await useFetch(config.public.apiHostname + 'api/v1/itb'); const {data: itembs } = await useFetch('http://ubodroid-2:8081/api/v1/itb');
const columns = [ const columns = [

4
components/LinkItemExt.vue

@ -53,8 +53,6 @@ import { ref } from "vue";
import { FilterMatchMode } from "primevue/api"; import { FilterMatchMode } from "primevue/api";
import { useToast } from 'primevue/usetoast'; import { useToast } from 'primevue/usetoast';
const config = useRuntimeConfig();
interface cItemB { interface cItemB {
id: number; id: number;
bezeichnung: string; bezeichnung: string;
@ -81,7 +79,7 @@ const toast = useToast();
//const createTypDialog = ref(false); //const createTypDialog = ref(false);
const itemb = ref({id: 0, bezeichnung: '', kurzbeschreibung: '', groesse: '', farbe: '', typid: 0, material: '', abmessungenid: 1, frontviewid: 4}); const itemb = ref({id: 0, bezeichnung: '', kurzbeschreibung: '', groesse: '', farbe: '', typid: 0, material: '', abmessungenid: 1, frontviewid: 4});
const {data: itemexts } = await useFetch(config.public.apiHostname + 'api/v1/ite'); const {data: itemexts } = await useFetch('http://ubodroid-2:8081/api/v1/ite');
const columns = [ const columns = [

10
components/Measure.vue

@ -67,8 +67,6 @@
import { useDialog } from "primevue/usedialog"; import { useDialog } from "primevue/usedialog";
import UpdMeas from "./UpdMeas.vue"; import UpdMeas from "./UpdMeas.vue";
const config = useRuntimeConfig();
interface cMeasures { interface cMeasures {
id: number; id: number;
kurz: string; kurz: string;
@ -92,7 +90,7 @@ const config = useRuntimeConfig();
const createTypDialog = ref(false); 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 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(config.public.apiHostname + 'api/v1/meas'); const {data: measures } = await useFetch('http://ubodroid-2:8081/api/v1/meas');
const columns = [ const columns = [
{ field: 'id', header: '#'}, { field: 'id', header: '#'},
@ -149,7 +147,7 @@ const config = useRuntimeConfig();
fd.append('laengeb', t.laengeb.toString()); fd.append('laengeb', t.laengeb.toString());
fd.append('taillenumfangb', t.taillenumfangb.toString()); fd.append('taillenumfangb', t.taillenumfangb.toString());
await $fetch(config.public.apiHostname + 'api/v1/meas',{ await $fetch('http://ubodroid-2:8081/api/v1/meas',{
method: 'POST', method: 'POST',
body: fd body: fd
}); });
@ -184,7 +182,7 @@ const config = useRuntimeConfig();
fd.append('laengeb', t.laengeb.toString()); fd.append('laengeb', t.laengeb.toString());
fd.append('taillenumfangb', t.taillenumfangb.toString()); fd.append('taillenumfangb', t.taillenumfangb.toString());
await $fetch(config.public.apiHostname + 'api/v1/meas/'+t.id,{ await $fetch('http://ubodroid-2:8081/api/v1/meas/'+t.id,{
method: 'PUT', method: 'PUT',
body: fd body: fd
}); });
@ -198,7 +196,7 @@ const config = useRuntimeConfig();
let fd = new FormData(); let fd = new FormData();
fd.append('id', id.value.toString()); fd.append('id', id.value.toString());
const res = await $fetch(config.public.apiHostname + 'api/v1/meas/'+id.value,{ const res = await $fetch('http://ubodroid-2:8081/api/v1/meas/'+id.value,{
method: 'DELETE', method: 'DELETE',
body: fd body: fd
}); });

12
components/Photo.vue

@ -69,8 +69,6 @@ import { ref, defineProps } from "vue";
import { useDialog } from 'primevue/usedialog'; import { useDialog } from 'primevue/usedialog';
const pfad = '/photos'; const pfad = '/photos';
const config = useRuntimeConfig();
interface cPho { interface cPho {
id: number; id: number;
pfad: string; pfad: string;
@ -85,7 +83,7 @@ import LinkItemExt from "./LinkItemExt.vue";
const toast = useToast(); const toast = useToast();
const dialog = useDialog(); const dialog = useDialog();
const uploadedFiles = ref([]); const uploadedFiles = ref([]);
const {data: photos } = await useFetch(config.public.apiHostname + 'api/v1/pho'); const {data: photos } = await useFetch('http://ubodroid-2:8081/api/v1/pho');
const onAdvancedUpload = async (event) => { const onAdvancedUpload = async (event) => {
const files = event.files; const files = event.files;
@ -99,7 +97,7 @@ const onAdvancedUpload = async (event) => {
console.log('files = ', i, file); console.log('files = ', i, file);
} }
const imgUpload = await $fetch(config.public.apiHostname + "api/v1/upload", { const imgUpload = await $fetch("http://ubodroid-2:8081/api/v1/upload", {
method: "POST", method: "POST",
body: fd, body: fd,
}); });
@ -117,7 +115,7 @@ const onAdvancedUpload = async (event) => {
async function linkToB (id: number) { async function linkToB (id: number) {
const photo = await useFetch(config.public.apiHostname + 'api/v1/pho/'+id); const photo = await useFetch('http://ubodroid-2:8081/api/v1/pho/'+id);
let pho: cPho; let pho: cPho;
console.log(photo.data.value); console.log(photo.data.value);
pho = photo.data.value; pho = photo.data.value;
@ -135,7 +133,7 @@ async function linkToB (id: number) {
} }
async function linkToE(id: number) { async function linkToE(id: number) {
const photo = await useFetch(config.public.apiHostname + 'api/v1/pho/'+id); const photo = await useFetch('http://ubodroid-2:8081/api/v1/pho/'+id);
let pho: cPho; let pho: cPho;
console.log(photo.data.value); console.log(photo.data.value);
pho = photo.data.value; pho = photo.data.value;
@ -161,7 +159,7 @@ async function doUpdate(ref: any, pho: cPho, updext: boolean){
} }
fd.append('itembid', ref.id.toString()); fd.append('itembid', ref.id.toString());
fd.append('itemextid', pho.itemextid.toString()); fd.append('itemextid', pho.itemextid.toString());
const updPho = await $fetch(config.public.apiHostname + "api/v1/pho/"+pho.id, { const updPho = await $fetch("http://ubodroid-2:8081/api/v1/pho/"+pho.id, {
method: "PUT", method: "PUT",
body: fd, body: fd,
}); });

10
components/Typ.vue

@ -94,8 +94,6 @@
import { FilterMatchMode } from "primevue/api"; import { FilterMatchMode } from "primevue/api";
import { useToast } from 'primevue/usetoast'; import { useToast } from 'primevue/usetoast';
const config = useRuntimeConfig();
interface cTyp { interface cTyp {
id: number; id: number;
bezeichnung: string; bezeichnung: string;
@ -111,7 +109,7 @@
const checkForm = (event: Event) => { const checkForm = (event: Event) => {
event.target.classList.add("was-validated"); event.target.classList.add("was-validated");
}; };
const {data: typen } = await useFetch(config.public.apiHostname + 'api/v1/typ'); const {data: typen } = await useFetch('http://ubodroid-2:8081/api/v1/typ');
const columns = [ const columns = [
{ field: 'id', header: '#'}, { field: 'id', header: '#'},
@ -141,7 +139,7 @@
async function onSubmit(t: cTyp) { async function onSubmit(t: cTyp) {
let fd = new FormData(); let fd = new FormData();
fd.append('bezeichnung', t.bezeichnung); fd.append('bezeichnung', t.bezeichnung);
await $fetch(config.public.apiHostname + 'api/v1/typ',{ await $fetch('http://ubodroid-2:8081/api/v1/typ',{
method: 'POST', method: 'POST',
body: fd body: fd
}); });
@ -155,7 +153,7 @@
let fd = new FormData(); let fd = new FormData();
fd.append('bezeichnung', bezeichnung.value); fd.append('bezeichnung', bezeichnung.value);
fd.append('id', id.value) fd.append('id', id.value)
await $fetch(config.public.apiHostname + 'api/v1/typ/'+id.value,{ await $fetch('http://ubodroid-2:8081/api/v1/typ/'+id.value,{
method: 'PUT', method: 'PUT',
body: fd body: fd
}); });
@ -168,7 +166,7 @@
let fd = new FormData(); let fd = new FormData();
fd.append('bezeichnung', bezeichnung.value); fd.append('bezeichnung', bezeichnung.value);
fd.append('id', id.value) fd.append('id', id.value)
await $fetch(config.public.apiHostname + 'api/v1/typ/'+id.value,{ await $fetch('http://ubodroid-2:8081/api/v1/typ/'+id.value,{
method: 'DELETE', method: 'DELETE',
body: fd body: fd
}); });

10
components/UpdEval.vue

@ -160,7 +160,7 @@ const qid = params.value.data.id;
//console.log('isUpdate = ', isUpdate); //console.log('isUpdate = ', isUpdate);
const toast = useToast(); const toast = useToast();
const config = useRuntimeConfig();
interface cItemB { interface cItemB {
@ -187,12 +187,12 @@ interface cItemExt {
frontviewid: number; frontviewid: number;
} }
const {data: itemext} = await useFetch(config.public.apiHostname + 'api/v1/ite/'+qid); const {data: itemext} = await useFetch('http://ubodroid-2:8081/api/v1/ite/'+qid);
//const itemsb = ref(); //const itemsb = ref();
//const {data: itemsbd } = await useFetch('http://ubodroid-2:8081/api/v1/itb/'+qid); //const {data: itemsbd } = await useFetch('http://ubodroid-2:8081/api/v1/itb/'+qid);
const {data: images } = await useFetch(config.public.apiHostname + 'api/v1/pho/ite/'+qid); const {data: images } = await useFetch('http://ubodroid-2:8081/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}); //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()); fd.append('frontviewid', ite.frontviewid.toString());
console.log('fd = ', fd); console.log('fd = ', fd);
let insert = await $fetch(config.public.apiHostname + 'api/v1/ite', { let insert = await $fetch('http://ubodroid-2:8081/api/v1/ite', {
method: 'POST', method: 'POST',
body: fd body: fd
}); });
@ -234,7 +234,7 @@ async function doUpdate(ite: cItemExt) {
fd.append('frontviewid', ite.frontview.id.toString()); fd.append('frontviewid', ite.frontview.id.toString());
fd.append('id', qid.toString()); fd.append('id', qid.toString());
console.log('fd = ', fd); console.log('fd = ', fd);
let upd = await $fetch(config.public.apiHostname + 'api/v1/ite/'+qid, { let upd = await $fetch('http://ubodroid-2:8081/api/v1/ite/'+qid, {
method: 'PUT', method: 'PUT',
body: fd body: fd
}); });

4
components/UpdPhoto.vue

@ -63,8 +63,6 @@
import { ref } from "vue"; import { ref } from "vue";
import { FilterMatchMode } from "primevue/api"; import { FilterMatchMode } from "primevue/api";
const config = useRuntimeConfig();
const pfad = '/photos'; const pfad = '/photos';
let params: any; let params: any;
params = inject('dialogRef'); params = inject('dialogRef');
@ -103,7 +101,7 @@ import { useToast } from 'primevue/usetoast';
const toast = useToast(); const toast = useToast();
const uploadedFiles = ref([]); const uploadedFiles = ref([]);
const {data: photos } = await useFetch(config.public.apiHostname + 'api/v1/pho'); const {data: photos } = await useFetch('http://ubodroid-2:8081/api/v1/pho');

12
components/Upditemext.vue

@ -139,8 +139,6 @@ import { useToast } from "primevue/usetoast";
import { ref } from "vue"; import { ref } from "vue";
import { useDialog } from 'primevue/usedialog'; import { useDialog } from 'primevue/usedialog';
const config = useRuntimeConfig();
const dialog = useDialog(); const dialog = useDialog();
const responsiveOptions = ref(); const responsiveOptions = ref();
@ -183,12 +181,12 @@ interface cItemExt {
let itemext = ref({id: 0, zuhause: false, draussen: false, genehmigt: false, bemerkung: '', bewertung: 0, favorit: false, itembid: 0, frontviewid: 4}); let itemext = ref({id: 0, zuhause: false, draussen: false, genehmigt: false, bemerkung: '', bewertung: 0, favorit: false, itembid: 0, frontviewid: 4});
if(isUpdate) { if(isUpdate) {
const {data: itemext} = await useFetch(config.public.apiHostname + 'api/v1/ite/'+qid); const {data: itemext} = await useFetch('http://ubodroid-2:8081/api/v1/ite/'+qid);
} }
//const itemsb = ref(); //const itemsb = ref();
const {data: itemsbd } = await useFetch(config.public.apiHostname + 'api/v1/itb/'+qid); const {data: itemsbd } = await useFetch('http://ubodroid-2:8081/api/v1/itb/'+qid);
const {data: images } = await useFetch(config.public.apiHostname + 'api/v1/pho/itb/'+qid); const {data: images } = await useFetch('http://ubodroid-2:8081/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}); const mea = ref({id: 0, kurz: '', brust:0, laenget:0, schulterbreite:0, taillenumfangt:0, hueftumfang:0, innennaht:0, laengeb:0, taillenumfangb:0});
@ -209,7 +207,7 @@ async function doCreate(ite: cItemExt) {
fd.append('frontviewid', ite.frontviewid.toString()); fd.append('frontviewid', ite.frontviewid.toString());
console.log('fd = ', fd); console.log('fd = ', fd);
let insert = await $fetch(config.public.apiHostname + 'api/v1/ite', { let insert = await $fetch('http://ubodroid-2:8081/api/v1/ite', {
method: 'POST', method: 'POST',
body: fd body: fd
}); });
@ -232,7 +230,7 @@ async function doUpdate(ite: cItemExt) {
fd.append('frontviewid', ite.frontviewid.toString()); fd.append('frontviewid', ite.frontviewid.toString());
console.log('fd = ', fd); console.log('fd = ', fd);
let upd = await $fetch(config.public.apiHostname + 'api/v1/ite/'+qid, { let upd = await $fetch('http://ubodroid-2:8081/api/v1/ite/'+qid, {
method: 'PUT', method: 'PUT',
body: fd body: fd
}); });

16
components/upditemb.vue

@ -35,11 +35,11 @@
<div class="col-4 field gap-1"> <div class="col-4 field gap-1">
<small class="p-float-label" for="groesse">Size: </small> <small class="p-float-label" for="groesse">Size: </small>
<InputText class="p-inputtext-sm" id="groesse" v-model.trim="itemb.groesse" /> <InputText class="p-inputtext-sm" id="groesse" :value="itemb.groesse" />
</div> </div>
<div class="col-4 field gap-1"> <div class="col-4 field gap-1">
<small class="p-float-label" for="farbe">Color: </small> <small class="p-float-label" for="farbe">Color: </small>
<InputText class="p-inputtext-sm" id="farbe" v-model.trim="itemb.farbe" /> <InputText class="p-inputtext-sm" id="farbe" :value="itemb.farbe" />
</div> </div>
<div class="col-4 field gap-1"> <div class="col-4 field gap-1">
<small class="p-float-label" for="type">Type of clothes</small> <small class="p-float-label" for="type">Type of clothes</small>
@ -48,7 +48,7 @@
</div> </div>
<div class="col-12 field gap-1" > <div class="col-12 field gap-1" >
<small class="p-float-label" for="material">Material:</small> <small class="p-float-label" for="material">Material:</small>
<InputText class="p-inputtext-sm" id="material" v-model.trim="itemb.material" style="width:100%;"/> <InputText class="p-inputtext-sm" id="material" :value="itemb.material" style="width:100%;"/>
</div> </div>
<InputText :hidden="false" id="abmessungen" :value="itemb.abmessungen.id" /> <InputText :hidden="false" id="abmessungen" :value="itemb.abmessungen.id" />
@ -116,8 +116,6 @@
import { useToast } from "primevue/usetoast"; import { useToast } from "primevue/usetoast";
import { ref, onMounted } from "vue"; import { ref, onMounted } from "vue";
const config = useRuntimeConfig();
interface cItemB { interface cItemB {
id: number; id: number;
@ -135,7 +133,7 @@ interface cItemB {
const toast = useToast(); const toast = useToast();
// const itemb = {id: 0, bezeichnung: '', kurzbeschreibung: '', groesse: '', farbe: '', typid: 0, material: '', abmessungenid: 1, frontviewid: 4}; // const itemb = {id: 0, bezeichnung: '', kurzbeschreibung: '', groesse: '', farbe: '', typid: 0, material: '', abmessungenid: 1, frontviewid: 4};
const {data: typen } = await useFetch(config.public.apiHostname + 'api/v1/typ'); const {data: typen } = await useFetch('http://ubodroid-2:8081/api/v1/typ');
let blubb, assm: any; let blubb, assm: any;
@ -159,11 +157,9 @@ const hideDialog = () => {
}; };
async function modifyItem() { async function modifyItem() {
const res = await useFetch(config.public.apiHostname + 'api/v1/itb/'+blubb); const res = await useFetch('http://ubodroid-2:8081/api/v1/itb/'+blubb);
console.log(res); console.log(res);
if (assm) {
res.data.value.abmessungen.id = assm; res.data.value.abmessungen.id = assm;
}
return res; return res;
} }
@ -179,7 +175,7 @@ async function doUpdate(t: cItemB) {
fd.append('abmessungenid', t.abmessungen.id.toString()); fd.append('abmessungenid', t.abmessungen.id.toString());
fd.append('frontviewid', t.frontview.id.toString()); fd.append('frontviewid', t.frontview.id.toString());
console.log('fd = ', fd); console.log('fd = ', fd);
await $fetch(config.public.apiHostname + 'api/v1/itb/'+blubb,{ await $fetch('http://ubodroid-2:8081/api/v1/itb/'+blubb,{
method: 'PUT', method: 'PUT',
body: fd body: fd
}); });

5
nuxt.config.ts

@ -11,9 +11,4 @@ export default defineNuxtConfig({
build: { build: {
transpile: ['primevue'] transpile: ['primevue']
}, },
runtimeConfig:{
public: {
apiHostname: ''
}
}
}) })

1
todo.md

@ -1,3 +1,4 @@
* Feld frontview bei itemb und itemext einführen * Feld frontview bei itemb und itemext einführen
* Ergänzung der API um die Felder, die für die Detailbetrachtung und das Speichern notwendig sind * Ergänzung der API um die Felder, die für die Detailbetrachtung und das Speichern notwendig sind
* localhost anstelle des Rechnernamens vor dem Container-Test einfügen * localhost anstelle des Rechnernamens vor dem Container-Test einfügen
*
Loading…
Cancel
Save