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
930f3d41
Commit
930f3d41
authored
Aug 24, 2024
by
hasan khaddour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement the main modules
parent
5aeb0c8b
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
441 additions
and
69 deletions
+441
-69
participate-item.component.html
...mponents/participate-item/participate-item.component.html
+1
-1
getEmployeeTrackHistoryRequest.ts
...ployees/models/requests/getEmployeeTrackHistoryRequest.ts
+2
-2
employees.service.ts
src/app/employees/services/employees.service.ts
+1
-1
step-row-item.component.html
...cts/components/step-row-item/step-row-item.component.html
+1
-1
project-details.component.html
...ects/pages/project-details/project-details.component.html
+126
-14
step.service.ts
src/app/projects/services/step.service.ts
+2
-2
shared.module.ts
src/app/shared/shared.module.ts
+1
-0
employee-history-item.component.css
...employee-history-item/employee-history-item.component.css
+0
-0
employee-history-item.component.html
...mployee-history-item/employee-history-item.component.html
+40
-0
employee-history-item.component.ts
.../employee-history-item/employee-history-item.component.ts
+12
-0
step-history-item.component.css
...history/step-history-item/step-history-item.component.css
+0
-0
step-history-item.component.html
...istory/step-history-item/step-history-item.component.html
+30
-0
step-history-item.component.ts
.../history/step-history-item/step-history-item.component.ts
+11
-0
add-employee-track-modal.component.html
...loyee-track-modal/add-employee-track-modal.component.html
+7
-1
add-employee-track-modal.component.ts
...mployee-track-modal/add-employee-track-modal.component.ts
+30
-8
employee-track-history.component.html
...loyee-track-history/employee-track-history.component.html
+26
-1
employee-track-history.component.ts
...mployee-track-history/employee-track-history.component.ts
+62
-0
step-track-details.component.html
...ages/step-track-details/step-track-details.component.html
+0
-1
step-track-details.component.ts
.../pages/step-track-details/step-track-details.component.ts
+0
-10
step-track-history.component.html
...ages/step-track-history/step-track-history.component.html
+26
-1
step-track-history.component.ts
.../pages/step-track-history/step-track-history.component.ts
+51
-2
track-create.component.html
...app/tracks/pages/track-create/track-create.component.html
+0
-1
track-create.component.ts
src/app/tracks/pages/track-create/track-create.component.ts
+0
-16
tracks-routing.module.ts
src/app/tracks/tracks-routing.module.ts
+5
-1
tracks.module.ts
src/app/tracks/tracks.module.ts
+7
-6
No files found.
src/app/employees/components/participate-item/participate-item.component.html
View file @
930f3d41
...
...
@@ -26,7 +26,7 @@
</div>
</div>
<div
class=
"col-auto"
>
<button
type=
"button"
class=
"btn m-4 btn-sm btn-primary"
>
استعراض المهام المكلف بها
</button>
<button
type=
"button"
[
routerLink
]="['/
tracks
/
project
/',
employeeParticipate
.
projectId
,'
employee
',
employeeParticipate
.
employeeId
]"
class=
"btn m-4 btn-sm btn-primary"
>
استعراض متابعاتي به
</button>
<button
type=
"button"
class=
"btn m-4 btn-sm btn-secondary"
>
تقرير بمشاركتي
</button>
</div>
</div>
...
...
src/app/employees/models/requests/getEmployeeTrackHistoryRequest.ts
View file @
930f3d41
export
class
GetEmployeeTrackHistoryRequest
{
employeeId
:
number
;
projectId
:
number
;
pageNumber
:
number
;
pageSize
:
number
;
pageNumber
:
number
|
null
;
pageSize
:
number
|
null
;
}
src/app/employees/services/employees.service.ts
View file @
930f3d41
...
...
@@ -67,7 +67,7 @@ export class EmployeesService {
return
this
.
http
.
get
<
EmployeeTrack
[]
>
(
`
${
this
.
config
.
getServerUrl
}
/Employees/TrackHistory/?
${
query
}
`
`
${
this
.
config
.
getServerUrl
()
}
/Employees/TrackHistory/?
${
query
}
`
);
}
...
...
src/app/projects/components/step-row-item/step-row-item.component.html
View file @
930f3d41
...
...
@@ -33,7 +33,7 @@
</div>
<div
class=
"col-auto"
>
<button
type=
"button"
class=
"btn m-2 btn-sm btn-primary"
>
استعراض تار
خ متابعتها
</button>
<button
type=
"button"
[
routerLink
]="['/
tracks
/
history
/
step
/',
step
.
id
]"
class=
"btn m-2 btn-sm btn-primary"
>
استعراض تاري
خ متابعتها
</button>
<button
type=
"button"
class=
"btn m-2 btn-sm btn-secondary"
>
تعديل المعلومات
</button>
<button
type=
"button"
(
click
)="
onDelete
()"
class=
"btn m-2 btn-sm btn-danger"
>
إزالة
</button>
...
...
src/app/projects/pages/project-details/project-details.component.html
View file @
930f3d41
...
...
@@ -3,11 +3,136 @@
<div
class=
"col-12 "
>
<div
class=
"row align-items-center mb-4"
>
<div
class=
"col"
>
<h2
class=
"h5 page-title"
><small
class=
"text-muted text-uppercase"
>
إدارة المشروع
</small></h2>
<h2
class=
"h5 page-title"
><small
class=
"text-muted text-uppercase"
></small></h2>
</div>
<div
class=
"col-auto"
>
</div>
</div>
<div
class=
"row justify-content-center"
>
<div
class=
"col-12"
>
<h2
class=
"h3 mb-4 page-title"
>
إدارة المشروع
</h2>
<div
class=
"row mt-5 align-items-center"
>
<div
class=
"col-md-3 text-center mb-5"
>
<div
class=
"avatar avatar-xl"
>
<img
src=
"./assets/images/users/4.jpg"
alt=
"..."
class=
"avatar-img "
>
</div>
</div>
<div
class=
"col"
>
<div
class=
"row align-items-center"
>
<div
class=
"col-md-7"
>
<h4
class=
"mb-1"
>
{{project.projectInfo.name}}
</h4>
<p
class=
"small mb-3"
><span
class=
"badge badge-dark"
>
{{project.currentState | stateTranslate}}
</span></p>
</div>
</div>
<div
class=
"row mb-4"
>
<div
class=
"col-md-7"
>
<p
class=
"text-muted"
>
{{project.projectInfo.description}}
</p>
</div>
<div
class=
"col"
>
<p
class=
"small mb-0 text-muted"
>
تاريخ البدء {{project.projectInfo.startDate | date}}
</p>
<p
class=
"small mb-0 text-muted"
>
تاريخ الانتهاء المتوقع {{project.projectInfo.expectedEndDate | date}}
</p>
<p
class=
"small mb-0 text-muted"
>
الرمز {{project.projectInfo.code}}
</p>
</div>
</div>
</div>
</div>
<div
class=
"row mt-5 align-items-center"
>
<div
class=
"col"
>
<div
class=
"row mb-4"
>
<div
class=
"col"
>
<p
class=
"small mb-0 text-muted"
>
التمويل {{project.financialFund.financialStatus}} / {{project.financialFund.source}}
</p>
<p
class=
"small mb-0 text-muted"
>
كتاب الطرح {{project.proposalInfo.proposingBookDate| date}} / {{project.proposalInfo.proposingBookNumber}}
</p>
<p
class=
"small mb-0 text-muted"
>
كتاب الموافقة {{project.projectAggreement.aggreementDate | date}} / {{project.projectAggreement.aggreementNumber}}
</p>
</div>
<div
class=
"col"
>
<p
class=
"small mb-0 text-muted"
>
الجهة الطارحة {{project.proposer.customerName}}
</p>
<p
class=
"small mb-0 text-muted"
>
مدير المشروع {{project.projectManager.personalInfo |fullname}}
</p>
<p
class=
"small mb-0 text-muted"
>
رئيس فريق العمل {{project.teamLeader.personalInfo | fullname}}
</p>
</div>
<div
class=
"col"
>
<p
class=
"small mb-0 text-muted"
>
الجهة المنفذة {{project.executer.name}}
</p>
<p
class=
"small mb-0 text-muted"
>
طبيعة النشاط {{project.projectClassification.projectNature}}
</p>
<p
class=
"small mb-0 text-muted"
>
تصنيف النشاط {{project.projectClassification.projectType}}
</p>
</div>
</div>
</div>
</div>
</div>
<div
class=
"row my-4"
>
<div
class=
"col-md-4"
>
<div
class=
"card mb-4 shadow"
>
<div
class=
"card-body my-n3"
>
<div
class=
"row align-items-center"
>
<div
class=
"col-3 text-center"
>
<span
class=
"circle circle-lg bg-light"
>
<i
class=
"fe fe-user fe-24 text-primary"
></i>
</span>
</div>
<!-- .col -->
<div
class=
"col"
>
<a
href=
"#"
>
<h3
class=
"h5 mt-4 mb-1"
>
Personal
</h3>
</a>
<p
class=
"text-muted"
>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris blandit nisl ullamcorper, rutrum metus in, congue lectus.
</p>
</div>
<!-- .col -->
</div>
<!-- .row -->
</div>
<!-- .card-body -->
<div
class=
"card-footer"
>
<a
href=
""
class=
"d-flex justify-content-between text-muted"
><span>
Account Settings
</span><i
class=
"fe fe-chevron-right"
></i></a>
</div>
<!-- .card-footer -->
</div>
<!-- .card -->
</div>
<!-- .col-md-->
<div
class=
"col-md-4"
>
<div
class=
"card mb-4 shadow"
>
<div
class=
"card-body my-n3"
>
<div
class=
"row align-items-center"
>
<div
class=
"col-3 text-center"
>
<span
class=
"circle circle-lg bg-light"
>
<i
class=
"fe fe-shield fe-24 text-primary"
></i>
</span>
</div>
<!-- .col -->
<div
class=
"col"
>
<a
href=
"#"
>
<h3
class=
"h5 mt-4 mb-1"
>
Security
</h3>
</a>
<p
class=
"text-muted"
>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris blandit nisl ullamcorper, rutrum metus in, congue lectus.
</p>
</div>
<!-- .col -->
</div>
<!-- .row -->
</div>
<!-- .card-body -->
<div
class=
"card-footer"
>
<a
href=
""
class=
"d-flex justify-content-between text-muted"
><span>
Security Settings
</span><i
class=
"fe fe-chevron-right"
></i></a>
</div>
<!-- .card-footer -->
</div>
<!-- .card -->
</div>
<!-- .col-md-->
<div
class=
"col-md-4"
>
<div
class=
"card mb-4 shadow"
>
<div
class=
"card-body my-n3"
>
<div
class=
"row align-items-center"
>
<div
class=
"col-3 text-center"
>
<span
class=
"circle circle-lg bg-light"
>
<i
class=
"fe fe-bell fe-24 text-primary"
></i>
</span>
</div>
<!-- .col -->
<div
class=
"col"
>
<a
href=
"#"
>
<h3
class=
"h5 mt-4 mb-1"
>
Notifications
</h3>
</a>
<p
class=
"text-muted"
>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris blandit nisl ullamcorper, rutrum metus in, congue lectus.
</p>
</div>
<!-- .col -->
</div>
<!-- .row -->
</div>
<!-- .card-body -->
<div
class=
"card-footer"
>
<a
href=
""
class=
"d-flex justify-content-between text-muted"
><span>
Notification Settings
</span><i
class=
"fe fe-chevron-right"
></i></a>
</div>
<!-- .card-footer -->
</div>
<!-- .card -->
</div>
<!-- .col-md-->
</div>
<!-- .row-->
</div>
<!-- /.col-12 -->
</div>
<div
class=
"card shadow"
id=
"pdfContent"
>
<div
class=
"card-body p-5"
>
<div
class=
"row "
>
...
...
@@ -173,19 +298,6 @@
<div
class=
"row mt-5"
>
<div
class=
"col-2 text-center"
>
<img
src=
"/assets/images/users/4.jpg"
class=
"navbar-brand-img brand-sm mx-auto my-4"
alt=
"..."
>
</div>
<div
class=
"col-8"
>
</div>
<div
class=
"col-2 text-center"
>
<img
src=
"/assets/images/users/4.jpg"
class=
"navbar-brand-img brand-sm mx-auto my-4"
alt=
"..."
>
</div>
</div>
<!-- /.row -->
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
</div>
<!-- /.col-12 -->
...
...
src/app/projects/services/step.service.ts
View file @
930f3d41
...
...
@@ -17,9 +17,9 @@ export class StepService {
// this method responsible for get a specificef step
//
public
getStepById
(
stepId
:
number
):
Observable
<
Step
[]
>
{
public
getStepById
(
stepId
:
number
):
Observable
<
Step
>
{
return
this
.
http
.
get
<
Step
[]
>
(
this
.
config
.
getServerUrl
()
+
"/Steps/"
+
stepId
);
return
this
.
http
.
get
<
Step
>
(
this
.
config
.
getServerUrl
()
+
"/Steps/"
+
stepId
);
}
// this method responsible for get the steps of a specified project
...
...
src/app/shared/shared.module.ts
View file @
930f3d41
...
...
@@ -37,6 +37,7 @@ import { StateTranslatePipe } from './pipes/stateTranslate/state-translate.pipe'
SidebarComponent
,
LayoutComponent
,
FullnamePipe
,
StateTranslatePipe
,
CardItemComponent
,
LoadingSpinnerComponent
],
schemas
:
[
CUSTOM_ELEMENTS_SCHEMA
]
...
...
src/app/tracks/
pages/step-track-details/step-track-details
.component.css
→
src/app/tracks/
components/history/employee-history-item/employee-history-item
.component.css
View file @
930f3d41
File moved
src/app/tracks/components/history/employee-history-item/employee-history-item.component.html
0 → 100644
View file @
930f3d41
<div
class=
"card shadow mb-4 col-9 offset-1"
>
<div
class=
"card-header "
>
<div
class=
"row align-items-center"
>
<div
class=
"col ml-n2"
>
<strong
class=
"mb-1"
>
عملية متابعة بتاريخ {{empoyeeTrack.trackInfo.trackDate | date}}
</strong><span
class=
" ml-1"
></span>
<p
class=
"small text-muted mb-1"
>
الملاحظات {{empoyeeTrack.notes}}
</p>
</div>
</div>
</div>
<div
class=
"card-body "
>
<div
class=
"row align-items-center"
>
<div
class=
"col-8 "
>
<div
class=
"small mb-2 d-flex"
>
<span
class=
"text-muted flex-fill"
>
نسبة المساهمة {{empoyeeTrack.employeeWork.contributingRatio}}
</span>
<span
class=
"text-muted"
>
الاعمال المسندة {{empoyeeTrack.employeeWorkInfo.performedWork}}
</span>
</div>
</div>
<div
class=
"col-8 "
>
<div
class=
"small mb-2 d-flex"
>
<span
class=
"text-muted flex-fill"
>
ساعات العمل المنفذة {{empoyeeTrack.employeeWork.workedHours}}
</span>
<span
class=
"text-muted"
>
العمل المنفذ {{empoyeeTrack.employeeWorkInfo.performedWork}}
</span>
</div>
</div>
<div
class=
"col-8 "
>
<div
class=
"col-auto"
>
<button
type=
"button "
[
routerLink
]="['/
tracks
/
project
/',
empoyeeTrack
.
trackId
]"
class=
"btn m-2 btn-sm btn-secondary"
>
الاطلاع على عملية المتابعة
</button>
</div>
</div>
</div>
</div>
<!-- / .card-body -->
</div>
\ No newline at end of file
src/app/tracks/components/history/employee-history-item/employee-history-item.component.ts
0 → 100644
View file @
930f3d41
import
{
Component
,
Input
}
from
'@angular/core'
;
import
{
EmployeeTrack
}
from
'../../../models/responses/employeeTrack'
;
@
Component
({
selector
:
'employee-history-item'
,
templateUrl
:
'./employee-history-item.component.html'
,
styleUrl
:
'./employee-history-item.component.css'
})
export
class
EmployeeHistoryItemComponent
{
@
Input
()
empoyeeTrack
:
EmployeeTrack
}
src/app/tracks/
pages/track-create/track-create
.component.css
→
src/app/tracks/
components/history/step-history-item/step-history-item
.component.css
View file @
930f3d41
File moved
src/app/tracks/components/history/step-history-item/step-history-item.component.html
0 → 100644
View file @
930f3d41
<div
class=
"card shadow mb-4 col-9 offset-1"
>
<div
class=
"card-header "
>
<div
class=
"row align-items-center"
>
<div
class=
"col ml-n2"
>
<strong
class=
"mb-1"
>
عملية متابعة بتاريخ {{stepTrack.trackInfo.trackDate | date}}
</strong><span
class=
" ml-1"
></span>
<p
class=
"small text-muted mb-1"
>
وضع التنفيذ {{stepTrack.executionState}}
</p>
</div>
</div>
</div>
<div
class=
"card-body "
>
<div
class=
"row align-items-center"
>
<div
class=
"col-8 "
>
<div
class=
"small mb-2 d-flex"
>
<span
class=
"text-muted flex-fill"
>
نسبة التنفيذ لحظة المتابعة {{stepTrack.trackExecutionRatio + stepTrack.oldExecutionRatio}}
</span>
<span
class=
"text-muted"
>
نسبة التنفيذ قبل {{stepTrack.oldExecutionRatio}}
</span>
</div>
</div>
<div
class=
"col-8 "
>
<div
class=
"col-auto"
>
<button
type=
"button "
[
routerLink
]="['/
tracks
/',
stepTrack
.
trackId
]"
class=
"btn m-2 btn-sm btn-secondary"
>
الاطلاع على عملية المتابعة
</button>
</div>
</div>
</div>
</div>
<!-- / .card-body -->
</div>
\ No newline at end of file
src/app/tracks/components/history/step-history-item/step-history-item.component.ts
0 → 100644
View file @
930f3d41
import
{
Component
,
Input
}
from
'@angular/core'
;
import
{
StepTrack
}
from
'../../../models/responses/steptrack'
;
@
Component
({
selector
:
'step-history-item'
,
templateUrl
:
'./step-history-item.component.html'
,
styleUrl
:
'./step-history-item.component.css'
})
export
class
StepHistoryItemComponent
{
@
Input
()
stepTrack
:
StepTrack
}
src/app/tracks/components/modals/add-employee-track-modal/add-employee-track-modal.component.html
View file @
930f3d41
...
...
@@ -11,7 +11,13 @@
<div
class=
"mb-3 col-4"
>
<label
for=
"hiastId"
class=
"form-label"
>
الرقم الذاتي لمشارك
</label>
<input
type=
"text"
id=
"hiastId"
formControlName=
"hiastId"
class=
"form-control"
[
ngbTypeahead
]="
search
"
(
selectItem
)="
onStepSelected
($
event
.
item
)"
>
<input
id=
"hiastId"
formControlName=
"hiastId"
class=
"form-control"
[
ngbTypeahead
]="
searchEmployees
"
(
selectItem
)="
onEmployeeSelected
($
event
)"
[
inputFormatter
]="
employeeFormatter
"
[
resultFormatter
]="
employeeFormatter
"
(
selectItem
)="
onStepSelected
($
event
.
item
)"
>
</div>
<input
type=
"number"
hidden
id=
"id"
formControlName=
"id"
class=
"form-control"
>
...
...
src/app/tracks/components/modals/add-employee-track-modal/add-employee-track-modal.component.ts
View file @
930f3d41
import
{
Component
,
EventEmitter
,
Input
,
Output
}
from
'@angular/core'
;
import
{
FormGroup
,
FormBuilder
,
Validators
}
from
'@angular/forms'
;
import
{
Modal
}
from
'bootstrap'
;
import
{
Observable
,
map
}
from
'rxjs'
;
import
{
Observable
,
debounceTime
,
distinctUntilChanged
,
map
}
from
'rxjs'
;
import
{
Step
}
from
'../../../../projects/models/responses/Step'
;
import
{
StepService
}
from
'../../../../projects/services/step.service'
;
import
{
AddStepTrackRequest
}
from
'../../../models/requests/AddStepTrackRequest'
;
...
...
@@ -11,6 +11,7 @@ import { ProjectService } from '../../../../projects/services/project.service';
import
{
EmployeeParticipate
}
from
'../../../../employees/models/responses/employeeParticipate'
;
import
{
EmployeeTrack
}
from
'../../../models/responses/employeeTrack'
;
import
{
FullnamePipe
}
from
'../../../../shared/pipes/fullName/fullname.pipe'
;
import
{
NgbTypeaheadSelectItemEvent
}
from
'@ng-bootstrap/ng-bootstrap'
;
@
Component
({
selector
:
'add-employee-track-modal'
,
...
...
@@ -67,12 +68,20 @@ export class AddEmployeeTrackModalComponent {
}
search
=
(
text
$
:
Observable
<
string
>
)
=>
search
Employees
=
(
text
$
:
Observable
<
string
>
)
=>
text$
.
pipe
(
map
(
term
=>
term
.
length
<
1
?
[]
:
this
.
filteredParticipants
.
filter
(
v
=>
v
.
hiastId
.
toString
().
includes
(
term
.
toLowerCase
())).
slice
(
0
,
10
).
map
(
e
=>
e
.
personalInfo
.
firstName
+
" "
+
e
.
personalInfo
.
lastName
))
);
debounceTime
(
200
),
distinctUntilChanged
(),
map
((
term
)
=>
term
.
length
<
1
?
[]
:
this
.
participants
.
filter
((
v
)
=>
v
.
employee
.
hiastId
.
toString
().
toLowerCase
().
includes
(
term
.
toLowerCase
()))
.
slice
(
0
,
10
)
)
)
onStepSelected
(
step
:
Employee
):
void
{
debugger
...
...
@@ -82,18 +91,31 @@ export class AddEmployeeTrackModalComponent {
}
employeeFormatter
=
(
result
:
any
)
:
string
=>
{
if
(
result
.
employee
==
undefined
){
return
''
}
return
`
${
result
.
employee
.
hiastId
}
-
${
result
.
employee
.
personalInfo
.
firstName
}
${
result
.
employee
.
personalInfo
.
lastName
}
`
;
}
onEmployeeSelected
(
event
:
NgbTypeaheadSelectItemEvent
):
void
{
debugger
this
.
stepTrackForm
.
patchValue
({
id
:
event
.
item
.
employeeId
});
}
onSubmit
():
void
{
if
(
this
.
stepTrackForm
.
valid
)
{
debugger
const
selectedStep
=
this
.
filteredParticipants
.
find
(
emp
=>
emp
.
hiastId
==
this
.
stepTrackForm
.
value
.
hiastI
d
);
const
selectedStep
=
this
.
filteredParticipants
.
find
(
emp
=>
emp
.
id
==
this
.
stepTrackForm
.
value
.
i
d
);
if
(
selectedStep
)
{
const
newEmployeeTrack
:
AddEmployeeTrackRequest
=
{
employeeId
:
selectedStep
.
id
,
trackId
:
this
.
trackId
,
employeeWork
:
{
workedHours
:
this
.
stepTrackForm
.
value
.
workedHours
,
assignedWorkingHours
:
this
.
stepTrackForm
.
value
.
assignedWork
,
assignedWorkingHours
:
this
.
stepTrackForm
.
value
.
assignedWork
ingHours
,
contributingRatio
:
this
.
stepTrackForm
.
value
.
contributingRatio
},
employeeWorkInfo
:{
...
...
src/app/tracks/pages/employee-track-history/employee-track-history.component.html
View file @
930f3d41
<p>
employee-track-history works!
</p>
<section
*
ngIf=
"employeeTrackHistory"
class=
"row"
>
<div
class=
"row justify-content-center"
>
<div
class=
"col-12"
>
<div
class=
"row align-items-center my-4"
>
<div
class=
"col"
>
<h4
class=
"h4 mb-0 page-title"
>
قائمة عمليات المتابعة للسيد : {{employee.personalInfo | fullname}}
<br>
{{projectInfo.name}}
</h4>
</div>
<div
class=
"col-auto"
>
<button
type=
"button"
class=
"btn btn-secondary"
><span
class=
"fe fe-file-plus fe-12 mr-2"
></span>
تقرير تاريخ متابعة
</button>
</div>
</div>
<hr>
<employee-history-item
*
ngFor=
"let employeeTrack of employeeTrackHistory"
[
empoyeeTrack
]="
employeeTrack
"
>
</employee-history-item>
<div
*
ngIf=
"employeeTrackHistory.length==0"
>
لم تتم متابعة هذا العامل من قبل
</div>
</div>
</div>
</section>
src/app/tracks/pages/employee-track-history/employee-track-history.component.ts
View file @
930f3d41
import
{
Component
}
from
'@angular/core'
;
import
{
Employee
}
from
'../../../employees/models/responses/employee'
;
import
{
EmployeeTrack
}
from
'../../models/responses/employeeTrack'
;
import
{
EmployeesService
}
from
'../../../employees/services/employees.service'
;
import
{
ActivatedRoute
}
from
'@angular/router'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
GetStepTrackHistoryRequest
}
from
'../../../projects/models/requests/step-requests/GetStepTrackHistoryRequest'
;
import
{
GetEmployeeTrackHistoryRequest
}
from
'../../../employees/models/requests/getEmployeeTrackHistoryRequest'
;
import
{
ProjectInfo
}
from
'../../../projects/models/valueObjects/ProjectInfo'
;
@
Component
({
selector
:
'employee-track-history'
,
...
...
@@ -6,5 +14,59 @@ import { Component } from '@angular/core';
styleUrl
:
'./employee-track-history.component.css'
})
export
class
EmployeeTrackHistoryComponent
{
projectId
:
number
employeeId
:
number
projectInfo
:
ProjectInfo
employee
:
Employee
employeeTrackHistory
:
EmployeeTrack
[]
constructor
(
private
employeeService
:
EmployeesService
,
private
route
:
ActivatedRoute
,
private
toastr
:
ToastrService
){}
ngOnInit
():
void
{
this
.
employeeId
=
Number
(
this
.
route
.
snapshot
.
paramMap
.
get
(
'employeeId'
));
this
.
projectId
=
Number
(
this
.
route
.
snapshot
.
paramMap
.
get
(
'projectId'
));
let
request
:
GetEmployeeTrackHistoryRequest
=
{
employeeId
:
this
.
employeeId
,
projectId
:
this
.
projectId
,
pageNumber
:
null
,
pageSize
:
null
}
this
.
employeeService
.
getEmployeeTrackHistory
(
request
)
.
subscribe
({
next
:
(
data
)
=>
{
this
.
employeeTrackHistory
=
data
;
this
.
toastr
.
success
(
"تم تحميل تاريخ المتابعة بنجاح"
)
},
error
:(
err
)
=>
{
this
.
toastr
.
error
(
'لقد حدث خطاء ما'
)
}
});
this
.
employeeService
.
getEmployeeById
(
this
.
employeeId
).
subscribe
({
next
:
(
data
)
=>
{
this
.
employee
=
data
;
}
});
this
.
employeeService
.
getEmployeeParticipations
(
this
.
employeeId
).
subscribe
({
next
:
(
data
)
=>
{
this
.
projectInfo
=
data
.
at
(
0
)
!
.
projectInfo
;
}
});
}
}
src/app/tracks/pages/step-track-details/step-track-details.component.html
deleted
100644 → 0
View file @
5aeb0c8b
<p>
step-track-details works!
</p>
src/app/tracks/pages/step-track-details/step-track-details.component.ts
deleted
100644 → 0
View file @
5aeb0c8b
import
{
Component
}
from
'@angular/core'
;
@
Component
({
selector
:
'step-track-details'
,
templateUrl
:
'./step-track-details.component.html'
,
styleUrl
:
'./step-track-details.component.css'
})
export
class
StepTrackDetailsComponent
{
}
src/app/tracks/pages/step-track-history/step-track-history.component.html
View file @
930f3d41
<p>
step-track-history works!
</p>
<section
*
ngIf=
"stepTrackHistory"
class=
"row"
>
<div
class=
"row justify-content-center"
>
<div
class=
"col-12"
>
<div
class=
"row align-items-center my-4"
>
<div
class=
"col"
>
<h2
class=
"h3 mb-0 page-title"
>
قائمة عمليات المتابعة للمرحالة : {{step.stepInfo.stepName}}
</h2>
</div>
<div
class=
"col-auto"
>
<button
type=
"button"
class=
"btn btn-secondary"
><span
class=
"fe fe-file-plus fe-12 mr-2"
></span>
تقرير تاريخ متابعة
</button>
</div>
</div>
<hr>
<step-history-item
*
ngFor=
"let stepTrack of stepTrackHistory"
[
stepTrack
]="
stepTrack
"
>
</step-history-item>
<div
*
ngIf=
"stepTrackHistory.length==0"
>
لم تتم متابعة هذه المرحلة من قبل
</div>
</div>
</div>
</section>
src/app/tracks/pages/step-track-history/step-track-history.component.ts
View file @
930f3d41
import
{
Component
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
TrackService
}
from
'../../services/track.service'
;
import
{
ActivatedRoute
}
from
'@angular/router'
;
import
{
StepTrack
}
from
'../../models/responses/steptrack'
;
import
{
StepService
}
from
'../../../projects/services/step.service'
;
import
{
GetStepTrackHistoryRequest
}
from
'../../../projects/models/requests/step-requests/GetStepTrackHistoryRequest'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
Step
}
from
'../../../projects/models/responses/Step'
;
@
Component
({
selector
:
'step-track-history'
,
templateUrl
:
'./step-track-history.component.html'
,
styleUrl
:
'./step-track-history.component.css'
})
export
class
StepTrackHistoryComponent
{
export
class
StepTrackHistoryComponent
implements
OnInit
{
stepId
:
number
step
:
Step
stepTrackHistory
:
StepTrack
[]
constructor
(
private
stepService
:
StepService
,
private
route
:
ActivatedRoute
,
private
toastr
:
ToastrService
){}
ngOnInit
():
void
{
this
.
stepId
=
Number
(
this
.
route
.
snapshot
.
paramMap
.
get
(
'id'
));
let
request
:
GetStepTrackHistoryRequest
=
{
stepId
:
this
.
stepId
,
pageNumber
:
null
,
pageSize
:
null
}
this
.
stepService
.
getStepTrackHistory
(
request
)
.
subscribe
({
next
:
(
data
)
=>
{
this
.
stepTrackHistory
=
data
;
this
.
toastr
.
success
(
"تم تحميل تاريخ المتابعة بنجاح"
)
},
error
:(
err
)
=>
{
this
.
toastr
.
error
(
'لقد حصل خطاء ما'
)
}
});
this
.
stepService
.
getStepById
(
this
.
stepId
).
subscribe
({
next
:
(
data
)
=>
{
this
.
step
=
data
;
}
});
}
}
src/app/tracks/pages/track-create/track-create.component.html
deleted
100644 → 0
View file @
5aeb0c8b
<p>
track-create works!
</p>
src/app/tracks/pages/track-create/track-create.component.ts
deleted
100644 → 0
View file @
5aeb0c8b
import
{
Component
}
from
'@angular/core'
;
@
Component
({
selector
:
'track-create'
,
templateUrl
:
'./track-create.component.html'
,
styleUrl
:
'./track-create.component.css'
})
export
class
TrackCreateComponent
{
projectId
:
Number
constructor
(){}
}
src/app/tracks/tracks-routing.module.ts
View file @
930f3d41
...
...
@@ -2,11 +2,15 @@ import { NgModule } from '@angular/core';
import
{
RouterModule
,
Routes
}
from
'@angular/router'
;
import
{
TracksComponent
}
from
'./pages/tracks/tracks.component'
;
import
{
TrackDetailsComponent
}
from
'./pages/track-details/track-details.component'
;
import
{
StepTrackHistoryComponent
}
from
'./pages/step-track-history/step-track-history.component'
;
import
{
EmployeeTrackHistoryComponent
}
from
'./pages/employee-track-history/employee-track-history.component'
;
const
routes
:
Routes
=
[
{
path
:
'project/:id'
,
component
:
TracksComponent
},
{
path
:
'detail/:id'
,
component
:
TrackDetailsComponent
}
{
path
:
'detail/:id'
,
component
:
TrackDetailsComponent
},
{
path
:
'history/step/:id'
,
component
:
StepTrackHistoryComponent
}
,
{
path
:
'project/:projectId/employee/:employeeId'
,
component
:
EmployeeTrackHistoryComponent
}
];
...
...
src/app/tracks/tracks.module.ts
View file @
930f3d41
...
...
@@ -6,11 +6,9 @@ import { TracksComponent } from './pages/tracks/tracks.component';
import
{
TrackDetailsComponent
}
from
'./pages/track-details/track-details.component'
;
import
{
StepTrackComponent
}
from
'./components/step-track/step-track.component'
;
import
{
EmployeeTrackComponent
}
from
'./components/employee-track/employee-track.component'
;
import
{
StepTrackDetailsComponent
}
from
'./pages/step-track-details/step-track-details.component'
;
import
{
ProjectTrackHistoryComponent
}
from
'./pages/project-track-history/project-track-history.component'
;
import
{
StepTrackHistoryComponent
}
from
'./pages/step-track-history/step-track-history.component'
;
import
{
EmployeeTrackHistoryComponent
}
from
'./pages/employee-track-history/employee-track-history.component'
;
import
{
TrackCreateComponent
}
from
'./pages/track-create/track-create.component'
;
import
{
AddTrackModalComponent
}
from
'./components/modals/add-track-modal/add-track-modal.component'
;
import
{
AddStepTrackModalComponent
}
from
'./components/modals/add-step-track-modal/add-step-track-modal.component'
;
import
{
AddEmployeeTrackModalComponent
}
from
'./components/modals/add-employee-track-modal/add-employee-track-modal.component'
;
...
...
@@ -25,6 +23,9 @@ import { MatInputModule } from '@angular/material/input';
import
{
MatSelectModule
}
from
'@angular/material/select'
;
import
{
RouterModule
}
from
'@angular/router'
;
import
{
NgbModule
}
from
'@ng-bootstrap/ng-bootstrap'
;
import
{
StepHistoryItemComponent
}
from
'./components/history/step-history-item/step-history-item.component'
;
import
{
EmployeeHistoryItemComponent
}
from
'./components/history/employee-history-item/employee-history-item.component'
;
import
{
StateTranslatePipe
}
from
'../shared/pipes/stateTranslate/state-translate.pipe'
;
@
NgModule
({
...
...
@@ -33,15 +34,15 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
TrackDetailsComponent
,
StepTrackComponent
,
EmployeeTrackComponent
,
StepTrackDetailsComponent
,
ProjectTrackHistoryComponent
,
StepTrackHistoryComponent
,
EmployeeTrackHistoryComponent
,
TrackCreateComponent
,
AddTrackModalComponent
,
AddStepTrackModalComponent
,
AddEmployeeTrackModalComponent
,
TrackItemComponent
TrackItemComponent
,
StepHistoryItemComponent
,
EmployeeHistoryItemComponent
],
imports
:
[
CommonModule
,
...
...
@@ -53,7 +54,7 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
MatDatepickerModule
,
RouterModule
,
MatInputModule
,
ReactiveFormsModule
,
ReactiveFormsModule
,
NgbModule
,
SharedModule
,
FormsModule
,
...
...
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