refs #4770 varios cambios
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Vicent Llopis 2023-05-02 15:01:54 +02:00
parent c8d21e1ef3
commit 057151eda0
41 changed files with 626 additions and 161 deletions

View File

@ -1,4 +1,5 @@
ALTER TABLE `vn`.`roadmap` COMMENT='Troncales diarios que se contratan';
ALTER TABLE `vn`.`roadmap` ADD price decimal(10,2) NULL;
ALTER TABLE `vn`.`roadmap` ADD driverName varchar(45) NULL;
ALTER TABLE `vn`.`expeditionTruck` COMMENT='Distintas paradas que hacen los trocales';

View File

@ -2560,11 +2560,11 @@ INSERT INTO `vn`.`zoneAgencyMode`(`id`, `agencyModeFk`, `zoneFk`)
(3, 6, 5),
(4, 7, 1);
INSERT INTO `vn`.`roadmap` (`id`, `tractorPlate`, `trailerPlate`, `phone`, `supplierFk`, `etd`, `observations`, `userFk`)
INSERT INTO `vn`.`roadmap` (`id`, `tractorPlate`, `trailerPlate`, `phone`, `supplierFk`, `etd`, `observations`, `userFk`, `price`, `driverName`)
VALUES
(1, 'RE-001', 'PO-001', '111111111', 1, util.VN_NOW(), 'this is test observation', 1),
(2, 'RE-002', 'PO-002', '111111111', 1, DATE_ADD(util.VN_NOW(), INTERVAL 1 DAY), 'test observation', 1),
(3, 'RE-003', 'PO-003', '222222222', 2, DATE_ADD(util.VN_NOW(), INTERVAL 2 DAY), 'observations...', 2);
(1, 'RE-001', 'PO-001', '111111111', 1, util.VN_NOW(), 'this is test observation', 1, 15, 'Batman'),
(2, 'RE-002', 'PO-002', '111111111', 1, DATE_ADD(util.VN_NOW(), INTERVAL 1 DAY), 'test observation', 1, 20, 'Robin'),
(3, 'RE-003', 'PO-003', '222222222', 2, DATE_ADD(util.VN_NOW(), INTERVAL 2 DAY), 'observations...', 2, 25, 'Driverman');
INSERT INTO `vn`.`expeditionTruck` (`id`, `roadmapFk`, `warehouseFk`, `ETD`, `description`, `userFk`)
VALUES

View File

@ -27,5 +27,17 @@
"userFk": {
"type": "number"
}
}
},
"relations": {
"roadmap": {
"type": "belongsTo",
"model": "Roadmap",
"foreignKey": "roadmapFk"
},
"warehouse": {
"type": "belongsTo",
"model": "Warehouse",
"foreignKey": "warehouseFk"
}
}
}

View File

@ -1,3 +1,3 @@
module.exports = Self => {
require('../methods/trunk/clone')(Self);
require('../methods/roadmap/clone')(Self);
};

View File

@ -35,6 +35,26 @@
},
"price": {
"type": "number"
},
"driverName": {
"type": "string"
}
}
},
"relations": {
"worker": {
"type": "belongsTo",
"model": "Worker",
"foreignKey": "userFk"
},
"supplier": {
"type": "belongsTo",
"model": "Supplier",
"foreignKey": "supplierFk"
},
"expeditionTruck": {
"type": "hasMany",
"model": "ExpeditionTruck",
"foreignKey": "roadmapFk"
}
}
}

View File

@ -16,6 +16,4 @@ import './agency-term/createInvoiceIn';
import './agency-term-search-panel';
import './ticket-popup';
import './sms';
import './trunk/index';
import './trunk/create';
import './trunk-term-search-panel';
import './roadmap';

View File

