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
ca6384bb
Commit
ca6384bb
authored
Feb 14, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ตั้งค่าผู้ใช้งาน
parent
84c08d57
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
58 additions
and
26 deletions
+58
-26
user-settings.component.html
...count-settings/user-settings/user-settings.component.html
+16
-4
user-settings.component.ts
...account-settings/user-settings/user-settings.component.ts
+30
-10
department-list.component.html
...iness-unit/department-list/department-list.component.html
+2
-2
section-registration.component.html
.../section-registration/section-registration.component.html
+2
-2
sub-department-four.component.html
...it/sub-department-four/sub-department-four.component.html
+2
-2
sub-department-one.component.html
...unit/sub-department-one/sub-department-one.component.html
+2
-2
sub-department-three.component.html
.../sub-department-three/sub-department-three.component.html
+2
-2
sub-department-two.component.html
...unit/sub-department-two/sub-department-two.component.html
+2
-2
No files found.
src/app/components/company-components/account-settings/user-settings/user-settings.component.html
View file @
ca6384bb
...
...
@@ -174,13 +174,25 @@
<div
class=
"ti-modal-body padding-16px pt-0 overflow-y-0"
>
<label
class=
"ti-form-label mt-2rem"
>
ชื่อล็อคอิน
</label>
<input
type=
"text"
class=
"ti-form-input"
[
ngClass
]="{'
bg-input-readonly
'
:currentModal=
='edit'}"
[
readonly
]="
currentModal=
='edit'"
[(
ngModel
)]="
data
.
select
.
usernameId
"
[
maxLength
]="
20
"
>
[
readonly
]="
currentModal=
='edit'"
[(
ngModel
)]="
user
.
select
.
usernameId
"
[
maxLength
]="
20
"
>
<label
class=
"ti-form-label mt-2rem"
>
รหัสพนักงาน
</label>
<div
class=
"grid grid-cols-2 gap-2"
>
<div
class=
"relative flex rounded-md"
>
<input
type=
"text"
class=
"ti-form-input bg-input-readonly"
readonly
[(
ngModel
)]="
user
.
select
.
empId
"
>
<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"
>
<i
class=
"ti ti-circle-x cursor-pointer"
></i>
</button>
<button
type=
"button"
class=
"flex items-center text-gray-500 dark:text-white/70"
data-hs-overlay=
"#department-list-bu1-table-modal"
>
<i
class=
"ri-search-line cursor-pointer text-gray"
></i>
</button>
</div>
</div>
<input
type=
"text"
class=
"ti-form-input bg-input-readonly"
readonly
[(
ngModel
)]="
data
.
select
.
empId
"
>
<input
type=
"text"
class=
"ti-form-input bg-input-readonly"
readonly
[(
ngModel
)]="
data
.
select
.
employee
.
thFullName
"
>
[(
ngModel
)]="
user
.
select
.
employee
.
thFullName
"
>
</div>
<!-- <label class="ti-form-label mt-2rem">รายละเอียด (อังกฤษ)</label>
<input type="text" class="ti-form-input h-16" [(ngModel)]="data.select.edesc">
...
...
src/app/components/company-components/account-settings/user-settings/user-settings.component.ts
View file @
ca6384bb
import
{
ChangeDetectorRef
,
Component
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
EmployeeModel
,
MyEmployeeModel
}
from
'src/app/shared/model/employee.model'
;
import
{
MyUserModel
,
UserModel
}
from
'src/app/shared/model/user.model'
;
import
{
EmployeeService
}
from
'src/app/shared/services/employee.service'
;
import
{
FileService
}
from
'src/app/shared/services/file.service'
;
import
{
UserService
}
from
'src/app/shared/services/user.service'
;
...
...
@@ -14,28 +16,43 @@ export class UserSettingsComponent {
selectedFileName
:
string
=
'กรุณาเลือกไฟล์'
;
currentModal
:
'add'
|
'edit'
=
"add"
data
:
{
loading
:
boolean
,
select
:
UserModel
,
dataList
:
{
check
:
boolean
,
data
:
UserModel
}[]
}
=
{
loading
:
false
,
select
:
new
MyUserModel
(),
dataList
:
[]
}
user
:
{
loading
:
boolean
,
select
:
UserModel
,
dataList
:
{
check
:
boolean
,
data
:
UserModel
}[]
}
=
{
loading
:
false
,
select
:
new
MyUserModel
(),
dataList
:
[]
}
employee
:
{
loading
:
boolean
,
select
:
EmployeeModel
,
dataList
:
{
check
:
boolean
,
data
:
EmployeeModel
}[]
}
=
{
loading
:
false
,
select
:
new
MyEmployeeModel
(),
dataList
:
[]
}
constructor
(
private
toastr
:
ToastrService
,
private
cdr
:
ChangeDetectorRef
,
private
userService
:
UserService
,
private
employeeService
:
EmployeeService
,
private
fileService
:
FileService
)
{
}
ngOnInit
():
void
{
this
.
getUserList
()
this
.
getEmployeeList
()
}
getEmployeeList
()
{
this
.
employee
.
loading
=
true
this
.
employeeService
.
getList
().
subscribe
(
response
=>
{
this
.
employee
.
dataList
=
response
.
map
(
x
=>
({
check
:
false
,
data
:
new
MyEmployeeModel
(
x
)
}))
this
.
employee
.
loading
=
false
this
.
cdr
.
detectChanges
()
},
error
=>
{
this
.
employee
.
loading
=
false
this
.
cdr
.
detectChanges
()
})
}
getUserList
()
{
this
.
data
.
loading
=
true
this
.
user
.
loading
=
true
this
.
userService
.
getList
().
subscribe
(
response
=>
{
this
.
data
.
dataList
=
response
.
map
(
x
=>
({
check
:
false
,
data
:
new
MyUserModel
(
x
)
}))
this
.
data
.
loading
=
false
this
.
user
.
dataList
=
response
.
map
(
x
=>
({
check
:
false
,
data
:
new
MyUserModel
(
x
)
}))
this
.
user
.
loading
=
false
this
.
cdr
.
detectChanges
()
},
error
=>
{
this
.
data
.
loading
=
false
this
.
user
.
loading
=
false
this
.
cdr
.
detectChanges
()
})
}
select
User
(
data
?:
UserModel
)
{
this
.
data
.
select
=
new
MyUserModel
(
data
)
select
Data
(
filed
:
string
,
data
:
any
)
{
(
this
as
any
)[
filed
]
=
data
}
onFileSelected
(
event
:
any
)
{
this
.
selectedFile
=
event
.
target
.
files
.
length
>
0
?
event
.
target
.
files
[
0
]
:
null
;
...
...
@@ -48,21 +65,24 @@ export class UserSettingsComponent {
}
const
formData
=
new
FormData
();
formData
.
append
(
'file'
,
this
.
selectedFile
);
this
.
data
.
loading
=
true
this
.
user
.
loading
=
true
this
.
fileService
.
upload
(
formData
,
'mbu1'
).
subscribe
({
next
:
response
=>
{
if
(
response
.
success
)
{
this
.
showAlert
(
response
.
message
,
'success'
)
}
else
{
this
.
showAlert
(
response
.
message
,
'error'
)
this
.
data
.
loading
=
false
this
.
user
.
loading
=
false
}
},
error
:
error
=>
{
this
.
showAlert
(
error
.
message
,
'error'
)
this
.
data
.
loading
=
false
this
.
user
.
loading
=
false
}
})
}
selectUser
()
{
}
downloadFile
()
{
const
fileName
=
'IMPORT_USER.xlsx'
this
.
fileService
.
download
(
fileName
).
subscribe
({
...
...
src/app/components/company-components/company-registration/branch-business-unit/department-list/department-list.component.html
View file @
ca6384bb
...
...
@@ -191,7 +191,7 @@
<div
class=
"relative flex rounded-md"
>
<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
bg-input-readonly
"
readonly
class=
"ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
readonly
style=
"padding-right: 3.5rem;"
[(
ngModel
)]="
bu1
.
bu1id
"
(
ngModelChange
)="
bu1idChange
()"
>
<div
...
...
@@ -294,7 +294,7 @@
<div
class=
"relative flex rounded-md"
>
<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
bg-input-readonly
"
readonly
class=
"ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
readonly
style=
"padding-right: 3.5rem;"
[(
ngModel
)]="
bu1
.
bu1id
"
(
ngModelChange
)="
bu1idChange
()"
>
<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"
>
...
...
src/app/components/company-components/company-registration/branch-business-unit/section-registration/section-registration.component.html
View file @
ca6384bb
...
...
@@ -190,7 +190,7 @@
<div
class=
"relative flex rounded-md"
>
<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
bg-input-readonly
"
readonly
class=
"ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
readonly
style=
"padding-right: 3.5rem;"
[(
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"
>
...
...
@@ -297,7 +297,7 @@
<div
class=
"relative flex rounded-md"
>
<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
bg-input-readonly
"
readonly
class=
"ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
readonly
style=
"padding-right: 3.5rem;"
[(
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"
>
...
...
src/app/components/company-components/company-registration/branch-business-unit/sub-department-four/sub-department-four.component.html
View file @
ca6384bb
...
...
@@ -190,7 +190,7 @@
<div
class=
"relative flex rounded-md"
>
<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
bg-input-readonly
"
readonly
class=
"ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
readonly
style=
"padding-right: 3.5rem;"
[(
ngModel
)]="
bu6
.
bu6id
"
(
ngModelChange
)="
bu6idChange
()"
>
<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"
>
...
...
@@ -297,7 +297,7 @@
<div
class=
"relative flex rounded-md"
>
<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
bg-input-readonly
"
readonly
class=
"ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
readonly
style=
"padding-right: 3.5rem;"
[(
ngModel
)]="
bu6
.
bu6id
"
(
ngModelChange
)="
bu6idChange
()"
>
<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"
>
...
...
src/app/components/company-components/company-registration/branch-business-unit/sub-department-one/sub-department-one.component.html
View file @
ca6384bb
...
...
@@ -192,7 +192,7 @@
<div
class=
"relative flex rounded-md"
>
<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
bg-input-readonly
"
readonly
class=
"ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
readonly
style=
"padding-right: 3.5rem;"
[(
ngModel
)]="
bu3
.
bu3id
"
(
ngModelChange
)="
bu3idChange
()"
>
<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"
>
...
...
@@ -299,7 +299,7 @@
<div
class=
"relative flex rounded-md"
>
<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
bg-input-readonly
"
readonly
class=
"ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
readonly
style=
"padding-right: 3.5rem;"
[(
ngModel
)]="
bu3
.
bu3id
"
(
ngModelChange
)="
bu3idChange
()"
>
<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"
>
...
...
src/app/components/company-components/company-registration/branch-business-unit/sub-department-three/sub-department-three.component.html
View file @
ca6384bb
...
...
@@ -190,7 +190,7 @@
<div
class=
"relative flex rounded-md"
>
<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
bg-input-readonly
"
readonly
class=
"ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
readonly
style=
"padding-right: 3.5rem;"
[(
ngModel
)]="
bu5
.
bu5id
"
(
ngModelChange
)="
bu5idChange
()"
>
<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"
>
...
...
@@ -297,7 +297,7 @@
<div
class=
"relative flex rounded-md"
>
<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
bg-input-readonly
"
readonly
class=
"ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
readonly
style=
"padding-right: 3.5rem;"
[(
ngModel
)]="
bu5
.
bu5id
"
(
ngModelChange
)="
bu5idChange
()"
>
<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"
>
...
...
src/app/components/company-components/company-registration/branch-business-unit/sub-department-two/sub-department-two.component.html
View file @
ca6384bb
...
...
@@ -190,7 +190,7 @@
<div
class=
"relative flex rounded-md"
>
<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
bg-input-readonly
"
class=
"ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
readonly
style=
"padding-right: 3.5rem;"
[(
ngModel
)]="
bu4
.
bu4id
"
(
ngModelChange
)="
bu4idChange
()"
>
<div
...
...
@@ -298,7 +298,7 @@
<div
class=
"relative flex rounded-md"
>
<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
bg-input-readonly
"
class=
"ti-form-input rounded-sm ltr:rounded-r-sm rtl:rounded-l-sm focus:z-10"
readonly
style=
"padding-right: 3.5rem;"
[(
ngModel
)]="
bu4
.
bu4id
"
(
ngModelChange
)="
bu4idChange
()"
>
<div
...
...
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