Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 3023-client_webAccess_block_simultaneous_changes
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
commit
c1162b1b8a
|
@ -60,8 +60,12 @@ module.exports = Self => {
|
|||
const [salesAvailable] = await Self.rawSql(query, [id], myOptions);
|
||||
|
||||
const itemAvailable = new Map();
|
||||
for (let sale of salesAvailable)
|
||||
itemAvailable.set(sale.itemFk, sale.available);
|
||||
for (let sale of salesAvailable) {
|
||||
itemAvailable.set(sale.itemFk, {
|
||||
visible: sale.visible,
|
||||
available: sale.available
|
||||
});
|
||||
}
|
||||
|
||||
// Get claimed sales
|
||||
const saleIds = sales.map(sale => sale.id);
|
||||
|
@ -84,7 +88,9 @@ module.exports = Self => {
|
|||
|
||||
for (let sale of sales) {
|
||||
const problems = saleProblems.get(sale.id);
|
||||
sale.available = itemAvailable.get(sale.itemFk);
|
||||
const itemStock = itemAvailable.get(sale.itemFk);
|
||||
sale.available = itemStock.available;
|
||||
sale.visible = itemStock.visible;
|
||||
sale.claim = claimedSales.get(sale.id);
|
||||
if (problems) {
|
||||
sale.isAvailable = problems.isAvailable;
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
</vn-th>
|
||||
<vn-th shrink></vn-th>
|
||||
<vn-th shrink></vn-th>
|
||||
<vn-th shrink>Visible</vn-th>
|
||||
<vn-th shrink>Available</vn-th>
|
||||
<vn-th>Id</vn-th>
|
||||
<vn-th shrink>Quantity</vn-th>
|
||||
|
@ -112,6 +113,13 @@
|
|||
zoom-image="{{::$root.imagePath('catalog', '1600x900', sale.itemFk)}}"
|
||||
on-error-src/>
|
||||
</vn-td>
|
||||
<vn-td shrink>
|
||||
<vn-chip
|
||||
class="transparent"
|
||||
ng-class="{'alert': sale.visible < 0}">
|
||||
{{::sale.visible}}
|
||||
</vn-chip>
|
||||
</vn-td>
|
||||
<vn-td shrink>
|
||||
<vn-chip
|
||||
class="transparent"
|
||||
|
|
|
@ -120,6 +120,7 @@
|
|||
<vn-tr>
|
||||
<vn-th shrink></vn-th>
|
||||
<vn-th number shrink>Item</vn-th>
|
||||
<vn-th number shrink>Visible</vn-th>
|
||||
<vn-th number shrink>Available</vn-th>
|
||||
<vn-th number shrink>Quantity</vn-th>
|
||||
<vn-th>Description</vn-th>
|
||||
|
@ -169,6 +170,13 @@
|
|||
{{sale.itemFk | zeroFill:6}}
|
||||
</span>
|
||||
</vn-td>
|
||||
<vn-td number shrink>
|
||||
<vn-chip
|
||||
class="transparent"
|
||||
ng-class="{'alert': sale.visible < 0}">
|
||||
{{::sale.visible}}
|
||||
</vn-chip>
|
||||
</vn-td>
|
||||
<vn-td number shrink>
|
||||
<vn-chip
|
||||
class="transparent"
|
||||
|
|
Loading…
Reference in New Issue