Merge branch 'feature/BETERAN-BACKEND-APP-BROWSER-init' of https://gitlab.loafle.net/bet/beteran-backend-app-browser into feature/BETERAN-BACKEND-APP-BROWSER-init

This commit is contained in:
이담 정 2022-08-13 03:54:07 +00:00
commit a238b5bde7
7 changed files with 249 additions and 195 deletions

View File

@ -22,6 +22,7 @@ import {
startWith,
Subject,
switchMap,
take,
takeUntil,
timer,
} from 'rxjs';
@ -32,7 +33,10 @@ import { Partner } from '../models/partner';
import { PartnerPagination } from '../models/partner-pagination';
import { PartnerService } from '../services/partner.service';
import { ActivatedRoute, Router } from '@angular/router';
import { RegistComposeComponent } from '../compose/regist-compose.component';
import {
RegistComposeComponent,
RegistComposeResult,
} from '../compose/regist-compose.component';
import { CashComposeComponent } from '../compose/cash-compose.component';
import { CommissionComposeComponent } from '../compose/commission-compose.component';
import { CompComposeComponent } from '../compose/comp-compose.component';
@ -242,11 +246,14 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
__onClickRegist(event: MouseEvent, partner: MemberModel): void {
const dialogRef = this._matDialog.open(RegistComposeComponent, {
data: { title: '대본 등록하기', parent: partner, sites: this.sites },
data: { title: '대본 등록', parent: partner, sites: this.sites },
});
dialogRef.afterClosed().subscribe((result) => {
console.log('Compose dialog was closed!');
dialogRef
.afterClosed()
.pipe(take(1))
.subscribe((result: RegistComposeResult) => {
console.log('Compose dialog was closed: ', result);
});
}
__onClickCash(event: MouseEvent): void {

View File

@ -3,7 +3,7 @@
<div
class="flex flex-0 items-center justify-between h-16 pr-3 sm:pr-5 pl-6 sm:pl-8 bg-primary text-on-primary"
>
<div class="text-lg font-medium">{{ data.title }} 등록</div>
<div class="text-lg font-medium">{{ data.title }}</div>
<button mat-icon-button (click)="saveAndClose()" [tabIndex]="-1">
<mat-icon
class="text-current"
@ -12,6 +12,17 @@
</button>
</div>
<fuse-alert
class="mt-8 -mb-4"
*ngIf="showAlert"
[appearance]="'outline'"
[showIcon]="false"
[type]="alert.type"
[@shake]="alert.type === 'error'"
>
{{ alert.message }}
</fuse-alert>
<!-- Compose form -->
<form
class="flex flex-col flex-auto p-6 sm:p-8 overflow-y-auto"
@ -98,12 +109,23 @@
</mat-error>
</mat-form-field>
<mat-form-field>
<!-- <mat-form-field>
<mat-label>정산종류</mat-label>
<input matInput [formControlName]="'calculateType'" />
<mat-error *ngIf="composeForm.get('calculateType')?.hasError('required')">
정산종류는 필수 입력입니다.
</mat-error>
</mat-form-field> -->
<mat-form-field>
<mat-label>정산종류</mat-label>
<mat-select [formControlName]="'calculateType'">
<mat-option [value]="0"> 롤링 </mat-option>
</mat-select>
<mat-error *ngIf="composeForm.get('siteName')?.hasError('required')">
정산종류는 필수 입력입니다.
</mat-error>
</mat-form-field>
<mat-form-field>
@ -116,12 +138,26 @@
<mat-form-field>
<mat-label>은행명</mat-label>
<input matInput [formControlName]="'bankName'" />
<mat-select [formControlName]="'bankName'" placeholder="은행 선택">
<mat-option *ngFor="let bank of data.banks" [value]="bank.getId()">
{{ bank.getName() }}
</mat-option>
<mat-option [value]="'0'"> 국민은행 </mat-option>
</mat-select>
<mat-error *ngIf="composeForm.get('bankName')?.hasError('required')">
은행명은 필수 입력입니다.
</mat-error>
</mat-form-field>
<!-- <mat-form-field>
<mat-label>은행명</mat-label>
<input matInput [formControlName]="'bankName'" />
<mat-error *ngIf="composeForm.get('bankName')?.hasError('required')">
은행명은 필수 입력입니다.
</mat-error>
</mat-form-field> -->
<mat-form-field>
<mat-label>계좌번호</mat-label>
<input matInput [formControlName]="'accountNumber'" />
@ -160,6 +196,7 @@
mat-flat-button
[color]="'primary'"
(click)="send()"
[disabled]="isSendDisable"
>
등록
</button>

View File

@ -7,46 +7,45 @@ import {
} from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { FuseAlertType } from '@fuse/components/alert';
import { SiteService } from 'app/modules/polyglot/domain/services/site.service';
import { IdentityService } from 'app/modules/polyglot/member/services/identity.service';
import { MemberService } from 'app/modules/polyglot/member/services/member.service';
import {
CreateMemberRequest,
CreateMemberResponse,
} from 'app/modules/protobuf/c2se/backend/member_pb';
import { Bank } from 'app/modules/protobuf/models/account/bank_pb';
import { Site } from 'app/modules/protobuf/models/domain/site_pb';
import { MemberModel } from 'app/modules/protobuf/models/member/member_pb';
import { fuseAnimations } from '@fuse/animations';
export interface RegistComposeData {
title: string;
parent: MemberModel;
sites: Site[];
banks: Bank[];
}
export interface RegistComposeResult {
parentId: string;
siteName: string;
signinId: string;
password: string;
exchangePassword: string;
nickname: string;
calculateType: string;
phoneNumber: string;
bankName: string;
accountNumber: string;
accountHolder: string;
choice: boolean;
}
@Component({
selector: 'app-regist-compose',
templateUrl: './regist-compose.component.html',
encapsulation: ViewEncapsulation.None,
animations: fuseAnimations,
})
export class RegistComposeComponent implements OnInit {
composeForm!: FormGroup;
sites: any[] = [];
// quillModules: any = {
// toolbar: [
// ['bold', 'italic', 'underline'],
// [{ align: [] }, { list: 'ordered' }, { list: 'bullet' }],
// ['clean'],
// ],
// };
alert: { type: FuseAlertType; message: string } = {
type: 'success',
message: '등록이 성공하였습니다.',
};
showAlert: boolean = false;
isSendDisable = false;
/**
* Constructor
*/
@ -55,10 +54,9 @@ export class RegistComposeComponent implements OnInit {
@Inject(MAT_DIALOG_DATA) public data: RegistComposeData,
private _formBuilder: FormBuilder,
private _identityService: IdentityService,
private _memberService: MemberService,
private _changeDetectorRef: ChangeDetectorRef
) {
this.data.sites.forEach((v) => console.log(v.getUrl()));
}
) {}
// -----------------------------------------------------------------------------------------------------
// @ Lifecycle hooks
@ -111,11 +109,61 @@ export class RegistComposeComponent implements OnInit {
/**
* Send the message
*
}
*/
send(): void {
console.log(this.composeForm.value);
if (!this.composeForm.valid) {
return;
}
this.isSendDisable = true;
const {
partnerId,
siteName,
signinId,
password,
exchangePassword,
nickname,
calculateType,
phoneNumber,
bankName,
accountNumber,
accountHolder,
} = this.composeForm.value;
const member = new CreateMemberRequest();
const site = new Site();
site.setId(siteName);
member.setSiteId(siteName);
member.setUsername(signinId);
member.setPassword('beteran');
member.setMemberClassId('ae9b874e-5d0e-4c4d-8432-f45f02691ceb');
member.setMemberLevelId('c56231ac-2120-4a81-a30a-5d41fafb6c57');
member.setReferrerMemberUsername(this.data.parent.getUsername());
member.setNickname(nickname);
member.setMobilePhoneNumber(phoneNumber);
this._memberService
.createMember(member)
.then((res: CreateMemberResponse.Result) => {
console.log(res.getMember());
this.showAlert = true;
})
.catch((e) => {
this.showAlert = true;
this.alert = { type: 'error', message: '등록에 실패하였습니다.' };
})
.finally(() => (this.showAlert = false));
}
private close(): void {
this.matDialogRef.close({
choice: true,
});
}
__checkSigninId(event: FocusEvent): void {
const signinId = this.composeForm.get('signinId')?.value;
// console.log(event, '::', signinId);

View File

@ -27,6 +27,7 @@ import { COMPOSE } from './compose';
import { partnerRoutes } from './partner.routing';
import { MatDialogModule } from '@angular/material/dialog';
import { FuseAlertModule } from '@fuse/components/alert';
@NgModule({
declarations: [COMPONENTS, COMPOSE],
@ -53,6 +54,8 @@ import { MatDialogModule } from '@angular/material/dialog';
MatMenuModule,
MatRadioModule,
MatDividerModule,
FuseAlertModule,
],
})
export class PartnerModule {}

View File

@ -17,8 +17,12 @@ import {
UpdateMemberRequest,
UpdateMemberResponse,
SUBJECT_UPDATE_MEMBER,
CreateMemberResponse,
CreateMemberRequest,
SUBJECT_CREATE_MEMBER,
} from 'app/modules/protobuf/c2se/backend/member_pb';
import { Pagination } from 'app/modules/protobuf/protobuf/pagination/pagination_pb';
import { MemberModel } from 'app/modules/protobuf/models/member/member_pb';
@Injectable({
providedIn: 'root',
@ -157,46 +161,22 @@ export class MemberService {
// classId: 4b014ef5-3bab-4413-aaf9-b0040a70ec77
// levelId: c56231ac-2120-4a81-a30a-5d41fafb6c57
// createMember(
// siteId: string = '8429a7ab-b9de-400b-a209-28ff46e22bec',
// memberLevelId: string = 'c56231ac-2120-4a81-a30a-5d41fafb6c57',
// classId: string = '4b014ef5-3bab-4413-aaf9-b0040a70ec77',
// signinId: string,
// nickname: string,
// password: string,
// mobilePhoneNumber: string
// ): Promise<MemberRequ.Result> {
// return new Promise<UpdateMemberResponse.Result>((resolve, reject) => {
// let req = new UpdateMemberRequest();
// req.setId(id);
// if (!!siteId) {
// req.setSiteId(siteId);
// }
// if (!!memberLevelId) {
// req.setMemberLevelId(memberLevelId);
// }
// if (!!password) {
// req.setPassword(password);
// }
// if (!!mobilePhoneNumber) {
// req.setMobilePhoneNumber(mobilePhoneNumber);
// }
// this.__natsService
// .request<UpdateMemberResponse.Result>(
// SUBJECT_UPDATE_MEMBER,
// req.serializeBinary(),
// UpdateMemberResponse.deserializeBinary
// )
// .then((result) => {
// console.log('updateMember Result: ', result);
// resolve(result);
// })
// .catch((e: Error) => {
// console.log('failed', e);
// reject(e);
// });
// });
// }
createMember(req: CreateMemberRequest): Promise<CreateMemberResponse.Result> {
return new Promise<CreateMemberResponse.Result>((resolve, reject) => {
this.__natsService
.request<CreateMemberResponse.Result>(
SUBJECT_CREATE_MEMBER,
req.serializeBinary(),
CreateMemberResponse.deserializeBinary
)
.then((result) => {
console.log('createMember Result: ', result);
resolve(result);
})
.catch((e: Error) => {
console.log('failed', e);
reject(e);
});
});
}
}

View File

@ -118,7 +118,7 @@ export namespace CreateMemberLevelResponse {
}
}
export class ListMemberLevelesRequest extends jspb.Message {
export class ListMemberLevelsRequest extends jspb.Message {
hasPagination(): boolean;
clearPagination(): void;
getPagination(): protobuf_pagination_pagination_pb.Pagination | undefined;
@ -146,27 +146,27 @@ export class ListMemberLevelesRequest extends jspb.Message {
setNameLike(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ListMemberLevelesRequest.AsObject;
toObject(includeInstance?: boolean): ListMemberLevelsRequest.AsObject;
static toObject(
includeInstance: boolean,
msg: ListMemberLevelesRequest
): ListMemberLevelesRequest.AsObject;
msg: ListMemberLevelsRequest
): ListMemberLevelsRequest.AsObject;
static extensions: { [key: number]: jspb.ExtensionFieldInfo<jspb.Message> };
static extensionsBinary: {
[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>;
};
static serializeBinaryToWriter(
message: ListMemberLevelesRequest,
message: ListMemberLevelsRequest,
writer: jspb.BinaryWriter
): void;
static deserializeBinary(bytes: Uint8Array): ListMemberLevelesRequest;
static deserializeBinary(bytes: Uint8Array): ListMemberLevelsRequest;
static deserializeBinaryFromReader(
message: ListMemberLevelesRequest,
message: ListMemberLevelsRequest,
reader: jspb.BinaryReader
): ListMemberLevelesRequest;
): ListMemberLevelsRequest;
}
export namespace ListMemberLevelesRequest {
export namespace ListMemberLevelsRequest {
export type AsObject = {
pagination?: protobuf_pagination_pagination_pb.Pagination.AsObject;
searchesList: Array<protobuf_pagination_search_pb.Search.AsObject>;
@ -353,14 +353,12 @@ export class UpdateMemberLevelRequest extends jspb.Message {
getId(): string;
setId(value: string): void;
hasParentId(): boolean;
clearParentId(): void;
getParentId(): string;
setParentId(value: string): void;
getName(): string;
setName(value: string): void;
getSortOrder(): number;
setSortOrder(value: number): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): UpdateMemberLevelRequest.AsObject;
static toObject(
@ -385,8 +383,8 @@ export class UpdateMemberLevelRequest extends jspb.Message {
export namespace UpdateMemberLevelRequest {
export type AsObject = {
id: string;
parentId: string;
name: string;
sortOrder: number;
};
}

View File

@ -73,7 +73,7 @@ goog.exportSymbol(
global
);
goog.exportSymbol(
"proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest",
"proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest",
null,
global
);
@ -202,20 +202,21 @@ if (goog.DEBUG && !COMPILED) {
* @extends {jspb.Message}
* @constructor
*/
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest =
function (opt_data) {
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest = function (
opt_data
) {
jspb.Message.initialize(
this,
opt_data,
0,
-1,
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest
.repeatedFields_,
null
);
};
goog.inherits(
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest,
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest,
jspb.Message
);
if (goog.DEBUG && !COMPILED) {
@ -223,8 +224,8 @@ if (goog.DEBUG && !COMPILED) {
* @public
* @override
*/
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.displayName =
"proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest";
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.displayName =
"proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest";
}
/**
* Generated by JsPbCodeGenerator.
@ -1098,7 +1099,7 @@ proto.bet.beteran.c2se.backend.member_level.CreateMemberLevelResponse.prototype.
* @private {!Array<number>}
* @const
*/
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.repeatedFields_ =
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.repeatedFields_ =
[2, 3];
if (jspb.Message.GENERATE_TO_OBJECT) {
@ -1114,9 +1115,9 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.toObject =
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.toObject =
function (opt_includeInstance) {
return proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.toObject(
return proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.toObject(
opt_includeInstance,
this
);
@ -1127,11 +1128,11 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest} msg The msg instance to transform.
* @param {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.toObject =
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.toObject =
function (includeInstance, msg) {
var f,
obj = {
@ -1164,14 +1165,14 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest}
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest}
*/
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.deserializeBinary =
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.deserializeBinary =
function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg =
new proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest();
return proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.deserializeBinaryFromReader(
new proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest();
return proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.deserializeBinaryFromReader(
msg,
reader
);
@ -1180,11 +1181,11 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.deserialize
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest} msg The message object to deserialize into.
* @param {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest}
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest}
*/
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.deserializeBinaryFromReader =
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.deserializeBinaryFromReader =
function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
@ -1233,10 +1234,10 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.deserialize
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.serializeBinary =
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.serializeBinary =
function () {
var writer = new jspb.BinaryWriter();
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.serializeBinaryToWriter(
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.serializeBinaryToWriter(
this,
writer
);
@ -1246,11 +1247,11 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.s
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest} message
* @param {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.serializeBinaryToWriter =
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.serializeBinaryToWriter =
function (message, writer) {
var f = undefined;
f = message.getPagination();
@ -1287,7 +1288,7 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.serializeBi
* optional bet.protobuf.pagination.Pagination pagination = 1;
* @return {?proto.bet.protobuf.pagination.Pagination}
*/
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.getPagination =
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.getPagination =
function () {
return /** @type{?proto.bet.protobuf.pagination.Pagination} */ (
jspb.Message.getWrapperField(
@ -1300,18 +1301,18 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.g
/**
* @param {?proto.bet.protobuf.pagination.Pagination|undefined} value
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest} returns this
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest} returns this
*/
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.setPagination =
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.setPagination =
function (value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest} returns this
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest} returns this
*/
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.clearPagination =
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.clearPagination =
function () {
return this.setPagination(undefined);
};
@ -1320,7 +1321,7 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.c
* Returns whether this field is set.
* @return {boolean}
*/
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.hasPagination =
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.hasPagination =
function () {
return jspb.Message.getField(this, 1) != null;
};
@ -1329,7 +1330,7 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.h
* repeated bet.protobuf.pagination.Search searches = 2;
* @return {!Array<!proto.bet.protobuf.pagination.Search>}
*/
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.getSearchesList =
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.getSearchesList =
function () {
return /** @type{!Array<!proto.bet.protobuf.pagination.Search>} */ (
jspb.Message.getRepeatedWrapperField(
@ -1342,9 +1343,9 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.g
/**
* @param {!Array<!proto.bet.protobuf.pagination.Search>} value
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest} returns this
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest} returns this
*/
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.setSearchesList =
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.setSearchesList =
function (value) {
return jspb.Message.setRepeatedWrapperField(this, 2, value);
};
@ -1354,7 +1355,7 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.s
* @param {number=} opt_index
* @return {!proto.bet.protobuf.pagination.Search}
*/
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.addSearches =
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.addSearches =
function (opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(
this,
@ -1367,9 +1368,9 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.a
/**
* Clears the list making it empty but non-null.
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest} returns this
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest} returns this
*/
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.clearSearchesList =
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.clearSearchesList =
function () {
return this.setSearchesList([]);
};
@ -1378,7 +1379,7 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.c
* repeated bet.protobuf.pagination.Sort sorts = 3;
* @return {!Array<!proto.bet.protobuf.pagination.Sort>}
*/
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.getSortsList =
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.getSortsList =
function () {
return /** @type{!Array<!proto.bet.protobuf.pagination.Sort>} */ (
jspb.Message.getRepeatedWrapperField(
@ -1391,9 +1392,9 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.g
/**
* @param {!Array<!proto.bet.protobuf.pagination.Sort>} value
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest} returns this
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest} returns this
*/
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.setSortsList =
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.setSortsList =
function (value) {
return jspb.Message.setRepeatedWrapperField(this, 3, value);
};
@ -1403,7 +1404,7 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.s
* @param {number=} opt_index
* @return {!proto.bet.protobuf.pagination.Sort}
*/
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.addSorts =
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.addSorts =
function (opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(
this,
@ -1416,9 +1417,9 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.a
/**
* Clears the list making it empty but non-null.
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest} returns this
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest} returns this
*/
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.clearSortsList =
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.clearSortsList =
function () {
return this.setSortsList([]);
};
@ -1427,7 +1428,7 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.c
* optional string name_like = 4;
* @return {string}
*/
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.getNameLike =
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.getNameLike =
function () {
return /** @type {string} */ (
jspb.Message.getFieldWithDefault(this, 4, "")
@ -1436,18 +1437,18 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.g
/**
* @param {string} value
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest} returns this
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest} returns this
*/
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.setNameLike =
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.setNameLike =
function (value) {
return jspb.Message.setField(this, 4, value);
};
/**
* Clears the field making it undefined.
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest} returns this
* @return {!proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest} returns this
*/
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.clearNameLike =
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.clearNameLike =
function () {
return jspb.Message.setField(this, 4, undefined);
};
@ -1456,7 +1457,7 @@ proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.c
* Returns whether this field is set.
* @return {boolean}
*/
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelesRequest.prototype.hasNameLike =
proto.bet.beteran.c2se.backend.member_level.ListMemberLevelsRequest.prototype.hasNameLike =
function () {
return jspb.Message.getField(this, 4) != null;
};
@ -2459,8 +2460,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
var f,
obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
parentId: jspb.Message.getFieldWithDefault(msg, 2, ""),
name: jspb.Message.getFieldWithDefault(msg, 3, ""),
name: jspb.Message.getFieldWithDefault(msg, 2, ""),
sortOrder: jspb.Message.getFieldWithDefault(msg, 3, 0),
};
if (includeInstance) {
@ -2507,11 +2508,11 @@ proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest.deserialize
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setParentId(value);
msg.setName(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
var value = /** @type {number} */ (reader.readUint32());
msg.setSortOrder(value);
break;
default:
reader.skipField();
@ -2549,13 +2550,13 @@ proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest.serializeBi
if (f.length > 0) {
writer.writeString(1, f);
}
f = /** @type {string} */ (jspb.Message.getField(message, 2));
if (f != null) {
writer.writeString(2, f);
}
f = message.getName();
if (f.length > 0) {
writer.writeString(3, f);
writer.writeString(2, f);
}
f = message.getSortOrder();
if (f !== 0) {
writer.writeUint32(3, f);
}
};
@ -2580,61 +2581,41 @@ proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest.prototype.s
};
/**
* optional string parent_id = 2;
* optional string name = 2;
* @return {string}
*/
proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest.prototype.getParentId =
proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest.prototype.getName =
function () {
return /** @type {string} */ (
jspb.Message.getFieldWithDefault(this, 2, "")
);
};
/**
* @param {string} value
* @return {!proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest} returns this
*/
proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest.prototype.setParentId =
function (value) {
return jspb.Message.setField(this, 2, value);
};
/**
* Clears the field making it undefined.
* @return {!proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest} returns this
*/
proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest.prototype.clearParentId =
function () {
return jspb.Message.setField(this, 2, undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest.prototype.hasParentId =
function () {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional string name = 3;
* @return {string}
*/
proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest.prototype.getName =
function () {
return /** @type {string} */ (
jspb.Message.getFieldWithDefault(this, 3, "")
);
};
/**
* @param {string} value
* @return {!proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest} returns this
*/
proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest.prototype.setName =
function (value) {
return jspb.Message.setProto3StringField(this, 3, value);
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional uint32 sort_order = 3;
* @return {number}
*/
proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest.prototype.getSortOrder =
function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {number} value
* @return {!proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest} returns this
*/
proto.bet.beteran.c2se.backend.member_level.UpdateMemberLevelRequest.prototype.setSortOrder =
function (value) {
return jspb.Message.setProto3IntField(this, 3, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {