Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mySkill-x
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
mySkill-x
Commits
0c259e86
Commit
0c259e86
authored
Mar 24, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ทะเบียนพนักงาน
parent
5b6fe696
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
203 additions
and
104 deletions
+203
-104
sub-employee-registration.component.html
...yee-registration/sub-employee-registration.component.html
+0
-0
sub-employee-registration.component.ts
...loyee-registration/sub-employee-registration.component.ts
+86
-15
boss.model.ts
src/app/shared/model/boss.model.ts
+12
-12
employee.model.ts
src/app/shared/model/employee.model.ts
+3
-3
appraisal.service.ts
src/app/shared/services/appraisal.service.ts
+5
-0
bu2.service.ts
src/app/shared/services/bu2.service.ts
+26
-23
bu3.service.ts
src/app/shared/services/bu3.service.ts
+30
-27
bu4.service.ts
src/app/shared/services/bu4.service.ts
+3
-0
bu5.service.ts
src/app/shared/services/bu5.service.ts
+26
-23
bu6.service.ts
src/app/shared/services/bu6.service.ts
+3
-0
bu7.service.ts
src/app/shared/services/bu7.service.ts
+4
-1
style.css
src/assets/css/style.css
+5
-0
No files found.
src/app/components/company-components/employee-registration/sub-employee-registration/sub-employee-registration.component.html
View file @
0c259e86
This diff is collapsed.
Click to expand it.
src/app/components/company-components/employee-registration/sub-employee-registration/sub-employee-registration.component.ts
View file @
0c259e86
...
...
@@ -31,6 +31,7 @@ import { Bu6Model, MyBu6Model } from 'src/app/shared/model/bu6.model';
import
{
Bu7Model
,
MyBu7Model
}
from
'src/app/shared/model/bu7.model'
;
import
{
EmpStatusService
}
from
'src/app/shared/services/emp-status.service'
;
import
{
StatusModel
,
MyStatusModel
}
from
'src/app/shared/model/status.model'
;
import
{
MyBossModel
}
from
'src/app/shared/model/boss.model'
;
export
interface
DataEmployee
{
loading
:
boolean
select
:
EmployeeModel
|
any
...
...
@@ -112,12 +113,6 @@ export class SubEmployeeRegistrationComponent {
this
.
getEmployeeList
()
this
.
getEmpGroupList
()
this
.
getBu1List
()
this
.
getBu2List
()
this
.
getBu3List
()
this
.
getBu4List
()
this
.
getBu5List
()
this
.
getBu6List
()
this
.
getBu7List
()
this
.
getPositionList
()
this
.
getJobcodeList
()
this
.
getBranchList
()
...
...
@@ -304,10 +299,24 @@ export class SubEmployeeRegistrationComponent {
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
()))
}
selectBu1
(
data
?:
Bu1Model
)
{
this
.
employee
.
select
.
bu1
=
new
MyBu1Model
(
data
)
this
.
employee
.
select
.
bu2
=
new
MyBu2Model
()
this
.
employee
.
select
.
bu3
=
new
MyBu3Model
()
this
.
employee
.
select
.
bu4
=
new
MyBu4Model
()
this
.
employee
.
select
.
bu5
=
new
MyBu5Model
()
this
.
employee
.
select
.
bu6
=
new
MyBu6Model
()
this
.
employee
.
select
.
bu7
=
new
MyBu7Model
()
if
(
this
.
employee
.
select
.
bu1
.
bu1id
)
{
this
.
getBu2List
()
}
else
{
this
.
bu2
.
dataList
=
[]
}
}
getBu2List
()
{
this
.
bu2
.
loading
=
false
this
.
bu2Service
.
getList
(
).
subscribe
({
this
.
bu2Service
.
getList
ByParent
(
this
.
employee
.
select
.
bu1
.
bu1id
).
subscribe
({
next
:
response
=>
{
this
.
bu2
.
dataList
=
response
.
map
((
x
:
any
)
=>
new
MyBu2Model
(
x
))
this
.
bu2
.
loading
=
false
...
...
@@ -324,10 +333,23 @@ export class SubEmployeeRegistrationComponent {
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
()))
}
selectBu2
(
data
?:
Bu2Model
)
{
this
.
employee
.
select
.
bu2
=
new
MyBu2Model
(
data
)
this
.
employee
.
select
.
bu3
=
new
MyBu3Model
()
this
.
employee
.
select
.
bu4
=
new
MyBu4Model
()
this
.
employee
.
select
.
bu5
=
new
MyBu5Model
()
this
.
employee
.
select
.
bu6
=
new
MyBu6Model
()
this
.
employee
.
select
.
bu7
=
new
MyBu7Model
()
if
(
this
.
employee
.
select
.
bu2
.
bu2id
)
{
this
.
getBu3List
()
}
else
{
this
.
bu3
.
dataList
=
[]
}
}
getBu3List
()
{
this
.
bu3
.
loading
=
false
this
.
bu3Service
.
getList
(
).
subscribe
({
this
.
bu3Service
.
getList
ByParent
(
this
.
employee
.
select
.
bu2
.
bu2id
).
subscribe
({
next
:
response
=>
{
this
.
bu3
.
dataList
=
response
.
map
((
x
:
any
)
=>
new
MyBu3Model
(
x
))
this
.
bu3
.
loading
=
false
...
...
@@ -344,10 +366,22 @@ export class SubEmployeeRegistrationComponent {
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
()))
}
selectBu3
(
data
?:
Bu3Model
)
{
this
.
employee
.
select
.
bu3
=
new
MyBu3Model
(
data
)
this
.
employee
.
select
.
bu4
=
new
MyBu4Model
()
this
.
employee
.
select
.
bu5
=
new
MyBu5Model
()
this
.
employee
.
select
.
bu6
=
new
MyBu6Model
()
this
.
employee
.
select
.
bu7
=
new
MyBu7Model
()
if
(
this
.
employee
.
select
.
bu3
.
bu3id
)
{
this
.
getBu4List
()
}
else
{
this
.
bu4
.
dataList
=
[]
}
}
getBu4List
()
{
this
.
bu4
.
loading
=
false
this
.
bu4Service
.
getList
(
).
subscribe
({
this
.
bu4Service
.
getList
ByParent
(
this
.
employee
.
select
.
bu3
.
bu3id
).
subscribe
({
next
:
response
=>
{
this
.
bu4
.
dataList
=
response
.
map
((
x
:
any
)
=>
new
MyBu4Model
(
x
))
this
.
bu4
.
loading
=
false
...
...
@@ -364,10 +398,21 @@ export class SubEmployeeRegistrationComponent {
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
()))
}
selectBu4
(
data
?:
Bu4Model
)
{
this
.
employee
.
select
.
bu4
=
new
MyBu4Model
(
data
)
this
.
employee
.
select
.
bu5
=
new
MyBu5Model
()
this
.
employee
.
select
.
bu6
=
new
MyBu6Model
()
this
.
employee
.
select
.
bu7
=
new
MyBu7Model
()
if
(
this
.
employee
.
select
.
bu4
.
bu4id
)
{
this
.
getBu5List
()
}
else
{
this
.
bu5
.
dataList
=
[]
}
}
getBu5List
()
{
this
.
bu5
.
loading
=
false
this
.
bu5Service
.
getList
(
).
subscribe
({
this
.
bu5Service
.
getList
ByParent
(
this
.
employee
.
select
.
bu4
.
bu4id
).
subscribe
({
next
:
response
=>
{
this
.
bu5
.
dataList
=
response
.
map
((
x
:
any
)
=>
new
MyBu5Model
(
x
))
this
.
bu5
.
loading
=
false
...
...
@@ -384,10 +429,20 @@ export class SubEmployeeRegistrationComponent {
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
()))
}
selectBu5
(
data
?:
Bu5Model
)
{
this
.
employee
.
select
.
bu5
=
new
MyBu5Model
(
data
)
this
.
employee
.
select
.
bu6
=
new
MyBu6Model
()
this
.
employee
.
select
.
bu7
=
new
MyBu7Model
()
if
(
this
.
employee
.
select
.
bu5
.
bu5id
)
{
this
.
getBu6List
()
}
else
{
this
.
bu6
.
dataList
=
[]
}
}
getBu6List
()
{
this
.
bu6
.
loading
=
false
this
.
bu6Service
.
getList
(
).
subscribe
({
this
.
bu6Service
.
getList
ByParent
(
this
.
employee
.
select
.
bu5
.
bu5id
).
subscribe
({
next
:
response
=>
{
this
.
bu6
.
dataList
=
response
.
map
((
x
:
any
)
=>
new
MyBu6Model
(
x
))
this
.
bu6
.
loading
=
false
...
...
@@ -404,10 +459,19 @@ export class SubEmployeeRegistrationComponent {
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
()))
}
selectBu6
(
data
?:
Bu6Model
)
{
this
.
employee
.
select
.
bu6
=
new
MyBu6Model
(
data
)
this
.
employee
.
select
.
bu7
=
new
MyBu7Model
()
if
(
this
.
employee
.
select
.
bu6
.
bu6id
)
{
this
.
getBu7List
()
}
else
{
this
.
bu7
.
dataList
=
[]
}
}
getBu7List
()
{
this
.
bu7
.
loading
=
false
this
.
bu7Service
.
getList
(
).
subscribe
({
this
.
bu7Service
.
getList
ByParent
(
this
.
employee
.
select
.
bu6
.
bu6id
).
subscribe
({
next
:
response
=>
{
this
.
bu7
.
dataList
=
response
.
map
((
x
:
any
)
=>
new
MyBu7Model
(
x
))
this
.
bu7
.
loading
=
false
...
...
@@ -424,6 +488,9 @@ export class SubEmployeeRegistrationComponent {
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
modal
.
search
.
toLowerCase
()))
}
selectBu7
(
data
?:
Bu7Model
)
{
this
.
employee
.
select
.
bu7
=
new
MyBu7Model
(
data
)
}
getEmpGroupList
()
{
this
.
empGroup
.
loading
=
false
...
...
@@ -518,15 +585,18 @@ export class SubEmployeeRegistrationComponent {
}
selectEmployee
(
data
?:
EmployeeModel
)
{
if
(
this
.
modalType
==
'update'
&&
!
data
)
{
this
.
employee
.
select
=
{
...
new
MyEmployeeModel
({
employeeId
:
this
.
employee
.
select
.
employeeId
}),
dateIso
:
''
,
dateEndIso
:
''
}
this
.
employee
.
select
=
{
...
new
MyEmployeeModel
({
employeeId
:
this
.
employee
.
select
.
employeeId
}),
dateIso
:
''
,
dateEndIso
:
'
2100-12-31
'
}
this
.
employee
.
select
.
status
=
new
MyStatusModel
(
this
.
empStatus
.
dataList
[
0
])
}
else
{
this
.
employee
.
select
=
{
...
new
MyEmployeeModel
(
data
||
{}),
dateIso
:
this
.
toISODate
(
data
?.
firstHireDate
),
dateEndIso
:
this
.
toISODate
(
data
?.
resign
date
)
}
this
.
employee
.
select
=
{
...
new
MyEmployeeModel
(
data
||
{}),
dateIso
:
this
.
toISODate
(
data
?.
firstHireDate
),
dateEndIso
:
this
.
toISODate
(
data
?.
resign
Date
||
'2100-12-31'
)
}
if
(
!
this
.
employee
.
select
.
status
.
statusCode
)
{
this
.
employee
.
select
.
status
=
new
MyStatusModel
(
this
.
empStatus
.
dataList
[
0
])
}
}
}
selectBoss
(
data
:
any
)
{
this
.
employee
.
select
.
boss
=
new
MyBossModel
({
...
data
,
empType
:
data
.
empType
.
codeId
})
}
changeDate
(
target
:
{
[
key
:
string
]:
any
},
field
:
string
,
dateIso
:
string
)
{
target
[
field
]
=
this
.
toYYYYMMDD
(
dateIso
)
}
...
...
@@ -555,6 +625,7 @@ export class SubEmployeeRegistrationComponent {
selectDataModal
(
target
:
{
[
key
:
string
]:
any
},
field
:
string
,
data
:
any
)
{
target
[
field
]
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
}
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
this
.
toastr
[
type
](
text
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
...
...
@@ -586,7 +657,7 @@ export class SubEmployeeRegistrationComponent {
!
this
.
employee
.
select
.
lname
||
!
this
.
employee
.
select
.
empGroup
.
groupId
||
!
this
.
employee
.
select
.
firstHireDate
||
!
this
.
employee
.
select
.
resign
d
ate
||
!
this
.
employee
.
select
.
resign
D
ate
||
!
this
.
employee
.
select
.
bu1
.
bu1id
||
!
this
.
employee
.
select
.
bu2
.
bu2id
||
!
this
.
employee
.
select
.
bu3
.
bu3id
||
...
...
src/app/shared/model/boss.model.ts
View file @
0c259e86
...
...
@@ -27,18 +27,18 @@ export class MyBossModel implements BossModel {
job
:
JobCodeModel
thFullName
:
string
engFullName
:
string
constructor
(
data
:
Partial
<
BossModel
>
)
{
this
.
employeeId
=
data
.
employeeId
||
""
this
.
prefix
=
new
MyPrefixModel
(
data
.
prefix
||
{})
this
.
fname
=
data
.
fname
||
""
this
.
lname
=
data
.
lname
||
""
this
.
efname
=
data
.
efname
||
""
this
.
elname
=
data
.
elname
||
""
this
.
empType
=
data
.
empType
||
""
this
.
empPosition
=
data
.
empPosition
||
""
this
.
job
=
new
MyJobCodeModel
(
data
.
job
||
{})
this
.
thFullName
=
data
.
thFullName
||
""
this
.
engFullName
=
data
.
engFullName
||
""
constructor
(
data
?
:
Partial
<
BossModel
>
)
{
this
.
employeeId
=
data
?
.
employeeId
||
""
this
.
prefix
=
new
MyPrefixModel
(
data
?
.
prefix
||
{})
this
.
fname
=
data
?
.
fname
||
""
this
.
lname
=
data
?
.
lname
||
""
this
.
efname
=
data
?
.
efname
||
""
this
.
elname
=
data
?
.
elname
||
""
this
.
empType
=
data
?
.
empType
||
""
this
.
empPosition
=
data
?
.
empPosition
||
""
this
.
job
=
new
MyJobCodeModel
(
data
?
.
job
||
{})
this
.
thFullName
=
data
?
.
thFullName
||
""
this
.
engFullName
=
data
?
.
engFullName
||
""
}
}
src/app/shared/model/employee.model.ts
View file @
0c259e86
...
...
@@ -111,7 +111,7 @@ export interface EmployeeModel {
thFullName
:
string
engFullName
:
string
pl
:
PLModel
resign
d
ate
:
string
resign
D
ate
:
string
}
export
class
MyEmployeeModel
implements
EmployeeModel
{
...
...
@@ -201,7 +201,7 @@ export class MyEmployeeModel implements EmployeeModel {
thFullName
:
string
engFullName
:
string
pl
:
PLModel
resign
d
ate
:
string
resign
D
ate
:
string
constructor
(
data
?:
Partial
<
EmployeeModel
>
)
{
this
.
employeeId
=
data
?.
employeeId
||
""
this
.
prefix
=
new
MyPrefixModel
(
data
?.
prefix
||
{})
...
...
@@ -289,7 +289,7 @@ export class MyEmployeeModel implements EmployeeModel {
this
.
thFullName
=
data
?.
thFullName
||
""
this
.
engFullName
=
data
?.
engFullName
||
""
this
.
pl
=
new
MyPLModel
(
data
?.
workarea
||
{})
this
.
resign
date
=
data
?.
resignd
ate
||
""
this
.
resign
Date
=
data
?.
resignD
ate
||
""
}
}
src/app/shared/services/appraisal.service.ts
View file @
0c259e86
...
...
@@ -26,4 +26,8 @@ export class AppraisalService {
getBossList
():
Observable
<
AppraisalSubordinateModel
[]
>
{
return
this
.
http
.
get
<
AppraisalSubordinateModel
[]
>
(
this
.
urlApi
+
"/boss/emp"
)
}
getFormPmsById
(
evaluationRoundId
:
string
,
apsassessy
:
string
):
Observable
<
AppraisalCompentencyModel2
>
{
return
this
.
http
.
get
<
AppraisalCompentencyModel2
>
(
this
.
urlApi
+
"/pms/"
+
evaluationRoundId
+
"/"
+
apsassessy
)
}
}
\ No newline at end of file
src/app/shared/services/bu2.service.ts
View file @
0c259e86
...
...
@@ -5,29 +5,32 @@ import { environment } from 'src/environments/environment';
import
{
Bu2Model
}
from
'../model/bu2.model'
;
import
{
AlertModel
}
from
'../model/alert.model'
;
@
Injectable
({
providedIn
:
'root'
providedIn
:
'root'
})
export
class
Bu2Service
{
api
=
"/bu2"
urlApi
=
environment
.
baseUrl
+
this
.
api
constructor
(
private
http
:
HttpClient
)
{
}
getList
():
Observable
<
Bu2Model
[]
>
{
return
this
.
http
.
get
<
Bu2Model
[]
>
(
this
.
urlApi
+
"/lists"
)
}
getById
(
bu2id
:
string
):
Observable
<
Bu2Model
>
{
return
this
.
http
.
get
<
Bu2Model
>
(
this
.
urlApi
+
"/"
+
bu2id
)
}
post
(
body
:
Bu2Model
):
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
,
body
)
}
delete
(
body
:
Bu2Model
[]):
Observable
<
AlertModel
>
{
const
options
=
{
headers
:
new
HttpHeaders
({
"Content-Type"
:
"application/json"
,
}),
body
:
body
};
return
this
.
http
.
delete
<
AlertModel
>
(
this
.
urlApi
,
options
)
}
api
=
"/bu2"
urlApi
=
environment
.
baseUrl
+
this
.
api
constructor
(
private
http
:
HttpClient
)
{
}
getList
():
Observable
<
Bu2Model
[]
>
{
return
this
.
http
.
get
<
Bu2Model
[]
>
(
this
.
urlApi
+
"/lists"
)
}
getListByParent
(
bu1id
:
string
):
Observable
<
Bu2Model
[]
>
{
return
this
.
http
.
get
<
Bu2Model
[]
>
(
environment
.
baseUrl
+
"/bu1/parent/"
+
bu1id
)
}
getById
(
bu2id
:
string
):
Observable
<
Bu2Model
>
{
return
this
.
http
.
get
<
Bu2Model
>
(
this
.
urlApi
+
"/"
+
bu2id
)
}
post
(
body
:
Bu2Model
):
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
,
body
)
}
delete
(
body
:
Bu2Model
[]):
Observable
<
AlertModel
>
{
const
options
=
{
headers
:
new
HttpHeaders
({
"Content-Type"
:
"application/json"
,
}),
body
:
body
};
return
this
.
http
.
delete
<
AlertModel
>
(
this
.
urlApi
,
options
)
}
}
src/app/shared/services/bu3.service.ts
View file @
0c259e86
...
...
@@ -5,29 +5,32 @@ import { environment } from 'src/environments/environment';
import
{
Bu3Model
}
from
'../model/bu3.model'
;
import
{
AlertModel
}
from
'../model/alert.model'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
Bu3Service
{
api
=
"/bu3"
urlApi
=
environment
.
baseUrl
+
this
.
api
constructor
(
private
http
:
HttpClient
)
{
}
getById
(
bu3id
:
string
):
Observable
<
Bu3Model
>
{
return
this
.
http
.
get
<
Bu3Model
>
(
this
.
urlApi
+
"/"
+
bu3id
)
}
getList
():
Observable
<
Bu3Model
[]
>
{
return
this
.
http
.
get
<
Bu3Model
[]
>
(
this
.
urlApi
+
"/lists"
)
}
post
(
body
:
Bu3Model
):
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
,
body
)
}
delete
(
body
:
Bu3Model
[]):
Observable
<
AlertModel
>
{
const
options
=
{
headers
:
new
HttpHeaders
({
"Content-Type"
:
"application/json"
,
}),
body
:
body
};
return
this
.
http
.
delete
<
AlertModel
>
(
this
.
urlApi
,
options
)
}
}
\ No newline at end of file
providedIn
:
'root'
})
export
class
Bu3Service
{
api
=
"/bu3"
urlApi
=
environment
.
baseUrl
+
this
.
api
constructor
(
private
http
:
HttpClient
)
{
}
getById
(
bu3id
:
string
):
Observable
<
Bu3Model
>
{
return
this
.
http
.
get
<
Bu3Model
>
(
this
.
urlApi
+
"/"
+
bu3id
)
}
getListByParent
(
bu2id
:
string
):
Observable
<
Bu3Model
[]
>
{
return
this
.
http
.
get
<
Bu3Model
[]
>
(
environment
.
baseUrl
+
"/bu2/parent/"
+
bu2id
)
}
getList
():
Observable
<
Bu3Model
[]
>
{
return
this
.
http
.
get
<
Bu3Model
[]
>
(
this
.
urlApi
+
"/lists"
)
}
post
(
body
:
Bu3Model
):
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
,
body
)
}
delete
(
body
:
Bu3Model
[]):
Observable
<
AlertModel
>
{
const
options
=
{
headers
:
new
HttpHeaders
({
"Content-Type"
:
"application/json"
,
}),
body
:
body
};
return
this
.
http
.
delete
<
AlertModel
>
(
this
.
urlApi
,
options
)
}
}
\ No newline at end of file
src/app/shared/services/bu4.service.ts
View file @
0c259e86
...
...
@@ -15,6 +15,9 @@ export class Bu4Service {
getList
():
Observable
<
Bu4Model
[]
>
{
return
this
.
http
.
get
<
Bu4Model
[]
>
(
this
.
urlApi
+
"/lists"
)
}
getListByParent
(
bu3id
:
string
):
Observable
<
Bu4Model
[]
>
{
return
this
.
http
.
get
<
Bu4Model
[]
>
(
environment
.
baseUrl
+
"/bu3/parent/"
+
bu3id
)
}
getById
(
bu4id
:
string
):
Observable
<
Bu4Model
>
{
return
this
.
http
.
get
<
Bu4Model
>
(
this
.
urlApi
+
"/"
+
bu4id
)
}
...
...
src/app/shared/services/bu5.service.ts
View file @
0c259e86
...
...
@@ -5,29 +5,32 @@ import { environment } from 'src/environments/environment';
import
{
Bu5Model
}
from
'../model/bu5.model'
;
import
{
AlertModel
}
from
'../model/alert.model'
;
@
Injectable
({
providedIn
:
'root'
providedIn
:
'root'
})
export
class
Bu5Service
{
api
=
"/bu5"
urlApi
=
environment
.
baseUrl
+
this
.
api
constructor
(
private
http
:
HttpClient
)
{
}
getList
():
Observable
<
Bu5Model
[]
>
{
return
this
.
http
.
get
<
Bu5Model
[]
>
(
this
.
urlApi
+
"/lists"
)
}
getById
(
bu5id
:
string
):
Observable
<
Bu5Model
>
{
return
this
.
http
.
get
<
Bu5Model
>
(
this
.
urlApi
+
"/"
+
bu5id
)
}
post
(
body
:
Bu5Model
):
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
,
body
)
}
delete
(
body
:
Bu5Model
[]):
Observable
<
AlertModel
>
{
const
options
=
{
headers
:
new
HttpHeaders
({
"Content-Type"
:
"application/json"
,
}),
body
:
body
};
return
this
.
http
.
delete
<
AlertModel
>
(
this
.
urlApi
,
options
)
}
api
=
"/bu5"
urlApi
=
environment
.
baseUrl
+
this
.
api
constructor
(
private
http
:
HttpClient
)
{
}
getList
():
Observable
<
Bu5Model
[]
>
{
return
this
.
http
.
get
<
Bu5Model
[]
>
(
this
.
urlApi
+
"/lists"
)
}
getListByParent
(
bu4id
:
string
):
Observable
<
Bu5Model
[]
>
{
return
this
.
http
.
get
<
Bu5Model
[]
>
(
environment
.
baseUrl
+
"/bu4/parent/"
+
bu4id
)
}
getById
(
bu5id
:
string
):
Observable
<
Bu5Model
>
{
return
this
.
http
.
get
<
Bu5Model
>
(
this
.
urlApi
+
"/"
+
bu5id
)
}
post
(
body
:
Bu5Model
):
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
,
body
)
}
delete
(
body
:
Bu5Model
[]):
Observable
<
AlertModel
>
{
const
options
=
{
headers
:
new
HttpHeaders
({
"Content-Type"
:
"application/json"
,
}),
body
:
body
};
return
this
.
http
.
delete
<
AlertModel
>
(
this
.
urlApi
,
options
)
}
}
src/app/shared/services/bu6.service.ts
View file @
0c259e86
...
...
@@ -15,6 +15,9 @@ export class Bu6Service {
getList
():
Observable
<
Bu6Model
[]
>
{
return
this
.
http
.
get
<
Bu6Model
[]
>
(
this
.
urlApi
+
"/lists"
)
}
getListByParent
(
bu5id
:
string
):
Observable
<
Bu6Model
[]
>
{
return
this
.
http
.
get
<
Bu6Model
[]
>
(
environment
.
baseUrl
+
"/bu5/parent/"
+
bu5id
)
}
getById
(
bu6id
:
string
):
Observable
<
Bu6Model
>
{
return
this
.
http
.
get
<
Bu6Model
>
(
this
.
urlApi
+
"/"
+
bu6id
)
}
...
...
src/app/shared/services/bu7.service.ts
View file @
0c259e86
...
...
@@ -15,8 +15,11 @@ export class Bu7Service {
getList
():
Observable
<
Bu7Model
[]
>
{
return
this
.
http
.
get
<
Bu7Model
[]
>
(
this
.
urlApi
+
"/lists"
)
}
getListByParent
(
bu6id
:
string
):
Observable
<
Bu7Model
[]
>
{
return
this
.
http
.
get
<
Bu7Model
[]
>
(
environment
.
baseUrl
+
"/parent/"
+
bu6id
)
}
getById
(
bu7id
:
string
):
Observable
<
Bu7Model
>
{
return
this
.
http
.
get
<
Bu7Model
>
(
this
.
urlApi
+
"
/"
+
bu7id
)
return
this
.
http
.
get
<
Bu7Model
>
(
environment
.
baseUrl
+
"/bu6
/"
+
bu7id
)
}
post
(
body
:
Bu7Model
):
Observable
<
AlertModel
>
{
return
this
.
http
.
post
<
AlertModel
>
(
this
.
urlApi
,
body
)
...
...
src/assets/css/style.css
View file @
0c259e86
...
...
@@ -25033,3 +25033,7 @@ div:where(.swal2-container) div:where(.swal2-validation-message) {
.
\
!
border-red
{
border-color
:
red
!important
;
}
.
\
!
bg-white
{
background-color
:
white
;
}
\ No newline at end of file
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