Compare commits
34 Commits
78249811ab
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
134220d75f | ||
|
80ef4ed6fe | ||
|
2137f3f07e | ||
a46e8040b2 | |||
|
2ca9730735 | ||
3d2ca8fb9f | |||
6810da8b79 | |||
|
4866a6f22d | ||
84a1004977 | |||
39c619a837 | |||
|
758613aa12 | ||
6914a61bc4 | |||
9f43287433 | |||
|
10df983ae3 | ||
|
d21f304081 | ||
2bad3274fd | |||
|
31d3e58062 | ||
0231421cef | |||
|
f2c133e9bd | ||
|
1274d96f1d | ||
35ccb4f4c5 | |||
|
47fbc5eab9 | ||
564d08b5b9 | |||
7e17a49dc6 | |||
|
3f286ee042 | ||
747499d009 | |||
|
c4f4a4f61e | ||
6b095b7f49 | |||
b2791eb80b | |||
|
4c93a9f766 | ||
93554bc7c4 | |||
d074cd81cf | |||
87547aafcc | |||
6ab5ba8a56 |
@@ -52,7 +52,7 @@ ng serve
|
||||
```
|
||||
*Go*`
|
||||
|
||||
Point your browser to http://localhost:4200
|
||||
Point your browser to http://localhost:4200
|
||||
|
||||
*ESLint*
|
||||
|
||||
|
12
package-lock.json
generated
12
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "farmmaps-lib-app",
|
||||
"version": "4.14.0",
|
||||
"version": "4.14.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "farmmaps-lib-app",
|
||||
"version": "4.14.0",
|
||||
"version": "4.14.1",
|
||||
"dependencies": {
|
||||
"@angular-eslint/eslint-plugin": "^18.2.0",
|
||||
"@angular/animations": "18.2.3",
|
||||
@@ -90,7 +90,7 @@
|
||||
},
|
||||
"dist/common": {
|
||||
"name": "@farmmaps/common",
|
||||
"version": "4.14.0-prerelease.2538",
|
||||
"version": "4.14.0-prerelease.2544",
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
},
|
||||
@@ -115,7 +115,7 @@
|
||||
},
|
||||
"dist/common-map": {
|
||||
"name": "@farmmaps/common-map",
|
||||
"version": "4.14.0-prerelease.2538",
|
||||
"version": "4.14.0-prerelease.2544",
|
||||
"dependencies": {
|
||||
"tslib": "^2.0.0"
|
||||
},
|
||||
@@ -130,7 +130,7 @@
|
||||
},
|
||||
"dist/common-map3d": {
|
||||
"name": "@farmmaps/common-map3d",
|
||||
"version": "4.14.0-prerelease.2538",
|
||||
"version": "4.14.0-prerelease.2544",
|
||||
"dependencies": {
|
||||
"tslib": "^2.0.0"
|
||||
},
|
||||
@@ -143,7 +143,7 @@
|
||||
},
|
||||
"dist/ng-openlayers": {
|
||||
"name": "@farmmaps/ng-openlayers",
|
||||
"version": "4.14.0-prerelease.2538",
|
||||
"version": "4.14.0-prerelease.2544",
|
||||
"license": "MPL-2.0",
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "farmmaps-lib-app",
|
||||
"version": "4.14.0",
|
||||
"version": "4.14.1",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
|
@@ -85,6 +85,9 @@ export const SETUNREADNOTIFICATIONS = '[AppCommon] SetUnreadNotifications';
|
||||
|
||||
export const SWITCHLANGUAGE = '[AppCommon] SwitchLanguage';
|
||||
|
||||
export const SETSETTINGMENUBACKGROUNDCOLOR = '[AppCommon] SetSettingMenuBackgroundColor';
|
||||
|
||||
|
||||
export class InitUser implements Action {
|
||||
readonly type = INITUSER;
|
||||
|
||||
@@ -379,6 +382,11 @@ export class SwitchLanguage implements Action {
|
||||
constructor(public locale:string) { }
|
||||
}
|
||||
|
||||
export class SetSettingMenuBackgroundColor implements Action {
|
||||
readonly type = SETSETTINGMENUBACKGROUNDCOLOR;
|
||||
|
||||
constructor(public color:string) { }
|
||||
}
|
||||
|
||||
export type Actions = OpenModal
|
||||
| InitRoot
|
||||
@@ -427,6 +435,7 @@ export type Actions = OpenModal
|
||||
| ToggleSettingMenu
|
||||
| NotificationEvent
|
||||
| SetUnreadNotifications
|
||||
| SwitchLanguage;
|
||||
| SwitchLanguage
|
||||
| SetSettingMenuBackgroundColor;
|
||||
|
||||
|
||||
|
@@ -33,7 +33,7 @@
|
||||
<fm-resumable-file-upload></fm-resumable-file-upload>
|
||||
</ng-container>
|
||||
<div class="user-menu apponly">
|
||||
<fm-setting-menu [user]="user|async" [showMenu]="settingMenuVisible|async"></fm-setting-menu>
|
||||
<fm-setting-menu [user]="user|async" [showMenu]="settingMenuVisible|async" [backgroundColor]="settingMenuBackgroundColor|async"></fm-setting-menu>
|
||||
<fm-help-menu [user]="user|async" [showMenu]="helpMenuVisible|async"></fm-help-menu>
|
||||
<fm-notification-menu [user]="user|async" [unread]="unreadNotifications|async" [showMenu]="notificationMenuVisible|async"></fm-notification-menu>
|
||||
<fm-app-menu [user]="user|async" [showMenu]="appMenuVisible|async"></fm-app-menu>
|
||||
|
@@ -50,6 +50,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
public unreadNotifications: Observable<number> = this.store$.select(appReducers.SelectgetUnreadNotifications);
|
||||
public user: Observable<IUser> = this.store$.select(appReducers.SelectGetUser);
|
||||
public isPageMode: Observable<boolean> = this.store$.select(appReducers.SelectGetIsPageMode);
|
||||
public settingMenuBackgroundColor: Observable<string> = this.store$.select(appReducers.SelectGetSettingMenuBackgroundColor);
|
||||
@Input() showUploadProgress = true;
|
||||
|
||||
constructor(
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<div>
|
||||
<div (click)="toggle($event)" class="rounded-circle menu-button hidden" [ngClass]="{'hidden':!user || noContent}">
|
||||
<div (click)="toggle($event)" class="rounded-circle menu-button hidden" [style.background-color]="backgroundColor" [ngClass]="{'hidden':!user || noContent}">
|
||||
<span i18n-title title="Settings"><i class="fas fa-gear" aria-hidden="true"></i></span>
|
||||
<div class="menu hidden" [ngClass]="{'hidden':!showMenu}">
|
||||
<router-outlet name="setting-menu" (activate)="activateRoute()" (deactivate)="deActivateRoute()"></router-outlet>
|
||||
|
@@ -15,6 +15,7 @@ export class SettingMenuComponent implements OnInit {
|
||||
|
||||
@Input() user:IUser;
|
||||
@Input() showMenu:boolean;
|
||||
@Input() backgroundColor:string;
|
||||
public noContent = true;
|
||||
|
||||
constructor(private store: Store<appReducers.State>) { }
|
||||
|
@@ -1,18 +1,18 @@
|
||||
import { Inject, Injectable, LOCALE_ID } from '@angular/core';
|
||||
import { Injectable, Inject, LOCALE_ID } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
||||
import { OAuthService,UserInfo } from 'angular-oauth2-oidc';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { OAuthService, UserInfo } from 'angular-oauth2-oidc';
|
||||
import { from, of, zip } from 'rxjs';
|
||||
import { catchError, first, map, mergeMap, switchMap, withLatestFrom } from 'rxjs/operators';
|
||||
import { Actions,ofType,createEffect } from '@ngrx/effects';
|
||||
import { of,from,zip } from 'rxjs';
|
||||
import { withLatestFrom,mergeMap,switchMap,map,catchError,first} from 'rxjs/operators';
|
||||
import * as appCommonActions from '../actions/app-common.actions';
|
||||
import * as appCommonReducers from '../reducers/app-common.reducer';
|
||||
import { ItemService } from '../services/item.service';
|
||||
import { FolderService } from '../services/folder.service';
|
||||
import { UserService } from '../services/user.service';
|
||||
import { IItemTypes } from '../models/item.types';
|
||||
import { IListItem } from '../models/list.item';
|
||||
import * as appCommonReducers from '../reducers/app-common.reducer';
|
||||
import { FolderService } from '../services/folder.service';
|
||||
import { ItemService } from '../services/item.service';
|
||||
import { StateSerializerService } from '../services/state-serializer.service';
|
||||
import { UserService } from '../services/user.service';
|
||||
import {StateSerializerService} from '../services/state-serializer.service';
|
||||
|
||||
@Injectable()
|
||||
export class AppCommonEffects {
|
||||
@@ -63,9 +63,9 @@ export class AppCommonEffects {
|
||||
ofType(appCommonActions.SWITCHLANGUAGE),
|
||||
switchMap((action) => {
|
||||
const a = action as appCommonActions.SwitchLanguage;
|
||||
if (this.router$.url.includes(`/${this.locale}/`)) {
|
||||
const newUrl = this.router$.url.replace(`/${this.locale}/`, `/${a.locale}/`);
|
||||
this.router$.navigateByUrl(newUrl);
|
||||
if (location.href.includes(`/${this.locale}/`)) {
|
||||
const newPath = location.href.replace(`/${this.locale}/`, `/${a.locale}/`);
|
||||
location.replace(newPath);
|
||||
}
|
||||
return of(undefined);
|
||||
})),{ dispatch:false});
|
||||
|
@@ -29,7 +29,8 @@ export interface State {
|
||||
settingMenuVisible: boolean,
|
||||
unreadNotifications: number,
|
||||
isOnline: boolean,
|
||||
isPageMode:boolean
|
||||
isPageMode:boolean,
|
||||
settingMenuBackgroundColor:string
|
||||
}
|
||||
|
||||
export const initialState: State = {
|
||||
@@ -51,7 +52,8 @@ export const initialState: State = {
|
||||
settingMenuVisible: false,
|
||||
unreadNotifications: 0,
|
||||
isOnline: true,
|
||||
isPageMode: true
|
||||
isPageMode: true,
|
||||
settingMenuBackgroundColor:'rgb(128, 128, 128)'
|
||||
}
|
||||
|
||||
export function reducer(state = initialState, action: appCommonActions.Actions ): State {
|
||||
@@ -187,6 +189,10 @@ export function reducer(state = initialState, action: appCommonActions.Actions )
|
||||
const a = action as appCommonActions.SetUnreadNotifications;
|
||||
return tassign(state,{unreadNotifications:a.unread});
|
||||
}
|
||||
case appCommonActions.SETSETTINGMENUBACKGROUNDCOLOR: {
|
||||
const a = action as appCommonActions.SetSettingMenuBackgroundColor;
|
||||
return tassign(state,{settingMenuBackgroundColor:a.color});
|
||||
}
|
||||
default: {
|
||||
return state;
|
||||
}
|
||||
@@ -212,6 +218,7 @@ export const getSettingMenuVisible = (state: State) => state.settingMenuVisible;
|
||||
export const getUnreadNotifications = (state: State) => state.unreadNotifications;
|
||||
export const getIsOnline = (state: State) => state.isOnline;
|
||||
export const getIsPageMode = (state: State) => state.isPageMode;
|
||||
export const getSettingMenuBackgroundColor = (state: State) => state.settingMenuBackgroundColor;
|
||||
|
||||
export const selectAppCommonState = createFeatureSelector<State>(MODULE_NAME);
|
||||
|
||||
@@ -238,5 +245,4 @@ export const SelectgetUnreadNotifications = createSelector(selectAppCommonState,
|
||||
|
||||
export const SelectGetIsOnline = createSelector(selectAppCommonState,getIsOnline);
|
||||
export const SelectGetIsPageMode = createSelector(selectAppCommonState,getIsPageMode);
|
||||
|
||||
|
||||
export const SelectGetSettingMenuBackgroundColor= createSelector(selectAppCommonState,getSettingMenuBackgroundColor);
|
||||
|
@@ -52,4 +52,16 @@ export class AdminService {
|
||||
postItemTask(item: IItem, task: IItemTask): Observable<IItemTask> {
|
||||
return this.httpClient.post<IItemTask>(`${this.ApiEndpoint()}/api/v1/admin/${item.code}/tasks`, task);
|
||||
}
|
||||
|
||||
getAnalyseFolderOverview(): Observable<any> {
|
||||
return this.httpClient.get<any>(`${this.ApiEndpoint()}/api/v1/admin/analysefolder/folderinfo/overview`);
|
||||
}
|
||||
|
||||
getAnalyseFolderInfo(user: string): Observable<any> {
|
||||
return this.httpClient.get<any>(`${this.ApiEndpoint()}/api/v1/admin/analysefolder/folderinfo/${user}`);
|
||||
}
|
||||
|
||||
getAnalyseFolderLog(): Observable<any> {
|
||||
return this.httpClient.get<any>(`${this.ApiEndpoint()}/api/v1/admin/analysefolder/folderinfo/log`);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user