minor bug
gitea/salix/pipeline/head This commit is unstable Details

This commit is contained in:
Javi Gallego 2022-08-09 15:04:58 +02:00
parent da7d9b48ea
commit 399612c9db
4 changed files with 8 additions and 5 deletions

View File

@ -232,5 +232,6 @@
"Fichadas impares": "Fichadas impares",
"Descanso diario 12h.": "Descanso diario 12h.",
"Descanso semanal 36h. / 72h.": "Descanso semanal 36h. / 72h.",
"Dirección incorrecta": "Dirección incorrecta"
"Dirección incorrecta": "Dirección incorrecta",
"Prices recalculated": "Precios recalculados"
}

View File

@ -27,6 +27,7 @@ module.exports = Self => {
const myOptions = {};
const userId = ctx.req.accessToken.userId;
const models = Self.app.models;
const $t = ctx.req.__;
if (typeof options == 'object')
Object.assign(myOptions, options);
@ -41,14 +42,13 @@ module.exports = Self => {
id
], myOptions);
*/
const oldProperties = await loggable.translateValues(Self, {price: 'Prices recalculated'});
const entryLog = await models.EntryLog.create({
originFk: id,
userFk: userId,
action: 'update',
changedModel: 'Entry',
changedModelId: id,
oldInstance: oldProperties
description: $t('Prices recalculated')
}, myOptions);
if (tx) await tx.commit();

View File

@ -10,7 +10,9 @@
</vn-item>
<vn-item
ng-click="$ctrl.recalcPrices()"
translate>
translate
vn-acl="buyer"
vn-acl-action="remove">
Recalc prices
</vn-item>
</slot-menu>

View File

@ -93,7 +93,7 @@ class Controller extends Descriptor {
recalcPrices() {
this.$http.post(`Entries/${this.id}/recalcPrices`).then(() => {
this.vnApp.showSuccess(this.$t('Prices recalculated!'));
this.vnApp.showSuccess(this.$t('Prices recalculated'));
});
}
}