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 toast = useToast();
|
||||||
|
|
||||||
const products = ref();
|
const products = ref([]);
|
||||||
const warehouses = ref();
|
const warehouses = ref([]);
|
||||||
|
|
||||||
const selectedRef = ref()
|
const selectedRef = ref()
|
||||||
const filteredRef = ref();
|
const filteredRef = ref();
|
||||||
@ -171,7 +171,11 @@ function makeAlert(productsAlerts){
|
|||||||
</form>
|
</form>
|
||||||
</Fieldset>
|
</Fieldset>
|
||||||
<Fieldset class="fieldset-section fieldset-list-wh-p" legend="Products et Entrepôt">
|
<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"
|
:numVisible="3"
|
||||||
:numScroll="1"
|
:numScroll="1"
|
||||||
>
|
>
|
||||||
@ -191,7 +195,11 @@ function makeAlert(productsAlerts){
|
|||||||
</template>
|
</template>
|
||||||
</Carousel>
|
</Carousel>
|
||||||
<Divider />
|
<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"
|
:numVisible="3"
|
||||||
:numScroll="1"
|
:numScroll="1"
|
||||||
>
|
>
|
||||||
|
@ -129,6 +129,8 @@ async function onRowEditSave(event) {
|
|||||||
description: newData.description,
|
description: newData.description,
|
||||||
quantity: newData.quantity,
|
quantity: newData.quantity,
|
||||||
image: b64Modif.value,
|
image: b64Modif.value,
|
||||||
|
alert_enabled: newData.alert_enabled,
|
||||||
|
stock_limit: newData.stock_limit,
|
||||||
warehouses: newData.warehouse.map((warehouse) => warehouse.id),
|
warehouses: newData.warehouse.map((warehouse) => warehouse.id),
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -138,6 +140,8 @@ async function onRowEditSave(event) {
|
|||||||
reference: newData.reference,
|
reference: newData.reference,
|
||||||
description: newData.description,
|
description: newData.description,
|
||||||
quantity: newData.quantity,
|
quantity: newData.quantity,
|
||||||
|
alert_enabled: newData.alert_enabled,
|
||||||
|
stock_limit: newData.stock_limit,
|
||||||
warehouses: newData.warehouse.map((warehouse) => warehouse.id),
|
warehouses: newData.warehouse.map((warehouse) => warehouse.id),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -444,7 +448,6 @@ try {
|
|||||||
removableSort
|
removableSort
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
||||||
<Column field="image"editor="true">
|
<Column field="image"editor="true">
|
||||||
<template #body="slotProps">
|
<template #body="slotProps">
|
||||||
<img
|
<img
|
||||||
@ -472,7 +475,7 @@ try {
|
|||||||
</template>
|
</template>
|
||||||
</Column>
|
</Column>
|
||||||
|
|
||||||
<Column field="is_stock_low" header="En stock" sortable>
|
<Column field="is_stock_low" header="Alerte" sortable>
|
||||||
<template #body="slotProps">
|
<template #body="slotProps">
|
||||||
<Tag
|
<Tag
|
||||||
:severity="slotProps.data.is_stock_low
|
:severity="slotProps.data.is_stock_low
|
||||||
@ -483,6 +486,24 @@ try {
|
|||||||
: 'EN STOCK'"
|
: 'EN STOCK'"
|
||||||
/>
|
/>
|
||||||
</template>
|
</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>
|
||||||
|
|
||||||
<Column field="name" header="Nom" editor="true" sortable>
|
<Column field="name" header="Nom" editor="true" sortable>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user