@ -0,0 +1,108 @@
<mg-ajax path="Roadmaps/{{patch.params.id}}" options="vnPatch"></mg-ajax>
<vn-watcher
vn-id="watcher"
data="$ctrl.roadmap"
form="form"
save="patch">
</vn-watcher>
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
<vn-card class="vn-pa-lg">
<vn-horizontal>
<vn-textfield
vn-one
label="Roadmap"
ng-model="$ctrl.roadmap.trunk"
rule>
</vn-textfield>
<vn-date-picker
vn-one
label="ETD"
ng-model="$ctrl.roadmap.etd">
</vn-date-picker>
</vn-horizontal>
<vn-horizontal>
<vn-textfield
vn-one
label="Tractor plate"
ng-model="$ctrl.roadmap.tractorPlate"
rule>
</vn-textfield>
<vn-textfield
vn-one
label="Trailer plate"
ng-model="$ctrl.roadmap.trailerPlate"
rule>
</vn-textfield>
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
<vn-textfield
vn-one
label="Phone"
ng-model="$ctrl.roadmap.phone"
rule>
</vn-textfield>
<vn-textfield
vn-one
label="Driver name"
ng-model="$ctrl.roadmap.driverName"
rule>
</vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-autocomplete
vn-one
ng-model="$ctrl.entry.supplierFk"
url="Suppliers"
show-field="nickname"
search-function="{or: [{id: $search}, {nickname: {like: '%'+ $search +'%'}}]}"
value-field="id"
order="nickname"
label="Carrier">
<tpl-item>
{{::id}} - {{::nickname}}
</tpl-item>
</vn-autocomplete>
<vn-input-number
vn-one
label="Price"
ng-model="$ctrl.roadmap.price"
rule>
</vn-input-number>
</vn-horizontal>
<vn-horizontal>
<vn-autocomplete
vn-one
ng-model="$ctrl.roadmap.userFk"
url="Workers/activeWithInheritedRole"
show-field="nickname"
search-function="{firstName: $search}"
value-field="id"
where="{role: 'employee'}"
label="Worker">
<tpl-item>
<div>{{name}} - {{nickname}}</div>
</tpl-item>
</vn-autocomplete>
<vn-textArea
vn-one
label="Observations"
ng-model="$ctrl.roadmap.observations"
rule
vn-focus>
</vn-textArea>
</vn-horizontal>
</vn-card>
<vn-button-bar>
<vn-submit
disabled="!watcher.dataChanged()"
label="Save">
</vn-submit>
<vn-button
class="cancel"
label="Undo changes"
disabled="!watcher.dataChanged()"
ng-click="watcher.loadOriginalData()">
</vn-button>
</vn-button-bar>
</form>

View File

@ -0,0 +1,18 @@
import ngModule from '../../module';
import Section from 'salix/components/section';
export default class Controller extends Section {
onSubmit() {
this.$.watcher.submit().then(() =>
this.card.reload()
);
}
}
ngModule.component('vnRoadmapBasicData', {
template: require('./index.html'),
controller: Controller,
bindings: {
roadmap: '<'
}
});

View File

@ -0,0 +1 @@
Carrier: Transportista

View File

@ -0,0 +1,5 @@
<vn-portal slot="menu">
<vn-roadmap-descriptor roadmap="$ctrl.roadmap"></vn-roadmap-descriptor>
<vn-left-menu source="roadmap"></vn-left-menu>
</vn-portal>
<ui-view></ui-view>

View File

@ -0,0 +1,19 @@
import ngModule from '../../module';
import ModuleCard from 'salix/components/module-card';
class Controller extends ModuleCard {
reload() {
const filter = {
include: [
{relation: 'supplier'}
]
};
this.$http.get(`Roadmaps/${this.$params.id}`, {filter})
.then(res => this.roadmap = res.data);
}
}
ngModule.vnComponent('vnRoadmapCard', {
template: require('./index.html'),
controller: Controller
});

View File

@ -0,0 +1,27 @@
import './index';
describe('component vnItemTypeCard', () => {
let controller;
let $httpBackend;
beforeEach(ngModule('item'));
beforeEach(inject(($componentController, _$httpBackend_) => {
$httpBackend = _$httpBackend_;
controller = $componentController('vnItemTypeCard', {$element: null});
}));
describe('reload()', () => {
it('should reload the controller data', () => {
controller.$params.id = 1;
const itemType = {id: 1};
$httpBackend.expectGET('ItemTypes/1').respond(itemType);
controller.reload();
$httpBackend.flush();
expect(controller.itemType).toEqual(itemType);
});
});
});

