Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
myAppraisal
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
myAppraisal
Commits
9d97a7d6
Commit
9d97a7d6
authored
Feb 13, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ส่วนย่อย2
parent
8dc83645
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
15 deletions
+24
-15
sub-department-three.component.ts
...it/sub-department-three/sub-department-three.component.ts
+1
-1
sub-department-two.component.html
...unit/sub-department-two/sub-department-two.component.html
+0
-0
sub-department-two.component.ts
...s-unit/sub-department-two/sub-department-two.component.ts
+17
-8
bu5.model.ts
src/app/shared/model/bu5.model.ts
+6
-6
No files found.
src/app/components/company-components/company-registration/branch-business-unit/sub-department-three/sub-department-three.component.ts
View file @
9d97a7d6
...
...
@@ -35,7 +35,7 @@ export class SubDepartmentThreeComponent implements OnInit {
search
:
""
}
bu5List
:
Bu5Model
[]
=
[]
bu5
:
Bu5Model
=
new
MyBu5Model
(
{}
)
bu5
:
Bu5Model
=
new
MyBu5Model
()
bu5Modal
:
table
=
{
currentPage
:
1
,
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
),
...
...
src/app/components/company-components/company-registration/branch-business-unit/sub-department-two/sub-department-two.component.html
View file @
9d97a7d6
This diff is collapsed.
Click to expand it.
src/app/components/company-components/company-registration/branch-business-unit/sub-department-two/sub-department-two.component.ts
View file @
9d97a7d6
...
...
@@ -18,7 +18,7 @@ interface table {
export
class
SubDepartmentTwoComponent
implements
OnInit
{
bu5List
:
Bu5Model
[]
=
[]
bu5ListLoading
=
false
bu5
:
Bu5Model
=
new
MyBu5Model
(
{}
)
bu5
:
Bu5Model
=
new
MyBu5Model
()
bu5Table
:
table
=
{
currentPage
:
1
,
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
),
...
...
@@ -40,7 +40,7 @@ export class SubDepartmentTwoComponent implements OnInit {
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
),
search
:
""
}
currentModal
=
"
"
currentModal
:
'add'
|
'edit'
|
'delete'
=
"add
"
constructor
(
private
bu5Service
:
Bu5Service
,
private
bu4Service
:
Bu4Service
,
private
toastr
:
ToastrService
,
...
...
@@ -64,6 +64,7 @@ export class SubDepartmentTwoComponent implements OnInit {
}
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
bu5ListLoading
=
true
this
.
fileService
.
upload
(
formData
,
'mbu5'
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
...
...
@@ -71,9 +72,11 @@ export class SubDepartmentTwoComponent implements OnInit {
this
.
getBu5List
()
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
bu5ListLoading
=
false
}
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
bu5ListLoading
=
false
}
})
}
...
...
@@ -117,8 +120,8 @@ export class SubDepartmentTwoComponent implements OnInit {
}
filterBu5Table
()
{
return
this
.
bu5List
.
filter
(
x
=>
x
.
bu5id
.
toLowerCase
().
includes
(
this
.
bu5Table
.
search
.
toLowerCase
())
||
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
bu5Table
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
bu5Table
.
search
.
toLowerCase
()))
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
bu5Table
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
bu5Table
.
search
.
toLowerCase
()))
}
selectBu5
(
bu5
?:
Bu5Model
)
{
this
.
bu5
=
new
MyBu5Model
(
bu5
||
{})
...
...
@@ -140,10 +143,11 @@ export class SubDepartmentTwoComponent implements OnInit {
}
filterBu5Modal
()
{
return
this
.
bu5List
.
filter
(
x
=>
x
.
bu5id
.
toLowerCase
().
includes
(
this
.
bu5Modal
.
search
.
toLowerCase
())
||
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
bu5Modal
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
bu5Modal
.
search
.
toLowerCase
()))
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
bu5Modal
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
bu5Modal
.
search
.
toLowerCase
()))
}
addBu5
()
{
this
.
bu5ListLoading
=
true
this
.
bu5Service
.
post
({
...
this
.
bu5
,
parent
:
this
.
bu4
.
bu4id
}).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
...
...
@@ -151,13 +155,16 @@ export class SubDepartmentTwoComponent implements OnInit {
this
.
getBu5List
()
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
bu5ListLoading
=
false
}
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
bu5ListLoading
=
false
}
})
}
deleteBu5
()
{
this
.
bu5ListLoading
=
true
this
.
bu5Service
.
delete
(
this
.
bu5
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
...
...
@@ -165,9 +172,11 @@ export class SubDepartmentTwoComponent implements OnInit {
this
.
getBu5List
()
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
bu5ListLoading
=
false
}
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
bu5ListLoading
=
false
}
})
}
...
...
@@ -188,8 +197,8 @@ export class SubDepartmentTwoComponent implements OnInit {
}
filterBu4Modal
()
{
return
this
.
bu4List
.
filter
(
x
=>
x
.
bu4id
.
toLowerCase
().
includes
(
this
.
bu4Modal
.
search
.
toLowerCase
())
||
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
bu4Modal
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
bu4Modal
.
search
.
toLowerCase
()))
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
bu4Modal
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
bu4Modal
.
search
.
toLowerCase
()))
}
selectBu4
(
bu4
?:
Bu4Model
)
{
this
.
bu4
=
new
MyBu4Model
(
bu4
||
{})
...
...
src/app/shared/model/bu5.model.ts
View file @
9d97a7d6
...
...
@@ -13,12 +13,12 @@ export class MyBu5Model implements Bu5Model {
edesc
:
string
;
parent
:
string
;
companyId
:
string
;
constructor
(
data
:
Partial
<
Bu5Model
>
)
{
this
.
bu5id
=
data
.
bu5id
||
""
this
.
tdesc
=
data
.
tdesc
||
""
this
.
edesc
=
data
.
edesc
||
""
this
.
parent
=
data
.
parent
||
""
this
.
companyId
=
data
.
companyId
||
""
constructor
(
data
?
:
Partial
<
Bu5Model
>
)
{
this
.
bu5id
=
data
?
.
bu5id
||
""
this
.
tdesc
=
data
?
.
tdesc
||
""
this
.
edesc
=
data
?
.
edesc
||
""
this
.
parent
=
data
?
.
parent
||
""
this
.
companyId
=
data
?
.
companyId
||
""
}
}
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