diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue
index c1188ec4705..e1d8e56b560 100644
--- a/src/components/VnTable/VnTable.vue
+++ b/src/components/VnTable/VnTable.vue
@@ -861,6 +861,7 @@ function cardClick(_, row) {
:key="index"
:title="btn.title"
:icon="btn.icon"
+ data-cy="cardBtn"
class="q-pa-xs"
:class="
btn.isPrimary
diff --git a/src/components/common/VnCardBeta.vue b/src/components/common/VnCardBeta.vue
index 16fc14c2c41..7c82316dc44 100644
--- a/src/components/common/VnCardBeta.vue
+++ b/src/components/common/VnCardBeta.vue
@@ -38,20 +38,24 @@ onBeforeMount(async () => {
}
});
-if (props.baseUrl) {
- onBeforeRouteUpdate(async (to, from) => {
- if (hasRouteParam(to.params)) {
- const { matched } = router.currentRoute.value;
- const { name } = matched.at(-3);
- if (name) {
- router.push({ name, params: to.params });
- }
+onBeforeRouteUpdate(async (to, from) => {
+ if (hasRouteParam(to.params)) {
+ const { matched } = router.currentRoute.value;
+ const { name } = matched.at(-3);
+ if (name) {
+ router.push({ name, params: to.params });
}
- if (to.params.id !== from.params.id) {
- arrayData.store.url = `${props.baseUrl}/${to.params.id}`;
- await arrayData.fetch({ append: false, updateRouter: false });
- }
- });
+ }
+ const id = to.params.id;
+ if (id !== from.params.id) await fetch(id, true);
+});
+
+async function fetch(id, append = false) {
+ const regex = /\/(\d+)/;
+ if (props.idInWhere) arrayData.store.filter.where = { id };
+ else if (!regex.test(props.url)) arrayData.store.url = `${props.url}/${id}`;
+ else arrayData.store.url = props.url.replace(regex, `/${id}`);
+ await arrayData.fetch({ append, updateRouter: false });
}
function hasRouteParam(params, valueToCheck = ':addressId') {
return Object.values(params).includes(valueToCheck);
diff --git a/src/components/ui/VnUsesMana.vue b/src/components/ui/VnUsesMana.vue
index 1ad4a706e93..cb066b2359c 100644
--- a/src/components/ui/VnUsesMana.vue
+++ b/src/components/ui/VnUsesMana.vue
@@ -53,3 +53,8 @@ const manaCode = ref(props.manaCode);
/>
+
+ es:
+ Promotion mana: Maná promoción
+ Claim mana: Maná reclamación
+
diff --git a/src/pages/Ticket/Card/TicketEditMana.vue b/src/pages/Ticket/Card/TicketEditMana.vue
index 693875712d1..a55658a07e7 100644
--- a/src/pages/Ticket/Card/TicketEditMana.vue
+++ b/src/pages/Ticket/Card/TicketEditMana.vue
@@ -47,7 +47,10 @@ const cancel = () => {
-
+
+
+
+
{{ t('New price') }}
@@ -56,9 +59,6 @@ const cancel = () => {
-
-
-
[
align: 'left',
label: t('globals.amount'),
name: 'amount',
- format: (row) => parseInt(row.amount * row.quantity),
+ format: (row) => toCurrency(getSaleTotal(row)),
},
{
align: 'left',
@@ -331,8 +331,7 @@ const updateDiscount = async (sales, newDiscount = null) => {
};
await axios.post(`Tickets/${route.params.id}/updateDiscount`, params);
notify('globals.dataSaved', 'positive');
- for (let sale of sales) sale.discount = _newDiscount;
- edit.value = { ...DEFAULT_EDIT };
+ tableRef.value.reload();
};
const getNewPrice = computed(() => {
@@ -789,21 +788,24 @@ watch(
:mana-code="manaCode"
@save="changeDiscount(row)"
>
-
-
-
-
+
+ {
+ changeDiscount(row);
+ popup.hide();
+ }
+ "
+ v-model.number="edit.discount"
+ :label="t('ticketSale.discount')"
+ type="number"
+ />
+
{{ toPercentage(row.discount / 100) }}
-
- {{ toCurrency(row.quantity * row.price) }}
-
diff --git a/src/pages/Travel/ExtraCommunity.vue b/src/pages/Travel/ExtraCommunity.vue
index dee9d923a01..ac46caa44aa 100644
--- a/src/pages/Travel/ExtraCommunity.vue
+++ b/src/pages/Travel/ExtraCommunity.vue
@@ -2,6 +2,7 @@
import { onMounted, ref, computed, watch } from 'vue';
import { QBtn } from 'quasar';
import { useI18n } from 'vue-i18n';
+import { useRoute } from 'vue-router';
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue';
@@ -22,6 +23,8 @@ import VnPopup from 'src/components/common/VnPopup.vue';
const stateStore = useStateStore();
const { t } = useI18n();
const { openReport } = usePrintService();
+const route = useRoute();
+const tableParams = ref();
const shippedFrom = ref(Date.vnNew());
const landedTo = ref(Date.vnNew());
@@ -143,7 +146,7 @@ const columns = computed(() => [
sortable: true,
},
{
- label: t('globals.pageTitles.supplier'),
+ label: t('extraCommunity.cargoShip'),
field: 'cargoSupplierNickname',
name: 'cargoSupplierNickname',
align: 'left',
@@ -171,7 +174,7 @@ const columns = computed(() => [
? value.reduce((sum, entry) => {
return sum + (entry.invoiceAmount || 0);
}, 0)
- : 0
+ : 0,
),
},
{
@@ -200,7 +203,7 @@ const columns = computed(() => [
sortable: true,
},
{
- label: t('kg'),
+ label: t('extraCommunity.kg'),
field: 'kg',
name: 'kg',
align: 'left',
@@ -208,7 +211,7 @@ const columns = computed(() => [
sortable: true,
},
{
- label: t('physicKg'),
+ label: t('extraCommunity.physicKg'),
field: 'loadedKg',
name: 'loadedKg',
align: 'left',
@@ -232,7 +235,7 @@ const columns = computed(() => [
sortable: true,
},
{
- label: t('shipped'),
+ label: t('extraCommunity.shipped'),
field: 'shipped',
name: 'shipped',
align: 'left',
@@ -249,7 +252,7 @@ const columns = computed(() => [
sortable: true,
},
{
- label: t('landed'),
+ label: t('extraCommunity.landed'),
field: 'landed',
name: 'landed',
align: 'left',
@@ -258,7 +261,7 @@ const columns = computed(() => [
format: (value) => toDate(value),
},
{
- label: t('notes'),
+ label: t('extraCommunity.notes'),
field: '',
name: 'notes',
align: 'center',
@@ -284,7 +287,7 @@ watch(
if (!arrayData.store.data) return;
onStoreDataChange();
},
- { deep: true, immediate: true }
+ { deep: true, immediate: true },
);
const openReportPdf = () => {
@@ -451,13 +454,24 @@ const getColor = (percentage) => {
for (const { value, className } of travelKgPercentages.value)
if (percentage > value) return className;
};
+
+const filteredEntries = (entries) => {
+ if (!tableParams?.value?.entrySupplierFk) return entries;
+ return entries?.filter(
+ (entry) => entry.supplierFk === tableParams?.value?.entrySupplierFk,
+ );
+};
+
+watch(route, () => {
+ tableParams.value = JSON.parse(route.query.table);
+});
@@ -521,7 +535,7 @@ const getColor = (percentage) => {
? tableColumnComponents[col.name].event(
rows[props.rowIndex][col.field],
col.field,
- props.rowIndex
+ props.rowIndex,
)
: {}
"
@@ -546,7 +560,7 @@ const getColor = (percentage) => {
},
{
link: ['id', 'cargoSupplierNickname'].includes(
- col.name
+ col.name,
),
},
]"
@@ -564,9 +578,8 @@ const getColor = (percentage) => {
-
{
name="warning"
color="negative"
size="md"
- :title="t('requiresInspection')"
+ :title="t('extraCommunity.requiresInspection')"
>
@@ -709,24 +722,3 @@ const getColor = (percentage) => {
width: max-content;
}
-
-en:
- searchExtraCommunity: Search for extra community shipping
- kg: BI. KG
- physicKg: Phy. KG
- shipped: W. shipped
- landed: W. landed
- requiresInspection: Requires inspection
- BIP: Boder Inspection Point
- notes: Notes
-es:
- searchExtraCommunity: Buscar por envío extra comunitario
- kg: KG Bloq.
- physicKg: KG físico
- shipped: F. envío
- landed: F. llegada
- notes: Notas
- Open as PDF: Abrir como PDF
- requiresInspection: Requiere inspección
- BIP: Punto de Inspección Fronteriza
-
diff --git a/src/pages/Travel/ExtraCommunityFilter.vue b/src/pages/Travel/ExtraCommunityFilter.vue
index b22574632fc..29d3423340c 100644
--- a/src/pages/Travel/ExtraCommunityFilter.vue
+++ b/src/pages/Travel/ExtraCommunityFilter.vue
@@ -79,7 +79,7 @@ warehouses();
- {{ t(`params.${tag.label}`) }}:
+ {{ t(`extraCommunity.filter.${tag.label}`) }}:
{{ formatFn(tag.value) }}
@@ -92,7 +92,7 @@ warehouses();
@@ -103,7 +103,7 @@ warehouses();
+
+
+
+
+
-
-
-en:
- params:
- id: Id
- reference: Reference
- totalEntries: Total entries
- agencyModeFk: Agency
- warehouseInFk: Warehouse In
- warehouseOutFk: Warehouse Out
- shippedFrom: Shipped from
- landedTo: Landed to
- cargoSupplierFk: Supplier
- continent: Continent out
-es:
- params:
- id: Id
- reference: Referencia
- totalEntries: Ent. totales
- agencyModeFk: Agencia
- warehouseInFk: Alm. entrada
- warehouseOutFk: Alm. salida
- shippedFrom: Llegada desde
- landedTo: Llegada hasta
- cargoSupplierFk: Proveedor
- continent: Cont. Salida
-
diff --git a/src/pages/Travel/locale/en.yml b/src/pages/Travel/locale/en.yml
new file mode 100644
index 00000000000..ddef66f2f07
--- /dev/null
+++ b/src/pages/Travel/locale/en.yml
@@ -0,0 +1,22 @@
+extraCommunity:
+ cargoShip: Cargo ship
+ searchExtraCommunity: Search for extra community shipping
+ kg: BI. KG
+ physicKg: Phy. KG
+ shipped: W. shipped
+ landed: W. landed
+ requiresInspection: Requires inspection
+ BIP: Boder Inspection Point
+ notes: Notes
+ filter:
+ id: Id
+ reference: Reference
+ totalEntries: Total entries
+ agencyModeFk: Agency
+ warehouseInFk: Warehouse In
+ warehouseOutFk: Warehouse Out
+ shippedFrom: Shipped from
+ landedTo: Landed to
+ cargoSupplierFk: Cargo supplier
+ continent: Continent out
+ entrySupplierFk: Supplier
diff --git a/src/pages/Travel/locale/es.yml b/src/pages/Travel/locale/es.yml
new file mode 100644
index 00000000000..1542d889266
--- /dev/null
+++ b/src/pages/Travel/locale/es.yml
@@ -0,0 +1,23 @@
+extraCommunity:
+ cargoShip: Carguera
+ searchExtraCommunity: Buscar por envío extra comunitario
+ kg: KG Bloq.
+ physicKg: KG físico
+ shipped: F. envío
+ landed: F. llegada
+ notes: Notas
+ Open as PDF: Abrir como PDF
+ requiresInspection: Requiere inspección
+ BIP: Punto de Inspección Fronteriza
+ filter:
+ id: Id
+ reference: Referencia
+ totalEntries: Ent. totales
+ agencyModeFk: Agencia
+ warehouseInFk: Alm. entrada
+ warehouseOutFk: Alm. salida
+ shippedFrom: Llegada desde
+ landedTo: Llegada hasta
+ cargoSupplierFk: Carguera
+ continent: Cont. Salida
+ entrySupplierFk: Proveedor
diff --git a/src/pages/Worker/Card/WorkerDescriptorMenu.vue b/src/pages/Worker/Card/WorkerDescriptorMenu.vue
index 8d82dc839f7..0dcb4fd7115 100644
--- a/src/pages/Worker/Card/WorkerDescriptorMenu.vue
+++ b/src/pages/Worker/Card/WorkerDescriptorMenu.vue
@@ -53,7 +53,7 @@ const showChangePasswordDialog = () => {
{
},
});
});
-
+
it('should open buyLabel when is supplier', () => {
- cy.get(
- '[to="/null/3"] > .q-card > :nth-child(2) > .q-btn > .q-btn__content > .q-icon'
- ).click();
+ cy.dataCy('cardBtn').eq(2).click();
cy.dataCy('printLabelsBtn').click();
cy.window().its('open').should('be.called');
});