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
3fc8fd7a
Commit
3fc8fd7a
authored
Jun 26, 2024
by
Nakarin Luankla
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UPDATE เพิ่มกลุ่ม
parent
daa88ded
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
364 additions
and
50 deletions
+364
-50
list-course.component.html
src/app/apps/list-course/list-course.component.html
+16
-2
list-course.component.ts
src/app/apps/list-course/list-course.component.ts
+17
-2
list-doc.component.html
src/app/apps/list-doc/list-doc.component.html
+24
-4
list-doc.component.ts
src/app/apps/list-doc/list-doc.component.ts
+17
-2
list-excell.component.html
src/app/apps/list-excell/list-excell.component.html
+56
-3
list-excell.component.ts
src/app/apps/list-excell/list-excell.component.ts
+18
-1
view-list-course.component.html
...app/apps/view-list-course/view-list-course.component.html
+4
-0
view-list-doc.component.html
src/app/apps/view-list-doc/view-list-doc.component.html
+4
-0
view-list-excel.component.html
src/app/apps/view-list-excel/view-list-excel.component.html
+4
-0
course-content.model.ts
src/app/model/course-content.model.ts
+22
-0
course.model.ts
src/app/model/course.model.ts
+32
-16
document-content.model.ts
src/app/model/document-content.model.ts
+22
-0
document.model.ts
src/app/model/document.model.ts
+24
-8
excel-content.model.ts
src/app/model/excel-content.model.ts
+34
-2
excel.model.ts
src/app/model/excel.model.ts
+30
-8
group.mmodel.ts
src/app/model/group.mmodel.ts
+20
-0
group.service.ts
src/app/service/group.service.ts
+18
-0
environment.prod.ts
src/environments/environment.prod.ts
+1
-1
environment.ts
src/environments/environment.ts
+1
-1
No files found.
src/app/apps/list-course/list-course.component.html
View file @
3fc8fd7a
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
<button
type=
"button"
[
disabled
]="
data
.
status
!=
0
"
class=
"btn btn-circle btn-primary rounded-circle btn-sm mr-2"
(
click
)="
openModal
(
editTemplateModal
,
data
)"
placement=
"top"
ngbTooltip=
"แก้ไข"
>
<button
type=
"button"
[
disabled
]="
data
.
status
!=
0
"
class=
"btn btn-circle btn-primary rounded-circle btn-sm mr-2"
(
click
)="
openModal
(
editTemplateModal
,
data
)"
placement=
"top"
ngbTooltip=
"แก้ไข"
>
<i
class=
"fas fa-edit"
></i>
<i
class=
"fas fa-edit"
></i>
</button>
</button>
<button
type=
"button"
[
disabled
]="
data
.
status
!=
0
"
class=
"btn btn-circle btn-danger rounded-circle btn-sm mr-2"
(
click
)="
deleteFile
(
data
)"
placement=
"top"
ngbTooltip=
"ลบ"
>
<button
type=
"button"
class=
"btn btn-circle btn-danger rounded-circle btn-sm mr-2"
(
click
)="
deleteFile
(
data
)"
placement=
"top"
ngbTooltip=
"ลบ"
>
<i
class=
"fas fa-trash-alt"
></i>
<i
class=
"fas fa-trash-alt"
></i>
</button>
</button>
<!-- <a href="javascript: void(0);" (click)="openModal(editTemplateModal,data)" class="link mr-2"
<!-- <a href="javascript: void(0);" (click)="openModal(editTemplateModal,data)" class="link mr-2"
...
@@ -173,13 +173,19 @@
...
@@ -173,13 +173,19 @@
</div>
</div>
</div>
</div>
<div
class=
"form-group row"
>
<div
class=
"form-group row"
>
<label
for=
"name"
class=
"col-sm-4 col-form-label"
>
ไฟล์อัพโหลด
</label>
<label
for=
"name"
class=
"col-sm-4 col-form-label"
>
ไฟล์อัพโหลด
</label>
<div
class=
"
col-sm-8
"
>
<div
class=
"
{{!modelCourse.courseObj||!checkEdit ? 'col-sm-8' : 'col-sm-6'}}
"
>
<input
type=
"file"
class=
"form-control"
(
change
)="
onSelectFile
($
event
)"
>
<input
type=
"file"
class=
"form-control"
(
change
)="
onSelectFile
($
event
)"
>
<div
class=
"msg-detail"
>
ไฟล์ที่อนุญาต:*.json
</div>
<div
class=
"msg-detail"
>
ไฟล์ที่อนุญาต:*.json
</div>
</div>
</div>
<div
class=
"col-auto"
*
ngIf=
"modelCourse.courseObj&&checkEdit"
>
<button
class=
"btn btn-primary"
(
click
)="
downloadFile
(
modelCourse
.
logId
)"
><i
class=
"fas fa-download"
></i></button>
</div>
</div>
</div>
<div
class=
"form-group row"
>
<div
class=
"form-group row"
>
<label
for=
"name"
class=
"col-sm-4 col-form-label"
>
รูปภาพตัวอย่าง
</label>
<label
for=
"name"
class=
"col-sm-4 col-form-label"
>
รูปภาพตัวอย่าง
</label>
<div
class=
"col-sm-8"
>
<div
class=
"col-sm-8"
>
...
@@ -205,6 +211,14 @@
...
@@ -205,6 +211,14 @@
</div>
</div>
</div>
</div>
<div
class=
"form-group row"
>
<div
class=
"form-group row"
>
<label
for=
"position"
class=
"col-sm-4 col-form-label"
>
กลุ่ม
</label>
<div
class=
"col-sm-8"
>
<select
class=
"custom-select"
[(
ngModel
)]="
modelCourse
.
group
.
groupId
"
(
change
)="
selectGroup
()"
>
<option
*
ngFor=
"let item of listGroup"
[
ngValue
]="
item
.
groupId
"
>
{{item.thName}}
</option>
</select>
</div>
</div>
<div
class=
"form-group row"
>
<label
for=
"position"
class=
"col-sm-4 col-form-label"
>
หมายเหตุ
</label>
<label
for=
"position"
class=
"col-sm-4 col-form-label"
>
หมายเหตุ
</label>
<div
class=
"col-sm-8"
>
<div
class=
"col-sm-8"
>
<textarea
class=
"form-control"
[(
ngModel
)]="
modelCourse
.
remark
"
></textarea>
<textarea
class=
"form-control"
[(
ngModel
)]="
modelCourse
.
remark
"
></textarea>
...
...
src/app/apps/list-course/list-course.component.ts
View file @
3fc8fd7a
...
@@ -8,6 +8,8 @@ import { CourseService } from 'src/app/service/course.service';
...
@@ -8,6 +8,8 @@ import { CourseService } from 'src/app/service/course.service';
import
{
UploadService
}
from
'src/app/service/upload.service'
;
import
{
UploadService
}
from
'src/app/service/upload.service'
;
import
{
TagService
}
from
'src/app/service/tag.service'
;
import
{
TagService
}
from
'src/app/service/tag.service'
;
import
{
TagModel
}
from
'src/app/model/tag.mmodel'
;
import
{
TagModel
}
from
'src/app/model/tag.mmodel'
;
import
{
GroupModel
}
from
'src/app/model/group.mmodel'
;
import
{
GroupService
}
from
'src/app/service/group.service'
;
declare
var
require
:
any
declare
var
require
:
any
const
FileSaver
=
require
(
'file-saver'
);
const
FileSaver
=
require
(
'file-saver'
);
@
Component
({
@
Component
({
...
@@ -23,7 +25,8 @@ export class ListCourseComponent implements OnInit {
...
@@ -23,7 +25,8 @@ export class ListCourseComponent implements OnInit {
checkEdit
:
boolean
=
false
checkEdit
:
boolean
=
false
search
:
string
=
''
search
:
string
=
''
listTag
:
TagModel
[]
=
[]
listTag
:
TagModel
[]
=
[]
constructor
(
private
modalService
:
NgbModal
,
private
courseService
:
CourseService
,
private
uploadService
:
UploadService
,
private
tagService
:
TagService
)
{
listGroup
:
GroupModel
[]
=
[]
constructor
(
private
modalService
:
NgbModal
,
private
courseService
:
CourseService
,
private
uploadService
:
UploadService
,
private
tagService
:
TagService
,
private
groupService
:
GroupService
)
{
}
}
async
onUploadImage
(
event
:
any
){
async
onUploadImage
(
event
:
any
){
try
{
try
{
...
@@ -199,8 +202,20 @@ export class ListCourseComponent implements OnInit {
...
@@ -199,8 +202,20 @@ export class ListCourseComponent implements OnInit {
ngOnInit
()
{
ngOnInit
()
{
this
.
getListCourse
();
this
.
getListCourse
();
this
.
getListTag
();
this
.
getListTag
();
this
.
getListGroup
();
}
async
getListGroup
(){
try
{
const
data
=
await
this
.
groupService
.
getList
().
toPromise
();
this
.
listGroup
=
data
.
map
(
x
=>
new
GroupModel
(
x
))
}
catch
(
error
){
console
.
error
(
'Error loading data:'
,
error
);
}
}
selectGroup
(){
let
findData
=
this
.
listGroup
.
find
(
x
=>
x
.
groupId
==
this
.
modelCourse
.
group
.
groupId
)
this
.
modelCourse
.
group
=
findData
?
new
GroupModel
(
findData
):
new
GroupModel
({})
}
}
closeBtnClick
()
{
closeBtnClick
()
{
this
.
modalService
.
dismissAll
();
this
.
modalService
.
dismissAll
();
...
...
src/app/apps/list-doc/list-doc.component.html
View file @
3fc8fd7a
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
<button
type=
"button"
[
disabled
]="
data
.
status
!=
0
"
class=
"btn btn-circle btn-primary rounded-circle btn-sm mr-2"
(
click
)="
openModal
(
editTemplateModal
,
data
)"
placement=
"top"
ngbTooltip=
"แก้ไข"
>
<button
type=
"button"
[
disabled
]="
data
.
status
!=
0
"
class=
"btn btn-circle btn-primary rounded-circle btn-sm mr-2"
(
click
)="
openModal
(
editTemplateModal
,
data
)"
placement=
"top"
ngbTooltip=
"แก้ไข"
>
<i
class=
"fas fa-edit"
></i>
<i
class=
"fas fa-edit"
></i>
</button>
</button>
<button
type=
"button"
[
disabled
]="
data
.
status
!=
0
"
class=
"btn btn-circle btn-danger rounded-circle btn-sm mr-2"
(
click
)="
deleteFile
(
data
)"
placement=
"top"
ngbTooltip=
"ลบ"
>
<button
type=
"button"
class=
"btn btn-circle btn-danger rounded-circle btn-sm mr-2"
(
click
)="
deleteFile
(
data
)"
placement=
"top"
ngbTooltip=
"ลบ"
>
<i
class=
"fas fa-trash-alt"
></i>
<i
class=
"fas fa-trash-alt"
></i>
</button>
</button>
</td>
</td>
...
@@ -120,24 +120,36 @@
...
@@ -120,24 +120,36 @@
<div
class=
"form-group row"
>
<div
class=
"form-group row"
>
<label
for=
"position"
class=
"col-sm-4 col-form-label"
>
ภาษาที่รองรับ
</label>
<label
for=
"position"
class=
"col-sm-4 col-form-label"
>
ภาษาที่รองรับ
</label>
<div
class=
"col-sm-8"
>
<div
class=
"col-sm-8"
>
<input
type=
"text"
class=
"form-control"
id=
"nameeng"
[(
ngModel
)]="
modelDoc
.
langSupport
"
>
<select
class=
"custom-select"
[(
ngModel
)]="
modelDoc
.
langSupport
"
>
<option
value=
"THA"
>
ไทย
</option>
<option
value=
"ENG"
>
English
</option>
</select>
<!-- <input type="text" class="form-control" id="nameeng" [(ngModel)]="modelDoc.langSupport"> -->
</div>
</div>
</div>
</div>
<div
class=
"form-group row"
>
<div
class=
"form-group row"
>
<label
for=
"name"
class=
"col-sm-4 col-form-label"
>
ไฟล์อัพโหลด (ไทย)
</label>
<label
for=
"name"
class=
"col-sm-4 col-form-label"
>
ไฟล์อัพโหลด (ไทย)
</label>
<div
class=
"
col-sm-8
"
>
<div
class=
"
{{!modelDoc.thDocObj||!checkEdit ? 'col-sm-8' : 'col-sm-6'}}
"
>
<input
type=
"file"
class=
"form-control"
(
change
)="
onSelectFile
($
event
,'
th
')"
>
<input
type=
"file"
class=
"form-control"
(
change
)="
onSelectFile
($
event
,'
th
')"
>
<div
class=
"msg-detail"
>
ไฟล์ที่อนุญาต:*.doc
</div>
<div
class=
"msg-detail"
>
ไฟล์ที่อนุญาต:*.doc
</div>
</div>
</div>
<div
class=
"col-auto"
*
ngIf=
"modelDoc.thDocObj&&checkEdit"
>
<button
class=
"btn btn-primary"
(
click
)="
downloadFile
(
modelDoc
.
logId
,'
tha
')"
><i
class=
"fas fa-download"
></i></button>
</div>
</div>
</div>
<div
class=
"form-group row"
>
<div
class=
"form-group row"
>
<label
for=
"name"
class=
"col-sm-4 col-form-label"
>
ไฟล์อัพโหลด (อังกฤษ)
</label>
<label
for=
"name"
class=
"col-sm-4 col-form-label"
>
ไฟล์อัพโหลด (อังกฤษ)
</label>
<div
class=
"
col-sm-8
"
>
<div
class=
"
{{!modelDoc.engDocObj||!checkEdit ? 'col-sm-8' : 'col-sm-6'}}
"
>
<input
type=
"file"
class=
"form-control"
(
change
)="
onSelectFile
($
event
,'
eng
')"
>
<input
type=
"file"
class=
"form-control"
(
change
)="
onSelectFile
($
event
,'
eng
')"
>
<div
class=
"msg-detail"
>
ไฟล์ที่อนุญาต:*.doc
</div>
<div
class=
"msg-detail"
>
ไฟล์ที่อนุญาต:*.doc
</div>
</div>
</div>
<div
class=
"col-auto"
*
ngIf=
"modelDoc.engDocObj&&checkEdit"
>
<button
class=
"btn btn-primary"
(
click
)="
downloadFile
(
modelDoc
.
logId
,'
eng
')"
><i
class=
"fas fa-download"
></i></button>
</div>
</div>
</div>
<div
class=
"form-group row"
>
<div
class=
"form-group row"
>
<label
for=
"name"
class=
"col-sm-4 col-form-label"
>
รูปภาพตัวอย่าง
</label>
<label
for=
"name"
class=
"col-sm-4 col-form-label"
>
รูปภาพตัวอย่าง
</label>
...
@@ -164,6 +176,14 @@
...
@@ -164,6 +176,14 @@
</div>
</div>
</div>
</div>
<div
class=
"form-group row"
>
<div
class=
"form-group row"
>
<label
for=
"position"
class=
"col-sm-4 col-form-label"
>
กลุ่ม
</label>
<div
class=
"col-sm-8"
>
<select
class=
"custom-select"
[(
ngModel
)]="
modelDoc
.
group
.
groupId
"
(
change
)="
selectGroup
()"
>
<option
*
ngFor=
"let item of listGroup"
[
ngValue
]="
item
.
groupId
"
>
{{item.thName}}
</option>
</select>
</div>
</div>
<div
class=
"form-group row"
>
<label
for=
"position"
class=
"col-sm-4 col-form-label"
>
หมายเหตุ
</label>
<label
for=
"position"
class=
"col-sm-4 col-form-label"
>
หมายเหตุ
</label>
<div
class=
"col-sm-8"
>
<div
class=
"col-sm-8"
>
<textarea
class=
"form-control"
[(
ngModel
)]="
modelDoc
.
remark
"
></textarea>
<textarea
class=
"form-control"
[(
ngModel
)]="
modelDoc
.
remark
"
></textarea>
...
...
src/app/apps/list-doc/list-doc.component.ts
View file @
3fc8fd7a
...
@@ -7,6 +7,8 @@ import { DocumentModel } from 'src/app/model/document.model';
...
@@ -7,6 +7,8 @@ import { DocumentModel } from 'src/app/model/document.model';
import
{
UploadService
}
from
'src/app/service/upload.service'
;
import
{
UploadService
}
from
'src/app/service/upload.service'
;
import
{
TagService
}
from
'src/app/service/tag.service'
;
import
{
TagService
}
from
'src/app/service/tag.service'
;
import
{
TagModel
}
from
'src/app/model/tag.mmodel'
;
import
{
TagModel
}
from
'src/app/model/tag.mmodel'
;
import
{
GroupModel
}
from
'src/app/model/group.mmodel'
;
import
{
GroupService
}
from
'src/app/service/group.service'
;
declare
var
require
:
any
declare
var
require
:
any
const
FileSaver
=
require
(
'file-saver'
);
const
FileSaver
=
require
(
'file-saver'
);
@
Component
({
@
Component
({
...
@@ -22,7 +24,8 @@ export class ListDocComponent implements OnInit {
...
@@ -22,7 +24,8 @@ export class ListDocComponent implements OnInit {
checkEdit
:
boolean
=
false
checkEdit
:
boolean
=
false
search
:
string
=
''
search
:
string
=
''
listTag
:
TagModel
[]
=
[]
listTag
:
TagModel
[]
=
[]
constructor
(
private
modalService
:
NgbModal
,
private
documentService
:
DocumentService
,
private
uploadService
:
UploadService
,
private
tagService
:
TagService
)
{
listGroup
:
GroupModel
[]
=
[]
constructor
(
private
modalService
:
NgbModal
,
private
documentService
:
DocumentService
,
private
uploadService
:
UploadService
,
private
tagService
:
TagService
,
private
groupService
:
GroupService
)
{
}
}
async
onUploadImage
(
event
:
any
){
async
onUploadImage
(
event
:
any
){
try
{
try
{
...
@@ -209,8 +212,20 @@ export class ListDocComponent implements OnInit {
...
@@ -209,8 +212,20 @@ export class ListDocComponent implements OnInit {
ngOnInit
()
{
ngOnInit
()
{
this
.
getListDoc
();
this
.
getListDoc
();
this
.
getListTag
();
this
.
getListTag
();
this
.
getListGroup
();
}
async
getListGroup
(){
try
{
const
data
=
await
this
.
groupService
.
getList
().
toPromise
();
this
.
listGroup
=
data
.
map
(
x
=>
new
GroupModel
(
x
))
}
catch
(
error
){
console
.
error
(
'Error loading data:'
,
error
);
}
}
selectGroup
(){
let
findData
=
this
.
listGroup
.
find
(
x
=>
x
.
groupId
==
this
.
modelDoc
.
group
.
groupId
)
this
.
modelDoc
.
group
=
findData
?
new
GroupModel
(
findData
):
new
GroupModel
({})
}
}
async
getListTag
(){
async
getListTag
(){
try
{
try
{
const
data
=
await
this
.
tagService
.
getList
().
toPromise
();
const
data
=
await
this
.
tagService
.
getList
().
toPromise
();
...
...
src/app/apps/list-excell/list-excell.component.html
View file @
3fc8fd7a
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
<button
type=
"button"
[
disabled
]="
data
.
status
!=
0
"
class=
"btn btn-circle btn-primary rounded-circle btn-sm mr-2"
(
click
)="
openModal
(
editTemplateModal
,
data
)"
placement=
"top"
ngbTooltip=
"แก้ไข"
>
<button
type=
"button"
[
disabled
]="
data
.
status
!=
0
"
class=
"btn btn-circle btn-primary rounded-circle btn-sm mr-2"
(
click
)="
openModal
(
editTemplateModal
,
data
)"
placement=
"top"
ngbTooltip=
"แก้ไข"
>
<i
class=
"fas fa-edit"
></i>
<i
class=
"fas fa-edit"
></i>
</button>
</button>
<button
type=
"button"
[
disabled
]="
data
.
status
!=
0
"
class=
"btn btn-circle btn-danger rounded-circle btn-sm mr-2"
(
click
)="
deleteFile
(
data
)"
placement=
"top"
ngbTooltip=
"ลบ"
>
<button
type=
"button"
class=
"btn btn-circle btn-danger rounded-circle btn-sm mr-2"
(
click
)="
deleteFile
(
data
)"
placement=
"top"
ngbTooltip=
"ลบ"
>
<i
class=
"fas fa-trash-alt"
></i>
<i
class=
"fas fa-trash-alt"
></i>
</button>
</button>
</td>
</td>
...
@@ -119,17 +119,25 @@
...
@@ -119,17 +119,25 @@
<div
class=
"form-group row"
>
<div
class=
"form-group row"
>
<label
for=
"position"
class=
"col-sm-4 col-form-label"
>
ดาต้าเบสที่รองรับ
</label>
<label
for=
"position"
class=
"col-sm-4 col-form-label"
>
ดาต้าเบสที่รองรับ
</label>
<div
class=
"col-sm-8"
>
<div
class=
"col-sm-8"
>
<input
type=
"text"
class=
"form-control"
id=
"nameeng"
[(
ngModel
)]="
modelExcel
.
dbSupport
"
>
<select
class=
"custom-select"
[(
ngModel
)]="
modelExcel
.
dbSupport
"
>
<option
value=
"SQLServer"
>
SQLServer
</option>
<option
value=
"PostgreSQL"
>
PostgreSQL
</option>
<option
value=
"Oracle"
>
Oracle
</option>
</select>
<!-- <input type="text" class="form-control" id="nameeng" [(ngModel)]="modelExcel.dbSupport"> -->
</div>
</div>
</div>
</div>
<div
class=
"form-group row"
>
<div
class=
"form-group row"
>
<label
for=
"name"
class=
"col-sm-4 col-form-label"
>
ไฟล์อัพโหลด
</label>
<label
for=
"name"
class=
"col-sm-4 col-form-label"
>
ไฟล์อัพโหลด
</label>
<div
class=
"
col-sm-8
"
>
<div
class=
"
{{!modelExcel.excelObj||!checkEdit ? 'col-sm-8' : 'col-sm-6'}}
"
>
<input
type=
"file"
class=
"form-control"
(
change
)="
onSelectFile
($
event
)"
>
<input
type=
"file"
class=
"form-control"
(
change
)="
onSelectFile
($
event
)"
>
<div
class=
"msg-detail"
>
ไฟล์ที่อนุญาต:*.xlsx
</div>
<div
class=
"msg-detail"
>
ไฟล์ที่อนุญาต:*.xlsx
</div>
</div>
</div>
<div
class=
"col-auto"
*
ngIf=
"modelExcel.excelObj&&checkEdit"
>
<button
class=
"btn btn-primary"
(
click
)="
downloadFile
(
modelExcel
.
logId
)"
><i
class=
"fas fa-download"
></i></button>
</div>
</div>
</div>
<div
class=
"form-group row"
>
<div
class=
"form-group row"
>
...
@@ -158,6 +166,51 @@
...
@@ -158,6 +166,51 @@
</div>
</div>
<div
class=
"form-group row"
>
<div
class=
"form-group row"
>
<label
for=
"position"
class=
"col-sm-4 col-form-label"
>
กลุ่ม
</label>
<div
class=
"col-sm-8"
>
<select
class=
"custom-select"
[(
ngModel
)]="
modelExcel
.
group
.
groupId
"
(
change
)="
selectGroup
()"
>
<option
*
ngFor=
"let item of listGroup"
[
ngValue
]="
item
.
groupId
"
>
{{item.thName}}
</option>
</select>
</div>
</div>
<div
class=
"form-group row"
>
<label
for=
"position"
class=
"col-sm-4 col-form-label"
>
แสดงรูปแบบ Pivot
</label>
<div
class=
"col-sm-8 d-flex"
>
<div
class=
"form-check form-check-inline"
>
<div
class=
"custom-control custom-radio"
>
<input
type=
"radio"
class=
"custom-control-input"
id=
"pivot0"
name=
"radio-pivot"
[
value
]="
0
"
[(
ngModel
)]="
modelExcel
.
isPivot
"
>
<label
class=
"custom-control-label"
for=
"pivot0"
>
ใช่
</label>
</div>
</div>
<div
class=
"form-check form-check-inline"
>
<div
class=
"custom-control custom-radio"
>
<input
type=
"radio"
class=
"custom-control-input"
id=
"pivot1"
name=
"radio-pivot"
[
value
]="
1
"
[(
ngModel
)]="
modelExcel
.
isPivot
"
>
<label
class=
"custom-control-label"
for=
"pivot1"
>
ไม่ใช่
</label>
</div>
</div>
</div>
</div>
<div
class=
"form-group row"
>
<label
for=
"position"
class=
"col-sm-4 col-form-label"
>
แสดงรูปแบบ DataGrid
</label>
<div
class=
"col-sm-8 d-flex"
>
<div
class=
"form-check form-check-inline"
>
<div
class=
"custom-control custom-radio"
>
<input
type=
"radio"
class=
"custom-control-input"
id=
"datagrid"
name=
"datagridCheck"
[
value
]="
0
"
[(
ngModel
)]="
modelExcel
.
isDataGrid
"
>
<label
class=
"custom-control-label"
for=
"datagrid"
>
ใช่
</label>
</div>
</div>
<div
class=
"form-check form-check-inline"
>
<div
class=
"custom-control custom-radio"
>
<input
type=
"radio"
class=
"custom-control-input"
id=
"datagrid1"
name=
"datagridCheck"
[
value
]="
1
"
[(
ngModel
)]="
modelExcel
.
isDataGrid
"
>
<label
class=
"custom-control-label"
for=
"datagrid1"
>
ไม่ใช่
</label>
</div>
</div>
</div>
</div>
<div
class=
"form-group row"
>
<label
for=
"position"
class=
"col-sm-4 col-form-label"
>
หมายเหตุ
</label>
<label
for=
"position"
class=
"col-sm-4 col-form-label"
>
หมายเหตุ
</label>
<div
class=
"col-sm-8"
>
<div
class=
"col-sm-8"
>
<textarea
class=
"form-control"
[(
ngModel
)]="
modelExcel
.
remark
"
></textarea>
<textarea
class=
"form-control"
[(
ngModel
)]="
modelExcel
.
remark
"
></textarea>
...
...
src/app/apps/list-excell/list-excell.component.ts
View file @
3fc8fd7a
...
@@ -7,6 +7,8 @@ import { AlertModalComponent } from '../alert-modal/alert-modal.component';
...
@@ -7,6 +7,8 @@ import { AlertModalComponent } from '../alert-modal/alert-modal.component';
import
{
UploadService
}
from
'src/app/service/upload.service'
;
import
{
UploadService
}
from
'src/app/service/upload.service'
;
import
{
TagService
}
from
'src/app/service/tag.service'
;
import
{
TagService
}
from
'src/app/service/tag.service'
;
import
{
TagModel
}
from
'src/app/model/tag.mmodel'
;
import
{
TagModel
}
from
'src/app/model/tag.mmodel'
;
import
{
GroupService
}
from
'src/app/service/group.service'
;
import
{
GroupModel
}
from
'src/app/model/group.mmodel'
;
declare
var
require
:
any
declare
var
require
:
any
const
FileSaver
=
require
(
'file-saver'
);
const
FileSaver
=
require
(
'file-saver'
);
...
@@ -24,7 +26,8 @@ export class ListExcelComponent implements OnInit {
...
@@ -24,7 +26,8 @@ export class ListExcelComponent implements OnInit {
search
:
string
=
''
search
:
string
=
''
listTag
:
TagModel
[]
=
[]
listTag
:
TagModel
[]
=
[]
constructor
(
private
modalService
:
NgbModal
,
private
excelService
:
ExcelService
,
private
uploadService
:
UploadService
,
private
tagService
:
TagService
)
{
listGroup
:
GroupModel
[]
=
[]
constructor
(
private
modalService
:
NgbModal
,
private
excelService
:
ExcelService
,
private
uploadService
:
UploadService
,
private
tagService
:
TagService
,
private
groupService
:
GroupService
)
{
}
}
async
onUploadImage
(
event
:
any
){
async
onUploadImage
(
event
:
any
){
try
{
try
{
...
@@ -54,6 +57,18 @@ export class ListExcelComponent implements OnInit {
...
@@ -54,6 +57,18 @@ export class ListExcelComponent implements OnInit {
console
.
error
(
'Error loading data:'
,
error
);
console
.
error
(
'Error loading data:'
,
error
);
}
}
}
}
async
getListGroup
(){
try
{
const
data
=
await
this
.
groupService
.
getList
().
toPromise
();
this
.
listGroup
=
data
.
map
(
x
=>
new
GroupModel
(
x
))
}
catch
(
error
){
console
.
error
(
'Error loading data:'
,
error
);
}
}
selectGroup
(){
let
findData
=
this
.
listGroup
.
find
(
x
=>
x
.
groupId
==
this
.
modelExcel
.
group
.
groupId
)
this
.
modelExcel
.
group
=
findData
?
new
GroupModel
(
findData
):
new
GroupModel
({})
}
onSelectFile
(
event
:
any
)
{
onSelectFile
(
event
:
any
)
{
if
(
event
.
target
.
files
&&
event
.
target
.
files
[
0
])
{
if
(
event
.
target
.
files
&&
event
.
target
.
files
[
0
])
{
const
reader
=
new
FileReader
();
const
reader
=
new
FileReader
();
...
@@ -168,6 +183,7 @@ export class ListExcelComponent implements OnInit {
...
@@ -168,6 +183,7 @@ export class ListExcelComponent implements OnInit {
try
{
try
{
const
data
=
await
this
.
excelService
.
getExcelById
(
id
).
toPromise
();
const
data
=
await
this
.
excelService
.
getExcelById
(
id
).
toPromise
();
this
.
modelExcel
=
new
ExcelModel
(
data
)
this
.
modelExcel
=
new
ExcelModel
(
data
)
console
.
log
(
"🚀 ~ ListExcelComponent ~ getExcelById ~ this.modelExcel:"
,
this
.
modelExcel
)
if
(
data
){
if
(
data
){
this
.
modalService
.
open
(
targetModal
,
{
this
.
modalService
.
open
(
targetModal
,
{
centered
:
true
,
centered
:
true
,
...
@@ -221,6 +237,7 @@ export class ListExcelComponent implements OnInit {
...
@@ -221,6 +237,7 @@ export class ListExcelComponent implements OnInit {
ngOnInit
()
{
ngOnInit
()
{
this
.
getListExcel
();
this
.
getListExcel
();
this
.
getListTag
();
this
.
getListTag
();
this
.
getListGroup
();
}
}
...
...
src/app/apps/view-list-course/view-list-course.component.html
View file @
3fc8fd7a
...
@@ -16,6 +16,8 @@
...
@@ -16,6 +16,8 @@
<th
scope=
"col"
>
ประเภทหลักสูตร
</th>
<th
scope=
"col"
>
ประเภทหลักสูตร
</th>
<th
scope=
"col"
>
ลิงค์
</th>
<th
scope=
"col"
>
ลิงค์
</th>
<th
scope=
"col"
>
สถานะ
</th>
<th
scope=
"col"
>
สถานะ
</th>
<th
scope=
"col"
class=
"text-center"
>
วันที่อัพโหลด
</th>
<th
scope=
"col"
class=
"text-center"
>
วันล่าสุดดาวน์โหลด
</th>
<th
scope=
"col"
class=
"text-center"
>
จำนวนดาวน์โหลด
</th>
<th
scope=
"col"
class=
"text-center"
>
จำนวนดาวน์โหลด
</th>
<th
scope=
"col"
*
ngIf=
"checkType == '1'"
></th>
<th
scope=
"col"
*
ngIf=
"checkType == '1'"
></th>
</tr>
</tr>
...
@@ -32,6 +34,8 @@
...
@@ -32,6 +34,8 @@
<td>
{{data.courseType}}
</td>
<td>
{{data.courseType}}
</td>
<td
class=
"text-center"
><i
class=
"fas fa-link pointer"
(
click
)="
openLink
(
data
.
link1
)"
></i></td>
<td
class=
"text-center"
><i
class=
"fas fa-link pointer"
(
click
)="
openLink
(
data
.
link1
)"
></i></td>
<td
class=
"text-center"
>
<i
class=
"fas fa-download pointer"
(
click
)="
downloadFile
(
data
.
courseId
)"
></i></td>
<td
class=
"text-center"
>
<i
class=
"fas fa-download pointer"
(
click
)="
downloadFile
(
data
.
courseId
)"
></i></td>
<td
class=
"text-center"
>
{{data.uploadDate}} {{data.uploadTime}}
</td>
<td
class=
"text-center"
>
{{data.downloadDate}} {{data.downloadTime}}
</td>
<td
class=
"text-center"
>
{{data.dwTime}} ครั้ง
</td>
<td
class=
"text-center"
>
{{data.dwTime}} ครั้ง
</td>
<td
*
ngIf=
"checkType == '1'"
>
<td
*
ngIf=
"checkType == '1'"
>
<button
type=
"button"
class=
"btn btn-circle btn-danger rounded-circle btn-sm mr-2"
(
click
)="
deleteFile
(
data
)"
placement=
"top"
ngbTooltip=
"ลบ"
><i
class=
"fas fa-trash-alt"
></i></button>
<button
type=
"button"
class=
"btn btn-circle btn-danger rounded-circle btn-sm mr-2"
(
click
)="
deleteFile
(
data
)"
placement=
"top"
ngbTooltip=
"ลบ"
><i
class=
"fas fa-trash-alt"
></i></button>
...
...
src/app/apps/view-list-doc/view-list-doc.component.html
View file @
3fc8fd7a
...
@@ -17,6 +17,8 @@
...
@@ -17,6 +17,8 @@
<th
scope=
"col"
class=
"text-center"
>
ลิงค์
</th>
<th
scope=
"col"
class=
"text-center"
>
ลิงค์
</th>
<th
scope=
"col"
class=
"text-center"
>
ไฟล์ (ไทย)
</th>
<th
scope=
"col"
class=
"text-center"
>
ไฟล์ (ไทย)
</th>
<th
scope=
"col"
class=
"text-center"
>
ไฟล์ (อังกฤษ)
</th>
<th
scope=
"col"
class=
"text-center"
>
ไฟล์ (อังกฤษ)
</th>
<th
scope=
"col"
class=
"text-center"
>
วันที่อัพโหลด
</th>
<th
scope=
"col"
class=
"text-center"
>
วันล่าสุดดาวน์โหลด
</th>
<th
scope=
"col"
class=
"text-center"
>
จำนวนดาวน์โหลด
</th>
<th
scope=
"col"
class=
"text-center"
>
จำนวนดาวน์โหลด
</th>
<th
scope=
"col"
*
ngIf=
"checkType == '1'"
></th>
<th
scope=
"col"
*
ngIf=
"checkType == '1'"
></th>
</tr>
</tr>
...
@@ -34,6 +36,8 @@
...
@@ -34,6 +36,8 @@
<td
class=
"text-center"
><i
class=
"fas fa-link pointer"
(
click
)="
openLink
(
data
.
link1
)"
></i></td>
<td
class=
"text-center"
><i
class=
"fas fa-link pointer"
(
click
)="
openLink
(
data
.
link1
)"
></i></td>
<td
class=
"text-center"
>
<i
class=
"fas fa-download pointer"
(
click
)="
downloadFile
(
data
.
docId
,'
tha
')"
></i></td>
<td
class=
"text-center"
>
<i
class=
"fas fa-download pointer"
(
click
)="
downloadFile
(
data
.
docId
,'
tha
')"
></i></td>
<td
class=
"text-center"
>
<i
class=
"fas fa-download pointer"
(
click
)="
downloadFile
(
data
.
docId
,'
eng
')"
></i></td>
<td
class=
"text-center"
>
<i
class=
"fas fa-download pointer"
(
click
)="
downloadFile
(
data
.
docId
,'
eng
')"
></i></td>
<td
class=
"text-center"
>
{{data.uploadDate}} {{data.uploadTime}}
</td>
<td
class=
"text-center"
>
{{data.downloadDate}} {{data.downloadTime}}
</td>
<td
class=
"text-center"
>
{{data.dwTime}} ครั้ง
</td>
<td
class=
"text-center"
>
{{data.dwTime}} ครั้ง
</td>
<td
*
ngIf=
"checkType == '1'"
>
<td
*
ngIf=
"checkType == '1'"
>
<button
type=
"button"
class=
"btn btn-circle btn-danger rounded-circle btn-sm mr-2"
(
click
)="
deleteFile
(
data
)"
placement=
"top"
ngbTooltip=
"ลบ"
><i
class=
"fas fa-trash-alt"
></i></button>
<button
type=
"button"
class=
"btn btn-circle btn-danger rounded-circle btn-sm mr-2"
(
click
)="
deleteFile
(
data
)"
placement=
"top"
ngbTooltip=
"ลบ"
><i
class=
"fas fa-trash-alt"
></i></button>
...
...
src/app/apps/view-list-excel/view-list-excel.component.html
View file @
3fc8fd7a
...
@@ -16,6 +16,8 @@
...
@@ -16,6 +16,8 @@
<th
scope=
"col"
>
รายละเอียด
</th>
<th
scope=
"col"
>
รายละเอียด
</th>
<th
scope=
"col"
class=
"text-center"
>
ลิงค์
</th>
<th
scope=
"col"
class=
"text-center"
>
ลิงค์
</th>
<th
scope=
"col"
class=
"text-center"
>
ไฟล์
</th>
<th
scope=
"col"
class=
"text-center"
>
ไฟล์
</th>
<th
scope=
"col"
class=
"text-center"
>
วันที่อัพโหลด
</th>
<th
scope=
"col"
class=
"text-center"
>
วันล่าสุดดาวน์โหลด
</th>
<th
scope=
"col"
class=
"text-center"
>
จำนวนดาวน์โหลด
</th>
<th
scope=
"col"
class=
"text-center"
>
จำนวนดาวน์โหลด
</th>
<th
scope=
"col"
*
ngIf=
"checkType == '1'"
></th>
<th
scope=
"col"
*
ngIf=
"checkType == '1'"
></th>
</tr>
</tr>
...
@@ -32,6 +34,8 @@
...
@@ -32,6 +34,8 @@
<td>
{{ data.thDesc }}
</td>
<td>
{{ data.thDesc }}
</td>
<td
class=
"text-center"
><i
class=
"fas fa-link pointer"
(
click
)="
openLink
(
data
.
link1
)"
></i></td>
<td
class=
"text-center"
><i
class=
"fas fa-link pointer"
(
click
)="
openLink
(
data
.
link1
)"
></i></td>
<td
class=
"text-center"
>
<i
class=
"fas fa-download pointer"
(
click
)="
downloadFile
(
data
.
excelId
)"
></i></td>
<td
class=
"text-center"
>
<i
class=
"fas fa-download pointer"
(
click
)="
downloadFile
(
data
.
excelId
)"
></i></td>
<td
class=
"text-center"
>
{{data.uploadDate}} {{data.uploadTime}}
</td>
<td
class=
"text-center"
>
{{data.downloadDate}} {{data.downloadTime}}
</td>
<td
class=
"text-center"
>
{{data.dwTime}} ครั้ง
</td>
<td
class=
"text-center"
>
{{data.dwTime}} ครั้ง
</td>
<td
*
ngIf=
"checkType == '1'"
>
<td
*
ngIf=
"checkType == '1'"
>
<button
type=
"button"
class=
"btn btn-circle btn-danger rounded-circle btn-sm mr-2"
(
click
)="
deleteFile
(
data
)"
placement=
"top"
ngbTooltip=
"ลบ"
><i
class=
"fas fa-trash-alt"
></i></button>
<button
type=
"button"
class=
"btn btn-circle btn-danger rounded-circle btn-sm mr-2"
(
click
)="
deleteFile
(
data
)"
placement=
"top"
ngbTooltip=
"ลบ"
><i
class=
"fas fa-trash-alt"
></i></button>
...
...
src/app/model/course-content.model.ts
View file @
3fc8fd7a
import
{
environment
}
from
"src/environments/environment"
import
{
environment
}
from
"src/environments/environment"
import
{
TagModel
}
from
"./tag.mmodel"
import
{
TagModel
}
from
"./tag.mmodel"
import
{
GroupModel
}
from
"./group.mmodel"
export
interface
CourseContentModel
{
export
interface
CourseContentModel
{
courseId
:
string
courseId
:
string
...
@@ -18,11 +19,18 @@ export interface CourseContentModel {
...
@@ -18,11 +19,18 @@ export interface CourseContentModel {
courseTrainerDetail
:
string
courseTrainerDetail
:
string
courseObj
:
string
courseObj
:
string
uploadBy
:
string
uploadBy
:
string
uploadDate
:
string
uploadTime
:
string
dwTime
:
number
dwTime
:
number
downloadDate
:
string
downloadTime
:
string
remark
:
string
remark
:
string
referId
:
string
referId
:
string
approveBy
:
string
approveBy
:
string
approveDate
:
string
approveTime
:
string
tags
:
TagModel
[]
tags
:
TagModel
[]
group
:
GroupModel
}
}
export
class
CourseContentModel
implements
CourseContentModel
{
export
class
CourseContentModel
implements
CourseContentModel
{
...
@@ -42,11 +50,18 @@ export class CourseContentModel implements CourseContentModel {
...
@@ -42,11 +50,18 @@ export class CourseContentModel implements CourseContentModel {
courseTrainerDetail
:
string
courseTrainerDetail
:
string
courseObj
:
string
courseObj
:
string
uploadBy
:
string
uploadBy
:
string
uploadDate
:
string
uploadTime
:
string
dwTime
:
number
dwTime
:
number
downloadDate
:
string
downloadTime
:
string
remark
:
string
remark
:
string
referId
:
string
referId
:
string
approveBy
:
string
approveBy
:
string
approveDate
:
string
approveTime
:
string
tags
:
TagModel
[]
tags
:
TagModel
[]
group
:
GroupModel
constructor
(
data
:
Partial
<
any
>
)
{
constructor
(
data
:
Partial
<
any
>
)
{
this
.
courseId
=
data
.
courseId
?
data
.
courseId
:
''
this
.
courseId
=
data
.
courseId
?
data
.
courseId
:
''
this
.
objective
=
data
.
objective
?
data
.
objective
:
''
this
.
objective
=
data
.
objective
?
data
.
objective
:
''
...
@@ -69,6 +84,13 @@ export class CourseContentModel implements CourseContentModel {
...
@@ -69,6 +84,13 @@ export class CourseContentModel implements CourseContentModel {
this
.
courseTrainerDetail
=
data
.
courseTrainerDetail
?
data
.
courseTrainerDetail
:
''
this
.
courseTrainerDetail
=
data
.
courseTrainerDetail
?
data
.
courseTrainerDetail
:
''
this
.
referId
=
data
.
referId
?
data
.
referId
:
''
this
.
referId
=
data
.
referId
?
data
.
referId
:
''
this
.
tags
=
data
.
tags
?
data
.
tags
:[]
this
.
tags
=
data
.
tags
?
data
.
tags
:[]
this
.
uploadDate
=
data
.
uploadDate
?
data
.
uploadDate
:
''
this
.
uploadTime
=
data
.
uploadTime
?
data
.
uploadTime
:
''
this
.
downloadDate
=
data
.
downloadDate
?
data
.
downloadDate
:
''
this
.
downloadTime
=
data
.
downloadTime
?
data
.
downloadTime
:
''
this
.
approveDate
=
data
.
approveDate
?
data
.
approveDate
:
''
this
.
approveTime
=
data
.
approveTime
?
data
.
approveTime
:
''
this
.
group
=
data
.
group
?
new
GroupModel
(
data
.
group
):
new
GroupModel
({})
}
}
getImage
(){
getImage
(){
if
(
this
.
thumbnail
){
if
(
this
.
thumbnail
){
...
...
src/app/model/course.model.ts
View file @
3fc8fd7a
import
{
environment
}
from
"src/environments/environment"
import
{
environment
}
from
"src/environments/environment"
import
{
TagModel
}
from
"./tag.mmodel"
import
{
TagModel
}
from
"./tag.mmodel"
import
{
GroupModel
}
from
"./group.mmodel"
export
interface
CourseModel
{
export
interface
CourseModel
{
logId
:
string
logId
:
string
objective
:
string
thumbnail
:
string
link1
:
string
courseObj
:
string
uploadBy
:
string
remark
:
string
status
:
number
approveBy
:
string
thName
:
string
thName
:
string
engName
:
string
engName
:
string
thDesc
:
string
thDesc
:
string
engDesc
:
string
engDesc
:
string
objective
:
string
courseOutline
:
string
courseOutline
:
string
thumbnail
:
string
link1
:
string
courseType
:
string
courseType
:
string
courseLevel
:
string
courseLevel
:
string
courseTime
:
string
courseTime
:
string
courseTrainer
:
string
courseTrainer
:
string
courseTrainerDetail
:
string
courseTrainerDetail
:
string
tags
:
TagModel
[]
}
export
class
CourseModel
implements
CourseModel
{
logId
:
string
objective
:
string
thumbnail
:
string
link1
:
string
courseObj
:
string
courseObj
:
string
uploadBy
:
string
uploadBy
:
string
uploadDate
:
string
uploadTime
:
string
remark
:
string
remark
:
string
status
:
number
status
:
number
approveBy
:
string
approveBy
:
string
approveDate
:
string
approveTime
:
string
tags
:
TagModel
[]
group
:
GroupModel
}
export
class
CourseModel
implements
CourseModel
{
logId
:
string
thName
:
string
thName
:
string
engName
:
string
engName
:
string
thDesc
:
string
thDesc
:
string
engDesc
:
string
engDesc
:
string
objective
:
string
courseOutline
:
string
courseOutline
:
string
thumbnail
:
string
link1
:
string
courseType
:
string
courseType
:
string
courseLevel
:
string
courseLevel
:
string
courseTime
:
string
courseTime
:
string
courseTrainer
:
string
courseTrainer
:
string
courseTrainerDetail
:
string
courseTrainerDetail
:
string
courseObj
:
string
uploadBy
:
string
uploadDate
:
string
uploadTime
:
string
remark
:
string
status
:
number
approveBy
:
string
approveDate
:
string
approveTime
:
string
tags
:
TagModel
[]
tags
:
TagModel
[]
group
:
GroupModel
constructor
(
data
:
Partial
<
any
>
)
{
constructor
(
data
:
Partial
<
any
>
)
{
this
.
logId
=
data
.
logId
?
data
.
logId
:
''
this
.
logId
=
data
.
logId
?
data
.
logId
:
''
this
.
objective
=
data
.
objective
?
data
.
objective
:
''
this
.
objective
=
data
.
objective
?
data
.
objective
:
''
...
@@ -66,6 +77,11 @@ export class CourseModel implements CourseModel {
...
@@ -66,6 +77,11 @@ export class CourseModel implements CourseModel {
this
.
courseTrainer
=
data
.
courseTrainer
?
data
.
courseTrainer
:
''
this
.
courseTrainer
=
data
.
courseTrainer
?
data
.
courseTrainer
:
''
this
.
courseTrainerDetail
=
data
.
courseTrainerDetail
?
data
.
courseTrainerDetail
:
''
this
.
courseTrainerDetail
=
data
.
courseTrainerDetail
?
data
.
courseTrainerDetail
:
''
this
.
tags
=
data
.
tags
?
data
.
tags
:[]
this
.
tags
=
data
.
tags
?
data
.
tags
:[]
this
.
uploadDate
=
data
.
uploadDate
?
data
.
uploadDate
:
''
this
.
uploadTime
=
data
.
uploadTime
?
data
.
uploadTime
:
''
this
.
approveDate
=
data
.
approveDate
?
data
.
approveDate
:
''
this
.
approveTime
=
data
.
approveTime
?
data
.
approveTime
:
''
this
.
group
=
data
.
group
?
new
GroupModel
(
data
.
group
):
new
GroupModel
({})
}
}
getImage
(){
getImage
(){
if
(
this
.
thumbnail
){
if
(
this
.
thumbnail
){
...
...
src/app/model/document-content.model.ts
View file @
3fc8fd7a
import
{
environment
}
from
"src/environments/environment"
import
{
environment
}
from
"src/environments/environment"
import
{
TagModel
}
from
"./tag.mmodel"
import
{
TagModel
}
from
"./tag.mmodel"
import
{
GroupModel
}
from
"./group.mmodel"
export
interface
DocumentContentModel
{
export
interface
DocumentContentModel
{
docId
:
string
docId
:
string
...
@@ -13,11 +14,18 @@ export interface DocumentContentModel {
...
@@ -13,11 +14,18 @@ export interface DocumentContentModel {
thDocObj
:
string
thDocObj
:
string
engDocObj
:
string
engDocObj
:
string
uploadBy
:
string
uploadBy
:
string
uploadDate
:
string
uploadTime
:
string
dwTime
:
number
dwTime
:
number
downloadDate
:
string
downloadTime
:
string
remark
:
string
remark
:
string
referId
:
string
referId
:
string
approveBy
:
string
approveBy
:
string
approveDate
:
string
approveTime
:
string
tags
:
TagModel
[]
tags
:
TagModel
[]
group
:
GroupModel
}
}
export
class
DocumentContentModel
implements
DocumentContentModel
{
export
class
DocumentContentModel
implements
DocumentContentModel
{
...
@@ -32,11 +40,18 @@ export class DocumentContentModel implements DocumentContentModel {
...
@@ -32,11 +40,18 @@ export class DocumentContentModel implements DocumentContentModel {
thDocObj
:
string
thDocObj
:
string
engDocObj
:
string
engDocObj
:
string
uploadBy
:
string
uploadBy
:
string
uploadDate
:
string
uploadTime
:
string
dwTime
:
number
dwTime
:
number
downloadDate
:
string
downloadTime
:
string
remark
:
string
remark
:
string
referId
:
string
referId
:
string
approveBy
:
string
approveBy
:
string
approveDate
:
string
approveTime
:
string
tags
:
TagModel
[]
tags
:
TagModel
[]
group
:
GroupModel
constructor
(
data
:
Partial
<
any
>
)
{
constructor
(
data
:
Partial
<
any
>
)
{
this
.
docId
=
data
.
docId
?
data
.
docId
:
''
this
.
docId
=
data
.
docId
?
data
.
docId
:
''
this
.
thumbnail
=
data
.
thumbnail
?
data
.
thumbnail
:
''
this
.
thumbnail
=
data
.
thumbnail
?
data
.
thumbnail
:
''
...
@@ -54,6 +69,13 @@ export class DocumentContentModel implements DocumentContentModel {
...
@@ -54,6 +69,13 @@ export class DocumentContentModel implements DocumentContentModel {
this
.
engDesc
=
data
.
engDesc
?
data
.
engDesc
:
''
this
.
engDesc
=
data
.
engDesc
?
data
.
engDesc
:
''
this
.
referId
=
data
.
referId
?
data
.
referId
:
''
this
.
referId
=
data
.
referId
?
data
.
referId
:
''
this
.
tags
=
data
.
tags
?
data
.
tags
:[]
this
.
tags
=
data
.
tags
?
data
.
tags
:[]
this
.
uploadDate
=
data
.
uploadDate
?
data
.
uploadDate
:
''
this
.
uploadTime
=
data
.
uploadTime
?
data
.
uploadTime
:
''
this
.
downloadDate
=
data
.
downloadDate
?
data
.
downloadDate
:
''
this
.
downloadTime
=
data
.
downloadTime
?
data
.
downloadTime
:
''
this
.
approveDate
=
data
.
approveDate
?
data
.
approveDate
:
''
this
.
approveTime
=
data
.
approveTime
?
data
.
approveTime
:
''
this
.
group
=
data
.
group
?
new
GroupModel
(
data
.
group
):
new
GroupModel
({})
}
}
getImage
(){
getImage
(){
...
...
src/app/model/document.model.ts
View file @
3fc8fd7a
import
{
environment
}
from
"src/environments/environment"
import
{
environment
}
from
"src/environments/environment"
import
{
TagModel
}
from
"./tag.mmodel"
import
{
TagModel
}
from
"./tag.mmodel"
import
{
GroupModel
}
from
"./group.mmodel"
export
interface
DocumentModel
{
export
interface
DocumentModel
{
logId
:
string
logId
:
string
thName
:
string
engName
:
string
thDesc
:
string
engDesc
:
string
thumbnail
:
string
thumbnail
:
string
link1
:
string
link1
:
string
langSupport
:
string
langSupport
:
string
thDocObj
:
string
thDocObj
:
string
engDocObj
:
string
engDocObj
:
string
uploadBy
:
string
uploadBy
:
string
uploadDate
:
string
uploadTime
:
string
remark
:
string
remark
:
string
status
:
number
status
:
number
approveBy
:
string
approveBy
:
string
thName
:
string
approveDate
:
string
engName
:
string
approveTime
:
string
thDesc
:
string
engDesc
:
string
tags
:
TagModel
[]
tags
:
TagModel
[]
group
:
GroupModel
}
}
export
class
DocumentModel
implements
DocumentModel
{
export
class
DocumentModel
implements
DocumentModel
{
logId
:
string
logId
:
string
thName
:
string
engName
:
string
thDesc
:
string
engDesc
:
string
thumbnail
:
string
thumbnail
:
string
link1
:
string
link1
:
string
langSupport
:
string
langSupport
:
string
thDocObj
:
string
thDocObj
:
string
engDocObj
:
string
engDocObj
:
string
uploadBy
:
string
uploadBy
:
string
uploadDate
:
string
uploadTime
:
string
remark
:
string
remark
:
string
status
:
number
status
:
number
approveBy
:
string
approveBy
:
string
thName
:
string
approveDate
:
string
engName
:
string
approveTime
:
string
thDesc
:
string
engDesc
:
string
tags
:
TagModel
[]
tags
:
TagModel
[]
group
:
GroupModel
constructor
(
data
:
Partial
<
any
>
)
{
constructor
(
data
:
Partial
<
any
>
)
{
this
.
logId
=
data
.
logId
?
data
.
logId
:
''
this
.
logId
=
data
.
logId
?
data
.
logId
:
''
this
.
thumbnail
=
data
.
thumbnail
?
data
.
thumbnail
:
''
this
.
thumbnail
=
data
.
thumbnail
?
data
.
thumbnail
:
''
...
@@ -51,6 +62,11 @@ export class DocumentModel implements DocumentModel {
...
@@ -51,6 +62,11 @@ export class DocumentModel implements DocumentModel {
this
.
thDesc
=
data
.
thDesc
?
data
.
thDesc
:
''
this
.
thDesc
=
data
.
thDesc
?
data
.
thDesc
:
''
this
.
engDesc
=
data
.
engDesc
?
data
.
engDesc
:
''
this
.
engDesc
=
data
.
engDesc
?
data
.
engDesc
:
''
this
.
tags
=
data
.
tags
?
data
.
tags
:[]
this
.
tags
=
data
.
tags
?
data
.
tags
:[]
this
.
uploadDate
=
data
.
uploadDate
?
data
.
uploadDate
:
''
this
.
uploadTime
=
data
.
uploadTime
?
data
.
uploadTime
:
''
this
.
approveDate
=
data
.
approveDate
?
data
.
approveDate
:
''
this
.
approveTime
=
data
.
approveTime
?
data
.
approveTime
:
''
this
.
group
=
data
.
group
?
new
GroupModel
(
data
.
group
):
new
GroupModel
({})
}
}
getImage
(){
getImage
(){
...
...
src/app/model/excel-content.model.ts
View file @
3fc8fd7a
import
{
environment
}
from
"src/environments/environment"
import
{
environment
}
from
"src/environments/environment"
import
{
TagModel
}
from
"./tag.mmodel"
import
{
GroupModel
}
from
"./group.mmodel"
export
interface
ExcelContentModel
{
export
interface
ExcelContentModel
{
excelId
:
string
excelId
:
string
...
@@ -9,12 +11,22 @@ export interface ExcelContentModel {
...
@@ -9,12 +11,22 @@ export interface ExcelContentModel {
thumbnail
:
string
thumbnail
:
string
link1
:
string
link1
:
string
dbSupport
:
string
dbSupport
:
string
excelObj
:
any
excelObj
:
string
isPivot
:
number
isDataGrid
:
number
uploadBy
:
string
uploadBy
:
string
uploadDate
:
string
uploadTime
:
string
dwTime
:
number
dwTime
:
number
downloadDate
:
string
downloadTime
:
string
remark
:
string
remark
:
string
referId
:
string
referId
:
string
approveBy
:
string
approveBy
:
string
approveDate
:
string
approveTime
:
string
tags
:
TagModel
[]
group
:
GroupModel
}
}
export
class
ExcelContentModel
implements
ExcelContentModel
{
export
class
ExcelContentModel
implements
ExcelContentModel
{
...
@@ -26,12 +38,22 @@ export class ExcelContentModel implements ExcelContentModel {
...
@@ -26,12 +38,22 @@ export class ExcelContentModel implements ExcelContentModel {
thumbnail
:
string
thumbnail
:
string
link1
:
string
link1
:
string
dbSupport
:
string
dbSupport
:
string
excelObj
:
any
excelObj
:
string
isPivot
:
number
isDataGrid
:
number
uploadBy
:
string
uploadBy
:
string
uploadDate
:
string
uploadTime
:
string
dwTime
:
number
dwTime
:
number
downloadDate
:
string
downloadTime
:
string
remark
:
string
remark
:
string
referId
:
string
referId
:
string
approveBy
:
string
approveBy
:
string
approveDate
:
string
approveTime
:
string
tags
:
TagModel
[]
group
:
GroupModel
constructor
(
data
:
Partial
<
any
>
)
{
constructor
(
data
:
Partial
<
any
>
)
{
this
.
excelId
=
data
.
excelId
?
data
.
excelId
:
''
this
.
excelId
=
data
.
excelId
?
data
.
excelId
:
''
this
.
thumbnail
=
data
.
thumbnail
?
data
.
thumbnail
:
''
this
.
thumbnail
=
data
.
thumbnail
?
data
.
thumbnail
:
''
...
@@ -47,6 +69,16 @@ export class ExcelContentModel implements ExcelContentModel {
...
@@ -47,6 +69,16 @@ export class ExcelContentModel implements ExcelContentModel {
this
.
thDesc
=
data
.
thDesc
?
data
.
thDesc
:
''
this
.
thDesc
=
data
.
thDesc
?
data
.
thDesc
:
''
this
.
engDesc
=
data
.
engDesc
?
data
.
engDesc
:
''
this
.
engDesc
=
data
.
engDesc
?
data
.
engDesc
:
''
this
.
referId
=
data
.
referId
?
data
.
referId
:
''
this
.
referId
=
data
.
referId
?
data
.
referId
:
''
this
.
isPivot
=
data
.
isPivot
?
data
.
isPivot
:
0
this
.
isDataGrid
=
data
.
isDataGrid
?
data
.
isDataGrid
:
0
this
.
uploadDate
=
data
.
uploadDate
?
data
.
uploadDate
:
''
this
.
uploadTime
=
data
.
uploadTime
?
data
.
uploadTime
:
''
this
.
downloadDate
=
data
.
downloadDate
?
data
.
downloadDate
:
''
this
.
downloadTime
=
data
.
downloadTime
?
data
.
downloadTime
:
''
this
.
approveDate
=
data
.
approveDate
?
data
.
approveDate
:
''
this
.
approveTime
=
data
.
approveTime
?
data
.
approveTime
:
''
this
.
tags
=
data
.
tags
?
data
.
tags
:
''
this
.
group
=
data
.
group
?
new
GroupModel
(
data
.
group
):
new
GroupModel
({})
}
}
getImage
(){
getImage
(){
if
(
this
.
thumbnail
){
if
(
this
.
thumbnail
){
...
...
src/app/model/excel.model.ts
View file @
3fc8fd7a
import
{
environment
}
from
"src/environments/environment"
import
{
environment
}
from
"src/environments/environment"
import
{
TagModel
}
from
"./tag.mmodel"
import
{
TagModel
}
from
"./tag.mmodel"
import
{
GroupModel
}
from
"./group.mmodel"
export
interface
ExcelModel
{
export
interface
ExcelModel
{
logId
:
string
logId
:
string
thName
:
string
engName
:
string
thDesc
:
string
engDesc
:
string
thumbnail
:
string
thumbnail
:
string
link1
:
string
link1
:
string
dbSupport
:
string
dbSupport
:
string
excelObj
:
string
excelObj
:
string
isPivot
:
number
isDataGrid
:
number
uploadBy
:
string
uploadBy
:
string
uploadDate
:
string
uploadTime
:
string
remark
:
string
remark
:
string
status
:
number
status
:
number
approveBy
:
string
approveBy
:
string
thName
:
string
approveDate
:
string
engName
:
string
approveTime
:
string
thDesc
:
string
engDesc
:
string
tags
:
TagModel
[]
tags
:
TagModel
[]
group
:
GroupModel
}
}
export
class
ExcelModel
implements
ExcelModel
{
export
class
ExcelModel
implements
ExcelModel
{
logId
:
string
logId
:
string
thName
:
string
engName
:
string
thDesc
:
string
engDesc
:
string
thumbnail
:
string
thumbnail
:
string
link1
:
string
link1
:
string
dbSupport
:
string
dbSupport
:
string
excelObj
:
string
excelObj
:
string
isPivot
:
number
isDataGrid
:
number
uploadBy
:
string
uploadBy
:
string
uploadDate
:
string
uploadTime
:
string
remark
:
string
remark
:
string
status
:
number
status
:
number
approveBy
:
string
approveBy
:
string
thName
:
string
approveDate
:
string
engName
:
string
approveTime
:
string
thDesc
:
string
engDesc
:
string
tags
:
TagModel
[]
tags
:
TagModel
[]
group
:
GroupModel
constructor
(
data
:
Partial
<
any
>
)
{
constructor
(
data
:
Partial
<
any
>
)
{
this
.
logId
=
data
.
logId
?
data
.
logId
:
''
this
.
logId
=
data
.
logId
?
data
.
logId
:
''
this
.
thumbnail
=
data
.
thumbnail
?
data
.
thumbnail
:
''
this
.
thumbnail
=
data
.
thumbnail
?
data
.
thumbnail
:
''
...
@@ -48,6 +63,13 @@ export class ExcelModel implements ExcelModel {
...
@@ -48,6 +63,13 @@ export class ExcelModel implements ExcelModel {
this
.
thDesc
=
data
.
thDesc
?
data
.
thDesc
:
''
this
.
thDesc
=
data
.
thDesc
?
data
.
thDesc
:
''
this
.
engDesc
=
data
.
engDesc
?
data
.
engDesc
:
''
this
.
engDesc
=
data
.
engDesc
?
data
.
engDesc
:
''
this
.
tags
=
data
.
tags
?
data
.
tags
:[]
this
.
tags
=
data
.
tags
?
data
.
tags
:[]
this
.
isPivot
=
data
.
isPivot
?
data
.
isPivot
:
0
this
.
isDataGrid
=
data
.
isDataGrid
?
data
.
isDataGrid
:
0
this
.
uploadDate
=
data
.
uploadDate
?
data
.
uploadDate
:
''
this
.
uploadTime
=
data
.
uploadTime
?
data
.
uploadTime
:
''
this
.
approveDate
=
data
.
approveDate
?
data
.
approveDate
:
''
this
.
approveTime
=
data
.
approveTime
?
data
.
approveTime
:
''
this
.
group
=
data
.
group
?
new
GroupModel
(
data
.
group
):
new
GroupModel
({})
}
}
getImage
(){
getImage
(){
if
(
this
.
thumbnail
){
if
(
this
.
thumbnail
){
...
...
src/app/model/group.mmodel.ts
0 → 100644
View file @
3fc8fd7a
export
interface
GroupModel
{
groupId
:
string
thName
:
string
engName
:
string
groupType
:
number
}
export
class
GroupModel
implements
GroupModel
{
groupId
:
string
thName
:
string
engName
:
string
groupType
:
number
constructor
(
data
:
Partial
<
any
>
)
{
this
.
groupId
=
data
.
groupId
?
data
.
groupId
:
''
this
.
thName
=
data
.
thName
?
data
.
thName
:
''
this
.
engName
=
data
.
engName
?
data
.
engName
:
''
this
.
groupType
=
data
.
groupType
?
data
.
groupType
:
0
}
}
\ No newline at end of file
src/app/service/group.service.ts
0 → 100644
View file @
3fc8fd7a
import
{
Injectable
}
from
'@angular/core'
;
import
{
environment
}
from
'src/environments/environment'
;
import
{
HttpClient
,
HttpHeaders
}
from
'@angular/common/http'
;
import
{
Observable
,
of
}
from
'rxjs'
;
import
{
GroupModel
}
from
'../model/group.mmodel'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
GroupService
{
url
=
environment
.
url
createStatus
:
boolean
=
true
constructor
(
private
http
:
HttpClient
)
{
}
getList
():
Observable
<
GroupModel
[]
>
{
return
this
.
http
.
get
<
GroupModel
[]
>
(
this
.
url
+
"portal-group/lists"
)
}
}
src/environments/environment.prod.ts
View file @
3fc8fd7a
export
const
environment
=
{
export
const
environment
=
{
url
:
'http
://192.168.40.35:30537
/'
,
url
:
'http
s://portal.myhr.co.th/api
/'
,
production
:
true
production
:
true
};
};
src/environments/environment.ts
View file @
3fc8fd7a
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
// The list of file replacements can be found in `angular.json`.
// The list of file replacements can be found in `angular.json`.
export
const
environment
=
{
export
const
environment
=
{
url
:
'http
://192.168.40.35:30537
/'
,
url
:
'http
s://portal.myhr.co.th/api
/'
,
production
:
false
production
:
false
};
};
...
...
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