From 011d9d7dc9bd511ba70a8ce685f390b2ccdc7032 Mon Sep 17 00:00:00 2001 From: nelo Date: Wed, 9 Nov 2016 14:09:12 +0100 Subject: [PATCH] =?UTF-8?q?integraci=C3=B3n=20customer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- @salix-services/customer/server/config.json | 2 +- .../customer/server/middleware/cors.js | 2 +- @salix-services/salix/client/index.ejs | 34 ++++++++++++++----- @salix/crud/src/crud.js | 14 ++++++++ @salix/crud/src/customer/index/index.js | 4 +-- @salix/crud/src/navigation/index/list.html | 2 +- 6 files changed, 45 insertions(+), 13 deletions(-) diff --git a/@salix-services/customer/server/config.json b/@salix-services/customer/server/config.json index 40d45f4d6..cb129390a 100644 --- a/@salix-services/customer/server/config.json +++ b/@salix-services/customer/server/config.json @@ -1,7 +1,7 @@ { "restApiRoot": "/api", "host": "0.0.0.0", - "port": 3000, + "port": 3002, "remoting": { "context": false, "rest": { diff --git a/@salix-services/customer/server/middleware/cors.js b/@salix-services/customer/server/middleware/cors.js index 9d8ad644c..0ed65375c 100644 --- a/@salix-services/customer/server/middleware/cors.js +++ b/@salix-services/customer/server/middleware/cors.js @@ -9,7 +9,7 @@ var corsOptions = { } module.exports = function() { - return cors(corsOptions); + return cors({origin: true}); }; diff --git a/@salix-services/salix/client/index.ejs b/@salix-services/salix/client/index.ejs index b6845abfd..33436fd27 100644 --- a/@salix-services/salix/client/index.ejs +++ b/@salix-services/salix/client/index.ejs @@ -1,9 +1,27 @@ + - - Ejemplo1 - - - -

Párrafo de ejemplo

- -fore \ No newline at end of file + + + Salix + + +
+
+ index + add + edit + delete + navigation +
+ + + + + diff --git a/@salix/crud/src/crud.js b/@salix/crud/src/crud.js index b8e3ce4aa..fab68853b 100644 --- a/@salix/crud/src/crud.js +++ b/@salix/crud/src/crud.js @@ -6,3 +6,17 @@ export {NAME as CUSTOMER_ADD, COMPONENT as CUSTOMER_ADD_COMPONENT} from './customer/index/add'; export {NAME as CUSTOMER_LIST, COMPONENT as CUSTOMER_LIST_COMPONENT} from './customer/index/list'; + + +export {NAME as NAVIGATION_INDEX, + COMPONENT as NAVIGATION_INDEX_COMPONENT} from './navigation/index'; +export {NAME as NAVIGATION_ITEM, + COMPONENT as NAVIGATION_ITEM_COMPONENT} from './navigation/index/item'; +export {NAME as NAVIGATION_LIST, + COMPONENT as NAVIGATION_LIST_COMPONENT} from './navigation/index/list'; +export {NAME as NAVIGATION_HEADER, + COMPONENT as NAVIGATION_HEADER_COMPONENT} from './navigation/index/header'; +export {NAME as NAVIGATION_MAIN, + COMPONENT as NAVIGATION_MAIN_COMPONENT} from './navigation/index/main'; +export {NAME as NAVIGATION_COMPOSE, + COMPONENT as NAVIGATION_COMPOSE_COMPONENT} from './navigation/index/compose'; \ No newline at end of file diff --git a/@salix/crud/src/customer/index/index.js b/@salix/crud/src/customer/index/index.js index 782e1038c..5e83e661d 100644 --- a/@salix/crud/src/customer/index/index.js +++ b/@salix/crud/src/customer/index/index.js @@ -4,10 +4,10 @@ import {module} from '../../module'; export const NAME = 'customerIndex'; export const COMPONENT = { template: template, - controller: function() { + controller: function($http) { this.users = [{id: 10, name: "xxxx"}]; this.search = function() { - $http.post('http://localhost:3000/api/Customers', {name: 'nelo'}); + $http.post('/customer/api/Customers', {name: 'nelo'}); }; } }; diff --git a/@salix/crud/src/navigation/index/list.html b/@salix/crud/src/navigation/index/list.html index 8c1e3fed1..14e069f0f 100644 --- a/@salix/crud/src/navigation/index/list.html +++ b/@salix/crud/src/navigation/index/list.html @@ -1,5 +1,5 @@
- +