constants are added
This commit is contained in:
parent
f0c418a658
commit
45bb511a4b
|
@ -59,6 +59,7 @@ import { ListMemberLevelsResponse } from 'app/modules/proto/c2se/member_level_pb
|
|||
import { MemberLevel } from 'app/modules/proto/models/member_level_pb';
|
||||
import { Pagination } from 'app/modules/proto/protobuf/pagination_pb';
|
||||
import { VendorService } from 'app/modules/polyglot/api/services/vendor.service';
|
||||
import { environment } from 'environments/environment';
|
||||
|
||||
@Component({
|
||||
selector: 'partner-list',
|
||||
|
@ -139,32 +140,32 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
case '/member/partner/all':
|
||||
this.title = '전체목록';
|
||||
this.btnTitle = '대본등록';
|
||||
this.memberClassId = '4b014ef5-3bab-4413-aaf9-b0040a70ec77';
|
||||
this.memberClassId = environment.constants.classeIds.mainOffice;
|
||||
break;
|
||||
case '/member/partner/main-office':
|
||||
this.title = '본사목록';
|
||||
this.btnTitle = '대본등록';
|
||||
this.memberClassId = 'ae9b874e-5d0e-4c4d-8432-f45f02691ceb';
|
||||
this.memberClassId = environment.constants.classeIds.branch;
|
||||
break;
|
||||
case '/member/partner/branch':
|
||||
this.title = '대본목록';
|
||||
this.btnTitle = '부본등록';
|
||||
this.memberClassId = 'f25a17e9-5c5f-4e9c-bf80-92a9cedf829c';
|
||||
this.memberClassId = environment.constants.classeIds.division;
|
||||
break;
|
||||
case '/member/partner/division':
|
||||
this.title = '부본목록';
|
||||
this.btnTitle = '총판등록';
|
||||
this.memberClassId = 'cac7b897-2549-4f04-8415-8868f1dcb1da';
|
||||
this.memberClassId = environment.constants.classeIds.office;
|
||||
break;
|
||||
case '/member/partner/office':
|
||||
this.title = '총판목록';
|
||||
this.btnTitle = '매장등록';
|
||||
this.memberClassId = 'e11cac11-3825-4f4e-9cd5-39367f23f973';
|
||||
this.memberClassId = environment.constants.classeIds.store;
|
||||
break;
|
||||
case '/member/partner/store':
|
||||
this.title = '매장목록';
|
||||
this.btnTitle = '회원등록';
|
||||
this.memberClassId = '4598f07a-86d1-42a4-b038-25706683a7cd';
|
||||
this.memberClassId = environment.constants.classeIds.user;
|
||||
break;
|
||||
default:
|
||||
console.log(this.router.url);
|
||||
|
@ -254,7 +255,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
|
||||
req.setPagination(paging);
|
||||
let search = new ListMembersRequest.Search();
|
||||
search.setMemberClassId('4b014ef5-3bab-4413-aaf9-b0040a70ec77');
|
||||
search.setMemberClassId(environment.constants.classeIds.mainOffice);
|
||||
req.setSearch(search);
|
||||
|
||||
return of(this.__memberService.listMembers(req));
|
||||
|
|
|
@ -20,6 +20,7 @@ import { Site } from 'app/modules/proto/models/site_pb';
|
|||
import { MemberModel } from 'app/modules/proto/models/member_pb';
|
||||
import { fuseAnimations } from '@fuse/animations';
|
||||
import { BankService } from 'app/modules/polyglot/bank/services/bank.service';
|
||||
import { environment } from 'environments/environment';
|
||||
|
||||
export interface RegistComposeData {
|
||||
title: string;
|
||||
|
@ -168,7 +169,7 @@ export class RegistComposeComponent implements OnInit {
|
|||
member.setUsername(username);
|
||||
member.setPassword(password);
|
||||
member.setMemberClassId(this.data.classId);
|
||||
member.setMemberLevelId('c56231ac-2120-4a81-a30a-5d41fafb6c57');
|
||||
member.setMemberLevelId(environment.constants.levelIds.level1);
|
||||
if (!!parentUsername) {
|
||||
member.setReferrerMemberUsername(parentUsername);
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import {
|
|||
ListMembersResponse,
|
||||
} from 'app/modules/proto/c2se/member_pb';
|
||||
import { Pagination } from 'app/modules/proto/protobuf/pagination_pb';
|
||||
import { environment } from 'environments/environment';
|
||||
import { catchError, Observable, throwError } from 'rxjs';
|
||||
|
||||
import { Partner } from '../models/partner';
|
||||
|
@ -122,7 +123,7 @@ export class PartnerListResolver implements Resolve<any> {
|
|||
| ListMembersResponse.Result {
|
||||
let req = new ListMembersRequest();
|
||||
let search = new ListMembersRequest.Search();
|
||||
search.setMemberClassId('4b014ef5-3bab-4413-aaf9-b0040a70ec77');
|
||||
search.setMemberClassId(environment.constants.classeIds.mainOffice);
|
||||
req.setSearch(search);
|
||||
|
||||
return this.__memberService.listMembers(req);
|
||||
|
@ -157,7 +158,7 @@ export class PartnerListForMainOfficeResolver implements Resolve<any> {
|
|||
| ListMembersResponse.Result {
|
||||
let req = new ListMembersRequest();
|
||||
let search = new ListMembersRequest.Search();
|
||||
search.setMemberClassId('4b014ef5-3bab-4413-aaf9-b0040a70ec77');
|
||||
search.setMemberClassId(environment.constants.classeIds.mainOffice);
|
||||
req.setSearch(search);
|
||||
|
||||
return this.__memberService.listMembers(req);
|
||||
|
@ -192,7 +193,7 @@ export class PartnerListForBranchResolver implements Resolve<any> {
|
|||
| ListMembersResponse.Result {
|
||||
let req = new ListMembersRequest();
|
||||
let search = new ListMembersRequest.Search();
|
||||
search.setMemberClassId('ae9b874e-5d0e-4c4d-8432-f45f02691ceb');
|
||||
search.setMemberClassId(environment.constants.classeIds.branch);
|
||||
req.setSearch(search);
|
||||
|
||||
return this.__memberService.listMembers(req);
|
||||
|
@ -227,7 +228,7 @@ export class PartnerListForDivisionResolver implements Resolve<any> {
|
|||
| ListMembersResponse.Result {
|
||||
let req = new ListMembersRequest();
|
||||
let search = new ListMembersRequest.Search();
|
||||
search.setMemberClassId('f25a17e9-5c5f-4e9c-bf80-92a9cedf829c');
|
||||
search.setMemberClassId(environment.constants.classeIds.division);
|
||||
req.setSearch(search);
|
||||
|
||||
return this.__memberService.listMembers(req);
|
||||
|
@ -262,7 +263,7 @@ export class PartnerListForOfficeResolver implements Resolve<any> {
|
|||
| ListMembersResponse.Result {
|
||||
let req = new ListMembersRequest();
|
||||
let search = new ListMembersRequest.Search();
|
||||
search.setMemberClassId('cac7b897-2549-4f04-8415-8868f1dcb1da');
|
||||
search.setMemberClassId(environment.constants.classeIds.office);
|
||||
req.setSearch(search);
|
||||
|
||||
return this.__memberService.listMembers(req);
|
||||
|
@ -297,7 +298,7 @@ export class PartnerListForStoreResolver implements Resolve<any> {
|
|||
| ListMembersResponse.Result {
|
||||
let req = new ListMembersRequest();
|
||||
let search = new ListMembersRequest.Search();
|
||||
search.setMemberClassId('e11cac11-3825-4f4e-9cd5-39367f23f973');
|
||||
search.setMemberClassId(environment.constants.classeIds.store);
|
||||
req.setSearch(search);
|
||||
|
||||
return this.__memberService.listMembers(req);
|
||||
|
|
|
@ -186,7 +186,7 @@ export class MemberService {
|
|||
|
||||
// siteId: 8429a7ab-b9de-400b-a209-28ff46e22bec
|
||||
// classId: 4b014ef5-3bab-4413-aaf9-b0040a70ec77
|
||||
// levelId: c56231ac-2120-4a81-a30a-5d41fafb6c57
|
||||
// levelId: environment.constants.levelIds.level1
|
||||
|
||||
createMember(req: CreateMemberRequest): Promise<CreateMemberResponse.Result> {
|
||||
return new Promise<CreateMemberResponse.Result>((resolve, reject) => {
|
||||
|
|
|
@ -11,4 +11,20 @@ export const environment: Environment = {
|
|||
// servers: ['ws://30.20.0.149:8088'],
|
||||
},
|
||||
},
|
||||
constants: {
|
||||
classeIds: {
|
||||
mainOffice: '4b014ef5-3bab-4413-aaf9-b0040a70ec77',
|
||||
branch: 'ae9b874e-5d0e-4c4d-8432-f45f02691ceb',
|
||||
division: 'f25a17e9-5c5f-4e9c-bf80-92a9cedf829c',
|
||||
office: 'cac7b897-2549-4f04-8415-8868f1dcb1da',
|
||||
store: 'e11cac11-3825-4f4e-9cd5-39367f23f973',
|
||||
user: '4598f07a-86d1-42a4-b038-25706683a7cd',
|
||||
},
|
||||
levelIds: {
|
||||
level1: 'c56231ac-2120-4a81-a30a-5d41fafb6c57',
|
||||
level2: 'df49d067-d554-43b1-87f4-82fb246cec5f',
|
||||
level3: '0cce35ee-9668-495e-8840-e3d7b5b01b76',
|
||||
level4: 'e7e768d7-1d3d-4ae1-866d-4db1c1f0d9a5',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -15,6 +15,22 @@ export const environment: Environment = {
|
|||
// servers: ['ws://30.20.0.149:8088'],
|
||||
},
|
||||
},
|
||||
constants: {
|
||||
classeIds: {
|
||||
mainOffice: '4b014ef5-3bab-4413-aaf9-b0040a70ec77',
|
||||
branch: 'ae9b874e-5d0e-4c4d-8432-f45f02691ceb',
|
||||
division: 'f25a17e9-5c5f-4e9c-bf80-92a9cedf829c',
|
||||
office: 'cac7b897-2549-4f04-8415-8868f1dcb1da',
|
||||
store: 'e11cac11-3825-4f4e-9cd5-39367f23f973',
|
||||
user: '4598f07a-86d1-42a4-b038-25706683a7cd',
|
||||
},
|
||||
levelIds: {
|
||||
level1: 'c56231ac-2120-4a81-a30a-5d41fafb6c57',
|
||||
level2: 'df49d067-d554-43b1-87f4-82fb246cec5f',
|
||||
level3: '0cce35ee-9668-495e-8840-e3d7b5b01b76',
|
||||
level4: 'e7e768d7-1d3d-4ae1-866d-4db1c1f0d9a5',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -5,4 +5,20 @@ export interface Environment {
|
|||
nats: {
|
||||
connectionOptions: nats.ConnectionOptions;
|
||||
};
|
||||
constants: {
|
||||
classeIds: {
|
||||
mainOffice: string;
|
||||
branch: string;
|
||||
division: string;
|
||||
office: string;
|
||||
store: string;
|
||||
user: string;
|
||||
};
|
||||
levelIds: {
|
||||
level1: string;
|
||||
level2: string;
|
||||
level3: string;
|
||||
level4: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user