diff --git a/front/salix/components/app/app.js b/front/salix/components/app/app.js index 20f0ad969..91a8d2215 100644 --- a/front/salix/components/app/app.js +++ b/front/salix/components/app/app.js @@ -21,7 +21,7 @@ export default class App extends Component { get showLayout() { const state = this.$state.current.name || this.$location.$$path.substring(1).replace('/', '.'); - const outLayout = ['login', 'recoverPassword', 'resetPassword']; + const outLayout = ['login', 'recoverPassword', 'resetPassword', 'reset-password']; return state && !outLayout.some(ol => ol == state); } diff --git a/modules/worker/back/methods/worker/new.js b/modules/worker/back/methods/worker/new.js index 7a61434f0..97fdc1033 100644 --- a/modules/worker/back/methods/worker/new.js +++ b/modules/worker/back/methods/worker/new.js @@ -124,7 +124,7 @@ module.exports = Self => { const args = ctx.args; let tx; - console.log(args); + if (typeof options == 'object') Object.assign(myOptions, options); if (!myOptions.transaction) { @@ -224,6 +224,7 @@ module.exports = Self => { if (tx) await tx.commit(); } catch (e) { if (tx) await tx.rollback(); + console.log(e); throw e; } @@ -233,6 +234,6 @@ module.exports = Self => { id: client.id }); - return client.id; + return {id: client.id}; }; }; diff --git a/modules/worker/front/create/index.js b/modules/worker/front/create/index.js index a068b2006..fdc02361d 100644 --- a/modules/worker/front/create/index.js +++ b/modules/worker/front/create/index.js @@ -11,8 +11,7 @@ export default class Controller extends Section { onSubmit() { return this.$.watcher.submit().then(json => { - this.$state.go('client.card.basicData', {id: json.data.id}); - this.$http.get(`Clients/${this.client.id}/checkDuplicatedData`); + this.$state.go('worker.card.basicData', {id: json.data.id}); }); } diff --git a/modules/worker/front/index/locale/es.yml b/modules/worker/front/index/locale/es.yml new file mode 100644 index 000000000..df6383273 --- /dev/null +++ b/modules/worker/front/index/locale/es.yml @@ -0,0 +1 @@ +New worker: Nuevo trabajador diff --git a/print/templates/email/email-verify/email-verify.js b/print/templates/email/email-verify/email-verify.js index 7f0b80a13..4f2b29266 100755 --- a/print/templates/email/email-verify/email-verify.js +++ b/print/templates/email/email-verify/email-verify.js @@ -10,7 +10,7 @@ module.exports = { }, props: { url: { - type: [String], + type: String, required: true } } diff --git a/print/templates/email/recover-password/recover-password.js b/print/templates/email/recover-password/recover-password.js index b589411a9..d8448f370 100755 --- a/print/templates/email/recover-password/recover-password.js +++ b/print/templates/email/recover-password/recover-password.js @@ -10,7 +10,7 @@ module.exports = { }, props: { url: { - type: [String], + type: String, required: true } } diff --git a/print/templates/email/worker-welcome/locale/es.yml b/print/templates/email/worker-welcome/locale/es.yml index d95f37bd6..d53a4e1f0 100644 --- a/print/templates/email/worker-welcome/locale/es.yml +++ b/print/templates/email/worker-welcome/locale/es.yml @@ -3,6 +3,6 @@ title: "¡Te damos la bienvenida!" dearWorker: Estimado trabajador workerData: 'Estos son los datos de tu usuario de Verdnatura. Usuario: {0}. Haz click aquí para - establecer tu contraseña. + establecer tu contraseña .' diff --git a/print/templates/email/worker-welcome/sql/worker.sql b/print/templates/email/worker-welcome/sql/worker.sql index 99377fec9..f75d135d9 100644 --- a/print/templates/email/worker-welcome/sql/worker.sql +++ b/print/templates/email/worker-welcome/sql/worker.sql @@ -1,6 +1,6 @@ SELECT u.id, - u.name AS userName, + u.name, e.email FROM account.user u LEFT JOIN account.emailUser e ON e.userFk = u.id diff --git a/print/templates/email/worker-welcome/worker-welcome.html b/print/templates/email/worker-welcome/worker-welcome.html index 28e5689f1..fbb05d149 100644 --- a/print/templates/email/worker-welcome/worker-welcome.html +++ b/print/templates/email/worker-welcome/worker-welcome.html @@ -2,8 +2,8 @@
{{ $t('description.dearWorker') }},
-{{ $t('workerData', this.worker.name, this.url) }}
+{{ $t('dearWorker') }},
+