Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 3569-refactor_isEditable-canEdit

This commit is contained in:
Alex Moreno 2022-10-10 13:05:00 +02:00
commit a6c171d00a
3 changed files with 43 additions and 35 deletions

View File

@ -100,38 +100,37 @@
{{::travel.id}} {{::travel.id}}
</span> </span>
</td> </td>
<td vn-click-stop> <td class="multi-line" vn-click-stop>
<span <span
class="link" class="link"
ng-click="supplierDescriptor.show($event, travel.cargoSupplierFk)"> ng-click="supplierDescriptor.show($event, travel.cargoSupplierFk)">
{{::travel.cargoSupplierNickname}} {{::travel.cargoSupplierNickname}}
</span> </span>
</td> </td>
<td expand>{{::travel.agencyModeName}}</td> <td>{{::travel.agencyModeName}}</td>
<td <td vn-click-stop>
name="reference" <vn-td-editable name="reference" expand>
class="td-editable" <text>{{travel.ref}}</text>
vn-click-stop> <field>
<vn-textfield <vn-textfield class="dense" vn-focus
class="dense td-editable"
ng-model="travel.ref" ng-model="travel.ref"
on-change="$ctrl.save(travel.id, {ref: value})"> on-change="$ctrl.save(travel.id, {ref: value})">
</vn-textfield> </vn-textfield>
</field>
</vn-td-editable>
</td> </td>
<td number>{{::travel.stickers}}</td> <td number>{{::travel.stickers}}</td>
<td <td vn-click-stop>
name="lockedKg" <vn-td-editable name="lockedKg" expand style="text-align: right">
class="number" <text number>{{travel.kg}}</text>
shrink <field>
vn-click-stop> <vn-input-number class="dense" vn-focus
<vn-input-number
number
shrink
class="td-editable number"
ng-model="travel.kg" ng-model="travel.kg"
on-change="$ctrl.save(travel.id, {kg: value})" on-change="$ctrl.save(travel.id, {kg: value})"
min="0"> min="0">
</vn-input-number> </vn-input-number>
</field>
</vn-td-editable>
</td> </td>
<td number>{{::travel.loadedKg}}</td> <td number>{{::travel.loadedKg}}</td>
<td number>{{::travel.volumeKg}}</td> <td number>{{::travel.volumeKg}}</td>
@ -151,7 +150,7 @@
{{::entry.id}} {{::entry.id}}
</span> </span>
</td> </td>
<td> <td class="multi-line">
<span <span
class="link" class="link"
ng-click="supplierDescriptor.show($event, entry.supplierFk)"> ng-click="supplierDescriptor.show($event, entry.supplierFk)">

View File

@ -3,7 +3,6 @@
vn-travel-extra-community { vn-travel-extra-community {
.header { .header {
margin-bottom: 16px; margin-bottom: 16px;
font-size: 1.1rem;
line-height: 1; line-height: 1;
padding: 7px; padding: 7px;
padding-bottom: 7px; padding-bottom: 7px;
@ -16,6 +15,10 @@ vn-travel-extra-community {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
cursor: pointer; cursor: pointer;
.multi-line{
padding-top: 15px;
padding-bottom: 15px;
}
} }
table[vn-droppable] { table[vn-droppable] {
@ -46,16 +49,19 @@ vn-travel-extra-community {
font-weight: bold; font-weight: bold;
} }
.td-editable {
.multi-line{
max-width: 200px; max-width: 200px;
word-wrap: normal;
white-space: normal;
} }
vn-input-number.number { vn-td-editable text {
min-width: 100px; background-color: transparent;
padding-right: 10px; padding: 0;
} border: 0;
border-bottom: 1px dashed $color-active;
.number * { border-radius: 0;
text-align: center; color: $color-active
} }
} }

View File

@ -59,6 +59,9 @@ module.exports = Self => {
} }
const leaves = map.get(parentId); const leaves = map.get(parentId);
const maxNodes = 250;
if (res.length <= maxNodes)
setLeaves(leaves); setLeaves(leaves);
return leaves || []; return leaves || [];