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
5f534405
Commit
5f534405
authored
Dec 16, 2024
by
Natthaphat Pankiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
เพิ่ม modal alert add edit delete หน้า ส่วนย่อย1,2,3 , ประเภทพนักงาน, ระดับพนักงาน, กำหนดรหัสผ่าน
parent
b44fcfd4
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
691 additions
and
98 deletions
+691
-98
set-a-password.component.html
...unt-settings/set-a-password/set-a-password.component.html
+143
-23
set-a-password.component.scss
...unt-settings/set-a-password/set-a-password.component.scss
+20
-10
set-a-password.component.ts
...count-settings/set-a-password/set-a-password.component.ts
+20
-0
sub-department-four.component.html
...it/sub-department-four/sub-department-four.component.html
+88
-9
sub-department-four.component.ts
...unit/sub-department-four/sub-department-four.component.ts
+14
-2
sub-department-three.component.html
.../sub-department-three/sub-department-three.component.html
+88
-9
sub-department-three.component.ts
...it/sub-department-three/sub-department-three.component.ts
+14
-2
sub-department-two.component.html
...unit/sub-department-two/sub-department-two.component.html
+88
-9
sub-department-two.component.ts
...s-unit/sub-department-two/sub-department-two.component.ts
+14
-2
employee-categories.component.html
...on/employee-categories/employee-categories.component.html
+83
-8
employee-categories.component.ts
...tion/employee-categories/employee-categories.component.ts
+18
-8
employee-level.component.html
...-description/employee-level/employee-level.component.html
+83
-8
employee-level.component.ts
...ob-description/employee-level/employee-level.component.ts
+18
-8
No files found.
src/app/components/account-settings/set-a-password/set-a-password.component.html
View file @
5f534405
...
...
@@ -17,7 +17,8 @@
</button>
</div>
<div
class=
"px-1"
>
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-danger h-45px m-0 shadow-md"
>
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-danger h-45px m-0 shadow-md"
data-hs-overlay=
"#set-a-password-alert-delete-modal"
>
<i
class=
"ri-delete-bin-6-line"
></i>
Delete
</button>
...
...
@@ -85,7 +86,7 @@
<td
class=
"flex justify-center"
>
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
data-hs-overlay=
"#set-a-password-modal-edit"
></i>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
></i>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
data-hs-overlay=
"#set-a-password-alert-delete-modal"
></i>
</td>
</tr>
</tbody>
...
...
@@ -130,19 +131,13 @@
<div
id=
"set-a-password-modal-add"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out
h-[calc(100%-3.5rem)]
"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out
md:!max-w-2xl md:w-full m-3 md:mx-auto h-[calc(100%-3.5rem)] items-center
"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content
-new
"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
กำหนดรหัสผ่าน
</h3>
<div
class=
"flex justify-end"
>
<div
class=
"button-help"
>
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-warning h-45px m-0 shadow-md"
>
<i
class=
"ti ti-book fs-l"
></i>
Help
</button>
</div>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#set-a-password-modal-add"
>
<span
class=
"sr-only"
>
Close
</span>
...
...
@@ -150,7 +145,17 @@
</button>
</div>
</div>
<div
class=
"ti-modal-body"
>
<div
class=
"ti-modal-center"
>
<div
class=
"flex justify-end"
style=
"padding-right: 1rem;"
>
<div
class=
"px-1"
>
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-warning h-45px m-0 shadow-md"
>
<i
class=
"ti ti-book fs-l"
></i>
Help
</button>
</div>
</div>
</div>
<div
class=
"ti-modal-body-new"
>
<form
class=
"space-y-5"
>
<div
class=
"sm:grid grid-cols-12 gap-x-6"
>
<label
class=
"col-span-12 sm:col-span-3 ti-form-label text-primary"
>
ชื่อล็อคอิน
</label>
...
...
@@ -175,13 +180,14 @@
</div>
</form>
</div>
<div
class=
"flex justify-end mt-4 sm:mt-2 mb-4 sm:mb-1 space-x-4"
style=
"margin-right:
7
0px;"
>
<div
class=
"flex justify-end mt-4 sm:mt-2 mb-4 sm:mb-1 space-x-4"
style=
"margin-right:
3
0px;"
>
<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=
"#set-a-password-modal-add"
>
ย้อนกลับ
</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=
"#set-a-password-alert-add-modal"
>
บันทึกข้อมูล
</a>
</div>
...
...
@@ -190,19 +196,13 @@
</div>
<div
id=
"set-a-password-modal-edit"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out
h-[calc(100%-3.5rem)]
"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out
md:!max-w-2xl md:w-full m-3 md:mx-auto h-[calc(100%-3.5rem)] items-center
"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content
-new
"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แก้ไขรหัสผ่าน
</h3>
<div
class=
"flex justify-end"
>
<div
class=
"button-help"
>
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-warning h-45px m-0 shadow-md"
>
<i
class=
"ti ti-book fs-l"
></i>
Help
</button>
</div>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#set-a-password-modal-edit"
>
<span
class=
"sr-only"
>
Close
</span>
...
...
@@ -210,7 +210,17 @@
</button>
</div>
</div>
<div
class=
"ti-modal-body"
>
<div
class=
"ti-modal-center"
>
<div
class=
"flex justify-end"
style=
"padding-right: 1rem;"
>
<div
class=
"px-1"
>
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-warning h-45px m-0 shadow-md"
>
<i
class=
"ti ti-book fs-l"
></i>
Help
</button>
</div>
</div>
</div>
<div
class=
"ti-modal-body-new"
>
<form
class=
"space-y-5"
>
<div
class=
"sm:grid grid-cols-12 gap-x-6"
>
<label
class=
"col-span-12 sm:col-span-3 ti-form-label text-primary"
>
ชื่อล็อคอิน
</label>
...
...
@@ -241,10 +251,119 @@
data-hs-overlay=
"#set-a-password-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=
"#set-a-password-alert-edit-modal"
>
บันทึกข้อมูล
</a>
</div>
</div>
</div>
</div>
<div
id=
"set-a-password-alert-add-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แจ้งเตือน
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#set-a-password-alert-add-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
ยืนยันการบันทึกข้อมูลหรือไม่
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<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=
"#set-a-password-modal-add"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#set-a-password-alert-add-modal"
(
click
)="
showSuccessAdd
()"
>
บันทึกข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
<div
id=
"set-a-password-alert-edit-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แจ้งเตือน
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#set-a-password-alert-edit-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
ยืนยันการแก้ไขข้อมูลหรือไม่
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<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=
"#set-a-password-modal-edit"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#set-a-password-alert-edit-modal"
(
click
)="
showSuccessEdit
()"
>
บันทึกข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
<div
id=
"set-a-password-alert-delete-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แจ้งเตือน
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#set-a-password-alert-delete-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
ยืนยันการลบข้อมูลหรือไม่
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<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=
"#set-a-password-alert-delete-modal"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#set-a-password-alert-delete-modal"
(
click
)="
showSuccessDelete
()"
>
ลบข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
src/app/components/account-settings/set-a-password/set-a-password.component.scss
View file @
5f534405
...
...
@@ -91,20 +91,30 @@ padding: 0rem;
.page
{
min-height
:
0vh
;
}
.ti-modal-content
{
width
:
50%
;
/* ความกว้างที่คุณต้องการ */
height
:
80%
;
position
:
absolute
;
/* ทำให้สามารถจัดตำแหน่งได้ */
.ti-modal-content-new
{
top
:
50%
;
/* ให้อยู่กลางในแนวตั้ง */
left
:
50%
;
/* ให้อยู่กลางในแนวนอน */
position
:
relative
;
/* ทำให้สามารถจัดตำแหน่งได้ */
transform
:
translate
(
-50%
,
-50%
);
/* เคลื่อนที่ modal กลับมาให้ตรงกลาง */
background-color
:
white
;
overflow
:
hidden
;
/* ป้องกันการเลื่อนในโมดอล */
}
.ti-modal-body
{
display
:
flex
;
/* ใช้ flexbox เพื่อจัดตำแหน่ง */
justify-content
:
center
;
/* จัดฟอร์มให้อยู่กลางในแนวนอน */
flex-direction
:
column
;
/* ทำให้ฟอร์มแสดงผลในรูปแบบคอลัมน์ */
height
:
calc
(
100%
-
50px
);
/* ให้ความสูงเป็น 100% ลบด้วยระยะห่างข้างบน */
margin-left
:
100px
;
.ti-modal-body-new
{
height
:
50vh
;
display
:
flex
;
justify-content
:
center
;
/* จัดแนวนอนให้ตรงกลาง */
align-items
:
center
;
/* จัดแนวตั้งให้ตรงกลาง */
padding
:
1rem
;
}
form
{
width
:
100%
;
/* ให้ฟอร์มใช้พื้นที่เต็ม */
max-width
:
600px
;
/* กำหนดขนาดสูงสุดให้ฟอร์ม */
}
src/app/components/account-settings/set-a-password/set-a-password.component.ts
View file @
5f534405
import
{
Component
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
@
Component
({
selector
:
'app-set-a-password'
,
...
...
@@ -33,6 +34,7 @@ export class SetAPasswordComponent {
backdropClose
:
true
,
}
}
constructor
(
private
toastr
:
ToastrService
)
{
}
openModal
(
name
:
string
,
size
:
string
,
closeOnBackdrop
?:
boolean
)
{
this
.
modalOptions
[
name
].
modalSize
=
size
;
...
...
@@ -53,5 +55,23 @@ export class SetAPasswordComponent {
// Logic ตรวจสอบว่า Modal อื่นยังเปิดอยู่หรือไม่
return
Object
.
values
(
this
.
modalOptions
).
some
(
modal
=>
modal
.
isModalOpen
);
// หากไม่มี Modal อื่นเปิด
}
showSuccessAdd
()
{
this
.
toastr
.
success
(
'บันทึกข้อมูลสำเร็จ'
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
}
showSuccessEdit
()
{
this
.
toastr
.
success
(
'แก้ไขข้อมูลสำเร็จ'
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
}
showSuccessDelete
()
{
this
.
toastr
.
success
(
'ลบข้อมูลสำเร็จ'
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
}
}
src/app/components/company-registration/branch-business-unit/sub-department-four/sub-department-four.component.html
View file @
5f534405
...
...
@@ -82,7 +82,8 @@
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
(
click
)="
selectBu7
(
item
);
currentModal=
'edit'
"
data-hs-overlay=
"#sub-department-four-modal-edit"
></i>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
(
click
)="
deleteBu7
(
item
)"
></i>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
(
click
)="
deleteBu7
(
item
)"
data-hs-overlay=
"#sub-department-four-alert-delete-modal"
></i>
</td>
</tr>
</tbody>
...
...
@@ -201,7 +202,7 @@
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#sub-department-four-alert-modal"
>
data-hs-overlay=
"#sub-department-four-alert-
add-
modal"
>
บันทึกข้อมูล
</a>
</div>
...
...
@@ -292,7 +293,7 @@
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#sub-department-four-alert-modal"
>
data-hs-overlay=
"#sub-department-four-alert-
edit-
modal"
>
บันทึกข้อมูล
</a>
</div>
...
...
@@ -364,7 +365,7 @@
<tbody
*
ngIf=
"filterBu6Modal().length"
>
<ng-container
*
ngIf=
"currentModal=='add'"
>
<tr
*
ngFor=
"let item of filterBu6Modal() | slice:((bu6Modal.currentPage-1) * 10) : (((bu6Modal.currentPage-1) * 10) + 10);let i = index"
class=
"cursor-pointer"
(
click
)="
selectBu6
(
item
)
;
showSuccess
()
"
class=
"cursor-pointer"
(
click
)="
selectBu6
(
item
)"
data-hs-overlay=
"#sub-department-four-modal-add"
>
<td
class=
"flex justify-center"
>
{{((bu6Modal.currentPage-1) * 10)+(i+1)}}
...
...
@@ -376,7 +377,7 @@
</ng-container>
<ng-container
*
ngIf=
"currentModal=='edit'"
>
<tr
*
ngFor=
"let item of filterBu6Modal() | slice:((bu6Modal.currentPage-1) * 10) : (((bu6Modal.currentPage-1) * 10) + 10);let i = index"
class=
"cursor-pointer"
(
click
)="
selectBu6
(
item
)
;
showSuccess
()
"
class=
"cursor-pointer"
(
click
)="
selectBu6
(
item
)"
data-hs-overlay=
"#sub-department-four-modal-edit"
>
<td
class=
"flex justify-center"
>
{{((bu6Modal.currentPage-1) * 10)+(i+1)}}
...
...
@@ -484,7 +485,7 @@
</tbody>
<tbody
*
ngIf=
"filterBu7Modal().length"
>
<tr
*
ngFor=
"let item of filterBu7Modal() | slice:((bu7Modal.currentPage-1) * 10) : (((bu7Modal.currentPage-1) * 10) + 10);let i = index"
class=
"cursor-pointer"
(
click
)="
selectBu7
(
item
)
;
showSuccess
()
"
class=
"cursor-pointer"
(
click
)="
selectBu7
(
item
)"
data-hs-overlay=
"#sub-department-four-modal-add"
>
<td
class=
"flex justify-center"
>
{{((bu7Modal.currentPage-1) * 10)+(i+1)}}
...
...
@@ -531,7 +532,7 @@
</div>
</div>
<div
id=
"sub-department-four-alert-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"sub-department-four-alert-
add-
modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
...
...
@@ -540,7 +541,7 @@
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#sub-department-four-alert-modal"
>
data-hs-overlay=
"#sub-department-four-alert-
add-
modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
...
...
@@ -563,7 +564,7 @@
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#sub-department-four-alert-
modal"
(
click
)="
addBu7
()"
>
data-hs-overlay=
"#sub-department-four-alert-
add-modal"
(
click
)="
addBu7
();
showSuccessAdd
()"
>
บันทึกข้อมูล
</a>
</div>
...
...
@@ -571,3 +572,80 @@
</div>
</div>
</div>
<div
id=
"sub-department-four-alert-edit-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แจ้งเตือน
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#sub-department-four-alert-edit-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
ยืนยันการบันทึกข้อมูลหรือไม่
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<button
type=
"button"
*
ngIf=
"currentModal=='add'"
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-four-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"
data-hs-overlay=
"#sub-department-four-modal-edit"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#sub-department-four-alert-edit-modal"
(
click
)="
addBu7
();
showSuccessAdd
()"
>
บันทึกข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
<div
id=
"sub-department-four-alert-delete-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แจ้งเตือน
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#sub-department-four-alert-delete-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
ยืนยันการลบข้อมูลหรือไม่
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<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-four-alert-delete-modal"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#sub-department-four-alert-delete-modal"
(
click
)="
addBu7
();
showSuccessDelete
()"
>
ลบข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
src/app/components/company-registration/branch-business-unit/sub-department-four/sub-department-four.component.ts
View file @
5f534405
...
...
@@ -119,8 +119,20 @@ export class SubDepartmentFourComponent implements OnInit {
this
.
bu6
=
new
MyBu6Model
(
bu6
||
{})
}
showSuccess
()
{
this
.
toastr
.
success
(
'This is an example of tip'
,
'TIP'
,
{
showSuccessAdd
()
{
this
.
toastr
.
success
(
'บันทึกข้อมูลสำเร็จ'
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
}
showSuccessEdit
()
{
this
.
toastr
.
success
(
'แก้ไขข้อมูลสำเร็จ'
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
}
showSuccessDelete
()
{
this
.
toastr
.
success
(
'ลบข้อมูลสำเร็จ'
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
...
...
src/app/components/company-registration/branch-business-unit/sub-department-three/sub-department-three.component.html
View file @
5f534405
...
...
@@ -82,7 +82,8 @@
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
(
click
)="
selectBu6
(
item
);
currentModal=
'edit'
"
data-hs-overlay=
"#sub-department-three-modal-edit"
></i>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
(
click
)="
deleteBu6
(
item
)"
></i>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
(
click
)="
deleteBu6
(
item
)"
data-hs-overlay=
"#sub-department-three-alert-delete-modal"
></i>
</td>
</tr>
</tbody>
...
...
@@ -201,7 +202,7 @@
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#sub-department-three-alert-modal"
>
data-hs-overlay=
"#sub-department-three-alert-
add-
modal"
>
บันทึกข้อมูล
</a>
</div>
...
...
@@ -292,7 +293,7 @@
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#sub-department-three-alert-modal"
>
data-hs-overlay=
"#sub-department-three-alert-
edit-
modal"
>
บันทึกข้อมูล
</a>
</div>
...
...
@@ -364,7 +365,7 @@
<tbody
*
ngIf=
"filterBu5Modal().length"
>
<ng-container
*
ngIf=
"currentModal=='add'"
>
<tr
*
ngFor=
"let item of filterBu5Modal() | slice:((bu5Modal.currentPage-1) * 10) : (((bu5Modal.currentPage-1) * 10) + 10);let i = index"
class=
"cursor-pointer"
(
click
)="
selectBu5
(
item
)
;
showSuccess
()
"
class=
"cursor-pointer"
(
click
)="
selectBu5
(
item
)"
data-hs-overlay=
"#sub-department-three-modal-add"
>
<td
class=
"flex justify-center"
>
{{((bu5Modal.currentPage-1) * 10)+(i+1)}}
...
...
@@ -376,7 +377,7 @@
</ng-container>
<ng-container
*
ngIf=
"currentModal=='edit'"
>
<tr
*
ngFor=
"let item of filterBu5Modal() | slice:((bu5Modal.currentPage-1) * 10) : (((bu5Modal.currentPage-1) * 10) + 10);let i = index"
class=
"cursor-pointer"
(
click
)="
selectBu5
(
item
)
;
showSuccess
()
"
class=
"cursor-pointer"
(
click
)="
selectBu5
(
item
)"
data-hs-overlay=
"#sub-department-three-modal-edit"
>
<td
class=
"flex justify-center"
>
{{((bu5Modal.currentPage-1) * 10)+(i+1)}}
...
...
@@ -484,7 +485,7 @@
</tbody>
<tbody
*
ngIf=
"filterBu6Modal().length"
>
<tr
*
ngFor=
"let item of filterBu6Modal() | slice:((bu6Modal.currentPage-1) * 10) : (((bu6Modal.currentPage-1) * 10) + 10);let i = index"
class=
"cursor-pointer"
(
click
)="
selectBu6
(
item
)
;
showSuccess
()
"
class=
"cursor-pointer"
(
click
)="
selectBu6
(
item
)"
data-hs-overlay=
"#sub-department-three-modal-add"
>
<td
class=
"flex justify-center"
>
{{((bu6Modal.currentPage-1) * 10)+(i+1)}}
...
...
@@ -531,7 +532,7 @@
</div>
</div>
<div
id=
"sub-department-three-alert-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"sub-department-three-alert-
add-
modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
...
...
@@ -540,7 +541,7 @@
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#sub-department-three-alert-modal"
>
data-hs-overlay=
"#sub-department-three-alert-
add-
modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
...
...
@@ -563,7 +564,7 @@
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#sub-department-three-alert-
modal"
(
click
)="
addBu6
()"
>
data-hs-overlay=
"#sub-department-three-alert-
add-modal"
(
click
)="
addBu6
();
showSuccessAdd
()"
>
บันทึกข้อมูล
</a>
</div>
...
...
@@ -571,3 +572,80 @@
</div>
</div>
</div>
<div
id=
"sub-department-three-alert-edit-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แจ้งเตือน
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#sub-department-three-alert-edit-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
ยืนยันการแก้ไขข้อมูลหรือไม่
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<button
type=
"button"
*
ngIf=
"currentModal=='add'"
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-three-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"
data-hs-overlay=
"#sub-department-three-modal-edit"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#sub-department-three-alert-edit-modal"
(
click
)="
addBu6
();
showSuccessEdit
()"
>
บันทึกข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
<div
id=
"sub-department-three-alert-delete-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แจ้งเตือน
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#sub-department-three-alert-delete-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
ยืนยันการลบข้อมูลหรือไม่
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<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-three-alert-delete-modal"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#sub-department-three-alert-delete-modal"
(
click
)="
addBu6
();
showSuccessDelete
()"
>
ลบข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
src/app/components/company-registration/branch-business-unit/sub-department-three/sub-department-three.component.ts
View file @
5f534405
...
...
@@ -119,8 +119,20 @@ export class SubDepartmentThreeComponent implements OnInit {
this
.
bu5
=
new
MyBu5Model
(
bu5
||
{})
}
showSuccess
()
{
this
.
toastr
.
success
(
'This is an example of tip'
,
'TIP'
,
{
showSuccessAdd
()
{
this
.
toastr
.
success
(
'บันทึกข้อมูลสำเร็จ'
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
}
showSuccessEdit
()
{
this
.
toastr
.
success
(
'แก้ไขข้อมูลสำเร็จ'
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
}
showSuccessDelete
()
{
this
.
toastr
.
success
(
'ลบข้อมูลสำเร็จ'
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
...
...
src/app/components/company-registration/branch-business-unit/sub-department-two/sub-department-two.component.html
View file @
5f534405
...
...
@@ -82,7 +82,8 @@
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
(
click
)="
selectBu5
(
item
);
currentModal=
'edit'
"
data-hs-overlay=
"#sub-department-two-modal-edit"
></i>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
(
click
)="
deleteBu5
(
item
)"
></i>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
(
click
)="
deleteBu5
(
item
)"
data-hs-overlay=
"#sub-department-two-alert-delete-modal"
></i>
</td>
</tr>
</tbody>
...
...
@@ -201,7 +202,7 @@
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#sub-department-two-alert-modal"
>
data-hs-overlay=
"#sub-department-two-alert-
add-
modal"
>
บันทึกข้อมูล
</a>
</div>
...
...
@@ -292,7 +293,7 @@
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#sub-department-two-alert-modal"
>
data-hs-overlay=
"#sub-department-two-alert-
edit-
modal"
>
บันทึกข้อมูล
</a>
</div>
...
...
@@ -364,7 +365,7 @@
<tbody
*
ngIf=
"filterBu4Modal().length"
>
<ng-container
*
ngIf=
"currentModal=='add'"
>
<tr
*
ngFor=
"let item of filterBu4Modal() | slice:((bu4Modal.currentPage-1) * 10) : (((bu4Modal.currentPage-1) * 10) + 10);let i = index"
class=
"cursor-pointer"
(
click
)="
selectBu4
(
item
)
;
showSuccess
()
"
class=
"cursor-pointer"
(
click
)="
selectBu4
(
item
)"
data-hs-overlay=
"#sub-department-two-modal-add"
>
<td
class=
"flex justify-center"
>
{{((bu4Modal.currentPage-1) * 10)+(i+1)}}
...
...
@@ -376,7 +377,7 @@
</ng-container>
<ng-container
*
ngIf=
"currentModal=='edit'"
>
<tr
*
ngFor=
"let item of filterBu4Modal() | slice:((bu4Modal.currentPage-1) * 10) : (((bu4Modal.currentPage-1) * 10) + 10);let i = index"
class=
"cursor-pointer"
(
click
)="
selectBu4
(
item
)
;
showSuccess
()
"
class=
"cursor-pointer"
(
click
)="
selectBu4
(
item
)"
data-hs-overlay=
"#sub-department-two-modal-edit"
>
<td
class=
"flex justify-center"
>
{{((bu4Modal.currentPage-1) * 10)+(i+1)}}
...
...
@@ -484,7 +485,7 @@
</tbody>
<tbody
*
ngIf=
"filterBu5Modal().length"
>
<tr
*
ngFor=
"let item of filterBu5Modal() | slice:((bu5Modal.currentPage-1) * 10) : (((bu5Modal.currentPage-1) * 10) + 10);let i = index"
class=
"cursor-pointer"
(
click
)="
selectBu5
(
item
)
;
showSuccess
()
"
class=
"cursor-pointer"
(
click
)="
selectBu5
(
item
)"
data-hs-overlay=
"#sub-department-two-modal-add"
>
<td
class=
"flex justify-center"
>
{{((bu5Modal.currentPage-1) * 10)+(i+1)}}
...
...
@@ -531,7 +532,7 @@
</div>
</div>
<div
id=
"sub-department-two-alert-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"sub-department-two-alert-
add-
modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
...
...
@@ -540,7 +541,7 @@
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#sub-department-two-alert-modal"
>
data-hs-overlay=
"#sub-department-two-alert-
add-
modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
...
...
@@ -563,7 +564,7 @@
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#sub-department-two-alert-
modal"
(
click
)="
addBu5
()"
>
data-hs-overlay=
"#sub-department-two-alert-
add-modal"
(
click
)="
addBu5
();
showSuccessAdd
()"
>
บันทึกข้อมูล
</a>
</div>
...
...
@@ -571,3 +572,80 @@
</div>
</div>
</div>
<div
id=
"sub-department-two-alert-edit-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แจ้งเตือน
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#sub-department-two-alert-edit-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
ยืนยันการแก้ไขข้อมูลหรือไม่
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<button
type=
"button"
*
ngIf=
"currentModal=='add'"
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-two-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"
data-hs-overlay=
"#sub-department-two-modal-edit"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#sub-department-two-alert-edit-modal"
(
click
)="
addBu5
();
showSuccessEdit
()"
>
บันทึกข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
<div
id=
"sub-department-two-alert-delete-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แจ้งเตือน
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#sub-department-two-alert-delete-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
ยืนยันการลบข้อมูลหรือไม่
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<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-two-alert-delete-modal"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#sub-department-two-alert-delete-modal"
(
click
)="
addBu5
();
showSuccessDelete
()"
>
ลบข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
src/app/components/company-registration/branch-business-unit/sub-department-two/sub-department-two.component.ts
View file @
5f534405
...
...
@@ -118,8 +118,20 @@ export class SubDepartmentTwoComponent implements OnInit {
this
.
bu4
=
new
MyBu4Model
(
bu4
||
{})
}
showSuccess
()
{
this
.
toastr
.
success
(
'This is an example of tip'
,
'TIP'
,
{
showSuccessAdd
()
{
this
.
toastr
.
success
(
'บันทึกข้อมูลสำเร็จ'
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
}
showSuccessEdit
()
{
this
.
toastr
.
success
(
'แก้ไขข้อมูลสำเร็จ'
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
}
showSuccessDelete
()
{
this
.
toastr
.
success
(
'ลบข้อมูลสำเร็จ'
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
...
...
src/app/components/job-description/employee-categories/employee-categories.component.html
View file @
5f534405
...
...
@@ -18,7 +18,8 @@
</button>
</div>
<div
class=
"px-1"
>
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-danger h-45px m-0 shadow-md"
>
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-danger h-45px m-0 shadow-md"
data-hs-overlay=
"#employee-categories-alert-delete-modal"
>
<i
class=
"ri-delete-bin-6-line"
></i>
Delete
</button>
...
...
@@ -93,7 +94,8 @@
<td
class=
"flex justify-center"
>
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
(
click
)="
selectEmp_type
(
item
)"
data-hs-overlay=
"#employee-categories-modal-edit"
></i>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
(
click
)="
deleteEmp_type
(
item
)"
></i>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
(
click
)="
deleteEmp_type
(
item
)"
data-hs-overlay=
"#employee-categories-alert-delete-modal"
></i>
</td>
</tr>
</tbody>
...
...
@@ -183,7 +185,7 @@
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#employee-categories-alert-modal"
>
data-hs-overlay=
"#employee-categories-alert-
add-
modal"
>
บันทึกข้อมูล
</a>
</div>
...
...
@@ -248,7 +250,7 @@
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#employee-categories-alert-modal"
>
data-hs-overlay=
"#employee-categories-alert-
edit-
modal"
>
บันทึกข้อมูล
</a>
</div>
...
...
@@ -257,7 +259,7 @@
</div>
</div>
<div
id=
"employee-categories-alert-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"employee-categories-alert-
add-
modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
...
...
@@ -266,7 +268,7 @@
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#employee-
group-unit-component-alert
-modal"
>
data-hs-overlay=
"#employee-
categories-alert-add
-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
...
...
@@ -280,11 +282,11 @@
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<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=
"#employee-categories-
alert-modal
"
>
data-hs-overlay=
"#employee-categories-
modal-add
"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#employee-categories-alert-
modal"
(
click
)="
addEmp_type
()"
>
data-hs-overlay=
"#employee-categories-alert-
add-modal"
(
click
)="
addEmp_type
();
showSuccessAdd
()"
>
บันทึกข้อมูล
</a>
</div>
...
...
@@ -292,3 +294,75 @@
</div>
</div>
</div>
<div
id=
"employee-categories-alert-edit-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แจ้งเตือน
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#employee-categories-alert-edit-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
ยืนยันการแก้ไขข้อมูลหรือไม่
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<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=
"#employee-categories-modal-edit"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#employee-categories-alert-edit-modal"
(
click
)="
addEmp_type
();
showSuccessEdit
()"
>
บันทึกข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
<div
id=
"employee-categories-alert-delete-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แจ้งเตือน
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#employee-categories-alert-delete-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
ยืนยันการลบข้อมูลหรือไม่
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<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=
"#employee-categories-alert-delete-modal"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#employee-categories-alert-delete-modal"
(
click
)="
addEmp_type
();
showSuccessDelete
()"
>
ลบข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
src/app/components/job-description/employee-categories/employee-categories.component.ts
View file @
5f534405
...
...
@@ -93,13 +93,6 @@ export class EmployeeCategories {
// this.showSuccess()
this
.
emp_type
=
new
MyEmpTypeModel
(
emp_type
)
}
showSuccess
()
{
this
.
toastr
.
success
(
'This is an example of tip'
,
'TIP'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
}
addEmp_type
()
{
// this.emp_typeService.post(this.emp_type).subscribe((response:any) => {
// if (response.success) {
...
...
@@ -114,6 +107,23 @@ export class EmployeeCategories {
// }
// })
}
showSuccessAdd
()
{
this
.
toastr
.
success
(
'บันทึกข้อมูลสำเร็จ'
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
}
showSuccessEdit
()
{
this
.
toastr
.
success
(
'แก้ไขข้อมูลสำเร็จ'
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
}
showSuccessDelete
()
{
this
.
toastr
.
success
(
'ลบข้อมูลสำเร็จ'
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
}
}
src/app/components/job-description/employee-level/employee-level.component.html
View file @
5f534405
...
...
@@ -18,7 +18,8 @@
</button>
</div>
<div
class=
"px-1"
>
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-danger h-45px m-0 shadow-md"
>
<button
href=
"javascript:void(0);"
class=
"ti-btn ti-btn-soft-danger h-45px m-0 shadow-md"
data-hs-overlay=
"#employee-level-alert-delete-modal"
>
<i
class=
"ri-delete-bin-6-line"
></i>
Delete
</button>
...
...
@@ -93,7 +94,8 @@
<td
class=
"flex justify-center"
>
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
(
click
)="
selectPL
(
item
)"
data-hs-overlay=
"#employee-level-modal-edit"
></i>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
(
click
)="
deletePL
(
item
)"
></i>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
(
click
)="
deletePL
(
item
)"
data-hs-overlay=
"#employee-level-alert-delete-modal"
></i>
</td>
</tr>
</tbody>
...
...
@@ -184,7 +186,7 @@
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#employee-level-alert-modal"
>
data-hs-overlay=
"#employee-level-alert-
add-
modal"
>
บันทึกข้อมูล
</a>
</div>
...
...
@@ -250,7 +252,7 @@
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#employee-level-alert-modal"
>
data-hs-overlay=
"#employee-level-alert-
edit-
modal"
>
บันทึกข้อมูล
</a>
</div>
...
...
@@ -286,7 +288,8 @@
</div>
</div>
</div>
<div
id=
"employee-level-alert-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
id=
"employee-level-alert-add-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
...
...
@@ -295,7 +298,7 @@
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#employee-level-alert-modal"
>
data-hs-overlay=
"#employee-level-alert-
add-
modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
...
...
@@ -309,11 +312,47 @@
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<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=
"#employee-level-alert-modal"
>
data-hs-overlay=
"#employee-level-modal-add"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#employee-level-alert-add-modal"
(
click
)="
addPL
();
showSuccessAdd
()"
>
บันทึกข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
<div
id=
"employee-level-alert-edit-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แจ้งเตือน
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#employee-level-alert-edit-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
ยืนยันการแก้ไขข้อมูลหรือไม่
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<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=
"#employee-level-modal-edit"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#employee-level-alert-
modal"
(
click
)="
addPL
()"
>
data-hs-overlay=
"#employee-level-alert-
edit-modal"
(
click
)="
addPL
();
showSuccessEdit
()"
>
บันทึกข้อมูล
</a>
</div>
...
...
@@ -321,3 +360,39 @@
</div>
</div>
</div>
<div
id=
"employee-level-alert-delete-modal"
class=
"hs-overlay hidden ti-modal"
>
<div
class=
"hs-overlay-open:mt-7 ti-modal-box mt-0 ease-out h-[calc(100%-3.5rem)] flex items-center"
>
<div
class=
"max-h-full overflow-hidden ti-modal-content w-full"
>
<div
class=
"ti-modal-header"
>
<h3
class=
"text-xxl font-bold text-primary"
>
แจ้งเตือน
</h3>
<div
class=
"flex justify-end"
>
<button
type=
"button"
class=
"hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay=
"#employee-level-alert-delete-modal"
>
<span
class=
"sr-only"
>
Close
</span>
<i
class=
"ti ti-circle-x fs-xxl"
></i>
</button>
</div>
</div>
<div
class=
"ti-modal-body "
>
<p
class=
"mt-1 text-gray-800 dark:text-white/70"
>
ยืนยันการลบข้อมูลหรือไม่
</p>
<div
class=
"flex justify-end mt-2rem mb-1rem"
>
<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=
"#employee-level-alert-delete-modal"
>
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-success"
href=
"javascript:void(0);"
data-hs-overlay=
"#employee-level-alert-delete-modal"
(
click
)="
addPL
();
showSuccessDelete
()"
>
ลบข้อมูล
</a>
</div>
</div>
</div>
</div>
</div>
src/app/components/job-description/employee-level/employee-level.component.ts
View file @
5f534405
...
...
@@ -48,13 +48,6 @@ export class EmployeeLevel implements OnInit {
// this.showSuccess()
this
.
pl
=
new
MyPLModel
(
pl
)
}
// showSuccess() {
// this.toastr.success('This is an example of tip', 'TIP', {
// timeOut: 3000,
// plClass: 'toast-top-right',
// });
// }
addPL
()
{
// this.plService.post(this.pl).subscribe((response:any) => {
// if (response.success) {
...
...
@@ -69,5 +62,22 @@ export class EmployeeLevel implements OnInit {
// }
// })
}
showSuccessAdd
()
{
this
.
toastr
.
success
(
'บันทึกข้อมูลสำเร็จ'
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
}
showSuccessEdit
()
{
this
.
toastr
.
success
(
'แก้ไขข้อมูลสำเร็จ'
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
}
showSuccessDelete
()
{
this
.
toastr
.
success
(
'ลบข้อมูลสำเร็จ'
,
'แจ้งเตือน'
,
{
timeOut
:
3000
,
positionClass
:
'toast-top-right'
,
});
}
}
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