Small changes and fixes, highlight days on the calendar
This commit is contained in:
@@ -18,6 +18,7 @@ const { isDarkTheme } = storeToRefs(siteControlStore);
|
||||
const searchDate = ref<Date>(new Date(Date.now()));
|
||||
const confirmedOrders = ref<boolean>();
|
||||
const isSummed = ref<boolean>(true);
|
||||
const printMe = ref();
|
||||
|
||||
|
||||
orders.value = await ordersStore.fetchOrdersByDay(searchDate.value, null);
|
||||
@@ -62,46 +63,48 @@ categoriesStore.sumProductsFromOrders(orders.value);
|
||||
</div>
|
||||
<div class="box mt-3">
|
||||
<button class="button is-fullwidth mb-3" @click="isSummed=false">Rozdzielone zamówienia</button>
|
||||
<button class="button is-fullwidth" @click="isSummed=true">Zsumowane zamówienia</button>
|
||||
<button class="button is-fullwidth mb-3" @click="isSummed=true">Zsumowane zamówienia</button>
|
||||
<button class="button is-fullwidth" v-print="'#printMe'">Drukuj</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column is-four-fifths ">
|
||||
<div class="is-flex is-justify-content-center is-flex-direction-row box" style="width: 100%; height: 100%; align-content: center">
|
||||
<table class="table blackBorder tableOverflow" v-if="orders != undefined && orders.length != 0 && !isSummed">
|
||||
<thead>
|
||||
<tr class="has-background-grey-light">
|
||||
<th>Nazwa produktu</th>
|
||||
<th>Ilość</th>
|
||||
<th>Jednostka miary</th>
|
||||
<th>Cena jednostkowa</th>
|
||||
<th>Cena całkowita</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody v-for="order in orders" :key="order.MZN_UUID">
|
||||
<tr class="has-background-grey-lighter">
|
||||
<td colspan="5">
|
||||
{{ order.MZN_PodNazwa1 + order.MZN_PodNazwa2 + order.MZN_PodNazwa3 + order.MZN_DataDos.toString()}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-for="product in order.MZamElem" :key="product.MZE_MZEID">
|
||||
<td>{{ product.MZE_TwrNazwa }}</td>
|
||||
<td>{{ Number(product.MZE_TwrIlosc).toFixed(2) }}</td>
|
||||
<td>{{ product.MZE_TwrJm }}</td>
|
||||
<td>{{ Number(product.MZE_TwrCena).toFixed(2) }} PLN</td>
|
||||
<td>{{ (Number(product.MZE_TwrCena) * Number(product.MZE_TwrIlosc)).toFixed(2) }} PLN</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table blackBorder tableOverflow" v-else-if="orders != undefined && orders.length != 0 && isSummed">
|
||||
<thead>
|
||||
<tr class="has-background-grey-light">
|
||||
<th>Nazwa produktu</th>
|
||||
<th>Ilość</th>
|
||||
<th>Jednostka miary</th>
|
||||
<th>Cena zsumowana</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<div class="is-flex is-justify-content-center is-flex-direction-row box printMe" style="width: 100%; height: 100%; align-content: center">
|
||||
<div id="printMe">
|
||||
<table class="table blackBorder tableOverflow" v-if="orders != undefined && orders.length != 0 && !isSummed" >
|
||||
<thead>
|
||||
<tr class="has-background-grey-light">
|
||||
<th>Nazwa produktu</th>
|
||||
<th>Ilość</th>
|
||||
<th>Jednostka miary</th>
|
||||
<th>Cena jednostkowa</th>
|
||||
<th>Cena całkowita</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody v-for="order in orders" :key="order.MZN_UUID">
|
||||
<tr class="has-background-grey-lighter dashedBorder">
|
||||
<td colspan="5">
|
||||
{{ order.MZN_PodNazwa1 + order.MZN_PodNazwa2 + order.MZN_PodNazwa3 + order.MZN_DataDos.toString()}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-for="product in order.MZamElem" :key="product.MZE_MZEID">
|
||||
<td>{{ product.MZE_TwrNazwa }}</td>
|
||||
<td>{{ Number(product.MZE_TwrIlosc).toFixed(2) }}</td>
|
||||
<td>{{ product.MZE_TwrJm }}</td>
|
||||
<td>{{ Number(product.MZE_TwrCena).toFixed(2) }} PLN</td>
|
||||
<td>{{ (Number(product.MZE_TwrCena) * Number(product.MZE_TwrIlosc)).toFixed(2) }} PLN</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table blackBorder tableOverflow" v-else-if="orders != undefined && orders.length != 0 && isSummed">
|
||||
<thead>
|
||||
<tr class="has-background-grey-light">
|
||||
<th>Nazwa produktu</th>
|
||||
<th>Ilość</th>
|
||||
<th>Jednostka miary</th>
|
||||
<th>Cena zsumowana</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<template v-for="category in categories" :key="category.Kod">
|
||||
<template v-for="product in category.Towary" :key="product.Twr_Kod">
|
||||
<tr v-if="product.SummedQuantity > 0">
|
||||
@@ -118,9 +121,10 @@ categoriesStore.sumProductsFromOrders(orders.value);
|
||||
</tr>
|
||||
</template>
|
||||
</template>
|
||||
</tbody>
|
||||
</table>
|
||||
<p v-else class="title is-1 has-text-centered" style="height: min-content; align-self: center;">Brak zamówień</p>
|
||||
</tbody>
|
||||
</table>
|
||||
<p v-else class="title is-1 has-text-centered" style="height: min-content; align-self: center;">Brak zamówień</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -147,4 +151,11 @@ categoriesStore.sumProductsFromOrders(orders.value);
|
||||
overflow-x: scroll;
|
||||
display: block;
|
||||
}
|
||||
|
||||
@media print {
|
||||
.dashedBorder{
|
||||
border-style: dotted;
|
||||
border-color: lightgray;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user