Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix into test
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2023-08-07 10:19:27 +02:00
commit e85cddec3c
3 changed files with 24 additions and 27 deletions

View File

@ -2,37 +2,37 @@
<vn-auto> <vn-auto>
<section <section
class="inline-tag ellipsize" class="inline-tag ellipsize"
ng-class="::{empty: !$ctrl.item.value5}" ng-class="::{empty: !$ctrl.item.tag5}"
title="{{::$ctrl.item.tag5}}: {{::$ctrl.item.value5}}"> title="{{::$ctrl.item.tag5}}: {{::$ctrl.item.value5}}">
{{::$ctrl.item.value5}} {{::$ctrl.item.value5}}
</section> </section>
<section <section
class="inline-tag ellipsize" class="inline-tag ellipsize"
ng-class="::{empty: !$ctrl.item.value6}" ng-class="::{empty: !$ctrl.item.tag6}"
title="{{::$ctrl.item.tag6}}: {{::$ctrl.item.value6}}"> title="{{::$ctrl.item.tag6}}: {{::$ctrl.item.value6}}">
{{::$ctrl.item.value6}} {{::$ctrl.item.value6}}
</section> </section>
<section <section
class="inline-tag ellipsize" class="inline-tag ellipsize"
ng-class="::{empty: !$ctrl.item.value7}" ng-class="::{empty: !$ctrl.item.tag7}"
title="{{::$ctrl.item.tag7}}: {{::$ctrl.item.value7}}"> title="{{::$ctrl.item.tag7}}: {{::$ctrl.item.value7}}">
{{::$ctrl.item.value7}} {{::$ctrl.item.value7}}
</section> </section>
<section <section
class="inline-tag ellipsize" class="inline-tag ellipsize"
ng-class="::{empty: !$ctrl.item.value8}" ng-class="::{empty: !$ctrl.item.tag8}"
title="{{::$ctrl.item.tag8}}: {{::$ctrl.item.value8}}"> title="{{::$ctrl.item.tag8}}: {{::$ctrl.item.value8}}">
{{::$ctrl.item.value8}} {{::$ctrl.item.value8}}
</section> </section>
<section <section
class="inline-tag ellipsize" class="inline-tag ellipsize"
ng-class="::{empty: !$ctrl.item.value9}" ng-class="::{empty: !$ctrl.item.tag9}"
title="{{::$ctrl.item.tag9}}: {{::$ctrl.item.value9}}"> title="{{::$ctrl.item.tag9}}: {{::$ctrl.item.value9}}">
{{::$ctrl.item.value9}} {{::$ctrl.item.value9}}
</section> </section>
<section <section
class="inline-tag ellipsize" class="inline-tag ellipsize"
ng-class="::{empty: !$ctrl.item.value10}" ng-class="::{empty: !$ctrl.item.tag10}"
title="{{::$ctrl.item.tag10}}: {{::$ctrl.item.value10}}"> title="{{::$ctrl.item.tag10}}: {{::$ctrl.item.value10}}">
{{::$ctrl.item.value10}} {{::$ctrl.item.value10}}
</section> </section>

View File

@ -28,7 +28,7 @@
vn-fetched-tags { vn-fetched-tags {
& > vn-horizontal { & > vn-horizontal {
align-items: center; align-items: center;
max-width: 210px;
& > vn-auto { & > vn-auto {
flex-wrap: wrap; flex-wrap: wrap;
@ -43,17 +43,17 @@ vn-fetched-tags {
& > .inline-tag { & > .inline-tag {
color: $color-font-secondary; color: $color-font-secondary;
text-align: center; text-align: center;
font-size: .75rem; font-size: .8rem;
height: 12px; height: 13px;
padding: 1px; padding: 1px;
width: 64px; width: 64px;
min-width: 64px; min-width: 64px;
max-width: 64px; max-width: 64px;
flex: 1; flex: 1;
border: 1px solid $color-spacer; border: 1px solid $color-font-secondary;
&.empty { &.empty {
border: 1px solid $color-spacer-light; border: 1px solid darken($color-font-secondary, 30%);
} }
} }
} }

View File

@ -1,4 +1,5 @@
const loggable = require('vn-loopback/util/log'); const loggable = require('vn-loopback/util/log');
const UserError = require('vn-loopback/util/user-error');
module.exports = Self => { module.exports = Self => {
Self.remoteMethodCtx('componentUpdate', { Self.remoteMethodCtx('componentUpdate', {
@ -112,7 +113,6 @@ module.exports = Self => {
} }
try { try {
const userId = ctx.req.accessToken.userId;
const models = Self.app.models; const models = Self.app.models;
const $t = ctx.req.__; // $translate const $t = ctx.req.__; // $translate
await models.Ticket.isEditableOrThrow(ctx, args.id, myOptions); await models.Ticket.isEditableOrThrow(ctx, args.id, myOptions);
@ -127,11 +127,8 @@ module.exports = Self => {
args.warehouseFk, args.warehouseFk,
myOptions); myOptions);
if (!zoneShipped || zoneShipped.zoneFk != args.zoneFk) { if (!zoneShipped || zoneShipped.zoneFk != args.zoneFk)
const error = `You don't have privileges to change the zone`; throw new UserError(`You don't have privileges to change the zone`);
throw new UserError(error);
}
} }
if (args.isWithoutNegatives) { if (args.isWithoutNegatives) {