await cardDescriptorRef.value.getData();
+
+
+
+ {{ t('Go to client') }}
+
+
+ {{ t('Go to user') }}
+
+
+
diff --git a/src/pages/Worker/Card/WorkerTimeControl.vue b/src/pages/Worker/Card/WorkerTimeControl.vue
index 00e1147d1..7bce5983c 100644
--- a/src/pages/Worker/Card/WorkerTimeControl.vue
+++ b/src/pages/Worker/Card/WorkerTimeControl.vue
@@ -410,7 +410,7 @@ const resendEmail = async () => {
workerId: Number(route.params.id),
state: 'SENDED',
};
- await axios.post('WorkerTimeControls/weekly-hour-hecord-email', params);
+ await axios.post('WorkerTimeControls/weekly-hour-record-email', params);
await getMailStates(selectedDate.value);
notify(t('Email sended'), 'positive');
} catch (err) {
diff --git a/src/pages/Worker/Card/WorkerTimeControlCalendar.vue b/src/pages/Worker/Card/WorkerTimeControlCalendar.vue
index 20d02ca78..2717a71f4 100644
--- a/src/pages/Worker/Card/WorkerTimeControlCalendar.vue
+++ b/src/pages/Worker/Card/WorkerTimeControlCalendar.vue
@@ -4,7 +4,6 @@ import { useI18n } from 'vue-i18n';
import { QCalendarMonth } from '@quasar/quasar-ui-qcalendar/src/index.js';
import QCalendarMonthWrapper from 'src/components/ui/QCalendarMonthWrapper.vue';
-
const $props = defineProps({
modelValue: {
type: String,
@@ -139,7 +138,9 @@ const paintWorkWeeks = async () => {
show-work-weeks
:weekdays="[1, 2, 3, 4, 5, 6, 0]"
:selected-dates="selectedDates"
+ :min-weekday-label="1"
:locale="locale"
+ animated
mini-mode
enable-outside-days
class="q-py-sm"
diff --git a/src/pages/Worker/Card/WorkerTimeForm.vue b/src/pages/Worker/Card/WorkerTimeForm.vue
index 0a58a04ca..3250e3180 100644
--- a/src/pages/Worker/Card/WorkerTimeForm.vue
+++ b/src/pages/Worker/Card/WorkerTimeForm.vue
@@ -5,7 +5,7 @@ import { useRoute } from 'vue-router';
import VnSelect from 'src/components/common/VnSelect.vue';
import FormModelPopup from 'components/FormModelPopup.vue';
-import VnInputTime from 'components/common/VnInputTime.vue';
+import VnInputTime from 'src/components/common/VnInputTime.vue';
const $props = defineProps({
entryId: {
@@ -37,8 +37,8 @@ const entryDirections = [
const closeButton = ref(null);
-const onDataSaved = () => {
- emit('onDataSaved');
+const onDataSaved = (dataSaved) => {
+ emit('onDataSaved', dataSaved);
closeForm();
};
@@ -73,7 +73,7 @@ onBeforeMount(() => {
:default-actions="false"
:title="title"
:url-create="urlCreate"
- @on-data-saved="onDataSaved()"
+ @on-data-saved="onDataSaved"
>
{
option-value="code"
option-label="description"
hide-selected
- :required="true"
/>
diff --git a/src/pages/Worker/WorkerList.vue b/src/pages/Worker/WorkerList.vue
index 8057e3e7c..0c2656597 100644
--- a/src/pages/Worker/WorkerList.vue
+++ b/src/pages/Worker/WorkerList.vue
@@ -1,86 +1,297 @@
-
-
-
-
-
-
-
-
-
- (companiesOptions = data)"
+ auto-load
+ />
+ (workersOptions = data)"
+ auto-load
+ />
+ (payMethodsOptions = data)"
+ auto-load
+ />
+ (bankEntitiesOptions = data)"
+ auto-load
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+ {{ scope.opt.name }}
+ {{ scope.opt.nickname }},
+ {{ scope.opt.code }}
+
+
+
+
+
+
+
+
+
+
+
+
+ handleLocation(data, location)"
+ :disable="data.isFreelance"
+ >
+
+
+
+
+
+
+ !val && delete data.payMethodFk"
+ />
+
+
+
+ {{ t('components.iban_tooltip') }}
+
+
+
+
+
+
+
+ bankEntitiesOptions.push(data)"
/>
-
-
-
+
+
+
+ {{ scope.opt.bic }}
+ {{ scope.opt.name }}
+
+
-
-
-
-
-
-
-
- {{ t('worker.list.newWorker') }}
-
-
-
+
+
+
+
+
diff --git a/src/pages/Worker/locale/en.yml b/src/pages/Worker/locale/en.yml
index f947b30e7..96df37919 100644
--- a/src/pages/Worker/locale/en.yml
+++ b/src/pages/Worker/locale/en.yml
@@ -1 +1,6 @@
passwordRequirements: 'The password must have at least { length } length characters, {nAlpha} alphabetic characters, {nUpper} capital letters, {nDigits} digits and {nPunct} symbols (Ex: $%&.)\n'
+tableColumns:
+ id: ID
+ name: Name
+ department: Department
+ email: Email
diff --git a/src/pages/Worker/locale/es.yml b/src/pages/Worker/locale/es.yml
index d2478535a..41812345f 100644
--- a/src/pages/Worker/locale/es.yml
+++ b/src/pages/Worker/locale/es.yml
@@ -4,3 +4,8 @@ Locker: Taquilla
Internal: Interno
External: Externo
passwordRequirements: 'La contraseña debe tener al menos { length } caracteres de longitud, {nAlpha} caracteres alfabéticos, {nUpper} letras mayúsculas, {nDigits} dígitos y {nPunct} símbolos (Ej: $%&.)'
+tableColumns:
+ id: ID
+ name: Nombre
+ department: Departamento
+ email: Email
diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js
index 3fc71c2a3..fc0bf6afe 100644
--- a/src/router/modules/worker.js
+++ b/src/router/modules/worker.js
@@ -104,6 +104,25 @@ export default {
},
],
},
+ {
+ name: 'WorkerTimeControl',
+ path: 'time-control',
+ meta: {
+ title: 'timeControl',
+ icon: 'access_time',
+ },
+ component: () =>
+ import('src/pages/Worker/Card/WorkerTimeControl.vue'),
+ },
+ {
+ name: 'WorkerCalendar',
+ path: 'calendar',
+ meta: {
+ title: 'calendar',
+ icon: 'calendar_today',
+ },
+ component: () => import('src/pages/Worker/Card/WorkerCalendar.vue'),
+ },
{
name: 'WorkerPda',
path: 'pda',
@@ -150,25 +169,6 @@ export default {
},
component: () => import('src/pages/Worker/Card/WorkerLog.vue'),
},
- {
- name: 'WorkerCalendar',
- path: 'calendar',
- meta: {
- title: 'calendar',
- icon: 'calendar_today',
- },
- component: () => import('src/pages/Worker/Card/WorkerCalendar.vue'),
- },
- {
- name: 'WorkerTimeControl',
- path: 'time-control',
- meta: {
- title: 'timeControl',
- icon: 'access_time',
- },
- component: () =>
- import('src/pages/Worker/Card/WorkerTimeControl.vue'),
- },
{
name: 'WorkerLocker',
path: 'locker',
diff --git a/test/cypress/integration/worker/workerCreate.spec.js b/test/cypress/integration/worker/workerCreate.spec.js
index b73297b73..c1832ad67 100644
--- a/test/cypress/integration/worker/workerCreate.spec.js
+++ b/test/cypress/integration/worker/workerCreate.spec.js
@@ -1,5 +1,5 @@
describe('WorkerCreate', () => {
- const externalRadio = '.q-toolbar .q-radio:nth-child(2)';
+ const externalRadio = '.q-radio:nth-child(2)';
const notification = '.q-notification__message';
const developerBossId = 120;
@@ -9,6 +9,7 @@ describe('WorkerCreate', () => {
Name: { val: 'Manolo' },
'Last name': { val: 'Hurtado' },
'Personal email': { val: 'manolo@mydomain.com' },
+ Company: { val: 'VNL', type: 'select' },
Street: { val: 'S/ DEFAULTWORKERSTREET' },
Location: { val: 1, type: 'select' },
Phone: { val: '123456789' },
@@ -29,16 +30,14 @@ describe('WorkerCreate', () => {
beforeEach(() => {
cy.viewport(1280, 720);
cy.login('hr');
- cy.visit('/#/worker/create');
+ cy.visit('/#/worker/list');
+ cy.get('.q-page-sticky > div > .q-btn').click();
});
it('should throw an error if a pay method has not been selected', () => {
cy.fillInForm(internal);
- cy.saveCard();
- cy.get(notification).should(
- 'contains.text',
- 'That payment method requires an IBAN'
- );
+ cy.get('.q-mt-lg > .q-btn--standard').click();
+ cy.get(notification).should('contains.text', 'Payment method is required');
});
it('should create an internal', () => {
@@ -46,14 +45,14 @@ describe('WorkerCreate', () => {
...internal,
'Pay method': { val: 'PayMethod one', type: 'select' },
});
- cy.saveCard();
+ cy.get('.q-mt-lg > .q-btn--standard').click();
cy.get(notification).should('contains.text', 'Data created');
});
it('should create an external', () => {
cy.get(externalRadio).click();
cy.fillInForm(external);
- cy.saveCard();
+ cy.get('.q-mt-lg > .q-btn--standard').click();
cy.get(notification).should('contains.text', 'Data created');
});
});
diff --git a/test/cypress/integration/worker/workerList.spec.js b/test/cypress/integration/worker/workerList.spec.js
index 9808fd157..29df01f3b 100644
--- a/test/cypress/integration/worker/workerList.spec.js
+++ b/test/cypress/integration/worker/workerList.spec.js
@@ -1,25 +1,13 @@
describe('WorkerList', () => {
- const workerFieldNames =
- '.card-list-body > .list-items > :nth-child(1) > .value > span';
beforeEach(() => {
cy.viewport(1280, 720);
cy.login('developer');
cy.visit('/#/worker/list');
});
- it('should load workers', () => {
- cy.get(workerFieldNames).eq(2).should('have.text', 'jessicajones');
- cy.get(workerFieldNames).eq(3).should('have.text', 'brucebanner');
- cy.get(workerFieldNames).eq(4).should('have.text', 'charlesxavier');
- });
-
it('should open the worker summary', () => {
- cy.openListSummary(2);
- cy.get('.summaryHeader div').should('have.text', '1110 - Jessica Jones');
- cy.get('.summary .header-link')
- .eq(0)
- .invoke('text')
- .should('include', 'Basic data');
- cy.get('.summary .header-link').eq(2).should('have.text', 'User data ');
+ cy.get('.bg-header > :nth-child(2) > .full-width > :nth-child(1) >').type(
+ 'jessica jones{enter}'
+ );
});
});