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
cdbb9d74
Commit
cdbb9d74
authored
Feb 05, 2025
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ทะเบียนบริษัท
parent
0825b2ac
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
18 deletions
+29
-18
company-registration-page.component.html
...egistration-page/company-registration-page.component.html
+3
-3
company-registration-page.component.ts
...-registration-page/company-registration-page.component.ts
+11
-2
sub-employee-registration.component.html
...yee-registration/sub-employee-registration.component.html
+2
-4
company.model.ts
src/app/shared/model/company.model.ts
+3
-0
company.service.ts
src/app/shared/services/company.service.ts
+10
-9
No files found.
src/app/components/company-components/company-registration/company-registration-page/company-registration-page.component.html
View file @
cdbb9d74
...
...
@@ -87,7 +87,7 @@
<tr
*
ngFor=
"let item of dataListFilter() | slice:((currentPage-1) * 10) : (((currentPage-1) * 10) + 10);let i = index"
>
<td
class=
"text-center"
>
<input
type=
"checkbox"
class=
"ti-form-checkbox cursor-pointer"
id=
"checkbox-{{item.data.code}}"
<input
*
ngIf=
"item.data.code!='100'"
type=
"checkbox"
class=
"ti-form-checkbox cursor-pointer"
id=
"checkbox-{{item.data.code}}"
[(
ngModel
)]="
item
.
check
"
>
<label
for=
"checkbox-{{item.data.code}}"
>
{{item.data.code}}
</label>
</td>
...
...
@@ -97,7 +97,7 @@
<i
class=
"ti ti-edit cursor-pointer i-gray fs-l px-1"
(
click
)="
modalStatus=
'edit'
;
setData
(
item
.
data
)"
data-hs-overlay=
"#company-registration-page-modal"
></i>
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
<i
class=
"ti ti-trash cursor-pointer i-gray fs-l px-1"
*
ngIf=
"item.data.code!='100'"
(
click
)="
modalStatus=
'delete'
;
setData
(
item
.
data
)"
data-hs-overlay=
"#company-registration-page-alert-modal"
></i>
</td>
...
...
@@ -270,7 +270,7 @@
ย้อนกลับ
</button>
<a
class=
"ti-btn ti-btn-danger"
href=
"javascript:void(0);"
data-hs-overlay=
"#company-registration-page-alert-modal"
>
data-hs-overlay=
"#company-registration-page-alert-modal"
(
click
)="
deleteCompany
()"
>
ลบข้อมูล
</a>
</ng-container>
...
...
src/app/components/company-components/company-registration/company-registration-page/company-registration-page.component.ts
View file @
cdbb9d74
...
...
@@ -36,7 +36,7 @@ export class CompanyRegistrationPageComponent {
this
.
dataLoading
=
true
this
.
companyService
.
getList
().
subscribe
({
next
:
response
=>
{
this
.
dataList
=
response
.
map
(
x
=>
({
check
:
false
,
data
:
{
code
:
x
.
companyId
,
tdesc
:
x
.
tdesc
,
edesc
:
x
.
edesc
,
address
:
x
.
taddr
,
contact
:
x
.
descOther
}
}))
this
.
dataList
=
response
.
map
(
x
=>
({
check
:
false
,
data
:
{
code
:
x
.
companyId
,
tdesc
:
x
.
tdesc
,
edesc
:
x
.
edesc
,
address
:
x
.
addressText
,
contact
:
x
.
descOther
}
}))
this
.
dataLoading
=
false
this
.
searchChange
()
this
.
cdr
.
detectChanges
()
...
...
@@ -63,7 +63,7 @@ export class CompanyRegistrationPageComponent {
}
addCompany
()
{
const
body
=
new
MyCompanyModel
({
companyId
:
this
.
dataSelect
.
code
,
tdesc
:
this
.
dataSelect
.
tdesc
,
edesc
:
this
.
dataSelect
.
edesc
,
taddr
:
this
.
dataSelect
.
address
,
descOther
:
this
.
dataSelect
.
contact
})
const
body
=
new
MyCompanyModel
({
companyId
:
this
.
dataSelect
.
code
,
tdesc
:
this
.
dataSelect
.
tdesc
,
edesc
:
this
.
dataSelect
.
edesc
,
addressText
:
this
.
dataSelect
.
address
,
descOther
:
this
.
dataSelect
.
contact
})
this
.
companyService
.
post
(
body
).
subscribe
((
response
:
any
)
=>
{
if
(
response
.
success
)
{
this
.
showSuccess
()
...
...
@@ -71,6 +71,15 @@ export class CompanyRegistrationPageComponent {
}
})
}
deleteCompany
()
{
const
body
=
new
MyCompanyModel
({
companyId
:
this
.
dataSelect
.
code
,
tdesc
:
this
.
dataSelect
.
tdesc
,
edesc
:
this
.
dataSelect
.
edesc
,
addressText
:
this
.
dataSelect
.
address
,
descOther
:
this
.
dataSelect
.
contact
})
this
.
companyService
.
delete
(
body
).
subscribe
((
response
:
any
)
=>
{
if
(
response
.
success
)
{
this
.
showSuccess
()
this
.
getCompanyList
()
}
})
}
showSuccess
()
{
this
.
toastr
.
success
(
'บันทึกข้อมูลสำเร็จ'
,
'แจ้งเตือน'
,
{
...
...
src/app/components/company-components/employee-registration/sub-employee-registration/sub-employee-registration.component.html
View file @
cdbb9d74
...
...
@@ -128,8 +128,6 @@
</div>
</div>
<div
id=
"sub-employee-registration-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"
>
...
...
@@ -166,7 +164,7 @@
</div>
</div>
</div>
<div
class=
"ti-modal-body
-content
mt-5"
>
<div
class=
"ti-modal-body mt-5"
>
<form
class=
"space-y-3"
>
<div
class=
"sm:grid grid-cols-12 gap-x-6"
>
<label
class=
"col-span-3 ti-form-label text-primary mt-2"
>
รหัสพนักงาน
</label>
...
...
@@ -368,7 +366,7 @@
</div>
</div>
</div>
<div
class=
"ti-modal-body
-content
mt-5"
>
<div
class=
"ti-modal-body mt-5"
>
<form
class=
"space-y-3"
>
<div
class=
"sm:grid grid-cols-12 gap-x-6"
>
<label
class=
"col-span-3 ti-form-label text-primary mt-2"
>
รหัสพนักงาน
</label>
...
...
src/app/shared/model/company.model.ts
View file @
cdbb9d74
...
...
@@ -46,6 +46,7 @@ export interface CompanyModel {
brandTdesc
:
string
brandEdesc
:
string
logo
:
string
addressText
:
string
}
...
...
@@ -97,6 +98,7 @@ export class MyCompanyModel implements CompanyModel {
brandTdesc
:
string
brandEdesc
:
string
logo
:
string
addressText
:
string
constructor
(
data
:
Partial
<
CompanyModel
>
)
{
this
.
companyId
=
data
.
companyId
||
""
this
.
tdesc
=
data
.
tdesc
||
""
...
...
@@ -145,6 +147,7 @@ export class MyCompanyModel implements CompanyModel {
this
.
brandTdesc
=
data
.
brandTdesc
||
""
this
.
brandEdesc
=
data
.
brandEdesc
||
""
this
.
logo
=
data
.
logo
||
""
this
.
addressText
=
data
.
addressText
||
""
}
}
src/app/shared/services/company.service.ts
View file @
cdbb9d74
...
...
@@ -20,13 +20,13 @@ export class CompanyService {
post
(
body
:
CompanyModel
)
{
return
this
.
http
.
post
(
this
.
urlApi
,
body
)
}
//
delete(body: CompanyModel) {
//
const options = {
//
headers: new HttpHeaders({
//
"Content-Type": "application/json",
//
}),
//
body: body
//
};
//
return this.http.delete(this.urlApi, options)
//
}
delete
(
body
:
CompanyModel
)
{
const
options
=
{
headers
:
new
HttpHeaders
({
"Content-Type"
:
"application/json"
,
}),
body
:
body
};
return
this
.
http
.
delete
(
this
.
urlApi
,
options
)
}
}
\ No newline at end of file
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