refactor(item_fixed-price): add checkbox hasMinPrice, tooltips, more witdh
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2022-03-15 15:18:27 +01:00
parent a9f4386ad6
commit e0924ea373
2 changed files with 35 additions and 14 deletions

View File

@ -22,16 +22,27 @@
model="model"> model="model">
</vn-searchbar> </vn-searchbar>
</vn-portal> </vn-portal>
<div class="vn-w-lg"> <div class="vn-w-xl">
<vn-card> <vn-card>
<vn-table model="model"> <vn-table model="model">
<vn-thead> <vn-thead>
<vn-tr> <vn-tr>
<vn-th field="itemFk" shrink>Item ID</vn-th> <vn-th field="itemFk" shrink>Item ID</vn-th>
<vn-th field="itemFk">Description</vn-th> <vn-th field="itemFk">Description</vn-th>
<vn-th field="warehouseFk">Warehouse</vn-th> <vn-th field="warehouseFk" shrink>Warehouse</vn-th>
<vn-th field="rate2">P.P.U.</vn-th> <vn-th
<vn-th field="rate3">P.P.P.</vn-th> field="rate2"
vn-tooltip="Price By Unit"
center>
P.P.U.
</vn-th>
<vn-th
field="rate3"
vn-tooltip="Price By Package"
center>
P.P.P.
</vn-th>
<vn-th></vn-th>
<vn-th field="minPrice">Min price</vn-th> <vn-th field="minPrice">Min price</vn-th>
<vn-th field="started" style="width: 90px">Started</vn-th> <vn-th field="started" style="width: 90px">Started</vn-th>
<vn-th field="ended" style="width: 90px">Ended</vn-th> <vn-th field="ended" style="width: 90px">Ended</vn-th>
@ -41,12 +52,7 @@
<vn-tbody> <vn-tbody>
<vn-tr ng-repeat="price in prices"> <vn-tr ng-repeat="price in prices">
<vn-td shrink> <vn-td shrink>
<span <text>{{price.itemFk}}</text>
ng-if="price.itemFk"
ng-click="itemDescriptor.show($event, price.itemFk)"
class="link">
{{price.itemFk}}
</span>
<vn-autocomplete <vn-autocomplete
class="dense" class="dense"
ng-if="!price.itemFk" ng-if="!price.itemFk"
@ -66,7 +72,13 @@
</vn-td> </vn-td>
<vn-td vn-fetched-tags> <vn-td vn-fetched-tags>
<div> <div>
<vn-one title="{{price.name}}">{{price.name}}</vn-one> <span
vn-one
ng-if="price.itemFk"
ng-click="itemDescriptor.show($event, price.itemFk)"
class="link">
{{price.name}}
</span>
<vn-one ng-if="price.subName"> <vn-one ng-if="price.subName">
<h3 title="{{price.subName}}">{{price.subName}}</h3> <h3 title="{{price.subName}}">{{price.subName}}</h3>
</vn-one> </vn-one>
@ -77,7 +89,7 @@
tabindex="-1"> tabindex="-1">
</vn-fetched-tags> </vn-fetched-tags>
</vn-td> </vn-td>
<vn-td> <vn-td shrink>
<vn-autocomplete <vn-autocomplete
vn-one vn-one
label="Warehouse" label="Warehouse"
@ -109,10 +121,17 @@
</vn-input-number> </vn-input-number>
</field> </field>
</vn-td-editable> </vn-td-editable>
<vn-td shrink>
<vn-check
vn-one
ng-model="price.hasMinPrice">
</vn-check>
</vn-td>
<vn-td-editable number> <vn-td-editable number>
<text>{{(price.hasMinPrice ? (price.minPrice | currency: 'EUR':2) : "-")}}</text> <text>{{price.minPrice | currency: 'EUR':2}}</text>
<field> <field>
<vn-input-number <vn-input-number
disabled="!price.hasMinPrice"
class="dense" class="dense"
vn-focus vn-focus
ng-model="price.minPrice" ng-model="price.minPrice"

View File

@ -3,3 +3,5 @@ Search prices by item ID or code: Buscar por ID de artículo o código
Search fixed prices: Buscar precios fijados Search fixed prices: Buscar precios fijados
Add fixed price: Añadir precio fijado Add fixed price: Añadir precio fijado
This row will be removed: Esta linea se eliminará This row will be removed: Esta linea se eliminará
Price By Unit: Precio Por Unidad
Price By Package: Precio Por Paquete