QUick fixes in inventoryitems
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script setup>
|
||||
import HistoryDisplay from "~/components/HistoryDisplay.vue";
|
||||
import dayjs from "dayjs";
|
||||
import {useSupabaseSelectSingle} from "~/composables/useSupabase.js";
|
||||
|
||||
definePageMeta({
|
||||
middleware: "auth"
|
||||
@@ -22,11 +23,11 @@ const itemInfo = ref({
|
||||
|
||||
//Functions
|
||||
const setupPage = async () => {
|
||||
if(mode.value === "show" || mode.value === "edit"){
|
||||
if(mode.value === "show"){
|
||||
itemInfo.value = await useSupabaseSelectSingle("inventoryitems", route.params.id, "*, vendor(*)")
|
||||
} else if(mode.value === "edit") {
|
||||
itemInfo.value = await useSupabaseSelectSingle("inventoryitems", route.params.id, "*")
|
||||
}
|
||||
|
||||
if(mode.value === "edit") itemInfo.value = itemInfo.value
|
||||
}
|
||||
|
||||
const cancelEditorCreate = () => {
|
||||
|
||||
Reference in New Issue
Block a user