Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
myjob-manage
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
myjob-manage
Commits
8d6cbd3d
Commit
8d6cbd3d
authored
Jul 10, 2025
by
Natthaphat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
เพิ่ม modal EXCCHILD, Template file excel, EXCEL_PORTAL ## npm i --force ด้วย เพิ่ม sweetalert ไป
parent
6f28c7db
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
103 additions
and
32 deletions
+103
-32
package-lock.json
package-lock.json
+11
-0
package.json
package.json
+2
-1
excel-list.component.html
...al/set-excel-reports/excel-list/excel-list.component.html
+0
-0
excel-list.component.ts
...rtal/set-excel-reports/excel-list/excel-list.component.ts
+88
-29
excel-portal.model.ts
src/app/DPU/models/excel-portal.model.ts
+1
-1
style.css
src/assets/css/style.css
+1
-1
No files found.
package-lock.json
View file @
8d6cbd3d
...
@@ -88,6 +88,7 @@
...
@@ -88,6 +88,7 @@
"sass"
:
"^1.69.7"
,
"sass"
:
"^1.69.7"
,
"simplebar-angular"
:
"^3.2.4"
,
"simplebar-angular"
:
"^3.2.4"
,
"sweetalert"
:
"^2.1.2"
,
"sweetalert"
:
"^2.1.2"
,
"sweetalert2"
:
"^11.22.2"
,
"swiper"
:
"^8.4.7"
,
"swiper"
:
"^8.4.7"
,
"tslib"
:
"^2.6.2"
,
"tslib"
:
"^2.6.2"
,
"zone.js"
:
"~0.14.2"
"zone.js"
:
"~0.14.2"
...
@@ -19690,6 +19691,16 @@
...
@@ -19690,6 +19691,16 @@
"promise-polyfill"
:
"^6.0.2"
"promise-polyfill"
:
"^6.0.2"
}
}
},
},
"node_modules/sweetalert2"
:
{
"version"
:
"11.22.2"
,
"resolved"
:
"https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.22.2.tgz"
,
"integrity"
:
"sha512-GFQGzw8ZXF23PO79WMAYXLl4zYmLiaKqYJwcp5eBF07wiI5BYPbZtKi2pcvVmfUQK+FqL1risJAMxugcPbGIyg=="
,
"license"
:
"MIT"
,
"funding"
:
{
"type"
:
"individual"
,
"url"
:
"https://github.com/sponsors/limonte"
}
},
"node_modules/swiper"
:
{
"node_modules/swiper"
:
{
"version"
:
"8.4.7"
,
"version"
:
"8.4.7"
,
"resolved"
:
"https://registry.npmjs.org/swiper/-/swiper-8.4.7.tgz"
,
"resolved"
:
"https://registry.npmjs.org/swiper/-/swiper-8.4.7.tgz"
,
...
...
package.json
View file @
8d6cbd3d
...
@@ -35,11 +35,11 @@
...
@@ -35,11 +35,11 @@
"
@ngx-translate/core
"
:
"^15.0.0"
,
"
@ngx-translate/core
"
:
"^15.0.0"
,
"
@ngx-translate/http-loader
"
:
"^8.0.0"
,
"
@ngx-translate/http-loader
"
:
"^8.0.0"
,
"
@syncfusion/ej2-angular-base
"
:
"^29.2.4"
,
"
@syncfusion/ej2-angular-base
"
:
"^29.2.4"
,
"
@syncfusion/ej2-angular-charts
"
:
"^29.2.4"
,
"
@syncfusion/ej2-angular-dropdowns
"
:
"^29.2.4"
,
"
@syncfusion/ej2-angular-dropdowns
"
:
"^29.2.4"
,
"
@syncfusion/ej2-angular-grids
"
:
"^29.2.4"
,
"
@syncfusion/ej2-angular-grids
"
:
"^29.2.4"
,
"
@syncfusion/ej2-angular-inputs
"
:
"^29.2.4"
,
"
@syncfusion/ej2-angular-inputs
"
:
"^29.2.4"
,
"
@syncfusion/ej2-angular-pivotview
"
:
"^29.2.4"
,
"
@syncfusion/ej2-angular-pivotview
"
:
"^29.2.4"
,
"
@syncfusion/ej2-angular-charts
"
:
"^29.2.4"
,
"
@syncfusion/ej2-grids
"
:
"^30.1.39"
,
"
@syncfusion/ej2-grids
"
:
"^30.1.39"
,
"
@tailwindcss/forms
"
:
"^0.5.7"
,
"
@tailwindcss/forms
"
:
"^0.5.7"
,
"
@types/google.maps
"
:
"^3.58.1"
,
"
@types/google.maps
"
:
"^3.58.1"
,
...
@@ -93,6 +93,7 @@
...
@@ -93,6 +93,7 @@
"
sass
"
:
"^1.69.7"
,
"
sass
"
:
"^1.69.7"
,
"
simplebar-angular
"
:
"^3.2.4"
,
"
simplebar-angular
"
:
"^3.2.4"
,
"
sweetalert
"
:
"^2.1.2"
,
"
sweetalert
"
:
"^2.1.2"
,
"
sweetalert2
"
:
"^11.22.2"
,
"
swiper
"
:
"^8.4.7"
,
"
swiper
"
:
"^8.4.7"
,
"
tslib
"
:
"^2.6.2"
,
"
tslib
"
:
"^2.6.2"
,
"
zone.js
"
:
"~0.14.2"
"
zone.js
"
:
"~0.14.2"
...
...
src/app/DPU/common/myportal/set-excel-reports/excel-list/excel-list.component.html
View file @
8d6cbd3d
This diff is collapsed.
Click to expand it.
src/app/DPU/common/myportal/set-excel-reports/excel-list/excel-list.component.ts
View file @
8d6cbd3d
...
@@ -17,12 +17,13 @@ import { NgSelectModule } from '@ng-select/ng-select';
...
@@ -17,12 +17,13 @@ import { NgSelectModule } from '@ng-select/ng-select';
import
{
SharedModule
}
from
'../../../../../shared/shared.module'
;
import
{
SharedModule
}
from
'../../../../../shared/shared.module'
;
import
{
MatPaginator
}
from
'@angular/material/paginator'
;
import
{
MatPaginator
}
from
'@angular/material/paginator'
;
import
{
QuillModule
}
from
'ngx-quill'
;
import
{
QuillModule
}
from
'ngx-quill'
;
import
{
MatDialog
,
MatDialogModule
}
from
'@angular/material/dialog'
;
import
{
MatDialog
,
MatDialogModule
,
MatDialogRef
}
from
'@angular/material/dialog'
;
import
{
FileUploadModule
}
from
'ng2-file-upload'
;
import
{
FileUploadModule
}
from
'ng2-file-upload'
;
import
{
FormsModule
,
NgModel
}
from
'@angular/forms'
;
import
{
FormsModule
,
NgModel
}
from
'@angular/forms'
;
import
{
DatagridSyncfutionComponent
}
from
'../../../../../datagrid-syncfution/datagrid-syncfution.component'
;
import
{
DatagridSyncfutionComponent
}
from
'../../../../../datagrid-syncfution/datagrid-syncfution.component'
;
import
{
PivotSyncfutionComponent
}
from
"../../../../../pivot-syncfution/pivot-syncfution.component"
;
import
{
PivotSyncfutionComponent
}
from
"../../../../../pivot-syncfution/pivot-syncfution.component"
;
import
{
SafeUrlPipe
}
from
'../../../../../../pipe/safe-url.pipe'
;
import
{
SafeUrlPipe
}
from
'../../../../../../pipe/safe-url.pipe'
;
import
Swal
from
'sweetalert2'
;
export
interface
ModalDetail
{
export
interface
ModalDetail
{
text
:
{
cardHead
:
string
,
search
:
string
[],
tableHead
:
string
[]
}
text
:
{
cardHead
:
string
,
search
:
string
[],
tableHead
:
string
[]
}
}
}
...
@@ -145,10 +146,14 @@ export class ExcelListComponent implements OnInit {
...
@@ -145,10 +146,14 @@ export class ExcelListComponent implements OnInit {
isSearching
=
false
;
isSearching
=
false
;
modalRef
:
any
;
modalRef
:
any
;
modalRefaddChild
:
any
;
modalRefaddChild
:
any
;
modalRefexcel_portal
:
MatDialogRef
<
any
>
;
modalRefvideoModal
:
any
;
searchText
:
string
=
''
;
searchText
:
string
=
''
;
@
ViewChild
(
'addGroupModal'
)
addGroupModal
!
:
TemplateRef
<
any
>
;
@
ViewChild
(
'addGroupModal'
)
addGroupModal
!
:
TemplateRef
<
any
>
;
@
ViewChild
(
'addChildModal'
)
addChildModal
!
:
TemplateRef
<
any
>
;
@
ViewChild
(
'addChildModal'
)
addChildModal
!
:
TemplateRef
<
any
>
;
@
ViewChild
(
'excel_portalModal'
)
excel_portalModal
!
:
TemplateRef
<
any
>
;
@
ViewChild
(
'videoModal'
)
videoModal
!
:
TemplateRef
<
any
>
;
constructor
(
private
excelReportService
:
ExcelReportService
,
constructor
(
private
excelReportService
:
ExcelReportService
,
private
modalService
:
NgbModal
,
private
modalService
:
NgbModal
,
private
customCubeService
:
CustomCubeService
,
private
customCubeService
:
CustomCubeService
,
...
@@ -329,25 +334,48 @@ export class ExcelListComponent implements OnInit {
...
@@ -329,25 +334,48 @@ export class ExcelListComponent implements OnInit {
this
.
openModaladdChild
()
this
.
openModaladdChild
()
}
}
openExcelPortalModal
(
targetModal
:
TemplateRef
<
any
>
)
{
openExcelPortalModal
()
{
this
.
pageModal
=
1
this
.
pageModal
=
1
;
this
.
pageSizeModal
=
10
this
.
pageSizeModal
=
10
;
const
modalRef
=
this
.
modalService
.
open
(
targetModal
,
{
centered
:
true
,
this
.
modalRefexcel_portal
=
this
.
modal
.
open
(
this
.
excel_portalModal
,
{
backdrop
:
'static'
,
width
:
'1500px'
,
size
:
'xl'
height
:
'700px'
,
})
maxWidth
:
'none'
,
modalRef
.
result
.
then
(
result
=>
{
disableClose
:
true
,
this
.
templateFile
.
portalId
=
result
.
excelId
data
:
{}
},
reject
=>
{
})
});
this
.
modalRefexcel_portal
.
afterClosed
().
subscribe
(
result
=>
{
if
(
result
?.
excelId
)
{
this
.
templateFile
.
portalId
=
result
.
excelId
;
}
}
openVideoModal
(
targetModal
:
TemplateRef
<
any
>
,
videoLink
:
string
)
{
});
this
.
videoLink
=
this
.
convertToEmbedUrl
(
videoLink
)
}
this
.
modalService
.
open
(
targetModal
,
{
// openVideoModal(targetModal: TemplateRef<any>, videoLink: string) {
centered
:
true
,
// this.videoLink = this.convertToEmbedUrl(videoLink)
windowClass
:
'my-dialog-video-preview'
// this.modalService.open(targetModal, {
})
// centered: true,
// windowClass: 'my-dialog-video-preview'
// })
// }
openVideoModal
(
videoLink
:
string
)
{
this
.
videoLink
=
this
.
convertToEmbedUrl
(
videoLink
);
this
.
modalRefvideoModal
=
this
.
modal
.
open
(
this
.
videoModal
,
{
width
:
'50%'
,
height
:
'50%'
,
panelClass
:
'video-preview-dialog'
,
backdropClass
:
'video-backdrop'
});
}
}
// openVideoModal(videoLink: string) {
// this.videoLink = this.convertToEmbedUrl(videoLink);
// this.modalRefvideoModal = this.modal.open(this.videoModal, {
// width: '100%',
// height: '100%',
// panelClass: 'video-dialog-custom'
// });
// }
convertToEmbedUrl
(
youtubeUrl
:
string
):
string
{
convertToEmbedUrl
(
youtubeUrl
:
string
):
string
{
try
{
try
{
const
url
=
new
URL
(
youtubeUrl
);
const
url
=
new
URL
(
youtubeUrl
);
...
@@ -690,20 +718,28 @@ export class ExcelListComponent implements OnInit {
...
@@ -690,20 +718,28 @@ export class ExcelListComponent implements OnInit {
}
}
templateFileTypeChange
()
{
templateFileTypeChange
()
{
if
(
this
.
templateFileName
||
this
.
templateFile
.
portalId
)
{
if
(
this
.
templateFileName
||
this
.
templateFile
?.
portalId
)
{
const
modalConfirmRef
=
this
.
modalService
.
open
(
ConfirmModalComponent
,
{
Swal
.
fire
({
centered
:
true
,
title
:
'ยืนยันการดำเนินการ'
,
backdrop
:
'static'
,
text
:
'คุณต้องการยกเลิกไฟล์ที่เลือกหรือไม่'
,
})
icon
:
'warning'
,
modalConfirmRef
.
componentInstance
.
message
=
'คุณต้องการยกเลิกไฟล์ที่เลือกหรือไม่'
showCancelButton
:
true
,
modalConfirmRef
.
result
.
then
(
result
=>
{
confirmButtonText
:
'ใช่, ยกเลิกไฟล์'
,
this
.
onToggleTemplateFile
()
cancelButtonText
:
'ไม่'
,
},
reject
=>
{
})
confirmButtonColor
:
'#d33'
,
// สีปุ่มยืนยัน (แดง)
cancelButtonColor
:
'#3085d6'
,
// สีปุ่มยกเลิก (น้ำเงิน)
reverseButtons
:
true
}).
then
((
result
)
=>
{
if
(
result
.
isConfirmed
)
{
this
.
onToggleTemplateFile
();
}
});
}
else
{
}
else
{
this
.
onToggleTemplateFile
()
this
.
onToggleTemplateFile
()
;
}
}
}
}
onToggleTemplateFile
()
{
onToggleTemplateFile
()
{
if
(
this
.
templateFileType
==
'portal'
)
{
if
(
this
.
templateFileType
==
'portal'
)
{
this
.
templateFileType
=
'upload'
this
.
templateFileType
=
'upload'
...
@@ -838,7 +874,7 @@ export class ExcelListComponent implements OnInit {
...
@@ -838,7 +874,7 @@ export class ExcelListComponent implements OnInit {
openModaladdChild
()
{
openModaladdChild
()
{
this
.
modalRefaddChild
=
this
.
modal
.
open
(
this
.
addChildModal
,
{
this
.
modalRefaddChild
=
this
.
modal
.
open
(
this
.
addChildModal
,
{
width
:
'
10
00px'
,
width
:
'
7
00px'
,
height
:
'500px'
height
:
'500px'
})
})
}
}
...
@@ -847,4 +883,26 @@ export class ExcelListComponent implements OnInit {
...
@@ -847,4 +883,26 @@ export class ExcelListComponent implements OnInit {
this
.
modalRefaddChild
?.
close
()
this
.
modalRefaddChild
?.
close
()
}
}
openModalexcel_portal
()
{
this
.
modalRefexcel_portal
=
this
.
modal
.
open
(
this
.
excel_portalModal
,
{
width
:
'1500px'
,
height
:
'700px'
})
}
closeModalexcel_portal
()
{
this
.
modalRefexcel_portal
?.
close
()
}
openModvideoModal
()
{
this
.
modalRefvideoModal
=
this
.
modal
.
open
(
this
.
videoModal
,
{
width
:
'1500px'
,
height
:
'700px'
})
}
closeModvideoModal
()
{
this
.
modalRefexcel_portal
?.
close
()
}
}
}
\ No newline at end of file
src/app/DPU/models/excel-portal.model.ts
View file @
8d6cbd3d
...
@@ -83,7 +83,7 @@ export class MyExcelPortalModel implements ExcelPortalModel {
...
@@ -83,7 +83,7 @@ export class MyExcelPortalModel implements ExcelPortalModel {
this
.
uploadTime
=
data
?.
uploadTime
||
''
this
.
uploadTime
=
data
?.
uploadTime
||
''
}
}
getImg
()
{
getImg
()
{
return
this
.
thumbnail
?
environment
.
baseU
rl
+
"files/image/"
+
this
.
thumbnail
:
''
return
this
.
thumbnail
?
environment
.
u
rl
+
"files/image/"
+
this
.
thumbnail
:
''
}
}
}
}
...
...
src/assets/css/style.css
View file @
8d6cbd3d
...
@@ -3650,7 +3650,7 @@ label {
...
@@ -3650,7 +3650,7 @@ label {
}
}
.swal2-container
.swal2-styled.swal2-cancel
{
.swal2-container
.swal2-styled.swal2-cancel
{
@apply
bg-
light
text-defaulttextcolor
py-[0.375rem]
px-3
text-[0.8125rem]
!important;
@apply
bg-
danger
text-white
py-[0.375rem]
px-3
text-[0.8125rem]
!important;
}
}
/* end:: cart */
/* end:: cart */
...
...
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