Fairoj : performance, image loader,fetch loader and other related issue fixed on officer link feature

This commit is contained in:
venbatechnologies@gmail.com 2020-10-21 20:10:58 +05:30
parent 0519812d85
commit 0dc557c1aa
18 changed files with 1495 additions and 823 deletions

View File

@ -102,6 +102,9 @@
},
"test":{
"browserTarget": "optima:build:test"
},
"staging":{
"browserTarget": "optima:build:staging"
}
}
},

File diff suppressed because it is too large Load Diff

View File

@ -16,15 +16,15 @@
"dependencies": {
"@agm/core": "^1.0.0-beta.5",
"@angular/animations": "^6.1.10",
"@angular/cdk": "^6.0.0-rc.5",
"@angular/cdk": "^7.3.7",
"@angular/common": "^6.1.10",
"@angular/compiler": "^6.1.10",
"@angular/core": "^6.1.10",
"@angular/flex-layout": "^6.0.0-beta.18",
"@angular/forms": "^6.1.10",
"@angular/http": "^6.0.0-rc.6",
"@angular/material": "^6.0.0-rc.5",
"@angular/material-moment-adapter": "^6.0.0-rc.5",
"@angular/material": "^7.3.7",
"@angular/material-moment-adapter": "^6.4.7",
"@angular/platform-browser": "^6.1.10",
"@angular/platform-browser-dynamic": "^6.1.10",
"@angular/router": "^6.1.10",
@ -47,7 +47,7 @@
"font-awesome": "4.7.0",
"hammerjs": "2.0.8",
"intl": "^1.2.4",
"jquery": "^3.4.1",
"jquery": "^3.5.1",
"karma-jasmine": "^1.1.1",
"leaflet": "^1.4.0",
"moment": "^2.24.0",
@ -65,9 +65,9 @@
"ngx-mat-select-search": "^1.8.0",
"ngx-perfect-scrollbar": "5.0.0-7",
"ngx-viewer": "^1.0.1",
"node-sass": "^4.12.0",
"node-sass": "^4.14.1",
"perfect-scrollbar": "^1.3.0",
"quill": "^1.2.0",
"quill": "^1.3.7",
"rxjs": "^6.5.1",
"rxjs-compat": "^6.5.1",
"screenfull": "^3.2.2",

View File

@ -88,7 +88,7 @@
<div *ngIf="remarksEnableFun()">
<div fxLayout="row">
<!-- <div fxLayout="column"> -->
<mat-form-field appearance="fill" style="margin-top: 1%;justify-content: center">
<mat-form-field style="margin-top: 1%;justify-content: center">
<mat-label>Name of Person Met</mat-label>
<input matInput type="text" formControlName="person_met_entered" />
<mat-error align="end" style="font-size:13px" *ngIf="getQuestionControl().at(0)['controls']['person_met_entered'].errors?.required || getQuestionControl().at(0)['controls']['person_met_entered'].touched">Person Name required</mat-error>
@ -145,7 +145,7 @@
</div>
</div>
</div>
<mat-form-field appearance="fill">
<mat-form-field >
<mat-label>Designation in company</mat-label>
<mat-select formControlName="designation_entered">
<ngx-mat-select-search [formControl]="designationFilterCtrl"
@ -156,7 +156,7 @@
</mat-select>
<mat-error align="end" style="font-size:13px" *ngIf="getQuestionControl().at(0)['controls']['designation_entered'].errors?.required || getQuestionControl().at(0)['controls']['designation_entered'].touched">Designation required</mat-error>
</mat-form-field>
<mat-form-field appearance="fill">
<mat-form-field >
<mat-label>Relation with applicant</mat-label>
<mat-select formControlName="relation_entered">
<ngx-mat-select-search [formControl]="relationFilterCtrl"
@ -167,7 +167,7 @@
</mat-select>
<mat-error align="end" style="font-size:13px" *ngIf="getQuestionControl().at(0)['controls']['relation_entered'].errors?.required || getQuestionControl().at(0)['controls']['relation_entered'].touched">Relation required</mat-error>
</mat-form-field>
<mat-form-field appearance="fill">
<mat-form-field >
<mat-label>Relation to</mat-label>
<mat-select formControlName="relation_to">
<mat-option>Select</mat-option>
@ -176,7 +176,7 @@
<mat-error align="end" style="font-size:13px" *ngIf="getQuestionControl().at(0)['controls']['relation_to'].errors?.required || getQuestionControl().at(0)['controls']['relation_to'].touched">Relation to required</mat-error>
</mat-form-field>
</div>
<!-- <mat-form-field *ngIf="remarksEnableFun()" appearance="fill">
<!-- <mat-form-field *ngIf="remarksEnableFun()" >
<mat-label>Remarks</mat-label>
<textarea matInput type="text" formControlName="general_remark"></textarea>
<mat-error align="end" style="font-size:13px" *ngIf="getQuestionControl().at(0)['controls']['general_remark'].errors?.required || getQuestionControl().at(0)['controls']['general_remark'].touched">Remarks Required</mat-error>
@ -396,7 +396,7 @@
<div fxLayout="row">
<div fxLayout="column" fxFlex="85%">
<mat-form-field appearance="fill" >
<mat-form-field >
<mat-label>Approach to FI location</mat-label>
<mat-select formControlName="pd_location">
<mat-option>Select</mat-option>
@ -424,7 +424,7 @@
</div>
<div fxLayout="row">
<div fxLayout="column" fxFlex="100%">
<mat-form-field appearance="fill">
<mat-form-field >
<mat-label>Comment on locality</mat-label>
<mat-select formControlName="comment_locality">
<mat-option>Select</mat-option>
@ -451,7 +451,7 @@
<div formArrayName="business_group">
<!-- START OF BUSINESS INFO -->
<div formGroupName="0">
<mat-form-field appearance="fill">
<mat-form-field >
<mat-label>No. of employees sighted by FI officer during visit</mat-label>
<input matInput type="number" formControlName="officer_total">
<mat-error align="end" style="font-size:12px" *ngIf="getBusinessInfoControls().at(0)['controls']['officer_total'].errors?.required || getBusinessInfoControls().at(0)['controls']['officer_total'].touched"> Required</mat-error>
@ -459,7 +459,7 @@
<!-- *ngIf="getQuestionControl().at(2).get('business_group').at(0).value.was_the_company_name_board_sighted" -->
<div fxLayout="row">
<div fxLayout="column" fxFlex="85%">
<mat-form-field appearance="fill">
<mat-form-field >
<mat-label>Was the company name board sighted? </mat-label>
<mat-select placeholder="Select" formControlName="was_the_company_name_board_sighted">
<mat-option>Select</mat-option>
@ -488,7 +488,7 @@
</div>
<div fxLayout="row">
<div fxLayout="column" fxFlex="85%">
<mat-form-field appearance="fill">
<mat-form-field >
<mat-label>Business Documents sighted </mat-label>
<mat-select placeholder="Select" formControlName="documents_sighted" (selectionChange)= "onDocsSightedChange($event.value,1)">
<mat-option>Select</mat-option>
@ -558,7 +558,7 @@
<!--</div> -->
</div>
</mat-card><br/>
<mat-form-field appearance="fill">
<mat-form-field >
<mat-label>Do You Want to Add Other Documents?</mat-label>
<mat-select formControlName="other_documents" (selectionChange)= "onDocsSightedChange($event.value,2)">
<mat-option>Select</mat-option>
@ -654,7 +654,7 @@
<!-- START OF BUSINESS ASSETS -->
<div formGroupName="1">
<!-- <div fxLayout="column"> -->
<mat-form-field appearance="fill">
<mat-form-field >
<mat-label>Was any business activities seen during visit?</mat-label>
<mat-select placeholder="Select" formControlName="business_is_pd_visited">
<mat-option>Select</mat-option>
@ -677,7 +677,7 @@
<input matInput type="text" formControlName="specify_pd_visited"/>
</mat-form-field>
</div>
<mat-form-field appearance="fill">
<mat-form-field >
<mat-label>Is Business Asset Sighted</mat-label>
<mat-select placeholder="Select" formControlName="business_asset_sight">
<mat-option>Select</mat-option>
@ -719,7 +719,7 @@
fill="clear" ><ion-icon name="camera"></ion-icon></ion-button><br/>
<mat-label style="font-size: 11px;">Capture the Image</mat-label>
</div> -->
<!-- <mat-form-field appearance="fill">
<!-- <mat-form-field >
<mat-label>Remarks</mat-label>
<textarea matInput type="text" formControlName="business_pd_visited_remark"></textarea>
</mat-form-field> -->
@ -729,7 +729,7 @@
<!-- START OF STOCK PHOTOGRAPH -->
<div formGroupName="2" >
<mat-label>Stock Photograph</mat-label><br/><br/>
<mat-form-field appearance="fill">
<mat-form-field >
<mat-label>Stock Photograph</mat-label>
<mat-select formControlName="is_stock_photo">
<mat-option>Select</mat-option>
@ -898,14 +898,14 @@
</div>
</mat-expansion-panel>
</mat-accordion><br/>
<mat-form-field appearance="fill">
<mat-form-field >
<mat-label>Status of the check as per PD officer?</mat-label>
<mat-select formControlName="neighbourhood_status" placeholder="Select" required (selectionChange)="setValidationForRemarks($event.value)">
<mat-option *ngFor="let item of neighbour_status_list" [value]="item.id">{{item.name}}</mat-option>
</mat-select>
<mat-error align="end" style="font-size:12px" *ngIf="getQuestionControl().at(3)['controls']['neighbourhood_status'].errors?.required || getQuestionControl().at(3)['controls']['neighbourhood_status'].touched"> Required</mat-error>
</mat-form-field>
<mat-form-field appearance="fill">
<mat-form-field >
<mat-label>Remarks</mat-label>
<textarea matInput formControlName="neighbour_reference_remark"></textarea>
<mat-error align="end" style="font-size:12px" *ngIf="getQuestionControl().at(3)['controls']['neighbour_reference_remark'].errors?.required || getQuestionControl().at(3)['controls']['neighbour_reference_remark'].touched"> Required</mat-error>
@ -932,7 +932,7 @@
<div align="end" style="font-size:12px" *ngIf="getQuestionControl().at(4)['controls']['outlet_location'].errors?.required || getQuestionControl().at(4)['controls']['outlet_location'].touched"> Required</div>
</div>
<mat-form-field appearance="fill">
<mat-form-field >
<mat-label>Is there a competetion to the applicant's business in the location </mat-label>
<mat-select formControlName="is_competition" required>
<mat-option>Select</mat-option>
@ -949,7 +949,7 @@
<mat-error align="end" style="font-size:12px" *ngIf="getQuestionControl().at(4)['controls']['appx_outlet_or_stores'].errors?.required || getQuestionControl().at(4)['controls']['appx_outlet_or_stores'].touched"> Required</mat-error>
</mat-form-field>
<mat-form-field appearance="fill">
<mat-form-field >
<mat-label>Any demolition activity seen in the locality by PD officer</mat-label>
<mat-select formControlName="demolition_activity" required>
<mat-option>Select</mat-option>
@ -964,7 +964,7 @@
<input matInput autocomplete="off" type="text" placeholder="Comment on any demolition activity observed" formControlName="comment_of_demolition_activity" />
<mat-error align="end" style="font-size:12px" *ngIf="getQuestionControl().at(4)['controls']['comment_of_demolition_activity'].errors?.required || getQuestionControl().at(4)['controls']['comment_of_demolition_activity'].touched"> Required</mat-error>
</mat-form-field>
<mat-form-field appearance="fill">
<mat-form-field >
<mat-label>Any sealing activity observed in the locality by PD officer</mat-label>
<mat-select formControlName="sealing_activity" required>
<mat-option>Select</mat-option>
@ -989,7 +989,7 @@
<mat-step formGroupName="5" [stepControl]="questions?.get([5])">
<ng-template matStepLabel>Submit</ng-template>
<mat-form-field appearance="fill">
<mat-form-field >
<mat-label>Final Status of visit</mat-label>
<!-- <textarea matInput type="text" placeholder="Any other comments" formControlName="final_comments"></textarea> -->
<mat-select formControlName="final_visit_status">
@ -1000,7 +1000,7 @@
</mat-select>
<mat-error align="end" style="font-size:12px" *ngIf="getQuestionControl().at(5)['controls']['final_visit_status'].errors?.required || getQuestionControl().at(5)['controls']['final_visit_status'].touched"> Required</mat-error>
</mat-form-field>
<mat-form-field appearance="fill">
<mat-form-field >
<mat-label>Comments</mat-label>
<textarea matInput type="text" placeholder="Any other comments" formControlName="final_comments"></textarea>
<mat-error align="end" style="font-size:12px" *ngIf="getQuestionControl().at(5)['controls']['final_comments'].errors?.required || getQuestionControl().at(5)['controls']['final_comments'].touched"> Required</mat-error>

View File

@ -2,10 +2,20 @@
color: #fff !important;
background-color: #e00201 !important;
}
.mat-stepper-vertical {
// margin-top: 8px;
margin-left:-13px;
// color:green;
background:#ffffffc9;
}
// .mat-dialog-container {
// }
::ng-deep .mat-dialog-container{
@media (max-width: 768px) {
padding: 0px !important;
will-change: transform, opacity;
}
}
.mat-button, .mat-raised-button{

View File

@ -9,6 +9,7 @@ import { ReplaySubject, Subject } from 'rxjs';
import { DatePipe } from '@angular/common';
import { takeUntil, filter, tap, take } from 'rxjs/operators';
import { CameraService } from 'app/personal-discussion/camera-service/camera.service';
import { LoaderService } from 'app/shared/loaderService/loader.service';
@Component({
selector: 'app-common-ques',
@ -156,7 +157,7 @@ export class CommonQuesComponent implements OnInit {
constructor(private actRoute:ActivatedRoute,private quesService:PdTrigerService,private cameraService:CameraService,private router:Router,
@Inject(MAT_DIALOG_DATA)public data,private _formBuilder:FormBuilder,
notifier:NotifierService,private _awsService:AwsService,private dialogRef:MatDialogRef<CommonQuesComponent>) {
notifier:NotifierService,private _awsService:AwsService,private dialogRef:MatDialogRef<CommonQuesComponent>,private loaderService:LoaderService) {
this.notifier=notifier
console.log("Hi")
// this.actRoute.queryParams.subscribe(params=>{
@ -413,6 +414,7 @@ getMasters() {
}
getFormDatas() {
this.loaderService.showMatSpinnerDialog();
let params = {'parent_pdid':this.pdDetails.parent_pd_id,'pd_id':this.pdDetails.pd_id,'pd_form_id':"25"}
this.quesService.getPDFormDetailsWithID(params).subscribe(result=>{
if(result && result['dataStatus']) {
@ -422,8 +424,10 @@ getFormDatas() {
this.getInitialAddress();
this.getBusinessDocumentsSighted()
}
this.loaderService.closeMatSpinnerDialog();
// this.loadingProvider.dismissLoader()
},err=>{
this.loaderService.closeMatSpinnerDialog();
console.log("getPDFormDetails Error",err)
// this.loadingProvider.dismissLoader();
this.notifier.notify("Network Error",'danger');
@ -1063,6 +1067,7 @@ capturePic(event,controls,img_name?:String,form_id?) {
return;
}
}
this.loaderService.showMatSpinnerDialog()
console.log("Capture pic",event,controls,img_name,event)
// return;
// controls.setValue("pic");
@ -1120,11 +1125,16 @@ capturePic(event,controls,img_name?:String,form_id?) {
controls.setValue("")
this.notifier.notify("warning",'Something went wrong!!')
}
},err=>{
// this.loaderService.closeMatSpinnerDialog()
controls.setValue("")
console.log(err)
this.notifier.notify("error",'Network Error !!')
})
this.loaderService.closeMatSpinnerDialog()
},err=>{
this.loaderService.closeMatSpinnerDialog()
})
}
// })
@ -1193,6 +1203,7 @@ onDocsSightedChange(value,flag) {
saveApplicantInfo(event,applicant_obj,image_key) {
console.log("saveApplicantInfo",applicant_obj,image_key)
console.log(applicant_obj);
this.loaderService.showMatSpinnerDialog()
// this.cameraProvider.showImageDialog().then((res:any)=>{
var reader = new FileReader();
// let imagePath = event;
@ -1235,6 +1246,9 @@ saveApplicantInfo(event,applicant_obj,image_key) {
console.log(err)
this.notifier.notify("error",'Network Error !!')
})
this.loaderService.closeMatSpinnerDialog()
},err=>{
this.loaderService.closeMatSpinnerDialog()
})
}
)}
@ -1353,7 +1367,9 @@ onSubmit(flag?) {
if(index != -1) {
this.myStepper.selectedIndex = this.stepperInfo[index].stepper_index
}
setTimeout(()=>{
this.notifier.notify("warning",'Minimum 3 photos required on Workplace Photograph')
},800)
return
}
}
@ -1364,7 +1380,9 @@ onSubmit(flag?) {
if(index != -1) {
this.myStepper.selectedIndex = this.stepperInfo[index].stepper_index
}
setTimeout(()=>{
this.notifier.notify("warning",'Minimum 3 photos required on Stock Photographs')
},800)
return
}
}
@ -1375,7 +1393,9 @@ onSubmit(flag?) {
if(index != -1) {
this.myStepper.selectedIndex = this.stepperInfo[index].stepper_index
}
setTimeout(()=>{
this.notifier.notify("warning",'Minimum 1 photo required on Business asset sighted photographs')
},800)
return
}
}

