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
8797a543
Commit
8797a543
authored
Jul 15, 2025
by
sawit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
942244cb
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
7 deletions
+47
-7
excel-list.component.html
...al/set-excel-reports/excel-list/excel-list.component.html
+13
-1
excel-list.component.ts
...rtal/set-excel-reports/excel-list/excel-list.component.ts
+32
-6
template.model.ts
src/app/DPU/models/template.model.ts
+2
-0
No files found.
src/app/DPU/common/myportal/set-excel-reports/excel-list/excel-list.component.html
View file @
8797a543
...
@@ -337,6 +337,18 @@
...
@@ -337,6 +337,18 @@
</option>
</option>
</select>
</select>
</div>
</div>
<div
class=
"xl:col-span-12 col-span-12"
>
<label
class=
"form-label"
>
ชื่อบริษัท
<span
class=
"required text-danger"
>
*
</span>
</label>
<select
class=
"form-select"
required
[
disabled
]="
bodyTemplate
.
status=
='edit'"
[(
ngModel
)]="
bodyTemplate
.
data
.
companyId
"
>
<option
style=
"color: red"
[
class
.
d-none
]="
bodyTemplate
.
data
.
companyId=
=''"
[
value
]="''"
>
{{bodyTemplate.data.companyId!=''?'ยกเลิก':''}}
</option>
<option
*
ngFor=
"let item of itemsList"
[
ngValue
]="
item
.
companyId
"
>
{{item.companyName}}
</option>
</select>
</div>
</div>
</div>
</div>
</div>
...
@@ -349,7 +361,7 @@
...
@@ -349,7 +361,7 @@
<button
type=
"button"
<button
type=
"button"
[
class
.
ti-btn-disabled
]="!
bodyTemplate
.
data
.
tname
||
!
bodyTemplate
.
data
.
ename
||!
bodyTemplate
.
data
.
module
"
[
class
.
ti-btn-disabled
]="!
bodyTemplate
.
data
.
tname
||
!
bodyTemplate
.
data
.
ename
||!
bodyTemplate
.
data
.
module
"
[
disabled
]="!
bodyTemplate
.
data
.
tname
||
!
bodyTemplate
.
data
.
ename
||!
bodyTemplate
.
data
.
module
"
[
disabled
]="!
bodyTemplate
.
data
.
tname
||
!
bodyTemplate
.
data
.
ename
||!
bodyTemplate
.
data
.
module
"
(
click
)="
closeModalAddGroup
()"
class=
"ti-btn bg-primary text-white !font-medium"
>
{{'Save' |
(
click
)="
postTemplate
()"
class=
"ti-btn bg-primary text-white !font-medium"
>
{{'Save' |
translate}}
</button>
translate}}
</button>
</div>
</div>
</div>
</div>
...
...
src/app/DPU/common/myportal/set-excel-reports/excel-list/excel-list.component.ts
View file @
8797a543
...
@@ -24,6 +24,9 @@ import { DatagridSyncfutionComponent } from '../../../../../datagrid-syncfution/
...
@@ -24,6 +24,9 @@ import { DatagridSyncfutionComponent } from '../../../../../datagrid-syncfution/
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'
;
import
Swal
from
'sweetalert2'
;
import
{
DatasourceTableModel
,
MyDatasourceTableModel
}
from
'../../../../models/datasource-table.model'
;
import
{
DatasourseTableService
}
from
'../../../../services/datasourse-table.service'
;
import
swal
from
'sweetalert'
;
export
interface
ModalDetail
{
export
interface
ModalDetail
{
text
:
{
cardHead
:
string
,
search
:
string
[],
tableHead
:
string
[]
}
text
:
{
cardHead
:
string
,
search
:
string
[],
tableHead
:
string
[]
}
}
}
...
@@ -77,7 +80,8 @@ export class ExcelListComponent implements OnInit {
...
@@ -77,7 +80,8 @@ export class ExcelListComponent implements OnInit {
ename
:
string
,
ename
:
string
,
tdesc
:
string
,
tdesc
:
string
,
edesc
:
string
,
edesc
:
string
,
module
:
string
module
:
string
,
companyId
:
string
,
}
}
}
=
{
}
=
{
status
:
'add'
,
status
:
'add'
,
...
@@ -87,7 +91,8 @@ export class ExcelListComponent implements OnInit {
...
@@ -87,7 +91,8 @@ export class ExcelListComponent implements OnInit {
ename
:
''
,
ename
:
''
,
tdesc
:
''
,
tdesc
:
''
,
edesc
:
''
,
edesc
:
''
,
module
:
''
module
:
''
,
companyId
:
''
}
}
}
}
...
@@ -154,6 +159,7 @@ export class ExcelListComponent implements OnInit {
...
@@ -154,6 +159,7 @@ export class ExcelListComponent implements OnInit {
modalRefgridModal
:
MatDialogRef
<
any
>
;
modalRefgridModal
:
MatDialogRef
<
any
>
;
modalRefpivotModal
:
MatDialogRef
<
any
>
;
modalRefpivotModal
:
MatDialogRef
<
any
>
;
searchText
:
string
=
''
;
searchText
:
string
=
''
;
itemsList
:
DatasourceTableModel
[]
=
[];
@
ViewChild
(
'addGroupModal'
)
addGroupModal
!
:
TemplateRef
<
any
>
;
@
ViewChild
(
'addGroupModal'
)
addGroupModal
!
:
TemplateRef
<
any
>
;
@
ViewChild
(
'addChildModal'
)
addChildModal
!
:
TemplateRef
<
any
>
;
@
ViewChild
(
'addChildModal'
)
addChildModal
!
:
TemplateRef
<
any
>
;
...
@@ -167,7 +173,8 @@ export class ExcelListComponent implements OnInit {
...
@@ -167,7 +173,8 @@ export class ExcelListComponent implements OnInit {
private
modalService
:
NgbModal
,
private
modalService
:
NgbModal
,
private
customCubeService
:
CustomCubeService
,
private
customCubeService
:
CustomCubeService
,
private
cdr
:
ChangeDetectorRef
,
private
cdr
:
ChangeDetectorRef
,
private
modal
:
MatDialog
)
{
private
modal
:
MatDialog
,
private
datasourceTable
:
DatasourseTableService
)
{
}
}
ngOnInit
():
void
{
ngOnInit
():
void
{
...
@@ -176,6 +183,7 @@ export class ExcelListComponent implements OnInit {
...
@@ -176,6 +183,7 @@ export class ExcelListComponent implements OnInit {
this
.
getExcelPortalList
()
this
.
getExcelPortalList
()
this
.
getExcelPortalgGroupList
()
this
.
getExcelPortalgGroupList
()
this
.
getExcelPortalTagsList
()
this
.
getExcelPortalTagsList
()
this
.
getData
()
}
}
get
totalItems
():
number
{
get
totalItems
():
number
{
return
this
.
searchText
==
''
return
this
.
searchText
==
''
...
@@ -275,7 +283,8 @@ export class ExcelListComponent implements OnInit {
...
@@ -275,7 +283,8 @@ export class ExcelListComponent implements OnInit {
})
})
}
}
postTemplate
()
{
postTemplate
()
{
console
.
log
(
"wait for function"
)
this
.
modalRef
?.
close
()
}
}
openAlertModal
(
message
?:
string
)
{
openAlertModal
(
message
?:
string
)
{
const
modalRef
=
this
.
modalService
.
open
(
AlertModalComponent
,
{
const
modalRef
=
this
.
modalService
.
open
(
AlertModalComponent
,
{
...
@@ -296,7 +305,8 @@ export class ExcelListComponent implements OnInit {
...
@@ -296,7 +305,8 @@ export class ExcelListComponent implements OnInit {
ename
:
data
.
ename
,
ename
:
data
.
ename
,
tdesc
:
data
.
tdesc
,
tdesc
:
data
.
tdesc
,
edesc
:
data
.
edesc
,
edesc
:
data
.
edesc
,
module
:
data
.
module
module
:
data
.
module
,
companyId
:
data
.
companyId
};
};
}
else
{
}
else
{
this
.
bodyTemplate
.
status
=
'add'
;
this
.
bodyTemplate
.
status
=
'add'
;
...
@@ -306,7 +316,8 @@ export class ExcelListComponent implements OnInit {
...
@@ -306,7 +316,8 @@ export class ExcelListComponent implements OnInit {
ename
:
''
,
ename
:
''
,
tdesc
:
''
,
tdesc
:
''
,
edesc
:
''
,
edesc
:
''
,
module
:
''
module
:
''
,
companyId
:
''
};
};
}
}
...
@@ -951,4 +962,18 @@ export class ExcelListComponent implements OnInit {
...
@@ -951,4 +962,18 @@ export class ExcelListComponent implements OnInit {
closeModalpivotModal
()
{
closeModalpivotModal
()
{
this
.
modalRefpivotModal
?.
close
()
this
.
modalRefpivotModal
?.
close
()
}
}
getData
()
{
this
.
datasourceTable
.
getList
().
subscribe
({
next
:
(
response
:
DatasourceTableModel
[])
=>
{
this
.
itemsList
=
response
.
map
((
x
:
any
)
=>
new
MyDatasourceTableModel
(
x
));
console
.
log
(
'ข้อมูล (itemsList)'
,
this
.
itemsList
);
this
.
updatePagedItems
();
},
error
:
(
error
)
=>
{
console
.
error
(
'error cant get position'
,
error
);
swal
(
"ข้อผิดพลาด"
,
"ไม่สามารถดึงข้อมูลได้"
,
"error"
);
}
});
}
}
}
\ No newline at end of file
src/app/DPU/models/template.model.ts
View file @
8797a543
...
@@ -125,6 +125,7 @@ export interface TemplateModel {
...
@@ -125,6 +125,7 @@ export interface TemplateModel {
tdesc
:
string
tdesc
:
string
edesc
:
string
edesc
:
string
module
:
string
module
:
string
companyId
:
string
templateFile
:
TemplateFileModel
[]
templateFile
:
TemplateFileModel
[]
}
}
export
class
MyTemplateModel
implements
TemplateModel
{
export
class
MyTemplateModel
implements
TemplateModel
{
...
@@ -134,6 +135,7 @@ export class MyTemplateModel implements TemplateModel {
...
@@ -134,6 +135,7 @@ export class MyTemplateModel implements TemplateModel {
tdesc
:
string
tdesc
:
string
edesc
:
string
edesc
:
string
module
:
string
module
:
string
companyId
:
string
templateFile
:
TemplateFileModel
[]
templateFile
:
TemplateFileModel
[]
constructor
(
data
?:
Partial
<
TemplateModel
>
)
{
constructor
(
data
?:
Partial
<
TemplateModel
>
)
{
this
.
templateId
=
data
?.
templateId
||
''
this
.
templateId
=
data
?.
templateId
||
''
...
...
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