Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
portal-apps-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
portal-apps-manage
Commits
3ad57f67
Commit
3ad57f67
authored
Jul 30, 2025
by
pantakan konthang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
myLearn-manage PDPA
parent
38b859c0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
202 additions
and
5 deletions
+202
-5
pdpaMylearn.model.ts
src/app/DPU/models/pdpaMylearn.model.ts
+50
-0
mylearn.module.ts
src/app/DPU/mylearn/mylearn.module.ts
+7
-2
pdpa-manage.component.css
src/app/DPU/mylearn/pdpa-manage/pdpa-manage.component.css
+83
-0
pdpa-manage.component.html
src/app/DPU/mylearn/pdpa-manage/pdpa-manage.component.html
+0
-0
pdpa-manage.component.spec.ts
...app/DPU/mylearn/pdpa-manage/pdpa-manage.component.spec.ts
+28
-0
pdpa-manage.component.ts
src/app/DPU/mylearn/pdpa-manage/pdpa-manage.component.ts
+0
-0
pdpa.service.ts
src/app/DPU/services/pdpa.service.ts
+33
-2
header.component.html
src/app/shared/components/header/header.component.html
+1
-1
No files found.
src/app/DPU/models/pdpaMylearn.model.ts
0 → 100644
View file @
3ad57f67
import
{
TranslateService
}
from
"@ngx-translate/core"
;
import
{
BaseModel
}
from
"./base.model"
;
export
interface
PdpaModel_myLearn
{
version
:
string
;
startDate
:
string
;
endDate
:
string
;
requestConsent
:
string
;
requestConsentEng
:
string
;
memberPdpa
:
any
[];
status
:
number
;
getName
():
string
getStatus
():
string
}
export
class
MyPdpaModel_myLearn
extends
BaseModel
implements
PdpaModel_myLearn
{
version
:
string
;
startDate
:
string
;
endDate
:
string
;
requestConsent
:
string
;
requestConsentEng
:
string
;
memberPdpa
:
any
[];
status
:
number
;
constructor
(
data
?:
Partial
<
PdpaModel_myLearn
>
,
translateService
?:
TranslateService
)
{
super
(
data
,
translateService
);
this
.
version
=
data
?.
version
!
;
this
.
startDate
=
data
?.
startDate
!
;
this
.
endDate
=
data
?.
endDate
!
;
this
.
requestConsent
=
data
?.
requestConsent
!
;
this
.
requestConsentEng
=
data
?.
requestConsentEng
!
;
this
.
memberPdpa
=
data
?.
memberPdpa
!
;
this
.
status
=
data
?.
status
!
// this.status = data?.status!;
}
getName
():
string
{
return
this
.
translateService
.
currentLang
==
"th"
?
this
.
requestConsent
:
this
.
requestConsentEng
;
}
getStatus
():
string
{
if
(
this
.
status
==
1
)
{
return
this
.
translateService
.
instant
(
'Active'
);
}
else
{
return
this
.
translateService
.
instant
(
'Unactive'
);
}
}
}
src/app/DPU/mylearn/mylearn.module.ts
View file @
3ad57f67
...
...
@@ -11,7 +11,12 @@ export const mylearn: Routes = [
path
:
'dashboard'
,
loadComponent
:
()
=>
import
(
'./dashboard/dashboard.component'
).
then
((
m
)
=>
m
.
DashboardComponent
),
}
},
{
path
:
'mylearn-pdpa-manage'
,
loadComponent
:
()
=>
import
(
'./pdpa-manage/pdpa-manage.component'
).
then
((
m
)
=>
m
.
PdpaManageComponent
),
},
]
}
]
...
...
@@ -24,6 +29,6 @@ export const mylearn: Routes = [
declarations
:
[
MylearnComponent
],
exports
:
[
RouterModule
],
})
export
class
MylearnModule
{
export
class
MylearnModule
{
static
routes
=
mylearn
;
}
src/app/DPU/mylearn/pdpa-manage/pdpa-manage.component.css
0 → 100644
View file @
3ad57f67
.page
{
display
:
flex
;
height
:
auto
;
flex-direction
:
column
;
}
/* Base styling for the modal body content */
.ti-modal-body-content
{
background-color
:
#ffffff
;
border-radius
:
8px
;
box-shadow
:
0
4px
12px
rgba
(
0
,
0
,
0
,
0.1
);
}
/* Form labels */
.ti-form-label
{
font-size
:
0.95rem
;
color
:
#333
;
}
/* Form inputs */
.ti-form-input
{
border
:
1px
solid
#d1d5db
;
border-radius
:
4px
;
padding
:
0.6rem
1rem
;
font-size
:
1rem
;
transition
:
all
0.2s
ease-in-out
;
}
.ti-form-input
:focus
{
outline
:
none
;
border-color
:
#3b82f6
;
/* Example primary color */
box-shadow
:
0
0
0
3px
rgba
(
59
,
130
,
246
,
0.25
);
}
/* Read-only input styling */
.bg-input-readonly
{
background-color
:
#e5e7eb
;
cursor
:
not-allowed
;
}
/* Error text */
.text-danger
{
color
:
#ef4444
;
}
/* Tab button styling */
.tab-btn
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
120px
;
/* Consistent width for tabs */
padding
:
0.75rem
1rem
;
border
:
1px
solid
#d1d5db
;
border-bottom
:
none
;
/* Remove bottom border for active tab effect */
border-top-left-radius
:
4px
;
border-top-right-radius
:
4px
;
font-size
:
0.95rem
;
font-weight
:
500
;
text-align
:
center
;
color
:
#6b7280
;
transition
:
all
0.2s
ease-in-out
;
text-decoration
:
none
;
/* Remove underline from anchor tags */
}
.tab-btn
:hover
{
color
:
#111827
;
background-color
:
#f3f4f6
;
}
/* Active tab styling */
.tab-btn.hs-tab-active
{
background-color
:
#3b82f6
;
/* Example primary color */
border-color
:
#3b82f6
;
color
:
#ffffff
;
}
/* Custom primary color (replace with your actual primary color if different) */
.text-primary
{
color
:
#3b82f6
;
}
.bg-primary
{
background-color
:
#3b82f6
;
}
src/app/DPU/mylearn/pdpa-manage/pdpa-manage.component.html
0 → 100644
View file @
3ad57f67
This diff is collapsed.
Click to expand it.
src/app/DPU/mylearn/pdpa-manage/pdpa-manage.component.spec.ts
0 → 100644
View file @
3ad57f67
/* tslint:disable:no-unused-variable */
import
{
async
,
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
By
}
from
'@angular/platform-browser'
;
import
{
DebugElement
}
from
'@angular/core'
;
import
{
PdpaManageComponent
}
from
'./pdpa-manage.component'
;
describe
(
'PdpaManageComponent'
,
()
=>
{
let
component
:
PdpaManageComponent
;
let
fixture
:
ComponentFixture
<
PdpaManageComponent
>
;
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
declarations
:
[
PdpaManageComponent
]
})
.
compileComponents
();
}));
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
PdpaManageComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
src/app/DPU/mylearn/pdpa-manage/pdpa-manage.component.ts
0 → 100644
View file @
3ad57f67
This diff is collapsed.
Click to expand it.
src/app/DPU/services/pdpa.service.ts
View file @
3ad57f67
import
{
HttpClient
,
HttpHeaders
}
from
'@angular/common/http'
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
Observable
}
from
'rxjs'
;
import
{
map
,
Observable
}
from
'rxjs'
;
import
{
PdpaConsentModel
,
PdpaModel
}
from
'../models/pdpa.model'
;
import
{
environment
}
from
'../../../environments/environment'
;
import
{
PdpaSummaryModel
}
from
'../models/pdpaSummary.model'
;
import
{
MyPdpaConfigModel
,
PdpaConfigModel
}
from
'../models/pdpaConfig.model'
;
import
{
ResponseModel
}
from
'../models/base.model'
;
import
{
MyPdpaModel_myLearn
,
PdpaModel_myLearn
}
from
'../models/pdpaMylearn.model'
;
import
{
TranslateService
}
from
'@ngx-translate/core'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
PdpaService
{
constructor
(
private
http
:
HttpClient
)
{
}
constructor
(
private
http
:
HttpClient
,
private
translateService
:
TranslateService
)
{
}
getPdpaList
():
Observable
<
PdpaModel
[]
>
{
return
this
.
http
.
get
<
PdpaModel
[]
>
(
`
${
environment
.
baseUrl
}
/pdpa/consent-profile/lists`
);
...
...
@@ -68,4 +70,33 @@ export class PdpaService {
getLastVersion
():
Observable
<
PdpaConfigModel
>
{
return
this
.
http
.
get
<
PdpaConfigModel
>
(
`
${
environment
.
baseUrl
}
/pdpa/consent-profile/last`
);
}
// myLearn
myLearnUrl
=
"https://mylearn-uat.myhr.co.th/api"
// getPdpaList_myLearn(){
// return this.http.get<any>(this.myLearnUrl + "/pdpa" + "/lists?companyId=" );
// }
// getConfigList_myLearn(){
// return this.http.get<any>(this.myLearnUrl + "/pdpa" + "/lists?companyId=");
// }
getConfigList_myLearn
():
Observable
<
PdpaModel_myLearn
[]
>
{
return
this
.
http
.
get
<
PdpaModel_myLearn
[]
>
(
this
.
myLearnUrl
+
"/pdpa"
+
"/lists?companyId="
)
.
pipe
(
map
((
e
)
=>
e
.
map
((
e
)
=>
new
MyPdpaModel_myLearn
(
e
,
this
.
translateService
)))
);
}
save_pdpa_myLearn
(
body
:
PdpaModel_myLearn
,
conSent
:
string
)
{
return
this
.
http
.
post
<
PdpaModel_myLearn
>
(
this
.
myLearnUrl
+
"/pdpa?consent="
+
conSent
!
,
new
MyPdpaModel_myLearn
(
body
));
}
delete_pdpa_myLearn
(
body
:
PdpaModel_myLearn
)
{
const
options
=
{
headers
:
new
HttpHeaders
({
"Content-Type"
:
"application/json"
,
}),
body
:
new
MyPdpaModel_myLearn
(
body
),
};
return
this
.
http
.
delete
<
ResponseModel
>
(
this
.
myLearnUrl
+
"/pdpa?companyId="
,
options
);
}
}
src/app/shared/components/header/header.component.html
View file @
3ad57f67
...
...
@@ -343,7 +343,7 @@
</div>
<div
class=
""
>
<a
routerLink=
"/mylearn/
dashboard
"
<a
routerLink=
"/mylearn/
mylearn-pdpa-manage
"
class=
"p-4 items-center related-app block text-center rounded-sm hover:bg-gray-50 dark:hover:bg-black/20"
>
<img
src=
"./assets/images/logoallHR/mylearn-logo.png"
alt=
"miscrosoft"
class=
"leading-[1.75] text-2xl !h-[1.75rem] align-middle flex justify-center mx-auto"
>
...
...
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