diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue
index a7c4e6378..52cd3ed47 100644
--- a/src/components/VnTable/VnTable.vue
+++ b/src/components/VnTable/VnTable.vue
@@ -643,18 +643,10 @@ function handleOnDataSaved(_) {
:key="col?.id"
class="text-center"
>
-
- {{
- rows.reduce(
- (sum, currentRow) => sum + currentRow[col.name],
- 0
- )
- }}
-
+
@@ -739,10 +731,6 @@ es:
border-color: var(--vn-section-color);
}
-.q-table__container > div:first-child {
- background-color: var(--vn-page-color);
-}
-
.grid-three {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(400px, max-content));
diff --git a/src/components/ui/VnPaginate.vue b/src/components/ui/VnPaginate.vue
index 79a79c383..37101dafe 100644
--- a/src/components/ui/VnPaginate.vue
+++ b/src/components/ui/VnPaginate.vue
@@ -131,9 +131,8 @@ async function fetch(params) {
useArrayData(props.dataKey, params);
arrayData.reset(['filter.skip', 'skip']);
await arrayData.fetch({ append: false });
- if (!store.hasMoreData) {
- isLoading.value = false;
- }
+ if (!store.hasMoreData) isLoading.value = false;
+
emit('onFetch', store.data);
return store.data;
}
diff --git a/src/css/quasar.variables.scss b/src/css/quasar.variables.scss
index aeac483be..9f7c62848 100644
--- a/src/css/quasar.variables.scss
+++ b/src/css/quasar.variables.scss
@@ -36,7 +36,6 @@ $color-font-secondary: #777;
.bg-success {
background-color: $positive;
}
-
.bg-notice {
background-color: $info;
}
diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml
index 1fe101e29..558f142ca 100644
--- a/src/i18n/locale/es.yml
+++ b/src/i18n/locale/es.yml
@@ -162,6 +162,7 @@ globals:
dms: Gestión documental
entryCreate: Nueva entrada
latestBuys: Últimas compras
+ reserves: Reservas
tickets: Tickets
ticketCreate: Nuevo ticket
boxing: Encajado
diff --git a/src/pages/Entry/Card/EntrySummary.vue b/src/pages/Entry/Card/EntrySummary.vue
index 379be1d2f..58a5c2e1b 100644
--- a/src/pages/Entry/Card/EntrySummary.vue
+++ b/src/pages/Entry/Card/EntrySummary.vue
@@ -10,6 +10,7 @@ import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.v
import { toDate, toCurrency } from 'src/filters';
import { getUrl } from 'src/composables/getUrl';
import axios from 'axios';
+import FetchedTags from 'src/components/ui/FetchedTags.vue';
const route = useRoute();
const { t } = useI18n();
@@ -163,7 +164,7 @@ const fetchEntryBuys = async () => {
>
-
+
{
{
{
>
-
+
{{ col.value }}
diff --git a/src/pages/Entry/EntryLatestBuys.vue b/src/pages/Entry/EntryLatestBuys.vue
index 7c4354b65..61c430b23 100644
--- a/src/pages/Entry/EntryLatestBuys.vue
+++ b/src/pages/Entry/EntryLatestBuys.vue
@@ -1,16 +1,17 @@
diff --git a/src/pages/Entry/EntryStockBought.vue b/src/pages/Entry/EntryStockBought.vue
index 5b4d43e06..4750a8417 100644
--- a/src/pages/Entry/EntryStockBought.vue
+++ b/src/pages/Entry/EntryStockBought.vue
@@ -54,10 +54,9 @@ const columns = [
create: true,
component: 'number',
summation: true,
- cardVisible: true,
},
{
- align: 'left',
+ align: 'center',
label: t('Bought'),
name: 'bought',
summation: true,
@@ -101,14 +100,9 @@ const travel = ref(null);
const userParams = ref({
dated: Date.vnNew(),
});
+
const filter = ref({
- where: {
- shipped: (userParams.value.dated
- ? new Date(userParams.value.dated)
- : Date.vnNew()
- ).setHours(0, 0, 0, 0),
- m3: { neq: null },
- },
+ fields: ['id', 'm3', 'warehouseInFk'],
include: [
{
relation: 'warehouseIn',
@@ -117,6 +111,13 @@ const filter = ref({
},
},
],
+ where: {
+ shipped: (userParams.value.dated
+ ? new Date(userParams.value.dated)
+ : Date.vnNew()
+ ).setHours(0, 0, 0, 0),
+ m3: { neq: null },
+ },
});
const setUserParams = async ({ dated }) => {
@@ -128,6 +129,18 @@ const setUserParams = async ({ dated }) => {
function openDialog() {
travelDialogRef.value = true;
}
+
+function setFooter(data) {
+ const footer = {
+ bought: 0,
+ reserve: 0,
+ };
+ data.forEach((row) => {
+ footer.bought += row?.bought;
+ footer.reserve += row?.reserve;
+ });
+ tableRef.value.footer = footer;
+}
@@ -139,7 +152,7 @@ function openDialog() {
:filter="filter"
@on-fetch="
(data) => {
- travel = data.filter((data) => data.warehouseIn.code === 'VNH');
+ travel = data.find((data) => data.warehouseIn.code === 'VNH');
}
"
/>
@@ -149,10 +162,10 @@ function openDialog() {
{{ t('Booked trucks') }}:
- {{ travel[0]?.m3 }}
+ {{ travel?.m3 }}
@@ -192,51 +205,80 @@ function openDialog() {
/>
-
-
-
-
- {{ row?.worker?.user?.name }}
-
-
-
-
-
+
+
+ setFooter(data)"
+ :create="{
+ urlCreate: 'StockBoughts',
+ title: t('Reserve some space'),
+ onDataSaved: () => tableRef.reload(),
+ formInitialData: {
+ workerFk: user.id,
+ dated: Date.vnNow(),
+ },
+ }"
+ :columns="columns"
+ :user-params="userParams"
+ :footer="true"
+ auto-load
+ >
+
+
+ {{ row?.worker?.user?.name }}
+
+
+
+
+
+ {{ row?.bought }}
+
+
+
+
+ {{ tableRef.footer.reserve }}
+
+
+
+
+ {{ tableRef.footer.bought }}
+
+
+
+
+
-
- en:
- Buyer: Buyer
- Reserve: Reserve
- Bought: Bought
- More: More
- Date: Date
- This buyer has already made a reservation for this date: This buyer has already made a reservation for this date
es:
Edit travel: Editar envío
Travel: Envíos
diff --git a/src/pages/Entry/EntryStockBoughtDetail.vue b/src/pages/Entry/EntryStockBoughtDetail.vue
index 744b9d3fe..2c1a5a47e 100644
--- a/src/pages/Entry/EntryStockBoughtDetail.vue
+++ b/src/pages/Entry/EntryStockBoughtDetail.vue
@@ -22,7 +22,7 @@ const customUrl = `StockBoughts/getStockBoughtDetail?workerFk=${$props.workerFk}
const columns = [
{
align: 'left',
- label: 'Entry',
+ label: t('Entry'),
name: 'entryFk',
isTitle: true,
isId: true,
@@ -41,29 +41,33 @@ const columns = [
create: true,
columnClass: 'expand',
columnFilter: false,
+ cardVisible: true,
},
{
align: 'left',
name: 'volume',
label: t('Volume'),
columnFilter: false,
+ cardVisible: true,
},
{
align: 'left',
label: t('Packaging'),
name: 'packagingFk',
columnFilter: false,
+ cardVisible: true,
},
{
align: 'left',
label: 'Packing',
name: 'packing',
columnFilter: false,
+ cardVisible: true,
},
];
-
+
+
+
+
-
+
{{ row?.entryFk }}
-
+
{{ row?.itemName }}
@@ -93,11 +105,10 @@ const columns = [
-