@@ -66,23 +60,19 @@ const warehouses = ref([]);
-
-
-
-
-
+
diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue
index ad97e75c1..fe9667bea 100644
--- a/src/pages/Ticket/TicketList.vue
+++ b/src/pages/Ticket/TicketList.vue
@@ -95,6 +95,7 @@ const columns = computed(() => [
columnField: {
component: null,
},
+ columnClass: 'expand',
format: (row, dashIfEmpty) => dashIfEmpty(row.salesPerson),
},
{
@@ -153,11 +154,6 @@ const columns = computed(() => [
},
columnClass: 'expand',
},
- {
- align: 'left',
- name: 'refFk',
- label: t('ticketList.ref'),
- },
{
align: 'left',
name: 'zoneFk',
@@ -191,6 +187,12 @@ const columns = computed(() => [
},
format: (row) => toCurrency(row.totalWithVat),
},
+ {
+ align: 'left',
+ name: 'packing',
+ label: t('ticketSale.packaging'),
+ format: (row, dashIfEmpty) => dashIfEmpty(row.packing),
+ },
{
align: 'right',
name: 'tableActions',
@@ -548,7 +550,7 @@ function setReference(data) {
- {{ row.salesPerson }}
+ {{ dashIfEmpty(row.salesPerson) }}
@@ -577,16 +579,16 @@ function setReference(data) {
{{ row.state }}
+
+
+ {{ row.refFk }}
+
+
+
{{ row.state }}
-
-
- {{ dashIfEmpty(row.refFk) }}
-
-
-
{{ dashIfEmpty(row.zoneName) }}
diff --git a/src/pages/Worker/Card/WorkerCalendarFilter.vue b/src/pages/Worker/Card/WorkerCalendarFilter.vue
index 2b81b6eaf..67b7df907 100644
--- a/src/pages/Worker/Card/WorkerCalendarFilter.vue
+++ b/src/pages/Worker/Card/WorkerCalendarFilter.vue
@@ -3,9 +3,11 @@ import WorkerEventLabel from 'pages/Worker/Card/WorkerEventLabel.vue';
import FetchData from 'components/FetchData.vue';
import { useI18n } from 'vue-i18n';
import VnSelect from 'components/common/VnSelect.vue';
+import useNotify from 'src/composables/useNotify';
import { useRoute } from 'vue-router';
-import { computed, ref } from 'vue';
+import { computed, ref, watch } from 'vue';
import { toDateFormat } from '../../../filters/date';
+const { notify } = useNotify();
const { t } = useI18n();
const route = useRoute();
@@ -33,6 +35,13 @@ const props = defineProps({
},
});
+watch(
+ () => props.contractHolidays,
+ (newValue) => {
+ checkHolidays(newValue);
+ },
+ { deep: true, immediate: true }
+);
const emit = defineEmits(['update:businessFk', 'update:year', 'update:absenceType']);
const selectedBusinessFk = computed({
@@ -53,12 +62,22 @@ const selectedAbsenceType = computed({
},
});
-const generateYears = () => {
+function generateYears() {
const now = Date.vnNew();
const maxYear = now.getFullYear() + 1;
return Array.from({ length: 5 }, (_, i) => String(maxYear - i)) || [];
-};
+}
+
+function checkHolidays(contractHolidays) {
+ if (!contractHolidays) return;
+ if (
+ contractHolidays.holidaysEnjoyed > contractHolidays.totalHolidays ||
+ contractHolidays.hoursEnjoyed > contractHolidays.totalHours
+ ) {
+ notify(t('Vacation days have been exceeded'), 'negative');
+ }
+}
const absenceTypeList = ref([]);
const contractList = ref([]);
diff --git a/src/pages/Worker/Card/WorkerOperator.vue b/src/pages/Worker/Card/WorkerOperator.vue
new file mode 100644
index 000000000..cdacc72c0
--- /dev/null
+++ b/src/pages/Worker/Card/WorkerOperator.vue
@@ -0,0 +1,204 @@
+
+
+
+
+ (trainsData = data)" auto-load />
+ (itemPackingTypesData = data)"
+ auto-load
+ />
+ (warehousesData = data)"
+ auto-load
+ />
+ (PrintersData = data)" auto-load />
+ (sectorsData = data)" auto-load />
+ (machinesData = data)" auto-load />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ID: {{ scope.opt?.id }}
+
+ {{ scope.opt?.id }},
+ {{ scope.opt?.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+es:
+ Model: Modelo
+ Serial number: Número de serie
+ Current SIM: SIM actual
+ Add new device: Añadir nuevo dispositivo
+ PDA deallocated: PDA desasignada
+ Remove PDA: Eliminar PDA
+ Do you want to remove this PDA?: ¿Desea eliminar este PDA?
+ You can only have one PDA: Solo puedes tener un PDA si no eres autonomo
+ This PDA is already assigned to another user: Este PDA ya está asignado a otro usuario
+
diff --git a/src/pages/Worker/WorkerList.vue b/src/pages/Worker/WorkerList.vue
index 9795cbed0..7a3f760bc 100644
--- a/src/pages/Worker/WorkerList.vue
+++ b/src/pages/Worker/WorkerList.vue
@@ -29,6 +29,7 @@ const postcodesOptions = ref([]);
const user = useState().getUser();
const defaultPayMethod = ref();
+const bankEntitiesRef = ref();
const columns = computed(() => [
{
align: 'left',
@@ -118,6 +119,12 @@ onBeforeMount(async () => {
).data?.payMethodFk;
});
+async function handleNewBankEntity(data, resp) {
+ await bankEntitiesRef.value.fetch();
+ data.bankEntityFk = resp.id;
+ bankEntitiesOptions.value.push(resp);
+}
+
function handleLocation(data, location) {
const { town, code, provinceFk, countryFk } = location ?? {};
data.postcode = code;
@@ -177,6 +184,7 @@ async function autofillBic(worker) {
auto-load
/>
(bankEntitiesOptions = data)"
auto-load
@@ -344,7 +352,9 @@ async function autofillBic(worker) {
>
bankEntitiesOptions.push(data)"
+ @on-data-saved="
+ (_, resp) => handleNewBankEntity(data, resp)
+ "
/>
diff --git a/src/pages/Zone/ZoneDeliveryPanel.vue b/src/pages/Zone/ZoneDeliveryPanel.vue
index 088811b01..423095d6e 100644
--- a/src/pages/Zone/ZoneDeliveryPanel.vue
+++ b/src/pages/Zone/ZoneDeliveryPanel.vue
@@ -94,9 +94,9 @@ watch(
url="Postcodes/location"
:fields="['geoFk', 'code', 'townFk', 'countryFk']"
sort-by="code, townFk"
- option-value="code"
+ option-value="geoFk"
option-label="code"
- option-filter="code"
+ :filter-options="['code', 'geoFk']"
hide-selected
dense
outlined
diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js
index 7258881be..c2a9e668f 100644
--- a/src/router/modules/worker.js
+++ b/src/router/modules/worker.js
@@ -27,6 +27,7 @@ export default {
'WorkerBalance',
'WorkerFormation',
'WorkerMedical',
+ 'WorkerOperator',
],
},
children: [
@@ -208,6 +209,15 @@ export default {
},
component: () => import('src/pages/Worker/Card/WorkerMedical.vue'),
},
+ {
+ name: 'WorkerOperator',
+ path: 'operator',
+ meta: {
+ title: 'operator',
+ icon: 'person',
+ },
+ component: () => import('src/pages/Worker/Card/WorkerOperator.vue'),
+ },
],
},
],
diff --git a/test/cypress/integration/claim/claimDevelopment.spec.js b/test/cypress/integration/claim/claimDevelopment.spec.js
index 81fc33ecd..eb39f340a 100755
--- a/test/cypress/integration/claim/claimDevelopment.spec.js
+++ b/test/cypress/integration/claim/claimDevelopment.spec.js
@@ -33,7 +33,8 @@ describe('ClaimDevelopment', () => {
cy.saveCard();
});
- it('should add and remove new line', () => {
+ // TODO: #8112
+ xit('should add and remove new line', () => {
cy.wait(['@workers', '@workers']);
cy.addCard();
diff --git a/test/cypress/integration/claim/claimNotes.spec.js b/test/cypress/integration/claim/claimNotes.spec.js
index a4a493cda..d7a918db1 100644
--- a/test/cypress/integration/claim/claimNotes.spec.js
+++ b/test/cypress/integration/claim/claimNotes.spec.js
@@ -1,4 +1,6 @@
describe('ClaimNotes', () => {
+ const saveBtn = '.q-field__append > .q-btn > .q-btn__content > .q-icon';
+ const firstNote = '.q-infinite-scroll :nth-child(1) > .q-card__section--vert';
beforeEach(() => {
cy.login('developer');
cy.visit(`/#/claim/${2}/notes`);
@@ -7,7 +9,7 @@ describe('ClaimNotes', () => {
it('should add a new note', () => {
const message = 'This is a new message.';
cy.get('.q-textarea').type(message);
- cy.get('.q-field__append > .q-btn > .q-btn__content > .q-icon').click(); //save
- cy.get(':nth-child(1) > .q-card__section--vert').should('have.text', message);
+ cy.get(saveBtn).click();
+ cy.get(firstNote).should('have.text', message);
});
});
diff --git a/test/cypress/integration/entry/myEntry.spec.js b/test/cypress/integration/entry/myEntry.spec.js
index dca74dec2..4addec1c4 100644
--- a/test/cypress/integration/entry/myEntry.spec.js
+++ b/test/cypress/integration/entry/myEntry.spec.js
@@ -11,7 +11,7 @@ describe('EntryMy when is supplier', () => {
it('should open buyLabel when is supplier', () => {
cy.get(
- '[to="/null/2"] > .q-card > .column > .q-btn > .q-btn__content > .q-icon'
+ '[to="/null/3"] > .q-card > .column > .q-btn > .q-btn__content > .q-icon'
).click();
cy.get('.q-card__actions > .q-btn').click();
cy.window().its('open').should('be.called');
diff --git a/test/cypress/integration/ticket/ticketDescriptor.spec.js b/test/cypress/integration/ticket/ticketDescriptor.spec.js
index cc3a1d65a..0ba2723a2 100644
--- a/test/cypress/integration/ticket/ticketDescriptor.spec.js
+++ b/test/cypress/integration/ticket/ticketDescriptor.spec.js
@@ -1,7 +1,8 @@
///
describe('Ticket descriptor', () => {
- const toCloneOpt = '[role="menu"] .q-list > :nth-child(8)';
- const setWeightOpt = '[role="menu"] .q-list > :nth-child(13)';
+ const listItem = '[role="menu"] .q-list .q-item';
+ const toCloneOpt = 'To clone ticket';
+ const setWeightOpt = 'Set weight';
const warehouseValue = ':nth-child(1) > :nth-child(6) > .value > span';
const summaryHeader = '.summaryHeader > div';
const weight = 25;
@@ -14,7 +15,7 @@ describe('Ticket descriptor', () => {
it('should clone the ticket without warehouse', () => {
cy.visit('/#/ticket/1/summary');
cy.openActionsDescriptor();
- cy.get(toCloneOpt).click();
+ cy.contains(listItem, toCloneOpt).click();
cy.clickConfirm();
cy.get(warehouseValue).contains('Warehouse One');
cy.get(summaryHeader)
@@ -28,7 +29,7 @@ describe('Ticket descriptor', () => {
it('should set the weight of the ticket', () => {
cy.visit('/#/ticket/10/summary');
cy.openActionsDescriptor();
- cy.get(setWeightOpt).click();
+ cy.contains(listItem, setWeightOpt).click();
cy.intercept('POST', /\/api\/Tickets\/\d+\/setWeight/).as('weight');
cy.get('.q-dialog input').type(weight);
cy.clickConfirm();
diff --git a/test/cypress/integration/vnComponent/vnLocation.spec.js b/test/cypress/integration/vnComponent/vnLocation.spec.js
index 78dc38899..c1b0cf929 100644
--- a/test/cypress/integration/vnComponent/vnLocation.spec.js
+++ b/test/cypress/integration/vnComponent/vnLocation.spec.js
@@ -64,7 +64,7 @@ describe('VnLocation', () => {
`${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix} > :nth-child(3) > .q-icon`
).click();
cy.get(
- `#q-portal--dialog--4 > .q-dialog > ${createForm.prefix} > .vn-row > .q-select > ${createForm.sufix} > :nth-child(1) input`
+ `#q-portal--dialog--5 > .q-dialog > ${createForm.prefix} > .vn-row > .q-select > ${createForm.sufix} > :nth-child(1) input`
).should('have.value', province);
});
});
@@ -133,6 +133,8 @@ describe('VnLocation', () => {
);
cy.get('.q-mt-lg > .q-btn--standard').click();
cy.get(`${createForm.prefix}`).should('not.exist');
+ cy.waitForElement('.q-form');
+
checkVnLocation(postCode, province);
});
it('Create city', () => {
@@ -144,10 +146,12 @@ describe('VnLocation', () => {
cy.get(
`${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix} > :nth-child(2) > .q-icon`
).click();
- cy.selectOption('#q-portal--dialog--2 .q-select', 'one');
- cy.get('#q-portal--dialog--2 .q-input').type(province);
- cy.get('#q-portal--dialog--2 .q-btn--standard').click();
+ cy.selectOption('#q-portal--dialog--3 .q-select', 'one');
+ cy.get('#q-portal--dialog--3 .q-input').type(province);
+ cy.get('#q-portal--dialog--3 .q-btn--standard').click();
cy.get('#q-portal--dialog--1 .q-btn--standard').click();
+ cy.waitForElement('.q-form');
+
checkVnLocation(postCode, province);
});