Connected and enabled co-maket

This commit is contained in:
Nedim Uka
2018-08-08 14:40:00 +02:00
parent 5d84f53ea7
commit 0b899c09af
7 changed files with 202 additions and 126 deletions

View File

@@ -62,6 +62,7 @@ export const validateAccessToken = (token) => {
})
.catch(error => {
localStorage.removeItem('accessToken');
htmlClient.onError(error, dispatch);
});
}
@@ -161,6 +162,7 @@ const validateRefreshToken = () => {
export const getModules = () => {
return dispatch => {
dispatch(requestModules());
<<<<<<< HEAD
//TODO : check how to solve modules, don't hardocde values
const modules={
modules:{
@@ -233,6 +235,77 @@ export const getModules = () => {
htmlClient.onError(error, dispatch);
});
*/
=======
let appModules = {
modules: {
modules: [
{
id: '15',
name: 'Terms',
menuName: 'Terms',
url: 'terms',
isInMenu: '0'
},
{
id: '19',
name: 'Cart',
menuName: 'Cart',
url: 'cart',
isInMenu: '0'
},
{
id: '14',
name: 'ProfileSettings',
menuName: 'ProfileSettings',
url: 'profileSettings',
isInMenu: '0'
},
{
id: '23',
name: 'OrderProjects',
menuName: 'OrderProjects',
url: 'orderProjects',
isInMenu: '0'
},
{
id: '1',
name: 'Dashboards',
menuName: 'Overview',
url: 'dashboards',
isInMenu: '1'
},
{
id: '18',
name: 'CoMarket',
menuName: 'Co-Market',
url: 'co-market',
isInMenu: '1'
}
],
subModules: {
'co-market': [
{
moduleUrl: 'co-market',
menuName: 'Orders',
name: 'Orders',
url: 'orders'
}
]
}
}
}
return dispatch(recieveModules(appModules));
// return htmlClient.fetch({
// url: `${API_SERVER}/login/api/getModules`,
// })
// .then(response => {
// dispatch(recieveModules(response.data));
// })
// .catch(error => {
// htmlClient.onError(error, dispatch);
// });
// return {activeModule : ""}
>>>>>>> 6e0c26d... Connected and enabled co-maket
}
}