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() {
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);
}

View File

@ -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};
};
};

View File

@ -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});
});
}

View File

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

View File

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

View File

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

View File

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

View File

@ -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

View File

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

View File

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