fin ? a lot of improvements, and esthetic
This commit is contained in:
parent
1b1c6cf478
commit
a07e2ab596
@ -17,8 +17,8 @@ import Chip from 'primevue/chip';
|
||||
|
||||
const toast = useToast();
|
||||
|
||||
const products = ref();
|
||||
const warehouses = ref();
|
||||
const products = ref([]);
|
||||
const warehouses = ref([]);
|
||||
|
||||
const selectedRef = ref()
|
||||
const filteredRef = ref();
|
||||
@ -171,7 +171,11 @@ function makeAlert(productsAlerts){
|
||||
</form>
|
||||
</Fieldset>
|
||||
<Fieldset class="fieldset-section fieldset-list-wh-p" legend="Products et Entrepôt">
|
||||
<Carousel :value="products"
|
||||
<h4 v-if="products.length === 0">
|
||||
<i class="pi pi-exclamation-circle"></i>
|
||||
Aucun produit renseigné
|
||||
</h4>
|
||||
<Carousel v-else :value="products"
|
||||
:numVisible="3"
|
||||
:numScroll="1"
|
||||
>
|
||||
@ -191,7 +195,11 @@ function makeAlert(productsAlerts){
|
||||
</template>
|
||||
</Carousel>
|
||||
<Divider />
|
||||
<Carousel :value="warehouses"
|
||||
<h4 v-if="warehouses.length === 0">
|
||||
<i class="pi pi-exclamation-circle"></i>
|
||||
Aucun entrepôt renseigné
|
||||
</h4>
|
||||
<Carousel v-else :value="warehouses"
|
||||
:numVisible="3"
|
||||
:numScroll="1"
|
||||
>
|
||||
|
@ -129,6 +129,8 @@ async function onRowEditSave(event) {
|
||||
description: newData.description,
|
||||
quantity: newData.quantity,
|
||||
image: b64Modif.value,
|
||||
alert_enabled: newData.alert_enabled,
|
||||
stock_limit: newData.stock_limit,
|
||||
warehouses: newData.warehouse.map((warehouse) => warehouse.id),
|
||||
}
|
||||
} else {
|
||||
@ -138,6 +140,8 @@ async function onRowEditSave(event) {
|
||||
reference: newData.reference,
|
||||
description: newData.description,
|
||||
quantity: newData.quantity,
|
||||
alert_enabled: newData.alert_enabled,
|
||||
stock_limit: newData.stock_limit,
|
||||
warehouses: newData.warehouse.map((warehouse) => warehouse.id),
|
||||
}
|
||||
}
|
||||
@ -444,7 +448,6 @@ try {
|
||||
removableSort
|
||||
>
|
||||
|
||||
|
||||
<Column field="image"editor="true">
|
||||
<template #body="slotProps">
|
||||
<img
|
||||
@ -472,7 +475,7 @@ try {
|
||||
</template>
|
||||
</Column>
|
||||
|
||||
<Column field="is_stock_low" header="En stock" sortable>
|
||||
<Column field="is_stock_low" header="Alerte" sortable>
|
||||
<template #body="slotProps">
|
||||
<Tag
|
||||
:severity="slotProps.data.is_stock_low
|
||||
@ -483,6 +486,24 @@ try {
|
||||
: 'EN STOCK'"
|
||||
/>
|
||||
</template>
|
||||
<template #editor="slotProps">
|
||||
<InputGroup>
|
||||
<InputGroupAddon>
|
||||
<Checkbox
|
||||
:binary="true"
|
||||
id="modifiy-alert"
|
||||
v-model="slotProps.data.alert_enabled"
|
||||
/>
|
||||
</InputGroupAddon>
|
||||
<InputNumber
|
||||
:disabled="!slotProps.data.alert_enabled"
|
||||
id="modifiy-stock-limit"
|
||||
inputId="integeronly"
|
||||
v-model="slotProps.data.stock_limit"
|
||||
fluid
|
||||
/>
|
||||
</InputGroup>
|
||||
</template>
|
||||
</Column>
|
||||
|
||||
<Column field="name" header="Nom" editor="true" sortable>
|
||||
|
Loading…
x
Reference in New Issue
Block a user