Commit b8ce9050 by Nakarin Luankla

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

parents 9833c247 8eac606d
...@@ -427,8 +427,8 @@ ...@@ -427,8 +427,8 @@
<button type="submit" class="ti-btn ti-btn-success mx-2rem" (click)="save('draft')"> <button type="submit" class="ti-btn ti-btn-success mx-2rem" (click)="save('draft')">
บันทึกร่าง บันทึกร่าง
</button> </button>
<button type="submit" class="ti-btn ti-btn-success mx-2rem" (click)="save()"> <button type="submit" class="ti-btn ti-btn-secondary mx-2rem" (click)="save()">
บันทึกข้อมูล อนุมัติ
</button> </button>
</div> </div>
</ng-container> </ng-container>
......
...@@ -35,7 +35,7 @@ export class IdpEvalutionComponent { ...@@ -35,7 +35,7 @@ export class IdpEvalutionComponent {
this.formIdp.data = JSON.parse(JSON.stringify(response)) this.formIdp.data = JSON.parse(JSON.stringify(response))
if (this.formIdp.data) { if (this.formIdp.data) {
this.canSave = (this.formIdp.data.currentStep == this.formIdp.data.checkStep) && (this.masfromStatusType != 'Boss_finish' && this.masfromStatusType != 'Not_evaluating_yet') this.canSave = (this.formIdp.data.currentStep == this.formIdp.data.checkStep) && (this.masfromStatusType != 'Boss_finish' && this.masfromStatusType != 'Not_evaluating_yet')
this.canEdit = (this.formIdp.data.currentStep == this.formIdp.data.checkStep && (+(this.formIdp.data.checkStep) <= 1)) && (this.masfromStatusType != 'Boss_finish' && this.masfromStatusType != 'Not_evaluating_yet') this.canEdit = (this.formIdp.data.currentStep == this.formIdp.data.checkStep && (+(this.formIdp.data.checkStep) <= 1)) && (this.masfromStatusType != 'Boss_finish' && this.masfromStatusType != 'Not_evaluating_yet')
} }
switch (this.formIdp.data?.currentStep) { switch (this.formIdp.data?.currentStep) {
case ("0"): { case ("0"): {
...@@ -122,10 +122,10 @@ export class IdpEvalutionComponent { ...@@ -122,10 +122,10 @@ export class IdpEvalutionComponent {
</svg> </svg>
</div> </div>
`, `,
title: status == 'draft' ? 'บันทึกแบบร่าง' : 'บันทึกข้อมูล', title: status == 'draft' ? 'บันทึกแบบร่าง' : 'อนุมัติข้อมูล',
text: status == 'draft' ? 'คุณต้องการบันทึกแบบร่างของการประเมินนี้ใช่หรือไม่' : 'คุณต้องการบันทึกข้อมูลการประเมินนี้ใช่หรือไม่', text: status == 'draft' ? 'คุณต้องการบันทึกแบบร่างของการประเมินนี้ใช่หรือไม่' : 'คุณต้องการอนุมัติข้อมูลการประเมินนี้ใช่หรือไม่',
showCancelButton: true, showCancelButton: true,
confirmButtonText: 'ยืนยันการบันทึก', confirmButtonText: status == 'draft' ? 'ยืนยันการบันทึก' : 'ยืนยันการอนุมัติข้อมูล',
cancelButtonText: 'ย้อนกลับ', cancelButtonText: 'ย้อนกลับ',
customClass: { customClass: {
title: '!swal2-title-mt-20px', title: '!swal2-title-mt-20px',
...@@ -140,7 +140,7 @@ export class IdpEvalutionComponent { ...@@ -140,7 +140,7 @@ export class IdpEvalutionComponent {
} else if (result.dismiss === Swal.DismissReason.cancel) { } else if (result.dismiss === Swal.DismissReason.cancel) {
Swal.fire({ Swal.fire({
title: 'ยกเลิก!', title: 'ยกเลิก!',
text: 'การบันทึกถูกยกเลิก', text: status == 'draft' ? 'การบันทึกถูกยกเลิก' : 'การอนุมัติถูกยกเลิก',
icon: 'error', icon: 'error',
customClass: { customClass: {
confirmButton: '!swal2-button-bg-danger', confirmButton: '!swal2-button-bg-danger',
...@@ -213,7 +213,7 @@ export class IdpEvalutionComponent { ...@@ -213,7 +213,7 @@ export class IdpEvalutionComponent {
if (response.success) { if (response.success) {
Swal.fire({ Swal.fire({
title: 'บันทึกสำเร็จ!', title: 'บันทึกสำเร็จ!',
text: 'การประเมินของคุณถูกบันทึกแล้ว', text: status == 'draft' ? 'การประเมินถูกบันทึกแล้ว' : 'การประเมินถูกอนุมัติแล้ว',
icon: 'success', icon: 'success',
customClass: { customClass: {
confirmButton: '!swal2-button-bg-green', confirmButton: '!swal2-button-bg-green',
...@@ -223,7 +223,7 @@ export class IdpEvalutionComponent { ...@@ -223,7 +223,7 @@ export class IdpEvalutionComponent {
} else { } else {
Swal.fire({ Swal.fire({
title: 'ยกเลิก!', title: 'ยกเลิก!',
text: 'การบันทึกถูกยกเลิก', text: status == 'draft' ? 'การบันทึกนถูกยกเลิก' : 'การประเมินไม่ถูกอนุมัติ',
icon: 'error', icon: 'error',
customClass: { customClass: {
confirmButton: '!swal2-button-bg-danger', confirmButton: '!swal2-button-bg-danger',
...@@ -233,7 +233,7 @@ export class IdpEvalutionComponent { ...@@ -233,7 +233,7 @@ export class IdpEvalutionComponent {
}, error: error => { }, error: error => {
Swal.fire({ Swal.fire({
title: 'ยกเลิก!', title: 'ยกเลิก!',
text: 'การบันทึกถูกยกเลิก', text: status == 'draft' ? 'การบันทึกถูกยกเลิก' : 'การประเมินไม่ถูกอนุมัติ',
icon: 'error', icon: 'error',
customClass: { customClass: {
confirmButton: '!swal2-button-bg-danger', confirmButton: '!swal2-button-bg-danger',
......
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