-
-
-
-
-
- {{ t('New price') }}
-
- {{ toCurrency($props.newPrice) }}
-
-
+
+
+
+
+
+
+
+
+ {{ t('New price') }}
+
+ {{ toCurrency($props.newPrice) }}
+
+
store.data?.ticketState?.state?.code);
const transfer = ref({
@@ -175,17 +174,21 @@ const getSaleTotal = (sale) => {
return price - discount;
};
+const getRowUpdateInputEvents = (sale) => ({
+ 'keyup.enter': () => {
+ changeQuantity(sale);
+ },
+ blur: () => {
+ changeQuantity(sale);
+ },
+});
+
const resetChanges = async () => {
arrayData.fetch({ append: false });
tableRef.value.reload();
};
-const rowToUpdate = ref(null);
const changeQuantity = async (sale) => {
- if (
- !sale.itemFk ||
- sale.quantity == null ||
- edit.value?.oldQuantity === sale.quantity
- )
+ if (!sale.itemFk || sale.quantity == null || sale?.originalQuantity === sale.quantity)
return;
if (!sale.id) return addSale(sale);
@@ -197,11 +200,8 @@ const changeQuantity = async (sale) => {
const updateQuantity = async (sale) => {
try {
let { quantity, id } = sale;
- if (!rowToUpdate.value) return;
- rowToUpdate.value = null;
sale.isNew = false;
- const params = { quantity: quantity };
- await axios.post(`Sales/${id}/updateQuantity`, params);
+ await axios.post(`Sales/${id}/updateQuantity`, { quantity });
notify('globals.dataSaved', 'positive');
tableRef.value.reload();
} catch (e) {
@@ -277,7 +277,6 @@ const selectedValidSales = computed(() => {
});
const onOpenEditPricePopover = async (sale) => {
- await getMana();
edit.value = {
sale: JSON.parse(JSON.stringify(sale)),
price: sale.price,
@@ -285,7 +284,6 @@ const onOpenEditPricePopover = async (sale) => {
};
const onOpenEditDiscountPopover = async (sale) => {
- await getMana();
if (isLocked.value) return;
if (sale) {
edit.value = {
@@ -306,7 +304,6 @@ const changePrice = async (sale) => {
await confirmUpdate(() => updatePrice(sale, newPrice));
} else updatePrice(sale, newPrice);
}
- await getMana();
};
const updatePrice = async (sale, newPrice) => {
await axios.post(`Sales/${sale.id}/updatePrice`, { newPrice });
@@ -599,9 +596,7 @@ watch(
:is-ticket-editable="isTicketEditable"
:sales="selectedValidSales"
:disable="!hasSelectedRows"
- :mana="mana"
:ticket-config="ticketConfig"
- @get-mana="getMana()"
@update-discounts="updateDiscounts"
@refresh-table="resetChanges"
/>
@@ -772,9 +767,7 @@ watch(
v-if="row.isNew || isTicketEditable"
type="number"
v-model.number="row.quantity"
- @blur="changeQuantity(row)"
- @keyup.enter.stop="changeQuantity(row)"
- @update:model-value="() => (rowToUpdate = row)"
+ v-on="getRowUpdateInputEvents(row)"
@focus="edit.oldQuantity = row.quantity"
/>
{{ row.quantity }}
@@ -786,7 +779,6 @@ watch(
diff --git a/src/pages/Ticket/Card/TicketSaleMoreActions.vue b/src/pages/Ticket/Card/TicketSaleMoreActions.vue
index 646393a6f..773b0807f 100644
--- a/src/pages/Ticket/Card/TicketSaleMoreActions.vue
+++ b/src/pages/Ticket/Card/TicketSaleMoreActions.vue
@@ -34,10 +34,6 @@ const props = defineProps({
type: Array,
default: () => [],
},
- mana: {
- type: Number,
- default: null,
- },
ticketConfig: {
type: Array,
default: () => [],
@@ -50,6 +46,7 @@ const { dialog } = useQuasar();
const { notify } = useNotify();
const acl = useAcl();
const btnDropdownRef = ref(null);
+const editManaProxyRef = ref(null);
const { openConfirmationModal } = useVnConfirm();
const newDiscount = ref(null);
@@ -206,8 +203,14 @@ const createRefund = async (withWarehouse) => {
{{ t('Update discount') }}
-
+
editManaProxyRef.save(row)"
v-model.number="newDiscount"
:label="t('ticketSale.discount')"
type="number"
diff --git a/src/pages/Ticket/Card/TicketSaleTracking.vue b/src/pages/Ticket/Card/TicketSaleTracking.vue
index 7a33df795..723caacf5 100644
--- a/src/pages/Ticket/Card/TicketSaleTracking.vue
+++ b/src/pages/Ticket/Card/TicketSaleTracking.vue
@@ -31,7 +31,7 @@ const oldQuantity = ref(null);
watch(
() => route.params.id,
- async () => nextTick(async () => await saleTrackingFetchDataRef.value.fetch())
+ async () => nextTick(async () => await saleTrackingFetchDataRef.value.fetch()),
);
const columns = computed(() => [
@@ -212,7 +212,7 @@ const updateShelving = async (sale) => {
const { data: patchResponseData } = await axios.patch(
`ItemShelvings/${sale.itemShelvingFk}`,
- params
+ params,
);
const filter = {
fields: ['parkingFk'],
@@ -385,7 +385,7 @@ const qCheckBoxController = (sale, action) => {
- {{ dashIfEmpty(row.parkingFk) }}
+ {{ dashIfEmpty(row.parkingCode) }}
diff --git a/src/pages/Ticket/Card/TicketSummary.vue b/src/pages/Ticket/Card/TicketSummary.vue
index 748406daa..a19ab3779 100644
--- a/src/pages/Ticket/Card/TicketSummary.vue
+++ b/src/pages/Ticket/Card/TicketSummary.vue
@@ -46,6 +46,15 @@ const descriptorData = useArrayData('Ticket');
onMounted(async () => {
ticketUrl.value = (await getUrl('ticket/')) + entityId.value + '/';
});
+const formattedAddress = computed(() => {
+ if (!ticket.value) return '';
+
+ const address = ticket.value.address;
+ const postcode = address.postalCode;
+ const province = address.province ? `(${address.province.name})` : '';
+
+ return `${address.street} - ${postcode} - ${address.city} ${province}`;
+});
function isEditable() {
try {
@@ -240,7 +249,7 @@ onMounted(async () => {
/>
diff --git a/src/pages/Ticket/TicketFilter.vue b/src/pages/Ticket/TicketFilter.vue
index 45eaf709f..e43c69cf2 100644
--- a/src/pages/Ticket/TicketFilter.vue
+++ b/src/pages/Ticket/TicketFilter.vue
@@ -293,6 +293,7 @@ en:
clientFk: Customer
orderFk: Order
from: From
+ shipped: Shipped
to: To
stateFk: State
groupedStates: Grouped State
@@ -319,6 +320,7 @@ es:
clientFk: Cliente
orderFk: Pedido
from: Desde
+ shipped: F. envío
to: Hasta
stateFk: Estado
groupedStates: Estado agrupado
diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue
index 4c2b7416a..9c882c20b 100644
--- a/src/pages/Ticket/TicketList.vue
+++ b/src/pages/Ticket/TicketList.vue
@@ -103,13 +103,11 @@ const columns = computed(() => [
},
{
align: 'left',
- name: 'shippedDate',
+ name: 'shipped',
cardVisible: true,
label: t('ticketList.shipped'),
columnFilter: {
component: 'date',
- alias: 't',
- inWhere: true,
},
format: ({ shippedDate }) => toDate(shippedDate),
},
diff --git a/src/pages/Worker/Card/WorkerBusiness.vue b/src/pages/Worker/Card/WorkerBusiness.vue
index 6025ae289..e3582a2d5 100644
--- a/src/pages/Worker/Card/WorkerBusiness.vue
+++ b/src/pages/Worker/Card/WorkerBusiness.vue
@@ -3,7 +3,7 @@ import { ref, computed } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router';
import VnTable from 'components/VnTable/VnTable.vue';
-import { toDate } from 'src/filters';
+import { dashIfEmpty, toDate } from 'src/filters';
import { useQuasar } from 'quasar';
import axios from 'axios';
@@ -15,7 +15,7 @@ const quasar = useQuasar();
async function reactivateWorker() {
const hasToReactive = tableRef.value.CrudModelRef.formData.find(
- (data) => !data.ended
+ (data) => !data.ended,
);
if (hasToReactive) {
quasar
@@ -38,25 +38,25 @@ const columns = computed(() => [
{
name: 'started',
label: t('worker.business.tableVisibleColumns.started'),
- align: 'left',
format: ({ started }) => toDate(started),
component: 'date',
cardVisible: true,
create: true,
+ width: '90px',
},
{
name: 'ended',
label: t('worker.business.tableVisibleColumns.ended'),
- align: 'left',
format: ({ ended }) => toDate(ended),
component: 'date',
cardVisible: true,
create: true,
+ width: '90px',
},
{
label: t('worker.business.tableVisibleColumns.company'),
- align: 'left',
+ toolTip: t('worker.business.tableVisibleColumns.company'),
name: 'companyCodeFk',
component: 'select',
attrs: {
@@ -65,23 +65,23 @@ const columns = computed(() => [
optionLabel: 'code',
optionValue: 'code',
},
- cardVisible: true,
create: true,
+ width: '60px',
},
{
- align: 'left',
name: 'reasonEndFk',
component: 'select',
label: t('worker.business.tableVisibleColumns.reasonEnd'),
+ toolTip: t('worker.business.tableVisibleColumns.reasonEnd'),
attrs: {
url: 'BusinessReasonEnds',
fields: ['id', 'reason'],
optionLabel: 'reason',
},
cardVisible: true,
+ format: ({ reason }, dashIfEmpty) => dashIfEmpty(reason),
},
{
- align: 'left',
name: 'departmentFk',
component: 'select',
label: t('worker.business.tableVisibleColumns.department'),
@@ -89,15 +89,19 @@ const columns = computed(() => [
url: 'Departments',
fields: ['id', 'name'],
optionLabel: 'name',
+ optionValue: 'id',
},
cardVisible: true,
create: true,
+ width: '80px',
+ format: ({ departmentName }, dashIfEmpty) => dashIfEmpty(departmentName),
},
{
align: 'left',
name: 'workerBusinessProfessionalCategoryFk',
component: 'select',
label: t('worker.business.tableVisibleColumns.professionalCategory'),
+ toolTip: t('worker.business.tableVisibleColumns.professionalCategory'),
attrs: {
url: 'WorkerBusinessProfessionalCategories',
fields: ['id', 'description', 'code'],
@@ -105,6 +109,9 @@ const columns = computed(() => [
},
cardVisible: true,
create: true,
+ width: '100px',
+ format: ({ professionalDescription }, dashIfEmpty) =>
+ dashIfEmpty(professionalDescription),
},
{
align: 'left',
@@ -118,6 +125,8 @@ const columns = computed(() => [
},
cardVisible: true,
create: true,
+ format: ({ calendarTypeDescription }, dashIfEmpty) =>
+ dashIfEmpty(calendarTypeDescription),
},
{
align: 'left',
@@ -131,6 +140,8 @@ const columns = computed(() => [
},
cardVisible: true,
create: true,
+ width: '100px',
+ format: ({ workCenterName }, dashIfEmpty) => dashIfEmpty(workCenterName),
},
{
align: 'left',
@@ -144,6 +155,7 @@ const columns = computed(() => [
},
cardVisible: true,
create: true,
+ format: ({ payrollDescription }, dashIfEmpty) => dashIfEmpty(payrollDescription),
},
{
align: 'left',
@@ -157,6 +169,7 @@ const columns = computed(() => [
},
cardVisible: true,
create: true,
+ format: ({ occupationName }, dashIfEmpty) => dashIfEmpty(occupationName),
},
{
align: 'left',
@@ -165,6 +178,7 @@ const columns = computed(() => [
component: 'input',
cardVisible: true,
create: true,
+ width: '50px',
},
{
align: 'left',
@@ -177,6 +191,8 @@ const columns = computed(() => [
},
cardVisible: true,
create: true,
+ format: ({ workerBusinessTypeName }, dashIfEmpty) =>
+ dashIfEmpty(workerBusinessTypeName),
},
{
align: 'left',
@@ -185,6 +201,7 @@ const columns = computed(() => [
component: 'input',
cardVisible: true,
create: true,
+ width: '70px',
},
{
align: 'left',
@@ -193,6 +210,7 @@ const columns = computed(() => [
component: 'input',
cardVisible: true,
create: true,
+ width: '70px',
},
{
name: 'notes',
@@ -208,7 +226,7 @@ const columns = computed(() => [
reactivateWorker(data)"
/>
diff --git a/src/pages/Worker/Card/WorkerDescriptor.vue b/src/pages/Worker/Card/WorkerDescriptor.vue
index 07d9cad62..f2cf28dd1 100644
--- a/src/pages/Worker/Card/WorkerDescriptor.vue
+++ b/src/pages/Worker/Card/WorkerDescriptor.vue
@@ -111,6 +111,7 @@ const handlePhotoUpdated = (evt = false) => {
{
.photo {
height: 256px;
}
+.ellipsis-text {
+ width: 100%;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
diff --git a/src/pages/Zone/ZoneList.vue b/src/pages/Zone/ZoneList.vue
index a82bbb285..4df84e4bd 100644
--- a/src/pages/Zone/ZoneList.vue
+++ b/src/pages/Zone/ZoneList.vue
@@ -65,6 +65,7 @@ const tableFilter = {
const columns = computed(() => [
{
+ align: 'left',
name: 'id',
label: t('list.id'),
chip: {
@@ -74,8 +75,6 @@ const columns = computed(() => [
columnFilter: {
inWhere: true,
},
- columnClass: 'shrink-column',
- component: 'number',
},
{
align: 'left',
@@ -107,6 +106,7 @@ const columns = computed(() => [
format: (row, dashIfEmpty) => dashIfEmpty(row?.agencyMode?.name),
},
{
+ align: 'left',
name: 'price',
label: t('list.price'),
cardVisible: true,
@@ -114,11 +114,9 @@ const columns = computed(() => [
columnFilter: {
inWhere: true,
},
- columnClass: 'shrink-column',
- component: 'number',
},
{
- align: 'center',
+ align: 'left',
name: 'hour',
label: t('list.close'),
cardVisible: true,
@@ -180,73 +178,67 @@ function formatRow(row) {
-
-
-
-
- {{ dashIfEmpty(formatRow(row)) }}
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ {{ dashIfEmpty(formatRow(row)) }}
+
+
+
+
+
+
+
+
+
+
+
@@ -254,20 +246,3 @@ es:
Search zone: Buscar zona
You can search zones by id or name: Puedes buscar zonas por id o nombre
-
-
diff --git a/test/cypress/integration/item/itemTag.spec.js b/test/cypress/integration/item/itemTag.spec.js
index d7a9ea4b3..425eaffe6 100644
--- a/test/cypress/integration/item/itemTag.spec.js
+++ b/test/cypress/integration/item/itemTag.spec.js
@@ -1,4 +1,3 @@
-///
describe('Item tag', () => {
beforeEach(() => {
cy.viewport(1920, 1080);
@@ -8,25 +7,27 @@ describe('Item tag', () => {
cy.waitForElement('[data-cy="itemTags"]');
});
+ const createNewTag = 'createNewTag';
+ const saveBtn = 'crudModelDefaultSaveBtn';
+ const newTag = 'tagundefined';
+
it('should throw an error adding an existent tag', () => {
- cy.get('.q-page-sticky > div').click();
- cy.selectOption(':nth-child(8) > .q-select', 'Tallos');
- cy.get(':nth-child(8) > [label="Value"]').type('1');
- cy.dataCy('crudModelDefaultSaveBtn').click();
+ cy.dataCy(createNewTag).click();
+ cy.dataCy(newTag).should('be.visible').click().type('Genero{enter}');
+ cy.dataCy('tagGeneroValue').eq(1).should('be.visible');
+ cy.dataCy(saveBtn).click();
cy.checkNotification("The tag or priority can't be repeated for an item");
});
it('should add a new tag', () => {
- cy.get('.q-page-sticky > div').click();
- cy.selectOption(':nth-child(8) > .q-select', 'Ancho de la base');
- cy.get(':nth-child(8) > [label="Value"]').type('50');
- cy.dataCy('crudModelDefaultSaveBtn').click();
+ cy.dataCy(createNewTag).click();
+ cy.dataCy(newTag).should('be.visible').click().type('Forma{enter}');
+ cy.dataCy('tagFormaValue').should('be.visible').type('50');
+ cy.dataCy(saveBtn).click();
+
cy.checkNotification('Data saved');
- cy.dataCy('itemTags')
- .children(':nth-child(8)')
- .find('.justify-center > .q-icon')
- .click();
- cy.dataCy('VnConfirm_confirm').click();
+ cy.dataCy('deleteTagForma').should('be.visible').click();
+ cy.dataCy('VnConfirm_confirm').should('be.visible').click();
cy.checkNotification('Data saved');
});
});