diff --git a/projects/common/src/fm/components/app/app.component.scss b/projects/common/src/fm/components/app/app.component.scss
index 8a93d54..b3c08b2 100644
--- a/projects/common/src/fm/components/app/app.component.scss
+++ b/projects/common/src/fm/components/app/app.component.scss
@@ -34,8 +34,8 @@ body { background: #f1f1f1; line-height: 18px; user-select:none;font-family: Lat
}
.app {
- width:100vw;
- height:100vh;
+ width:100%;
+ height:100%;
}
.app > .navbar {
@@ -124,3 +124,8 @@ body { background: #f1f1f1; line-height: 18px; user-select:none;font-family: Lat
.online {
max-height:0em;
}
+
+fm-app-menu,fm-user-menu {
+ display: inline-block;
+ margin-left: 1rem;
+}
diff --git a/projects/common/src/fm/components/app/app.component.ts b/projects/common/src/fm/components/app/app.component.ts
index a8894c0..f11fbff 100644
--- a/projects/common/src/fm/components/app/app.component.ts
+++ b/projects/common/src/fm/components/app/app.component.ts
@@ -42,6 +42,7 @@ export class AppComponent implements OnInit, OnDestroy {
public routeLoading: Observable = this.store$.select(appReducers.selectGetRouteLoading);
public menuVisible: Observable = this.store$.select(appReducers.SelectGetMenuVisible);
public accountMenuVisible: Observable = this.store$.select(appReducers.SelectGetAccountMenuVisible);
+ public appMenuVisible: Observable = this.store$.select(appReducers.SelectGetAppMenuVisible);
public user: Observable = this.store$.select(appReducers.SelectGetUser);
public isPageMode: Observable = this.store$.select(appReducers.SelectGetIsPageMode);
@Input() showUploadProgress: boolean = true;
@@ -101,6 +102,10 @@ export class AppComponent implements OnInit, OnDestroy {
return action;
}
+ async loadItemTypes() {
+ await this.itemTypeService$.load(this.appConfig$)
+ }
+
ngOnInit() {
this.InstallRouteEventHandler();
this.InstallEventServiceEventHandler();
@@ -108,7 +113,7 @@ export class AppComponent implements OnInit, OnDestroy {
this.InstallHealthCheck();
//load item types
- this.itemTypeService$.load(this.appConfig$)
+ this.loadItemTypes();
}
@HostListener('document:keyup', ['$event'])
diff --git a/projects/common/src/fm/components/auth-callback/auth-callback.component.ts b/projects/common/src/fm/components/auth-callback/auth-callback.component.ts
index 74ccef2..a51b5f0 100644
--- a/projects/common/src/fm/components/auth-callback/auth-callback.component.ts
+++ b/projects/common/src/fm/components/auth-callback/auth-callback.component.ts
@@ -13,6 +13,8 @@ export class AuthCallbackComponent {
oauthService$.loadDiscoveryDocument().then(() => {
oauthService$.tryLoginCodeFlow().then(() => {
router$.navigateByUrl((oauthService$.state && oauthService$.state!="")?decodeURIComponent(oauthService$.state):"");
+ }).catch(() => {
+ router$.navigateByUrl("/");
});
})
}
diff --git a/projects/common/src/fm/components/user-menu/user-menu.component.scss b/projects/common/src/fm/components/user-menu/user-menu.component.scss
index 08f8d40..69e3945 100644
--- a/projects/common/src/fm/components/user-menu/user-menu.component.scss
+++ b/projects/common/src/fm/components/user-menu/user-menu.component.scss
@@ -7,7 +7,6 @@
text-align: center;
font-size: 1rem;
position: relative;
- display: inline-block;
}
div.menu-button > span {
diff --git a/projects/common/src/fm/models/user.ts b/projects/common/src/fm/models/user.ts
index fd41620..e7c8144 100644
--- a/projects/common/src/fm/models/user.ts
+++ b/projects/common/src/fm/models/user.ts
@@ -3,4 +3,14 @@ export interface IUser {
name?: string;
email?: string;
claims: any;
-}
+ firstName?: string;
+ lastName?: string;
+ address?: string;
+ postalCode?: string;
+ city?: string;
+ country?: string;
+ phone?: string;
+ mobile?: string;
+ organisation?: string;
+ cocNumber?: string;
+}
\ No newline at end of file
diff --git a/projects/common/src/fm/reducers/app-common.reducer.ts b/projects/common/src/fm/reducers/app-common.reducer.ts
index 795c797..b2f561b 100644
--- a/projects/common/src/fm/reducers/app-common.reducer.ts
+++ b/projects/common/src/fm/reducers/app-common.reducer.ts
@@ -21,6 +21,7 @@ export interface State {
userPackages: IPackages,
userSettingsRoot: IItem,
accountMenuVisible: boolean,
+ appMenuVisible: boolean,
isOnline: boolean,
isPageMode:boolean
}
@@ -37,6 +38,7 @@ export const initialState: State = {
userPackages: {},
userSettingsRoot: null,
accountMenuVisible: false,
+ appMenuVisible: false,
isOnline: true,
isPageMode: true
}
@@ -95,17 +97,20 @@ export function reducer(state = initialState, action: appCommonActions.Actions )
});
}
case appCommonActions.TOGGLEMENU: {
- return tassign(state, { menuVisible: !state.menuVisible,accountMenuVisible:!state.menuVisible?false:state.accountMenuVisible });
+ return tassign(state, { menuVisible: !state.menuVisible,accountMenuVisible:!state.menuVisible?false:state.accountMenuVisible,appMenuVisible:!state.menuVisible?false:state.appMenuVisible });
}
case appCommonActions.TOGGLEACCOUNTMENU: {
- return tassign(state, { accountMenuVisible: !state.accountMenuVisible });
+ return tassign(state, { accountMenuVisible: !state.accountMenuVisible,appMenuVisible:false });
+ }
+ case appCommonActions.TOGGLEAPPMENU: {
+ return tassign(state, { appMenuVisible: !state.appMenuVisible,accountMenuVisible:false });
}
case appCommonActions.ESCAPE: {
- return tassign(state, { menuVisible: false,accountMenuVisible:false });
+ return tassign(state, { menuVisible: false,accountMenuVisible:false,appMenuVisible: false });
}
case appCommonActions.SETMENUVISIBLE: {
let a = action as appCommonActions.SetMenuVisible;
- return tassign(state, { menuVisible: a.visible,accountMenuVisible:a.visible?false:state.accountMenuVisible });
+ return tassign(state, { menuVisible: a.visible,accountMenuVisible:a.visible?false:state.accountMenuVisible,appMenuVisible:a.visible?false:state.appMenuVisible });
}
case appCommonActions.INITUSERPACKAGESSUCCESS:{
let a = action as appCommonActions.InitUserPackagesSuccess;
@@ -124,7 +129,7 @@ export function reducer(state = initialState, action: appCommonActions.Actions )
return tassign(state,{user:null,initialized:false});
}
case appCommonActions.CLOSEALL: {
- return tassign(state,{accountMenuVisible:false,menuVisible:false });
+ return tassign(state,{accountMenuVisible:false,appMenuVisible:false, menuVisible:false });
}
case appCommonActions.ONLINE:{
return tassign(state,{isOnline:true});
@@ -153,6 +158,7 @@ export const getUser = (state: State) => state.user;
export const getUserPackages = (state: State) => state.userPackages;
export const getUserSettingsRoot = (state: State) => state.userSettingsRoot;
export const getAccountMenuVisible = (state: State) => state.accountMenuVisible;
+export const getAppMenuVisible = (state: State) => state.appMenuVisible;
export const getIsOnline = (state: State) => state.isOnline;
export const getIsPageMode = (state: State) => state.isPageMode;
@@ -169,6 +175,7 @@ export const SelectGetUser = createSelector(selectAppCommonState,getUser);
export const SelectGetUserPackages = createSelector(selectAppCommonState,getUserPackages);
export const SelectGetUserSettingsRoot = createSelector(selectAppCommonState,getUserSettingsRoot);
export const SelectGetAccountMenuVisible = createSelector(selectAppCommonState,getAccountMenuVisible);
+export const SelectGetAppMenuVisible = createSelector(selectAppCommonState,getAppMenuVisible);
export const SelectGetIsOnline = createSelector(selectAppCommonState,getIsOnline);
export const SelectGetIsPageMode = createSelector(selectAppCommonState,getIsPageMode);
diff --git a/projects/common/src/fm/services/user.service.ts b/projects/common/src/fm/services/user.service.ts
index fd9e668..d6c7add 100644
--- a/projects/common/src/fm/services/user.service.ts
+++ b/projects/common/src/fm/services/user.service.ts
@@ -18,4 +18,8 @@ export class UserService {
getCurrentUser(): Observable {
return this.httpClient.get(`${this.ApiEndpoint()}/api/v1/currentuser`);
}
+
+ updateCurrentUser(user: IUser): Observable {
+ return this.httpClient.put(`${this.ApiEndpoint()}/api/v1/currentuser`, user);
+ }
}
diff --git a/src/configuration.json b/src/configuration.json
index 2241895..f9a46d6 100644
--- a/src/configuration.json
+++ b/src/configuration.json
@@ -1,9 +1,9 @@
{
- "issuer": "https://accounts.farmmaps.awtest.nl",
+ "issuer": "https://accounts.test.farmmaps.eu",
"clientId": "farmmapsdev",
- "audience": "https://farmmaps.awtest.nl/",
+ "audience": "https://test.farmmaps.eu/",
"requireHttps": true,
- "apiEndPoint": "https://farmmaps.awtest.nl",
+ "apiEndPoint": "https://test.farmmaps.eu",
"grantType":"code"
}
\ No newline at end of file