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
36fa5d75
Commit
36fa5d75
authored
Jul 02, 2025
by
DESKTOP-E3GSHH7\myhr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
เเก้ไขหน้าตาการเพิ่มรูป
parent
a2ae82b1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
20 deletions
+41
-20
article-manage.component.css
...pp/DPU/common/article-manage/article-manage.component.css
+18
-0
article-manage.component.html
...p/DPU/common/article-manage/article-manage.component.html
+0
-0
article-manage.component.ts
...app/DPU/common/article-manage/article-manage.component.ts
+11
-20
article.model.ts
src/app/DPU/models/article.model.ts
+12
-0
No files found.
src/app/DPU/common/article-manage/article-manage.component.css
View file @
36fa5d75
...
...
@@ -25,3 +25,20 @@
.font-36
{
font-size
:
36px
;
}
.page
{
display
:
flex
;
height
:
auto
;
flex-direction
:
column
;
}
.hs-tab-active
{
background-color
:
rgb
(
21
,
76
,
156
)
!important
;
border-color
:
rgb
(
21
,
76
,
156
)
!important
;
color
:
#FFFFFF
!important
;
}
.active
{
background-color
:
rgb
(
21
,
76
,
156
)
!important
;
border-color
:
rgb
(
21
,
76
,
156
)
!important
;
color
:
#FFFFFF
!important
;
}
\ No newline at end of file
src/app/DPU/common/article-manage/article-manage.component.html
View file @
36fa5d75
This diff is collapsed.
Click to expand it.
src/app/DPU/common/article-manage/article-manage.component.ts
View file @
36fa5d75
...
...
@@ -62,7 +62,10 @@ export class ArticleManageComponent {
@
ViewChild
(
'closeModal'
)
public
childModal
?:
ElementRef
;
@
ViewChild
(
'modalDetail'
)
public
modalDetail
?:
ElementRef
;
@
ViewChild
(
"articleModel"
)
articleModel
:
any
;
@
ViewChild
(
'profileChangeInput'
)
profileChangeInputRef
!
:
ElementRef
;
dialogRef
:
any
currentContentTab
:
number
=
1
;
currentExcerptTab
:
number
=
1
;
action
=
"new"
;
allSelected
=
false
;
...
...
@@ -71,7 +74,6 @@ export class ArticleManageComponent {
filterList
:
ArticleModel
[]
=
[];
selectModel
:
ArticleModel
=
new
ArticleModel
();
selectedItems
=
new
Map
<
string
,
boolean
>
();
editorInstance
:
any
;
// empList: ArticleModel[] = [];
// descName = 'engName';
pageIndex
=
0
;
...
...
@@ -98,24 +100,6 @@ export class ArticleManageComponent {
this
.
uploadConfig
();
}
isDescriptionValid
():
boolean
{
const
plainText
=
this
.
editorInstance
?.
getText
()?.
trim
()
||
''
;
return
plainText
.
length
>
0
;
}
onEditorCreated
(
quill
:
any
)
{
this
.
editorInstance
=
quill
;
}
onContentChanged
(
event
:
any
)
{
const
text
=
event
.
editor
.
getText
().
trim
();
if
(
text
.
length
===
0
&&
this
.
editorInstance
)
{
this
.
editorInstance
.
formatLine
(
0
,
1
,
'header'
,
false
);
}
this
.
selectModel
.
content
=
event
.
html
;
}
...
...
@@ -210,7 +194,7 @@ export class ArticleManageComponent {
})
.
then
((
willDelete
:
any
)
=>
{
if
(
willDelete
)
{
this
.
articleService
.
deletearticle
(
item
).
subscribe
(
result
=>
{
this
.
articleService
.
deletearticle
ById
(
item
.
articleId
).
subscribe
(
result
=>
{
swal
(
"ลบสำเร็จ!!"
,
"ลบข้อมูลสำเร็จ"
,
"success"
);
this
.
ngOnInit
();
},
error
=>
{
...
...
@@ -258,6 +242,7 @@ export class ArticleManageComponent {
swal
(
"บันทึกสำเร็จ!!"
,
"บันทึกข้อมูลสมาชิก"
,
"success"
);
this
.
ngOnInit
();
this
.
childModal
?.
nativeElement
.
click
();
this
.
closeDialog
();
},
error
=>
{
console
.
error
(
"เกิดข้อผิดพลาดในการบันทึก/อัปเดต:"
,
error
);
swal
(
"ข้อผิดพลาด!!"
,
"ไม่สามารถบันทึก/อัปเดตข้อมูลได้"
,
"error"
);
...
...
@@ -406,4 +391,9 @@ export class ArticleManageComponent {
closeDialog
()
{
this
.
dialogRef
.
close
()
}
triggerFileInput
():
void
{
if
(
this
.
profileChangeInputRef
)
{
this
.
profileChangeInputRef
.
nativeElement
.
click
();
}
}
}
\ No newline at end of file
src/app/DPU/models/article.model.ts
View file @
36fa5d75
...
...
@@ -8,7 +8,11 @@ export interface ArticleModel {
companyId
:
CompanyModel
[]
title
:
string
content
:
string
engcontent
:
string
zhcontent
:
string
excerpt
:
string
engexcerpt
:
string
zhexcerpt
:
string
category
:
string
author
:
string
picture
:
string
...
...
@@ -23,7 +27,11 @@ export class ArticleModel extends BaseModel implements ArticleModel {
companyId
:
CompanyModel
[]
title
:
string
content
:
string
engcontent
:
string
zhcontent
:
string
excerpt
:
string
engexcerpt
:
string
zhexcerpt
:
string
category
:
string
author
:
string
picture
:
string
...
...
@@ -38,7 +46,11 @@ export class ArticleModel extends BaseModel implements ArticleModel {
this
.
companyId
=
dataToArray
(
data
?.
companyId
).
map
((
x
:
CompanyModel
)
=>
new
CompanyModel
(
x
,
translateService
))
this
.
title
=
data
?.
title
!
this
.
content
=
data
?.
content
!
this
.
engcontent
=
data
?.
engcontent
!
this
.
zhcontent
=
data
?.
zhcontent
!
this
.
excerpt
=
data
?.
excerpt
!
this
.
engexcerpt
=
data
?.
engexcerpt
!
this
.
zhexcerpt
=
data
?.
zhexcerpt
!
this
.
category
=
data
?.
category
!
this
.
author
=
data
?.
author
!
this
.
picture
=
data
?.
picture
!
...
...
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