This commit is contained in:
dineshkumarkannan 2018-11-29 19:13:02 +05:30
commit 87ca647574
29 changed files with 665 additions and 371 deletions

View File

@ -0,0 +1,40 @@
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left">
{{data.first_name}}
</div>
<div fxFlex="30" align="end">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="right" mat-dialog-close><mat-icon>close</mat-icon></button>
</div>
</h2>
<mat-dialog-content>
<div fxLayout="row wrap">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="60" fxFlex.xl="60">
<mat-card>
<mat-card-content>
<agm-map [latitude]="lat" [longitude]="lng">
<agm-marker *ngFor="let getMap of mapDetails" [latitude]="getMap.lat" [longitude]="getMap.lng"></agm-marker>
</agm-map>
</mat-card-content>
</mat-card>
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="50" fxFlex.lg="40" fxFlex.xl="40">
<mat-card *ngFor="let moreDat of data.pd_details; let z=index;">
<mat-card-content>
<ol>
<li [style.color]="moreDat.pd_status=='ALLOCATED' ? allocated_color : moreDat.pd_status=='SCHEDULED' ? scheduled_color : inprogress_color">{{moreDat.pd_status | titlecase}} ( {{moreDat.applicant_name | titlecase}} )</li>
<li>{{moreDat.scheduled_on | titlecase}} </li>
<!-- <li>{{moreDat.pd_status}}</li> -->
<li>{{moreDat.pd_type_name | titlecase}} ( Id : {{moreDat.pd_id}} ) </li>
</ol>
</mat-card-content>
</mat-card>
</div>
</div>
</mat-dialog-content>
<!-- <mat-dialog-actions>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="right" mat-dialog-close><mat-icon>close</mat-icon></button>
</mat-dialog-actions> -->

View File

@ -0,0 +1,44 @@
.paragraph_change {
color: #e00201 !important;
}
ol {
list-style-type: none;
}
// ol li:first-child {
// color: #62B013;
// }
@import "../../../../../assets/styles/scss/material.variables";
// :host {
// margin-left: -5px;
// margin-right: -5px;
// margin-top: -5px;
// display: block;
// height: 100%;
// }
.sebm-google-map-container {
width: 100%;
height: 500px;
display: flex;
}
$mat-toolbar-height-desktop: 64px !default;
$mat-toolbar-height-mobile-portrait: 56px !default;
$mat-toolbar-height-mobile-landscape: 48px !default;
.mat-card-top {
margin-top: -($mat-toolbar-height-desktop);
}
@media ($mat-xsmall) and (orientation: portrait) {
.mat-card-top {
margin-top: -($mat-toolbar-height-mobile-portrait);
}
}
@media ($mat-small) and (orientation: landscape) {
.mat-card-top {
margin-top: -($mat-toolbar-height-mobile-landscape);
}
}

View File

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

View File

