Commit 21546edb authored by hasan khaddour's avatar hasan khaddour

add reprot

parent 96cafcae
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div *ngIf="!canMoveToProgress"> <div *ngIf="!canMoveToProgress">
للأسف , لاتستطيع الانتقال إلى مرحلة التخطيط لأن مجموع الاوزان للمراحل ليس مئة,قم بالتعديل ومن ثم أعد المحاولة
</div> {{errMessage}}
</div>
<div *ngIf="canMoveToProgress"> <div *ngIf="canMoveToProgress">
<p>هل أنت متأكد من أنك تريد الانتقال إلى مرحلة التنفيذ </p> <p>هل أنت متأكد من أنك تريد الانتقال إلى مرحلة التنفيذ </p>
</div> </div>
......
...@@ -13,6 +13,8 @@ export class ProjectToprogressModalComponent implements OnInit { ...@@ -13,6 +13,8 @@ export class ProjectToprogressModalComponent implements OnInit {
@Input() project : Project @Input() project : Project
errMessage =''
canMoveToProgress : boolean canMoveToProgress : boolean
constructor( constructor(
private projectServie : ProjectService , private projectServie : ProjectService ,
...@@ -62,7 +64,13 @@ export class ProjectToprogressModalComponent implements OnInit { ...@@ -62,7 +64,13 @@ export class ProjectToprogressModalComponent implements OnInit {
this this
.canMoveToProgress = total == 100 ? true : false .canMoveToProgress = total == 100 ? true : false
if(!this.canMoveToProgress){
this.errMessage='للأسف , لاتستطيع الانتقال إلى مرحلة التخطيط لأن مجموع الاوزان للمراحل ليس مئة,قم بالتعديل ومن ثم أعد المحاولة'
}
if(this.project.currentState.toLocaleLowerCase()!= 'inplan'){
this.errMessage= 'لاتستطيع الانتقال إلى طور التنفيذ مالم تكن في طور التخطيط'
}
} }
} }
...@@ -86,8 +86,8 @@ ...@@ -86,8 +86,8 @@
<!-- Delete Confirmation --> <!-- Delete Confirmation -->
<div *ngIf="modalMode === 'delete'"> <div *ngIf="modalMode === 'delete'">
<p>هل أنت متأكد من أنك تريد حذف عنصر {{ selectedItem.costType }}?</p> <p>هل أنت متأكد من أنك تريد حذف عنصر {{ selectedItem.costType }}?</p>
<button type="button" class="btn m-4 btn-danger" (click)="delete()">Delete</button> <button type="button" class="btn m-4 btn-danger" (click)="delete()">إزالة</button>
<button type="button" class="btn m-4 btn-secondary" data-bs-dismiss="modal">Cancel</button> <button type="button" class="btn m-4 btn-secondary" data-bs-dismiss="modal">إلغاء</button>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -32,7 +32,7 @@ export class FinancialSpendingService { ...@@ -32,7 +32,7 @@ export class FinancialSpendingService {
} }
public delete(request : RemoveFinancialSpendItemRequest ):Observable<any>{ public delete(request : RemoveFinancialSpendItemRequest ):Observable<any>{
return this.http.delete(`${this.config.getServerUrl()}/FinancialSpends/ByProject/${request.id}?id=${request.id}&projectId=${request.projectId}`); return this.http.delete(`${this.config.getServerUrl()}/FinancialSpends/${request.id}?id=${request.id}&projectId=${request.projectId}`);
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="row align-items-center mb-4"> <div class="row align-items-center mb-4">
<div class="col"> <div class="col">
<h2 class="h5 page-title"> <h2 class="h5 page-title">
<small class="text-muted text-uppercase">بطاقة معلومات مشروع</small> <small class="text-muted text-uppercase">بطاقة انجاز مشروع</small>
</h2> </h2>
</div> </div>
<div class="col-auto"> <div class="col-auto">
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
<project-header [projectInfo]="project.projectInfo"></project-header> <project-header [projectInfo]="project.projectInfo"></project-header>
<project-subjective [project]="project"> </project-subjective> <project-subjective [project]="project"> </project-subjective>
<hr /> <hr />
<p><strong>تقييم الجهة الطارحة</strong>{{completion.customerRate}}</p> <p><strong>تقييم الجهة الطارحة :</strong>{{completion.customerRate}}</p>
<p><strong>ملاحظات الجهة الطارحة</strong>{{completion.customerNotes}}</p> <p><strong>ملاحظات الجهة الطارحة :</strong>{{completion.customerNotes}}</p>
<p><strong>تاريخ الانهاء</strong>{{completion.completionDate | date }}</p> <p><strong>تاريخ الانهاء :</strong>{{completion.completionDate | date }}</p>
<employee-contribution-table <employee-contribution-table
[contributers]="contributers" [contributers]="contributers"
......
<div class="container-fluid" *ngIf="project &&step&& stepsTrack ">
<div class="row justify-content-center">
<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>
</div>
<div class="col-auto">
<button
type="button"
class="btn mr-1 btn-secondary m-1"
>
طباعة
</button>
<button *ngIf="project.currentState.toLowerCase()=='completed'" type="button" class="btn mr-1 btn-secondary m-1">
تقرير انجاز
</button>
<button
type="button"
[routerLink]="['/reports/timeline/', project.id]"
class="btn mr-1 btn-secondary m-1"
>
تقرير خطة زمنية
</button>
</div>
</div>
<div class="card shadow" id="pdfContent">
<div class="card-body p-5">
<project-header [projectInfo]="project.projectInfo"></project-header>
<project-subjective [project]="project"> </project-subjective>
<hr />
<p>
<strong>
قائمة تاريخ متابعة {{step.stepInfo.stepName}}
</strong>
</p>
<step-trak-table
[stepsTrack]="stepsTrack">
</step-trak-table>
<hr>
<project-footer
[proposer]="project.proposer"
[executer]="project.executer"
[projectManager]="project.projectManager"
[teamLeader]="project.teamLeader"
>
</project-footer>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
</div>
<!-- /.col-12 -->
</div>
</div>
\ No newline at end of file
import { Component } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { ToastrService } from 'ngx-toastr';
import { Project } from '../../../projects/models/responses/project';
import { ProjectService } from '../../../projects/services/project.service';
import { StepTrack } from '../../../tracks/models/responses/steptrack';
import { TrackService } from '../../../tracks/services/track.service';
import { StepService } from '../../../projects/services/step.service';
import { GetStepTrackHistoryRequest } from '../../../projects/models/requests/step-requests/GetStepTrackHistoryRequest';
import { Step } from '../../../projects/models/responses/Step';
@Component({
selector: 'step-track-report',
templateUrl: './step-track-report.component.html',
styleUrl: './step-track-report.component.css'
})
export class StepTrackReportComponent {
stepId :number
project :Project
projectId: number
stepsTrack : StepTrack[]
step :Step
constructor(
private tostrService :ToastrService ,
private stepService : StepService,
private projectService : ProjectService,
private route : ActivatedRoute,
private router : Router
){}
ngOnInit(): void {
this.stepId= Number(this.route.snapshot.paramMap.get('stepId'))
this.projectId= Number(this.route.snapshot.paramMap.get('projectId'))
this.loadSteptrack();
this.loadProject();
}
loadSteptrack() {
let request : GetStepTrackHistoryRequest ={
stepId:this.stepId,
pageNumber:null,
pageSize:null
}
this
.stepService
.getStepTrackHistory(request)
.subscribe({
next : (data)=>{
this.stepsTrack=data;
}
});
this
.stepService
.getStepById(this.stepId)
.subscribe({
next: (data)=>{
this.step=data
}
});
}
loadProject() {
this
.projectService
.getProjectById(this.projectId)
.subscribe({
next: (data)=>{
this.tostrService.success('تم تحميل التقرير بنجاح')
this.project=data
}
});
}
}
...@@ -22,6 +22,7 @@ import { EmployeeContributionTableComponent } from './componenets/employee-contr ...@@ -22,6 +22,7 @@ import { EmployeeContributionTableComponent } from './componenets/employee-contr
import { TrackRowItemComponent } from './componenets/tracks-components/track-row-item/track-row-item.component'; import { TrackRowItemComponent } from './componenets/tracks-components/track-row-item/track-row-item.component';
import { EmployeeWorkTrackComponent } from './pages/employee-work-track/employee-work-track.component'; import { EmployeeWorkTrackComponent } from './pages/employee-work-track/employee-work-track.component';
import { ProjectSubjectivUnformalComponent } from './componenets/project-report-layout/project-subjectiv-unformal/project-subjectiv-unformal.component'; import { ProjectSubjectivUnformalComponent } from './componenets/project-report-layout/project-subjectiv-unformal/project-subjectiv-unformal.component';
import { StepTrackReportComponent } from './pages/step-track-report/step-track-report.component';
@NgModule({ @NgModule({
...@@ -44,7 +45,8 @@ import { ProjectSubjectivUnformalComponent } from './componenets/project-report- ...@@ -44,7 +45,8 @@ import { ProjectSubjectivUnformalComponent } from './componenets/project-report-
EmployeeContributionTableComponent, EmployeeContributionTableComponent,
TrackRowItemComponent, TrackRowItemComponent,
EmployeeWorkTrackComponent, EmployeeWorkTrackComponent,
ProjectSubjectivUnformalComponent ProjectSubjectivUnformalComponent,
StepTrackReportComponent
], ],
imports: [ imports: [
CommonModule, CommonModule,
......
...@@ -8,6 +8,7 @@ import { ProjectTimeLineComponent } from '../pages/project-time-line/project-tim ...@@ -8,6 +8,7 @@ import { ProjectTimeLineComponent } from '../pages/project-time-line/project-tim
import { ProjectTrackHistoryComponent } from '../pages/project-track-history/project-track-history.component'; import { ProjectTrackHistoryComponent } from '../pages/project-track-history/project-track-history.component';
import { StepsTrackReportComponent } from '../pages/steps-track-report/steps-track-report.component'; import { StepsTrackReportComponent } from '../pages/steps-track-report/steps-track-report.component';
import { EmployeeWorkTrackComponent } from '../pages/employee-work-track/employee-work-track.component'; import { EmployeeWorkTrackComponent } from '../pages/employee-work-track/employee-work-track.component';
import { StepTrackReportComponent } from '../pages/step-track-report/step-track-report.component';
const routes: Routes = [ const routes: Routes = [
{path: 'definition/:id',component:ProjectDefinitionComponent}, {path: 'definition/:id',component:ProjectDefinitionComponent},
...@@ -16,7 +17,10 @@ const routes: Routes = [ ...@@ -16,7 +17,10 @@ const routes: Routes = [
{path: 'employees-tracks/:projectId/track/:id',component:EmployeesTrackReportComponent} , {path: 'employees-tracks/:projectId/track/:id',component:EmployeesTrackReportComponent} ,
{path: 'steps-tracks/:projectId/track/:id',component:StepsTrackReportComponent}, {path: 'steps-tracks/:projectId/track/:id',component:StepsTrackReportComponent},
{path: 'history/:projectId',component:ProjectTrackHistoryComponent} , {path: 'history/:projectId',component:ProjectTrackHistoryComponent} ,
{path: 'contributions/:projectId/employee/:employeeId',component:EmployeeWorkTrackComponent} {path: 'contributions/:projectId/employee/:employeeId',component:EmployeeWorkTrackComponent} ,
{path: 'history/:projectId/step/:stepId',component:StepTrackReportComponent}
]; ];
......
...@@ -23,8 +23,7 @@ ...@@ -23,8 +23,7 @@
<div class="col-auto"> <div class="col-auto">
<button type="button " class="btn m-2 btn-sm btn-secondary">تاريخ المتابعة</button> <button type="button "[routerLink]="['/track/history/step',stepTrack.stepId]" class="btn m-2 btn-sm btn-secondary">تاريخ المتابعة</button>
<button type="button" class="btn m-2 btn-sm btn-secondary">تعديل</button> <button type="button" class="btn m-2 btn-sm btn-secondary">تعديل</button>
</div> </div>
</div> </div>
......
...@@ -8,5 +8,6 @@ import { StepTrack } from '../../models/responses/steptrack'; ...@@ -8,5 +8,6 @@ import { StepTrack } from '../../models/responses/steptrack';
}) })
export class StepTrackComponent { export class StepTrackComponent {
@Input() projectId : number
@Input() stepTrack :StepTrack @Input() stepTrack :StepTrack
} }
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<div class="col-auto"> <div class="col-auto">
<button type="button" [routerLink]="['/tracks/detail/',track.id]" class="btn m-2 btn-sm btn-secondary">تفاصيل المتابعة</button> <button type="button" [routerLink]="['/tracks/detail/',track.id]" class="btn m-2 btn-sm btn-secondary">تفاصيل المتابعة</button>
<button type="button" (click)="onDelete()"class="btn m-2 btn-sm btn-danger">إزالة</button> <button type="button" *ngIf="!track.trackInfo.isCompleted" (click)="onDelete()"class="btn m-2 btn-sm btn-danger">إزالة</button>
</div> </div>
</div> </div>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<h3 class="h3 mb-0 page-title"> قائمة عمليات المتابعة للمرحلة : {{step.stepInfo.stepName}} </h3> <h3 class="h3 mb-0 page-title"> قائمة عمليات المتابعة للمرحلة : {{step.stepInfo.stepName}} </h3>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<button type="button" class="btn btn-secondary"><span class="fe fe-file-plus fe-12 mr-2"></span>تقرير تاريخ متابعة </button> <button type="button" [routerLink]="['/reports/history',step.projectId,'step',step.id]" class="btn btn-secondary"><span class="fe fe-file-plus fe-12 mr-2"></span>تقرير تاريخ متابعة </button>
</div> </div>
</div> </div>
<hr> <hr>
......
...@@ -22,12 +22,14 @@ ...@@ -22,12 +22,14 @@
<!-- Bordered Tabs --> <!-- Bordered Tabs -->
<ul class="nav nav-tabs nav-tabs-bordered" role="tablist"> <ul class="nav nav-tabs nav-tabs-bordered" role="tablist">
<li class="nav-item" role="presentation"> <li class="nav-item pr-1 pl-1" role="presentation">
<button class="nav-link pr-2 pl-2 text-center active" data-bs-toggle="tab" data-bs-target="#profile-overview" aria-selected="true" role="tab" tabindex="-1">ملخص </button> <button class="nav-link text-center active"
data-bs-toggle="tab" data-bs-target="#profile-overview" aria-selected="true" role="tab" tabindex="-1"> ملخص </button>
</li> </li>
<li class="nav-item" role="presentation"> <li class="nav-item" role="presentation">
<button class="nav-link pr-1 pl-1 " data-bs-toggle="tab" data-bs-target="#profile-edit" aria-selected="false" role="tab">متابعة المراحل</button> <button class="nav-link " data-bs-toggle="tab" data-bs-target="#profile-edit" aria-selected="false" role="tab">متابعة المراحل</button>
</li> </li>
<li class="nav-item pr-1 pl-1" role="presentation"> <li class="nav-item pr-1 pl-1" role="presentation">
...@@ -65,8 +67,11 @@ ...@@ -65,8 +67,11 @@
<div class="tab-pane fade profile-edit pt-3 " id="profile-edit" role="tabpanel"> <div class="tab-pane fade profile-edit pt-3 " id="profile-edit" role="tabpanel">
<step-track *ngFor="let stepTrack of stepTracks" [stepTrack]="stepTrack" ></step-track> <step-track *ngFor="let stepTrack of stepTracks"
<div class="row" *ngIf="stepTracks.length ==0 " > [projectId]="track.projectId"
[stepTrack]="stepTrack" ></step-track>
<div class="offset-2 text-center text-secondary" *ngIf="stepTracks.length ==0 " >
لم تقم بمتابعة اية مراحل لم تقم بمتابعة اية مراحل
</div> </div>
</div> </div>
...@@ -79,7 +84,7 @@ ...@@ -79,7 +84,7 @@
[employeeTrack]="employeeTrack" [employeeTrack]="employeeTrack"
[projectId]="track.projectId" [projectId]="track.projectId"
></employee-track> ></employee-track>
<div class="row" *ngIf="employeesTracks.length ==0 " > <div class="offset-2 text-center text-secondary " *ngIf="employeesTracks.length ==0 " >
لم تقم بمتابعة اي مشارك لم تقم بمتابعة اي مشارك
</div> </div>
......
...@@ -6,14 +6,16 @@ import { StepTrackHistoryComponent } from '../pages/step-track-history/step-trac ...@@ -6,14 +6,16 @@ import { StepTrackHistoryComponent } from '../pages/step-track-history/step-trac
import { TrackDetailsComponent } from '../pages/track-details/track-details.component'; import { TrackDetailsComponent } from '../pages/track-details/track-details.component';
import { TracksListComponent } from '../pages/tracks-list/tracks-list.component'; import { TracksListComponent } from '../pages/tracks-list/tracks-list.component';
import { TracksUncompleteComponent } from '../pages/tracks-uncomplete/tracks-uncomplete.component'; import { TracksUncompleteComponent } from '../pages/tracks-uncomplete/tracks-uncomplete.component';
import { ROLES } from '../../core/constants/roles';
import { RoleGuard } from '../../core/guards/role.guard';
const routes: Routes = [ const routes: Routes = [
{path:'project/:id',component:ProjectTrackHistoryComponent}, {path:'project/:id',component:ProjectTrackHistoryComponent},
{path:'detail/:id',component:TrackDetailsComponent}, {path:'detail/:id',component:TrackDetailsComponent},
{path:'history/step/:id',component:StepTrackHistoryComponent} , {path:'history/step/:id',component:StepTrackHistoryComponent} ,
{path:'project/:projectId/employee/:employeeId',component:EmployeeTrackHistoryComponent}, {path:'project/:projectId/employee/:employeeId',component:EmployeeTrackHistoryComponent},
{path:'uncompleted',component:TracksUncompleteComponent} , {path:'uncompleted',component:TracksUncompleteComponent,canActivate:[RoleGuard] , data: { roles: [ROLES.SCIENTIFIC_DEPUTY] }} ,
{path:'',component:TracksListComponent} {path:'',component:TracksListComponent,canActivate:[RoleGuard] , data: { roles: [ROLES.SCIENTIFIC_DEPUTY] }}
]; ];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment