2022-09-02 17:46:20 +00:00
|
|
|
<script setup>
|
|
|
|
definePageMeta({
|
2022-10-15 20:15:55 +00:00
|
|
|
middleware: ["auth"],
|
2022-09-02 17:46:20 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
const show = reactive({
|
|
|
|
identification: true,
|
|
|
|
purchase: false,
|
|
|
|
sold: false,
|
|
|
|
extras: false,
|
|
|
|
});
|
|
|
|
|
|
|
|
const form = reactive({
|
2022-09-09 22:46:53 +00:00
|
|
|
name: "",
|
|
|
|
description: "",
|
|
|
|
notes: "",
|
2022-09-02 17:46:20 +00:00
|
|
|
|
|
|
|
// Item Identification
|
2022-09-09 22:46:53 +00:00
|
|
|
serialNumber: "",
|
|
|
|
modelNumber: "",
|
|
|
|
manufacturer: "",
|
2022-09-02 17:46:20 +00:00
|
|
|
|
|
|
|
// Purchase Information
|
2022-09-09 22:46:53 +00:00
|
|
|
purchaseTime: "",
|
|
|
|
purchasePrice: "",
|
|
|
|
purchaseFrom: "",
|
2022-09-02 17:46:20 +00:00
|
|
|
|
|
|
|
// Sold Information
|
2022-09-09 22:46:53 +00:00
|
|
|
soldTime: "",
|
|
|
|
soldPrice: "",
|
|
|
|
soldTo: "",
|
|
|
|
soldNotes: "",
|
2022-09-02 17:46:20 +00:00
|
|
|
});
|
|
|
|
|
2022-09-09 22:46:53 +00:00
|
|
|
function submit() {
|
|
|
|
console.log("Submitted!");
|
|
|
|
}
|
2022-09-02 17:46:20 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2022-09-09 22:46:53 +00:00
|
|
|
<BaseContainer cmp="section">
|
2022-09-02 17:46:20 +00:00
|
|
|
<BaseSectionHeader> Add an Item To Your Inventory </BaseSectionHeader>
|
2022-09-09 22:46:53 +00:00
|
|
|
<form class="max-w-3xl mx-auto my-5 space-y-6" @submit.prevent="submit">
|
2022-09-02 17:46:20 +00:00
|
|
|
<div class="divider collapse-title px-0 cursor-pointer">Required Information</div>
|
|
|
|
<div class="bg-base-200 card">
|
|
|
|
<div class="card-body">
|
2022-09-09 22:46:53 +00:00
|
|
|
<FormTextField v-model="form.name" label="Name" />
|
|
|
|
<FormTextArea v-model="form.description" label="Description" limit="1000" />
|
2022-09-02 17:46:20 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="divider">
|
|
|
|
<button class="btn btn-sm" @click="show.identification = !show.identification">Product Information</button>
|
|
|
|
</div>
|
2022-09-09 22:46:53 +00:00
|
|
|
<div v-if="show.identification" class="card bg-base-200">
|
2022-09-02 17:46:20 +00:00
|
|
|
<div class="card-body grid md:grid-cols-2">
|
2022-09-09 22:46:53 +00:00
|
|
|
<FormTextField v-model="form.serialNumber" label="Serial Number" />
|
|
|
|
<FormTextField v-model="form.modelNumber" label="Model Number" />
|
|
|
|
<FormTextField v-model="form.manufacturer" label="Manufacturer" />
|
2022-09-02 17:46:20 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="">
|
|
|
|
<button class="btn btn-sm" @click="show.purchase = !show.purchase">Purchase Information</button>
|
|
|
|
<div class="divider"></div>
|
|
|
|
</div>
|
2022-09-09 22:46:53 +00:00
|
|
|
<div v-if="show.purchase" class="card bg-base-200">
|
2022-09-02 17:46:20 +00:00
|
|
|
<div class="card-body grid md:grid-cols-2">
|
2022-09-09 22:46:53 +00:00
|
|
|
<FormTextField v-model="form.purchaseTime" label="Purchase Time" />
|
|
|
|
<FormTextField v-model="form.purchasePrice" label="Purchase Price" />
|
|
|
|
<FormTextField v-model="form.purchaseFrom" label="Purchase From" />
|
2022-09-02 17:46:20 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="divider">
|
|
|
|
<button class="btn btn-sm" @click="show.sold = !show.sold">Sold Information</button>
|
|
|
|
</div>
|
2022-09-09 22:46:53 +00:00
|
|
|
<div v-if="show.sold" class="card bg-base-200">
|
2022-09-02 17:46:20 +00:00
|
|
|
<div class="card-body">
|
|
|
|
<div class="grid md:grid-cols-2 gap-2">
|
2022-09-09 22:46:53 +00:00
|
|
|
<FormTextField v-model="form.soldTime" label="Sold Time" />
|
|
|
|
<FormTextField v-model="form.soldPrice" label="Sold Price" />
|
|
|
|
<FormTextField v-model="form.soldTo" label="Sold To" />
|
2022-09-02 17:46:20 +00:00
|
|
|
</div>
|
2022-09-09 22:46:53 +00:00
|
|
|
<FormTextArea v-model="form.soldNotes" label="Sold Notes" limit="1000" />
|
2022-09-02 17:46:20 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="divider">
|
|
|
|
<button class="btn btn-sm" @click="show.extras = !show.extras">Extras</button>
|
|
|
|
</div>
|
2022-09-09 22:46:53 +00:00
|
|
|
<div v-if="show.extras" class="card bg-base-200">
|
2022-09-02 17:46:20 +00:00
|
|
|
<div class="card-body">
|
2022-09-09 22:46:53 +00:00
|
|
|
<FormTextArea v-model="form.notes" label="Notes" limit="1000" />
|
2022-09-02 17:46:20 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</BaseContainer>
|
|
|
|
</template>
|