View File

@ -8,6 +8,12 @@
color: white;
}
.mat-stepper-vertical {
// margin-top: 8px;
margin-left:-13px;
// color:green;
background:#ffffffc9;
}
.mat-stroked-button {
color: #e24533;
margin-right: 10px

View File

@ -10,6 +10,7 @@ import { AwsService } from 'app/AwsService/aws.service';
import { CommonQuesComponent } from '../common-ques/common-ques.component';
import { takeUntil } from 'rxjs/operators';
import { CameraService } from 'app/personal-discussion/camera-service/camera.service';
import { LoaderService } from 'app/shared/loaderService/loader.service';
@Component({
selector: 'app-employer-info',
@ -123,7 +124,8 @@ export class EmployerInfoComponent implements OnInit {
constructor(private actRoute:ActivatedRoute,private quesService:PdTrigerService,private router:Router,private cameraService:CameraService,
@Inject(MAT_DIALOG_DATA)public data,private _formBuilder:FormBuilder,
notifier:NotifierService,private _awsService:AwsService,private dialogRef:MatDialogRef<EmployerInfoComponent>) {
notifier:NotifierService,private _awsService:AwsService,private dialogRef:MatDialogRef<EmployerInfoComponent>,
private loaderService:LoaderService) {
this.notifier=notifier
this.pdDetails = this.data
console.log(this.pdDetails);
@ -425,6 +427,7 @@ export class EmployerInfoComponent implements OnInit {
}
getFormDatas() {
this.loaderService.showMatSpinnerDialog();
let params = {'parent_pdid':this.pdDetails.parent_pd_id,'pd_id':this.pdDetails.pd_id,'pd_form_id':"25"}
this.quesService.getPDFormDetailsWithID(params).subscribe(result=>{
// result['dataStatus']=false
@ -435,8 +438,10 @@ export class EmployerInfoComponent implements OnInit {
this.getInitialAddress();
// this.getBusinessDocumentsSighted()
}
this.loaderService.closeMatSpinnerDialog();
// this.loadingProvider.dismissLoader()
},err=>{
this.loaderService.closeMatSpinnerDialog();
console.log("getPDFormDetails Error",err)
// this.loadingProvider.dismissLoader();
this.notifier.notify('error',"Network Error");
@ -1112,6 +1117,7 @@ export class EmployerInfoComponent implements OnInit {
// this.cameraProvider.getpicture().then(res => {
// this.cameraProvider.showImageDialog().then((res:any)=>{
// console.log("g",res)
this.loaderService.showMatSpinnerDialog()
var reader = new FileReader();
// let imagePath = event;
reader.readAsDataURL(event);
@ -1167,6 +1173,9 @@ export class EmployerInfoComponent implements OnInit {
console.log(err)
this.notifier.notify("danger","Network Error")
})
this.loaderService.closeMatSpinnerDialog();
},err=>{
this.loaderService.closeMatSpinnerDialog();
})
})
}
@ -1236,6 +1245,7 @@ export class EmployerInfoComponent implements OnInit {
// this.cameraProvider.getpicture().then(res => {
// this.cameraProvider.showImageDialog().then((res:any)=>{
// console.log("g",res)
this.loaderService.showMatSpinnerDialog()
console.log("saveApplicantInfo",applicant_obj,image_key)
var reader = new FileReader();
// let imagePath = event;
@ -1277,6 +1287,9 @@ export class EmployerInfoComponent implements OnInit {
console.log(err)
this.notifier.notify("danger","Network Error")
})
this.loaderService.closeMatSpinnerDialog()
},err=>{
this.loaderService.closeMatSpinnerDialog()
})
})
}

View File

@ -1,4 +1,4 @@
<mat-card-title style="background-color: #e00201;color: #fff;padding: 18px;">
<mat-card-title style="background-color: #e00201;color: #fff;padding: 10px;">
Schedule PD
</mat-card-title>

View File

@ -1,3 +1,9 @@
.mat-list-item-content{
.mat-list-item-content,.mat-list-base{
padding:0px !important;
}
::ng-deep .mat-dialog-container{
@media (max-width: 768px) {
padding: 0px !important;
// will-change: transform, opacity;
}
}

View File

@ -270,7 +270,7 @@
<button *ngIf="VendorRoleID != 22 && master.pd_status == 'ALLOCATED_TO_FIA'" mat-raised-button style="background-color: #0f9c0f;color: white" class="mr-1 mb-1 hover-icon" type="button" matTooltip="Accept" matTooltipPosition="above" (click)="vendorApproval(master,'accept')"><mat-icon>check_circle</mat-icon><strong>Accept</strong></button>
<button *ngIf="VendorRoleID != 22 && master.vendor_status != 'INPROGRESS' && master.vendor_status != 'COMPLETED' && master.vendor_status != 'QC_COMPLETED'" mat-stroked-button color="primary" class="mr-1 mb-1 hover-icon" type="button" matTooltip="Reject" matTooltipPosition="above" (click)="vendorApproval(master,'reject')" ><mat-icon>cancel</mat-icon><strong>Reject</strong></button>
<button *ngIf="VendorRoleID != 22 && master.is_qc_enabled == '1' && master.pd_status != 'ALLOCATED_TO_FIA'" mat-raised-button color="primary" class="mr-1 mb-1 hover-icon" type="button" matTooltip="QC COMPLETE" matTooltipPosition="above" (click)="onClickQCCompleted(master)" [disabled]="master.vendor_status != 'COMPLETED'">QC COMPLETE</button>
<button *ngIf="VendorRoleID != 21 && master.vendor_status == 'INPROGRESS'" mat-raised-button color="primary" class="mr-1 mb-1 hover-icon" type="button" matTooltip="COMPLETE" matTooltipPosition="above" (click)="completePDAlert(master)">COMPLETE</button>
<button *ngIf="master.vendor_status == 'INPROGRESS'" mat-raised-button color="primary" class="mr-1 mb-1 hover-icon" type="button" matTooltip="COMPLETE" matTooltipPosition="above" (click)="completePDAlert(master)">COMPLETE</button>
</div>
</mat-card>
</div>

View File

@ -396,7 +396,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
data: { pdid: pdDetails.assigned_pd, vendor_status: this.pdStatusCheck.INPROGRESS },
disableClose: true,
minWidth: '30%',
maxWidth: '40%',
// maxWidth: '40%',
});
dialogRef.afterClosed()
.subscribe(dataresult => {
@ -436,8 +436,8 @@ export class ViewPdComponent implements OnInit, OnDestroy {
dialogRef.afterClosed()
.subscribe(dataresult => {
console.log("cloesed",dataresult)
if(dataresult == undefined) {
// this.ListPdComponent.viewPDDetails({id:this.viewID,string:this.masterRandomString})
if(dataresult == undefined && this.is_from_link) {
this.ListPdComponent.viewPDDetails({id:this.viewID,string:this.masterRandomString})
}
// this.notifier.notify('success', 'Successfully allocated.!');
// this.loadTemplates(this.startPD,2,this.randomString);
@ -562,7 +562,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
data: {title:'Complete Discussion',msg:'Please confirm you are completing the Discussion?'},
disableClose: true,
minWidth: '30%',
maxWidth: '40%',
// maxWidth: '40%',
});
dialogRef.afterClosed()
.subscribe(dataresult => {

View File

@ -1,5 +1,7 @@
import { Injectable } from '@angular/core';
import { MatDialog, MatDialogRef } from '@angular/material';
import { Subject } from 'rxjs';
import { ProgressSpineerDialogComponent } from '../progress-spineer-dialog/progress-spineer-dialog.component';
export interface LoaderState {
show: boolean;
}
@ -9,11 +11,25 @@ export interface LoaderState {
export class LoaderService {
private loaderSubject = new Subject<LoaderState>();
loaderState = this.loaderSubject.asObservable();
constructor() { }
spinnerdialogRef: MatDialogRef<ProgressSpineerDialogComponent>;
constructor(private dialog:MatDialog) { }
show() {
this.loaderSubject.next(<LoaderState>{ show: true });
}
hide() {
this.loaderSubject.next(<LoaderState>{ show: false });
}
showMatSpinnerDialog() {
this.spinnerdialogRef = this.dialog.open(ProgressSpineerDialogComponent, {
panelClass: 'transparent',
// minHeight:'20%',
minWidth:'20%',
disableClose: true
});
}
closeMatSpinnerDialog() {
if(this.spinnerdialogRef) {
this.spinnerdialogRef.close();
}
}
}

View File

@ -0,0 +1 @@
<mat-spinner></mat-spinner>

View File

@ -0,0 +1,5 @@
::ng-deep {.transparent > .mat-dialog-container {
box-shadow: none;
background: rgba(0, 0, 0, 0.0);
}
}

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ProgressSpineerDialogComponent } from './progress-spineer-dialog.component';
describe('ProgressSpineerDialogComponent', () => {
let component: ProgressSpineerDialogComponent;
let fixture: ComponentFixture<ProgressSpineerDialogComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ProgressSpineerDialogComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ProgressSpineerDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-progress-spineer-dialog',
templateUrl: './progress-spineer-dialog.component.html',
styleUrls: ['./progress-spineer-dialog.component.scss']
})
export class ProgressSpineerDialogComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

View File

@ -7,8 +7,11 @@ import { ToggleFullscreenDirective } from './fullscreen/toggle-fullscreen.direct
import { RatingComponent} from './rating/rating.component';
import { NumbersOnlyDirective } from './numbers-only/numbers-only.directive';
import { ForMobileNumbersDirective } from './for-mobile-numbers/for-mobile-numbers.directive';
import { ProgressSpineerDialogComponent } from './progress-spineer-dialog/progress-spineer-dialog.component';
import { MatProgressSpinnerModule } from '@angular/material';
@NgModule({
entryComponents:[ProgressSpineerDialogComponent],
declarations: [
AccordionAnchorDirective,
AccordionLinkDirective,
@ -16,8 +19,10 @@ import { ForMobileNumbersDirective } from './for-mobile-numbers/for-mobile-numbe
ToggleFullscreenDirective,
RatingComponent,
NumbersOnlyDirective,
ForMobileNumbersDirective
ForMobileNumbersDirective,
ProgressSpineerDialogComponent
],
imports:[MatProgressSpinnerModule],
exports: [
AccordionAnchorDirective,
AccordionLinkDirective,
@ -25,7 +30,8 @@ import { ForMobileNumbersDirective } from './for-mobile-numbers/for-mobile-numbe
ToggleFullscreenDirective,
RatingComponent,
NumbersOnlyDirective,
ForMobileNumbersDirective
ForMobileNumbersDirective,
ProgressSpineerDialogComponent
],
providers: [ MenuItems, HorizontalMenuItems ]
})