added Agency module
This commit is contained in:
parent
7afa99f25d
commit
4388a6dbff
|
@ -0,0 +1 @@
|
|||
export * from './src';
|
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"module": "agency",
|
||||
"name": "Agencies",
|
||||
"icon" : "local_shipping",
|
||||
"validations" : true,
|
||||
"routes": [
|
||||
{
|
||||
"url": "/zone",
|
||||
"state": "zone",
|
||||
"abstract": true,
|
||||
"component": "ui-view",
|
||||
"description": "Zones"
|
||||
},
|
||||
{
|
||||
"url": "/index?q",
|
||||
"state": "zone.index",
|
||||
"component": "vn-zone-index",
|
||||
"description": "List",
|
||||
"acl": ["developer"]
|
||||
},
|
||||
{
|
||||
"url": "/create",
|
||||
"state": "zone.create",
|
||||
"component": "vn-zone-create",
|
||||
"description": "New zone"
|
||||
},
|
||||
{
|
||||
"url": "/:id",
|
||||
"state": "zone.card",
|
||||
"abstract": true,
|
||||
"component": "vn-zone-card"
|
||||
},
|
||||
{
|
||||
"url": "/basic-data",
|
||||
"state": "zone.card.basicData",
|
||||
"component": "vn-zone-basic-data",
|
||||
"description": "Basic data",
|
||||
"params": {
|
||||
"zone": "$ctrl.zone"
|
||||
},
|
||||
"menu": {
|
||||
"icon": "settings"
|
||||
}
|
||||
},
|
||||
{
|
||||
"url": "/delivery-day",
|
||||
"state": "zone.card.deliveryDay",
|
||||
"component": "vn-zone-delivery-day",
|
||||
"description": "Delivery days",
|
||||
"params": {
|
||||
"zone": "$ctrl.zone"
|
||||
},
|
||||
"menu": {
|
||||
"icon": "today"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
export * from './module';
|
||||
|
||||
// import components
|
||||
import './zone/card';
|
||||
import './zone/descriptor';
|
||||
import './zone/search-panel';
|
||||
import './zone/index';
|
||||
import './zone/create';
|
||||
import './zone/basic-data';
|
||||
import './zone/delivery-day';
|
||||
import './zone/calendar';
|
|
@ -0,0 +1 @@
|
|||
Agencies: Agencies
|
|
@ -0,0 +1,11 @@
|
|||
Name: Nombre
|
||||
Agency: Agencia
|
||||
Warehouse: Almacén
|
||||
Hour: Hora (ETD)
|
||||
Price: Precio
|
||||
Create: Crear
|
||||
|
||||
Zones: Zonas
|
||||
List: Listado
|
||||
New zone: Nueva zona
|
||||
Basic data: Datos básicos
|
|
@ -0,0 +1,5 @@
|
|||
import {ng} from 'vendor';
|
||||
import 'core';
|
||||
|
||||
const ngModule = ng.module('agency', ['vnCore']);
|
||||
export default ngModule;
|
|
@ -1,4 +1,4 @@
|
|||
<mg-ajax path="/route/api/Zones/{{patch.params.id}}" options="vnPatch"></mg-ajax>
|
||||
<mg-ajax path="/agency/api/Zones/{{patch.params.id}}" options="vnPatch"></mg-ajax>
|
||||
<vn-watcher
|
||||
vn-id="watcher"
|
||||
data="$ctrl.zone"
|
||||
|
@ -18,7 +18,7 @@
|
|||
<vn-autocomplete
|
||||
vn-one
|
||||
field="$ctrl.zone.warehouseFk"
|
||||
url="/route/api/Warehouses"
|
||||
url="/agency/api/Warehouses"
|
||||
show-field="name"
|
||||
value-field="id"
|
||||
label="Warehouse">
|
||||
|
@ -26,7 +26,7 @@
|
|||
<vn-autocomplete
|
||||
vn-one
|
||||
field="$ctrl.zone.agencyModeFk"
|
||||
url="/route/api/AgencyModes"
|
||||
url="/agency/api/AgencyModes"
|
||||
show-field="name"
|
||||
value-field="id"
|
||||
label="Agency">
|
|
@ -18,7 +18,7 @@ class Controller {
|
|||
]
|
||||
};
|
||||
let json = encodeURIComponent(JSON.stringify(filter));
|
||||
let query = `/route/api/Zones/${this.$stateParams.id}?filter=${json}`;
|
||||
let query = `/agency/api/Zones/${this.$stateParams.id}?filter=${json}`;
|
||||
this.$http.get(query).then(res => {
|
||||
if (res.data)
|
||||
this.zone = res.data;
|
|
@ -1,6 +1,6 @@
|
|||
import './index.js';
|
||||
|
||||
describe('Route', () => {
|
||||
describe('Agency', () => {
|
||||
describe('Component vnZoneCard', () => {
|
||||
let $componentController;
|
||||
let $scope;
|
||||
|
@ -9,7 +9,7 @@ describe('Route', () => {
|
|||
let $stateParams;
|
||||
|
||||
beforeEach(() => {
|
||||
angular.mock.module('route');
|
||||
angular.mock.module('agency');
|
||||
});
|
||||
|
||||
beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_) => {
|
||||
|
@ -30,7 +30,7 @@ describe('Route', () => {
|
|||
]
|
||||
};
|
||||
let json = encodeURIComponent(JSON.stringify(filter));
|
||||
$httpBackend.expectGET(`/route/api/Zones/1?filter=${json}`).respond({id: 1});
|
||||
$httpBackend.expectGET(`/agency/api/Zones/1?filter=${json}`).respond({id: 1});
|
||||
controller.getCard();
|
||||
$httpBackend.flush();
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<mg-ajax path="/route/api/Zones" options="vnPost"></mg-ajax>
|
||||
<mg-ajax path="/agency/api/Zones" options="vnPost"></mg-ajax>
|
||||
<vn-watcher
|
||||
vn-id="watcher"
|
||||
data="$ctrl.zone"
|
||||
|
@ -19,7 +19,7 @@
|
|||
<vn-autocomplete
|
||||
vn-one
|
||||
field="$ctrl.zone.warehouseFk"
|
||||
url="/route/api/Warehouses"
|
||||
url="/agency/api/Warehouses"
|
||||
show-field="name"
|
||||
value-field="id"
|
||||
label="Warehouse">
|
||||
|
@ -27,7 +27,7 @@
|
|||
<vn-autocomplete
|
||||
vn-one
|
||||
field="$ctrl.zone.agencyModeFk"
|
||||
url="/route/api/AgencyModes"
|
||||
url="/agency/api/AgencyModes"
|
||||
show-field="name"
|
||||
value-field="id"
|
||||
label="Agency">
|
|
@ -1,7 +1,7 @@
|
|||
import './index';
|
||||
import {watcher} from '../../../../helpers/watcherHelper';
|
||||
|
||||
describe('Route', () => {
|
||||
describe('Agency', () => {
|
||||
describe('Component vnZoneCreate', () => {
|
||||
let $componentController;
|
||||
let $httpBackend;
|
||||
|
@ -10,14 +10,13 @@ describe('Route', () => {
|
|||
let controller;
|
||||
|
||||
beforeEach(() => {
|
||||
angular.mock.module('route');
|
||||
angular.mock.module('agency');
|
||||
});
|
||||
|
||||
beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_, _$state_) => {
|
||||
$componentController = _$componentController_;
|
||||
$httpBackend = _$httpBackend_;
|
||||
$httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
|
||||
$httpBackend.when('GET', 'claim/api/Claims/ClaimBeginnings').respond({});
|
||||
$scope = $rootScope.$new();
|
||||
$state = _$state_;
|
||||
$scope.watcher = watcher;
|
|
@ -1,6 +1,6 @@
|
|||
<vn-crud-model
|
||||
vn-id="model"
|
||||
url="/route/api/Zones"
|
||||
url="/agency/api/Zones"
|
||||
filter="::$ctrl.filter"
|
||||
limit="20"
|
||||
data="zones"
|
||||
|
@ -51,5 +51,5 @@
|
|||
</div>
|
||||
|
||||
<a ui-sref="zone.create" vn-tooltip="New zone" vn-bind="+" fixed-bottom-right>
|
||||
<vn-float-button icon="add_location"></vn-float-button>
|
||||
<vn-float-button icon="add"></vn-float-button>
|
||||
</a>
|
|
@ -1,12 +1,12 @@
|
|||
import './index.js';
|
||||
|
||||
describe('Route', () => {
|
||||
describe('Agency', () => {
|
||||
describe('Component vnZoneIndex', () => {
|
||||
let $componentController;
|
||||
let controller;
|
||||
|
||||
beforeEach(() => {
|
||||
angular.mock.module('route');
|
||||
angular.mock.module('agency');
|
||||
});
|
||||
|
||||
beforeEach(angular.mock.inject(_$componentController_ => {
|
|
@ -7,3 +7,4 @@ ticket: [item, client]
|
|||
order: [item, ticket]
|
||||
claim: [item, client]
|
||||
route: []
|
||||
agency: []
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"icon" : "local_shipping",
|
||||
"validations" : true,
|
||||
"routes": [
|
||||
/* {
|
||||
{
|
||||
"url": "/route",
|
||||
"state": "route",
|
||||
"abstract": true,
|
||||
|
@ -17,56 +17,6 @@
|
|||
"component": "vn-route-index",
|
||||
"description": "List",
|
||||
"acl": ["developer"]
|
||||
}, */
|
||||
{
|
||||
"url": "/zone",
|
||||
"state": "zone",
|
||||
"abstract": true,
|
||||
"component": "ui-view",
|
||||
"description": "Zones"
|
||||
},
|
||||
{
|
||||
"url": "/index?q",
|
||||
"state": "zone.index",
|
||||
"component": "vn-zone-index",
|
||||
"description": "List",
|
||||
"acl": ["developer"]
|
||||
},
|
||||
{
|
||||
"url": "/create",
|
||||
"state": "zone.create",
|
||||
"component": "vn-zone-create",
|
||||
"description": "New zone"
|
||||
},
|
||||
{
|
||||
"url": "/:id",
|
||||
"state": "zone.card",
|
||||
"abstract": true,
|
||||
"component": "vn-zone-card"
|
||||
},
|
||||
{
|
||||
"url": "/basic-data",
|
||||
"state": "zone.card.basicData",
|
||||
"component": "vn-zone-basic-data",
|
||||
"description": "Basic data",
|
||||
"params": {
|
||||
"zone": "$ctrl.zone"
|
||||
},
|
||||
"menu": {
|
||||
"icon": "settings"
|
||||
}
|
||||
},
|
||||
{
|
||||
"url": "/delivery-day",
|
||||
"state": "zone.card.deliveryDay",
|
||||
"component": "vn-zone-delivery-day",
|
||||
"description": "Delivery days",
|
||||
"params": {
|
||||
"zone": "$ctrl.zone"
|
||||
},
|
||||
"menu": {
|
||||
"icon": "today"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,11 +1,3 @@
|
|||
export * from './module';
|
||||
|
||||
// import components
|
||||
import './zone/card';
|
||||
import './zone/descriptor';
|
||||
import './zone/search-panel';
|
||||
import './zone/index';
|
||||
import './zone/create';
|
||||
import './zone/basic-data';
|
||||
import './zone/delivery-day';
|
||||
import './zone/calendar';
|
||||
|
|
|
@ -1,11 +1,2 @@
|
|||
Name: Nombre
|
||||
Agency: Agencia
|
||||
Warehouse: Almacén
|
||||
Hour: Hora (ETD)
|
||||
Price: Precio
|
||||
Create: Crear
|
||||
|
||||
Zones: Zonas
|
||||
Routes: Rutas
|
||||
List: Listado
|
||||
New zone: Nueva zona
|
||||
Basic data: Datos básicos
|
|
@ -26,3 +26,4 @@ Routes: Rutas
|
|||
What is new: Novedades de la versión
|
||||
Web Account inactive: Sin acceso Web
|
||||
Orders: Pedidos
|
||||
Agencies: Agencias
|
|
@ -10,5 +10,7 @@ export default {
|
|||
order:
|
||||
cb => require.ensure([], () => cb(require('order'))),
|
||||
claim:
|
||||
cb => require.ensure([], () => cb(require('claim')))
|
||||
cb => require.ensure([], () => cb(require('claim'))),
|
||||
agency:
|
||||
cb => require.ensure([], () => cb(require('agency')))
|
||||
};
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,5 @@
|
|||
FROM vn-loopback:latest
|
||||
|
||||
COPY route /app
|
||||
WORKDIR /app
|
||||
CMD ["pm2-docker", "./server/server.js"]
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "vn-agency",
|
||||
"version": "1.0.0",
|
||||
"main": "server/server.js",
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
"start": "node .",
|
||||
"posttest": "npm run lint && nsp check"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://git.verdnatura.es/salix"
|
||||
},
|
||||
"license": "GPL-3.0",
|
||||
"description": "vn-agency",
|
||||
"dependencies": {
|
||||
"vn-loopback": "file:../loopback"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"Zone": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"ZoneGeo": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"ZoneCalendar": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"ZoneIncluded": {
|
||||
"dataSource": "vn"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
var vnLoopback = require('vn-loopback/server/server.js');
|
||||
|
||||
var app = module.exports = vnLoopback.loopback();
|
||||
vnLoopback.boot(app, __dirname, module);
|
|
@ -4,17 +4,5 @@
|
|||
},
|
||||
"Vehicle": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"Zone": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"ZoneGeo": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"ZoneCalendar": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"ZoneIncluded": {
|
||||
"dataSource": "vn"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue