Commit 26cc0a8a by Nattana Chaiyamat

Merge branch 'DEV' of https://mygit.myhr.co.th/angular/myAppraisal into DEV

parents 46de48d7 403fc7f2
......@@ -136,7 +136,7 @@
</div>
</div>
</div>
<mat-dialog-content class="mt-2">
<mat-dialog-content >
<label for="input-label" class="ti-form-label mt-2rem">รหัสบริษัท<span class="text-danger">
*
<ng-container *ngIf="modalStatus=='add'&&checkPrimary()">
......@@ -162,11 +162,12 @@
class="hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary dark:bg-bgdark dark:hover:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-white dark:focus:ring-offset-white/10">
ย้อนกลับ
</button>
<button type="button" class="ti-btn ti-btn-success" mat-button [mat-dialog-close]="true"
<button type="button" class="ti-btn ti-btn-success" mat-button (click)="addCompany()"
[class.ti-btn-disabled]="!dataSelect.code||!dataSelect.tdesc||(modalStatus=='add'&&checkPrimary())"
[disabled]="!dataSelect.code||!dataSelect.tdesc||(modalStatus=='add'&&checkPrimary())">
บันทึกข้อมูล
</button>
</mat-dialog-actions>
</ng-template>
......@@ -297,10 +298,10 @@
data-hs-overlay="#company-registration-page-modal">
ย้อนกลับ
</button>
<a class="ti-btn ti-btn-success" href="javascript:void(0);"
<!-- <a class="ti-btn ti-btn-success" href="javascript:void(0);"
data-hs-overlay="#company-registration-page-alert-modal" (click)="addCompany()">
บันทึกข้อมูล
</a>
</a> -->
</ng-container>
<ng-container *ngIf="modalStatus=='delete'||modalStatus=='deleteGroup'">
<button type="button"
......
......@@ -34,6 +34,7 @@ export class CompanyRegistrationPageComponent {
selectedFile: File | null = null;
selectedFileName: string = 'กรุณาเลือกไฟล์';
dialogRef:any
constructor(private toastr: ToastrService,
private companyService: CompanyService,
private cdr: ChangeDetectorRef,
......@@ -95,19 +96,20 @@ export class CompanyRegistrationPageComponent {
if (response.success) {
this.showAlert(response.message, 'success')
this.getCompanyList()
this.closeDialog();
} else {
this.showAlert(response.message, 'error')
this.dataLoading = false
this.closeDialog();
this.cdr.detectChanges()
}
}, error: error => {
this.showAlert(error.message, 'error')
this.cdr.detectChanges()
this.closeDialog();
this.dataLoading = false
}
})
} else if (result.dismiss === Swal.DismissReason.cancel) {
this.openDialog();
}
});
......@@ -246,15 +248,14 @@ export class CompanyRegistrationPageComponent {
}
openDialog() {
const dialogRef = this.dialog.open(this.registrationModal, {
this.dialogRef = this.dialog.open(this.registrationModal, {
width: '500px',
disableClose: false,
});
dialogRef.afterClosed().subscribe(result => {
console.log("🚀 ~ CompanyRegistrationPageComponent ~ dialogRef.afterClosed ~ result:", result)
if(result){
this.addCompany();
console.log("🚀 ~ CompanyRegistrationPageComponent ~ openDialog ~ this.dialogRef:", this.dialogRef)
}
});
closeDialog() {
this.dialogRef.close()
}
}
......@@ -407,3 +407,9 @@ ngx-dropzone {
border-top-width: 1px!important;
border-top-color: rgb(226, 232, 240)!important;
}
.mat-mdc-dialog-content {
max-height: 80vh!important;
}
.mat-mdc-dialog-container .mdc-dialog__content {
padding-top: 10px!important;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment