Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
myhr-portal
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
myhr-portal
Commits
4997ddae
Commit
4997ddae
authored
Jun 10, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
แก้ไข เพิ่มรายงาน Excel
parent
16a26cd2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
7 deletions
+37
-7
excel-list.component.html
src/app/apps/excel-list/excel-list.component.html
+8
-7
excel-list.component.ts
src/app/apps/excel-list/excel-list.component.ts
+29
-0
No files found.
src/app/apps/excel-list/excel-list.component.html
View file @
4997ddae
...
...
@@ -303,9 +303,9 @@
<div
class=
"form-group row ml-0"
>
<div
class=
"custom-control custom-radio col-sm-4 d-flex align-items-center"
>
<input
type=
"radio"
class=
"custom-control-input cursor-pointer"
name=
"excelFile"
id=
"excelFilePortal"
[
checked
]="
templateFileType=
='portal'"
(
click
)="
templateFileType=
'portal'
;
templateFile
.
fileData=
''
;
templateFile
.
fileType=
''
;
templateFileName=
''
"
>
<label
class=
"custom-control-label cursor-pointer"
for=
"excelFilePortal
"
>
เลือกเอ็กเซลล์ไฟล์จาก
[
checked
]="
templateFileType=
='portal'"
(
click
)="
templateFileTypeChange
()"
>
<label
class=
"custom-control-label cursor-pointer"
(
click
)="
templateFileTypeChange
()
"
>
เลือกเอ็กเซลล์ไฟล์จาก
Portal
<span
*
ngIf=
"templateFileType=='portal'"
style=
"color: red"
>
*
</span></label>
</div>
<div
class=
"col-sm-8 d-flex align-items-center"
>
...
...
@@ -321,9 +321,10 @@
<div
class=
"form-group row ml-0"
>
<div
class=
"custom-control custom-radio col-sm-4"
>
<input
type=
"radio"
class=
"custom-control-input cursor-pointer"
name=
"excelFile"
id=
"excelFileUpload"
[
checked
]="
templateFileType=
='upload'"
(
click
)="
templateFileType=
'upload'
;
templateFile
.
portalId=
''
"
>
<label
class=
"custom-control-label cursor-pointer"
for=
"excelFileUpload"
>
อัพโหลดเอ็กเซลล์ไฟล์
<span
*
ngIf=
"templateFileType=='upload'"
style=
"color: red"
>
*
</span></label>
[
checked
]="
templateFileType=
='upload'"
(
click
)="
templateFileTypeChange
()"
>
<label
class=
"custom-control-label cursor-pointer"
(
click
)="
templateFileTypeChange
()"
>
อัพโหลดเอ็กเซลล์ไฟล์
<span
*
ngIf=
"templateFileType=='upload'"
style=
"color: red"
>
*
</span></label>
</div>
<div
class=
"col-sm-8 d-flex align-items-center"
>
<ng-container
*
ngIf=
"templateFileType=='upload'"
>
...
...
@@ -403,7 +404,7 @@
</div>
<div
class=
"modal-footer "
>
<button
type=
"submit"
class=
"btn btn-info"
[
disabled
]="(!
templateFile
.
portalId
&&!
templateFile
.
fileData
)||!
templateFile
.
tdesc
"
[
disabled
]="(!
templateFile
.
portalId
&&!
templateFile
Name
)||!
templateFile
.
tdesc
"
(
click
)="
postTemplateFile
()"
>
บันทึก
</button>
<button
type=
"button"
class=
"btn btn-danger"
(
click
)="
modal
.
dismiss
()"
>
ปิด
</button>
</div>
...
...
src/app/apps/excel-list/excel-list.component.ts
View file @
4997ddae
...
...
@@ -263,6 +263,7 @@ export class ExcelListComponent implements OnInit {
this
.
templateFile
=
new
MyTemplateFileModel
(
data
)
this
.
templateFileType
=
this
.
templateFile
.
portalId
?
'portal'
:
'upload'
this
.
templateFileName
=
this
.
templateFile
.
portalId
?
''
:
this
.
templateFile
.
fileName
this
.
templateFile
.
realFileNameOld
=
this
.
templateFile
.
fileName
}
this
.
addChildModalRef
=
this
.
modalService
.
open
(
targetModal
,
{
centered
:
true
,
...
...
@@ -600,4 +601,31 @@ export class ExcelListComponent implements OnInit {
ngOnDestroy
():
void
{
this
.
getTemplateFileSubscription
?.
unsubscribe
()
}
templateFileTypeChange
()
{
if
(
this
.
templateFileName
||
this
.
templateFile
.
portalId
)
{
const
modalConfirmRef
=
this
.
modalService
.
open
(
ConfirmModalComponent
,
{
centered
:
true
,
backdrop
:
'static'
,
})
modalConfirmRef
.
componentInstance
.
message
=
'คุณต้องการยกเลิกไฟล์ที่เลือกหรือไม่'
modalConfirmRef
.
result
.
then
(
result
=>
{
this
.
onToggleTemplateFile
()
},
reject
=>
{
})
}
else
{
this
.
onToggleTemplateFile
()
}
}
onToggleTemplateFile
()
{
if
(
this
.
templateFileType
==
'portal'
)
{
this
.
templateFileType
=
'upload'
this
.
templateFile
.
portalId
=
''
}
else
if
(
this
.
templateFileType
==
'upload'
)
{
this
.
templateFileType
=
'portal'
;
this
.
templateFile
.
fileData
=
''
;
this
.
templateFile
.
fileType
=
''
;
this
.
templateFileName
=
''
}
}
}
\ No newline at end of file
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