refactor: delete changes in ticket.sale-checked
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Vicent Llopis 2022-12-28 12:23:41 +01:00
parent d0ae97e41b
commit ab0af27f8b
4 changed files with 5 additions and 171 deletions

View File

@ -17,18 +17,15 @@
<vn-th field="itemFk" number>Item</vn-th>
<vn-th field="concept">Description</vn-th>
<vn-th field="quantity" number>Quantity</vn-th>
<vn-th></vn-th>
<vn-th></vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="sale in sales">
<vn-td center>
<span class="chip {{::$ctrl.chipHasSaleGroupDetail(sale.id)}} vn-mx-xs chip2" vn-tooltip="has saleGroupDetail"></span>
<span class="chip {{::$ctrl.chipIsPreviousSelected()}} vn-ml-xs" vn-tooltip="is previousSelected"></span>
<span class="chip {{::$ctrl.chipIsPrevious()}} vn-mr-xs" vn-tooltip="is previous"></span>
<span class="chip {{::$ctrl.chipIsPrepared()}} vn-mx-xs" vn-tooltip="is prepared"></span>
<span class="chip {{::$ctrl.chipIsControled()}} vn-mx-xs" vn-tooltip="is controled"></span>
<vn-td center shrink>
<vn-check
vn-one ng-model="sale.isChecked.isChecked"
disabled="true">
</vn-check>
</vn-td>
<vn-td number>
<span
@ -51,20 +48,6 @@
</vn-fetched-tags>
</vn-td>
<vn-td number>{{::sale.quantity}}</vn-td>
<vn-td center>
<vn-icon-button
vn-click-stop="$ctrl.showSaleTracking(sale)"
vn-tooltip="Sale tracking"
icon="history">
</vn-icon-button>
</vn-td>
<vn-td>
<vn-icon-button
vn-click-stop="$ctrl.showItemShelvingSale(sale)"
vn-tooltip="ItemShelvings sale"
icon="icon-inventory">
</vn-icon-button>
</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
@ -75,96 +58,3 @@
warehouse-fk="$ctrl.ticket.warehouseFk"
ticket-fk="$ctrl.ticket.id">
</vn-item-descriptor-popover>
<vn-popup vn-id="saleTracking">
<vn-crud-model
vn-id="modelSaleTracking"
url="SaleTrackings/listSaleTracking"
link="{saleFk: $ctrl.saleId}"
limit="20"
data="sales"
order="itemFk DESC"
auto-load="true">
</vn-crud-model>
<vn-data-viewer model="modelSaleTracking">
<vn-card class="vn-w-lg">
<vn-table model="modelSaleTracking">
<vn-thead>
<vn-tr>
<vn-th field="quantity" number>Quantity</vn-th>
<vn-th field="originalQuantity" number>Original</vn-th>
<vn-th field="workerFk">Worker</vn-th>
<vn-th field="state" shrink>State</vn-th>
<vn-th field="created" expand>Created</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="sale in sales">
<vn-td number>{{::sale.quantity}}</vn-td>
<vn-td number>{{::sale.originalQuantity}}</vn-td>
<vn-td expand>
<span
class="link"
ng-click="workerDescriptor.show($event, sale.workerFk)">
{{::sale.userNickname | dashIfEmpty}}
</span>
</vn-td>
<vn-td shrink>{{::sale.state}}</vn-td>
<vn-td expand>{{::sale.created | date: 'dd/MM/yyyy HH:mm'}}</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
</vn-card>
</vn-data-viewer>
<vn-item-descriptor-popover
vn-id="item-descriptor"
warehouse-fk="$ctrl.ticket.warehouseFk">
</vn-item-descriptor-popover>
<vn-worker-descriptor-popover
vn-id="worker-descriptor">
</vn-worker-descriptor-popover>
</vn-popup>
<vn-popup vn-id="itemShelvingSale">
<vn-crud-model
vn-id="modelSaleTracking"
url="ItemShelvingSales/filter"
link="{saleFk: $ctrl.saleId}"
limit="20"
data="$ctrl.itemShelvingSales"
auto-load="true">
</vn-crud-model>
<vn-data-viewer model="modelSaleTracking">
<vn-card class="vn-w-lg">
<vn-table model="modelSaleTracking">
<vn-thead>
<vn-tr>
<vn-th field="quantity" number>Quantity</vn-th>
<vn-th field="workerFk">Worker</vn-th>
<vn-th field="shelving" shrink>Shelving</vn-th>
<vn-th field="parking" shrink>Parking</vn-th>
<vn-th field="created" expand>Created</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="itemShelvingSale in $ctrl.itemShelvingSales">
<vn-td number>{{::itemShelvingSale.quantity}}</vn-td>
<vn-td expand>
<span
class="link"
ng-click="workerDescriptor.show($event, itemShelvingSale.userFk)">
{{::itemShelvingSale.name | dashIfEmpty}}
</span>
</vn-td>
<vn-td shrink>{{::itemShelvingSale.shelvingFk}}</vn-td>
<vn-td shrink>{{::itemShelvingSale.code}}</vn-td>
<vn-td expand>{{::itemShelvingSale.created | date: 'dd/MM/yyyy HH:mm'}}</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
</vn-card>
</vn-data-viewer>
<vn-worker-descriptor-popover
vn-id="worker-descriptor">
</vn-worker-descriptor-popover>
</vn-popup>

View File

@ -1,6 +1,5 @@
import ngModule from '../module';
import Section from 'salix/components/section';
import './style.scss';
class Controller extends Section {
constructor($element, $) {
@ -18,15 +17,6 @@ class Controller extends Section {
]
};
}
$onInit() {
const query = `Sales/${this.$params.id}/salePreparingList`;
this.$http.get(query)
.then(res => {
this.salePreparingList = res.data;
});
}
showItemDescriptor(event, sale) {
this.quicklinks = {
btnThree: {
@ -41,44 +31,6 @@ class Controller extends Section {
};
this.$.itemDescriptor.show(event.target, sale.itemFk);
}
chipHasSaleGroupDetail(saleId) {
this.salePreparing = this.salePreparingList.find(element => element.saleFk == saleId);
if (this.salePreparing.hasSaleGroupDetail) return 'pink';
else return 'message';
}
chipIsPreviousSelected() {
if (this.salePreparing.isPreviousSelected) return 'notice';
else return 'message';
}
chipIsPrevious() {
if (this.salePreparing.isPrevious) return 'dark-notice';
else return 'message';
}
chipIsPrepared() {
if (this.salePreparing.isPrepared) return 'warning';
else return 'message';
}
chipIsControled() {
if (this.salePreparing.isControled) return 'yellow';
else return 'message';
}
showSaleTracking(sale) {
this.saleId = sale.id;
this.$.saleTracking.show();
}
showItemShelvingSale(sale) {
this.saleId = sale.id;
this.$.itemShelvingSale.show();
console.log(this.itemShelvingSales);
}
}
ngModule.vnComponent('vnTicketSaleChecked', {

View File

@ -1 +0,0 @@
ItemShelvings sale: Carros línea

View File

@ -1,7 +0,0 @@
@import "variables";
.chip {
display: inline-block;
min-width: 10px;
min-height: 20px;
}