-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SHIBUI-1347 Fixed issue with incomplete resolvers
- Loading branch information
Showing
33 changed files
with
308 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export interface NavigationAction { | ||
action: ($event: Event) => void; | ||
category: string; | ||
label: string; | ||
content: string; | ||
icon?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { BehaviorSubject, Observable } from 'rxjs'; | ||
import { NavigationAction } from '../model/action'; | ||
|
||
@Injectable() | ||
export class NavigationService { | ||
|
||
private actions: { [name: string]: NavigationAction} = {}; | ||
private subj: BehaviorSubject<NavigationAction[]>; | ||
private obs: Observable<NavigationAction[]>; | ||
|
||
constructor() { | ||
this.subj = new BehaviorSubject<NavigationAction[]>(this.actionList); | ||
this.obs = this.subj.asObservable(); | ||
} | ||
|
||
get actionList(): NavigationAction[] { | ||
return Object.values(this.actions); | ||
} | ||
|
||
get emitter(): Observable<NavigationAction[]> { | ||
return this.obs; | ||
} | ||
|
||
addAction(name: string, action: NavigationAction): NavigationAction[] { | ||
console.log(this.actions); | ||
this.actions[name] = action; | ||
this.subj.next(this.actionList); | ||
return this.actionList; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,21 @@ | ||
import { Component } from '@angular/core'; | ||
import { Store } from '@ngrx/store'; | ||
import { LoadResolverRequest } from '../../resolver/action/collection.action'; | ||
import { LoadDraftRequest } from '../../resolver/action/draft.action'; | ||
import * as fromRoot from '../../../app.reducer'; | ||
import { LoadProviderRequest } from '../../provider/action/collection.action'; | ||
|
||
@Component({ | ||
selector: 'manager-page', | ||
templateUrl: './manager.component.html', | ||
styleUrls: ['./manager.component.scss'] | ||
}) | ||
export class ManagerComponent { | ||
constructor() {} | ||
constructor( | ||
private store: Store<fromRoot.State> | ||
) { | ||
this.store.dispatch(new LoadResolverRequest()); | ||
this.store.dispatch(new LoadDraftRequest()); | ||
this.store.dispatch(new LoadProviderRequest()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.