color-scheme changes
This commit is contained in:
parent
a07e2ab596
commit
3732381af3
@ -3,16 +3,31 @@
|
|||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|
||||||
color-scheme: light dark;
|
color-scheme: normal;
|
||||||
color: rgba(255, 255, 255, 0.87);
|
color: rgba(0, 0, 0, 0.87);
|
||||||
background-color: #1d1d1d;
|
background-color: #ffffff;
|
||||||
|
|
||||||
font-synthesis: none;
|
font-synthesis: none;
|
||||||
text-rendering: optimizeLegibility;
|
text-rendering: optimizeLegibility;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
:root {
|
||||||
|
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
||||||
|
line-height: 1.5;
|
||||||
|
font-weight: 400;
|
||||||
|
|
||||||
|
color-scheme: dark;
|
||||||
|
background-color: #1d1d1d;
|
||||||
|
color: rgba(255, 255, 255, 0.87);
|
||||||
|
|
||||||
|
font-synthesis: none;
|
||||||
|
text-rendering: optimizeLegibility;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
||||||
|
}
|
||||||
a {
|
a {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #646cff;
|
color: #646cff;
|
||||||
@ -30,7 +45,7 @@ ul{
|
|||||||
h1 {
|
h1 {
|
||||||
font-size: 3.2em;
|
font-size: 3.2em;
|
||||||
line-height: 1.1;
|
line-height: 1.1;
|
||||||
color:rgb(255, 255, 255)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#app {
|
#app {
|
||||||
@ -48,6 +63,7 @@ h1 {
|
|||||||
grid-template-columns: 2fr 2fr 1fr;
|
grid-template-columns: 2fr 2fr 1fr;
|
||||||
grid-template-rows: auto auto auto;
|
grid-template-rows: auto auto auto;
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
|
justify-content: center ;
|
||||||
}
|
}
|
||||||
.fieldset-section{
|
.fieldset-section{
|
||||||
padding:20px
|
padding:20px
|
||||||
@ -110,3 +126,6 @@ h1 {
|
|||||||
padding-bottom: 2rem;
|
padding-bottom: 2rem;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.carousmex{
|
||||||
|
width: 600px;
|
||||||
|
}
|
@ -14,6 +14,7 @@ import { useToast } from 'primevue/usetoast';
|
|||||||
import Divider from 'primevue/divider';
|
import Divider from 'primevue/divider';
|
||||||
import ScrollPanel from 'primevue/scrollpanel';
|
import ScrollPanel from 'primevue/scrollpanel';
|
||||||
import Chip from 'primevue/chip';
|
import Chip from 'primevue/chip';
|
||||||
|
import PMessage from 'primevue/message';
|
||||||
|
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
|
|
||||||
@ -24,6 +25,7 @@ const selectedRef = ref()
|
|||||||
const filteredRef = ref();
|
const filteredRef = ref();
|
||||||
const newValue = ref();
|
const newValue = ref();
|
||||||
|
|
||||||
|
const modifyErrors = ref({});
|
||||||
const chartProductsData = ref();
|
const chartProductsData = ref();
|
||||||
const chartWarehousesData = ref();
|
const chartWarehousesData = ref();
|
||||||
const chartOptions = {plugins:{legend:{labels:{usePointStyle:true,}}}};
|
const chartOptions = {plugins:{legend:{labels:{usePointStyle:true,}}}};
|
||||||
@ -111,6 +113,7 @@ const productValueModifier = async () => {
|
|||||||
|
|
||||||
const product = products.value.find(p => p.reference === selectedRef.value.reference);
|
const product = products.value.find(p => p.reference === selectedRef.value.reference);
|
||||||
if (product) {
|
if (product) {
|
||||||
|
modifyErrors.value = {};
|
||||||
const newQuantity = product.quantity + newValue.value
|
const newQuantity = product.quantity + newValue.value
|
||||||
try{
|
try{
|
||||||
await modifyProduct({
|
await modifyProduct({
|
||||||
@ -122,10 +125,16 @@ const productValueModifier = async () => {
|
|||||||
chartProductsData.value = setChartProductsData();
|
chartProductsData.value = setChartProductsData();
|
||||||
chartWarehousesData.value = setChartWarehousesData();
|
chartWarehousesData.value = setChartWarehousesData();
|
||||||
} catch (error){
|
} catch (error){
|
||||||
console.error(error)
|
if (error.response && error.response.data) {
|
||||||
|
const data = error.response.data;
|
||||||
|
if (data.detail) {
|
||||||
|
toast.add({ severity: 'error',life: 2500, summary: 'Erreur', detail: data.detail });
|
||||||
|
};
|
||||||
|
modifyErrors.value = { quantity: data.quantity ? data.quantity[0]:"" }
|
||||||
|
};
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.error("no product found")
|
toast.add({ severity: 'error',life: 2500, summary: 'Erreur', detail: 'Une erreur est survenue.' });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function makeAlert(productsAlerts){
|
function makeAlert(productsAlerts){
|
||||||
@ -162,6 +171,7 @@ function makeAlert(productsAlerts){
|
|||||||
<InputNumber inputId="number-value" showButtons v-model="newValue" mode="decimal" fluid></InputNumber>
|
<InputNumber inputId="number-value" showButtons v-model="newValue" mode="decimal" fluid></InputNumber>
|
||||||
<label for="number-value">Ajouter/Soustraire :</label>
|
<label for="number-value">Ajouter/Soustraire :</label>
|
||||||
</IftaLabel>
|
</IftaLabel>
|
||||||
|
<p-message v-if="modifyErrors.quantity" severity="error">{{ modifyErrors.quantity }}</p-message>
|
||||||
<Button
|
<Button
|
||||||
label="Modifier"
|
label="Modifier"
|
||||||
icon="pi pi-file-edit
|
icon="pi pi-file-edit
|
||||||
@ -176,8 +186,9 @@ function makeAlert(productsAlerts){
|
|||||||
Aucun produit renseigné
|
Aucun produit renseigné
|
||||||
</h4>
|
</h4>
|
||||||
<Carousel v-else :value="products"
|
<Carousel v-else :value="products"
|
||||||
:numVisible="3"
|
:numVisible="2"
|
||||||
:numScroll="1"
|
:numScroll="1"
|
||||||
|
class="carousmex"
|
||||||
>
|
>
|
||||||
<template #item="slotProps">
|
<template #item="slotProps">
|
||||||
<div class="carousel-products">
|
<div class="carousel-products">
|
||||||
@ -200,8 +211,9 @@ function makeAlert(productsAlerts){
|
|||||||
Aucun entrepôt renseigné
|
Aucun entrepôt renseigné
|
||||||
</h4>
|
</h4>
|
||||||
<Carousel v-else :value="warehouses"
|
<Carousel v-else :value="warehouses"
|
||||||
:numVisible="3"
|
:numVisible="2"
|
||||||
:numScroll="1"
|
:numScroll="1"
|
||||||
|
class="carousmex"
|
||||||
>
|
>
|
||||||
<template #item="slotProps" >
|
<template #item="slotProps" >
|
||||||
<div class="carousel-products">
|
<div class="carousel-products">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user