diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 3cce2a853..8a9b0c889 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -326,6 +326,7 @@ globals: ticketsMonitor: Tickets monitor clientsActionsMonitor: Clients and actions serial: Serial + business: Business medical: Mutual pit: IRPF wasteRecalc: Waste recaclulate @@ -509,6 +510,24 @@ department: hasToSendMail: Send check-ins by email departmentRemoved: Department removed worker: + pageTitles: + workers: Workers + list: List + basicData: Basic data + summary: Summary + notifications: Notifications + workerCreate: New worker + department: Department + pda: PDA + notes: Notas + dms: My documentation + pbx: Private Branch Exchange + log: Log + calendar: Calendar + timeControl: Time control + locker: Locker + balance: Balance + medical: Medical list: department: Department schedule: Schedule @@ -524,15 +543,24 @@ worker: role: Role sipExtension: Extension locker: Locker - fiDueDate: FI due date + fiDueDate: DNI expiration date sex: Sex - seniority: Seniority + seniority: Antiquity fi: DNI/NIE/NIF birth: Birth isFreelance: Freelance isSsDiscounted: SS Bonification hasMachineryAuthorized: Machinery authorized isDisable: Disable + business: Business + started: Started + ended: Ended + reasonEnd: Reason End + department: Departament + workerBusinessCategory: Worker Business Category + notes: Notes + workCenter: Center + professionalCategory: Professional Category notificationsManager: activeNotifications: Active notifications availableNotifications: Available notifications @@ -591,6 +619,23 @@ worker: sizeLimit: Size limit isOnReservationMode: Reservation mode machine: Machine + business: + tableVisibleColumns: + started: Start Date + ended: End Date + company: Company + reasonEnd: Reason for Termination + department: Department + professionalCategory: Professional Category + calendarType: Work Calendar + workCenter: Work Center + payrollCategories: Contract Category + occupationCode: Contribution Code + rate: Rate + businessType: Contract Type + amount: Salary + basicSalary: Transport Workers Salary + notes: Notes wagon: type: submit: Submit diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 897edd9fe..acfe181fe 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -326,6 +326,7 @@ globals: ticketsMonitor: Monitor de tickets clientsActionsMonitor: Clientes y acciones serial: Facturas por serie + business: Contratos medical: Mutua pit: IRPF wasteRecalc: Recalcular mermas @@ -481,6 +482,26 @@ department: hasToSendMail: Enviar fichadas por mail departmentRemoved: Departamento eliminado worker: + pageTitles: + workers: Trabajadores + list: Listado + basicData: Datos básicos + summary: Resumen + notifications: Notificaciones + workerCreate: Nuevo trabajador + department: Departamentos + pda: PDA + notes: Notas + dms: Mi documentación + pbx: Centralita + log: Historial + calendar: Calendario + timeControl: Control de horario + locker: Taquilla + balance: Balance + business: Contrato + formation: Formación + medical: Mutua list: department: Departamento schedule: Horario @@ -505,6 +526,15 @@ worker: isSsDiscounted: Bonificación SS hasMachineryAuthorized: Autorizado para maquinaria isDisable: Deshabilitado + business: Contrato + started: Antigüedad + ended: Fin + reasonEnd: Motivo finalización + department: Departamento + workerBusinessCategory: Categoria profesional + notes: Notas + workCenter: Centro + professionalCategory: Categoria profesional notificationsManager: activeNotifications: Notificaciones activas availableNotifications: Notificaciones disponibles @@ -551,6 +581,23 @@ worker: debit: Debe credit: Haber concept: Concepto + business: + tableVisibleColumns: + started: Fecha inicio + ended: Fecha fin + company: Empresa + reasonEnd: Motivo finalización + department: Departamento + professionalCategory: Categoria profesional + calendarType: Calendario laboral + workCenter: Centro + payrollCategories: Categoria contrato + occupationCode: Cotización + rate: Tarifa + businessType: Contrato + amount: Salario + basicSalary: Salario transportistas + notes: Notas operator: numberOfWagons: Número de vagones train: tren @@ -563,7 +610,6 @@ worker: sizeLimit: Tamaño límite isOnReservationMode: Modo de reserva machine: Máquina - wagon: type: submit: Guardar diff --git a/src/pages/Worker/Card/WorkerBusiness.vue b/src/pages/Worker/Card/WorkerBusiness.vue new file mode 100644 index 000000000..6025ae289 --- /dev/null +++ b/src/pages/Worker/Card/WorkerBusiness.vue @@ -0,0 +1,234 @@ + + + + +es: + Do you want to reactivate the user?: desea reactivar el usuario? + diff --git a/src/pages/Worker/Card/WorkerSummary.vue b/src/pages/Worker/Card/WorkerSummary.vue index bfb503f6b..98bdffe25 100644 --- a/src/pages/Worker/Card/WorkerSummary.vue +++ b/src/pages/Worker/Card/WorkerSummary.vue @@ -12,6 +12,7 @@ import RoleDescriptorProxy from 'src/pages/Account/Role/Card/RoleDescriptorProxy import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue'; import { useAdvancedSummary } from 'src/composables/useAdvancedSummary'; import WorkerDescriptorMenu from './WorkerDescriptorMenu.vue'; +import axios from 'axios'; const route = useRoute(); const { t } = useI18n(); @@ -27,6 +28,76 @@ const entityId = computed(() => $props.id || route.params.id); const basicDataUrl = ref(null); const advancedSummary = ref(); +const filter = { + include: [ + { + relation: 'user', + scope: { + fields: ['name', 'nickname', 'roleFk'], + + include: [ + { + relation: 'role', + scope: { + fields: ['name'], + }, + }, + { + relation: 'emailUser', + scope: { + fields: ['email'], + }, + }, + ], + }, + }, + { + relation: 'department', + scope: { + include: { + relation: 'department', + scope: { + fields: ['name'], + }, + }, + }, + }, + { + relation: 'boss', + }, + { + relation: 'client', + }, + { + relation: 'sip', + }, + { + relation: 'business', + scope: { + include: [ + { + relation: 'department', + scope: { + fields: ['id', 'name'], + }, + }, + { + relation: 'reasonEnd', + scope: { + fields: ['id', 'reason'], + }, + }, + { + relation: 'workerBusinessProfessionalCategory', + scope: { + fields: ['id', 'description'], + }, + }, + ], + }, + }, + ], +}; onBeforeMount(async () => { advancedSummary.value = await useAdvancedSummary('Workers', entityId.value); basicDataUrl.value = `#/worker/${entityId.value}/basic-data`; @@ -37,7 +108,7 @@ onBeforeMount(async () => { diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js index d8db7df0c..faaa23fc8 100644 --- a/src/router/modules/worker.js +++ b/src/router/modules/worker.js @@ -8,6 +8,7 @@ const workerCard = { meta: { menu: [ 'WorkerBasicData', + 'WorkerBusiness', 'WorkerNotes', 'WorkerPda', 'WorkerNotificationsManager', @@ -50,6 +51,15 @@ const workerCard = { }, component: () => import('src/pages/Worker/Card/WorkerBasicData.vue'), }, + { + path: 'business', + name: 'WorkerBusiness', + meta: { + title: 'business', + icon: 'handshake', + }, + component: () => import('src/pages/Worker/Card/WorkerBusiness.vue'), + }, { path: 'notes', name: 'NotesCard', diff --git a/test/cypress/integration/invoiceIn/invoiceInDescriptor.spec.js b/test/cypress/integration/invoiceIn/invoiceInDescriptor.spec.js index 4b5b993df..97a9fe976 100644 --- a/test/cypress/integration/invoiceIn/invoiceInDescriptor.spec.js +++ b/test/cypress/integration/invoiceIn/invoiceInDescriptor.spec.js @@ -1,7 +1,7 @@ describe('InvoiceInDescriptor', () => { - const dialogBtns = '.q-card__actions button'; - const firstDescritorOpt = '.q-menu > .q-list > :nth-child(1) > .q-item__section'; - const isBookedField = '.q-card:nth-child(3) .vn-label-value:nth-child(5) .q-checkbox'; + const book = '.summaryHeader > .no-wrap > .q-btn'; + const firstDescritorOpt = '.q-menu > .q-list > :nth-child(5) > .q-item__section'; + const checkbox = ':nth-child(5) > .q-checkbox'; it('should booking and unbooking the invoice properly', () => { cy.viewport(1280, 720); @@ -9,13 +9,13 @@ describe('InvoiceInDescriptor', () => { cy.visit('/#/invoice-in/1/summary'); cy.waitForElement('.q-page'); - cy.openActionsDescriptor(); - cy.get(firstDescritorOpt).click(); - cy.get(dialogBtns).eq(1).click(); - cy.get(isBookedField).should('have.attr', 'aria-checked', 'true'); + cy.get(book).click(); + cy.dataCy('VnConfirm_confirm').click(); + cy.get(checkbox).invoke('attr', 'aria-checked').should('eq', 'true'); + cy.dataCy('descriptor-more-opts').first().click(); cy.get(firstDescritorOpt).click(); - cy.get(dialogBtns).eq(1).click(); - cy.get(isBookedField).should('have.attr', 'aria-checked', 'false'); + cy.dataCy('VnConfirm_confirm').click(); + cy.get(checkbox).invoke('attr', 'aria-checked').should('eq', 'false'); }); });