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
3adaa773
Commit
3adaa773
authored
Mar 12, 2025
by
DESKTOP-E0VCCBD\zedan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update services
parent
c797b756
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
225 additions
and
0 deletions
+225
-0
borrow-transactions.ts
Synto-Angular/src/app/models/borrow-transactions.ts
+19
-0
project-equipments.ts
Synto-Angular/src/app/models/project-equipments.ts
+21
-0
project-members.ts
Synto-Angular/src/app/models/project-members.ts
+21
-0
borrow-transactions.service.ts
...o-Angular/src/app/services/borrow-transactions.service.ts
+58
-0
project-equipments.service.ts
Synto-Angular/src/app/services/project-equipments.service.ts
+53
-0
project-members.service.ts
Synto-Angular/src/app/services/project-members.service.ts
+53
-0
No files found.
Synto-Angular/src/app/models/borrow-transactions.ts
0 → 100644
View file @
3adaa773
import
{
TranslateService
}
from
"@ngx-translate/core"
;
import
{
BaseModel
}
from
"./base.model"
;
export
class
BorrowTransactionsModel
extends
BaseModel
{
borrow_id
:
string
;
pe_id
:
string
;
quantity_borrowed
:
number
;
status
:
string
;
returned_date
?:
string
;
constructor
(
data
?:
Partial
<
BorrowTransactionsModel
>
,
translateService
?:
TranslateService
)
{
super
(
data
,
translateService
);
this
.
borrow_id
=
data
?.
borrow_id
??
''
;
this
.
pe_id
=
data
?.
pe_id
??
''
;
this
.
quantity_borrowed
=
data
?.
quantity_borrowed
??
0
;
this
.
status
=
data
?.
status
??
''
;
this
.
returned_date
=
data
?.
returned_date
??
null
;
}
}
Synto-Angular/src/app/models/project-equipments.ts
0 → 100644
View file @
3adaa773
import
{
TranslateService
}
from
"@ngx-translate/core"
;
import
{
BaseModel
}
from
"./base.model"
;
export
class
ProjectEquipmentModel
extends
BaseModel
{
pe_id
:
string
;
project_id
:
string
;
equipment_id
?:
string
;
quantity_in_project
:
number
;
created_at
:
string
;
updated_at
:
string
;
constructor
(
data
?:
Partial
<
ProjectEquipmentModel
>
,
translateService
?:
TranslateService
)
{
super
(
data
,
translateService
);
this
.
pe_id
=
data
?.
pe_id
??
''
;
this
.
project_id
=
data
?.
project_id
??
''
;
this
.
equipment_id
=
data
?.
equipment_id
??
''
;
this
.
quantity_in_project
=
data
?.
quantity_in_project
??
0
;
this
.
created_at
=
data
?.
created_at
??
new
Date
().
toISOString
();
this
.
updated_at
=
data
?.
updated_at
??
new
Date
().
toISOString
();
}
}
Synto-Angular/src/app/models/project-members.ts
0 → 100644
View file @
3adaa773
import
{
TranslateService
}
from
"@ngx-translate/core"
;
import
{
BaseModel
}
from
"./base.model"
;
export
class
ProjectMemberModel
extends
BaseModel
{
pm_id
:
string
;
user_id
:
string
;
project_id
:
string
;
role_in_project
:
string
;
created_at
:
string
;
updated_at
:
string
;
constructor
(
data
?:
Partial
<
ProjectMemberModel
>
,
translateService
?:
TranslateService
)
{
super
(
data
,
translateService
);
this
.
pm_id
=
data
?.
pm_id
??
''
;
this
.
user_id
=
data
?.
user_id
??
''
;
this
.
project_id
=
data
?.
project_id
??
''
;
this
.
role_in_project
=
data
?.
role_in_project
??
''
;
this
.
created_at
=
data
?.
created_at
??
new
Date
().
toISOString
();
this
.
updated_at
=
data
?.
updated_at
??
new
Date
().
toISOString
();
}
}
Synto-Angular/src/app/services/borrow-transactions.service.ts
0 → 100644
View file @
3adaa773
import
{
Injectable
}
from
'@angular/core'
;
import
{
HttpClient
}
from
'@angular/common/http'
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
environment
}
from
'src/environments/environment'
;
import
{
map
,
tap
,
switchMap
,
filter
,
reduce
}
from
"rxjs/operators"
;
import
{
ProjectEquipmentModel
}
from
'../models/project-equipments'
;
import
{
BorrowTransactionsModel
}
from
'../models/borrow-transactions'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
BorrowTransactionsService
{
apiBaseUrl
=
environment
.
baseUrl
+
"/borrow-transactions"
;
constructor
(
private
http
:
HttpClient
)
{
}
getById
(
id
:
string
)
{
return
this
.
http
.
get
<
BorrowTransactionsModel
>
(
this
.
apiBaseUrl
+
"/"
+
id
)
.
pipe
(
map
((
e
)
=>
new
BorrowTransactionsModel
(
e
)));
}
getLists
()
{
return
this
.
http
.
get
<
BorrowTransactionsModel
[]
>
(
this
.
apiBaseUrl
)
.
pipe
(
map
((
e
)
=>
e
.
map
((
e
)
=>
new
BorrowTransactionsModel
(
e
)))
);
}
save
(
body
:
BorrowTransactionsModel
)
{
return
this
.
http
.
post
<
{
"message"
:
string
,
"user"
:
BorrowTransactionsModel
}
>
(
this
.
apiBaseUrl
,
new
BorrowTransactionsModel
(
body
));
}
update
(
body
:
BorrowTransactionsModel
)
{
return
this
.
http
.
put
<
{
"message"
:
string
,
"user"
:
BorrowTransactionsModel
}
>
(
this
.
apiBaseUrl
+
"/"
+
body
.
borrow_id
,
new
BorrowTransactionsModel
(
body
));
}
delete
(
body
:
BorrowTransactionsModel
)
{
return
this
.
http
.
delete
<
{
"message"
:
string
,
"user"
:
BorrowTransactionsModel
}
>
(
this
.
apiBaseUrl
+
"/"
+
body
.
borrow_id
);
}
}
}
Synto-Angular/src/app/services/project-equipments.service.ts
0 → 100644
View file @
3adaa773
import
{
HttpClient
}
from
'@angular/common/http'
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
environment
}
from
'src/environments/environment'
;
import
{
map
,
tap
,
switchMap
,
filter
,
reduce
}
from
"rxjs/operators"
;
import
{
ProjectEquipmentModel
}
from
'../models/project-equipments'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
ProjectEquipmentService
{
apiBaseUrl
=
environment
.
baseUrl
+
"/project-equipments"
;
constructor
(
private
http
:
HttpClient
)
{
}
getById
(
id
:
string
)
{
return
this
.
http
.
get
<
ProjectEquipmentModel
>
(
this
.
apiBaseUrl
+
"/"
+
id
)
.
pipe
(
map
((
e
)
=>
new
ProjectEquipmentModel
(
e
)));
}
getLists
()
{
return
this
.
http
.
get
<
ProjectEquipmentModel
[]
>
(
this
.
apiBaseUrl
)
.
pipe
(
map
((
e
)
=>
e
.
map
((
e
)
=>
new
ProjectEquipmentModel
(
e
)))
);
}
save
(
body
:
ProjectEquipmentModel
)
{
return
this
.
http
.
post
<
{
"message"
:
string
,
"user"
:
ProjectEquipmentModel
}
>
(
this
.
apiBaseUrl
,
new
ProjectEquipmentModel
(
body
));
}
update
(
body
:
ProjectEquipmentModel
)
{
return
this
.
http
.
put
<
{
"message"
:
string
,
"user"
:
ProjectEquipmentModel
}
>
(
this
.
apiBaseUrl
+
"/"
+
body
.
equipment_id
,
new
ProjectEquipmentModel
(
body
));
}
delete
(
body
:
ProjectEquipmentModel
)
{
return
this
.
http
.
delete
<
{
"message"
:
string
,
"user"
:
ProjectEquipmentModel
}
>
(
this
.
apiBaseUrl
+
"/"
+
body
.
equipment_id
);
}
}
Synto-Angular/src/app/services/project-members.service.ts
0 → 100644
View file @
3adaa773
import
{
HttpClient
}
from
'@angular/common/http'
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
environment
}
from
'src/environments/environment'
;
import
{
map
,
tap
,
switchMap
,
filter
,
reduce
}
from
"rxjs/operators"
;
import
{
ProjectMemberModel
}
from
'../models/project-members'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
ProjectMemberService
{
apiBaseUrl
=
environment
.
baseUrl
+
"/project-members"
;
constructor
(
private
http
:
HttpClient
)
{
}
getById
(
id
:
string
)
{
return
this
.
http
.
get
<
ProjectMemberModel
>
(
this
.
apiBaseUrl
+
"/"
+
id
)
.
pipe
(
map
((
e
)
=>
new
ProjectMemberModel
(
e
)));
}
getLists
()
{
return
this
.
http
.
get
<
ProjectMemberModel
[]
>
(
this
.
apiBaseUrl
)
.
pipe
(
map
((
e
)
=>
e
.
map
((
e
)
=>
new
ProjectMemberModel
(
e
)))
);
}
save
(
body
:
ProjectMemberModel
)
{
return
this
.
http
.
post
<
{
"message"
:
string
,
"user"
:
ProjectMemberModel
}
>
(
this
.
apiBaseUrl
,
new
ProjectMemberModel
(
body
));
}
update
(
body
:
ProjectMemberModel
)
{
return
this
.
http
.
put
<
{
"message"
:
string
,
"user"
:
ProjectMemberModel
}
>
(
this
.
apiBaseUrl
+
"/"
+
body
.
user_id
,
new
ProjectMemberModel
(
body
));
}
delete
(
body
:
ProjectMemberModel
)
{
return
this
.
http
.
delete
<
{
"message"
:
string
,
"user"
:
ProjectMemberModel
}
>
(
this
.
apiBaseUrl
+
"/"
+
body
.
user_id
);
}
}
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