@ -0,0 +1,48 @@
import { Component, OnInit, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
import { GetGeometricLocationService } from './../../../location-service/get-geometric-location.service';
@Component({
selector: 'app-allocation-view-more',
templateUrl: './allocation-view-more.component.html',
styleUrls: ['./allocation-view-more.component.scss']
})
export class AllocationViewMoreComponent implements OnInit {
lat:string
lng:string
mapDetails:any[] = [];
allocated_color: string = '#ffa500';
scheduled_color: string = '#3f51b5';
inprogress_color: string = '#4caf50';
constructor(private dialogRef: MatDialogRef<AllocationViewMoreComponent>,
@Inject(MAT_DIALOG_DATA) public data: any, public _geolocation: GetGeometricLocationService) {
//load map details
this.getMapViewLocations(this.data.pd_details);
}
ngOnInit() {
}
// get map view locations
getMapViewLocations(getData:any){
getData.forEach(element => {
if(element.addressline1 && element.pincode && element.state_name && element.city_name){
this._geolocation.findLocations(element.addressline1,element.pincode,element.state_name,element.city_name)
.subscribe(response => {
if (response.status == 'OK') {
this.lat = response.results[0].geometry.location.lat;
this.lng = response.results[0].geometry.location.lng;
this.mapDetails.push(response.results[0].geometry.location)
}
// else if (response.status == 'ZERO_RESULTS') {
// console.log('geocodingAPIService', 'ZERO_RESULTS', response.status);
// } else {
// console.log('geocodingAPIService', 'Other error', response.status);
// }
});
}
});
}
}

View File

@ -3,12 +3,13 @@ import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/m
import { ActivatedRoute, Router } from '@angular/router';
import { NotifierService } from 'angular-notifier';
import { MatDialog } from '@angular/material';
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
import { GetGeometricLocationService } from '../../../location-service/get-geometric-location.service';
import { ListPdComponent } from '../list-pd.component';
import { PdAllocationComponent } from '../pd-allocation/pd-allocation.component';
import { SmartPdAllocationComponent } from '../smart-pd-allocation/smart-pd-allocation.component';
import { SchedulePdComponent } from '../schedule-pd/schedule-pd.component';
import { PdTrigerService } from './../../../pd-service/pd-triger.service';
import { GetGeometricLocationService } from './../../../location-service/get-geometric-location.service';
import { ListPdComponent } from './../list-pd.component';
import { PdAllocationComponent } from './../pd-allocation/pd-allocation.component';
import { SmartPdAllocationComponent } from './../smart-pd-allocation/smart-pd-allocation.component';
import { TelePdAllocationComponent } from '././../tele-pd-allocation/tele-pd-allocation.component';
import { SchedulePdComponent } from './../schedule-pd/schedule-pd.component';
@Component({
selector: 'app-map-pd-view',
@ -122,9 +123,11 @@ pdList:any[] = [];
// pd allocation to
pdAllocationTo(pdData:any) {
if(pdData.fk_pd_type != 2){
if(pdData.fk_pd_type == 1){
const dialogRef = this.dialog.open(PdAllocationComponent, {
data: pdData,
width: '60%',
maxHeight: '60%',
disableClose: true
});
dialogRef.afterClosed()
@ -136,6 +139,8 @@ pdList:any[] = [];
else if(pdData.fk_pd_type == 2){
const dialogRef = this.dialog.open(SmartPdAllocationComponent, {
data: pdData,
width: '60%',
maxHeight: '60%',
disableClose: true
});
dialogRef.afterClosed()
@ -144,6 +149,20 @@ pdList:any[] = [];
this.loadPdDetails();
});
}
else if(pdData.fk_pd_type == 3){
const dialogRef = this.dialog.open(TelePdAllocationComponent, {
data: pdData,
width: '60%',
maxHeight: '60%',
disableClose: true,
});
dialogRef.afterClosed()
.subscribe(dataresult => {
// this.notifier.notify('success', 'Successfully allocated.!');
this.loadPdDetails();
});
}
}

View File

@ -1,49 +1,62 @@
<div style="height: 550px;">
<div style="text-align: right">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="closeAllocationComponent()"><mat-icon>close</mat-icon></button>
</div>
<mat-card style="width: 1000px;">
<mat-card-header>
<mat-card-title>{{pageTitle}}</mat-card-title>
</mat-card-header>
<mat-card-content>
<!-- <form [formGroup]="_pdAllocationForm" (submit)="onSubmit()"> -->
<div *ngIf="pdOfficerList.length > 0" >
<div fxLayout="row wrap" fxFlex="100%">
<div fxLayout="row wrap" fxFlex="22%" *ngFor="let officer of pdOfficerList; ">
<mat-card fxFlex="100%">
<mat-card-content style="text-align:center">
<mat-radio-button [value]="officer" (change)="selectPdOfficer(officer)"></mat-radio-button>
<img [src]="officer.profile_url ||'https://image.ibb.co/mGjZB9/usernew.png'" alt="No Image" style="border-radius:50%;width:100px;height:100px;"><br>
<span>{{officer.first_name}}</span>
<br>
<span>{{officer.mobile_no}}</span><br>
<span>PD in hand - {{officer.count}}</span>
</mat-card-content>
</mat-card>
</div>
</div>
</div>
<mat-list *ngIf="pdOfficerList.length == 0">
<mat-list-item>
<p>No PD officer available.</p>
</mat-list-item>
</mat-list>
<!-- </form> -->
</mat-card-content>
<mat-card-actions>
<div style="text-align:right;">
<button mat-raised-button mat-icon-button (click)="updatePdOfficer(selectedItem)" class="mr-1 mb-1 hover-icon" type="button"><mat-icon>save</mat-icon></button>
</div>
</mat-card-actions>
</mat-card>
<h2 mat-dialog-title>
<div fxFlex="70">
{{pageTitle}}
</div>
<div fxFlex="30" align="end">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="closeAllocationComponent()" matTooltip="Close" matTooltipPosition="below"><mat-icon>close</mat-icon></button>
</div>
</h2>
<mat-dialog-content class="mat-typography">
<!-- <form [formGroup]="_pdAllocationForm" (submit)="onSubmit()"> -->
<mat-list role="list" *ngIf="pdOfficerList.length > 0">
<mat-list-item role="listitem" *ngFor="let officer of pdOfficerList; let i = index">
<div fxFlex="100">
<div fxLayout="row wrap">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
<mat-radio-button color="primary" [value]="officer" (change)="selectedItem = $event.value">
{{officer.first_name}}
</mat-radio-button>
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
<span>{{officer.mobile_no}}</span>
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40">
<span class="view_more" (click)="viewMoreDetails(officer)" matTooltip="View More" matTooltipPosition="right">PD in hand - {{officer.count}}</span>
</div>
</div>
</div>
</mat-list-item>
</mat-list>
<mat-list *ngIf="pdOfficerList.length == 0">
<mat-list-item>
<p>No PD officer available.</p>
</mat-list-item>
</mat-list>
<!-- </form> -->
</mat-dialog-content>
<mat-dialog-actions >
<div fxFlex="50" align="left">
<p *ngIf="selectedItem">PD Officer: {{selectedItem.first_name}}</p>
</div>
<div fxFlex="50" align="right">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="closeAllocationComponent()" matTooltip="Close" matTooltipPosition="below"><mat-icon>close</mat-icon></button>
<button mat-raised-button mat-icon-button (click)="updatePdOfficer(selectedItem)" class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="below"><mat-icon>save</mat-icon></button>
</div>
</mat-dialog-actions>
<notifier-container></notifier-container>

View File

@ -1,3 +1,14 @@
.example-full-width{
width: 100%;
}
.view_more {
cursor: pointer;
color: #e00201 !important;
// text-decoration-line: underline;
// text-decoration-style: dotted;
// font-weight: bold;
}
.text_change {
color: #e00201 !important;
}

View File

@ -1,8 +1,9 @@
import { Component, OnInit, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA , DialogPosition} from '@angular/material';
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
import { NotifierService } from 'angular-notifier';
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
import { AllocationViewMoreComponent } from './../allocation-view-more/allocation-view-more.component';
@Component({
selector: 'app-pd-allocation',
@ -17,10 +18,11 @@ export class PdAllocationComponent implements OnInit {
notifier : NotifierService;
selectedItem:any;
isDisabled: boolean;
constructor( notifier: NotifierService,
private _fb: FormBuilder,
private dialogRef: MatDialogRef<PdAllocationComponent>,
private _pd: PdTrigerService,
private _pd: PdTrigerService, private dialog: MatDialog,
@Inject(MAT_DIALOG_DATA) public data: any) {
this.notifier=notifier;
}
@ -48,23 +50,16 @@ export class PdAllocationComponent implements OnInit {
}
}, error => this.errorMessage = <any> error);
}
// select pd officer list
selectPdOfficer(selected:any){
this.isDisabled=false;
this.selectedItem=selected;
// this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
}
/** To update pd officer*/
updatePdOfficer(allocateDate:any) {
if(this.isDisabled){
updatePdOfficer(allocateDetails:any) {
if(!allocateDetails){
this.notifier.notify('warning', 'Please Choose PD Officer.!');
}
else {
let updateData = {
"pd_id":this.data.pd_id,
"fk_pd_allocated_to":allocateDate.fk_user_id,
"fk_pd_allocated_to":allocateDetails.fk_user_id,
}
this._pd.updatePdOfficer(updateData).subscribe(
result => {
@ -87,4 +82,23 @@ export class PdAllocationComponent implements OnInit {
closeAllocationComponent(): void {
this.dialogRef.close();
}
// pd officer view more
viewMoreDetails(details:any){
if(Number(details.count) > 0) {
const dialogSchedule = this.dialog.open(AllocationViewMoreComponent, {
data: details,
disableClose: true,
position: { right: '0'},
width:'80%',
// hasBackdrop:false
});
// dialogSchedule.afterClosed()
// .subscribe(dataresult => {
// });
}
else {
this.notifier.notify('warning', 'No PD In Hand');
}
}
}

View File

@ -1,121 +1,102 @@
<div style="max-height: 550px;">
<div style="text-align: right">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="closeAllocationComponent()"><mat-icon>close</mat-icon></button>
<h2 mat-dialog-title>
<div fxFlex="70">
{{pageTitle}}
</div>
<div fxFlex="30" align="end">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="closeAllocationComponent()" matTooltip="Close" matTooltipPosition="below"><mat-icon>close</mat-icon></button>
</div>
</div>
<mat-card style="width: 1000px; padding: 2px;" [style.display]="showFirstCard ? 'block' : 'none'">
<mat-card-header>
<mat-card-title>{{pageTitle}}</mat-card-title>
</mat-card-header>
<mat-card-content>
</h2>
<mat-dialog-content class="mat-typography">
<!-- <form [formGroup]="_pdAllocationForm" (submit)="onSubmit()"> -->
<!-- This Container for central pd officer -->
<div *ngIf="showFirstCard">
<mat-list role="list" *ngIf="pdCentralOfficerList.length > 0">
<!-- <form [formGroup]="_pdAllocationForm" (submit)="onSubmit()"> -->
<div *ngIf="pdCentralOfficerList.length > 0" >
<div fxLayout="row wrap" fxFlex="100%">
<div fxLayout="row wrap" fxFlex="22%" *ngFor="let officer of pdCentralOfficerList; ">
<!-- <p><mat-radio-button [value]="officer" (change)="selectPdOfficer(officer)"></mat-radio-button>
{{officer.first_name}}
</p>
<p style="padding-left: 8%;">
<span matBadge="{{officer.allocated}}" matBadgeOverlap="false" matBadgeColor="accent">Allocated</span>
</p>
<p style="padding-left: 8%;">
<span matBadge="{{officer.scheduled}}" matBadgeOverlap="false" >Scheduled</span>
</p>
<p style="padding-left: 8%;">
<span matBadge="{{officer.inprogress}}" matBadgeOverlap="false" matBadgeColor="warn">Inprogress</span>
</p>
-->
<mat-list-item role="listitem" *ngFor="let officer of pdCentralOfficerList; let i = index">
<div fxFlex="100">
<div fxLayout="row wrap">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
<mat-radio-button color="primary" [checked]="checkFirstItem==officer.fk_user_id" [value]="officer" (change)="selectedCentralItem = $event.value">
{{officer.first_name}}
</mat-radio-button>
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
<span>{{officer.mobile_no}}</span>
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40">
<span class="view_more" (click)="viewMoreDetails(officer)" matTooltip="View More" matTooltipPosition="right">PD in hand - {{officer.count}}</span>
<mat-card fxFlex="100%">
<mat-card-content style="text-align:center">
<mat-radio-button [value]="officer" (change)="selectPdOfficer(officer)"></mat-radio-button>
<img [src]="officer.profile_url ||'https://image.ibb.co/mGjZB9/usernew.png'" alt="No Image" style="border-radius:50%;width:100px;height:100px;"><br>
<span>{{officer.first_name}}</span>
<br>
<span>{{officer.mobile_no}}</span> <br>
<span>PD in hand - {{officer.count}}</span>
</mat-card-content>
</mat-card>
</div>
</div>
</div>
<mat-list *ngIf="pdCentralOfficerList.length == 0">
<mat-list-item>
<p>No executive available.</p>
</mat-list-item>
</mat-list>
</div>
</div>
<!-- </form> -->
</mat-card-content>
<mat-card-actions>
<div style="text-align:right;">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" [disabled]="selectedItem.length==0" (click)="getSecondCard()"><mat-icon>arrow_forward</mat-icon></button>
</div>
</div>
</mat-card-actions>
</mat-card>
<mat-card style="width: 580px; padding: 2px;" [style.display]="showSecondCard ? 'block' : 'none'">
<mat-card-header>
<mat-card-title>{{pageTitle2}}</mat-card-title>
</mat-card-header>
<mat-card-content>
</mat-list-item>
<div *ngIf="pdExcutiveList.length > 0" >
<div fxLayout="row wrap" fxFlex="100%">
<div fxLayout="row wrap" fxFlex="22%" *ngFor="let excutive of pdExcutiveList">
<mat-card fxFlex="100%">
<mat-card-content style="text-align:center">
<mat-radio-button [value]="excutive" (change)="selectExcutiveOfficer(excutive)"></mat-radio-button>
<img [src]="excutive.profile_url ||'https://image.ibb.co/mGjZB9/usernew.png'" alt="No Image" style="border-radius:50%;width:100px;height:100px;"><br>
<span>{{excutive.first_name}}</span>
<br>
<span>{{excutive.mobile_no}}</span> <br>
<span>PD in hand - {{excutive.count}}</span>
</mat-card-content>
</mat-card>
</div>
</div>
</mat-list>
<mat-list *ngIf="pdCentralOfficerList.length == 0">
<mat-list-item>
<p>No central officer available.</p>
</mat-list-item>
</mat-list>
</div>
<!-- end -->
<!-- this container for executive pd officer -->
<div *ngIf="showSecondCard">
<mat-list role="list" *ngIf="pdExcutiveList.length > 0">
<mat-list-item role="listitem" *ngFor="let excutive of pdExcutiveList; let e = index">
<div fxFlex="100">
<div fxLayout="row wrap">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
<mat-radio-button color="primary" [checked]="checkSecondItem==excutive.fk_user_id" [value]="excutive" (change)="selectedExcutiveItem = $event.value">
{{excutive.first_name}}
</mat-radio-button>
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
<span>{{excutive.mobile_no}}</span>
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40">
<span class="view_more" (click)="viewMoreDetails(excutive)" matTooltip="View More" matTooltipPosition="right">PD in hand - {{excutive.count}}</span>
</div>
</div>
</div>
</mat-list-item>
</mat-list>
<mat-list *ngIf="pdExcutiveList.length == 0">
<mat-list-item>
<p>No executive available.</p>
</mat-list-item>
</mat-list>
</div>
<!-- end -->
<!-- </form> -->
</mat-dialog-content>
<mat-dialog-actions >
<div fxFlex="50" align="left">
<p *ngIf="selectedCentralItem">Central Officer: {{selectedCentralItem.first_name | titlecase }}</p>
<p *ngIf="selectedExcutiveItem">Executive: {{selectedExcutiveItem.first_name | titlecase}}</p>
</div>
<!----<mat-list *ngIf="pdExcutiveList.length > 0">
<mat-radio-group>
<mat-list-item *ngFor="let excutive of pdExcutiveList">
<p><mat-radio-button [value]="excutive" (change)="selectExcutiveOfficer(excutive)"></mat-radio-button>
{{excutive.first_name}}
</p>
<p style="padding-left: 8%;">
<span matBadge="{{excutive.allocated}}" matBadgeOverlap="false" matBadgeColor="accent">Allocated</span>
</p>
<p style="padding-left: 8%;">
<span matBadge="{{excutive.scheduled}}" matBadgeOverlap="false" >Scheduled</span>
</p>
<p style="padding-left: 8%;">
<span matBadge="{{excutive.inprogress}}" matBadgeOverlap="false" matBadgeColor="warn">Inprogress</span>
</p>
</mat-list-item>
</mat-radio-group>
</mat-list> -->
<mat-list *ngIf="pdExcutiveList.length == 0">
<mat-list-item>
<p>No central officer available.</p>
</mat-list-item>
</mat-list>
<!-- </form> -->
</mat-card-content>
<mat-card-actions>
<div style="text-align:right;">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" [disabled]="selectedItem.length==0" (click)="getFirstCard()"><mat-icon>arrow_back</mat-icon></button>
<button mat-raised-button mat-icon-button (click)="updateAllocation(selectedItem,selectedItem1)" [disabled]="selectedItem.length==0 || selectedItem1.length==0" class="mr-1 mb-1 hover-icon" type="button"><mat-icon>save</mat-icon></button>
<div fxFlex="50" align="end">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="getSecondCard()" matTooltip="Next" matTooltipPosition="below" *ngIf="showFirstCard"><mat-icon>arrow_forward</mat-icon></button>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="getFirstCard()" *ngIf="showSecondCard" matTooltip="Back" matTooltipPosition="below"><mat-icon>arrow_back</mat-icon></button>
<button mat-raised-button mat-icon-button (click)="updateAllocation(selectedCentralItem,selectedExcutiveItem)" class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="below" *ngIf="showSecondCard"><mat-icon>save</mat-icon></button>
</div>
</mat-card-actions>
</mat-card>
</div>
<notifier-container></notifier-container>
</mat-dialog-actions>
<notifier-container></notifier-container>

View File

@ -0,0 +1,14 @@
.example-full-width{
width: 100%;
}
.view_more {
cursor: pointer;
color: #e00201 !important;
// text-decoration-line: underline;
// text-decoration-style: dotted;
// font-weight: bold;
}
.text_change {
color: #e00201 !important;
}

View File

@ -1,8 +1,9 @@
import { Component, OnInit, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
import { NotifierService } from 'angular-notifier';
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
import { AllocationViewMoreComponent } from './../allocation-view-more/allocation-view-more.component';
@Component({
selector: 'app-smart-pd-allocation',
@ -11,22 +12,22 @@ import { PdTrigerService } from '../../../pd-service/pd-triger.service';
})
export class SmartPdAllocationComponent implements OnInit {
public pageTitle2: string = "Allocate To Executive";
public pageTitle: string = "Allocate To Central Officer";
public _pdAllocationForm: FormGroup;
//public pdOfficerList: any = [];
public pdCentralOfficerList: any = [];
public pdExcutiveList: any = [];
errorMessage: any;
notifier : NotifierService;
selectedItem:any=[];
selectedItem1:any=[];
isDisabled: boolean;
// isDisabled: boolean;
showFirstCard: boolean;
showSecondCard: boolean;
selectedCentralItem: any;
selectedExcutiveItem: any;
checkFirstItem:string ='';
checkSecondItem:string ='';
constructor( notifier: NotifierService,
private _fb: FormBuilder,
private _fb: FormBuilder, private dialog: MatDialog,
private dialogRef: MatDialogRef<SmartPdAllocationComponent>,
private _pd: PdTrigerService,
@Inject(MAT_DIALOG_DATA) public data: any) {
@ -35,7 +36,7 @@ export class SmartPdAllocationComponent implements OnInit {
ngOnInit() {
this.showFirstCard=true;
this.isDisabled=true;
// this.isDisabled=true;
this.getPDOfficerList(this.data.pd_id);
}
@ -50,27 +51,19 @@ export class SmartPdAllocationComponent implements OnInit {
}, error => this.errorMessage = <any> error);
}
// select pd officer list
selectPdOfficer(selected:any){
this.selectedItem=selected;
// this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
}
// select excutive officer
selectExcutiveOfficer(selected:any){
this.isDisabled=false;
this.selectedItem1=selected;
}
/** To update pd officer*/
updateAllocation(pdOfficer:any,excutiveOfficer:any) {
if(this.isDisabled){
this.notifier.notify('warning', 'Please Choose Allocate To Whom.!');
updateAllocation(centralOfficer:any,excutiveOfficer:any) {
if(!centralOfficer){
this.notifier.notify('warning', 'Please Choose Central Officer.!');
}
else if(!excutiveOfficer){
this.notifier.notify('warning', 'Please Choose Executive.!');
}
else {
let updateData = {
"pd_id":this.data.pd_id,
"central_pd_officer_id":pdOfficer.fk_user_id,
"central_pd_officer_id":centralOfficer.fk_user_id,
"executive_id":excutiveOfficer.fk_user_id,
}
this._pd.updatePdOfficer(updateData).subscribe(
@ -93,11 +86,15 @@ export class SmartPdAllocationComponent implements OnInit {
getFirstCard() {
this.showSecondCard=false;
this.showFirstCard=true;
this.pageTitle = "Allocate To Central Officer";
this.checkFirstItem = this.selectedCentralItem ? this.selectedCentralItem.fk_user_id : '';
}
getSecondCard(){
this.showFirstCard=false;
this.showSecondCard=true;
this.pageTitle = "Allocate To Executive";
this.checkSecondItem = this.selectedExcutiveItem ? this.selectedExcutiveItem.fk_user_id : '';
}
@ -106,4 +103,25 @@ export class SmartPdAllocationComponent implements OnInit {
this.dialogRef.close();
}
// officer view more
viewMoreDetails(details:any){
if(Number(details.count) > 0) {
const dialogSchedule = this.dialog.open(AllocationViewMoreComponent, {
data: details,
disableClose: true,
position: { right: '0'},
width:'80%',
// hasBackdrop:false
});
// dialogSchedule.afterClosed()
// .subscribe(dataresult => {
// });
}
else {
this.notifier.notify('warning', 'No PD In Hand');
}
}
}

View File

@ -26,7 +26,7 @@
<div [formGroupName]="s">
<div>
<mat-form-field style="width:100%">
<mat-select placeholder="Property" formControlName="property_type" required>
<mat-select placeholder="Property Type" formControlName="property_type" required>
<mat-option *ngFor="let prop of m_propertyType" [value]="prop.id">{{ prop.name }}</mat-option>
</mat-select>
</mat-form-field>
@ -97,13 +97,13 @@
<div *ngFor="let detail of sup['controls'].details['controls']; let s = index">
<div [formGroupName]="s">
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<div fxFlex="33">
<!---- <div fxFlex="33">
<mat-form-field>
<mat-select placeholder="Type" formControlName="insurance_type" required>
<mat-option *ngFor="let ins_type of m_insuranceType" [value]="ins_type.id">{{ ins_type.name }}</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>-->
<div fxFlex="33">
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Premium Paid" formControlName="premium_paid" required (keypress)="keyPress($event)">
@ -116,13 +116,13 @@
</mat-select>
</mat-form-field>
</div>
</div>
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<div fxFlex="33">
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Sum Assured" formControlName="sum_assured" required (keypress)="keyPress($event)">
</mat-form-field>
</div>
</div>
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<div fxFlex="33">
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Members Covered" formControlName="members_coverd" required>
@ -194,7 +194,7 @@
</div>
</div>
</div>
<div *ngIf="sup.get('assets_mode').value == 1 || sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 3 || sup.get('assets_mode').value == 5">
<!---- <div *ngIf="sup.get('assets_mode').value == 1 || sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 3 || sup.get('assets_mode').value == 5">
<label>Year and Month of Purchase?</label>
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field>
@ -204,28 +204,28 @@
<input matInput type="number" placeholder="Month" formControlName="purchase_month">
</mat-form-field>
</div>
</div>
</div>-->
<div *ngIf="sup.get('assets_mode').value == 1 || sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 3 || sup.get('assets_mode').value == 4 || sup.get('assets_mode').value == 5">
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<div fxFlex="33">
<mat-form-field class="ml-xs example-full-width">
<mat-select placeholder="Is there a loan?" formControlName="emi">
<mat-form-field class="ml-xs example-full-width" style="width:95%">
<mat-select placeholder="Is there a loan existing against this asset?" formControlName="emi">
<mat-option value="yes">Yes</mat-option>
<mat-option value="no">No</mat-option>
</mat-select>
</mat-form-field>
</div>
<div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33">
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="EMI Paid" formControlName="emi_paid" (keypress)="keyPress($event)">
<mat-form-field class="ml-xs example-full-width" style="width:95%">
<input matInput placeholder="Amount of EMI on This Loan?" formControlName="emi_paid" (keypress)="keyPress($event)">
</mat-form-field>
</div>
<div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33">
<mat-form-field class="ml-xs example-full-width">
<mat-form-field class="ml-xs example-full-width" style="width:95%">
<input matInput placeholder="Elapsed Tenure in Months" formControlName="elapsed_tenure">
</mat-form-field>
</div>
<div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33">
<div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33" style="width:95%">
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Balance Tenure in Months" formControlName="balance_tenure">
</mat-form-field>

View File

@ -90,7 +90,7 @@ public m_propertyType = [];
// }
// ];
public m_insuranceType = [];
//public m_insuranceType = [];
// public m_insuranceType = [{
// 'id': "1",
@ -175,7 +175,7 @@ public m_investmentType = [];
this.getM_PropertyType();
this.getM_InvestmentType();
this.getM_FreqOfPurchase();
this.getM_InsuranceType();
//this.getM_InsuranceType();
}
// ======================
@ -228,17 +228,17 @@ public m_investmentType = [];
)
}
getM_InsuranceType() {
this.pdTrigerService.getAllMasterDatas('INSURANCETYPE').subscribe(
data => {
this.m_insuranceType = data.records.filter(data => data.isactive == 1);
},
error => {
this.notifier.notify('warning', 'No Category Records Found.!');
// getM_InsuranceType() {
// this.pdTrigerService.getAllMasterDatas('INSURANCETYPE').subscribe(
// data => {
// this.m_insuranceType = data.records.filter(data => data.isactive == 1);
// },
// error => {
// this.notifier.notify('warning', 'No Category Records Found.!');
// this.m_assets_type = "No Category Records Found.";
}
)
}
// }
// )
//}
// =============================
@ -299,8 +299,8 @@ public m_investmentType = [];
details: this._formBuilder.array([]),
approximate_market_value: ['', Validators.compose([])],
name_of_the_owner: ['', Validators.compose([])],
purchase_year: ['', Validators.compose([])],
purchase_month: ['', Validators.compose([])],
// purchase_year: ['', Validators.compose([])],
//purchase_month: ['', Validators.compose([])],
emi: [''],
emi_paid: [''],
elapsed_tenure: [''],
@ -389,7 +389,7 @@ public m_investmentType = [];
loadInsuranceDescription() {
return this._formBuilder.group({
insurance_type: ['', Validators.compose([Validators.required])],
//insurance_type: ['', Validators.compose([Validators.required])],
premium_paid: ['', Validators.compose([Validators.required])],
frequency_mode: ['', Validators.compose([Validators.required])],
sum_assured: ['', Validators.compose([Validators.required])],
@ -439,13 +439,13 @@ public m_investmentType = [];
otherAssetsDescriptionWithData(data) {
return this._formBuilder.group({
any_other_assets: [data.any_other_assets, Validators.compose([Validators.required])]
any_other_assets: [data.any_other_assets, Validators.compose([Validators.required])],
});
}
loadInsuranceDescriptionWithData(data) {
return this._formBuilder.group({
insurance_type: [data.insurance_type, Validators.compose([Validators.required])],
//insurance_type: [data.insurance_type, Validators.compose([Validators.required])],
premium_paid: [data.premium_paid, Validators.compose([Validators.required])],
frequency_mode: [data.frequency_mode, Validators.compose([Validators.required])],
sum_assured: [data.sum_assured, Validators.compose([Validators.required])],
@ -481,8 +481,8 @@ public m_investmentType = [];
details: this._formBuilder.array([]),
approximate_market_value: [data.approximate_market_value, Validators.compose([])],
name_of_the_owner: [data.name_of_the_owner, Validators.compose([])],
purchase_year: [data.purchase_year, Validators.compose([])],
purchase_month: [data.purchase_month, Validators.compose([])],
// purchase_year: [data.purchase_year, Validators.compose([])],
// purchase_month: [data.purchase_month, Validators.compose([])],
emi: [data.emi || 0],
emi_paid: [data.emi_paid || ''],
elapsed_tenure: [data.elapsed_tenure || ''],
@ -500,8 +500,8 @@ public m_investmentType = [];
assets_mode: val.assets_mode,
approximate_market_value: val.approximate_market_value,
name_of_the_owner: val.name_of_the_owner,
purchase_year: val.purchase_year,
purchase_month: val.purchase_month,
// purchase_year: val.purchase_year,
// purchase_month: val.purchase_month,
emi: val.emi,
emi_paid: val.emi_paid,
elapsed_tenure: val.elapsed_tenure,

View File

@ -129,7 +129,7 @@
formControlName="vintage" required>
</mat-form-field> -->
<div>
<label>Approximate Vintage?</label>
<label>Number of Years / Months since account was started</label>
<br>
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field>

View File

@ -19,7 +19,7 @@
<input matInput placeholder="Net Profit / Loss" formControlName="financial_net_profit" (change)="calMargin( i, details); calYearVariation( i, details)" type="number" required>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Margin" formControlName="financial_margin" (keypress)="keyPress($event)" required>
<input matInput placeholder="Net Profit to Sales %" formControlName="financial_margin" (keypress)="keyPress($event)" required>
</mat-form-field>
<mat-form-field *ngIf="i != 0">
<input matInput [ngClass]="{'highlight': (details.controls['financial_variation'].value > 40) || (details.controls['financial_variation'].value < -40)}" placeholder="Variation from Previous Year" formControlName="financial_variation" (keypress)="keyPress($event)">
@ -42,7 +42,7 @@
</mat-card>
<mat-card>
<mat-card-header>
<p>Estimated Value<p>
<p>Actual Values as per Customer<p>
</mat-card-header>
<div formArrayName="estimated_value">
<div *ngFor="let details of financialForm.controls.estimated_value['controls']; let i=index"
@ -63,9 +63,9 @@
<mat-form-field *ngIf="i != 0">
<input matInput [ngClass]="{'highlight': details.controls['estimate_variation'].value >= 40 || details.controls['estimate_variation'].value >= -40}" placeholder="Variation from Previous Year" formControlName="estimate_variation" (keypress)="keyPress($event)">
</mat-form-field>
<mat-form-field>
<!--<mat-form-field>
<input matInput placeholder="Reason For Major Difference" formControlName="estimate_reason" required>
</mat-form-field>
</mat-form-field>-->
<button type="button" mat-raised-button mat-icon-button (click)="addGoods()"
matTooltip="Add More Estimated Value" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="i==0">
<mat-icon>add</mat-icon>

View File

@ -109,7 +109,7 @@ export class FinancialInfoComponent implements OnInit {
estimate_net_profit: ['', Validators.compose([Validators.required, Validators.pattern(/^-?[1-9]\d*|0$/)])],
estimate_margin: ['', Validators.compose([Validators.required])],
estimate_variation: [''],
estimate_reason: ['', Validators.compose([Validators.required])],
// estimate_reason: ['', Validators.compose([Validators.required])],
});
}
addDate() {

View File

@ -44,15 +44,15 @@
<mat-label>Complete address of the property</mat-label>
<textarea matInput placeholder="Address" formControlName="complete_add"></textarea>
</mat-form-field>
<mat-form-field>
<mat-form-field style="width: 100%">
<input matInput placeholder="Area of the Property(in sq yd or Sq ft)"
formControlName="area_of_property">
</mat-form-field>
<mat-form-field>
<mat-form-field style="width: 100%">
<input matInput placeholder="Structure of the let out property (eg. No of floors in total,G,FF,SF etc, let out floors from them)"
formControlName="structure_property">
</mat-form-field>
<mat-form-field>
<mat-form-field style="width: 100%">
<input type="number" matInput placeholder="Total rooms let out (eg single room,2 BHK, let out rooms on each floor)"
formControlName="total_room">
</mat-form-field>
@ -107,15 +107,15 @@
</mat-form-field>
</mat-card-content>
</mat-card>
<mat-form-field>
<mat-form-field style="width: 100%">
<input matInput placeholder="Rent received from each floor and or Rooms (eg FF has 4 rooms, rent per room are Rs 2500, Rs 4000 and Rs 3200 respectively)"
formControlName="rent_each_floor">
</mat-form-field>
<mat-form-field>
<mat-form-field style="width: 100%">
<input matInput placeholder="Total rent received (Total montly rental from property/ies, with break up)"
formControlName="total_rent">
</mat-form-field>
<mat-form-field>
<mat-form-field style="width: 100%">
<input matInput placeholder="Property paper or other related document to prove ownership (eg. Property registry etc)"
formControlName="related_doc_owner">
</mat-form-field>

View File

@ -14,16 +14,16 @@
<input matInput placeholder="Name" formControlName="raw_name" required>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Quantity" formControlName="raw_quantity" required>
<input matInput placeholder="Estimated Quantity" formControlName="raw_quantity" required>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Value" formControlName="raw_value" (keypress)="keyPress($event)" required>
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Value of raw materials as per financial Statements" formControlName="rawmaterial_value" (keypress)="keyPress($event)" required>
<input matInput placeholder="Value of raw materials as per latest financial Statements" formControlName="rawmaterial_value" (keypress)="keyPress($event)" required>
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Is the stock of raw materials sufficient ?" formControlName="is_sufficiant_raw" required>
<input matInput placeholder="Is the stock of raw materials observed ?" formControlName="is_sufficiant_raw" required>
</mat-form-field>
<button type="button" mat-raised-button mat-icon-button (click)="addRawMaterials()"
@ -50,16 +50,16 @@
<input matInput placeholder="Name" formControlName="goods_name" required>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Quantity" formControlName="goods_quantity" required>
<input matInput placeholder="Estimated Quantity" formControlName="goods_quantity" required>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Value" formControlName="goods_value" (keypress)="keyPress($event)" required>
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Value of finished goods as per financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" required>
<input matInput placeholder="Value of finished goods as per latest financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" required>
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Is the stock of finished goods sufficient ?" formControlName="is_sufficiant_goods" required>
<input matInput placeholder="Is the stock of finished goods observed ?" formControlName="is_sufficiant_goods" required>
</mat-form-field>
<button type="button" mat-raised-button mat-icon-button (click)="addGoods()"
@ -77,7 +77,7 @@
<div fxLayout="row">
<div fxFlex="60" class="pb-0 text-sm-left">
<mat-form-field appearance="outline" style="width: 100%">
<mat-label>Remarks</mat-label>
<mat-label>Please comment on the stock level observed?</mat-label>
<textarea matInput placeholder="Remarks" formControlName="stock_remarks"></textarea>
</mat-form-field>
</div>

View File

@ -59,19 +59,19 @@
</div>
</div>
<div fxLayout="row" fxLayoutGap="14px" fxLayoutAlign="start none">
<div fxFlex="30">
<!-- <div fxFlex="30">
<mat-form-field style="width:100%">
<mat-select (selectionChange)="selectedFreqPurchase($event)" placeholder="Frequency of Purchase" formControlName="frequency_of_purchase" required>
<mat-option *ngFor="let feq of m_freqOfPurchase" [value]="feq.frequency_id">{{ feq.name }}</mat-option>
</mat-select>
<!-- <mat-error *ngIf="sup.controls['frequency_of_purchase'].hasError('required') && sup.controls['frequency_of_purchase'].touched" class="mat-text-warn">PaymentMode Type Required.</mat-error> -->
</mat-form-field>
</mat-form-field>
</div>
<div *ngIf="sup.get('frequency_of_purchase').value == 8" fxFlex="30">
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Others Details" formControlName="freq_purchase_others_text_value">
</mat-form-field>
</div>
</div>-->
<div fxFlex="30" style="text-align:center;">
<span *ngIf="_supplierQuesFrom.controls.supplier_details.controls.length > 1" (click)="removeLanguage(i)">

View File

@ -50,7 +50,7 @@ public m_paymentModeType= [];
// 'name': 'Combination of Both'
// },
// ];
public m_freqOfPurchase= [];
//public m_freqOfPurchase= [];
// public m_freqOfPurchase= [
// {
// 'id': "1",
@ -95,24 +95,24 @@ public m_freqOfPurchase= [];
}
ngOnInit() {
this.getM_FreqOfPurchase();
// this.getM_FreqOfPurchase();
this.getM_PaymentModeType();
this.getPdSupplierFormDetails();
}
// ==================
getM_FreqOfPurchase() {
this.pdTrigerService.getAllMasterDatas('FREQUENCY').subscribe(
data => {
this.m_freqOfPurchase = data.records.filter(data => data.isactive == 1);
},
error => {
//getM_FreqOfPurchase() {
// this.pdTrigerService.getAllMasterDatas('FREQUENCY').subscribe(
// data => {
// this.m_freqOfPurchase = data.records.filter(data => data.isactive == 1);
// },
// error => {
// this.notifier.notify('warning', 'No Category Records Found.!');
// this.m_assets_type = "No Category Records Found.";
}
)
}
/// }
// )
// }
getM_PaymentModeType() {
this.pdTrigerService.getAllMasterDatas('PAYMENTMODE').subscribe(
@ -183,8 +183,8 @@ apiLoadFinish: boolean = false;
payment_mode: ['', Validators.compose([Validators.required])],
per_of_immediate_advance_payment:[''],
credit_period:[''],
frequency_of_purchase: ['', Validators.compose([Validators.required])],
freq_purchase_others_text_value: ['']
// frequency_of_purchase: ['', Validators.compose([Validators.required])],
// freq_purchase_others_text_value: ['']
});
}
@ -196,8 +196,8 @@ apiLoadFinish: boolean = false;
payment_mode: [data.payment_mode, Validators.compose([Validators.required])],
per_of_immediate_advance_payment:[data.per_of_immediate_advance_payment || ''],
credit_period:[data.credit_period || ''],
frequency_of_purchase: [data.frequency_of_purchase, Validators.compose([Validators.required])],
freq_purchase_others_text_value: [data.freq_purchase_others_text_value || '']
//frequency_of_purchase: [data.frequency_of_purchase, Validators.compose([Validators.required])],
//freq_purchase_others_text_value: [data.freq_purchase_others_text_value || '']
});
}
@ -213,9 +213,9 @@ apiLoadFinish: boolean = false;
mobile_number: val.mobile_number,
payment_mode: val.payment_mode,
per_of_immediate_advance_payment: val.per_of_immediate_advance_payment,
credit_period: val.credit_period,
frequency_of_purchase: val.frequency_of_purchase,
freq_purchase_others_text_value: val.freq_purchase_others_text_value
credit_period: val.credit_period
// frequency_of_purchase: val.frequency_of_purchase,
// freq_purchase_others_text_value: val.freq_purchase_others_text_value
};
const control = <FormArray>this._supplierQuesFrom.controls['supplier_details'];
control.push(this.initDetailsWithdata(vals));

View File

@ -1,12 +1,35 @@
<mat-card style="min-height:540px;">
<mat-card-content>
<div style="text-align: right;" class="mb-1">
<mat-card>
<mat-card-content>
<div fxLayout="row">
<!--- <button mat-raised-button mat-icon-button class="hover-icon start_close_btn" type="button" matTooltip="Close" matTooltipPosition="above"
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>-->
<div fxFlex="33" class="text-xs-left">
<h4 class="mt-0">{{mainApplicantName}}</h4>
<small>{{pdMasterList.customer_segment_name}}</small>
</div>
<div fxFlex="56" class="text-xs-right">
<h4 class="mt-0">{{pdMasterList.product_name}}/{{pdMasterList.subproduct_name}}</h4>
<small>{{pdMasterList.lender_full_name}}/{{pdMasterList.lender_applicant_id}}</small>
</div>
<div fxFlex="10" style="text-align: right;" class="mb-1">
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Close" matTooltipPosition="above"
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>
</div>
</div>
</mat-card-content>
</mat-card>
<mat-card style="max-height:400px;overflow: auto;">
<mat-card-content>
<button matTooltip="Menu" matTooltipPosition="above" (click)="mailnav.toggle()" color="primary" fxHide="false" fxshow.gt-sm mat-icon-button mat-raised-button>
<mat-icon style="color: white;">short_text</mat-icon>
</button>
<mat-sidenav-container class="app-inner background-none shadow-none mail-db">
<mat-sidenav #mailnav [mode]="isOver() ? 'over' : 'side'" [opened]="!isOver()" class="mail-sidebar pl-xs pr-xs">
<button _ngcontent-c21="" [disabled]="actualQuestions!=answeredQuestions" class="compose-btn mat-warn mat-raised-button mb-1" (click)="changePDStatus(pdStatusCheck.COMPLETED);"><span>{{currentPDStatus==pdStatusCheck.INPROGRESS ? 'COMPLETE':(currentPDStatus==pdStatusCheck.QC_COMPLETED ? 'QC COMPLETED' : currentPDStatus ) }}</span></button>
<!--{{ (currentPDStatus==pdStatusCheck.INPROGRESS)? 'COMPLETE':(currentPDStatus) }} -->
<div *ngIf="categoryList != ''">
@ -28,10 +51,14 @@
</mat-expansion-panel>
</div>
<mat-list *ngFor="let formButton of categoryFormButtons">
<mat-list-item class="custm-list-item" (click)="OnSelectDirectForms(formButton)" style="background-color:#e0e0e0">
<span class="mt-0">{{ (formButton.form_name.length>17)? (formButton.form_name | slice:0:17)+'..':(formButton.form_name) }}</span>
<mat-list-item class="custm-list-item" (click)="OnSelectDirectForms(formButton)" [ngStyle]="{'background-color':formButton.isAnswered == false ? '#827f7f' : '#4caf50' ,'color':'#fff'}">
<span class="mt-0">{{ (formButton.form_name.length>17)? (formButton.form_name | slice:0:17)+'..':(formButton.form_name) }}</span>
</mat-list-item>
</mat-list>
<button _ngcontent-c21="" matTooltip="Complete Question" matTooltipPosition="above" [disabled]="actualQuestions!=answeredQuestions" class="compose-btn mat-warn mat-raised-button mb-1" (click)="changePDStatus(pdStatusCheck.COMPLETED);" style="margin-top:10px;"><span>{{currentPDStatus==pdStatusCheck.INPROGRESS ? 'COMPLETE':(currentPDStatus==pdStatusCheck.QC_COMPLETED ? 'QC COMPLETED' : currentPDStatus ) }}</span></button>
<!--<mat-list>-->
<!--<mat-list-item (click)="OnSelectDirectForms(rentalDetail)" style="background-color:#e0e0e0">-->
<!--<span class="mt-0">{{rentalDetail.form_name}}</span>-->
@ -39,32 +66,17 @@
<!--</mat-list>-->
</mat-sidenav>
<mat-toolbar color="primary" fxHide="false" fxHide.gt-sm>
<!--<mat-toolbar color="primary" fxHide="false" fxshow.gt-sm>
<button (click)="mailnav.toggle()" mat-icon-button>
<mat-icon style="color: white;">short_text</mat-icon>
</button>
<span class="mr-1 ml-1">Category</span>
</mat-toolbar>
</mat-toolbar>-->
<div class="main-content" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
<figure>
<mat-card-content>
<div fxLayout="row">
<!--- <button mat-raised-button mat-icon-button class="hover-icon start_close_btn" type="button" matTooltip="Close" matTooltipPosition="above"
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>-->
<div fxFlex="33" class="text-xs-left">
<h4 class="mt-0">{{mainApplicantName}}</h4>
<small>{{pdMasterList.customer_segment_name}}</small>
</div>
<div fxFlex="66" class="text-xs-right">
<h4 class="mt-0">{{pdMasterList.product_name}}/{{pdMasterList.subproduct_name}}</h4>
<small>{{pdMasterList.lender_full_name}}/{{pdMasterList.lender_applicant_id}}</small>
</div>
</div>
</mat-card-content>
<hr>
<div *ngIf="!formsCategoryEnable">
<mat-card-content style="min-height: 500px;" *ngIf="selectedCategory.length==0">
<p>No Records Found..</p>
@ -77,6 +89,7 @@
<ng-container *ngSwitchCase="1">
<mat-card-content>
<form [formGroup]="optionsForm" *ngIf="answerList.length>0 ; else noanswers;" style="min-height: 450px;">
<mat-card-content>

View File

@ -1,50 +1,66 @@
<div style="height: 550px;">
<div style="text-align: right">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="closeAllocationComponent()"><mat-icon>close</mat-icon></button>
</div>
<mat-card style="width: 1000px;">
<mat-card-header>
<mat-card-title>{{pageTitle}}</mat-card-title>
</mat-card-header>
<mat-card-content>
<!-- <form [formGroup]="_pdAllocationForm" (submit)="onSubmit()"> -->
<div *ngIf="pdCentralOfficerList.length > 0" >
<div fxLayout="row wrap" fxFlex="100%">
<div fxLayout="row wrap" fxFlex="22%" *ngFor="let officer of pdCentralOfficerList; ">
<mat-card fxFlex="100%">
<mat-card-content style="text-align:center">
<mat-radio-button [value]="officer" (change)="selectPdOfficer(officer)"></mat-radio-button>
<img [src]="officer.profile_url ||'https://image.ibb.co/mGjZB9/usernew.png'" alt="No Image" style="border-radius:50%;width:100px;height:100px;"><br>
<span>{{officer.first_name}}</span>
<br>
<span>{{officer.mobile_no}}</span><br>
<span>PD in hand - {{officer.count}}</span>
</mat-card-content>
</mat-card>
</div>
</div>
</div>
<mat-list *ngIf="pdCentralOfficerList.length == 0">
<mat-list-item>
<p>No central pd officer available.</p>
</mat-list-item>
</mat-list>
<!-- </form> -->
</mat-card-content>
<mat-card-actions>
<div style="text-align:right;">
<button mat-raised-button mat-icon-button (click)="updatePdOfficer(selectedItem)" class="mr-1 mb-1 hover-icon" type="button"><mat-icon>save</mat-icon></button>
<h2 mat-dialog-title>
<div fxFlex="70">
{{pageTitle}}
</div>
</mat-card-actions>
</mat-card>
</div>
<notifier-container></notifier-container>
<div fxFlex="30" align="end">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="closeAllocationComponent()" matTooltip="Close" matTooltipPosition="below"><mat-icon>close</mat-icon></button>
</div>
</h2>
<mat-dialog-content class="mat-typography">
<!-- <form [formGroup]="_pdAllocationForm" (submit)="onSubmit()"> -->
<mat-list role="list" *ngIf="pdCentralOfficerList.length > 0">
<mat-list-item role="listitem" *ngFor="let officer of pdCentralOfficerList; let i = index">
<div fxFlex="100">
<div fxLayout="row wrap">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
<mat-radio-button color="primary" [value]="officer" (change)="selectedItem = $event.value">
{{officer.first_name}}
</mat-radio-button>
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
<span>{{officer.mobile_no}}</span>
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40">
<span class="view_more" (click)="viewMoreDetails(officer)" matTooltip="View More" matTooltipPosition="right">PD in hand - {{officer.count}}</span>
</div>
</div>
</div>
</mat-list-item>
</mat-list>
<mat-list *ngIf="pdCentralOfficerList.length == 0">
<mat-list-item>
<p>No central officer available.</p>
</mat-list-item>
</mat-list>
<!-- </form> -->
</mat-dialog-content>
<mat-dialog-actions >
<div fxFlex="50" align="left">
<p *ngIf="selectedItem">Central Officer: {{selectedItem.first_name}}</p>
</div>
<div fxFlex="50" align="right">
<button mat-raised-button mat-icon-button (click)="updatePdOfficer(selectedItem)" class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="below"><mat-icon>save</mat-icon></button>
</div>
</mat-dialog-actions>
<notifier-container></notifier-container>

View File

@ -1,3 +1,14 @@
.example-full-width{
width: 100%;
}
.view_more {
cursor: pointer;
color: #e00201 !important;
// text-decoration-line: underline;
// text-decoration-style: dotted;
// font-weight: bold;
}
.text_change {
color: #e00201 !important;
}

View File

@ -1,8 +1,9 @@
import { Component, OnInit, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
import { NotifierService } from 'angular-notifier';
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
import { AllocationViewMoreComponent } from './../allocation-view-more/allocation-view-more.component';
@Component({
selector: 'app-tele-pd-allocation',
@ -18,7 +19,7 @@ export class TelePdAllocationComponent implements OnInit {
selectedItem:any;
isDisabled: boolean;
constructor( notifier: NotifierService,
private _fb: FormBuilder,
private _fb: FormBuilder, private dialog: MatDialog,
private dialogRef: MatDialogRef<TelePdAllocationComponent>,
private _pd: PdTrigerService,
@Inject(MAT_DIALOG_DATA) public data: any) {
@ -42,22 +43,16 @@ export class TelePdAllocationComponent implements OnInit {
}, error => this.errorMessage = <any> error);
}
// select pd officer list
selectPdOfficer(selected:any){
this.isDisabled=false;
this.selectedItem=selected;
// this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
}
/** To update pd officer*/
updatePdOfficer(allocateDate:any) {
if(this.isDisabled){
this.notifier.notify('warning', 'Please Choose PD Officer.!');
updatePdOfficer(allocateDetails:any) {
if(!allocateDetails){
this.notifier.notify('warning', 'Please Choose Central Officer.!');
}
else {
let updateData = {
"pd_id":this.data.pd_id,
"central_pd_officer_id":allocateDate.fk_user_id,
"central_pd_officer_id":allocateDetails.fk_user_id,
}
this._pd.updatePdOfficer(updateData).subscribe(
result => {
@ -80,5 +75,24 @@ export class TelePdAllocationComponent implements OnInit {
closeAllocationComponent(): void {
this.dialogRef.close();
}
// officer view more
viewMoreDetails(details:any){
if(Number(details.count) > 0) {
const dialogSchedule = this.dialog.open(AllocationViewMoreComponent, {
data: details,
disableClose: true,
position: { right: '0'},
width:'80%',
// hasBackdrop:false
});
// dialogSchedule.afterClosed()
// .subscribe(dataresult => {
// });
}
else {
this.notifier.notify('warning', 'No PD In Hand');
}
}
}

View File

@ -4,11 +4,11 @@
<mat-card>
<mat-card-content style="background:#e00201;">
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
<div *ngFor="let master of pdMasterData" class="ml-xs mr-xs" fxFlex="35" style="color:#fff;">
<div *ngFor="let master of pdMasterData" class="ml-xs mr-xs" fxFlex="45" style="color:#fff;">
<h4>{{master.lender_full_name}} </h4>
<span *ngIf="master.lender_applicant_id"> {{master.lender_applicant_id}} - </span> {{master.pd_date_of_initiation}}
</div>
<div *ngFor="let master of pdMasterData" class="ml-xs mr-xs pt-1" fxFlex="65" style="text-align:right;" >
<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>

View File

@ -114,6 +114,8 @@ export class ViewPdComponent implements OnInit, OnDestroy {
if(pdData.fk_pd_type == 1){
const dialogRef = this.dialog.open(PdAllocationComponent, {
data: pdData,
width: '60%',
maxHeight: '60%',
disableClose: true
});
dialogRef.afterClosed()
@ -125,6 +127,8 @@ export class ViewPdComponent implements OnInit, OnDestroy {
else if(pdData.fk_pd_type == 2){
const dialogRef = this.dialog.open(SmartPdAllocationComponent, {
data: pdData,
width: '60%',
maxHeight: '60%',
disableClose: true
});
dialogRef.afterClosed()
@ -137,6 +141,8 @@ export class ViewPdComponent implements OnInit, OnDestroy {
else if(pdData.fk_pd_type == 3){
const dialogRef = this.dialog.open(TelePdAllocationComponent, {
data: pdData,
width: '60%',
maxHeight: '60%',
disableClose: true,
});
dialogRef.afterClosed()

View File

@ -66,6 +66,7 @@ import { TelePdAllocationComponent } from './list-pd/tele-pd-allocation/tele-pd-
import { PdReportComponent } from './list-pd/pd-report/pd-report.component';
import {RentalInfoComponent} from "./list-pd/start-pd/forms/rental-info/rental-info.component";
import { AllocationViewMoreComponent } from './list-pd/allocation-view-more/allocation-view-more.component';
/**
@ -140,7 +141,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
// AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}), OwlDateTimeModule,
// OwlNativeDateTimeModule,
// ],
declarations: [RentalInfoComponent, TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent],
declarations: [RentalInfoComponent, TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent, AllocationViewMoreComponent],
// exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent],
// providers: [PdTrigerService, GetGeometricLocationService],
@ -172,9 +173,9 @@ const pdCustomNotifierOptions: NotifierOptions = {
OwlNativeDateTimeModule,
],
// declarations: [ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, AssetsInfoComponent],
exports: [PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent],
exports: [PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent, AllocationViewMoreComponent],
providers: [PdTrigerService, GetGeometricLocationService],
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent]
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, AllocationViewMoreComponent]
})
export class ManagePdModule {
}

View File

@ -4,11 +4,11 @@
<mat-card>
<mat-card-content style="background:#e00201;">
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
<div *ngFor="let master of pdMasterData" class="ml-xs mr-xs" fxFlex="35" style="color:#fff;">
<div *ngFor="let master of pdMasterData" class="ml-xs mr-xs" fxFlex="45" style="color:#fff;">
<h4>{{master.lender_full_name}} </h4>
<span *ngIf="master.lender_applicant_id"> {{master.lender_applicant_id}} - </span> {{master.pd_date_of_initiation}}
</div>
<div *ngFor="let master of pdMasterData" class="ml-xs mr-xs pt-1" fxFlex="65" style="text-align:right;" >
<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.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.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>

View File

@ -112,6 +112,8 @@ export class QcViewComponent implements OnInit, OnDestroy {
if(pdData.fk_pd_type == 1){
const dialogRef = this.dialog.open(PdAllocationComponent, {
data: pdData,
width: '60%',
maxHeight: '60%',
disableClose: true
});
dialogRef.afterClosed()
@ -123,6 +125,8 @@ export class QcViewComponent implements OnInit, OnDestroy {
else if(pdData.fk_pd_type == 2){
const dialogRef = this.dialog.open(SmartPdAllocationComponent, {
data: pdData,
width: '60%',
maxHeight: '60%',
disableClose: true
});
dialogRef.afterClosed()
@ -135,6 +139,8 @@ export class QcViewComponent implements OnInit, OnDestroy {
else if(pdData.fk_pd_type == 3){
const dialogRef = this.dialog.open(TelePdAllocationComponent, {
data: pdData,
width: '60%',
maxHeight: '60%',
disableClose: true,
});
dialogRef.afterClosed()