Commit ad1fd4fc authored by hasan khaddour's avatar hasan khaddour

style stpes list

parent 14fd9a94
...@@ -50,16 +50,19 @@ ...@@ -50,16 +50,19 @@
"src/assets/css/app-light.css", "src/assets/css/app-light.css",
"./node_modules/@fortawesome/fontawesome-free/css/all.min.css", "./node_modules/@fortawesome/fontawesome-free/css/all.min.css",
"./node_modules/bootstrap/dist/css/bootstrap.min.css", "./node_modules/bootstrap/dist/css/bootstrap.min.css",
"node_modules/dhtmlx-gantt/codebase/dhtmlxgantt.css" "./node_modules/dhtmlx-gantt/codebase/dhtmlxgantt.css",
"./node_modules/primeng/resources/themes/saga-blue/theme.css",
"./node_modules/primeng/resources/primeng.min.css",
"./node_modules/primeicons/primeicons.css",
"./node_modules/primeflex/primeflex.css"
], ],
"scripts": [ "scripts": [
"node_modules/@popperjs/core/dist/umd/popper.min.js", "node_modules/@popperjs/core/dist/umd/popper.min.js",
"node_modules/bootstrap/dist/js/bootstrap.min.js", "node_modules/bootstrap/dist/js/bootstrap.min.js",
"./node_modules/jquery-sparkline/jquery.sparkline.min.js", "./node_modules/jquery-sparkline/jquery.sparkline.min.js",
"./node_modules/@popperjs/core/dist/umd/popper.min.js", "./node_modules/@popperjs/core/dist/umd/popper.min.js",
"node_modules/feather-icons/dist/feather.min.js", "./node_modules/feather-icons/dist/feather.min.js",
"node_modules/dhtmlx-gantt/codebase/dhtmlxgantt.js" "./node_modules/dhtmlx-gantt/codebase/dhtmlxgantt.js"
] ]
}, },
"configurations": { "configurations": {
...@@ -88,6 +91,11 @@ ...@@ -88,6 +91,11 @@
}, },
"serve": { "serve": {
"builder": "@angular-devkit/build-angular:dev-server", "builder": "@angular-devkit/build-angular:dev-server",
"options": {
"host": "psm.hiast.edu.sy",
"port": 80
},
"configurations": { "configurations": {
"production": { "production": {
"buildTarget": "PSManagementUI:build:production" "buildTarget": "PSManagementUI:build:production"
......
This diff is collapsed.
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<div class="circle circle-md bg-secondary"> <div class="circle circle-md bg-secondary">
<span class="fe fe-credit-card fe-16 text-white"></span> <span class="fe fe-credit-card fe-16 text-white"></span>
</div> </div>
<div class="flex-fill ml-4 fname"> <div class="flex-fill ml-4 fname">
<strong> المراحل</strong><br /> <strong> المراحل</strong><br />
</div> </div>
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
[disabled]="projectForm.invalid" [disabled]="projectForm.invalid"
class="col-5 m-4 btn btn-primary" class="col-5 m-4 btn btn-primary"
> >
إضافة تعديل
</button> </button>
<div class="col-5 m-4 btn btn-secondary" (click)="onClose()">إغلاق</div> <div class="col-5 m-4 btn btn-secondary" (click)="onClose()">إغلاق</div>
</div> </div>
......
...@@ -46,7 +46,7 @@ export class EditStepModalComponent { ...@@ -46,7 +46,7 @@ export class EditStepModalComponent {
next: (data)=>{ next: (data)=>{
this.activeModal.close(this.stepInfo); // Close modal and pass data this.activeModal.close(this.request); // Close modal and pass data
}, },
error: (err )=> this.toastr.error("لقد حدث خطاء ما") error: (err )=> this.toastr.error("لقد حدث خطاء ما")
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</div> </div>
<hr> <hr *ngIf="project.currentState.toLocaleLowerCase()=='inplan'">
<plan-controll <plan-controll
*ngIf="project.currentState.toLocaleLowerCase()=='inplan'" *ngIf="project.currentState.toLocaleLowerCase()=='inplan'"
...@@ -75,7 +75,9 @@ ...@@ -75,7 +75,9 @@
</plan-controll> </plan-controll>
<hr> <hr
*ngIf="project.currentState.toLocaleLowerCase()=='inprogress'"
>
<track-controll <track-controll
*ngIf="project.currentState.toLocaleLowerCase()=='inprogress'" *ngIf="project.currentState.toLocaleLowerCase()=='inprogress'"
......
.prime{
color: seagreen;
}
\ No newline at end of file
...@@ -6,12 +6,24 @@ ...@@ -6,12 +6,24 @@
<h2 class="h3 mb-0 page-title"> قائمة مراحل المشروع </h2> <h2 class="h3 mb-0 page-title"> قائمة مراحل المشروع </h2>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<button type="button" *ngIf="canSee()" (click)="openAddModal()" class="btn btn-primary"><span class="fe fe-file-plus fe-12 mr-2"></span>إضافة مرحلة </button>
<div class="circle circle-md "
[class.bg-secondary]="isToggled"
[class.bg-primary]="!isToggled"
>
<span class="fe fe-credit-card fe-16 text-white"
(click)="toggle()"></span>
</div>
<button type="button" *ngIf="canSee()" (click)="openAddModal()" class="btn m-4 btn-primary"><span class="fe fe-file-plus fe-12 mr-2"></span>إضافة مرحلة </button>
</div> </div>
</div> </div>
<hr> <hr>
<div
*ngIf="isToggled">
<step-row-item <step-row-item
class=" offset-2" class=" offset-2"
*ngFor="let step of steps" *ngFor="let step of steps"
...@@ -21,6 +33,36 @@ ...@@ -21,6 +33,36 @@
(changeWeight)="openChangeWeightModal(step)" (changeWeight)="openChangeWeightModal(step)"
(edit)="openEditModal(step)" (edit)="openEditModal(step)"
></step-row-item> ></step-row-item>
</div>
<p-timeline *ngIf="!isToggled" [value]="steps" align="alternate" styleClass="customized-timeline">
<ng-template pTemplate="marker" let-event>
<span
class="flex w-2rem h-2rem align-items-center justify-content-center text-white border-circle z-1 shadow-1"
[style]="{ 'background-color' :'#9C27B0' }">
<i [class]="'fe fe-clipboard'"></i>
</span>
</ng-template>
<ng-template pTemplate="content" let-event>
<p-card [header]="event.stepInfo.stepName" [subheader]="(event.stepInfo.startDate | date) ??'' ">
<p class="">
{{event.stepInfo.description}}
</p>
<p>
<strong class="mb-4">الثقل
{{event.weight}}
</strong>
<p-progressBar [value]="event.currentCompletionRatio" />
</p>
</p-card>
</ng-template>
</p-timeline>
<div *ngIf="steps.length==0"> <div *ngIf="steps.length==0">
<p class="tect-center"> <p class="tect-center">
...@@ -35,3 +77,33 @@ ...@@ -35,3 +77,33 @@
</div> </div>
</div> </div>
</section> </section>
<div class="card shadow mb-4 col-8 offset-2" *ngIf="!steps">
<div class="card-header py-3">
<div class="row align-items-center">
<div class="col-auto">
<p-skeleton shape="circle" size="4rem" styleClass="mr-2" />
</div>
<div class="col ml-n2">
<p-skeleton width="20%" styleClass="mb-2" />
<p-skeleton width="30%" styleClass="mb-2" />
</div>
</div>
</div>
<div class="card-body ">
<div class="row align-items-center">
<div class="col-8 ">
<p-skeleton width="80%" styleClass="mb-2" />
<p-skeleton width="50%" styleClass="mb-2" />
<p-skeleton width="70%" styleClass="mb-2" />
</div>
<div class="col-8 ">
<p-skeleton width="70%" styleClass="mb-2" />
</div>
</div>
</div>
</div>
...@@ -18,6 +18,8 @@ import { Project } from '../../models/responses/project'; ...@@ -18,6 +18,8 @@ import { Project } from '../../models/responses/project';
styleUrl: './step-list.component.css' styleUrl: './step-list.component.css'
}) })
export class StepListComponent { export class StepListComponent {
isToggled=true
steps : Step[] steps : Step[]
project : Project project : Project
modalMode: 'edit' | 'delete' = 'edit'; modalMode: 'edit' | 'delete' = 'edit';
...@@ -99,10 +101,9 @@ export class StepListComponent { ...@@ -99,10 +101,9 @@ export class StepListComponent {
modalRef.componentInstance.stepInfo = step.stepInfo; modalRef.componentInstance.stepInfo = step.stepInfo;
modalRef.componentInstance.stepId = step.id; modalRef.componentInstance.stepId = step.id;
modalRef.result.then((result) => { modalRef.result.then((result : ChangeStepInfoRequest) => {
if (result) { if (result) {
// Add the new project to the list // Add the new project to the list
step.stepInfo={...result.stepInfo}; step.stepInfo={...result.stepInfo};
} }
...@@ -166,5 +167,8 @@ closeModal(): void { ...@@ -166,5 +167,8 @@ closeModal(): void {
canSee(){ canSee(){
return this.project.currentState.toLocaleLowerCase()=='inplan' return this.project.currentState.toLocaleLowerCase()=='inplan'
} }
toggle() {
this.isToggled=!this.isToggled
}
} }
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { TimelineModule } from 'primeng/timeline';
import { ProjectItemComponent } from './components/project-item/project-item.component'; import { ProjectItemComponent } from './components/project-item/project-item.component';
import { ProjectListComponent } from './pages/project-list/project-list.component'; import { ProjectListComponent } from './pages/project-list/project-list.component';
import { ProjectDetailsComponent } from './pages/project-details/project-details.component'; import { ProjectDetailsComponent } from './pages/project-details/project-details.component';
...@@ -13,6 +14,7 @@ import { MatFormFieldModule } from '@angular/material/form-field'; ...@@ -13,6 +14,7 @@ import { MatFormFieldModule } from '@angular/material/form-field';
import {MatAutocompleteModule} from '@angular/material/autocomplete'; import {MatAutocompleteModule} from '@angular/material/autocomplete';
import { MatInputModule } from '@angular/material/input'; import { MatInputModule } from '@angular/material/input';
import { ProjectService } from './services/project.service'; import { ProjectService } from './services/project.service';
import { SkeletonModule } from 'primeng/skeleton';
import {MatSelectModule} from '@angular/material/select'; import {MatSelectModule} from '@angular/material/select';
import {MatDatepickerModule} from '@angular/material/datepicker'; import {MatDatepickerModule} from '@angular/material/datepicker';
import {provideNativeDateAdapter} from '@angular/material/core'; import {provideNativeDateAdapter} from '@angular/material/core';
...@@ -50,7 +52,9 @@ import { FilterModalComponent } from './components/filter-modal/filter-modal.com ...@@ -50,7 +52,9 @@ import { FilterModalComponent } from './components/filter-modal/filter-modal.com
import { CancelProjectComponent } from './components/cancel-project/cancel-project.component'; import { CancelProjectComponent } from './components/cancel-project/cancel-project.component';
import { EditFinancialModalComponent } from './components/edit-financial-modal/edit-financial-modal.component'; import { EditFinancialModalComponent } from './components/edit-financial-modal/edit-financial-modal.component';
import { RemoveFinancialModalComponent } from './components/remove-financial-modal/remove-financial-modal.component'; import { RemoveFinancialModalComponent } from './components/remove-financial-modal/remove-financial-modal.component';
import { CardModule } from 'primeng/card';
import { ButtonModule } from 'primeng/button';
import { ProgressBarModule } from 'primeng/progressbar';
@NgModule({ @NgModule({
declarations: [ declarations: [
ProjectItemComponent, ProjectItemComponent,
...@@ -101,18 +105,23 @@ import { RemoveFinancialModalComponent } from './components/remove-financial-mod ...@@ -101,18 +105,23 @@ import { RemoveFinancialModalComponent } from './components/remove-financial-mod
], ],
imports: [ imports: [
CommonModule, CommonModule,
CardModule,
ButtonModule,
NgbModule, NgbModule,
FormsModule, FormsModule,
MatFormFieldModule, MatFormFieldModule,
MatCommonModule, MatCommonModule,
ProgressBarModule,
MatSelectModule, MatSelectModule,
MatOptionModule, MatOptionModule,
MatAutocompleteModule, MatAutocompleteModule,
MatDatepickerModule, MatDatepickerModule,
RouterModule , RouterModule ,
MatInputModule, MatInputModule,
TimelineModule,
ReactiveFormsModule , ReactiveFormsModule ,
SharedModule, SharedModule,
SkeletonModule,
NgbTypeaheadModule NgbTypeaheadModule
] ]
}) })
......
<div class="card shadow mb-4 col-8 offset-2" *ngIf="!steps">
<div class="card-header py-3">
<div class="row align-items-center">
<div class="col-auto">
<p-skeleton shape="circle" size="4rem" styleClass="mr-2" />
</div>
<div class="col ml-n2">
<p-skeleton width="20%" styleClass="mb-2" />
<p-skeleton width="30%" styleClass="mb-2" />
</div>
</div>
</div>
<div class="card-body ">
<div class="row align-items-center">
<div class="col-8 ">
<p-skeleton width="80%" styleClass="mb-2" />
<p-skeleton width="50%" styleClass="mb-2" />
<p-skeleton width="70%" styleClass="mb-2" />
</div>
<div class="col-8 ">
<p-skeleton width="70%" styleClass="mb-2" />
</div>
</div>
</div>
</div>
import { Component } from '@angular/core';
@Component({
selector: 'card-skeleton',
templateUrl: './card-skeleton.component.html',
styleUrl: './card-skeleton.component.css'
})
export class CardSkeletonComponent {
}
...@@ -11,6 +11,11 @@ import { LoadingSpinnerComponent } from './componenets/loading-spinner/loading-s ...@@ -11,6 +11,11 @@ import { LoadingSpinnerComponent } from './componenets/loading-spinner/loading-s
import { FullnamePipe } from './pipes/fullName/fullname.pipe'; import { FullnamePipe } from './pipes/fullName/fullname.pipe';
import { CardItemComponent } from './componenets/card-item/card-item.component'; import { CardItemComponent } from './componenets/card-item/card-item.component';
import { StateTranslatePipe } from './pipes/stateTranslate/state-translate.pipe'; import { StateTranslatePipe } from './pipes/stateTranslate/state-translate.pipe';
import { CardSkeletonComponent } from './componenets/card-skeleton/card-skeleton.component';
import { KnobModule } from 'primeng/knob';
import { ProgressBarModule } from 'primeng/progressbar';
import { SkeletonModule } from 'primeng/skeleton';
@NgModule({ @NgModule({
...@@ -24,7 +29,8 @@ import { StateTranslatePipe } from './pipes/stateTranslate/state-translate.pipe' ...@@ -24,7 +29,8 @@ import { StateTranslatePipe } from './pipes/stateTranslate/state-translate.pipe'
LoadingSpinnerComponent, LoadingSpinnerComponent,
FullnamePipe, FullnamePipe,
StateTranslatePipe, StateTranslatePipe,
CardItemComponent CardItemComponent,
CardSkeletonComponent
], ],
imports: [ imports: [
...@@ -39,6 +45,8 @@ import { StateTranslatePipe } from './pipes/stateTranslate/state-translate.pipe' ...@@ -39,6 +45,8 @@ import { StateTranslatePipe } from './pipes/stateTranslate/state-translate.pipe'
FullnamePipe, FullnamePipe,
StateTranslatePipe, StateTranslatePipe,
CardItemComponent, CardItemComponent,
SkeletonModule,
ProgressBarModule,
LoadingSpinnerComponent LoadingSpinnerComponent
],schemas: [CUSTOM_ELEMENTS_SCHEMA] ],schemas: [CUSTOM_ELEMENTS_SCHEMA]
}) })
......
...@@ -49,8 +49,9 @@ ...@@ -49,8 +49,9 @@
</div> </div>
<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 [routerLink]="['/reports/employees-tracks',track.projectId,'track',track.id]" class="btn m-4 btn-primary col-3 offset-1">تقرير انشغالية عاملين </button>
<button [routerLink]="['/reports/steps-tracks',track.projectId,'track',track.id]" class="btn m-4 btn-primary col-3 offset-1">تقرير متابعة مراحل </button>
</div> </div>
</div> </div>
</div> </div>
......
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