Merge branch 'dev' of https://git.verdnatura.es/salix into dev
This commit is contained in:
commit
df320908ae
|
@ -0,0 +1,10 @@
|
|||
<div class="{{$ctrl.className}}">
|
||||
<vn-horizontal ng-if="$ctrl.text" class="orderly">
|
||||
<span translate>
|
||||
{{::$ctrl.text}}
|
||||
</span>
|
||||
<vn-icon icon="keyboard_arrow_down" ng-if="$ctrl.showOrder && $ctrl.order === 'DESC'"></vn-icon>
|
||||
<vn-icon icon="keyboard_arrow_up" ng-if="$ctrl.showOrder && $ctrl.order === 'ASC'"></vn-icon>
|
||||
</vn-horizontal>
|
||||
<ng-transclude ng-if="!$ctrl.text"></ng-transclude>
|
||||
</div>
|
|
@ -0,0 +1,51 @@
|
|||
import {module} from '../module';
|
||||
|
||||
export default class vnColumHeader {
|
||||
constructor($element, $timeout, $transclude) {
|
||||
this.$element = $element;
|
||||
this.$timeout = $timeout;
|
||||
this.order = null;
|
||||
this.showOrder = false;
|
||||
}
|
||||
onClick() {
|
||||
switch (this.order) {
|
||||
case 'ASC':
|
||||
this.$timeout(() => {
|
||||
this.showOrder = true;
|
||||
this.order = 'DESC';
|
||||
// this.gH.onOrder(this.field, this.order);
|
||||
});
|
||||
break;
|
||||
default:
|
||||
this.$timeout(() => {
|
||||
this.showOrder = true;
|
||||
this.order = 'ASC';
|
||||
});
|
||||
break;
|
||||
}
|
||||
this.$timeout(
|
||||
() => {
|
||||
this.showOrder = false;
|
||||
}, 1000);
|
||||
}
|
||||
$onInit() {
|
||||
if (this.field) {
|
||||
this.$element.bind("click", () => this.onClick());
|
||||
}
|
||||
}
|
||||
}
|
||||
vnColumHeader.$inject = ['$element', '$timeout'];
|
||||
|
||||
module.component('vnColumHeader', {
|
||||
template: require('./colum-header.html'),
|
||||
bindings: {
|
||||
field: '@?',
|
||||
text: '@?',
|
||||
className: '@?'
|
||||
},
|
||||
require: {
|
||||
gH: '^vnGridHeader'
|
||||
},
|
||||
controller: vnColumHeader,
|
||||
transclude: true
|
||||
});
|
|
@ -17,6 +17,8 @@ import './snackbar/snackbar';
|
|||
import './tooltip/tooltip';
|
||||
import './icon-menu/icon-menu';
|
||||
import './drop-down/drop-down';
|
||||
import './colum-header/colum-header';
|
||||
import './grid-header/grid-header';
|
||||
|
||||
export {NAME as BUTTON, directive as ButtonDirective} from './button/button';
|
||||
export {NAME as BUTTON_MDL, factory as buttonMdl} from './button/button.mdl';
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<vn-horizontal ng-transclude></vn-horizontal>
|
|
@ -0,0 +1,17 @@
|
|||
import {module} from '../module';
|
||||
import './style.scss';
|
||||
|
||||
export default class GridHeader {
|
||||
constructor() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
module.component('vnGridHeader', {
|
||||
template: require('./grid-header.html'),
|
||||
transclude: true,
|
||||
binding: {
|
||||
onOrder: '&?'
|
||||
},
|
||||
component: GridHeader
|
||||
});
|
|
@ -0,0 +1,14 @@
|
|||
vn-grid-header {
|
||||
border-bottom: 3px solid #9D9D9D;
|
||||
font-weight: bold;
|
||||
.orderly{
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
}
|
||||
vn-none{
|
||||
min-width: 60px;
|
||||
}
|
||||
vn-icon{
|
||||
line-height: 17px;
|
||||
}
|
||||
}
|
|
@ -23,9 +23,10 @@
|
|||
</vn-two>
|
||||
<vn-one vn-horizontal>
|
||||
<vn-one></vn-one>
|
||||
<vn-autocomplete vn-two
|
||||
initial-value="$ctrl.warehouse"
|
||||
field="$ctrl.warehouseFk" url="/production/api/Warehouses/list" label="Store">
|
||||
<vn-autocomplete vn-two
|
||||
field="$ctrl.warehouseFk"
|
||||
url="/production/api/Warehouses/production"
|
||||
label="Store">
|
||||
</vn-autocomplete>
|
||||
<vn-icon-button vn-none pad-ten-top icon="refresh"></vn-icon-button>
|
||||
</vn-one>
|
||||
|
@ -51,21 +52,23 @@
|
|||
</vn-one>
|
||||
<vn-two></vn-two>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal vn-one class="list list-header">
|
||||
|
||||
<vn-grid-header on-order="$ctrl.onOrder">
|
||||
<vn-none></vn-none>
|
||||
<vn-none>
|
||||
<vn-colum-header vn-none>
|
||||
<vn-check model="$ctrl.checkAll"></vn-check>
|
||||
</vn-none>
|
||||
<vn-label vn-one text="ID Ticket"></vn-label>
|
||||
<vn-label vn-two text="Agency"></vn-label>
|
||||
<vn-label vn-two text="Commercial"></vn-label>
|
||||
<vn-label vn-one text="Hour"></vn-label>
|
||||
<vn-label vn-one text="State"></vn-label>
|
||||
<vn-label vn-one text="Lines"></vn-label>
|
||||
<vn-label vn-one text="m3"></vn-label>
|
||||
<vn-label vn-one text="Boxes"></vn-label>
|
||||
</vn-colum-header>
|
||||
<vn-colum-header vn-one field="ticket" text="ID Ticket"></vn-colum-header>
|
||||
<vn-colum-header vn-two field="agency" text="Agency"></vn-colum-header>
|
||||
<vn-colum-header vn-two field="salePerson" text="Commercial"></vn-colum-header>
|
||||
<vn-colum-header vn-one field="hour" text="Hour"></vn-colum-header>
|
||||
<vn-colum-header vn-one field="state" text="State"></vn-colum-header>
|
||||
<vn-colum-header vn-one field="lines" text="Lines"></vn-colum-header>
|
||||
<vn-colum-header vn-one field="m3" text="m3"></vn-colum-header>
|
||||
<vn-colum-header vn-one field="boxes" text="Boxes"></vn-colum-header>
|
||||
<vn-none></vn-none>
|
||||
</vn-horizontal>
|
||||
</vn-grid-header>
|
||||
|
||||
<vn-horizontal vn-one class="list list-body" ng-repeat="ticket in $ctrl.tickets track by $index" ng-class="{warning: ticket.problems==='RIESGO'}">
|
||||
<vn-none>
|
||||
<vn-icon margin-small-left icon="report_problem" ng-if="ticket.problems" vn-tooltip="{{::ticket.problems}}" tooltip-position="right"></vn-icon>
|
||||
|
|
|
@ -23,6 +23,10 @@ export default class ProductionIndex {
|
|||
};
|
||||
this.hourItems = [];
|
||||
this.child = undefined;
|
||||
this.warehouse = {
|
||||
id: 1,
|
||||
name: "Silla FV"
|
||||
};
|
||||
}
|
||||
get checkAll() {
|
||||
return this._checkAll;
|
||||
|
@ -128,6 +132,9 @@ export default class ProductionIndex {
|
|||
delete this.child;
|
||||
}
|
||||
// END modals and actions modals
|
||||
onOrder(field, dir) {
|
||||
console.log('order by', field, dir);
|
||||
}
|
||||
$doCheck() {
|
||||
if (this.actions.state) {
|
||||
this.doAction('changeState');
|
||||
|
|
|
@ -13,5 +13,11 @@
|
|||
"Boxes" : "Cajas",
|
||||
"Comment" : "Comentario",
|
||||
"Message" : "Mensaje",
|
||||
"Send" : "Enviar"
|
||||
"Send" : "Enviar",
|
||||
"Date" : "Fecha",
|
||||
"Route ID": "ID Ruta",
|
||||
"Province" : "Provincia",
|
||||
"Cancel" : "Cancelar",
|
||||
"Filter" : "Filtrar",
|
||||
"Ticket with incidence" : "Ticket con incidencia"
|
||||
}
|
|
@ -1,4 +1,6 @@
|
|||
<form ng-submit="$ctrl.onComment($ctrl.ids, $ctrl.comment)" pad-large>
|
||||
<vn-textfield vn-one label="Message" model="$ctrl.comment"></vn-textfield>
|
||||
<vn-submit vn-one label="Send"></vn-submit>
|
||||
<vn-horizontal>
|
||||
<vn-textfield vn-one label="Message" model="$ctrl.comment"></vn-textfield>
|
||||
<vn-submit vn-none pad-small-top label="Send"></vn-submit>
|
||||
</vn-horizontal>
|
||||
</form>
|
|
@ -1,26 +1,24 @@
|
|||
|
||||
<form ng-submit="$ctrl.onSubmit($ctrl.filter)" pad-large>
|
||||
<vn-horizontal>
|
||||
<vn-textfield vn-one label="ID Ruta" model="$ctrl.filter.ruteId"></vn-textfield>
|
||||
<vn-date-picker vn-one label="Fecha" model="$ctrl.filter.date"></vn-date-picker>
|
||||
<vn-textfield vn-one label="Route ID" model="$ctrl.filter.ruteId"></vn-textfield>
|
||||
<vn-date-picker vn-one label="Date" model="$ctrl.filter.date"></vn-date-picker>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-autocomplete vn-one
|
||||
initial-value="$ctrl.filter.province"
|
||||
field="$ctrl.filter.provinceFk"
|
||||
url="/client/api/Provinces"
|
||||
show-field="name"
|
||||
value-field="id"
|
||||
label="Provincia">
|
||||
label="Province">
|
||||
</vn-autocomplete>
|
||||
<vn-date-picker vn-one label="Hora" ini-opts="{enableTime:true,noCalendar:true,dateFormat:'H:i',time_24hr:true,static:true,minuteIncrement:30}" model="$ctrl.filter.hour"></n-date-picker>
|
||||
<vn-date-picker vn-one label="Hour" ini-opts="{enableTime:true,noCalendar:true,dateFormat:'H:i',time_24hr:true,static:true,minuteIncrement:30}" model="$ctrl.filter.hour"></n-date-picker>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-check vn-one pad-medium-top label="Ticket con incidencia" field="$ctrl.filter.withIncidence"></vn-check>
|
||||
<vn-textfield vn-one label="Agencia" model="$ctrl.filter.agency"></vn-textfield>
|
||||
<vn-check vn-one pad-medium-top label="Ticket with incidence" field="$ctrl.filter.withIncidence"></vn-check>
|
||||
<vn-textfield vn-one label="Agency" model="$ctrl.filter.agency"></vn-textfield>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal margin-large-top>
|
||||
<vn-submit vn-one label="Filtrar"></vn-submit>
|
||||
<vn-button vn-none label="Cancelar" ng-click="$ctrl.onCancel()"></vn-button>
|
||||
<vn-submit vn-one label="Filter"></vn-submit>
|
||||
<vn-button vn-none label="Cancel" ng-click="$ctrl.onCancel()"></vn-button>
|
||||
</vn-horizontal>
|
||||
</form>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import ngModule from '../module';
|
||||
import './style.scss';
|
||||
|
||||
ngModule.component('vnProductionFilterPanel', {
|
||||
template: require('./production-filters.html')
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
vn-production-filter-panel{
|
||||
.mdl-button--colored{
|
||||
color: #ffa410 !important;
|
||||
background-color: white !important;
|
||||
}
|
||||
.mdl-button--colored:hover{
|
||||
color: white !important;
|
||||
}
|
||||
}
|
|
@ -31,5 +31,8 @@
|
|||
"principalId": "root",
|
||||
"permission": "ALLOW"
|
||||
}
|
||||
]
|
||||
],
|
||||
"scopes" : {
|
||||
"production" : {"where": {"tpv": {"neq": 0}}}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue