파트너 등록 다이얼로그 추가

This commit is contained in:
Park Byung Eun 2022-07-15 08:22:02 +00:00
parent fb21ccf389
commit b34f2ebfff
19 changed files with 246 additions and 147 deletions

View File

@ -1,123 +0,0 @@
<div class="flex flex-col max-w-240 md:min-w-160 max-h-screen -m-6">
<!-- Header -->
<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">New Message</div>
<button mat-icon-button (click)="saveAndClose()" [tabIndex]="-1">
<mat-icon
class="text-current"
[svgIcon]="'heroicons_outline:x'"
></mat-icon>
</button>
</div>
<!-- Compose form -->
<form
class="flex flex-col flex-auto p-6 sm:p-8 overflow-y-auto"
[formGroup]="composeForm"
>
<!-- To -->
<mat-form-field>
<mat-label>To</mat-label>
<input matInput [formControlName]="'to'" />
<div class="copy-fields-toggles" matSuffix>
<span
class="text-sm font-medium cursor-pointer select-none hover:underline"
*ngIf="!copyFields.cc"
(click)="showCopyField('cc')"
>
Cc
</span>
<span
class="ml-2 text-sm font-medium cursor-pointer select-none hover:underline"
*ngIf="!copyFields.bcc"
(click)="showCopyField('bcc')"
>
Bcc
</span>
</div>
</mat-form-field>
<!-- Cc -->
<mat-form-field *ngIf="copyFields.cc">
<mat-label>Cc</mat-label>
<input matInput [formControlName]="'cc'" />
</mat-form-field>
<!-- Bcc -->
<mat-form-field *ngIf="copyFields.bcc">
<mat-label>Bcc</mat-label>
<input matInput [formControlName]="'bcc'" />
</mat-form-field>
<!-- Subject -->
<mat-form-field>
<mat-label>Subject</mat-label>
<input matInput [formControlName]="'subject'" />
</mat-form-field>
<!-- Body -->
<quill-editor
class="mt-2"
[formControlName]="'body'"
[modules]="quillModules"
></quill-editor>
<!-- Actions -->
<div
class="flex flex-col sm:flex-row sm:items-center justify-between mt-4 sm:mt-6"
>
<div class="-ml-2">
<!-- Attach file -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:paper-clip'"
></mat-icon>
</button>
<!-- Insert link -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:link'"
></mat-icon>
</button>
<!-- Insert emoji -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:emoji-happy'"
></mat-icon>
</button>
<!-- Insert image -->
<button mat-icon-button>
<mat-icon
class="icon-size-5"
[svgIcon]="'heroicons_solid:photograph'"
></mat-icon>
</button>
</div>
<div class="flex items-center mt-4 sm:mt-0">
<!-- Discard -->
<button class="ml-auto sm:ml-0" mat-stroked-button (click)="discard()">
Discard
</button>
<!-- Save as draft -->
<button class="sm:mx-3" mat-stroked-button (click)="saveAsDraft()">
<span>Save as draft</span>
</button>
<!-- Send -->
<button
class="order-first sm:order-last"
mat-flat-button
[color]="'primary'"
(click)="send()"
>
Send
</button>
</div>
</div>
</form>
</div>

View File

@ -247,7 +247,11 @@
<!-- note --> <!-- note -->
<div class="hidden sm:block truncate"> <div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'"> <button
mat-flat-button
[color]="'primary'"
(click)="__onClickRegist($event)"
>
{{ partner.note }} {{ partner.note }}
</button> </button>
</div> </div>

View File

