Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
PSManagementUI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
hasan.bahjat
PSManagementUI
Commits
7d6a57cb
Commit
7d6a57cb
authored
Aug 22, 2024
by
hasan khaddour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add traks reuests
parent
20bbe93f
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
105 additions
and
67 deletions
+105
-67
jwt.interceptor.ts
src/app/core/interceptors/jwt.interceptor.ts
+1
-1
customer-details.component.html
...rs/pages/customer-details/customer-details.component.html
+31
-31
customer-details.component.ts
...mers/pages/customer-details/customer-details.component.ts
+14
-0
customer.service.ts
src/app/customers/services/customer.service.ts
+2
-2
financial-spending.service.spec.ts
src/app/projects/services/financial-spending.service.spec.ts
+0
-16
AddEmployeeTrackRequest.ts
src/app/tracks/models/requests/AddEmployeeTrackRequest.ts
+12
-0
AddStepTrackRequest.ts
src/app/tracks/models/requests/AddStepTrackRequest.ts
+8
-0
CreateTrackRequest.ts
src/app/tracks/models/requests/CreateTrackRequest.ts
+8
-0
GetTracksByProjectRequest.ts
src/app/tracks/models/requests/GetTracksByProjectRequest.ts
+5
-0
RemoveTrackRequest.ts
src/app/tracks/models/requests/RemoveTrackRequest.ts
+3
-0
UpdateEmployeeWorkTrackRequest.ts
.../tracks/models/requests/UpdateEmployeeWorkTrackRequest.ts
+12
-0
completeTrakRequest.ts
src/app/tracks/models/requests/completeTrakRequest.ts
+6
-0
track.service.spec.ts
src/app/tracks/services/track.service.spec.ts
+0
-16
track.service.ts
src/app/tracks/services/track.service.ts
+3
-1
No files found.
src/app/core/interceptors/jwt.interceptor.ts
View file @
7d6a57cb
...
...
@@ -15,7 +15,7 @@ export class JwtInterceptor implements HttpInterceptor {
if
(
token
)
{
request
=
request
.
clone
({
setHeaders
:
{
Authorization
:
`Bearer
${
token
.
trim
()}
`
Authorization
:
`Bearer
${
token
.
replace
(
/"/g
,
''
).
trim
()}
`
}
});
}
...
...
src/app/customers/pages/customer-details/customer-details.component.html
View file @
7d6a57cb
<div
*
ngIf=
"customer"
class=
"card col-6 offset-1 mb-3"
style=
"border-radius: .5rem;"
>
<div
class=
"row g-0"
>
<div
class=
"col-md-4 gradient-custom text-center text-black"
style=
"border-top-left-radius: .5rem; border-bottom-left-radius: .5rem;"
>
<h5>
{{customer.customerName}}
</h5>
<p>
{{customer.email}}
</p>
</div>
<div
class=
"col-md-8"
>
<div
class=
"card-body p-4"
>
<h6>
Information:
</h6>
<hr
class=
"mt-0 mb-4"
>
<div
class=
"row pt-1"
>
<div
class=
"col-6 mb-3"
>
<h6>
Address
</h6>
<p
class=
"text-muted"
>
{{customer.address.city}} - {{customer.address.streetName}}
</p>
<p
class=
"text-muted"
>
Street Name : {{customer.address.streetNumber}}
</p>
</div>
<div
class=
"container-fluid"
*
ngIf=
"customer"
>
<div
class=
"row justify-content-center"
>
<div
class=
"col-8 offset-2 "
>
<div
class=
"card shadow"
>
<div
class=
"card-body"
>
<div
class=
"col-6 col-sm-12 text-center mb-4"
>
<img
src=
"/assets/images/users/4.jpg"
class=
"navbar-brand-img brand-sm mx-auto mb-4"
alt=
"..."
>
<h3
class=
"mb-0 text-uppercase"
>
{{customer.customerName}}
</h3>
<p>
<small>
{{customer.email}}
</small></p>
</div>
</div>
<hr>
<div
class=
"row ml-4"
>
<p><strong>
العنوان
</strong></p>
<p>
المدينة {{customer.address.city}}
</p>
<p>
الشارع {{customer.address.streetName}} {{customer.address.streetNumber}}
</p>
</div>
<div
class=
"row mb-4"
>
<div
*
ngIf=
"customer.contactInfo.length!=0"
class=
"col-12 mb-3"
>
<h6>
contact Info
</h6>
<p
*
ngFor=
"let contact of customer.contactInfo"
class=
"text-muted"
>
{{contact.contactType}} - {{contact.contactValue}}
</p>
</div>
</div>
<div
class=
"row pt-1"
>
</div>
<button
class=
"col-4 offset-1 m-4 btn btn-danger"
(
click
)="
onDelete
(
customer
.
id
)"
>
إزالة
</button>
<button
class=
"col-4 m-4 btn btn-info"
(
click
)="
addContact
(
customer
.
id
)"
>
إضافة معلومة اتصال
</button>
</div>
</div>
</div>
</div>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
</div>
<!-- /.col-12 -->
</div>
<!-- .row -->
\ No newline at end of file
src/app/customers/pages/customer-details/customer-details.component.ts
View file @
7d6a57cb
...
...
@@ -33,4 +33,18 @@ export class CustomerDetailsComponent implements OnInit {
});
}
addContact
(
arg0
:
number
)
{
throw
new
Error
(
'Method not implemented.'
);
}
onDelete
(
id
:
number
)
{
this
.
customerService
.
deleteCustomer
(
id
).
subscribe
({
next
:
(
data
)
=>
{
this
.
toastr
.
success
(
'تم حذف الجهة بنجاح'
);
this
.
router
.
navigate
([
'/customers'
]);
},
error
:
(
err
)
=>
this
.
toastr
.
error
(
'لقد حدث خطاء ما'
)
});
}
}
\ No newline at end of file
src/app/customers/services/customer.service.ts
View file @
7d6a57cb
...
...
@@ -33,7 +33,7 @@ export class CustomerService {
return
this
.
http
.
put
<
void
>
(
`
${
this
.
config
.
getServerUrl
()}
/Customers/
${
id
}
`
,
customer
);
}
public
deleteCustomer
(
i
d
:
number
):
Observable
<
void
>
{
return
this
.
http
.
delete
<
void
>
(
`
${
this
.
config
.
getServerUrl
()}
/Customers/
${
i
d
}
`
);
public
deleteCustomer
(
customerI
d
:
number
):
Observable
<
void
>
{
return
this
.
http
.
delete
<
void
>
(
`
${
this
.
config
.
getServerUrl
()}
/Customers/
${
customerI
d
}
`
);
}
}
src/app/projects/services/financial-spending.service.spec.ts
deleted
100644 → 0
View file @
20bbe93f
import
{
TestBed
}
from
'@angular/core/testing'
;
import
{
FinancialSpendingService
}
from
'./financial-spending.service'
;
describe
(
'FinancialSpendingService'
,
()
=>
{
let
service
:
FinancialSpendingService
;
beforeEach
(()
=>
{
TestBed
.
configureTestingModule
({});
service
=
TestBed
.
inject
(
FinancialSpendingService
);
});
it
(
'should be created'
,
()
=>
{
expect
(
service
).
toBeTruthy
();
});
});
src/app/tracks/models/requests/AddEmployeeTrackRequest.ts
0 → 100644
View file @
7d6a57cb
import
{
EmployeeWork
}
from
"../valueObjects/EmployeeWork"
;
import
{
EmployeeWorkInfo
}
from
"../valueObjects/EmployeeWorkInfo"
;
export
class
AddEmployeeTrackRequest
{
trackId
:
number
;
employeeId
:
number
;
employeeWorkInfo
:
EmployeeWorkInfo
;
employeeWork
:
EmployeeWork
;
notes
:
string
;
projectId
:
number
;
}
src/app/tracks/models/requests/AddStepTrackRequest.ts
0 → 100644
View file @
7d6a57cb
export
class
AddStepTrackRequest
{
stepId
:
number
;
trackId
:
number
;
executionState
:
string
;
trackDate
:
Date
;
trackExecutionRatio
:
number
;
}
src/app/tracks/models/requests/CreateTrackRequest.ts
0 → 100644
View file @
7d6a57cb
import
{
TrackInfo
}
from
"../valueObjects/trackInfo"
;
export
class
CreateTrackRequest
{
trackInfo
:
TrackInfo
;
notes
:
string
;
projectId
:
number
;
}
src/app/tracks/models/requests/GetTracksByProjectRequest.ts
0 → 100644
View file @
7d6a57cb
export
class
GetTracksByProjectRequest
{
projectId
:
number
;
pageNumber
:
number
|
null
;
pageSize
:
number
|
null
;
}
src/app/tracks/models/requests/RemoveTrackRequest.ts
0 → 100644
View file @
7d6a57cb
export
class
RemoveTrackRequest
{
trackId
:
number
;
}
src/app/tracks/models/requests/UpdateEmployeeWorkTrackRequest.ts
0 → 100644
View file @
7d6a57cb
import
{
EmployeeWork
}
from
"../valueObjects/EmployeeWork"
;
import
{
EmployeeWorkInfo
}
from
"../valueObjects/EmployeeWorkInfo"
;
export
class
UpdateEmployeeWorkTrackRequest
{
employeeTrackId
:
number
;
trackId
:
number
;
employeeId
:
number
;
employeeWorkInfo
:
EmployeeWorkInfo
;
employeeWork
:
EmployeeWork
;
notes
:
string
;
}
src/app/tracks/models/requests/completeTrakRequest.ts
0 → 100644
View file @
7d6a57cb
export
class
CompleteTrackRequest
{
trackId
:
number
completionDate
:
number
projectId
:
number
}
src/app/tracks/services/track.service.spec.ts
deleted
100644 → 0
View file @
20bbe93f
import
{
TestBed
}
from
'@angular/core/testing'
;
import
{
TrackService
}
from
'./track.service'
;
describe
(
'TrackService'
,
()
=>
{
let
service
:
TrackService
;
beforeEach
(()
=>
{
TestBed
.
configureTestingModule
({});
service
=
TestBed
.
inject
(
TrackService
);
});
it
(
'should be created'
,
()
=>
{
expect
(
service
).
toBeTruthy
();
});
});
src/app/tracks/services/track.service.ts
View file @
7d6a57cb
import
{
HttpClient
}
from
'@angular/common/http'
;
import
{
Injectable
}
from
'@angular/core'
;
@
Injectable
({
...
...
@@ -5,5 +6,6 @@ import { Injectable } from '@angular/core';
})
export
class
TrackService
{
constructor
()
{
}
constructor
(
private
http
:
HttpClient
)
{
}
}
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