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
a50525e9
Commit
a50525e9
authored
Feb 13, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ทะเบียนส่วนย่อย1
parent
fde0c870
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
52 additions
and
43 deletions
+52
-43
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
+29
-31
sub-department-one.component.ts
...s-unit/sub-department-one/sub-department-one.component.ts
+11
-2
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 @@
...
@@ -4,7 +4,8 @@
<!-- Content ของ div แรก -->
<!-- Content ของ div แรก -->
<div
class=
"px-1"
>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-secondary h-20px m-0 shadow-md"
<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>
<i
class=
"ri-add-line"
></i>
นำเข้าข้อมูล
นำเข้าข้อมูล
</button>
</button>
...
...
src/app/components/company-components/company-registration/branch-business-unit/department-register/department-register.component.html
View file @
a50525e9
...
@@ -3,7 +3,8 @@
...
@@ -3,7 +3,8 @@
<div
class=
"flex pr-2"
>
<div
class=
"flex pr-2"
>
<div
class=
"px-1"
>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-secondary h-20px m-0 shadow-md"
<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>
<i
class=
"ri-add-line"
></i>
นำเข้าข้อมูล
นำเข้าข้อมูล
</button>
</button>
...
...
src/app/components/company-components/company-registration/branch-business-unit/section-registration/section-registration.component.html
View file @
a50525e9
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<div
class=
"flex pr-2"
>
<div
class=
"flex pr-2"
>
<div
class=
"px-1"
>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-secondary h-20px m-0 shadow-md"
<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>
<i
class=
"ri-add-line"
></i>
นำเข้าข้อมูล
นำเข้าข้อมูล
</button>
</button>
...
...
src/app/components/company-components/company-registration/branch-business-unit/sub-department-one/sub-department-one.component.html
View file @
a50525e9
...
@@ -3,7 +3,8 @@
...
@@ -3,7 +3,8 @@
<div
class=
"flex pr-2"
>
<div
class=
"flex pr-2"
>
<div
class=
"px-1"
>
<div
class=
"px-1"
>
<button
type=
"button"
class=
"ti-btn ti-btn-soft-secondary h-20px m-0 shadow-md"
<button
type=
"button"
class=
"ti-btn ti-btn-soft-secondary h-20px m-0 shadow-md"
data-hs-overlay=
"#sub-department-one-upload-modal"
>
data-hs-overlay=
"#sub-department-one-upload-modal"
(
click
)="
fileInput
.
value =
''
;
selectedFile=
null;selectedFileName
=
'กรุณาเลือกไฟล์'"
>
<i
class=
"ri-add-line"
></i>
<i
class=
"ri-add-line"
></i>
นำเข้าข้อมูล
นำเข้าข้อมูล
</button>
</button>
...
@@ -96,7 +97,8 @@
...
@@ -96,7 +97,8 @@
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
(
click
)="
selectBu4
(
item
);
currentModal=
'edit'
"
(
click
)="
selectBu4
(
item
);
currentModal=
'edit'
"
data-hs-overlay=
"#sub-department-one-modal-edit"
></i>
data-hs-overlay=
"#sub-department-one-modal-edit"
></i>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
(
click
)="
selectBu4
(
item
)"
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
(
click
)="
currentModal=
'delete'
;
selectBu4
(
item
)"
data-hs-overlay=
"#sub-department-one-alert-delete-modal"
></i>
data-hs-overlay=
"#sub-department-one-alert-delete-modal"
></i>
</td>
</td>
</tr>
</tr>
...
@@ -185,7 +187,7 @@
...
@@ -185,7 +187,7 @@
</div>
</div>
</div>
</div>
<div
class=
"ti-modal-body"
>
<div
class=
"ti-modal-body"
>
<label
class=
"ti-form-label"
>
อยู่ภายใต้หน่วยงาน
</label>
<label
class=
"ti-form-label"
>
อยู่ภายใต้หน่วยงาน
*
</label>
<div
class=
"flex"
>
<div
class=
"flex"
>
<div
class=
"relative flex rounded-md"
>
<div
class=
"relative flex rounded-md"
>
<input
type=
"text"
id=
"hs-leading-button-add-on-with-icon-and-button"
<input
type=
"text"
id=
"hs-leading-button-add-on-with-icon-and-button"
...
@@ -208,9 +210,10 @@
...
@@ -208,9 +210,10 @@
readonly
[
value
]="
bu3
.
tdesc
"
>
readonly
[
value
]="
bu3
.
tdesc
"
>
</div>
</div>
</div>
</div>
<label
class=
"ti-form-label mt-2rem"
>
ส่วนย่อย1
</label>
<label
class=
"ti-form-label mt-2rem"
>
ส่วนย่อย1
*
</label>
<div
class=
"relative flex rounded-md w-1/2"
>
<div
class=
"relative flex rounded-md w-1/2"
>
<input
type=
"text"
id=
"hs-leading-button-add-on-with-icon-and-button"
<input
type=
"text"
class=
"ti-form-input h-16"
[(
ngModel
)]="
bu4
.
bu4id
"
>
<!-- <input type="text" id="hs-leading-button-add-on-with-icon-and-button"
name="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"
class="ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
style="padding-right: 3.5rem;" [(ngModel)]="bu4.bu4id" (ngModelChange)="bu4idChange()">
style="padding-right: 3.5rem;" [(ngModel)]="bu4.bu4id" (ngModelChange)="bu4idChange()">
...
@@ -223,9 +226,9 @@
...
@@ -223,9 +226,9 @@
data-hs-overlay="#sub-department-one-bu4-table-modal">
data-hs-overlay="#sub-department-one-bu4-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
)]="
bu4
.
tdesc
"
>
<input
type=
"text"
id=
"detail_th"
class=
"ti-form-input h-16"
[(
ngModel
)]="
bu4
.
tdesc
"
>
<label
for=
"detail_eng"
class=
"ti-form-label mt-2rem"
>
รายละเอียด (อังกฤษ)
</label>
<label
for=
"detail_eng"
class=
"ti-form-label mt-2rem"
>
รายละเอียด (อังกฤษ)
</label>
<input
type=
"text"
id=
"detail_eng"
class=
"ti-form-input h-16"
[(
ngModel
)]="
bu4
.
edesc
"
>
<input
type=
"text"
id=
"detail_eng"
class=
"ti-form-input h-16"
[(
ngModel
)]="
bu4
.
edesc
"
>
...
@@ -235,10 +238,12 @@
...
@@ -235,10 +238,12 @@
data-hs-overlay=
"#sub-department-one-modal-add"
>
data-hs-overlay=
"#sub-department-one-modal-add"
>
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
<button
class=
"ti-btn ti-btn-success"
type=
"button"
data-hs-overlay=
"#sub-department-one-alert-modal"
>
data-hs-overlay=
"#sub-department-one-alert-modal"
[
class
.
ti-btn-disabled
]="!
bu3
.
bu3id
||!
bu4
.
bu4id
||!
bu4
.
tdesc
"
[
disabled
]="!
bu3
.
bu3id
||!
bu4
.
bu4id
||!
bu4
.
tdesc
"
>
บันทึกข้อมูล
บันทึกข้อมูล
</
a
>
</
button
>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -289,7 +294,7 @@
...
@@ -289,7 +294,7 @@
</div>
</div>
</div>
</div>
<div
class=
"ti-modal-body"
>
<div
class=
"ti-modal-body"
>
<label
for=
"hs-trailing-button-add-on-with-icon"
class=
"ti-form-label "
>
อยู่ภายใต้หน่วยงาน
</label>
<label
for=
"hs-trailing-button-add-on-with-icon"
class=
"ti-form-label "
>
อยู่ภายใต้หน่วยงาน
*
</label>
<div
class=
"flex"
>
<div
class=
"flex"
>
<div
class=
"relative flex rounded-md"
>
<div
class=
"relative flex rounded-md"
>
<input
type=
"text"
id=
"hs-leading-button-add-on-with-icon-and-button"
<input
type=
"text"
id=
"hs-leading-button-add-on-with-icon-and-button"
...
@@ -312,14 +317,14 @@
...
@@ -312,14 +317,14 @@
readonly
[
value
]="
bu3
.
tdesc
"
>
readonly
[
value
]="
bu3
.
tdesc
"
>
</div>
</div>
</div>
</div>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
ส่วนย่อย1
</label>
<label
for=
"input-label"
class=
"ti-form-label mt-2rem"
>
ส่วนย่อย1
*
</label>
<div
class=
"sm:grid grid-cols-2 gap-1"
>
<div
class=
"sm:grid grid-cols-2 gap-1"
>
<div
class=
"relative w-full"
>
<div
class=
"relative w-full"
>
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-full pr-10 bg-input-readonly"
<input
type=
"text"
id=
"input-label"
class=
"ti-form-input w-full pr-10 bg-input-readonly"
readonly
[
value
]="
bu4
.
bu4id
"
>
readonly
[
value
]="
bu4
.
bu4id
"
>
</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
)]="
bu4
.
tdesc
"
>
<input
type=
"text"
id=
"detail_th"
class=
"ti-form-input h-16"
[(
ngModel
)]="
bu4
.
tdesc
"
>
<label
for=
"detail_eng"
class=
"ti-form-label mt-2rem"
>
รายละเอียด (อังกฤษ)
</label>
<label
for=
"detail_eng"
class=
"ti-form-label mt-2rem"
>
รายละเอียด (อังกฤษ)
</label>
<input
type=
"text"
id=
"detail_eng"
class=
"ti-form-input h-16"
[(
ngModel
)]="
bu4
.
edesc
"
>
<input
type=
"text"
id=
"detail_eng"
class=
"ti-form-input h-16"
[(
ngModel
)]="
bu4
.
edesc
"
>
...
@@ -329,10 +334,12 @@
...
@@ -329,10 +334,12 @@
data-hs-overlay=
"#sub-department-one-modal-edit"
>
data-hs-overlay=
"#sub-department-one-modal-edit"
>
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
<button
class=
"ti-btn ti-btn-success"
type=
"button"
data-hs-overlay=
"#sub-department-one-alert-edit-modal"
>
data-hs-overlay=
"#sub-department-one-alert-edit-modal"
[
class
.
ti-btn-disabled
]="!
bu3
.
bu3id
||!
bu4
.
bu4id
||!
bu4
.
tdesc
"
[
disabled
]="!
bu3
.
bu3id
||!
bu4
.
bu4id
||!
bu4
.
tdesc
"
>
บันทึกข้อมูล
บันทึกข้อมูล
</
a
>
</
button
>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -578,7 +585,7 @@
...
@@ -578,7 +585,7 @@
</h3>
</h3>
<div
class=
"flex justify-end"
>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#sub-department-one-
alert-modal
"
>
data-hs-overlay=
"#sub-department-one-
modal-add
"
>
<span
class=
"sr-only"
>
Close
</span>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</button>
...
@@ -590,16 +597,11 @@
...
@@ -590,16 +597,11 @@
</p>
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<button
type=
"button"
*
ngIf=
"currentModal=='add'"
<button
type=
"button"
class=
"hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary dark:bg-bgdark dark:hover:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-white dark:focus:ring-offset-white/10"
class=
"hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary dark:bg-bgdark dark:hover:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-white dark:focus:ring-offset-white/10"
data-hs-overlay=
"#sub-department-one-modal-add"
>
data-hs-overlay=
"#sub-department-one-modal-add"
>
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<button
type=
"button"
*
ngIf=
"currentModal=='edit'"
class=
"hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary dark:bg-bgdark dark:hover:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-white dark:focus:ring-offset-white/10"
data-hs-overlay=
"#sub-department-one-modal-edit"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#sub-department-one-alert-modal"
(
click
)="
addBu4
()"
>
data-hs-overlay=
"#sub-department-one-alert-modal"
(
click
)="
addBu4
()"
>
บันทึกข้อมูล
บันทึกข้อมูล
...
@@ -619,7 +621,7 @@
...
@@ -619,7 +621,7 @@
</h3>
</h3>
<div
class=
"flex justify-end"
>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#sub-department-one-
alert-edit-modal
"
>
data-hs-overlay=
"#sub-department-one-
modal-edit
"
>
<span
class=
"sr-only"
>
Close
</span>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</button>
...
@@ -672,14 +674,9 @@
...
@@ -672,14 +674,9 @@
</p>
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<button
type=
"button"
*
ngIf=
"currentModal=='add'"
<button
type=
"button"
class=
"hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary dark:bg-bgdark dark:hover:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-white dark:focus:ring-offset-white/10"
data-hs-overlay=
"#sub-department-one-modal-add"
>
ย้อนกลับ
</button>
<button
type=
"button"
*
ngIf=
"currentModal=='edit'"
class=
"hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary dark:bg-bgdark dark:hover:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-white dark:focus:ring-offset-white/10"
class=
"hs-dropdown-toggle ti-btn ti-border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:ring-offset-white focus:ring-primary dark:bg-bgdark dark:hover:bg-black/20 dark:border-white/10 dark:text-white/70 dark:hover:text-white dark:focus:ring-offset-white/10"
data-hs-overlay=
"#sub-department-one-
modal-edit
"
>
data-hs-overlay=
"#sub-department-one-
alert-delete-modal
"
>
ย้อนกลับ
ย้อนกลับ
</button>
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
...
@@ -713,6 +710,7 @@
...
@@ -713,6 +710,7 @@
</div>
</div>
<div
class=
"flex justify-center mt-2rem mb-1rem space-x-4"
>
<div
class=
"flex justify-center mt-2rem mb-1rem space-x-4"
>
<button
type=
"submit"
class=
"ti-btn ti-btn-secondary"
(
click
)="
uploadFile
()"
<button
type=
"submit"
class=
"ti-btn ti-btn-secondary"
(
click
)="
uploadFile
()"
data-hs-overlay=
"#sub-department-one-upload-modal"
[
class
.
ti-btn-disabled
]="!
selectedFile
"
[
disabled
]="!
selectedFile
"
>
[
disabled
]="!
selectedFile
"
>
อัปโหลด
อัปโหลด
</button>
</button>
...
...
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 {
...
@@ -18,7 +18,7 @@ interface table {
export
class
SubDepartmentOneComponent
implements
OnInit
{
export
class
SubDepartmentOneComponent
implements
OnInit
{
bu4List
:
Bu4Model
[]
=
[]
bu4List
:
Bu4Model
[]
=
[]
bu4ListLoading
=
false
bu4ListLoading
=
false
bu4
:
Bu4Model
=
new
MyBu4Model
(
{}
)
bu4
:
Bu4Model
=
new
MyBu4Model
()
bu4Table
:
table
=
{
bu4Table
:
table
=
{
currentPage
:
1
,
currentPage
:
1
,
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
),
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
1
),
...
@@ -40,7 +40,7 @@ export class SubDepartmentOneComponent implements OnInit {
...
@@ -40,7 +40,7 @@ export class SubDepartmentOneComponent implements OnInit {
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
bu4Service
:
Bu4Service
,
constructor
(
private
bu4Service
:
Bu4Service
,
private
bu3Service
:
Bu3Service
,
private
bu3Service
:
Bu3Service
,
private
toastr
:
ToastrService
,
private
toastr
:
ToastrService
,
...
@@ -65,6 +65,7 @@ export class SubDepartmentOneComponent implements OnInit {
...
@@ -65,6 +65,7 @@ export class SubDepartmentOneComponent implements OnInit {
}
}
const
formData
=
new
FormData
();
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
bu4ListLoading
=
true
this
.
fileService
.
upload
(
formData
,
'mbu4'
).
subscribe
({
this
.
fileService
.
upload
(
formData
,
'mbu4'
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
...
@@ -72,9 +73,11 @@ export class SubDepartmentOneComponent implements OnInit {
...
@@ -72,9 +73,11 @@ export class SubDepartmentOneComponent implements OnInit {
this
.
getBu4List
()
this
.
getBu4List
()
}
else
{
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
bu4ListLoading
=
false
}
}
},
error
:
error
=>
{
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
bu4ListLoading
=
false
}
}
})
})
}
}
...
@@ -144,6 +147,7 @@ export class SubDepartmentOneComponent implements OnInit {
...
@@ -144,6 +147,7 @@ export class SubDepartmentOneComponent implements OnInit {
x
.
edesc
.
toLowerCase
().
includes
(
this
.
bu4Modal
.
search
.
toLowerCase
()))
x
.
edesc
.
toLowerCase
().
includes
(
this
.
bu4Modal
.
search
.
toLowerCase
()))
}
}
addBu4
()
{
addBu4
()
{
this
.
bu4ListLoading
=
true
this
.
bu4Service
.
post
({
...
this
.
bu4
,
parent
:
this
.
bu3
.
bu3id
}).
subscribe
({
this
.
bu4Service
.
post
({
...
this
.
bu4
,
parent
:
this
.
bu3
.
bu3id
}).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
...
@@ -151,13 +155,16 @@ export class SubDepartmentOneComponent implements OnInit {
...
@@ -151,13 +155,16 @@ export class SubDepartmentOneComponent implements OnInit {
this
.
getBu4List
()
this
.
getBu4List
()
}
else
{
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
bu4ListLoading
=
false
}
}
},
error
:
error
=>
{
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
bu4ListLoading
=
false
}
}
})
})
}
}
deleteBu4
()
{
deleteBu4
()
{
this
.
bu4ListLoading
=
true
this
.
bu4Service
.
delete
(
this
.
bu4
).
subscribe
({
this
.
bu4Service
.
delete
(
this
.
bu4
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
...
@@ -165,9 +172,11 @@ export class SubDepartmentOneComponent implements OnInit {
...
@@ -165,9 +172,11 @@ export class SubDepartmentOneComponent implements OnInit {
this
.
getBu4List
()
this
.
getBu4List
()
}
else
{
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
bu4ListLoading
=
false
}
}
},
error
:
error
=>
{
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
bu4ListLoading
=
false
}
}
})
})
}
}
...
...
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 {
...
@@ -34,7 +34,7 @@ export class SubDepartmentTwoComponent implements OnInit {
search
:
""
search
:
""
}
}
bu4List
:
Bu4Model
[]
=
[]
bu4List
:
Bu4Model
[]
=
[]
bu4
:
Bu4Model
=
new
MyBu4Model
(
{}
)
bu4
:
Bu4Model
=
new
MyBu4Model
()
bu4Modal
:
table
=
{
bu4Modal
:
table
=
{
currentPage
:
1
,
currentPage
:
1
,
page
:
Array
.
from
({
length
:
1
},
(
_
,
i
)
=>
i
+
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 {
...
@@ -13,12 +13,12 @@ export class MyBu4Model implements Bu4Model {
edesc
:
string
;
edesc
:
string
;
parent
:
string
;
parent
:
string
;
companyId
:
string
;
companyId
:
string
;
constructor
(
data
:
Partial
<
Bu4Model
>
)
{
constructor
(
data
?
:
Partial
<
Bu4Model
>
)
{
this
.
bu4id
=
data
.
bu4id
||
""
this
.
bu4id
=
data
?
.
bu4id
||
""
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