fix: edit table and migrations
This commit is contained in:
30
bo/src/components/admin/product/TabQuantities.vue
Normal file
30
bo/src/components/admin/product/TabQuantities.vue
Normal file
@@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<div class="card-section space-y-6">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-5">
|
||||
<UFormField label="Stock quantity">
|
||||
<UInputNumber v-model="store.form.quantity" :min="0" class="w-full" />
|
||||
</UFormField>
|
||||
|
||||
<UFormField label="Minimum order quantity">
|
||||
<UInputNumber v-model="store.form.minimal_quantity" :min="1" class="w-full" />
|
||||
</UFormField>
|
||||
</div>
|
||||
|
||||
<UFormField label="When out of stock">
|
||||
<USelect v-model="store.form.out_of_stock" :options="outOfStockOptions" value-key="value"
|
||||
label-key="label" class="w-72" />
|
||||
</UFormField>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useAddProductStore } from '@/stores/admin/addProduct'
|
||||
|
||||
const store = useAddProductStore()
|
||||
|
||||
const outOfStockOptions = [
|
||||
{ value: 0, label: 'Deny orders' },
|
||||
{ value: 1, label: 'Allow orders' },
|
||||
{ value: 2, label: 'Use shop default' },
|
||||
]
|
||||
</script>
|
||||
Reference in New Issue
Block a user