new module locator

This commit is contained in:
Daniel Herrero 2017-11-02 11:13:20 +01:00
parent 3d9c46f08e
commit 93661fe8e3
12 changed files with 65 additions and 3 deletions

1
client/locator/index.js Normal file
View File

@ -0,0 +1 @@
export * from './src/locator';

View File

@ -0,0 +1,13 @@
{
"module": "locator",
"name": "Locator",
"icon": "add_location",
"validations" : false,
"routes": [
{
"url": "/locator",
"state": "locator",
"component": "vn-locator-index"
}
]
}

View File

@ -0,0 +1,8 @@
<vn-card margin-large>
<vn-vertical pad-medium>
<vn-horizontal vn-one margin-large-bottom class="locator-header">
<vn-title vn-one>Routes locator
</vn-title>
</vn-horizontal>
</vn-vertical>
</vn-card>

View File

@ -0,0 +1,14 @@
import ngModule from '../module';
//import './style.scss';
class LocatorIndex {
constructor($state) {
this.$state = $state;
}
}
LocatorIndex.$inject = ['$state'];
ngModule.component('vnLocatorIndex', {
template: require('./index.html'),
controller: LocatorIndex
});

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1,3 @@
{
"Routes locator": "Localizador de rutas"
}

View File

@ -0,0 +1,3 @@
export * from './module';
import './index/index';

View File

@ -0,0 +1,5 @@
import {ng} from 'vendor';
import 'core';
const ngModule = ng.module('locator', []);
export default ngModule;

View File

@ -4,5 +4,6 @@
"core": [],
"client": [],
"production": [],
"route": []
"route": [],
"locator": []
}

View File

@ -13,7 +13,8 @@
{
"url": "/list",
"state": "routes.index",
"component": "vn-route-index"
"component": "vn-route-index",
"acl": ["employee"]
},
{
"url": "/create",

View File

@ -11,5 +11,6 @@
"Clients": "Clientes",
"Routes" : "Rutas",
"Production" : "Producción",
"Modules access" : "Acceso a módulos"
"Modules access" : "Acceso a módulos",
"Locator": "Localizador"
}

View File

@ -32,3 +32,14 @@ export const route = () => {
};
core.splitingRegister.register('route', route);
export const locator = () => {
return new Promise(resolve => {
require.ensure([], () => {
require('locator');
resolve('locator');
}, 'locator');
});
};
core.splitingRegister.register('locator', locator);