@ -34,7 +34,9 @@ import { Partner } from '../models/partner';
import { PartnerPagination } from '../models/partner-pagination'; import { PartnerPagination } from '../models/partner-pagination';
import { PartnerService } from '../services/partner.service'; import { PartnerService } from '../services/partner.service';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { RegistComposeComponent } from '../compose/regist-compose.component';
import { MatDialog } from '@angular/material/dialog';
@Component({ @Component({
selector: 'app-partner-list', selector: 'app-partner-list',
templateUrl: './all-list.component.html', templateUrl: './all-list.component.html',
@ -84,7 +86,8 @@ export class AllListComponent implements OnInit, AfterViewInit, OnDestroy {
private _fuseConfirmationService: FuseConfirmationService, private _fuseConfirmationService: FuseConfirmationService,
private _formBuilder: FormBuilder, private _formBuilder: FormBuilder,
private _partnerService: PartnerService, private _partnerService: PartnerService,
private router: Router private router: Router,
private _matDialog: MatDialog
) {} ) {}
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
@ -195,4 +198,12 @@ export class AllListComponent implements OnInit, AfterViewInit, OnDestroy {
__trackByFn(index: number, item: any): any { __trackByFn(index: number, item: any): any {
return item.id || index; return item.id || index;
} }
__onClickRegist(event: MouseEvent): void {
const dialogRef = this._matDialog.open(RegistComposeComponent);
dialogRef.afterClosed().subscribe((result) => {
console.log('Compose dialog was closed!');
});
}
} }

View File

@ -326,7 +326,11 @@
</div> </div>
<!-- 비고 --> <!-- 비고 -->
<div class="hidden sm:block truncate"> <div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'"> <button
mat-flat-button
[color]="'primary'"
(click)="__onClickRegist($event)"
>
{{ partnerBranch.note }} {{ partnerBranch.note }}
</button> </button>
</div> </div>

View File

@ -34,6 +34,8 @@ import { User } from '../../user/models/user';
import { Partner as PartnerBranch } from '../models/partner'; import { Partner as PartnerBranch } from '../models/partner';
import { PartnerPagination as PartnerBranchPagination } from '../models/partner-pagination'; import { PartnerPagination as PartnerBranchPagination } from '../models/partner-pagination';
import { PartnerService as PartnerBranchService } from '../services/partner.service'; import { PartnerService as PartnerBranchService } from '../services/partner.service';
import { MatDialog } from '@angular/material/dialog';
import { RegistComposeComponent } from '../compose/regist-compose.component';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
@ -87,7 +89,8 @@ export class BranchListComponent implements OnInit, AfterViewInit, OnDestroy {
private _fuseConfirmationService: FuseConfirmationService, private _fuseConfirmationService: FuseConfirmationService,
private _formBuilder: FormBuilder, private _formBuilder: FormBuilder,
private _partnerBranchService: PartnerBranchService, private _partnerBranchService: PartnerBranchService,
private router: Router private router: Router,
private _matDialog: MatDialog
) {} ) {}
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
@ -198,4 +201,12 @@ export class BranchListComponent implements OnInit, AfterViewInit, OnDestroy {
__trackByFn(index: number, item: any): any { __trackByFn(index: number, item: any): any {
return item.id || index; return item.id || index;
} }
__onClickRegist(event: MouseEvent): void {
const dialogRef = this._matDialog.open(RegistComposeComponent);
dialogRef.afterClosed().subscribe((result) => {
console.log('Compose dialog was closed!');
});
}
} }

View File

@ -328,7 +328,11 @@
</div> </div>
<!-- 비고 --> <!-- 비고 -->
<div class="hidden sm:block truncate"> <div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'"> <button
mat-flat-button
[color]="'primary'"
(click)="__onClickRegist($event)"
>
{{ partnerDivision.note }} {{ partnerDivision.note }}
</button> </button>
</div> </div>

View File

