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
382fb28b
Commit
382fb28b
authored
Aug 27, 2024
by
hasan khaddour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add completuon report
parent
d6447fc8
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
120 additions
and
34 deletions
+120
-34
employeeContribution.ts
src/app/projects/models/responses/employeeContribution.ts
+9
-0
project.service.ts
src/app/projects/services/project.service.ts
+19
-0
employee-contribution-table.component.html
...ribution-table/employee-contribution-table.component.html
+35
-1
employee-contribution-table.component.ts
...ntribution-table/employee-contribution-table.component.ts
+3
-2
employeeContribution.ts
src/app/reports/models/employeeContribution.ts
+0
-10
project-completion.component.html
...ages/project-completion/project-completion.component.html
+10
-12
project-completion.component.ts
.../pages/project-completion/project-completion.component.ts
+17
-4
project-definition.component.html
...ages/project-definition/project-definition.component.html
+3
-0
reports-routing.module.ts
src/app/reports/reports-routing.module.ts
+2
-0
state-translate.pipe.ts
src/app/shared/pipes/stateTranslate/state-translate.pipe.ts
+1
-1
add-step-track-modal.component.ts
...ls/add-step-track-modal/add-step-track-modal.component.ts
+1
-1
complete-track-modal.component.ts
...ls/complete-track-modal/complete-track-modal.component.ts
+2
-1
track-details.component.html
...p/tracks/pages/track-details/track-details.component.html
+1
-1
track-details.component.ts
...app/tracks/pages/track-details/track-details.component.ts
+16
-0
track.service.ts
src/app/tracks/services/track.service.ts
+1
-1
No files found.
src/app/projects/models/responses/employeeContribution.ts
0 → 100644
View file @
382fb28b
import
{
Employee
}
from
"../../../employees/models/responses/employee"
import
{
PersonalInfo
}
from
"../../../employees/models/vakueObjects/personalInfo"
import
{
WorkInfo
}
from
"../../../employees/models/vakueObjects/workInfo"
export
class
EmployeeContribution
{
employee
:
Employee
contributionRatio
:
number
}
\ No newline at end of file
src/app/projects/services/project.service.ts
View file @
382fb28b
...
...
@@ -20,6 +20,7 @@ import { CompleteProjectRequest } from '../models/requests/project-requests/comp
import
{
ChangeEmployeeParticipationRequest
}
from
'../models/requests/project-requests/ChangeEmployeeParticipationRequest'
;
import
{
ParticipationChange
}
from
'../models/responses/participationChange'
;
import
{
ProjectCompletion
}
from
'../models/responses/ProjectCompletion'
;
import
{
EmployeeContribution
}
from
'../models/responses/employeeContribution'
;
@
Injectable
({
providedIn
:
'root'
...
...
@@ -86,8 +87,21 @@ export class ProjectService {
.
get
<
Project
[]
>
(
`
${
this
.
config
.
getServerUrl
()}
/Projects/ByFilter/?teamLeaderId=
${
request
.
teamLeaderrId
}${
pagination
}
`
);
}
public
getCompletionContribution
(
projectId
:
number
):
Observable
<
EmployeeContribution
[]
>
{
return
this
.
http
.
get
<
EmployeeContribution
[]
>
(
`
${
this
.
config
.
getServerUrl
()}
/Projects/CompletionContributions/
${
projectId
}
`
);
}
//#endregion queries
//#region planning managment
//tihs method responsible for hanging the team leader
...
...
@@ -216,6 +230,11 @@ export class ProjectService {
return
this
.
http
.
get
<
Attachment
[]
>
(
this
.
config
.
getServerUrl
()
+
"/Projects/Attachments/?projectId="
+
projectId
);
}
public
removeAttachment
(
projectId
:
number
,
attachmentId
:
number
):
Observable
<
Attachment
[]
>
{
return
this
.
http
.
get
<
Attachment
[]
>
(
this
.
config
.
getServerUrl
()
+
"/Projects/RemoveAttachment/?projectId="
+
projectId
+
"&attachmentId="
+
attachmentId
);
}
//#endregion attachments
...
...
src/app/reports/componenets/employee-contribution-table/employee-contribution-table.component.html
View file @
382fb28b
<p>
employee-contribution-table works!
</p>
<p><strong>
المساهمين في المشروع
</strong></p>
<table
class=
"table table-borderless table-striped"
>
<thead>
<tr>
<th
scope=
"col"
class=
"text-center"
>
#
</th>
<th
scope=
"col"
class=
"text-center"
>
الرقم الذاتي
</th>
<th
scope=
"col"
class=
"text-center"
>
اسم المشارك
</th>
<th
scope=
"col"
class=
"text-center"
>
الهيئة
</th>
<th
scope=
"col"
class=
"text-center"
>
الهيئة
</th>
<th
scope=
"col"
class=
"text-center"
>
نسبة المساهمة
</th>
</tr>
</thead>
<tbody>
<tr
*
ngFor=
"let participant of contributers ; index as i "
>
<th
scope=
"row"
class=
"text-center"
>
{{i+1}}
</th>
<td
class=
"text-center"
>
{{participant.employee.hiastId}}
</td>
<td
class=
"text-center"
>
{{participant.employee.personalInfo | fullname }}
</td>
<td
class=
"text-center"
>
{{participant.employee.workInfo.workJob}}
</td>
<td
class=
"text-center"
>
{{participant.employee.workInfo.workType}}
</td>
<td
class=
"text-center"
>
{{participant.contributionRatio}}
</td>
</tr>
<tr
*
ngIf=
"contributers.length==0"
>
<th
scope=
"row"
></th>
<td
class=
"text-center"
>
</td>
<td
class=
"text-center"
></td>
<td
class=
"text-center"
></td>
<td
class=
"text-center"
></td>
<td
class=
"text-center"
></td>
</tr>
</tbody>
</table>
src/app/reports/componenets/employee-contribution-table/employee-contribution-table.component.ts
View file @
382fb28b
import
{
Component
}
from
'@angular/core'
;
import
{
Component
,
Input
}
from
'@angular/core'
;
import
{
EmployeeContribution
}
from
'../../../projects/models/responses/employeeContribution'
;
@
Component
({
selector
:
'employee-contribution-table'
,
...
...
@@ -6,5 +7,5 @@ import { Component } from '@angular/core';
styleUrl
:
'./employee-contribution-table.component.css'
})
export
class
EmployeeContributionTableComponent
{
@
Input
()
contributers
:
EmployeeContribution
[]
}
src/app/reports/models/employeeContribution.ts
deleted
100644 → 0
View file @
d6447fc8
import
{
PersonalInfo
}
from
"../../employees/models/vakueObjects/personalInfo"
import
{
WorkInfo
}
from
"../../employees/models/vakueObjects/workInfo"
export
class
EmployeeContribution
{
Email
:
string
hiastId
:
number
personalInof
:
PersonalInfo
workInof
:
WorkInfo
contribution
:
number
}
\ No newline at end of file
src/app/reports/pages/project-completion/project-completion.component.html
View file @
382fb28b
<div
class=
"container-fluid"
*
ngIf=
"project"
>
<div
class=
"container-fluid"
*
ngIf=
"project
&& contributers
"
>
<div
class=
"row justify-content-center"
>
<div
class=
"col-12"
>
<div
class=
"row align-items-center mb-4"
>
...
...
@@ -35,16 +35,14 @@
<project-header
[
projectInfo
]="
project
.
projectInfo
"
></project-header>
<project-subjective
[
project
]="
project
"
>
</project-subjective>
<hr
/>
<p><strong>
مراحل المشروع
</strong></p>
<step-table
[
steps
]="
project
.
steps
"
></step-table>
<hr
/>
<participants-table
[
employeeParticipates
]="
project
.
employeeParticipates
"
></participants-table>
<p><strong>
خطة الانفاق
</strong></p>
<financial-spend-table
[
financialSpending
]="
project
.
financialSpending
"
></financial-spend-table>
<p><strong>
مساهمات العاملين بالانجاز
</strong></p>
<employee-contribution-table
[
contributers
]="
contributers
"
>
</employee-contribution-table>
<hr>
<project-footer
[
proposer
]="
project
.
proposer
"
...
...
src/app/reports/pages/project-completion/project-completion.component.ts
View file @
382fb28b
...
...
@@ -4,7 +4,7 @@ import { ActivatedRoute, Router } from '@angular/router';
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
ProjectService
}
from
'../../../projects/services/project.service'
;
import
{
ProjectCompletion
}
from
'../../../projects/models/responses/ProjectCompletion'
;
import
{
EmployeeContribution
}
from
'../../
model
s/employeeContribution'
;
import
{
EmployeeContribution
}
from
'../../
../projects/models/response
s/employeeContribution'
;
import
{
Track
}
from
'../../../tracks/models/responses/track'
;
@
Component
({
...
...
@@ -43,15 +43,28 @@ export class ProjectCompletionComponent implements OnInit{
this
.
toastr
.
error
(
'المشروع لم ينجز بعد'
);
this
.
router
.
navigate
([
'/'
]);
}
else
{
this
.
loadCompletion
();
// this.loadCompletion();
this
.
loadContributions
();
}
}
});
}
loadTracks
(){
loadContributions
()
{
this
.
projectService
.
getCompletionContribution
(
this
.
projectId
)
.
subscribe
({
next
:
(
data
)
=>
{
this
.
contributers
=
data
;
}
});
}
loadCompletion
()
{
this
.
projectService
...
...
src/app/reports/pages/project-definition/project-definition.component.html
View file @
382fb28b
...
...
@@ -15,6 +15,9 @@
>
طباعة
</button>
<button
*
ngIf=
"project.currentState.toLocaleLowerCase()=='completed'"
[
routerLink
]="['/
reports
/
completion
',
project
.
id
]"
type=
"button"
class=
"btn mr-1 btn-secondary m-1"
>
تقرير انجاز
</button>
<button
type=
"button"
class=
"btn mr-1 btn-secondary m-1"
>
تقرير متابعة المراحل
</button>
...
...
src/app/reports/reports-routing.module.ts
View file @
382fb28b
...
...
@@ -2,10 +2,12 @@ import { NgModule } from '@angular/core';
import
{
RouterModule
,
Routes
}
from
'@angular/router'
;
import
{
ProjectDefinitionComponent
}
from
'./pages/project-definition/project-definition.component'
;
import
{
ProjectTimeLineComponent
}
from
'./pages/project-time-line/project-time-line.component'
;
import
{
ProjectCompletionComponent
}
from
'./pages/project-completion/project-completion.component'
;
const
routes
:
Routes
=
[
{
path
:
'definition/:id'
,
component
:
ProjectDefinitionComponent
},
{
path
:
'timeline/:id'
,
component
:
ProjectTimeLineComponent
},
{
path
:
'completion/:id'
,
component
:
ProjectCompletionComponent
}
];
...
...
src/app/shared/pipes/stateTranslate/state-translate.pipe.ts
View file @
382fb28b
...
...
@@ -10,7 +10,7 @@ export class StateTranslatePipe implements PipeTransform {
switch
(
state
){
case
"InPlan"
:
return
"يخطط"
;
case
"Complete"
:
case
"Complete
d
"
:
return
"مكتمل"
;
case
"InProgress"
:
return
"التنفيذ"
;
...
...
src/app/tracks/components/modals/add-step-track-modal/add-step-track-modal.component.ts
View file @
382fb28b
src/app/tracks/components/modals/complete-track-modal/complete-track-modal.component.ts
View file @
382fb28b
...
...
@@ -72,10 +72,11 @@ export class CompleteTrackModalComponent {
private
_setCanMove
(){
this
.
canComplete
=
this
.
canComplete
=
!
this
.
track
.
trackInfo
.
isCompleted
console
.
log
(
this
.
track
)
}
...
...
src/app/tracks/pages/track-details/track-details.component.html
View file @
382fb28b
...
...
@@ -55,7 +55,7 @@
<div
class=
"row"
>
<div
class=
"col-6 label "
>
تاريخ عملية المتابعة {{track.trackInfo.trackDate | date}}
</div>
<button
class=
"col-2 mr-1 btn btn-primary"
*
ngIf=
"!track.trackInfo.isCompleted"
>
اكمال المتابعة
</button>
<button
(
click
)="
openComplete
()"
class=
"col-2 mr-1 btn btn-primary"
*
ngIf=
"!track.trackInfo.isCompleted"
>
اكمال المتابعة
</button>
<div
class=
"col-2 btn disabled btn-success "
>
{{track.trackInfo.isCompleted ? 'مكتملة':'غير مكتملة'}}
</div>
</div>
...
...
src/app/tracks/pages/track-details/track-details.component.ts
View file @
382fb28b
...
...
@@ -159,6 +159,22 @@ export class TrackDetailsComponent implements OnInit {
}
openComplete
(){
const
modalRef
=
this
.
modalService
.
open
(
CompleteTrackModalComponent
);
modalRef
.
componentInstance
.
track
=
this
.
track
;
modalRef
.
result
.
then
((
result
)
=>
{
if
(
result
)
{
// Add the new project to the list
this
.
loadParticipants
();
}
},
(
reason
)
=>
{
});
}
loadTheNewStep
(
stId
:
number
,
request
:
AddStepTrackRequest
){
...
...
src/app/tracks/services/track.service.ts
View file @
382fb28b
...
...
@@ -101,7 +101,7 @@ export class TrackService {
return
this
.
http
.
post
<
void
>
(
`
${
this
.
config
.
getServerUrl
()}
/Tracks/
AddStep
Track/`
,
request
.
post
<
void
>
(
`
${
this
.
config
.
getServerUrl
()}
/Tracks/
Complete
Track/`
,
request
);
}
...
...
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