list of partners is implemented
This commit is contained in:
parent
919db21162
commit
77ad989391
|
@ -3,6 +3,11 @@ import { Route } from '@angular/router';
|
|||
import { ListComponent } from './components/list.component';
|
||||
|
||||
import {
|
||||
PartnerListForBranchResolver,
|
||||
PartnerListForDivisionResolver,
|
||||
PartnerListForMainOfficeResolver,
|
||||
PartnerListForOfficeResolver,
|
||||
PartnerListForStoreResolver,
|
||||
PartnerListResolver,
|
||||
PartnersResolver,
|
||||
} from './resolvers/partner.resolver';
|
||||
|
@ -24,35 +29,35 @@ export const partnerRoutes: Route[] = [
|
|||
path: 'main-office',
|
||||
component: ListComponent,
|
||||
resolve: {
|
||||
Partners: PartnersResolver,
|
||||
listPartner: PartnerListForMainOfficeResolver,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'branch',
|
||||
component: ListComponent,
|
||||
resolve: {
|
||||
Partners: PartnersResolver,
|
||||
listPartner: PartnerListForBranchResolver,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'division',
|
||||
component: ListComponent,
|
||||
resolve: {
|
||||
Partners: PartnersResolver,
|
||||
listPartner: PartnerListForDivisionResolver,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'office',
|
||||
component: ListComponent,
|
||||
resolve: {
|
||||
Partners: PartnersResolver,
|
||||
listPartner: PartnerListForOfficeResolver,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'store',
|
||||
component: ListComponent,
|
||||
resolve: {
|
||||
Partners: PartnersResolver,
|
||||
listPartner: PartnerListForStoreResolver,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
|
@ -128,3 +128,178 @@ export class PartnerListResolver implements Resolve<any> {
|
|||
return this.__memberService.listMembers(req);
|
||||
}
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class PartnerListForMainOfficeResolver implements Resolve<any> {
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
constructor(private __memberService: MemberService) {}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
// @ Public methods
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Resolver
|
||||
*
|
||||
* @param route
|
||||
* @param state
|
||||
*/
|
||||
resolve(
|
||||
route: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot
|
||||
):
|
||||
| Observable<ListMembersResponse.Result>
|
||||
| Promise<ListMembersResponse.Result>
|
||||
| ListMembersResponse.Result {
|
||||
let req = new ListMembersRequest();
|
||||
let search = new ListMembersRequest.Search();
|
||||
search.setMemberClassId('4b014ef5-3bab-4413-aaf9-b0040a70ec77');
|
||||
req.setSearch(search);
|
||||
|
||||
return this.__memberService.listMembers(req);
|
||||
}
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class PartnerListForBranchResolver implements Resolve<any> {
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
constructor(private __memberService: MemberService) {}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
// @ Public methods
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Resolver
|
||||
*
|
||||
* @param route
|
||||
* @param state
|
||||
*/
|
||||
resolve(
|
||||
route: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot
|
||||
):
|
||||
| Observable<ListMembersResponse.Result>
|
||||
| Promise<ListMembersResponse.Result>
|
||||
| ListMembersResponse.Result {
|
||||
let req = new ListMembersRequest();
|
||||
let search = new ListMembersRequest.Search();
|
||||
search.setMemberClassId('ae9b874e-5d0e-4c4d-8432-f45f02691ceb');
|
||||
req.setSearch(search);
|
||||
|
||||
return this.__memberService.listMembers(req);
|
||||
}
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class PartnerListForDivisionResolver implements Resolve<any> {
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
constructor(private __memberService: MemberService) {}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
// @ Public methods
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Resolver
|
||||
*
|
||||
* @param route
|
||||
* @param state
|
||||
*/
|
||||
resolve(
|
||||
route: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot
|
||||
):
|
||||
| Observable<ListMembersResponse.Result>
|
||||
| Promise<ListMembersResponse.Result>
|
||||
| ListMembersResponse.Result {
|
||||
let req = new ListMembersRequest();
|
||||
let search = new ListMembersRequest.Search();
|
||||
search.setMemberClassId('f25a17e9-5c5f-4e9c-bf80-92a9cedf829c');
|
||||
req.setSearch(search);
|
||||
|
||||
return this.__memberService.listMembers(req);
|
||||
}
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class PartnerListForOfficeResolver implements Resolve<any> {
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
constructor(private __memberService: MemberService) {}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
// @ Public methods
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Resolver
|
||||
*
|
||||
* @param route
|
||||
* @param state
|
||||
*/
|
||||
resolve(
|
||||
route: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot
|
||||
):
|
||||
| Observable<ListMembersResponse.Result>
|
||||
| Promise<ListMembersResponse.Result>
|
||||
| ListMembersResponse.Result {
|
||||
let req = new ListMembersRequest();
|
||||
let search = new ListMembersRequest.Search();
|
||||
search.setMemberClassId('cac7b897-2549-4f04-8415-8868f1dcb1da');
|
||||
req.setSearch(search);
|
||||
|
||||
return this.__memberService.listMembers(req);
|
||||
}
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class PartnerListForStoreResolver implements Resolve<any> {
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
constructor(private __memberService: MemberService) {}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
// @ Public methods
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Resolver
|
||||
*
|
||||
* @param route
|
||||
* @param state
|
||||
*/
|
||||
resolve(
|
||||
route: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot
|
||||
):
|
||||
| Observable<ListMembersResponse.Result>
|
||||
| Promise<ListMembersResponse.Result>
|
||||
| ListMembersResponse.Result {
|
||||
let req = new ListMembersRequest();
|
||||
let search = new ListMembersRequest.Search();
|
||||
search.setMemberClassId('e11cac11-3825-4f4e-9cd5-39367f23f973');
|
||||
req.setSearch(search);
|
||||
|
||||
return this.__memberService.listMembers(req);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user