Added HistoryItems to Spaces
Changed Loading of HistoryItems to directly Supabase Minor Changes in inventoryitems
This commit is contained in:
@@ -55,7 +55,7 @@ setupPage()
|
||||
<h1
|
||||
v-if="itemInfo"
|
||||
:class="['text-xl','font-medium']"
|
||||
>{{itemInfo ? `Inventarartikel: ${itemInfo.name}` : (mode === 'create' ? 'Kunde erstellen' : 'Kunde bearbeiten')}}</h1>
|
||||
>{{itemInfo.id ? `Inventarartikel: ${itemInfo.name}` : (mode === 'create' ? 'Inventarartikel erstellen' : 'Inventarartikel bearbeiten')}}</h1>
|
||||
</template>
|
||||
<template #right>
|
||||
<UButton
|
||||
@@ -65,11 +65,23 @@ setupPage()
|
||||
Speichern
|
||||
</UButton>
|
||||
<UButton
|
||||
v-else-if="mode === 'create'"
|
||||
v-if="mode === 'create'"
|
||||
@click="dataStore.createNewItem('inventoryitems',itemInfo)"
|
||||
>
|
||||
Erstellen
|
||||
</UButton>
|
||||
<UButton
|
||||
v-if="mode === 'create'"
|
||||
class="ml-2"
|
||||
@click="dataStore.createNewItem('inventoryitems',itemInfo);
|
||||
itemInfo = {
|
||||
name: null,
|
||||
description: null,
|
||||
quantity: 0
|
||||
}"
|
||||
>
|
||||
Erstellen + Neu
|
||||
</UButton>
|
||||
<UButton
|
||||
@click="cancelEditorCreate"
|
||||
color="red"
|
||||
@@ -96,6 +108,10 @@ setupPage()
|
||||
<div class="w-1/2 mr-5">
|
||||
<UCard>
|
||||
<table class="w-full">
|
||||
<tr>
|
||||
<td>Name: </td>
|
||||
<td>{{itemInfo.name}}</td>
|
||||
</tr>
|
||||
<tr v-if="itemInfo.currentSpace">
|
||||
<td>Lagerplatz: </td>
|
||||
<td>{{dataStore.getSpaceById(itemInfo.currentSpace).spaceNumber}} - {{dataStore.getSpaceById(itemInfo.currentSpace).description}}</td>
|
||||
@@ -193,11 +209,12 @@ setupPage()
|
||||
</UFormGroup>
|
||||
<UFormGroup
|
||||
label="Menge:"
|
||||
help="Für Einzelartikel Menge gleich 0"
|
||||
:help="itemInfo.serialNumber ? 'Menge deaktiviert durch Eingabe der Seriennummer' : 'Für Einzelartikel Menge gleich 0'"
|
||||
>
|
||||
<UInput
|
||||
type="number"
|
||||
v-model="itemInfo.quantity"
|
||||
:disabled="itemInfo.serialNumber"
|
||||
/>
|
||||
</UFormGroup>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script setup>
|
||||
import axios from "axios";
|
||||
import ZebraBrowserPrintWrapper from "zebra-browser-print-wrapper"
|
||||
import HistoryDisplay from "~/components/HistoryDisplay.vue";
|
||||
definePageMeta({
|
||||
middleware: "auth"
|
||||
})
|
||||
@@ -176,7 +177,12 @@ setupPage()
|
||||
</div>
|
||||
<div class="w-1/2">
|
||||
<UCard>
|
||||
LOGBUCH
|
||||
<HistoryDisplay
|
||||
type="space"
|
||||
v-if="itemInfo"
|
||||
render-headline
|
||||
:element-id="itemInfo.id"
|
||||
/>
|
||||
</UCard>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user