rename new module article to item

This commit is contained in:
Daniel Herrero 2017-12-19 11:24:24 +01:00
parent f0c9b2beca
commit 37bdd9d2b6
14 changed files with 40 additions and 36 deletions

View File

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

View File

@ -1,21 +0,0 @@
{
"module": "articles",
"name": "Articles",
"icon": "/static/images/icon_articles.svg",
"routes": [
{
"state": "articles",
"abstract": true,
"acl": ["employee"]
},
{
"url": "/articles",
"state": "articles.index",
"component": "vn-articles-index"
}, {
"url": "/create",
"state": "articles.create",
"component": "vn-client-create"
}
]
}

View File

@ -1,3 +0,0 @@
{
"Articles": "Artículos"
}

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

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

22
client/item/routes.json Normal file
View File

@ -0,0 +1,22 @@
{
"module": "item",
"name": "Items",
"icon": "/static/images/icon_articles.svg",
"routes": [
{
"url": "/item",
"state": "item",
"abstract": true,
"component": "ui-view"
},
{
"url": "/list",
"state": "item.index",
"component": "vn-item-list"
}, {
"url": "/create",
"state": "item.create",
"component": "vn-item-create"
}
]
}

View File

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

View File

@ -0,0 +1 @@
<h1>hi world</h1>

View File

@ -1,6 +1,6 @@
import ngModule from '../module';
export default class Controller {
class ItemList {
constructor() {
this.model = {};
}
@ -9,7 +9,7 @@ export default class Controller {
}
}
ngModule.component('vnArticlesIndex', {
template: require('./index.html'),
controller: Controller
ngModule.component('vnItemList', {
template: require('./list.html'),
controller: ItemList
});

View File

@ -0,0 +1,4 @@
{
"Items": "Artículos",
"Item": "Artículo"
}

View File

@ -6,5 +6,5 @@
"production": [],
"route": [],
"locator": [],
"articles": []
"item": []
}

View File

@ -13,6 +13,7 @@
"Production" : "Producción",
"Modules access" : "Acceso a módulos",
"Locator": "Localizador",
"Items": "Artículos",
"name": "Nombre",
"credit": "Crédito",
"phone": "Teléfono",

View File

@ -44,13 +44,13 @@ export const locator = () => {
core.splitingRegister.register('locator', locator);
export const articles = () => {
export const item = () => {
return new Promise(resolve => {
require.ensure([], () => {
require('articles');
resolve('articles');
}, 'articles');
require('item');
resolve('item');
}, 'item');
});
};
core.splitingRegister.register('articles', articles);
core.splitingRegister.register('item', item);