diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue
index 4e40c0ba6..8a20023f2 100644
--- a/src/components/VnTable/VnTable.vue
+++ b/src/components/VnTable/VnTable.vue
@@ -107,7 +107,7 @@ const orders = ref(parseOrder(routeQuery.filter?.order));
const CrudModelRef = ref({});
const showForm = ref(false);
const splittedColumns = ref({ columns: [] });
-const columnsVisibilitySkiped = ref();
+const columnsVisibilitySkipped = ref();
const tableModes = [
{
icon: 'view_column',
@@ -133,7 +133,7 @@ onMounted(() => {
? CARD_MODE
: $props.defaultMode;
stateStore.rightDrawer = true;
- columnsVisibilitySkiped.value = [
+ columnsVisibilitySkipped.value = [
...splittedColumns.value.columns
.filter((c) => c.visible == false)
.map((c) => c.name),
@@ -325,11 +325,11 @@ defineExpose({
emit('onFetch', ...args)"
:search-url="searchUrl"
- :disable-infinite-scroll="isTableMode"
+ :disable-infinite-scroll="$attrs['disable-infinite-scroll'] ?? isTableMode"
@save-changes="reload"
:has-sub-toolbar="$attrs['hasSubToolbar'] ?? isEditable"
:auto-load="hasParams || $attrs['auto-load']"
@@ -351,9 +351,8 @@ defineExpose({
:grid="!isTableMode"
table-header-class="bg-header"
card-container-class="grid-three"
- flat
:style="isTableMode && `max-height: ${tableHeight}`"
- virtual-scroll
+ :virtual-scroll="!isTableMode"
@virtual-scroll="
(event) =>
event.index > rows.length - 2 &&
@@ -361,6 +360,7 @@ defineExpose({
"
@row-click="(_, row) => rowClickFunction && rowClickFunction(row)"
@update:selected="emit('update:selected', $event)"
+ flat
>
@@ -370,7 +370,7 @@ defineExpose({
v-if="isTableMode"
v-model="splittedColumns.columns"
:table-code="tableCode ?? route.name"
- :skip="columnsVisibilitySkiped"
+ :skip="columnsVisibilitySkipped"
/>
= 10) {
if (value.at(2) == '/') value = value.split('/').reverse().join('/');
value = date.formatDate(
diff --git a/src/components/common/VnInputTime.vue b/src/components/common/VnInputTime.vue
index a59f0e9e8..2c387bf0b 100644
--- a/src/components/common/VnInputTime.vue
+++ b/src/components/common/VnInputTime.vue
@@ -62,7 +62,7 @@ const formattedTime = computed({
function dateToTime(newDate) {
return date.formatDate(new Date(newDate), dateFormat);
}
-const timeField = ref();
+
watch(
() => model.value,
(val) => (formattedTime.value = val),
diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml
index 78c1fa18d..867f338e4 100644
--- a/src/i18n/locale/en.yml
+++ b/src/i18n/locale/en.yml
@@ -142,6 +142,7 @@ globals:
dms: File management
entryCreate: New entry
latestBuys: Latest buys
+ reserves: Reserves
tickets: Tickets
ticketCreate: New Tickets
boxing: Boxing
diff --git a/src/pages/Entry/EntryStockBought.vue b/src/pages/Entry/EntryStockBought.vue
new file mode 100644
index 000000000..5277cc5e1
--- /dev/null
+++ b/src/pages/Entry/EntryStockBought.vue
@@ -0,0 +1,142 @@
+
+
+
+
+
+
+ {{ row?.worker?.user?.name }}
+
+
+
+
+
+
+ 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:
+ Buyer: Comprador
+ Reserve: Reservado
+ Bought: Comprado
+ More: Más
+ Date: Fecha
+ Reserve some space: Reservar espacio
+ This buyer has already made a reservation for this date: Este comprador ya ha hecho una reserva para esta fecha
+
diff --git a/src/pages/Entry/EntryStockBoughtDetail.vue b/src/pages/Entry/EntryStockBoughtDetail.vue
new file mode 100644
index 000000000..908f5dd20
--- /dev/null
+++ b/src/pages/Entry/EntryStockBoughtDetail.vue
@@ -0,0 +1,102 @@
+
+
+
+
+
+
+ {{ row?.entryFk }}
+
+
+
+
+
+ {{ row?.itemName }}
+
+
+
+
+
+
+
+ es:
+ Buyer: Comprador
+ Reserve: Reservado
+ Bought: Comprado
+ More: Más
+ Date: Fecha
+
diff --git a/src/pages/Route/RouteList.vue b/src/pages/Route/RouteList.vue
index b13e8cacd..7d5dd5c68 100644
--- a/src/pages/Route/RouteList.vue
+++ b/src/pages/Route/RouteList.vue
@@ -139,7 +139,7 @@ const columns = computed(() => [
{
align: 'center',
name: 'm3',
- label: 'volume',
+ label: t('Volume'),
cardVisible: true,
},
{
@@ -379,4 +379,5 @@ es:
Route is not served: La ruta no está servida
hourStarted: Hora de inicio
hourFinished: Hora de fin
+ Volume: Volumen
diff --git a/src/router/modules/entry.js b/src/router/modules/entry.js
index 0d38ed626..fd5490fbd 100644
--- a/src/router/modules/entry.js
+++ b/src/router/modules/entry.js
@@ -11,7 +11,7 @@ export default {
component: RouterView,
redirect: { name: 'EntryMain' },
menus: {
- main: ['EntryList', 'MyEntries', 'EntryLatestBuys'],
+ main: ['EntryList', 'MyEntries', 'EntryLatestBuys', 'EntryStockBought'],
card: ['EntryBasicData', 'EntryBuys', 'EntryNotes', 'EntryDms', 'EntryLog'],
},
children: [
@@ -57,6 +57,15 @@ export default {
},
component: () => import('src/pages/Entry/EntryLatestBuys.vue'),
},
+ {
+ path: 'stock-Bought',
+ name: 'EntryStockBought',
+ meta: {
+ title: 'reserves',
+ icon: 'deployed_code_history',
+ },
+ component: () => import('src/pages/Entry/EntryStockBought.vue'),
+ },
],
},
{
diff --git a/test/cypress/integration/entry/stockBought.spec.js b/test/cypress/integration/entry/stockBought.spec.js
new file mode 100644
index 000000000..8e4fe225c
--- /dev/null
+++ b/test/cypress/integration/entry/stockBought.spec.js
@@ -0,0 +1,36 @@
+describe('EntryStockBought', () => {
+ const reserveField = 'input[name="reserve"]';
+ beforeEach(() => {
+ cy.viewport(1920, 1080);
+ cy.login('buyer');
+ cy.visit(
+ `/#/entry/stock-Bought?table={"filter":"{}","dated":"2000-12-31T23:00:00.000Z"}`
+ );
+ });
+ it('Should edit the reserved space', () => {
+ cy.get('tBody > tr').its('length').should('eq', 1);
+ cy.get(reserveField).type('10{enter}');
+ cy.get('button[title="Save"]').click();
+ cy.get('.q-notification__message').should('have.text', 'Data saved');
+ });
+ it('Should add a new reserved space for buyerBoss', () => {
+ cy.get('.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon').click();
+ cy.get('input[aria-label="Reserve"]').type('1');
+ cy.get('input[aria-label="Date"]').eq(1).clear();
+ cy.get('input[aria-label="Date"]').eq(1).type('01-01');
+ cy.get('input[aria-label="Buyer"]').type('buyerboss{downarrow}{enter}');
+ cy.get('.q-notification__message').should('have.text', 'Data created');
+ cy.get('tBody > tr').its('length').should('eq', 2);
+ });
+ it('Should check detail for the buyer', () => {
+ cy.get(':nth-child(1) > .sticky > .q-btn > .q-btn__content > .q-icon').click();
+ cy.get('tBody > tr').eq(1).its('length').should('eq', 1);
+ });
+ it('Should check detail for the buyerBoss and had no content', () => {
+ cy.get(':nth-child(2) > .sticky > .q-btn > .q-btn__content > .q-icon').click();
+ cy.get('.q-table__bottom.row.items-center.q-table__bottom--nodata').should(
+ 'have.text',
+ 'warningNo data available'
+ );
+ });
+});