minor bug
gitea/salix/pipeline/head This commit is unstable
Details
gitea/salix/pipeline/head This commit is unstable
Details
This commit is contained in:
parent
da7d9b48ea
commit
399612c9db
|
@ -232,5 +232,6 @@
|
||||||
"Fichadas impares": "Fichadas impares",
|
"Fichadas impares": "Fichadas impares",
|
||||||
"Descanso diario 12h.": "Descanso diario 12h.",
|
"Descanso diario 12h.": "Descanso diario 12h.",
|
||||||
"Descanso semanal 36h. / 72h.": "Descanso semanal 36h. / 72h.",
|
"Descanso semanal 36h. / 72h.": "Descanso semanal 36h. / 72h.",
|
||||||
"Dirección incorrecta": "Dirección incorrecta"
|
"Dirección incorrecta": "Dirección incorrecta",
|
||||||
|
"Prices recalculated": "Precios recalculados"
|
||||||
}
|
}
|
|
@ -27,6 +27,7 @@ module.exports = Self => {
|
||||||
const myOptions = {};
|
const myOptions = {};
|
||||||
const userId = ctx.req.accessToken.userId;
|
const userId = ctx.req.accessToken.userId;
|
||||||
const models = Self.app.models;
|
const models = Self.app.models;
|
||||||
|
const $t = ctx.req.__;
|
||||||
|
|
||||||
if (typeof options == 'object')
|
if (typeof options == 'object')
|
||||||
Object.assign(myOptions, options);
|
Object.assign(myOptions, options);
|
||||||
|
@ -41,14 +42,13 @@ module.exports = Self => {
|
||||||
id
|
id
|
||||||
], myOptions);
|
], myOptions);
|
||||||
*/
|
*/
|
||||||
const oldProperties = await loggable.translateValues(Self, {price: 'Prices recalculated'});
|
|
||||||
const entryLog = await models.EntryLog.create({
|
const entryLog = await models.EntryLog.create({
|
||||||
originFk: id,
|
originFk: id,
|
||||||
userFk: userId,
|
userFk: userId,
|
||||||
action: 'update',
|
action: 'update',
|
||||||
changedModel: 'Entry',
|
changedModel: 'Entry',
|
||||||
changedModelId: id,
|
changedModelId: id,
|
||||||
oldInstance: oldProperties
|
description: $t('Prices recalculated')
|
||||||
}, myOptions);
|
}, myOptions);
|
||||||
|
|
||||||
if (tx) await tx.commit();
|
if (tx) await tx.commit();
|
||||||
|
|
|
@ -10,7 +10,9 @@
|
||||||
</vn-item>
|
</vn-item>
|
||||||
<vn-item
|
<vn-item
|
||||||
ng-click="$ctrl.recalcPrices()"
|
ng-click="$ctrl.recalcPrices()"
|
||||||
translate>
|
translate
|
||||||
|
vn-acl="buyer"
|
||||||
|
vn-acl-action="remove">
|
||||||
Recalc prices
|
Recalc prices
|
||||||
</vn-item>
|
</vn-item>
|
||||||
</slot-menu>
|
</slot-menu>
|
||||||
|
|
|
@ -93,7 +93,7 @@ class Controller extends Descriptor {
|
||||||
|
|
||||||
recalcPrices() {
|
recalcPrices() {
|
||||||
this.$http.post(`Entries/${this.id}/recalcPrices`).then(() => {
|
this.$http.post(`Entries/${this.id}/recalcPrices`).then(() => {
|
||||||
this.vnApp.showSuccess(this.$t('Prices recalculated!'));
|
this.vnApp.showSuccess(this.$t('Prices recalculated'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue