Merge branch 'master' of https://bitbucket.org/sriramv18/sparqsineedge
This commit is contained in:
commit
d84b1e7ea9
@ -207,12 +207,12 @@
|
||||
<input matInput placeholder="Requirement" formControlName="add_requirement">
|
||||
</mat-form-field>
|
||||
|
||||
<button mat-raised-button mat-icon-button color="primary" matTooltip="Delete" matTooltipPosition="above" (click)="removeRequirements(i)" type="button"><mat-icon>delete</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button matTooltip="Delete" matTooltipPosition="above" (click)="removeRequirements(i)" type="button"><mat-icon>delete</mat-icon></button>
|
||||
</mat-card-content>
|
||||
|
||||
</mat-card>
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="left">
|
||||
<mat-card-actions align="end">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="addRequiremnts()"
|
||||
matTooltip="Add More Additional Requirements" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||
<mat-icon>add</mat-icon>
|
||||
@ -239,14 +239,14 @@
|
||||
<input type="file" title="Browse Document" (change)="fileSelectionEvent($event,d)" formControlName="documentFile">
|
||||
|
||||
<span (click)="removeItem(d)">
|
||||
<button mat-raised-button mat-icon-button color="primary" class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above" type="button"><mat-icon>delete</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above" type="button"><mat-icon>delete</mat-icon></button>
|
||||
</span>
|
||||
</div>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
</mat-card-content>
|
||||
|
||||
<mat-card-actions align="left">
|
||||
<mat-card-actions align="end">
|
||||
<button mat-raised-button mat-icon-button matTooltip="Add Document" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" (click)="addMoreDocs()" type="button"><mat-icon>attach_file</mat-icon></button>
|
||||
|
||||
</mat-card-actions>
|
||||
|
||||
@ -16,13 +16,13 @@
|
||||
</mat-card-header>
|
||||
<mat-card-content style="max-height:100% !important;">
|
||||
<div fxLayout="row wrap" class="child_mat_card">
|
||||
<mat-card fxFlex.xs="80" fxFlex.sm="45" fxFlex.md="30" fxFlex.lg="23" fxFlex.xl="23" *ngFor="let formButton of categoryFormButtons;let quesIndex=index" [ngStyle]="{'background-color':formButton.isAnswered == false ? '#827f7f' : '#4caf50' ,'color':'#fff'}" (click)="OnSelectDirectForms(formButton)">
|
||||
<mat-card-header>
|
||||
<mat-card fxFlex.xs="80" fxFlex.sm="45" fxFlex.md="30" fxFlex.lg="23" fxFlex.xl="23" *ngFor="let formButton of categoryFormButtons;let quesIndex=index" [ngStyle]="{'background-color':formButton.isAnswered == false ? '#fff' : '#4caf50' ,'color':'#fff'}" (click)="OnSelectDirectForms(formButton)">
|
||||
<mat-card-header >
|
||||
<div fxFlex="90" align="left" style="padding:15px !important;">
|
||||
{{ (formButton.form_name.length>17)? (formButton.form_name | slice:0:17)+'..':(formButton.form_name) }}
|
||||
</div>
|
||||
<div fxFlex="20" align="end">
|
||||
<span style="padding: 3px;" class="menu-badge mat-purple ng-star-inserted" align="center">Q{{formButton.pd_form_order}}</span>
|
||||
<span style="padding: 2px 9px 3px 9px !important;" class="menu-badge mat-purple ng-star-inserted" align="center">{{quesIndex+1}}</span>
|
||||
</div>
|
||||
<!-- <mat-card-subtitle>Karthi Kms</mat-card-subtitle> -->
|
||||
</mat-card-header>
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<div *ngFor="let master of pdMasterData" class="ml-xs mr-xs pt-1" fxFlex="55" style="text-align:right;" >
|
||||
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master)"><mat-icon>verified_user</mat-icon></button>
|
||||
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master)"><mat-icon>schedule</mat-icon></button>
|
||||
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.TRIGGERED && currentPDStatus!=pdStatusCheck.DRAFT" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(viewID)"><mat-icon>question_answer</mat-icon></button>
|
||||
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.TRIGGERED && currentPDStatus!=pdStatusCheck.DRAFT && enableStartPD" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(viewID)"><mat-icon>question_answer</mat-icon></button>
|
||||
|
||||
<button *ngIf="master.pd_type_name && currentPDStatus===pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above" (click)="getPDIDReport(viewID)"><mat-icon>ballot</mat-icon></button>
|
||||
|
||||
|
||||
@ -60,16 +60,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
this.route.params.subscribe(params => {
|
||||
this.viewID = params['pdid'];
|
||||
});
|
||||
let courrentDateTime: string = this.pipe.transform(new Date(), 'yyyy-MM-dd HH:mm');
|
||||
let scheduledDateTime: string="2018-12-03 08:20";
|
||||
let diffInMs: number = Date.parse(courrentDateTime) - Date.parse(scheduledDateTime);
|
||||
let diffInHours: number = Math.floor(diffInMs / 1000 / 60 / 60);
|
||||
if(diffInHours>=-4){
|
||||
this.enableStartPD=true;
|
||||
}
|
||||
else {
|
||||
this.enableStartPD=false;
|
||||
}
|
||||
|
||||
|
||||
this.viewPdDetails(this.viewID);
|
||||
}
|
||||
@ -84,6 +75,22 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
//this.applicantPDLogsData= data.records.pd_logs.master;
|
||||
this.currentPDStatus = data.records.pd_master_details[0].pd_status;
|
||||
this.pdAdditionalReqData = data.records.pd_additional_requirements;
|
||||
// enable pd start time
|
||||
if(data.records.pd_master_details[0].scheduled_on_for_validation){
|
||||
let courrentDateTime: string = this.pipe.transform(new Date(), 'yyyy-MM-dd HH:mm');
|
||||
let scheduledDateTime: string=data.records.pd_master_details[0].scheduled_on_for_validation;
|
||||
let diffInMs: number = Date.parse(courrentDateTime) - Date.parse(scheduledDateTime);
|
||||
let diffInHours: number = Math.floor(diffInMs / 1000 / 60 / 60);
|
||||
if(diffInHours>=-4){
|
||||
this.enableStartPD=true;
|
||||
}
|
||||
else {
|
||||
this.enableStartPD=false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.enableStartPD=false;
|
||||
}
|
||||
}
|
||||
}, error => this.errorMessage = <any> error);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user