diff --git a/src/pages/ItemType/ItemTypeSearchbar.vue b/src/pages/Item/ItemType/ItemTypeSearchbar.vue
similarity index 94%
rename from src/pages/ItemType/ItemTypeSearchbar.vue
rename to src/pages/Item/ItemType/ItemTypeSearchbar.vue
index 749033d43..87903a517 100644
--- a/src/pages/ItemType/ItemTypeSearchbar.vue
+++ b/src/pages/Item/ItemType/ItemTypeSearchbar.vue
@@ -10,6 +10,7 @@ const { t } = useI18n();
url="ItemTypes"
:label="t('Search item type')"
:info="t('Search itemType by id, name or code')"
+ search-url="table"
/>
diff --git a/src/pages/ItemType/locale/en.yml b/src/pages/Item/ItemType/locale/en.yml
similarity index 100%
rename from src/pages/ItemType/locale/en.yml
rename to src/pages/Item/ItemType/locale/en.yml
diff --git a/src/pages/ItemType/locale/es.yml b/src/pages/Item/ItemType/locale/es.yml
similarity index 100%
rename from src/pages/ItemType/locale/es.yml
rename to src/pages/Item/ItemType/locale/es.yml
diff --git a/src/pages/Item/ItemTypeCreate.vue b/src/pages/Item/ItemTypeCreate.vue
deleted file mode 100644
index 60c037510..000000000
--- a/src/pages/Item/ItemTypeCreate.vue
+++ /dev/null
@@ -1,98 +0,0 @@
-
-
-
- (categoriesOptions = data)"
- :filter="{ order: 'name ASC', fields: ['id', 'name'] }"
- auto-load
- />
- (temperaturesOptions = data)"
- :filter="{ order: 'name ASC', fields: ['code', 'name'] }"
- auto-load
- />
-
-
-
-
-
-
-
-
-
-
-
-
- {{ scope.opt?.name }}
- {{ scope.opt?.nickname }},
- {{ scope.opt?.code }}
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/pages/Item/ItemTypeList.vue b/src/pages/Item/ItemTypeList.vue
index 13dd56a42..149de482d 100644
--- a/src/pages/Item/ItemTypeList.vue
+++ b/src/pages/Item/ItemTypeList.vue
@@ -1,13 +1,16 @@
diff --git a/src/pages/Parking/ParkingList.vue b/src/pages/Parking/ParkingList.vue
index b6f4e8146..109613383 100644
--- a/src/pages/Parking/ParkingList.vue
+++ b/src/pages/Parking/ParkingList.vue
@@ -22,7 +22,6 @@ onUnmounted(() => (stateStore.rightDrawer = false));
const filter = {
fields: ['id', 'sectorFk', 'code', 'pickingOrder'],
- include: [{ relation: 'sector', scope: { fields: ['id', 'description'] } }],
};
function exprBuilder(param, value) {
@@ -55,10 +54,9 @@ function exprBuilder(param, value) {
diff --git a/src/pages/Ticket/Card/TicketDescriptorMenu.vue b/src/pages/Ticket/Card/TicketDescriptorMenu.vue
index 834fced87..bf4a1efb4 100644
--- a/src/pages/Ticket/Card/TicketDescriptorMenu.vue
+++ b/src/pages/Ticket/Card/TicketDescriptorMenu.vue
@@ -348,7 +348,6 @@ async function hasDocuware() {
}
async function uploadDocuware(force) {
- console.log('force: ', force);
if (!force)
return quasar
.dialog({
diff --git a/src/pages/Ticket/Card/TicketExpedition.vue b/src/pages/Ticket/Card/TicketExpedition.vue
index 8041ad069..d682d0408 100644
--- a/src/pages/Ticket/Card/TicketExpedition.vue
+++ b/src/pages/Ticket/Card/TicketExpedition.vue
@@ -211,6 +211,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
-import { ref } from 'vue';
+import { ref, onBeforeMount } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import VnInputDate from 'src/components/common/VnInputDate.vue';
@@ -8,32 +8,22 @@ import FormModel from 'src/components/FormModel.vue';
import VnRow from 'components/ui/VnRow.vue';
import VnInput from 'src/components/common/VnInput.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
+import { useAdvancedSummary } from 'src/composables/useAdvancedSummary';
-const route = useRoute();
const { t } = useI18n();
-
const educationLevels = ref([]);
const countries = ref([]);
const maritalStatus = [
{ code: 'M', name: t('Married') },
{ code: 'S', name: t('Single') },
];
+const advancedSummary = ref({});
-const workerFilter = {
- include: [
- {
- relation: 'user',
- scope: {
- fields: ['name', 'emailVerified'],
- include: { relation: 'emailUser', scope: { fields: ['email'] } },
- },
- },
- { relation: 'sip', scope: { fields: ['extension', 'secret'] } },
- { relation: 'department', scope: { include: { relation: 'department' } } },
- ],
-};
+onBeforeMount(async () => {
+ advancedSummary.value =
+ (await useAdvancedSummary('Workers', +useRoute().params.id)) ?? {};
+});
-
{
+ Object.assign(data, advancedSummary);
+ }
+ "
>
@@ -134,7 +130,7 @@ const workerFilter = {
-
+
useRoute().params.id);
const filter = computed(() => ({
where: {
- gender: store.data?.sex,
+ gender: store.data?.[0]?.sex,
or: [{ workerFk: null }, { workerFk: entityId.value }],
},
}));
@@ -51,6 +51,7 @@ const init = async (data) => {
>
$props.id || route.params.id);
const basicDataUrl = ref(null);
-const isHr = computed(() => useRole().hasAny(['hr']));
const advancedSummary = ref();
onBeforeMount(async () => {
- if (isHr.value) {
- advancedSummary.value = (
- await axios.get('Workers/advancedSummary', {
- params: { filter: { where: { id: entityId.value } } },
- })
- ).data[0];
- basicDataUrl.value = `#/worker/${entityId.value}/basic-data`;
- }
+ advancedSummary.value = await useAdvancedSummary('Workers', entityId.value);
+ basicDataUrl.value = `#/worker/${entityId.value}/basic-data`;
});
@@ -101,21 +93,27 @@ onBeforeMount(async () => {
:label="t('worker.summary.seniority')"
:value="toDate(worker.seniority)"
/>
-
-
+
+
+
-
diff --git a/src/router/modules/item.js b/src/router/modules/item.js
index 2838c3be7..0f810434c 100644
--- a/src/router/modules/item.js
+++ b/src/router/modules/item.js
@@ -97,14 +97,6 @@ export default {
},
component: () => import('src/pages/Item/ItemTypeList.vue'),
},
- {
- path: 'item-type-list/create',
- name: 'ItemTypeCreate',
- meta: {
- title: 'itemTypeCreate',
- },
- component: () => import('src/pages/Item/ItemTypeCreate.vue'),
- },
],
},
{
diff --git a/src/router/modules/itemType.js b/src/router/modules/itemType.js
index 0fd3797e6..1ceecd4cc 100644
--- a/src/router/modules/itemType.js
+++ b/src/router/modules/itemType.js
@@ -18,7 +18,7 @@ export default {
{
name: 'ItemTypeCard',
path: ':id',
- component: () => import('src/pages/ItemType/Card/ItemTypeCard.vue'),
+ component: () => import('src/pages/Item/ItemType/Card/ItemTypeCard.vue'),
redirect: { name: 'ItemTypeSummary' },
children: [
{
@@ -28,7 +28,7 @@ export default {
title: 'summary',
},
component: () =>
- import('src/pages/ItemType/Card/ItemTypeSummary.vue'),
+ import('src/pages/Item/ItemType/Card/ItemTypeSummary.vue'),
},
{
name: 'ItemTypeBasicData',
@@ -38,7 +38,7 @@ export default {
icon: 'vn:settings',
},
component: () =>
- import('src/pages/ItemType/Card/ItemTypeBasicData.vue'),
+ import('src/pages/Item/ItemType/Card/ItemTypeBasicData.vue'),
},
{
path: 'log',
@@ -47,7 +47,8 @@ export default {
title: 'log',
icon: 'vn:History',
},
- component: () => import('src/pages/ItemType/Card/ItemTypeLog.vue'),
+ component: () =>
+ import('src/pages/Item/ItemType/Card/ItemTypeLog.vue'),
},
],
},
diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js
index c2a9e668f..d1feff23d 100644
--- a/src/router/modules/worker.js
+++ b/src/router/modules/worker.js
@@ -87,6 +87,13 @@ export default {
meta: {
title: 'basicData',
icon: 'vn:settings',
+ acls: [
+ {
+ model: 'Worker',
+ props: 'updateAttributes',
+ accessType: 'WRITE',
+ },
+ ],
},
component: () => import('src/pages/Worker/Card/WorkerBasicData.vue'),
},
diff --git a/test/cypress/integration/parking/parkingList.spec.js b/test/cypress/integration/parking/parkingList.spec.js
index b78a660d1..f1efaa375 100644
--- a/test/cypress/integration/parking/parkingList.spec.js
+++ b/test/cypress/integration/parking/parkingList.spec.js
@@ -1,5 +1,6 @@
///
describe('ParkingList', () => {
+ const searchbar = '#searchbar input';
const firstCard = '.q-card:nth-child(1)';
const firstChipId =
':nth-child(1) > :nth-child(1) > .justify-between > .flex > .q-chip > .q-chip__content';
@@ -14,6 +15,7 @@ describe('ParkingList', () => {
});
it('should redirect on clicking a parking', () => {
+ cy.get(searchbar).type('{enter}');
cy.get(firstChipId)
.invoke('text')
.then((content) => {
@@ -24,6 +26,7 @@ describe('ParkingList', () => {
});
it('should open the details', () => {
+ cy.get(searchbar).type('{enter}');
cy.get(firstDetailBtn).click();
cy.get(summaryHeader).contains('Basic data');
});
diff --git a/test/cypress/integration/ticket/ticketExpedition.spec.js b/test/cypress/integration/ticket/ticketExpedition.spec.js
index 5eb2c1a2a..d4afd401f 100644
--- a/test/cypress/integration/ticket/ticketExpedition.spec.js
+++ b/test/cypress/integration/ticket/ticketExpedition.spec.js
@@ -11,15 +11,13 @@ describe('Ticket expedtion', () => {
it('should change the state', () => {
cy.visit('#/ticket/1/expedition');
- cy.intercept('GET', /\/api\/Expeditions\/filter/).as('expeditions');
- cy.intercept('POST', /\/api\/Expeditions\/crud/).as('crud');
-
- cy.wait('@expeditions');
+ cy.intercept('GET', /\/api\/Expeditions\/filter/).as('show');
+ cy.intercept('POST', /\/api\/ExpeditionStates\/addExpeditionState/).as('add');
+ cy.wait('@show');
cy.selectRows([1, 2]);
- cy.get('#subToolbar [aria-controls]:nth-child(1)').click();
- cy.get('.q-menu .q-item').contains('Perdida').click();
- cy.wait('@crud');
+ cy.selectOption('[data-cy="change-state"]', 'Perdida');
+ cy.wait('@add');
cy.get(`${tableContent} tr:nth-child(-n+2) ${stateTd}`).each(($el) => {
cy.wrap($el).contains('Perdida');
diff --git a/test/cypress/integration/worker/workerList.spec.js b/test/cypress/integration/worker/workerList.spec.js
index 8a8bea443..c1c37fd32 100644
--- a/test/cypress/integration/worker/workerList.spec.js
+++ b/test/cypress/integration/worker/workerList.spec.js
@@ -11,7 +11,7 @@ describe('WorkerList', () => {
it('should open the worker summary', () => {
cy.get(inputName).type('jessica{enter}');
cy.get(searchBtn).click();
- cy.intercept('GET', /\/api\/Workers\/\d+/).as('worker');
+ cy.intercept('GET', /\/api\/Workers\/summary+/).as('worker');
cy.wait('@worker').then(() =>
cy.get(descriptorTitle).should('include.text', 'Jessica')
);
diff --git a/test/cypress/integration/worker/workerLocker.spec.js b/test/cypress/integration/worker/workerLocker.spec.js
index 8a169dfb2..c222414fd 100644
--- a/test/cypress/integration/worker/workerLocker.spec.js
+++ b/test/cypress/integration/worker/workerLocker.spec.js
@@ -1,8 +1,7 @@
describe('WorkerLocker', () => {
const productionId = 49;
- const lockerCode = '2F';
- const input = '.q-card input';
- const thirdOpt = '[role="listbox"] .q-item:nth-child(1)';
+ const lockerCode = '4F';
+ const lockerSelect = '[data-cy="locker"]';
beforeEach(() => {
cy.viewport(1280, 720);
cy.login('productionBoss');
@@ -10,10 +9,8 @@ describe('WorkerLocker', () => {
});
it('should allocates a locker', () => {
- cy.get(input).click();
- cy.waitForElement('[role="listbox"]');
- cy.get(thirdOpt).click();
+ cy.selectOption(lockerSelect, lockerCode);
cy.saveCard();
- cy.get(input).invoke('val').should('eq', lockerCode);
+ cy.get(lockerSelect).invoke('val').should('eq', lockerCode);
});
});
diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js
index c9b1a748e..76bdefd27 100755
--- a/test/cypress/support/commands.js
+++ b/test/cypress/support/commands.js
@@ -82,7 +82,7 @@ Cypress.Commands.add('getValue', (selector) => {
// Fill Inputs
Cypress.Commands.add('selectOption', (selector, option) => {
cy.waitForElement(selector);
- cy.get(selector).find('.q-select__dropdown-icon').click();
+ cy.get(selector).click();
cy.get('.q-menu .q-item').contains(option).click();
});