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
a50525e9
Commit
a50525e9
authored
Feb 13, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ทะเบียนส่วนย่อย1
parent
fde0c870
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
29 additions
and
18 deletions
+29
-18
department-list.component.html
...iness-unit/department-list/department-list.component.html
+2
-1
department-register.component.html
...it/department-register/department-register.component.html
+2
-1
section-registration.component.html
.../section-registration/section-registration.component.html
+1
-1
sub-department-one.component.html
...unit/sub-department-one/sub-department-one.component.html
+0
-0
sub-department-one.component.ts
...s-unit/sub-department-one/sub-department-one.component.ts
+17
-8
sub-department-two.component.ts
...s-unit/sub-department-two/sub-department-two.component.ts
+1
-1
bu4.model.ts
src/app/shared/model/bu4.model.ts
+6
-6
No files found.
src/app/components/company-components/company-registration/branch-business-unit/department-list/department-list.component.html
View file @
a50525e9
...
...
@@ -4,7 +4,8 @@
<!-- Content ของ div แรก -->
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-secondary h-20px m-0 shadow-md"
data-hs-overlay=
"#department-list-upload-modal"
(
click
)="
selectedFile=
null;selectedFileName
=
'กรุณาเลือกไฟล์'"
>
data-hs-overlay=
"#department-list-upload-modal"
(
click
)="
fileInput
.
value =
''
;
selectedFile=
null;selectedFileName
=
'กรุณาเลือกไฟล์'"
>
<i
class=
"ri-add-line"
></i>
นำเข้าข้อมูล
</button>
...
...
src/app/components/company-components/company-registration/branch-business-unit/department-register/department-register.component.html
View file @
a50525e9
...
...
@@ -3,7 +3,8 @@
<div
class=
"flex pr-2"
>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-secondary h-20px m-0 shadow-md"
data-hs-overlay=
"#department-register-upload-modal"
(
click
)="
selectedFile=
null;selectedFileName
=
'กรุณาเลือกไฟล์'"
>
data-hs-overlay=
"#department-register-upload-modal"
(
click
)="
fileInput
.
value =
''
;
selectedFile=
null;selectedFileName
=
'กรุณาเลือกไฟล์'"
>
<i
class=
"ri-add-line"
></i>
นำเข้าข้อมูล
</button>
...
...
src/app/components/company-components/company-registration/branch-business-unit/section-registration/section-registration.component.html
View file @
a50525e9
...
...
@@ -3,7 +3,7 @@
<div
class=
"flex pr-2"
>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-secondary h-20px m-0 shadow-md"
data-hs-overlay=
"#section-registration-upload-modal"
(
click
)="
selectedFile=
null;selectedFileName
=
'กรุณาเลือกไฟล์'"
>
data-hs-overlay=
"#section-registration-upload-modal"
(
click
)="
fileInput
.
value =
''
;
selectedFile=
null;selectedFileName
=
'กรุณาเลือกไฟล์'"
>
<i
class=
"ri-add-line"
></i>
นำเข้าข้อมูล
</button>
...
...
src/app/components/company-components/company-registration/branch-business-unit/sub-department-one/sub-department-one.component.html
View file @
a50525e9
This diff is collapsed.
Click to expand it.
src/app/components/company-components/company-registration/branch-business-unit/sub-department-one/sub-department-one.component.ts
View file @
a50525e9
...
...
@@ -18,7 +18,7 @@ interface table {
export
class
SubDepartmentOneComponent
implements
OnInit
{
bu4List
:
Bu4Model
[]
=
[]
bu4ListLoading
=
false
bu4
:
Bu4Model
=
new
MyBu4Model
(
{}
)
bu4
:
Bu4Model
=
new
MyBu4Model
()
bu4Table
:
table
=
{
currentPage
:
1
,
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
),
...
...
@@ -40,7 +40,7 @@ export class SubDepartmentOneComponent implements OnInit {
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
),
search
:
""
}
currentModal
=
"
"
currentModal
:
'add'
|
'edit'
|
'delete'
=
"add
"
constructor
(
private
bu4Service
:
Bu4Service
,
private
bu3Service
:
Bu3Service
,
private
toastr
:
ToastrService
,
...
...
@@ -65,6 +65,7 @@ export class SubDepartmentOneComponent implements OnInit {
}
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
bu4ListLoading
=
true
this
.
fileService
.
upload
(
formData
,
'mbu4'
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
...
...
@@ -72,9 +73,11 @@ export class SubDepartmentOneComponent implements OnInit {
this
.
getBu4List
()
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
bu4ListLoading
=
false
}
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
bu4ListLoading
=
false
}
})
}
...
...
@@ -117,8 +120,8 @@ export class SubDepartmentOneComponent implements OnInit {
}
filterBu4Table
()
{
return
this
.
bu4List
.
filter
(
x
=>
x
.
bu4id
.
toLowerCase
().
includes
(
this
.
bu4Table
.
search
.
toLowerCase
())
||
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
bu4Table
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
bu4Table
.
search
.
toLowerCase
()))
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
bu4Table
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
bu4Table
.
search
.
toLowerCase
()))
}
selectBu4
(
bu4
?:
Bu4Model
)
{
this
.
bu4
=
new
MyBu4Model
(
bu4
||
{})
...
...
@@ -140,10 +143,11 @@ export class SubDepartmentOneComponent 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
()))
}
addBu4
()
{
this
.
bu4ListLoading
=
true
this
.
bu4Service
.
post
({
...
this
.
bu4
,
parent
:
this
.
bu3
.
bu3id
}).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
...
...
@@ -151,13 +155,16 @@ export class SubDepartmentOneComponent implements OnInit {
this
.
getBu4List
()
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
bu4ListLoading
=
false
}
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
bu4ListLoading
=
false
}
})
}
deleteBu4
()
{
this
.
bu4ListLoading
=
true
this
.
bu4Service
.
delete
(
this
.
bu4
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
...
...
@@ -165,9 +172,11 @@ export class SubDepartmentOneComponent implements OnInit {
this
.
getBu4List
()
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
bu4ListLoading
=
false
}
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
bu4ListLoading
=
false
}
})
}
...
...
@@ -188,8 +197,8 @@ export class SubDepartmentOneComponent implements OnInit {
}
filterBu3Modal
()
{
return
this
.
bu3List
.
filter
(
x
=>
x
.
bu3id
.
toLowerCase
().
includes
(
this
.
bu3Modal
.
search
.
toLowerCase
())
||
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
bu3Modal
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
bu3Modal
.
search
.
toLowerCase
()))
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
bu3Modal
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
bu3Modal
.
search
.
toLowerCase
()))
}
selectBu3
(
bu3
?:
Bu3Model
)
{
this
.
bu3
=
new
MyBu3Model
(
bu3
||
{})
...
...
src/app/components/company-components/company-registration/branch-business-unit/sub-department-two/sub-department-two.component.ts
View file @
a50525e9
...
...
@@ -34,7 +34,7 @@ export class SubDepartmentTwoComponent implements OnInit {
search
:
""
}
bu4List
:
Bu4Model
[]
=
[]
bu4
:
Bu4Model
=
new
MyBu4Model
(
{}
)
bu4
:
Bu4Model
=
new
MyBu4Model
()
bu4Modal
:
table
=
{
currentPage
:
1
,
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
),
...
...
src/app/shared/model/bu4.model.ts
View file @
a50525e9
...
...
@@ -13,12 +13,12 @@ export class MyBu4Model implements Bu4Model {
edesc
:
string
;
parent
:
string
;
companyId
:
string
;
constructor
(
data
:
Partial
<
Bu4Model
>
)
{
this
.
bu4id
=
data
.
bu4id
||
""
this
.
tdesc
=
data
.
tdesc
||
""
this
.
edesc
=
data
.
edesc
||
""
this
.
parent
=
data
.
parent
||
""
this
.
companyId
=
data
.
companyId
||
""
constructor
(
data
?
:
Partial
<
Bu4Model
>
)
{
this
.
bu4id
=
data
?
.
bu4id
||
""
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