feat(newWorker): use worker-welcome
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Alex Moreno 2022-12-12 15:05:49 +01:00
parent 7822a6cac8
commit bb944f9fee
10 changed files with 18 additions and 12 deletions

View File

@ -21,7 +21,7 @@ export default class App extends Component {
get showLayout() { get showLayout() {
const state = this.$state.current.name || this.$location.$$path.substring(1).replace('/', '.'); 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); return state && !outLayout.some(ol => ol == state);
} }

View File

@ -124,7 +124,7 @@ module.exports = Self => {
const args = ctx.args; const args = ctx.args;
let tx; let tx;
console.log(args);
if (typeof options == 'object') Object.assign(myOptions, options); if (typeof options == 'object') Object.assign(myOptions, options);
if (!myOptions.transaction) { if (!myOptions.transaction) {
@ -224,6 +224,7 @@ module.exports = Self => {
if (tx) await tx.commit(); if (tx) await tx.commit();
} catch (e) { } catch (e) {
if (tx) await tx.rollback(); if (tx) await tx.rollback();
console.log(e);
throw e; throw e;
} }
@ -233,6 +234,6 @@ module.exports = Self => {
id: client.id id: client.id
}); });
return client.id; return {id: client.id};
}; };
}; };

View File

@ -11,8 +11,7 @@ export default class Controller extends Section {
onSubmit() { onSubmit() {
return this.$.watcher.submit().then(json => { return this.$.watcher.submit().then(json => {
this.$state.go('client.card.basicData', {id: json.data.id}); this.$state.go('worker.card.basicData', {id: json.data.id});
this.$http.get(`Clients/${this.client.id}/checkDuplicatedData`);
}); });
} }

View File

@ -0,0 +1 @@
New worker: Nuevo trabajador

View File

@ -10,7 +10,7 @@ module.exports = {
}, },
props: { props: {
url: { url: {
type: [String], type: String,
required: true required: true
} }
} }

View File

@ -10,7 +10,7 @@ module.exports = {
}, },
props: { props: {
url: { url: {
type: [String], type: String,
required: true required: true
} }
} }

View File

@ -3,6 +3,6 @@ title: "¡Te damos la bienvenida!"
dearWorker: Estimado trabajador dearWorker: Estimado trabajador
workerData: 'Estos son los datos de tu usuario de Verdnatura. workerData: 'Estos son los datos de tu usuario de Verdnatura.
Usuario: <strong>{0}</strong>. Haz click aquí para Usuario: <strong>{0}</strong>. Haz click aquí para
<a href="{{1}}" <a href="{1}"
title="Cambiar contraseña" target="_blank" style="color: #8dba25">establecer tu contraseña. title="Cambiar contraseña" target="_blank" style="color: #8dba25">establecer tu contraseña
</a>.' </a>.'

View File

@ -1,6 +1,6 @@
SELECT SELECT
u.id, u.id,
u.name AS userName, u.name,
e.email e.email
FROM account.user u FROM account.user u
LEFT JOIN account.emailUser e ON e.userFk = u.id LEFT JOIN account.emailUser e ON e.userFk = u.id

View File

@ -2,8 +2,8 @@
<div class="grid-row"> <div class="grid-row">
<div class="grid-block vn-pa-ml"> <div class="grid-block vn-pa-ml">
<h1>{{ $t('title', [id]) }}</h1> <h1>{{ $t('title', [id]) }}</h1>
<p>{{ $t('description.dearWorker') }},</p> <p>{{ $t('dearWorker') }},</p>
<p>{{ $t('workerData', this.worker.name, this.url) }}</p> <p v-html="$t('workerData', [this.worker.name, this.url])"></p>
</div> </div>
</div> </div>
</email-body> </email-body>

View File

@ -5,6 +5,7 @@ module.exports = {
name: 'worker-welcome', name: 'worker-welcome',
async serverPrefetch() { async serverPrefetch() {
this.worker = await this.fetchWorker(this.id); this.worker = await this.fetchWorker(this.id);
console.log(this.url);
}, },
methods: { methods: {
fetchWorker(id) { fetchWorker(id) {
@ -18,6 +19,10 @@ module.exports = {
id: { id: {
type: Number, type: Number,
required: true required: true
},
url: {
type: String,
required: true
} }
} }
}; };