Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
BookingMyHrManagement
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
Chanachai
BookingMyHrManagement
Commits
c1b1b97c
Project 'angular/myAppraisal' was moved to 'angular/mySkill-x'. Please update any links and bookmarks that may still have the old path.
Commit
c1b1b97c
authored
Mar 15, 2025
by
DESKTOP-E0VCCBD\zedan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
9df7d108
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
73 additions
and
37 deletions
+73
-37
userController.js
API/src/controllers/userController.js
+2
-1
User.js
API/src/models/User.js
+10
-0
product-management.component.html
...dmin/product-management/product-management.component.html
+0
-0
product-management.component.ts
.../admin/product-management/product-management.component.ts
+44
-33
project-management.component.html
...dmin/project-management/project-management.component.html
+0
-0
project-management.component.ts
.../admin/project-management/project-management.component.ts
+12
-3
user-management.component.html
.../app/admin/user-management/user-management.component.html
+0
-0
equipments.model.ts
Synto-Angular/src/app/models/equipments.model.ts
+2
-0
project.model.ts
Synto-Angular/src/app/models/project.model.ts
+3
-0
No files found.
API/src/controllers/userController.js
View file @
c1b1b97c
...
...
@@ -14,7 +14,8 @@ exports.createUser = async (req, res) => {
first_name
:
newUser
.
first_name
,
last_name
:
newUser
.
last_name
,
email
:
newUser
.
email
,
role
:
newUser
.
role
role
:
newUser
.
role
,
phone
:
newUser
.
phone
}
});
}
catch
(
error
)
{
...
...
API/src/models/User.js
View file @
c1b1b97c
...
...
@@ -9,6 +9,12 @@ const User = sequelize.define('User', {
defaultValue
:
DataTypes
.
UUIDV4
,
primaryKey
:
true
,
},
profile_picture
:
{
type
:
DataTypes
.
STRING
(
500
),
allowNull
:
true
,
},
first_name
:
{
type
:
DataTypes
.
STRING
(
100
),
allowNull
:
false
,
...
...
@@ -17,6 +23,10 @@ const User = sequelize.define('User', {
type
:
DataTypes
.
STRING
(
100
),
allowNull
:
false
,
},
phone
:
{
type
:
DataTypes
.
STRING
(
100
),
allowNull
:
false
,
},
email
:
{
type
:
DataTypes
.
STRING
(
255
),
allowNull
:
false
,
...
...
Synto-Angular/src/app/admin/product-management/product-management.component.html
View file @
c1b1b97c
This diff is collapsed.
Click to expand it.
Synto-Angular/src/app/admin/product-management/product-management.component.ts
View file @
c1b1b97c
...
...
@@ -11,51 +11,62 @@ import { EquipmentModel } from 'src/app/models/equipments.model';
export
class
ProductManagementComponent
{
productList
:
EquipmentModel
[]
=
[]
selectedProduct
?:
EquipmentModel
constructor
(
private
EquipmentService
:
EquipmentService
)
{
}
selectedProduct
?:
EquipmentModel
constructor
(
private
EquipmentService
:
EquipmentService
)
{
}
ngOnInit
()
{
this
.
getUser
()
}
ngOnInit
()
{
this
.
getProduct
()
}
getUser
()
{
this
.
EquipmentService
.
getLists
().
subscribe
(
result
=>
{
this
.
productList
=
result
})
}
getProduct
()
{
this
.
EquipmentService
.
getLists
().
subscribe
(
result
=>
{
this
.
productList
=
result
})
}
getUserId
()
{
this
.
EquipmentService
.
getById
(
"73079f3b-b58a-46e6-a779-20a64911e505"
).
subscribe
(
result
=>
{
getProductId
()
{
this
.
EquipmentService
.
getById
(
"73079f3b-b58a-46e6-a779-20a64911e505"
).
subscribe
(
result
=>
{
console
.
log
(
result
)
})
}
saveProduct
()
{
if
(
this
.
selectedProduct
)
{
this
.
EquipmentService
.
save
(
this
.
selectedProduct
).
subscribe
(
result
=>
{
console
.
log
(
result
)
})
}
}
saveUser
()
{
if
(
this
.
selectedProduct
)
{
this
.
EquipmentService
.
save
(
this
.
selectedProduct
).
subscribe
(
result
=>
{
console
.
log
(
result
)
})
}
}
deleteUser
()
{
if
(
this
.
selectedProduct
)
{
this
.
EquipmentService
.
delete
(
this
.
selectedProduct
).
subscribe
(
result
=>
{
console
.
log
(
result
)
})
}
updateProduct
()
{
if
(
this
.
selectedProduct
)
{
this
.
EquipmentService
.
update
(
this
.
selectedProduct
).
subscribe
(
result
=>
{
console
.
log
(
result
)
})
}
}
updateUser
()
{
if
(
this
.
selectedProduct
)
{
this
.
EquipmentService
.
update
(
this
.
selectedProduct
).
subscribe
(
result
=>
{
console
.
log
(
result
)
})
}
}
addToCart
()
{
addToCart
(){
}
deleteProduct
(
product
:
EquipmentModel
)
{
this
.
selectedProduct
=
new
EquipmentModel
(
product
)
if
(
this
.
selectedProduct
)
{
this
.
EquipmentService
.
delete
(
this
.
selectedProduct
).
subscribe
(
result
=>
{
console
.
log
(
result
)
})
}
}
newproduct
()
{
this
.
selectedProduct
=
new
EquipmentModel
()
}
detailproduct
(
pj
:
EquipmentModel
)
{
this
.
selectedProduct
=
new
EquipmentModel
(
pj
)
}
}
Synto-Angular/src/app/admin/project-management/project-management.component.html
View file @
c1b1b97c
This diff is collapsed.
Click to expand it.
Synto-Angular/src/app/admin/project-management/project-management.component.ts
View file @
c1b1b97c
...
...
@@ -10,8 +10,7 @@ import { ProjectService } from 'src/app/services/project.service';
})
export
class
ProjectManagementComponent
{
projectList
:
any
[]
=
[];
projectList
:
ProJectModel
[]
=
[];
selectedProject
?:
ProJectModel
constructor
(
private
projectService
:
ProjectService
)
{
}
...
...
@@ -39,7 +38,8 @@ export class ProjectManagementComponent {
}
}
deleteProject
()
{
deleteProject
(
project
:
ProJectModel
)
{
this
.
selectedProject
=
new
ProJectModel
(
project
)
if
(
this
.
selectedProject
)
{
this
.
projectService
.
delete
(
this
.
selectedProject
).
subscribe
(
result
=>
{
console
.
log
(
result
)
...
...
@@ -55,4 +55,13 @@ export class ProjectManagementComponent {
}
}
newPj
()
{
this
.
selectedProject
=
new
ProJectModel
()
}
detailPj
(
pj
:
ProJectModel
)
{
this
.
selectedProject
=
new
ProJectModel
(
pj
)
}
}
Synto-Angular/src/app/admin/user-management/user-management.component.html
View file @
c1b1b97c
This diff is collapsed.
Click to expand it.
Synto-Angular/src/app/models/equipments.model.ts
View file @
c1b1b97c
...
...
@@ -3,6 +3,7 @@ import { BaseModel } from "./base.model";
export
class
EquipmentModel
extends
BaseModel
{
equipment_id
:
string
;
picture
:
string
;
equipment_name
:
string
;
description
?:
string
;
quantity_total
:
number
;
...
...
@@ -13,6 +14,7 @@ export class EquipmentModel extends BaseModel {
constructor
(
data
?:
Partial
<
EquipmentModel
>
,
translateService
?:
TranslateService
)
{
super
(
data
,
translateService
);
this
.
picture
=
data
?.
picture
??
''
;
this
.
equipment_id
=
data
?.
equipment_id
??
''
;
this
.
equipment_name
=
data
?.
equipment_name
??
''
;
this
.
description
=
data
?.
description
??
''
;
...
...
Synto-Angular/src/app/models/project.model.ts
View file @
c1b1b97c
import
{
TranslateService
}
from
"@ngx-translate/core"
;
import
{
BaseModel
}
from
"./base.model"
;
import
{
da
}
from
"date-fns/locale"
;
export
class
ProJectModel
extends
BaseModel
{
project_id
:
string
;
picture
:
string
;
project_name
:
string
;
project_desc
?:
string
;
start_date
:
string
;
...
...
@@ -12,6 +14,7 @@ export class ProJectModel extends BaseModel {
constructor
(
data
?:
Partial
<
ProJectModel
>
,
translateService
?:
TranslateService
)
{
super
(
data
,
translateService
);
this
.
picture
=
data
?.
picture
??
''
;
this
.
project_id
=
data
?.
project_id
??
''
;
this
.
project_name
=
data
?.
project_name
??
''
;
this
.
project_desc
=
data
?.
project_desc
??
''
;
...
...
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