Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mySkill-x
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
angular
mySkill-x
Commits
a92c099d
Commit
a92c099d
authored
Apr 02, 2025
by
Nakarin Luankla
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UPDATE เปลี่ยน modal จัดรอบการประเมินใหม่
parent
26cc0a8a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
120 additions
and
36 deletions
+120
-36
edit-define-document-form.component.html
...ne-document-form/edit-define-document-form.component.html
+0
-0
edit-define-document-form.component.ts
...fine-document-form/edit-define-document-form.component.ts
+73
-24
evaluation-cycle.component.html
...-manager/evaluation-cycle/evaluation-cycle.component.html
+17
-2
evaluation-cycle.component.scss
...-manager/evaluation-cycle/evaluation-cycle.component.scss
+6
-0
evaluation-cycle.component.ts
...le-manager/evaluation-cycle/evaluation-cycle.component.ts
+24
-10
No files found.
src/app/components/competency-assessment/evaluation-cycle-manager/define-document-form/edit-define-document-form/edit-define-document-form.component.html
View file @
a92c099d
This diff is collapsed.
Click to expand it.
src/app/components/competency-assessment/evaluation-cycle-manager/define-document-form/edit-define-document-form/edit-define-document-form.component.ts
View file @
a92c099d
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
Input
,
Output
,
ViewChild
}
from
'@angular/core'
;
import
{
MatDialog
}
from
'@angular/material/dialog'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
AppraisalRoundModel
,
MyAppraisalRoundModel
}
from
'src/app/shared/model/appraisal-aps.model'
;
import
{
AppraisalRoundModel
,
MyAppraisalRoundModel
}
from
'src/app/shared/model/appraisal-aps.model'
;
import
{
AppraisalModel
,
MyAppraisalModel
}
from
'src/app/shared/model/appraisal.model'
;
import
{
AppraisalModel
,
MyAppraisalModel
}
from
'src/app/shared/model/appraisal.model'
;
...
@@ -6,7 +7,7 @@ import { EvaluationCycleModel, MyEvaluationCycleModel } from 'src/app/shared/mod
...
@@ -6,7 +7,7 @@ import { EvaluationCycleModel, MyEvaluationCycleModel } from 'src/app/shared/mod
import
{
EvaluationModal
}
from
'src/app/shared/model/evaluation-form.modal'
;
import
{
EvaluationModal
}
from
'src/app/shared/model/evaluation-form.modal'
;
import
{
EvaluationAssessmentService
}
from
'src/app/shared/services/evaluation-assessment.service'
;
import
{
EvaluationAssessmentService
}
from
'src/app/shared/services/evaluation-assessment.service'
;
import
{
EvaluationCycleService
}
from
'src/app/shared/services/evaluation-cycle.service'
;
import
{
EvaluationCycleService
}
from
'src/app/shared/services/evaluation-cycle.service'
;
import
Swal
from
'sweetalert2'
;
@
Component
({
@
Component
({
selector
:
'app-edit-define-document-form'
,
selector
:
'app-edit-define-document-form'
,
templateUrl
:
'./edit-define-document-form.component.html'
,
templateUrl
:
'./edit-define-document-form.component.html'
,
...
@@ -14,6 +15,8 @@ import { EvaluationCycleService } from 'src/app/shared/services/evaluation-cycle
...
@@ -14,6 +15,8 @@ import { EvaluationCycleService } from 'src/app/shared/services/evaluation-cycle
})
})
export
class
EditDefineDocumentFormComponent
{
export
class
EditDefineDocumentFormComponent
{
@
ViewChild
(
"evaluationFormEmpModal"
)
evaluationFormEmpModal
:
any
;
@
ViewChild
(
"IndicatorsEmpModal"
)
IndicatorsEmpModal
:
any
;
@
Input
()
pathTitle
=
[
'การประเมินจัดการประสิทธิภาพ'
,
'รอบการประเมิน'
,
'กำหนดฟอร์มเอกสาร'
,
'เเก้ไขฟอร์มตามรอบการประเมิน'
];
@
Input
()
pathTitle
=
[
'การประเมินจัดการประสิทธิภาพ'
,
'รอบการประเมิน'
,
'กำหนดฟอร์มเอกสาร'
,
'เเก้ไขฟอร์มตามรอบการประเมิน'
];
@
Output
()
sendPathTitle
:
EventEmitter
<
string
[]
>
=
new
EventEmitter
<
string
[]
>
();
@
Output
()
sendPathTitle
:
EventEmitter
<
string
[]
>
=
new
EventEmitter
<
string
[]
>
();
@
Output
()
sendGroupShow
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
@
Output
()
sendGroupShow
:
EventEmitter
<
string
>
=
new
EventEmitter
<
string
>
();
...
@@ -25,7 +28,7 @@ export class EditDefineDocumentFormComponent {
...
@@ -25,7 +28,7 @@ export class EditDefineDocumentFormComponent {
search
=
""
search
=
""
assessmentList
:
AppraisalModel
[]
=
[]
assessmentList
:
AppraisalModel
[]
=
[]
loadingAssessmentList
=
false
evaluationRound
:
EvaluationCycleModel
=
new
MyEvaluationCycleModel
()
evaluationRound
:
EvaluationCycleModel
=
new
MyEvaluationCycleModel
()
isChecked
:
boolean
=
false
;
isChecked
:
boolean
=
false
;
...
@@ -57,10 +60,12 @@ export class EditDefineDocumentFormComponent {
...
@@ -57,10 +60,12 @@ export class EditDefineDocumentFormComponent {
pageIndicator
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
pageIndicator
=
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
);
pageSizeIndicator
=
10
pageSizeIndicator
=
10
competencyTopicIds
:
string
[]
=
[]
competencyTopicIds
:
string
[]
=
[]
dialogRef
:
any
constructor
(
private
toastr
:
ToastrService
,
constructor
(
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
,
private
cdr
:
ChangeDetectorRef
,
private
evaluationAssessmentService
:
EvaluationAssessmentService
,
private
evaluationAssessmentService
:
EvaluationAssessmentService
,
private
evaluationCycleService
:
EvaluationCycleService
private
evaluationCycleService
:
EvaluationCycleService
,
private
dialog
:
MatDialog
)
{
)
{
}
}
...
@@ -93,10 +98,12 @@ export class EditDefineDocumentFormComponent {
...
@@ -93,10 +98,12 @@ export class EditDefineDocumentFormComponent {
}
}
getAssessmentList
()
{
getAssessmentList
()
{
this
.
loadingAssessmentList
=
true
this
.
evaluationAssessmentService
.
getById
(
this
.
evaluationRoundId
!
).
subscribe
({
this
.
evaluationAssessmentService
.
getById
(
this
.
evaluationRoundId
!
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
this
.
assessmentList
=
response
this
.
assessmentList
=
response
this
.
searchChange
()
this
.
searchChange
()
this
.
loadingAssessmentList
=
false
this
.
cdr
.
detectChanges
();
this
.
cdr
.
detectChanges
();
},
},
error
:
err
=>
{
error
:
err
=>
{
...
@@ -121,11 +128,11 @@ export class EditDefineDocumentFormComponent {
...
@@ -121,11 +128,11 @@ export class EditDefineDocumentFormComponent {
}
}
saveAssessmentOne
(
item
:
AppraisalModel
)
{
saveAssessmentOne
(
item
:
AppraisalModel
)
{
this
.
evaluationAssessmentService
.
post
(
item
).
subscribe
({
this
.
evaluationAssessmentService
.
post
(
item
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
this
.
showAlertToastr
(
response
.
message
,
'success'
)
}
else
{
}
else
{
}
}
}
}
...
@@ -157,6 +164,17 @@ export class EditDefineDocumentFormComponent {
...
@@ -157,6 +164,17 @@ export class EditDefineDocumentFormComponent {
if
(
this
.
empassessmentList
)
{
if
(
this
.
empassessmentList
)
{
this
.
empassessmentList
.
masfromTopic
=
this
.
empassessmentRoundListCheckbox
.
map
(
x
=>
x
.
item
)
as
any
;
this
.
empassessmentList
.
masfromTopic
=
this
.
empassessmentRoundListCheckbox
.
map
(
x
=>
x
.
item
)
as
any
;
}
}
Swal
.
fire
({
icon
:
'question'
,
title
:
'แจ้งเตือน'
,
text
:
'ยืนยันการบันทึกข้อมูลหรือไม่'
,
showCancelButton
:
true
,
confirmButtonText
:
'บันทึกข้อมูล'
,
cancelButtonText
:
'ย้อนกลับ'
,
reverseButtons
:
true
,
}).
then
((
result
)
=>
{
console
.
log
(
"🚀 ~ EditDefineDocumentFormComponent ~ saveIndicators ~ result:"
,
result
)
if
(
result
.
isConfirmed
)
{
this
.
evaluationAssessmentService
.
postList
([
this
.
empassessmentList
]).
subscribe
({
this
.
evaluationAssessmentService
.
postList
([
this
.
empassessmentList
]).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
...
@@ -164,12 +182,17 @@ export class EditDefineDocumentFormComponent {
...
@@ -164,12 +182,17 @@ export class EditDefineDocumentFormComponent {
this
.
getApsassessy
();
this
.
getApsassessy
();
this
.
getApsassessyMini
();
this
.
getApsassessyMini
();
this
.
cdr
.
detectChanges
();
this
.
cdr
.
detectChanges
();
// this.closeDialog();
}
}
},
error
:
err
=>
{
},
error
:
err
=>
{
console
.
error
(
'Error fetching evaluation cycles:'
,
err
);
console
.
error
(
'Error fetching evaluation cycles:'
,
err
);
}
}
})
})
}
else
{
}
});
}
else
{
this
.
showAlert
(
'กรุณาเลือกรายการ'
,
'error'
);
this
.
showAlert
(
'กรุณาเลือกรายการ'
,
'error'
);
}
}
}
}
...
@@ -297,17 +320,34 @@ export class EditDefineDocumentFormComponent {
...
@@ -297,17 +320,34 @@ export class EditDefineDocumentFormComponent {
const
filteredData
=
this
.
filterIndicators
();
const
filteredData
=
this
.
filterIndicators
();
this
.
pageIndicator
=
Array
.
from
({
length
:
Math
.
ceil
(
filteredData
.
length
/
this
.
pageSizeIndicator
)
},
(
_
,
i
)
=>
i
+
1
);
this
.
pageIndicator
=
Array
.
from
({
length
:
Math
.
ceil
(
filteredData
.
length
/
this
.
pageSizeIndicator
)
},
(
_
,
i
)
=>
i
+
1
);
}
}
openModalIndicators
()
{
const
modalRef
=
this
.
dialog
.
open
(
this
.
IndicatorsEmpModal
,
{
width
:
'60vw'
,
enterAnimationDuration
:
'300ms'
,
// ระยะเวลาการเปิด
exitAnimationDuration
:
'150ms'
,
// ระยะเวลาการปิด
disableClose
:
false
,
});
}
addIndicators
(
item
:
AppraisalRoundModel
)
{
addIndicators
(
item
:
AppraisalRoundModel
)
{
this
.
empassessmentRoundListCheckbox
.
push
({
checkbox
:
false
,
item
})
this
.
empassessmentRoundListCheckbox
.
push
({
checkbox
:
false
,
item
})
this
.
competencyTopicIds
.
push
(
item
.
groupAssessment1
?.
competencyIndicatorsCourses1Mini
?.
competencyIndicatorsCourses0
?.
competencyTopic
?.
competencyTopicId
)
this
.
competencyTopicIds
.
push
(
item
.
groupAssessment1
?.
competencyIndicatorsCourses1Mini
?.
competencyIndicatorsCourses0
?.
competencyTopic
?.
competencyTopicId
)
this
.
indicatorChange
();
this
.
indicatorChange
();
this
.
closeModalClass
(
'form-assessment'
)
}
}
//############################# ปิด Modal Indicators #############################
//############################# ปิด Modal Indicators #############################
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
Swal
.
fire
({
title
:
'แจ้งเตือน'
,
text
:
text
,
icon
:
type
,
confirmButtonText
:
'ตกลง'
,
});
}
showAlertToastr
(
text
:
string
,
type
:
'success'
|
'error'
)
{
this
.
toastr
[
type
](
text
,
'แจ้งเตือน'
,
{
this
.
toastr
[
type
](
text
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
positionClass
:
'toast-top-right'
,
...
@@ -315,22 +355,22 @@ export class EditDefineDocumentFormComponent {
...
@@ -315,22 +355,22 @@ export class EditDefineDocumentFormComponent {
}
}
openModalClass
(
id
:
string
,
type
?:
string
)
{
openModalClass
(
id
:
string
,
type
?:
string
)
{
this
.
typeForm
=
type
??
""
//
this.typeForm = type ?? ""
if
(
id
==
'modal-alert'
)
{
//
if (id == 'modal-alert') {
if
(
type
==
'deleteForm'
)
{
//
if (type == 'deleteForm') {
this
.
msg
=
'ยืนยันการลบรายการ'
//
this.msg = 'ยืนยันการลบรายการ'
}
else
if
(
type
==
'addForm'
||
type
==
'addIndicator'
)
{
//
} else if (type == 'addForm' || type == 'addIndicator') {
this
.
msg
=
'ยืนยันการบันทึกรายการ'
//
this.msg = 'ยืนยันการบันทึกรายการ'
}
//
}
}
//
}
if
(
id
)
{
//
if (id) {
document
.
getElementById
(
id
)?.
classList
.
add
(
'open'
);
//
document.getElementById(id)?.classList.add('open');
document
.
getElementById
(
id
)?.
classList
.
remove
(
'hidden'
);
//
document.getElementById(id)?.classList.remove('hidden');
setTimeout
(()
=>
{
//
setTimeout(() => {
document
.
getElementById
(
id
)?.
setAttribute
(
'aria-overlay'
,
'false'
)
//
document.getElementById(id)?.setAttribute('aria-overlay', 'false')
},
10
);
//
}, 10);
}
//
}
this
.
isChecked
=
false
;
this
.
isChecked
=
false
;
this
.
numDataListChecked
=
0
;
this
.
numDataListChecked
=
0
;
...
@@ -345,6 +385,13 @@ export class EditDefineDocumentFormComponent {
...
@@ -345,6 +385,13 @@ export class EditDefineDocumentFormComponent {
openAddRoundModel
(
evaluationRoundId
:
string
,
apsassessy
:
string
,
item
:
AppraisalModel
,
model
:
string
)
{
openAddRoundModel
(
evaluationRoundId
:
string
,
apsassessy
:
string
,
item
:
AppraisalModel
,
model
:
string
)
{
this
.
dialogRef
=
this
.
dialog
.
open
(
this
.
evaluationFormEmpModal
,
{
width
:
'80vw'
,
disableClose
:
false
,
enterAnimationDuration
:
'300ms'
,
// ระยะเวลาการเปิด
exitAnimationDuration
:
'150ms'
,
// ระยะเวลาการปิด
});
this
.
searchIndicator
=
""
this
.
searchIndicator
=
""
this
.
selectEmp
=
item
this
.
selectEmp
=
item
this
.
openModalClass
(
model
);
this
.
openModalClass
(
model
);
...
@@ -355,7 +402,9 @@ export class EditDefineDocumentFormComponent {
...
@@ -355,7 +402,9 @@ export class EditDefineDocumentFormComponent {
}
}
closeDialog
()
{
this
.
dialogRef
.
close
()
}
...
...
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle/evaluation-cycle.component.html
View file @
a92c099d
...
@@ -139,8 +139,7 @@
...
@@ -139,8 +139,7 @@
(
click
)="
modalStatus=
'edit'
;
modalStatusEdit=
(item.data.statusFrom.code==
'
0
'?
true:false
);
setData
(
item
.
data
)"
(
click
)="
modalStatus=
'edit'
;
modalStatusEdit=
(item.data.statusFrom.code==
'
0
'?
true:false
);
setData
(
item
.
data
)"
data-hs-overlay=
"#evaluation-cycle-page-modal"
></i>
data-hs-overlay=
"#evaluation-cycle-page-modal"
></i>
<i
class=
"ti ti-user cursor-pointer i-gray fs-l px-1"
*
ngIf=
"item.data.statusFrom.code =='1'"
<i
class=
"ti ti-user cursor-pointer i-gray fs-l px-1"
*
ngIf=
"item.data.statusFrom.code =='1'"
data-hs-overlay=
"#evaluation-cycle-person-modal"
(
click
)="
openModal
(
item
.
data
.
evaluationRoundId
)"
></i>
(
click
)="
openModal
('
evaluation-cycle-person-modal
',
item
.
data
.
evaluationRoundId
)"
></i>
<!-- <i class="ti ti-trash cursor-pointer i-gray fs-l px-1" (click)="modalStatus='delete';setData(item.data)"
<!-- <i class="ti ti-trash cursor-pointer i-gray fs-l px-1" (click)="modalStatus='delete';setData(item.data)"
data-hs-overlay="#evaluation-cycle-page-alert-modal"></i> -->
data-hs-overlay="#evaluation-cycle-page-alert-modal"></i> -->
<!-- <span class="badge text-white m-1" *ngIf="item.data.statusCode.code!='1'"
<!-- <span class="badge text-white m-1" *ngIf="item.data.statusCode.code!='1'"
...
@@ -439,6 +438,22 @@
...
@@ -439,6 +438,22 @@
</div>
</div>
</div>
</div>
<ng-template
#
evaluationRoundModal
let-modal
>
<h3
mat-dialog-title
>
เเก้ไขเเบบฟอร์มตามรอบการประเมิน
</h3>
<mat-dialog-content
>
<app-edit-define-document-form
*
ngIf=
"evaluationRoundId"
[
evaluationRoundId
]="
evaluationRoundId
"
></app-edit-define-document-form>
</mat-dialog-content>
<mat-dialog-actions
align=
"end"
>
<button
type=
"button"
mat-button
[
mat-dialog-close
]
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>
</mat-dialog-actions>
</ng-template>
<div
id=
"evaluation-cycle-person-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"evaluation-cycle-person-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out m-3 lg:!mx-auto "
style=
"min-width: 70%;"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out m-3 lg:!mx-auto "
style=
"min-width: 70%;"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
...
...
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle/evaluation-cycle.component.scss
View file @
a92c099d
.dialog-title
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
\ No newline at end of file
src/app/components/competency-assessment/evaluation-cycle-manager/evaluation-cycle/evaluation-cycle.component.ts
View file @
a92c099d
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
Output
,
Renderer2
}
from
'@angular/core'
;
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
Output
,
Renderer2
,
ViewChild
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
EvaluationCycleModel
,
MyEvaluationCycleModel
}
from
'src/app/shared/model/evaluation-cycle.model'
;
import
{
EvaluationCycleModel
,
MyEvaluationCycleModel
}
from
'src/app/shared/model/evaluation-cycle.model'
;
import
{
EvaluationCycleService
}
from
'src/app/shared/services/evaluation-cycle.service'
;
import
{
EvaluationCycleService
}
from
'src/app/shared/services/evaluation-cycle.service'
;
...
@@ -6,6 +6,7 @@ import { MyStatusCodeModel, StatusCodeModel } from 'src/app/shared/model/status-
...
@@ -6,6 +6,7 @@ import { MyStatusCodeModel, StatusCodeModel } from 'src/app/shared/model/status-
import
{
EvaluationAssessmentService
}
from
'src/app/shared/services/evaluation-assessment.service'
;
import
{
EvaluationAssessmentService
}
from
'src/app/shared/services/evaluation-assessment.service'
;
import
{
PLService
}
from
'src/app/shared/services/pl.service'
;
import
{
PLService
}
from
'src/app/shared/services/pl.service'
;
import
{
PLModel
,
MyPLModel
}
from
'src/app/shared/model/pl.model'
;
import
{
PLModel
,
MyPLModel
}
from
'src/app/shared/model/pl.model'
;
import
{
MatDialog
}
from
'@angular/material/dialog'
;
export
interface
DataModal
{
export
interface
DataModal
{
search
:
string
,
search
:
string
,
currentPage
:
number
,
currentPage
:
number
,
...
@@ -18,6 +19,7 @@ export interface DataModal {
...
@@ -18,6 +19,7 @@ export interface DataModal {
})
})
export
class
EvaluationCycleComponent
{
export
class
EvaluationCycleComponent
{
@
Output
()
evaluationRoundIdChange
=
new
EventEmitter
<
string
>
();
@
Output
()
evaluationRoundIdChange
=
new
EventEmitter
<
string
>
();
@
ViewChild
(
"evaluationRoundModal"
)
evaluationRoundModal
:
any
;
apsPeriodStart
:
string
=
''
;
apsPeriodStart
:
string
=
''
;
apsPeriodEnd
:
string
=
''
;
apsPeriodEnd
:
string
=
''
;
...
@@ -48,11 +50,13 @@ export class EvaluationCycleComponent {
...
@@ -48,11 +50,13 @@ export class EvaluationCycleComponent {
(
this
.
currentDate
.
getFullYear
()
+
1
)
+
""
,
(
this
.
currentDate
.
getFullYear
()
+
1
)
+
""
,
]
]
modalStatusEdit
=
false
modalStatusEdit
=
false
dialogFormRef
:
any
constructor
(
private
evaluationCycleService
:
EvaluationCycleService
,
constructor
(
private
evaluationCycleService
:
EvaluationCycleService
,
private
toastr
:
ToastrService
,
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
,
private
cdr
:
ChangeDetectorRef
,
private
renderer
:
Renderer2
,
private
renderer
:
Renderer2
,
private
pLService
:
PLService
private
pLService
:
PLService
,
private
dialog
:
MatDialog
)
{
}
)
{
}
ngOnInit
():
void
{
ngOnInit
():
void
{
...
@@ -60,6 +64,7 @@ export class EvaluationCycleComponent {
...
@@ -60,6 +64,7 @@ export class EvaluationCycleComponent {
this
.
unlisten
=
this
.
renderer
.
listen
(
'document'
,
'keydown'
,
(
event
)
=>
{
this
.
unlisten
=
this
.
renderer
.
listen
(
'document'
,
'keydown'
,
(
event
)
=>
{
if
(
event
.
key
===
'Escape'
)
{
if
(
event
.
key
===
'Escape'
)
{
this
.
evaluationRoundId
=
''
this
.
evaluationRoundId
=
''
this
.
dialogFormRef
.
close
();
}
}
});
});
this
.
getPlList
()
this
.
getPlList
()
...
@@ -214,17 +219,26 @@ export class EvaluationCycleComponent {
...
@@ -214,17 +219,26 @@ export class EvaluationCycleComponent {
}
}
}
}
openModal
(
id
:
string
,
evaluationRoundId
:
string
)
{
openModal
(
evaluationRoundId
:
string
)
{
this
.
evaluationRoundId
=
''
this
.
evaluationRoundId
=
''
if
(
id
==
'evaluation-cycle-person-modal'
)
{
this
.
dialogFormRef
=
this
.
dialog
.
open
(
this
.
evaluationRoundModal
,
{
width
:
'80vw'
,
disableClose
:
true
,
enterAnimationDuration
:
'300ms'
,
// ระยะเวลาการเปิด
exitAnimationDuration
:
'150ms'
,
// ระยะเวลาการปิด
});
this
.
evaluationRoundId
=
evaluationRoundId
this
.
evaluationRoundId
=
evaluationRoundId
this
.
evaluationRoundIdChange
.
emit
(
evaluationRoundId
)
this
.
evaluationRoundIdChange
.
emit
(
evaluationRoundId
)
setTimeout
(()
=>
{
document
.
getElementById
(
id
)?.
classList
.
add
(
'open'
);
// if (id == 'evaluation-cycle-person-modal') {
document
.
getElementById
(
id
)?.
classList
.
remove
(
'hidden'
);
// this.evaluationRoundId = evaluationRoundId
document
.
getElementById
(
id
)?.
setAttribute
(
'aria-overlay'
,
'false'
);
// this.evaluationRoundIdChange.emit(evaluationRoundId)
},
10
);
// setTimeout(() => {
}
// document.getElementById(id)?.classList.add('open');
// document.getElementById(id)?.classList.remove('hidden');
// document.getElementById(id)?.setAttribute('aria-overlay', 'false');
// }, 10);
// }
}
}
searchModalChange
(
dataList
:
any
[])
{
searchModalChange
(
dataList
:
any
[])
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment