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
aa4afe9f
Commit
aa4afe9f
authored
Feb 13, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ทะเบียนส่วน
parent
789d0100
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
73 additions
and
48 deletions
+73
-48
department-list.component.html
...iness-unit/department-list/department-list.component.html
+4
-6
department-list.component.ts
...usiness-unit/department-list/department-list.component.ts
+12
-3
department-register.component.ts
...unit/department-register/department-register.component.ts
+8
-3
section-registration.component.html
.../section-registration/section-registration.component.html
+0
-0
section-registration.component.ts
...it/section-registration/section-registration.component.ts
+28
-19
sub-department-one.component.ts
...s-unit/sub-department-one/sub-department-one.component.ts
+1
-1
header.component.html
src/app/shared/components/header/header.component.html
+1
-1
header.component.ts
src/app/shared/components/header/header.component.ts
+7
-3
bu2.model.ts
src/app/shared/model/bu2.model.ts
+6
-6
bu3.model.ts
src/app/shared/model/bu3.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 @
aa4afe9f
...
@@ -210,10 +210,8 @@
...
@@ -210,10 +210,8 @@
</div>
</div>
<label
class=
"ti-form-label mt-2rem"
>
เเผนก*
</label>
<label
class=
"ti-form-label mt-2rem"
>
เเผนก*
</label>
<div
class=
"relative flex rounded-md w-1/2"
>
<div
class=
"relative flex rounded-md w-1/2"
>
<input
type=
"text"
id=
"detail_th"
class=
"ti-form-input h-16"
[(
ngModel
)]="
bu2
.
bu2id
"
>
<input
type=
"text"
class=
"ti-form-input h-16"
[(
ngModel
)]="
bu2
.
bu2id
"
>
</div>
<!-- <input type="text" id="hs-leading-button-add-on-with-icon-and-button" name="hs-leading-button-add-on-with-icon-and-button" class="ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10" style="padding-right: 3.5rem;"
<!-- <div class="relative flex rounded-md w-1/2">
<input type="text" id="hs-leading-button-add-on-with-icon-and-button" name="hs-leading-button-add-on-with-icon-and-button" class="ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10" style="padding-right: 3.5rem;"
[(ngModel)]="bu2.bu2id" (ngModelChange)="bu2idChange()">
[(ngModel)]="bu2.bu2id" (ngModelChange)="bu2idChange()">
<div class="absolute inset-y-0 ltr:right-0 rtl:left-0 flex items-center z-20 ltr:pr-4 rtl:pl-4 space-x-2">
<div class="absolute inset-y-0 ltr:right-0 rtl:left-0 flex items-center z-20 ltr:pr-4 rtl:pl-4 space-x-2">
<button type="button" class="flex items-center text-red-500" (click)="selectBu2()">
<button type="button" class="flex items-center text-red-500" (click)="selectBu2()">
...
@@ -222,8 +220,8 @@
...
@@ -222,8 +220,8 @@
<button type="button" class="flex items-center text-gray-500 dark:text-white/70" data-hs-overlay="#department-list-bu2-table-modal">
<button type="button" class="flex items-center text-gray-500 dark:text-white/70" data-hs-overlay="#department-list-bu2-table-modal">
<i class="ri-search-line cursor-pointer text-gray"></i>
<i class="ri-search-line cursor-pointer text-gray"></i>
</button>
</button>
</div>
</div>
-->
</div>
-->
</div>
<label
for=
"detail_th"
class=
"ti-form-label mt-2rem"
>
รายละเอียดแผนก (ไทย)*
</label>
<label
for=
"detail_th"
class=
"ti-form-label mt-2rem"
>
รายละเอียดแผนก (ไทย)*
</label>
<input
type=
"text"
id=
"detail_th"
class=
"ti-form-input h-16"
[(
ngModel
)]="
bu2
.
tdesc
"
>
<input
type=
"text"
id=
"detail_th"
class=
"ti-form-input h-16"
[(
ngModel
)]="
bu2
.
tdesc
"
>
<label
for=
"detail_eng"
class=
"ti-form-label mt-2rem"
>
รายละเอียดแผนก (อังกฤษ)
</label>
<label
for=
"detail_eng"
class=
"ti-form-label mt-2rem"
>
รายละเอียดแผนก (อังกฤษ)
</label>
...
...
src/app/components/company-components/company-registration/branch-business-unit/department-list/department-list.component.ts
View file @
aa4afe9f
...
@@ -18,7 +18,7 @@ interface table {
...
@@ -18,7 +18,7 @@ interface table {
export
class
DepartmentListComponent
implements
OnInit
{
export
class
DepartmentListComponent
implements
OnInit
{
bu2List
:
Bu2Model
[]
=
[]
bu2List
:
Bu2Model
[]
=
[]
bu2ListLoading
=
false
bu2ListLoading
=
false
bu2
:
Bu2Model
=
new
MyBu2Model
(
{}
)
bu2
:
Bu2Model
=
new
MyBu2Model
()
bu2Table
:
table
=
{
bu2Table
:
table
=
{
currentPage
:
1
,
currentPage
:
1
,
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
),
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
),
...
@@ -64,6 +64,7 @@ export class DepartmentListComponent implements OnInit {
...
@@ -64,6 +64,7 @@ export class DepartmentListComponent implements OnInit {
}
}
const
formData
=
new
FormData
();
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
bu2ListLoading
=
true
this
.
fileService
.
upload
(
formData
,
'mbu2'
).
subscribe
({
this
.
fileService
.
upload
(
formData
,
'mbu2'
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
...
@@ -71,9 +72,11 @@ export class DepartmentListComponent implements OnInit {
...
@@ -71,9 +72,11 @@ export class DepartmentListComponent implements OnInit {
this
.
getBu2List
()
this
.
getBu2List
()
}
else
{
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
bu2ListLoading
=
false
}
}
},
error
:
error
=>
{
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
bu2ListLoading
=
false
}
}
})
})
}
}
...
@@ -121,7 +124,7 @@ export class DepartmentListComponent implements OnInit {
...
@@ -121,7 +124,7 @@ export class DepartmentListComponent implements OnInit {
x
.
edesc
.
toLowerCase
().
includes
(
this
.
bu2Table
.
search
.
toLowerCase
()))
x
.
edesc
.
toLowerCase
().
includes
(
this
.
bu2Table
.
search
.
toLowerCase
()))
}
}
selectBu2
(
bu2
?:
Bu2Model
)
{
selectBu2
(
bu2
?:
Bu2Model
)
{
this
.
bu2
=
new
MyBu2Model
(
bu2
||
{}
)
this
.
bu2
=
new
MyBu2Model
(
bu2
)
this
.
selectBu1
()
this
.
selectBu1
()
if
(
this
.
bu2
.
parent
)
{
if
(
this
.
bu2
.
parent
)
{
this
.
bu1Service
.
getById
(
this
.
bu2
.
parent
).
subscribe
(
response
=>
{
this
.
bu1Service
.
getById
(
this
.
bu2
.
parent
).
subscribe
(
response
=>
{
...
@@ -165,7 +168,7 @@ export class DepartmentListComponent implements OnInit {
...
@@ -165,7 +168,7 @@ export class DepartmentListComponent implements OnInit {
x
.
edesc
.
toLowerCase
().
includes
(
this
.
bu1Modal
.
search
.
toLowerCase
()))
x
.
edesc
.
toLowerCase
().
includes
(
this
.
bu1Modal
.
search
.
toLowerCase
()))
}
}
selectBu1
(
bu1
?:
Bu1Model
)
{
selectBu1
(
bu1
?:
Bu1Model
)
{
this
.
bu1
=
new
MyBu1Model
(
bu1
||
{}
)
this
.
bu1
=
new
MyBu1Model
(
bu1
)
}
}
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
...
@@ -175,6 +178,7 @@ export class DepartmentListComponent implements OnInit {
...
@@ -175,6 +178,7 @@ export class DepartmentListComponent implements OnInit {
})
})
}
}
addBu2
()
{
addBu2
()
{
this
.
bu2ListLoading
=
true
this
.
bu2Service
.
post
({
...
this
.
bu2
,
parent
:
this
.
bu1
.
bu1id
}).
subscribe
({
this
.
bu2Service
.
post
({
...
this
.
bu2
,
parent
:
this
.
bu1
.
bu1id
}).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
...
@@ -182,13 +186,16 @@ export class DepartmentListComponent implements OnInit {
...
@@ -182,13 +186,16 @@ export class DepartmentListComponent implements OnInit {
this
.
getBu2List
()
this
.
getBu2List
()
}
else
{
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
bu2ListLoading
=
false
}
}
},
error
:
error
=>
{
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
bu2ListLoading
=
false
}
}
})
})
}
}
deleteBu2
()
{
deleteBu2
()
{
this
.
bu2ListLoading
=
true
this
.
bu2Service
.
delete
(
this
.
bu2
).
subscribe
({
this
.
bu2Service
.
delete
(
this
.
bu2
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
...
@@ -196,9 +203,11 @@ export class DepartmentListComponent implements OnInit {
...
@@ -196,9 +203,11 @@ export class DepartmentListComponent implements OnInit {
this
.
getBu2List
()
this
.
getBu2List
()
}
else
{
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
bu2ListLoading
=
false
}
}
},
error
:
error
=>
{
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
bu2ListLoading
=
false
}
}
})
})
}
}
...
...
src/app/components/company-components/company-registration/branch-business-unit/department-register/department-register.component.ts
View file @
aa4afe9f
...
@@ -41,6 +41,7 @@ export class DepartmentRegisterComponent implements OnInit {
...
@@ -41,6 +41,7 @@ export class DepartmentRegisterComponent implements OnInit {
}
}
const
formData
=
new
FormData
();
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
bu1ListLoading
=
true
this
.
fileService
.
upload
(
formData
,
'mbu1'
).
subscribe
({
this
.
fileService
.
upload
(
formData
,
'mbu1'
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
...
@@ -48,9 +49,11 @@ export class DepartmentRegisterComponent implements OnInit {
...
@@ -48,9 +49,11 @@ export class DepartmentRegisterComponent implements OnInit {
this
.
getBu1List
()
this
.
getBu1List
()
}
else
{
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
bu1ListLoading
=
false
}
}
},
error
:
error
=>
{
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
bu1ListLoading
=
false
}
}
})
})
}
}
...
@@ -99,7 +102,7 @@ export class DepartmentRegisterComponent implements OnInit {
...
@@ -99,7 +102,7 @@ export class DepartmentRegisterComponent implements OnInit {
x
.
edesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
()))
x
.
edesc
.
toLowerCase
().
includes
(
this
.
search
.
toLowerCase
()))
}
}
selectBu1
(
bu1
?:
Bu1Model
)
{
selectBu1
(
bu1
?:
Bu1Model
)
{
this
.
bu1
=
new
MyBu1Model
(
bu1
||
{}
)
this
.
bu1
=
new
MyBu1Model
(
bu1
)
}
}
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
...
@@ -117,10 +120,11 @@ export class DepartmentRegisterComponent implements OnInit {
...
@@ -117,10 +120,11 @@ export class DepartmentRegisterComponent implements OnInit {
this
.
getBu1List
()
this
.
getBu1List
()
}
else
{
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
bu1ListLoading
=
false
}
}
},
error
:
error
=>
{
},
error
:
error
=>
{
this
.
bu1ListLoading
=
false
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
bu1ListLoading
=
false
}
}
})
})
}
}
...
@@ -133,10 +137,11 @@ export class DepartmentRegisterComponent implements OnInit {
...
@@ -133,10 +137,11 @@ export class DepartmentRegisterComponent implements OnInit {
this
.
getBu1List
()
this
.
getBu1List
()
}
else
{
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
bu1ListLoading
=
false
}
}
},
error
:
error
=>
{
},
error
:
error
=>
{
this
.
bu1ListLoading
=
false
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
bu1ListLoading
=
false
}
}
})
})
}
}
...
...
src/app/components/company-components/company-registration/branch-business-unit/section-registration/section-registration.component.html
View file @
aa4afe9f
This diff is collapsed.
Click to expand it.
src/app/components/company-components/company-registration/branch-business-unit/section-registration/section-registration.component.ts
View file @
aa4afe9f
...
@@ -18,7 +18,7 @@ interface table {
...
@@ -18,7 +18,7 @@ interface table {
export
class
SectionRegistrationComponent
implements
OnInit
{
export
class
SectionRegistrationComponent
implements
OnInit
{
bu3List
:
Bu3Model
[]
=
[]
bu3List
:
Bu3Model
[]
=
[]
bu3ListLoading
=
false
bu3ListLoading
=
false
bu3
:
Bu3Model
=
new
MyBu3Model
(
{}
)
bu3
:
Bu3Model
=
new
MyBu3Model
()
bu3Table
:
table
=
{
bu3Table
:
table
=
{
currentPage
:
1
,
currentPage
:
1
,
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
),
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
),
...
@@ -34,13 +34,13 @@ export class SectionRegistrationComponent implements OnInit {
...
@@ -34,13 +34,13 @@ export class SectionRegistrationComponent implements OnInit {
search
:
""
search
:
""
}
}
bu2List
:
Bu2Model
[]
=
[]
bu2List
:
Bu2Model
[]
=
[]
bu2
:
Bu2Model
=
new
MyBu2Model
(
{}
)
bu2
:
Bu2Model
=
new
MyBu2Model
()
bu2Modal
:
table
=
{
bu2Modal
:
table
=
{
currentPage
:
1
,
currentPage
:
1
,
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
),
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
),
search
:
""
search
:
""
}
}
currentModal
=
"
"
currentModal
:
'add'
|
'edit'
|
'delete'
=
"add
"
constructor
(
private
bu3Service
:
Bu3Service
,
constructor
(
private
bu3Service
:
Bu3Service
,
private
bu2Service
:
Bu2Service
,
private
bu2Service
:
Bu2Service
,
private
toastr
:
ToastrService
,
private
toastr
:
ToastrService
,
...
@@ -65,6 +65,7 @@ export class SectionRegistrationComponent implements OnInit {
...
@@ -65,6 +65,7 @@ export class SectionRegistrationComponent implements OnInit {
}
}
const
formData
=
new
FormData
();
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
bu3ListLoading
=
true
this
.
fileService
.
upload
(
formData
,
'mbu3'
).
subscribe
({
this
.
fileService
.
upload
(
formData
,
'mbu3'
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
...
@@ -72,9 +73,11 @@ export class SectionRegistrationComponent implements OnInit {
...
@@ -72,9 +73,11 @@ export class SectionRegistrationComponent implements OnInit {
this
.
getBu3List
()
this
.
getBu3List
()
}
else
{
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
bu3ListLoading
=
false
}
}
},
error
:
error
=>
{
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
bu3ListLoading
=
false
}
}
})
})
}
}
...
@@ -102,14 +105,14 @@ export class SectionRegistrationComponent implements OnInit {
...
@@ -102,14 +105,14 @@ export class SectionRegistrationComponent implements OnInit {
this
.
bu3ListLoading
=
true
this
.
bu3ListLoading
=
true
this
.
bu3Service
.
getList
().
subscribe
({
this
.
bu3Service
.
getList
().
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
this
.
bu3List
=
response
this
.
bu3List
=
response
this
.
bu3ListLoading
=
false
this
.
bu3ListLoading
=
false
this
.
onBu3TableSearchChange
()
this
.
onBu3TableSearchChange
()
this
.
cdr
.
detectChanges
()
this
.
cdr
.
detectChanges
()
},
error
:
error
=>
{
},
error
:
error
=>
{
this
.
bu3ListLoading
=
false
this
.
bu3ListLoading
=
false
this
.
cdr
.
detectChanges
()
this
.
cdr
.
detectChanges
()
}
}
})
})
}
}
onBu3TableSearchChange
()
{
onBu3TableSearchChange
()
{
...
@@ -118,11 +121,11 @@ export class SectionRegistrationComponent implements OnInit {
...
@@ -118,11 +121,11 @@ export class SectionRegistrationComponent implements OnInit {
}
}
filterBu3Table
()
{
filterBu3Table
()
{
return
this
.
bu3List
.
filter
(
x
=>
x
.
bu3id
.
toLowerCase
().
includes
(
this
.
bu3Table
.
search
.
toLowerCase
())
||
return
this
.
bu3List
.
filter
(
x
=>
x
.
bu3id
.
toLowerCase
().
includes
(
this
.
bu3Table
.
search
.
toLowerCase
())
||
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
bu3Table
.
search
.
toLowerCase
())
||
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
bu3Table
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
bu3Table
.
search
.
toLowerCase
()))
x
.
edesc
.
toLowerCase
().
includes
(
this
.
bu3Table
.
search
.
toLowerCase
()))
}
}
selectBu3
(
bu3
?:
Bu3Model
)
{
selectBu3
(
bu3
?:
Bu3Model
)
{
this
.
bu3
=
new
MyBu3Model
(
bu3
||
{}
)
this
.
bu3
=
new
MyBu3Model
(
bu3
)
this
.
selectBu2
()
this
.
selectBu2
()
if
(
this
.
bu3
.
parent
)
{
if
(
this
.
bu3
.
parent
)
{
this
.
bu2Service
.
getById
(
this
.
bu3
.
parent
).
subscribe
(
response
=>
{
this
.
bu2Service
.
getById
(
this
.
bu3
.
parent
).
subscribe
(
response
=>
{
...
@@ -141,10 +144,11 @@ export class SectionRegistrationComponent implements OnInit {
...
@@ -141,10 +144,11 @@ export class SectionRegistrationComponent implements OnInit {
}
}
filterBu3Modal
()
{
filterBu3Modal
()
{
return
this
.
bu3List
.
filter
(
x
=>
x
.
bu3id
.
toLowerCase
().
includes
(
this
.
bu3Modal
.
search
.
toLowerCase
())
||
return
this
.
bu3List
.
filter
(
x
=>
x
.
bu3id
.
toLowerCase
().
includes
(
this
.
bu3Modal
.
search
.
toLowerCase
())
||
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
bu3Modal
.
search
.
toLowerCase
())
||
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
bu3Modal
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
bu3Modal
.
search
.
toLowerCase
()))
x
.
edesc
.
toLowerCase
().
includes
(
this
.
bu3Modal
.
search
.
toLowerCase
()))
}
}
addBu3
()
{
addBu3
()
{
this
.
bu3ListLoading
=
true
this
.
bu3Service
.
post
({
...
this
.
bu3
,
parent
:
this
.
bu2
.
bu2id
}).
subscribe
({
this
.
bu3Service
.
post
({
...
this
.
bu3
,
parent
:
this
.
bu2
.
bu2id
}).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
...
@@ -152,13 +156,16 @@ export class SectionRegistrationComponent implements OnInit {
...
@@ -152,13 +156,16 @@ export class SectionRegistrationComponent implements OnInit {
this
.
getBu3List
()
this
.
getBu3List
()
}
else
{
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
bu3ListLoading
=
false
}
}
},
error
:
error
=>
{
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
bu3ListLoading
=
false
}
}
})
})
}
}
deleteBu3
()
{
deleteBu3
()
{
this
.
bu3ListLoading
=
true
this
.
bu3Service
.
delete
(
this
.
bu3
).
subscribe
({
this
.
bu3Service
.
delete
(
this
.
bu3
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
...
@@ -166,9 +173,11 @@ export class SectionRegistrationComponent implements OnInit {
...
@@ -166,9 +173,11 @@ export class SectionRegistrationComponent implements OnInit {
this
.
getBu3List
()
this
.
getBu3List
()
}
else
{
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
bu3ListLoading
=
false
}
}
},
error
:
error
=>
{
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
bu3ListLoading
=
false
}
}
})
})
}
}
...
@@ -189,11 +198,11 @@ export class SectionRegistrationComponent implements OnInit {
...
@@ -189,11 +198,11 @@ export class SectionRegistrationComponent implements OnInit {
}
}
filterBu2Modal
()
{
filterBu2Modal
()
{
return
this
.
bu2List
.
filter
(
x
=>
x
.
bu2id
.
toLowerCase
().
includes
(
this
.
bu2Modal
.
search
.
toLowerCase
())
||
return
this
.
bu2List
.
filter
(
x
=>
x
.
bu2id
.
toLowerCase
().
includes
(
this
.
bu2Modal
.
search
.
toLowerCase
())
||
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
bu2Modal
.
search
.
toLowerCase
())
||
x
.
tdesc
.
toLowerCase
().
includes
(
this
.
bu2Modal
.
search
.
toLowerCase
())
||
x
.
edesc
.
toLowerCase
().
includes
(
this
.
bu2Modal
.
search
.
toLowerCase
()))
x
.
edesc
.
toLowerCase
().
includes
(
this
.
bu2Modal
.
search
.
toLowerCase
()))
}
}
selectBu2
(
bu2
?:
Bu2Model
)
{
selectBu2
(
bu2
?:
Bu2Model
)
{
this
.
bu2
=
new
MyBu2Model
(
bu2
||
{}
)
this
.
bu2
=
new
MyBu2Model
(
bu2
)
}
}
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
showAlert
(
text
:
string
,
type
:
'success'
|
'error'
)
{
...
...
src/app/components/company-components/company-registration/branch-business-unit/sub-department-one/sub-department-one.component.ts
View file @
aa4afe9f
...
@@ -34,7 +34,7 @@ export class SubDepartmentOneComponent implements OnInit {
...
@@ -34,7 +34,7 @@ export class SubDepartmentOneComponent implements OnInit {
search
:
""
search
:
""
}
}
bu3List
:
Bu3Model
[]
=
[]
bu3List
:
Bu3Model
[]
=
[]
bu3
:
Bu3Model
=
new
MyBu3Model
(
{}
)
bu3
:
Bu3Model
=
new
MyBu3Model
()
bu3Modal
:
table
=
{
bu3Modal
:
table
=
{
currentPage
:
1
,
currentPage
:
1
,
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
),
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
),
...
...
src/app/shared/components/header/header.component.html
View file @
aa4afe9f
...
@@ -742,7 +742,7 @@
...
@@ -742,7 +742,7 @@
<i
class=
"ti ti-wallet text-lg"
></i>
<i
class=
"ti ti-wallet text-lg"
></i>
Bal: $7,12,950
Bal: $7,12,950
</a>
</a>
<a
routerLink=
"/signin/basic
"
class=
"ti-dropdown-item"
>
<a
(
click
)="
logOut
()"
routerLink=
"/auth/login
"
class=
"ti-dropdown-item"
>
<i
class=
"ti ti-logout text-lg"
></i>
<i
class=
"ti ti-logout text-lg"
></i>
Log Out
Log Out
</a>
</a>
...
...
src/app/shared/components/header/header.component.ts
View file @
aa4afe9f
...
@@ -13,6 +13,10 @@ export class HeaderComponent {
...
@@ -13,6 +13,10 @@ export class HeaderComponent {
private
elementRef
:
ElementRef
)
{
private
elementRef
:
ElementRef
)
{
}
}
logOut
()
{
sessionStorage
.
clear
()
}
themeChange
(
type
:
string
,
type1
:
string
)
{
themeChange
(
type
:
string
,
type1
:
string
)
{
this
.
elementRef
.
nativeElement
.
ownerDocument
.
documentElement
?.
setAttribute
(
'class'
,
type
);
this
.
elementRef
.
nativeElement
.
ownerDocument
.
documentElement
?.
setAttribute
(
'class'
,
type
);
this
.
elementRef
.
nativeElement
.
ownerDocument
.
documentElement
?.
setAttribute
(
'style'
,
""
);
this
.
elementRef
.
nativeElement
.
ownerDocument
.
documentElement
?.
setAttribute
(
'style'
,
""
);
...
@@ -37,11 +41,11 @@ export class HeaderComponent {
...
@@ -37,11 +41,11 @@ export class HeaderComponent {
toggleSidebar
()
{
toggleSidebar
()
{
let
html
=
this
.
elementRef
.
nativeElement
.
ownerDocument
.
documentElement
;
let
html
=
this
.
elementRef
.
nativeElement
.
ownerDocument
.
documentElement
;
if
(
window
.
innerWidth
<=
992
)
{
if
(
window
.
innerWidth
<=
992
)
{
html
?.
setAttribute
(
'toggled'
,
html
?.
getAttribute
(
'toggled'
)
==
'open'
?
'close'
:
'open'
);
html
?.
setAttribute
(
'toggled'
,
html
?.
getAttribute
(
'toggled'
)
==
'open'
?
'close'
:
'open'
);
if
(
html
?.
getAttribute
(
'toggled'
)
==
'open'
)
{
if
(
html
?.
getAttribute
(
'toggled'
)
==
'open'
)
{
document
.
querySelector
(
'#responsive-overlay'
)?.
classList
.
add
(
'active'
);
document
.
querySelector
(
'#responsive-overlay'
)?.
classList
.
add
(
'active'
);
}
else
{
}
else
{
document
.
querySelector
(
'#responsive-overlay'
)?.
classList
.
remove
(
'active'
);
document
.
querySelector
(
'#responsive-overlay'
)?.
classList
.
remove
(
'active'
);
}
}
}
}
...
...
src/app/shared/model/bu2.model.ts
View file @
aa4afe9f
...
@@ -13,12 +13,12 @@ export class MyBu2Model implements Bu2Model {
...
@@ -13,12 +13,12 @@ export class MyBu2Model implements Bu2Model {
edesc
:
string
;
edesc
:
string
;
parent
:
string
;
parent
:
string
;
companyId
:
string
;
companyId
:
string
;
constructor
(
data
:
Partial
<
Bu2Model
>
)
{
constructor
(
data
?
:
Partial
<
Bu2Model
>
)
{
this
.
bu2id
=
data
.
bu2id
||
""
this
.
bu2id
=
data
?
.
bu2id
||
""
this
.
tdesc
=
data
.
tdesc
||
""
this
.
tdesc
=
data
?
.
tdesc
||
""
this
.
edesc
=
data
.
edesc
||
""
this
.
edesc
=
data
?
.
edesc
||
""
this
.
parent
=
data
.
parent
||
""
this
.
parent
=
data
?
.
parent
||
""
this
.
companyId
=
data
.
companyId
||
""
this
.
companyId
=
data
?
.
companyId
||
""
}
}
}
}
src/app/shared/model/bu3.model.ts
View file @
aa4afe9f
...
@@ -13,12 +13,12 @@ export class MyBu3Model implements Bu3Model {
...
@@ -13,12 +13,12 @@ export class MyBu3Model implements Bu3Model {
edesc
:
string
;
edesc
:
string
;
parent
:
string
;
parent
:
string
;
companyId
:
string
;
companyId
:
string
;
constructor
(
data
:
Partial
<
Bu3Model
>
)
{
constructor
(
data
?
:
Partial
<
Bu3Model
>
)
{
this
.
bu3id
=
data
.
bu3id
||
""
this
.
bu3id
=
data
?
.
bu3id
||
""
this
.
tdesc
=
data
.
tdesc
||
""
this
.
tdesc
=
data
?
.
tdesc
||
""
this
.
edesc
=
data
.
edesc
||
""
this
.
edesc
=
data
?
.
edesc
||
""
this
.
parent
=
data
.
parent
||
""
this
.
parent
=
data
?
.
parent
||
""
this
.
companyId
=
data
.
companyId
||
""
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