@ -34,6 +34,9 @@ import { Partner as PartnerDivision } from '../models/partner';
import { PartnerPagination as PartnerDivisionPagination } from '../models/partner-pagination'; import { PartnerPagination as PartnerDivisionPagination } from '../models/partner-pagination';
import { PartnerService as PartnerDivisionService } from '../services/partner.service'; import { PartnerService as PartnerDivisionService } from '../services/partner.service';
import { MatDialog } from '@angular/material/dialog';
import { RegistComposeComponent } from '../compose/regist-compose.component';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
@Component({ @Component({
@ -85,7 +88,8 @@ export class DivisionListComponent implements OnInit, AfterViewInit, OnDestroy {
private _fuseConfirmationService: FuseConfirmationService, private _fuseConfirmationService: FuseConfirmationService,
private _formBuilder: FormBuilder, private _formBuilder: FormBuilder,
private _partnerDivisionService: PartnerDivisionService, private _partnerDivisionService: PartnerDivisionService,
private router: Router private router: Router,
private _matDialog: MatDialog
) {} ) {}
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
@ -196,4 +200,11 @@ export class DivisionListComponent implements OnInit, AfterViewInit, OnDestroy {
__trackByFn(index: number, item: any): any { __trackByFn(index: number, item: any): any {
return item.id || index; return item.id || index;
} }
__onClickRegist(event: MouseEvent): void {
const dialogRef = this._matDialog.open(RegistComposeComponent);
dialogRef.afterClosed().subscribe((result) => {
console.log('Compose dialog was closed!');
});
}
} }

View File

@ -332,7 +332,11 @@
</div> </div>
<!-- 비고 --> <!-- 비고 -->
<div class="hidden sm:block truncate"> <div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'"> <button
mat-flat-button
[color]="'primary'"
(click)="__onClickRegist($event)"
>
{{ partnerMainoffice.note }} {{ partnerMainoffice.note }}
</button> </button>
</div> </div>

View File

@ -35,6 +35,9 @@ import { PartnerPagination as PartnerMainofficePagination } from '../models/part
import { PartnerService as PartnerMainofficeService } from '../services/partner.service'; import { PartnerService as PartnerMainofficeService } from '../services/partner.service';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { MatDialog } from '@angular/material/dialog';
import { RegistComposeComponent } from '../compose/regist-compose.component';
@Component({ @Component({
selector: 'app-partner-main-office-list', selector: 'app-partner-main-office-list',
templateUrl: './main-office-list.component.html', templateUrl: './main-office-list.component.html',
@ -86,7 +89,8 @@ export class MainOfficeListComponent
private _fuseConfirmationService: FuseConfirmationService, private _fuseConfirmationService: FuseConfirmationService,
private _formBuilder: FormBuilder, private _formBuilder: FormBuilder,
private _partnerMainofficeService: PartnerMainofficeService, private _partnerMainofficeService: PartnerMainofficeService,
private router: Router private router: Router,
private _matDialog: MatDialog
) {} ) {}
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
@ -197,4 +201,12 @@ export class MainOfficeListComponent
__trackByFn(index: number, item: any): any { __trackByFn(index: number, item: any): any {
return item.id || index; return item.id || index;
} }
__onClickRegist(event: MouseEvent): void {
const dialogRef = this._matDialog.open(RegistComposeComponent);
dialogRef.afterClosed().subscribe((result) => {
console.log('Compose dialog was closed!');
});
}
} }

View File

@ -326,7 +326,11 @@
</div> </div>
<!-- 비고 --> <!-- 비고 -->
<div class="hidden sm:block truncate"> <div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'"> <button
mat-flat-button
[color]="'primary'"
(click)="__onClickRegist($event)"
>
{{ partnerOffice.note }} {{ partnerOffice.note }}
</button> </button>
</div> </div>

View File

@ -37,6 +37,9 @@ import { PartnerService as PartnerOfficeService } from '../services/partner.serv
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { MatDialog } from '@angular/material/dialog';
import { RegistComposeComponent } from '../compose/regist-compose.component';
@Component({ @Component({
selector: 'app-partner-office-list', selector: 'app-partner-office-list',
templateUrl: './office-list.component.html', templateUrl: './office-list.component.html',
@ -86,7 +89,8 @@ export class OfficeListComponent implements OnInit, AfterViewInit, OnDestroy {
private _fuseConfirmationService: FuseConfirmationService, private _fuseConfirmationService: FuseConfirmationService,
private _formBuilder: FormBuilder, private _formBuilder: FormBuilder,
private _partnerOfficeService: PartnerOfficeService, private _partnerOfficeService: PartnerOfficeService,
private router: Router private router: Router,
private _matDialog: MatDialog
) {} ) {}
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
@ -197,4 +201,12 @@ export class OfficeListComponent implements OnInit, AfterViewInit, OnDestroy {
__trackByFn(index: number, item: any): any { __trackByFn(index: number, item: any): any {
return item.id || index; return item.id || index;
} }
__onClickRegist(event: MouseEvent): void {
const dialogRef = this._matDialog.open(RegistComposeComponent);
dialogRef.afterClosed().subscribe((result) => {
console.log('Compose dialog was closed!');
});
}
} }

View File

@ -335,7 +335,11 @@
</div> </div>
<!-- 비고 --> <!-- 비고 -->
<div class="hidden sm:block truncate"> <div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'"> <button
mat-flat-button
[color]="'primary'"
(click)="__onClickRegist($event)"
>
{{ partnerRecommendation.note }} {{ partnerRecommendation.note }}
</button> </button>
</div> </div>

View File

@ -37,6 +37,8 @@ import { PartnerService as PartnerRecommendationService } from '../services/part
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { MatDialog } from '@angular/material/dialog';
import { RegistComposeComponent } from '../compose/regist-compose.component';
@Component({ @Component({
selector: 'app-partner-recommendation-list', selector: 'app-partner-recommendation-list',
templateUrl: './recommendation-list.component.html', templateUrl: './recommendation-list.component.html',
@ -88,7 +90,8 @@ export class RecommendationListComponent
private _fuseConfirmationService: FuseConfirmationService, private _fuseConfirmationService: FuseConfirmationService,
private _formBuilder: FormBuilder, private _formBuilder: FormBuilder,
private _partnerRecommendationService: PartnerRecommendationService, private _partnerRecommendationService: PartnerRecommendationService,
private router: Router private router: Router,
private _matDialog: MatDialog
) {} ) {}
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
@ -199,4 +202,12 @@ export class RecommendationListComponent
__trackByFn(index: number, item: any): any { __trackByFn(index: number, item: any): any {
return item.id || index; return item.id || index;
} }
__onClickRegist(event: MouseEvent): void {
const dialogRef = this._matDialog.open(RegistComposeComponent);
dialogRef.afterClosed().subscribe((result) => {
console.log('Compose dialog was closed!');
});
}
} }

View File

@ -323,7 +323,11 @@
</div> </div>
<!-- 비고 --> <!-- 비고 -->
<div class="hidden sm:block truncate"> <div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'"> <button
mat-flat-button
[color]="'primary'"
(click)="__onClickRegist($event)"
>
{{ partnerStore.note }} {{ partnerStore.note }}
</button> </button>
</div> </div>

View File

@ -36,6 +36,8 @@ import { PartnerService as PartnerStoreService } from '../services/partner.servi
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { MatDialog } from '@angular/material/dialog';
import { RegistComposeComponent } from '../compose/regist-compose.component';
@Component({ @Component({
selector: 'app-partner-store-list', selector: 'app-partner-store-list',
templateUrl: './store-list.component.html', templateUrl: './store-list.component.html',
@ -85,7 +87,8 @@ export class StoreListComponent implements OnInit, AfterViewInit, OnDestroy {
private _fuseConfirmationService: FuseConfirmationService, private _fuseConfirmationService: FuseConfirmationService,
private _formBuilder: FormBuilder, private _formBuilder: FormBuilder,
private _partnerStoreService: PartnerStoreService, private _partnerStoreService: PartnerStoreService,
private router: Router private router: Router,
private _matDialog: MatDialog
) {} ) {}
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
@ -196,4 +199,12 @@ export class StoreListComponent implements OnInit, AfterViewInit, OnDestroy {
__trackByFn(index: number, item: any): any { __trackByFn(index: number, item: any): any {
return item.id || index; return item.id || index;
} }
__onClickRegist(event: MouseEvent): void {
const dialogRef = this._matDialog.open(RegistComposeComponent);
dialogRef.afterClosed().subscribe((result) => {
console.log('Compose dialog was closed!');
});
}
} }

View File

@ -0,0 +1,3 @@
import { RegistComposeComponent } from './regist-compose.component';
export const COMPOSE = [RegistComposeComponent];

View File

@ -0,0 +1,111 @@
<div class="flex flex-col max-w-240 md:min-w-160 max-h-screen -m-6">
<!-- Header -->
<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">대본사 생성</div>
<button mat-icon-button (click)="saveAndClose()" [tabIndex]="-1">
<mat-icon
class="text-current"
[svgIcon]="'heroicons_outline:x'"
></mat-icon>
</button>
</div>
<!-- Compose form -->
<form
class="flex flex-col flex-auto p-6 sm:p-8 overflow-y-auto"
[formGroup]="composeForm"
>
<!-- To -->
<mat-form-field>
<mat-label>파트너아이디</mat-label>
<input matInput [formControlName]="'partnerId'" />
</mat-form-field>
<!-- Cc -->
<mat-form-field>
<mat-label>사이트명</mat-label>
<input matInput [formControlName]="'siteName'" />
</mat-form-field>
<!-- Bcc -->
<mat-form-field>
<mat-label>회원 아이디</mat-label>
<input matInput [formControlName]="'signinId'" />
</mat-form-field>
<!-- Subject -->
<mat-form-field>
<mat-label>비밀번호</mat-label>
<input matInput [formControlName]="'password'" />
</mat-form-field>
<mat-form-field>
<mat-label>환전 비밀번호</mat-label>
<input matInput [formControlName]="'exchangePw'" />
</mat-form-field>
<mat-form-field>
<mat-label>닉네임</mat-label>
<input matInput [formControlName]="'nickname'" />
</mat-form-field>
<mat-form-field>
<mat-label>정산종류</mat-label>
<input matInput [formControlName]="'calculateType'" />
</mat-form-field>
<mat-form-field>
<mat-label>휴대폰번호</mat-label>
<input matInput [formControlName]="'phoneNumber'" />
</mat-form-field>
<mat-form-field>
<mat-label>은행명</mat-label>
<input matInput [formControlName]="'bankName'" />
</mat-form-field>
<mat-form-field>
<mat-label>계좌번호</mat-label>
<input matInput [formControlName]="'accountNumber'" />
</mat-form-field>
<mat-form-field>
<mat-label>예금주</mat-label>
<input matInput [formControlName]="'accountHolder'" />
</mat-form-field>
<!-- Body -->
<!-- <quill-editor
class="mt-2"
[formControlName]="'body'"
[modules]="quillModules"
></quill-editor> -->
<!-- Actions -->
<div
class="flex flex-col sm:flex-row sm:items-center justify-between mt-4 sm:mt-6"
>
<div class="flex items-center mt-4 sm:mt-0">
<!-- Discard -->
<button class="ml-auto sm:ml-0" mat-stroked-button (click)="discard()">
Discard
</button>
<!-- Save as draft -->
<button class="sm:mx-3" mat-stroked-button (click)="saveAsDraft()">
<span>Save as draft</span>
</button>
<!-- Send -->
<button
class="order-first sm:order-last"
mat-flat-button
[color]="'primary'"
(click)="send()"
>
Send
</button>
</div>
</div>
</form>
</div>

View File

@ -3,8 +3,8 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog'; import { MatDialogRef } from '@angular/material/dialog';
@Component({ @Component({
selector: 'member-regist-compose', selector: 'app-regist-compose',
templateUrl: './compose.component.html', templateUrl: './regist-compose.component.html',
encapsulation: ViewEncapsulation.None, encapsulation: ViewEncapsulation.None,
}) })
export class RegistComposeComponent implements OnInit { export class RegistComposeComponent implements OnInit {
@ -13,13 +13,13 @@ export class RegistComposeComponent implements OnInit {
cc: false, cc: false,
bcc: false, bcc: false,
}; };
quillModules: any = { // quillModules: any = {
toolbar: [ // toolbar: [
['bold', 'italic', 'underline'], // ['bold', 'italic', 'underline'],
[{ align: [] }, { list: 'ordered' }, { list: 'bullet' }], // [{ align: [] }, { list: 'ordered' }, { list: 'bullet' }],
['clean'], // ['clean'],
], // ],
}; // };
/** /**
* Constructor * Constructor

View File

@ -21,11 +21,12 @@ import { TranslocoModule } from '@ngneat/transloco';
import { SharedModule } from 'app/shared/shared.module'; import { SharedModule } from 'app/shared/shared.module';
import { COMPONENTS } from './components'; import { COMPONENTS } from './components';
import { COMPOSE } from './compose';
import { partnerRoutes } from './partner.routing'; import { partnerRoutes } from './partner.routing';
@NgModule({ @NgModule({
declarations: [COMPONENTS], declarations: [COMPONENTS, COMPOSE],
imports: [ imports: [
TranslocoModule, TranslocoModule,
SharedModule, SharedModule,