View File

@ -72,7 +72,7 @@
<vn-button
class="cancel"
label="Cancel"
ui-sref="trunk.index">
ui-sref="roadmap.index">
</vn-button>
</vn-button-bar>
</form>

View File

@ -6,7 +6,7 @@ class Controller extends Section {
onSubmit() {
this.$.watcher.submit().then(
res => {
this.$state.go('trunk.card.summary', {id: res.data.id});
this.$state.go('roadmap.card.summary', {id: res.data.id});
}
);
}
@ -14,7 +14,7 @@ class Controller extends Section {
Controller.$inject = ['$element', '$scope'];
ngModule.vnComponent('vnTrunkCreate', {
ngModule.vnComponent('vnRoadmapCreate', {
template: require('./index.html'),
controller: Controller
});

View File

@ -0,0 +1,21 @@
<vn-descriptor-content
module="route"
base-state="route.roadmap"
description="$ctrl.roadmap.trunk">
<slot-body>
<div class="attributes">
<vn-label-value
label="Trunk"
value="{{$ctrl.roadmap.trunk}}">
</vn-label-value>
<vn-label-value
label="ETD"
value="{{$ctrl.roadmap.etd | date:'dd/MM/yyyy HH:mm'}}">
</vn-label-value>
<vn-label-value
label="Carrier"
value="{{$ctrl.roadmap.supplier.nickname}}">
</vn-label-value>
</div>
</slot-body>
</vn-descriptor-content>

View File

@ -0,0 +1,20 @@
import ngModule from '../../module';
import Descriptor from 'salix/components/descriptor';
class Controller extends Descriptor {
get roadmap() {
return this.entity;
}
set roadmap(value) {
this.entity = value;
}
}
ngModule.component('vnRoadmapDescriptor', {
template: require('./index.html'),
controller: Controller,
bindings: {
roadmap: '<'
}
});

View File

@ -0,0 +1,9 @@
import './main';
import './index/';
import './summary';
import './card';
import './descriptor';
import './create';
import './basic-data';
import './search-panel';
import './stops';

View File

@ -1,19 +1,6 @@
<vn-crud-model
vn-id="model"
url="Roadmaps"
data="roadmaps"
auto-load="true">
</vn-crud-model>
<vn-portal slot="topbar">
<vn-searchbar
auto-state="false"
panel="vn-trunk-search-panel"
info="Search by invoiceIn id or autonomous name"
placeholder="Search autonomous"
filter="{}"
model="model">
</vn-searchbar>
</vn-portal>
<vn-auto-search
model="model">
</vn-auto-search>
<vn-data-viewer
model="model"
class="vn-w-lg">
@ -22,7 +9,7 @@
disabled="$ctrl.totalChecked == 0"
ng-click="$ctrl.openClonationDialog()"
icon="icon-clone"
vn-tooltip="Clone selected trunks">
vn-tooltip="Clone selected roadmaps">
</vn-button>
</vn-card>
<vn-card>
@ -35,8 +22,8 @@
</vn-multi-check>
</vn-th>
<vn-th field="trunk">Trunk</vn-th>
<vn-th field="etd" date>ETD</vn-th>
<vn-th field="driverName">Driver name</vn-th>
<vn-th field="etd" expand date>ETD</vn-th>
<vn-th field="supplierFk">Carrier</vn-th>
<vn-th field="plate">Plate</vn-th>
<vn-th field="price">Price</vn-th>
<vn-th field="observations" expand>Observations</vn-th>
@ -44,9 +31,9 @@
</vn-tr>
</vn-thead>
<vn-tbody>
<a ng-repeat="roadmap in roadmaps"
<a ng-repeat="roadmap in model.data"
class="clickable vn-tr search-result"
ui-sref="roadmap.card.summary({id: {{::roadmap.id}}})">
ui-sref="route.roadmap.card.summary({id: {{::roadmap.id}}})">
<vn-td>
<vn-check
ng-model="roadmap.checked"
@ -54,15 +41,8 @@
</vn-check>
</vn-td>
<vn-td>{{::roadmap.trunk | dashIfEmpty}}</vn-td>
<vn-td date>{{::roadmap.etd | date:'dd/MM/yyyy HH:mm'}}</vn-td>
<!-- <vn-td>
<span
class="link"
vn-click-stop="clientDescriptor.show($event, roadmap.clientFk)">
{{::roadmap.clientSocialName | dashIfEmpty}}
</span>
</vn-td> -->
<vn-td>{{::roadmap.driverName | dashIfEmpty}}</vn-td>
<vn-td expand date>{{::roadmap.etd | date:'dd/MM/yyyy HH:mm'}}</vn-td>
<vn-td>{{::roadmap.supplier.nickname | dashIfEmpty}}</vn-td>
<vn-td>{{::roadmap.tractorPlate | dashIfEmpty}}</vn-td>
<vn-td expand>{{::roadmap.price | currency: 'EUR':2 | dashIfEmpty}}</vn-td>
<vn-td expand>{{::roadmap.observations | dashIfEmpty}}</vn-td>
@ -79,20 +59,17 @@
</vn-card>
</vn-data-viewer>
<a
ui-sref="route.trunk.create"
vn-tooltip="Create trunk"
ui-sref="route.roadmap.create"
vn-tooltip="Create roadmap"
vn-bind="+"
fixed-bottom-right>
<vn-float-button icon="add"></vn-float-button>
</a>
<vn-popup vn-id="summary">
<vn-invoice-out-summary
invoice-out="$ctrl.selectedInvoiceOut">
</vn-invoice-out-summary>
<vn-roadmap-summary
roadmap="$ctrl.roadmapSelected">
</vn-roadmap-summary>
</vn-popup>
<vn-invoice-out-manual
vn-id="manual-invoicing">
</vn-invoice-out-manual>
<!-- Clonation dialog -->
<vn-dialog class="edit"

View File

@ -2,29 +2,6 @@ import ngModule from '../../module';
import Section from 'salix/components/section';
class Controller extends Section {
constructor($element, $) {
super($element, $);
}
exprBuilder(param, value) {
switch (param) {
case 'agencyModeFk':
return {'a.agencyModeFk': value};
case 'supplierFk':
return {'a.supplierName': value};
case 'routeFk':
return {'a.routeFk': value};
case 'created':
case 'agencyFk':
case 'packages':
case 'm3':
case 'kmTotal':
case 'price':
case 'invoiceInFk':
return {[`a.${param}`]: value};
}
}
get checked() {
const roadmaps = this.$.model.data || [];
const checkedRoadmap = [];
@ -40,8 +17,8 @@ class Controller extends Section {
return this.checked.length;
}
preview(route) {
this.routeSelected = route;
preview(roadmap) {
this.roadmapSelected = roadmap;
this.$.summary.show();
}
@ -69,7 +46,7 @@ class Controller extends Section {
}
}
ngModule.vnComponent('vnTrunkIndex', {
ngModule.vnComponent('vnRoadmapIndex', {
template: require('./index.html'),
controller: Controller
});

View File

@ -1,12 +1,12 @@
Trunks: Troncales
Trunk: Troncal
Driver name: Transportista
Roadmaps: Troncales
Roadmap: Troncal
Driver name: Nombre conductor
Plate: Matrícula
Price: Precio
Observations: Observaciones
Clone selected trunks: Clonar troncales seleccionadas
Clone selected roadmaps: Clonar troncales seleccionadas
Select the estimated time of departure (ETD): Seleccione la hora estimada de salida (ETD)
Create trunk: Crear troncal
Create roadmap: Crear troncal
Tractor plate: Matrícula tractor
Trailer plate: Matrícula trailer

View File

@ -0,0 +1,19 @@
<vn-crud-model
vn-id="model"
url="Roadmaps"
include="$ctrl.include"
auto-load="true"
limit="20">
</vn-crud-model>
<vn-portal slot="topbar">
<vn-searchbar
info="Search roadmap by id, name or code"
panel="vn-roadmap-search-panel"
model="model"
expr-builder="$ctrl.exprBuilder(param, value)"
base-state="route.roadmap">
</vn-searchbar>
</vn-portal>
<ui-view>
<vn-roadmap-index></vn-roadmap-index>
</ui-view>

View File

@ -0,0 +1,31 @@
import ngModule from '../../module';
import ModuleMain from 'salix/components/module-main';
export default class ItemType extends ModuleMain {
constructor($element, $) {
super($element, $);
this.include = {
relation: 'supplier'
};
}
exprBuilder(param, value) {
switch (param) {
case 'search':
return /^\d+$/.test(value)
? {id: value}
: {or: [
{name: {like: `%${value}%`}},
{code: {like: `%${value}%`}}
]};
case 'name':
case 'code':
return {[param]: {like: `%${value}%`}};
}
}
}
ngModule.vnComponent('vnRoadmap', {
controller: ItemType,
template: require('./index.html')
});

View File

@ -0,0 +1,31 @@
import './index';
describe('Item', () => {
describe('Component vnItemType', () => {
let controller;
beforeEach(ngModule('item'));
beforeEach(inject($componentController => {
const $element = angular.element('<vn-item-type></vn-item-type>');
controller = $componentController('vnItemType', {$element});
}));
describe('exprBuilder()', () => {
it('should return a filter based on a search by id', () => {
const filter = controller.exprBuilder('search', '123');
expect(filter).toEqual({id: '123'});
});
it('should return a filter based on a search by name or code', () => {
const filter = controller.exprBuilder('search', 'Alstroemeria');
expect(filter).toEqual({or: [
{name: {like: '%Alstroemeria%'}},
{code: {like: '%Alstroemeria%'}},
]});
});
});
});
});

View File

@ -0,0 +1 @@
Search itemType by id, name or code: Buscar familia por id, nombre o código

View File

@ -0,0 +1,22 @@
<div class="search-panel">
<form ng-submit="$ctrl.onSearch()">
<vn-horizontal>
<vn-textfield
vn-one
label="Name"
ng-model="filter.name"
vn-focus>
</vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-textfield
vn-one
label="Code"
ng-model="filter.code">
</vn-textfield>
</vn-horizontal>
<vn-horizontal class="vn-mt-lg">
<vn-submit label="Search"></vn-submit>
</vn-horizontal>
</form>
</div>

View File

@ -0,0 +1,7 @@
import ngModule from '../../module';
import SearchPanel from 'core/components/searchbar/search-panel';
ngModule.component('vnRoadmapSearchPanel', {
template: require('./index.html'),
controller: SearchPanel
});

View File

@ -0,0 +1,49 @@
<vn-crud-model
vn-id="model"
url="ExpeditionTrucks"
where="{roadmapFk: $ctrl.$params.id}"
order="ETD ASC"
data="$ctrl.expeditionTrucks"
auto-load="true">
</vn-crud-model>
<vn-data-viewer
model="model">
<form
class="vn-w-xl"
name="form">
<vn-card>
<section class="vn-pa-md">
<vn-table class="vn-pt-md" model="model" auto-load="false" vn-droppable="$ctrl.onDrop($event)">
<vn-thead>
<vn-tr>
<vn-th field="warehouse">Warehouse</vn-th>
<vn-th expand field="ETD" expand>ETA</vn-th>
<vn-th field="description">Description</vn-th>
<vn-th shrink></vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="expeditionTruck in $ctrl.expeditionTrucks">
<vn-td>{{::expeditionTruck.warehouseFk}}</vn-td>
<vn-td expand>{{::expeditionTruck.ETD | date:'dd/MM/yyyy HH:mm'}}</vn-td>
<vn-td>{{::expeditionTruck.description}}</vn-td>
<vn-td>
<vn-icon-button
translate-attr="{title: 'Remove stop'}"
icon="delete"
ng-click="$ctrl.showDeleteConfirm(expeditionTruck.id)"
tabindex="-1">
</vn-icon-button>
</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
</section>
</vn-card>
</form>
</vn-data-viewer>
<vn-confirm
vn-id="confirm"
question="Delete stop?"
on-accept="$ctrl.removeTicketFromRoute($index)">
</vn-confirm>

View File

@ -0,0 +1,27 @@
import ngModule from '../../module';
import Section from 'salix/components/section';
export default class Controller extends Section {
showDeleteConfirm(id) {
this.selectedExpeditionTruck = id;
this.$.confirm.show();
}
removeExpeditionTruck($index) {
let params = {routeFk: null};
let query = `Tickets/${this.selectedExpeditionTruck}/`;
this.$http.patch(query, params).then(() => {
this.$.model.remove($index);
this.vnApp.showSuccess(this.$t('Ticket removed from route'));
this.updateVolume();
});
}
}
ngModule.component('vnRoadmapStops', {
template: require('./index.html'),
controller: Controller,
bindings: {
roadmap: '<'
}
});

View File

@ -0,0 +1 @@
Delete stop: Eliminar parada

View File

@ -0,0 +1,62 @@
<vn-card class="summary">
<h5>
<span>{{summary.id}} - {{summary.trunk}}</span>
</h5>
<vn-horizontal class="vn-pa-md">
<vn-one>
<vn-label-value
label="Carrier"
value="{{summary.supplier.nickname}}">
</vn-label-value>
<vn-label-value
label="ETD"
value="{{summary.etd | date:'dd/MM/yyyy HH:mm'}}">
</vn-label-value>
<vn-label-value
label="Tractor plate"
value="{{summary.tractorPlate}}">
</vn-label-value>
<vn-label-value
label="Trailer plate"
value="{{summary.trailerPlate}}">
</vn-label-value>
</vn-one>
<vn-one>
<vn-label-value
label="Phone"
value="{{summary.phone}}">
</vn-label-value>
<vn-label-value
label="Worker"
value="{{summary.worker.firstName}} {{summary.worker.lastName}}">
</vn-label-value>
<vn-label-value
label="Observations"
value="{{summary.observations}}">
</vn-label-value>
</vn-one>
<vn-auto>
<h4>
<a
ui-sref="route.roadmap.card.stops({id:summary.id})"
target="_self">
<span translate vn-tooltip="Go to">Stops</span>
</a>
</h4>
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th>Wharehouse</vn-th>
<vn-th>ETA</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="expeditionTruck in summary.expeditionTruck">
<vn-td>{{expeditionTruck.warehouse.name}}</vn-td>
<vn-td expand>{{expeditionTruck.ETD | date:'dd/MM/yyyy HH:mm'}}</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
</vn-auto>
</vn-horizontal>
</vn-card>

View File

@ -0,0 +1,37 @@
import ngModule from '../../module';
import Component from 'core/lib/component';
class Controller extends Component {
set roadmap(value) {
this._roadmap = value;
this.$.summary = null;
if (!value) return;
const filter = {
include: [
{relation: 'supplier'},
{relation: 'worker'},
{relation: 'expeditionTruck',
scope: {
include: [
{relation: 'warehouse'}
]
}}
]
};
this.$http.get(`Roadmaps/${value.id}`, {filter})
.then(res => this.$.summary = res.data);
}
get roadmap() {
return this._roadmap;
}
}
ngModule.component('vnRoadmapSummary', {
template: require('./index.html'),
controller: Controller,
bindings: {
roadmap: '<'
}
});

View File

@ -0,0 +1,2 @@
Stops: Paradas
Wharehouse: Almacén

View File

@ -8,12 +8,16 @@
"main": [
{"state": "route.index", "icon": "icon-delivery"},
{"state": "route.agencyTerm.index", "icon": "icon-agency-term"},
{"state": "route.trunk.index", "icon": "contact_support"}
{"state": "route.roadmap", "icon": "contact_support"}
],
"card": [
{"state": "route.card.basicData", "icon": "settings"},
{"state": "route.card.tickets", "icon": "icon-ticket"},
{"state": "route.card.log", "icon": "history"}
],
"roadmap": [
{"state": "route.roadmap.card.basicData", "icon": "settings"},
{"state": "route.roadmap.card.stops", "icon": "icon-lines"}
]
},
"routes": [
@ -92,20 +96,45 @@
},
"acl": ["delivery"]
}, {
"url": "/trunk?q",
"abstract": true,
"state": "route.trunk",
"component": "ui-view"
"url": "/roadmap?q",
"state": "route.roadmap",
"component": "vn-roadmap",
"description": "Roadmaps"
}, {
"url": "/index",
"state": "route.trunk.index",
"component": "vn-trunk-index",
"description": "Trunks"
},{
"url": "/create",
"state": "route.trunk.create",
"component": "vn-trunk-create",
"description": "Create trunk"
"state": "route.roadmap.create",
"component": "vn-roadmap-create",
"description": "Create roadmap"
},{
"url": "/:id",
"state": "route.roadmap.card",
"component": "vn-roadmap-card",
"abstract": true,
"description": "Detail"
},{
"url": "/summary",
"state": "route.roadmap.card.summary",
"component": "vn-roadmap-summary",
"description": "Summary",
"params": {
"roadmap": "$ctrl.roadmap"
}
},{
"url": "/basic-data",
"state": "route.roadmap.card.basicData",
"component": "vn-roadmap-basic-data",
"description": "Basic data",
"params": {
"roadmap": "$ctrl.roadmap"
}
}, {
"url": "/stops",
"state": "route.roadmap.card.stops",
"component": "vn-roadmap-stops",
"description": "Stops",
"params": {
"route": "$ctrl.roadmap"
}
}
]
}

View File

@ -1,47 +0,0 @@
<div class="search-panel">
<form id="manifold-form" ng-submit="$ctrl.onSearch()">
<vn-horizontal class="vn-px-lg vn-pt-lg">
<vn-textfield
vn-one
label="General search"
ng-model="filter.search"
vn-focus>
</vn-textfield>
</vn-horizontal>
<vn-horizontal class="vn-px-lg">
<vn-autocomplete vn-one
url="AgencyModes"
label="Agency route"
show-field="name"
value-field="id"
ng-model="filter.agencyModeFk">
</vn-autocomplete>
<vn-autocomplete vn-one
url="Agencies"
label="Agency Agreement"
show-field="name"
value-field="id"
ng-model="filter.agencyFk">
</vn-autocomplete>
</vn-horizontal>
<section class="vn-px-md">
<vn-horizontal class="manifold-panel vn-pa-md">
<vn-date-picker
vn-one
label="From"
ng-model="filter.from"
on-change="$ctrl.from = value">
</vn-date-picker>
<vn-date-picker
vn-one
label="To"
ng-model="filter.to"
on-change="$ctrl.to = value">
</vn-date-picker>
</vn-horizontal>
</section>
<vn-horizontal class="vn-px-lg vn-pb-lg vn-mt-lg">
<vn-submit label="Search"></vn-submit>
</vn-horizontal>
</form>
</div>

View File

@ -1,17 +0,0 @@
import ngModule from '../module';
import SearchPanel from 'core/components/searchbar/search-panel';
class Controller extends SearchPanel {
get filter() {
return this.$.filter;
}
set filter(value = {}) {
this.$.filter = value;
}
}
ngModule.vnComponent('vnTrunkSearchPanel', {
template: require('./index.html'),
controller: Controller
});

View File

@ -1,2 +0,0 @@
Search by invoiceIn id or autonomous name: Buscar por id de recibida o por nombre de autónomo
Search autonomous: Buscar autónomos