Merge branch 'master' of https://bitbucket.org/sriramv18/sparqsineedge
This commit is contained in:
commit
87ca647574
@ -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> -->
|
||||||
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -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);
|
||||||
|
// }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -3,12 +3,13 @@ import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/m
|
|||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { NotifierService } from 'angular-notifier';
|
import { NotifierService } from 'angular-notifier';
|
||||||
import { MatDialog } from '@angular/material';
|
import { MatDialog } from '@angular/material';
|
||||||
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
import { PdTrigerService } from './../../../pd-service/pd-triger.service';
|
||||||
import { GetGeometricLocationService } from '../../../location-service/get-geometric-location.service';
|
import { GetGeometricLocationService } from './../../../location-service/get-geometric-location.service';
|
||||||
import { ListPdComponent } from '../list-pd.component';
|
import { ListPdComponent } from './../list-pd.component';
|
||||||
import { PdAllocationComponent } from '../pd-allocation/pd-allocation.component';
|
import { PdAllocationComponent } from './../pd-allocation/pd-allocation.component';
|
||||||
import { SmartPdAllocationComponent } from '../smart-pd-allocation/smart-pd-allocation.component';
|
import { SmartPdAllocationComponent } from './../smart-pd-allocation/smart-pd-allocation.component';
|
||||||
import { SchedulePdComponent } from '../schedule-pd/schedule-pd.component';
|
import { TelePdAllocationComponent } from '././../tele-pd-allocation/tele-pd-allocation.component';
|
||||||
|
import { SchedulePdComponent } from './../schedule-pd/schedule-pd.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-map-pd-view',
|
selector: 'app-map-pd-view',
|
||||||
@ -122,9 +123,11 @@ pdList:any[] = [];
|
|||||||
|
|
||||||
// pd allocation to
|
// pd allocation to
|
||||||
pdAllocationTo(pdData:any) {
|
pdAllocationTo(pdData:any) {
|
||||||
if(pdData.fk_pd_type != 2){
|
if(pdData.fk_pd_type == 1){
|
||||||
const dialogRef = this.dialog.open(PdAllocationComponent, {
|
const dialogRef = this.dialog.open(PdAllocationComponent, {
|
||||||
data: pdData,
|
data: pdData,
|
||||||
|
width: '60%',
|
||||||
|
maxHeight: '60%',
|
||||||
disableClose: true
|
disableClose: true
|
||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
@ -136,6 +139,8 @@ pdList:any[] = [];
|
|||||||
else if(pdData.fk_pd_type == 2){
|
else if(pdData.fk_pd_type == 2){
|
||||||
const dialogRef = this.dialog.open(SmartPdAllocationComponent, {
|
const dialogRef = this.dialog.open(SmartPdAllocationComponent, {
|
||||||
data: pdData,
|
data: pdData,
|
||||||
|
width: '60%',
|
||||||
|
maxHeight: '60%',
|
||||||
disableClose: true
|
disableClose: true
|
||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
@ -144,6 +149,20 @@ pdList:any[] = [];
|
|||||||
this.loadPdDetails();
|
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();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,49 +1,62 @@
|
|||||||
<div style="height: 550px;">
|
<h2 mat-dialog-title>
|
||||||
<div style="text-align: right">
|
<div fxFlex="70">
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="closeAllocationComponent()"><mat-icon>close</mat-icon></button>
|
{{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;">
|
|
||||||
<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()"> -->
|
<!-- <form [formGroup]="_pdAllocationForm" (submit)="onSubmit()"> -->
|
||||||
|
|
||||||
<div *ngIf="pdOfficerList.length > 0" >
|
<mat-list role="list" *ngIf="pdOfficerList.length > 0">
|
||||||
<div fxLayout="row wrap" fxFlex="100%">
|
|
||||||
<div fxLayout="row wrap" fxFlex="22%" *ngFor="let officer of pdOfficerList; ">
|
<mat-list-item role="listitem" *ngFor="let officer of pdOfficerList; let i = index">
|
||||||
<mat-card fxFlex="100%">
|
<div fxFlex="100">
|
||||||
<mat-card-content style="text-align:center">
|
<div fxLayout="row wrap">
|
||||||
<mat-radio-button [value]="officer" (change)="selectPdOfficer(officer)"></mat-radio-button>
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
|
||||||
<img [src]="officer.profile_url ||'https://image.ibb.co/mGjZB9/usernew.png'" alt="No Image" style="border-radius:50%;width:100px;height:100px;"><br>
|
<mat-radio-button color="primary" [value]="officer" (change)="selectedItem = $event.value">
|
||||||
<span>{{officer.first_name}}</span>
|
{{officer.first_name}}
|
||||||
<br>
|
</mat-radio-button>
|
||||||
<span>{{officer.mobile_no}}</span><br>
|
</div>
|
||||||
<span>PD in hand - {{officer.count}}</span>
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
|
||||||
</mat-card-content>
|
<span>{{officer.mobile_no}}</span>
|
||||||
</mat-card>
|
</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>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</mat-list-item>
|
||||||
|
|
||||||
|
</mat-list>
|
||||||
<mat-list *ngIf="pdOfficerList.length == 0">
|
<mat-list *ngIf="pdOfficerList.length == 0">
|
||||||
<mat-list-item>
|
<mat-list-item>
|
||||||
<p>No PD officer available.</p>
|
<p>No PD officer available.</p>
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
</mat-list>
|
</mat-list>
|
||||||
|
|
||||||
|
|
||||||
<!-- </form> -->
|
<!-- </form> -->
|
||||||
</mat-card-content>
|
</mat-dialog-content>
|
||||||
<mat-card-actions>
|
|
||||||
<div style="text-align:right;">
|
<mat-dialog-actions >
|
||||||
<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 fxFlex="50" align="left">
|
||||||
|
<p *ngIf="selectedItem">PD Officer: {{selectedItem.first_name}}</p>
|
||||||
</div>
|
</div>
|
||||||
</mat-card-actions>
|
<div fxFlex="50" align="right">
|
||||||
</mat-card>
|
<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>
|
</div>
|
||||||
|
|
||||||
|
</mat-dialog-actions>
|
||||||
|
|
||||||
|
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,14 @@
|
|||||||
.example-full-width{
|
.example-full-width{
|
||||||
width: 100%;
|
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;
|
||||||
|
}
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
import { Component, OnInit, Inject } from '@angular/core';
|
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 { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
|
||||||
import { NotifierService } from 'angular-notifier';
|
import { NotifierService } from 'angular-notifier';
|
||||||
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
||||||
|
import { AllocationViewMoreComponent } from './../allocation-view-more/allocation-view-more.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-pd-allocation',
|
selector: 'app-pd-allocation',
|
||||||
@ -17,10 +18,11 @@ export class PdAllocationComponent implements OnInit {
|
|||||||
notifier : NotifierService;
|
notifier : NotifierService;
|
||||||
selectedItem:any;
|
selectedItem:any;
|
||||||
isDisabled: boolean;
|
isDisabled: boolean;
|
||||||
|
|
||||||
constructor( notifier: NotifierService,
|
constructor( notifier: NotifierService,
|
||||||
private _fb: FormBuilder,
|
private _fb: FormBuilder,
|
||||||
private dialogRef: MatDialogRef<PdAllocationComponent>,
|
private dialogRef: MatDialogRef<PdAllocationComponent>,
|
||||||
private _pd: PdTrigerService,
|
private _pd: PdTrigerService, private dialog: MatDialog,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any) {
|
@Inject(MAT_DIALOG_DATA) public data: any) {
|
||||||
this.notifier=notifier;
|
this.notifier=notifier;
|
||||||
}
|
}
|
||||||
@ -48,23 +50,16 @@ export class PdAllocationComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}, error => this.errorMessage = <any> error);
|
}, 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*/
|
/** To update pd officer*/
|
||||||
updatePdOfficer(allocateDate:any) {
|
updatePdOfficer(allocateDetails:any) {
|
||||||
if(this.isDisabled){
|
if(!allocateDetails){
|
||||||
this.notifier.notify('warning', 'Please Choose PD Officer.!');
|
this.notifier.notify('warning', 'Please Choose PD Officer.!');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let updateData = {
|
let updateData = {
|
||||||
"pd_id":this.data.pd_id,
|
"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(
|
this._pd.updatePdOfficer(updateData).subscribe(
|
||||||
result => {
|
result => {
|
||||||
@ -87,4 +82,23 @@ export class PdAllocationComponent implements OnInit {
|
|||||||
closeAllocationComponent(): void {
|
closeAllocationComponent(): void {
|
||||||
this.dialogRef.close();
|
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');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,120 +1,101 @@
|
|||||||
<div style="max-height: 550px;">
|
<h2 mat-dialog-title>
|
||||||
<div style="text-align: right">
|
<div fxFlex="70">
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="closeAllocationComponent()"><mat-icon>close</mat-icon></button>
|
{{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'">
|
</h2>
|
||||||
<mat-card-header>
|
<mat-dialog-content class="mat-typography">
|
||||||
<mat-card-title>{{pageTitle}}</mat-card-title>
|
|
||||||
</mat-card-header>
|
|
||||||
<mat-card-content>
|
|
||||||
|
|
||||||
<!-- <form [formGroup]="_pdAllocationForm" (submit)="onSubmit()"> -->
|
<!-- <form [formGroup]="_pdAllocationForm" (submit)="onSubmit()"> -->
|
||||||
<div *ngIf="pdCentralOfficerList.length > 0" >
|
<!-- This Container for central pd officer -->
|
||||||
<div fxLayout="row wrap" fxFlex="100%">
|
<div *ngIf="showFirstCard">
|
||||||
<div fxLayout="row wrap" fxFlex="22%" *ngFor="let officer of pdCentralOfficerList; ">
|
<mat-list role="list" *ngIf="pdCentralOfficerList.length > 0">
|
||||||
<!-- <p><mat-radio-button [value]="officer" (change)="selectPdOfficer(officer)"></mat-radio-button>
|
|
||||||
|
<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}}
|
{{officer.first_name}}
|
||||||
</p>
|
</mat-radio-button>
|
||||||
<p style="padding-left: 8%;">
|
</div>
|
||||||
<span matBadge="{{officer.allocated}}" matBadgeOverlap="false" matBadgeColor="accent">Allocated</span>
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
|
||||||
</p>
|
<span>{{officer.mobile_no}}</span>
|
||||||
<p style="padding-left: 8%;">
|
</div>
|
||||||
<span matBadge="{{officer.scheduled}}" matBadgeOverlap="false" >Scheduled</span>
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40">
|
||||||
</p>
|
<span class="view_more" (click)="viewMoreDetails(officer)" matTooltip="View More" matTooltipPosition="right">PD in hand - {{officer.count}}</span>
|
||||||
<p style="padding-left: 8%;">
|
|
||||||
<span matBadge="{{officer.inprogress}}" matBadgeOverlap="false" matBadgeColor="warn">Inprogress</span>
|
|
||||||
</p>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<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>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<mat-list *ngIf="pdCentralOfficerList.length == 0">
|
|
||||||
<mat-list-item>
|
|
||||||
<p>No executive available.</p>
|
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
|
|
||||||
</mat-list>
|
</mat-list>
|
||||||
|
<mat-list *ngIf="pdCentralOfficerList.length == 0">
|
||||||
<!-- </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>
|
|
||||||
</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>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
</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>
|
<mat-list-item>
|
||||||
<p>No central officer available.</p>
|
<p>No central officer available.</p>
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
</mat-list>
|
</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> -->
|
<!-- </form> -->
|
||||||
</mat-card-content>
|
</mat-dialog-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>
|
|
||||||
|
|
||||||
|
<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>
|
</div>
|
||||||
</mat-card-actions>
|
<div fxFlex="50" align="end">
|
||||||
</mat-card>
|
<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>
|
</div>
|
||||||
|
|
||||||
|
</mat-dialog-actions>
|
||||||
|
|
||||||
|
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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;
|
||||||
|
}
|
||||||
@ -1,8 +1,9 @@
|
|||||||
import { Component, OnInit, Inject } from '@angular/core';
|
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 { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
|
||||||
import { NotifierService } from 'angular-notifier';
|
import { NotifierService } from 'angular-notifier';
|
||||||
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
||||||
|
import { AllocationViewMoreComponent } from './../allocation-view-more/allocation-view-more.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-smart-pd-allocation',
|
selector: 'app-smart-pd-allocation',
|
||||||
@ -11,22 +12,22 @@ import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
|||||||
})
|
})
|
||||||
export class SmartPdAllocationComponent implements OnInit {
|
export class SmartPdAllocationComponent implements OnInit {
|
||||||
|
|
||||||
public pageTitle2: string = "Allocate To Executive";
|
|
||||||
public pageTitle: string = "Allocate To Central Officer";
|
public pageTitle: string = "Allocate To Central Officer";
|
||||||
public _pdAllocationForm: FormGroup;
|
public _pdAllocationForm: FormGroup;
|
||||||
//public pdOfficerList: any = [];
|
|
||||||
public pdCentralOfficerList: any = [];
|
public pdCentralOfficerList: any = [];
|
||||||
public pdExcutiveList: any = [];
|
public pdExcutiveList: any = [];
|
||||||
errorMessage: any;
|
errorMessage: any;
|
||||||
notifier : NotifierService;
|
notifier : NotifierService;
|
||||||
selectedItem:any=[];
|
// isDisabled: boolean;
|
||||||
selectedItem1:any=[];
|
|
||||||
isDisabled: boolean;
|
|
||||||
showFirstCard: boolean;
|
showFirstCard: boolean;
|
||||||
showSecondCard: boolean;
|
showSecondCard: boolean;
|
||||||
|
selectedCentralItem: any;
|
||||||
|
selectedExcutiveItem: any;
|
||||||
|
checkFirstItem:string ='';
|
||||||
|
checkSecondItem:string ='';
|
||||||
|
|
||||||
constructor( notifier: NotifierService,
|
constructor( notifier: NotifierService,
|
||||||
private _fb: FormBuilder,
|
private _fb: FormBuilder, private dialog: MatDialog,
|
||||||
private dialogRef: MatDialogRef<SmartPdAllocationComponent>,
|
private dialogRef: MatDialogRef<SmartPdAllocationComponent>,
|
||||||
private _pd: PdTrigerService,
|
private _pd: PdTrigerService,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any) {
|
@Inject(MAT_DIALOG_DATA) public data: any) {
|
||||||
@ -35,7 +36,7 @@ export class SmartPdAllocationComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.showFirstCard=true;
|
this.showFirstCard=true;
|
||||||
this.isDisabled=true;
|
// this.isDisabled=true;
|
||||||
this.getPDOfficerList(this.data.pd_id);
|
this.getPDOfficerList(this.data.pd_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,27 +51,19 @@ export class SmartPdAllocationComponent implements OnInit {
|
|||||||
}, error => this.errorMessage = <any> error);
|
}, 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*/
|
/** To update pd officer*/
|
||||||
updateAllocation(pdOfficer:any,excutiveOfficer:any) {
|
updateAllocation(centralOfficer:any,excutiveOfficer:any) {
|
||||||
if(this.isDisabled){
|
if(!centralOfficer){
|
||||||
this.notifier.notify('warning', 'Please Choose Allocate To Whom.!');
|
this.notifier.notify('warning', 'Please Choose Central Officer.!');
|
||||||
|
}
|
||||||
|
else if(!excutiveOfficer){
|
||||||
|
this.notifier.notify('warning', 'Please Choose Executive.!');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let updateData = {
|
let updateData = {
|
||||||
"pd_id":this.data.pd_id,
|
"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,
|
"executive_id":excutiveOfficer.fk_user_id,
|
||||||
}
|
}
|
||||||
this._pd.updatePdOfficer(updateData).subscribe(
|
this._pd.updatePdOfficer(updateData).subscribe(
|
||||||
@ -93,11 +86,15 @@ export class SmartPdAllocationComponent implements OnInit {
|
|||||||
getFirstCard() {
|
getFirstCard() {
|
||||||
this.showSecondCard=false;
|
this.showSecondCard=false;
|
||||||
this.showFirstCard=true;
|
this.showFirstCard=true;
|
||||||
|
this.pageTitle = "Allocate To Central Officer";
|
||||||
|
this.checkFirstItem = this.selectedCentralItem ? this.selectedCentralItem.fk_user_id : '';
|
||||||
|
|
||||||
}
|
}
|
||||||
getSecondCard(){
|
getSecondCard(){
|
||||||
this.showFirstCard=false;
|
this.showFirstCard=false;
|
||||||
this.showSecondCard=true;
|
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();
|
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');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
<div [formGroupName]="s">
|
<div [formGroupName]="s">
|
||||||
<div>
|
<div>
|
||||||
<mat-form-field style="width:100%">
|
<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-option *ngFor="let prop of m_propertyType" [value]="prop.id">{{ prop.name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -97,13 +97,13 @@
|
|||||||
<div *ngFor="let detail of sup['controls'].details['controls']; let s = index">
|
<div *ngFor="let detail of sup['controls'].details['controls']; let s = index">
|
||||||
<div [formGroupName]="s">
|
<div [formGroupName]="s">
|
||||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
<div fxFlex="33">
|
<!---- <div fxFlex="33">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select placeholder="Type" formControlName="insurance_type" required>
|
<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-option *ngFor="let ins_type of m_insuranceType" [value]="ins_type.id">{{ ins_type.name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>-->
|
||||||
<div fxFlex="33">
|
<div fxFlex="33">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
<input matInput placeholder="Premium Paid" formControlName="premium_paid" required (keypress)="keyPress($event)">
|
<input matInput placeholder="Premium Paid" formControlName="premium_paid" required (keypress)="keyPress($event)">
|
||||||
@ -116,13 +116,13 @@
|
|||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
|
||||||
<div fxFlex="33">
|
<div fxFlex="33">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
<input matInput placeholder="Sum Assured" formControlName="sum_assured" required (keypress)="keyPress($event)">
|
<input matInput placeholder="Sum Assured" formControlName="sum_assured" required (keypress)="keyPress($event)">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
<div fxFlex="33">
|
<div fxFlex="33">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
<input matInput placeholder="Members Covered" formControlName="members_coverd" required>
|
<input matInput placeholder="Members Covered" formControlName="members_coverd" required>
|
||||||
@ -194,7 +194,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</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>
|
<label>Year and Month of Purchase?</label>
|
||||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
@ -204,28 +204,28 @@
|
|||||||
<input matInput type="number" placeholder="Month" formControlName="purchase_month">
|
<input matInput type="number" placeholder="Month" formControlName="purchase_month">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</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 *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 fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
<div fxFlex="33">
|
<div fxFlex="33">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<mat-form-field class="ml-xs example-full-width" style="width:95%">
|
||||||
<mat-select placeholder="Is there a loan?" formControlName="emi">
|
<mat-select placeholder="Is there a loan existing against this asset?" formControlName="emi">
|
||||||
<mat-option value="yes">Yes</mat-option>
|
<mat-option value="yes">Yes</mat-option>
|
||||||
<mat-option value="no">No</mat-option>
|
<mat-option value="no">No</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33">
|
<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="EMI Paid" formControlName="emi_paid" (keypress)="keyPress($event)">
|
<input matInput placeholder="Amount of EMI on This Loan?" formControlName="emi_paid" (keypress)="keyPress($event)">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33">
|
<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">
|
<input matInput placeholder="Elapsed Tenure in Months" formControlName="elapsed_tenure">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</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">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
<input matInput placeholder="Balance Tenure in Months" formControlName="balance_tenure">
|
<input matInput placeholder="Balance Tenure in Months" formControlName="balance_tenure">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|||||||
@ -90,7 +90,7 @@ public m_propertyType = [];
|
|||||||
// }
|
// }
|
||||||
// ];
|
// ];
|
||||||
|
|
||||||
public m_insuranceType = [];
|
//public m_insuranceType = [];
|
||||||
|
|
||||||
// public m_insuranceType = [{
|
// public m_insuranceType = [{
|
||||||
// 'id': "1",
|
// 'id': "1",
|
||||||
@ -175,7 +175,7 @@ public m_investmentType = [];
|
|||||||
this.getM_PropertyType();
|
this.getM_PropertyType();
|
||||||
this.getM_InvestmentType();
|
this.getM_InvestmentType();
|
||||||
this.getM_FreqOfPurchase();
|
this.getM_FreqOfPurchase();
|
||||||
this.getM_InsuranceType();
|
//this.getM_InsuranceType();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ======================
|
// ======================
|
||||||
@ -228,17 +228,17 @@ public m_investmentType = [];
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
getM_InsuranceType() {
|
// getM_InsuranceType() {
|
||||||
this.pdTrigerService.getAllMasterDatas('INSURANCETYPE').subscribe(
|
// this.pdTrigerService.getAllMasterDatas('INSURANCETYPE').subscribe(
|
||||||
data => {
|
// data => {
|
||||||
this.m_insuranceType = data.records.filter(data => data.isactive == 1);
|
// this.m_insuranceType = data.records.filter(data => data.isactive == 1);
|
||||||
},
|
// },
|
||||||
error => {
|
// error => {
|
||||||
this.notifier.notify('warning', 'No Category Records Found.!');
|
// this.notifier.notify('warning', 'No Category Records Found.!');
|
||||||
// this.m_assets_type = "No Category Records Found.";
|
// this.m_assets_type = "No Category Records Found.";
|
||||||
}
|
// }
|
||||||
)
|
// )
|
||||||
}
|
//}
|
||||||
|
|
||||||
// =============================
|
// =============================
|
||||||
|
|
||||||
@ -299,8 +299,8 @@ public m_investmentType = [];
|
|||||||
details: this._formBuilder.array([]),
|
details: this._formBuilder.array([]),
|
||||||
approximate_market_value: ['', Validators.compose([])],
|
approximate_market_value: ['', Validators.compose([])],
|
||||||
name_of_the_owner: ['', Validators.compose([])],
|
name_of_the_owner: ['', Validators.compose([])],
|
||||||
purchase_year: ['', Validators.compose([])],
|
// purchase_year: ['', Validators.compose([])],
|
||||||
purchase_month: ['', Validators.compose([])],
|
//purchase_month: ['', Validators.compose([])],
|
||||||
emi: [''],
|
emi: [''],
|
||||||
emi_paid: [''],
|
emi_paid: [''],
|
||||||
elapsed_tenure: [''],
|
elapsed_tenure: [''],
|
||||||
@ -389,7 +389,7 @@ public m_investmentType = [];
|
|||||||
|
|
||||||
loadInsuranceDescription() {
|
loadInsuranceDescription() {
|
||||||
return this._formBuilder.group({
|
return this._formBuilder.group({
|
||||||
insurance_type: ['', Validators.compose([Validators.required])],
|
//insurance_type: ['', Validators.compose([Validators.required])],
|
||||||
premium_paid: ['', Validators.compose([Validators.required])],
|
premium_paid: ['', Validators.compose([Validators.required])],
|
||||||
frequency_mode: ['', Validators.compose([Validators.required])],
|
frequency_mode: ['', Validators.compose([Validators.required])],
|
||||||
sum_assured: ['', Validators.compose([Validators.required])],
|
sum_assured: ['', Validators.compose([Validators.required])],
|
||||||
@ -439,13 +439,13 @@ public m_investmentType = [];
|
|||||||
|
|
||||||
otherAssetsDescriptionWithData(data) {
|
otherAssetsDescriptionWithData(data) {
|
||||||
return this._formBuilder.group({
|
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) {
|
loadInsuranceDescriptionWithData(data) {
|
||||||
return this._formBuilder.group({
|
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])],
|
premium_paid: [data.premium_paid, Validators.compose([Validators.required])],
|
||||||
frequency_mode: [data.frequency_mode, Validators.compose([Validators.required])],
|
frequency_mode: [data.frequency_mode, Validators.compose([Validators.required])],
|
||||||
sum_assured: [data.sum_assured, Validators.compose([Validators.required])],
|
sum_assured: [data.sum_assured, Validators.compose([Validators.required])],
|
||||||
@ -481,8 +481,8 @@ public m_investmentType = [];
|
|||||||
details: this._formBuilder.array([]),
|
details: this._formBuilder.array([]),
|
||||||
approximate_market_value: [data.approximate_market_value, Validators.compose([])],
|
approximate_market_value: [data.approximate_market_value, Validators.compose([])],
|
||||||
name_of_the_owner: [data.name_of_the_owner, Validators.compose([])],
|
name_of_the_owner: [data.name_of_the_owner, Validators.compose([])],
|
||||||
purchase_year: [data.purchase_year, Validators.compose([])],
|
// purchase_year: [data.purchase_year, Validators.compose([])],
|
||||||
purchase_month: [data.purchase_month, Validators.compose([])],
|
// purchase_month: [data.purchase_month, Validators.compose([])],
|
||||||
emi: [data.emi || 0],
|
emi: [data.emi || 0],
|
||||||
emi_paid: [data.emi_paid || ''],
|
emi_paid: [data.emi_paid || ''],
|
||||||
elapsed_tenure: [data.elapsed_tenure || ''],
|
elapsed_tenure: [data.elapsed_tenure || ''],
|
||||||
@ -500,8 +500,8 @@ public m_investmentType = [];
|
|||||||
assets_mode: val.assets_mode,
|
assets_mode: val.assets_mode,
|
||||||
approximate_market_value: val.approximate_market_value,
|
approximate_market_value: val.approximate_market_value,
|
||||||
name_of_the_owner: val.name_of_the_owner,
|
name_of_the_owner: val.name_of_the_owner,
|
||||||
purchase_year: val.purchase_year,
|
// purchase_year: val.purchase_year,
|
||||||
purchase_month: val.purchase_month,
|
// purchase_month: val.purchase_month,
|
||||||
emi: val.emi,
|
emi: val.emi,
|
||||||
emi_paid: val.emi_paid,
|
emi_paid: val.emi_paid,
|
||||||
elapsed_tenure: val.elapsed_tenure,
|
elapsed_tenure: val.elapsed_tenure,
|
||||||
|
|||||||
@ -129,7 +129,7 @@
|
|||||||
formControlName="vintage" required>
|
formControlName="vintage" required>
|
||||||
</mat-form-field> -->
|
</mat-form-field> -->
|
||||||
<div>
|
<div>
|
||||||
<label>Approximate Vintage?</label>
|
<label>Number of Years / Months since account was started</label>
|
||||||
<br>
|
<br>
|
||||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
<input matInput placeholder="Net Profit / Loss" formControlName="financial_net_profit" (change)="calMargin( i, details); calYearVariation( i, details)" type="number" required>
|
<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>
|
||||||
<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>
|
||||||
<mat-form-field *ngIf="i != 0">
|
<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)">
|
<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>
|
<mat-card>
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<p>Estimated Value<p>
|
<p>Actual Values as per Customer<p>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<div formArrayName="estimated_value">
|
<div formArrayName="estimated_value">
|
||||||
<div *ngFor="let details of financialForm.controls.estimated_value['controls']; let i=index"
|
<div *ngFor="let details of financialForm.controls.estimated_value['controls']; let i=index"
|
||||||
@ -63,9 +63,9 @@
|
|||||||
<mat-form-field *ngIf="i != 0">
|
<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)">
|
<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>
|
<!--<mat-form-field>
|
||||||
<input matInput placeholder="Reason For Major Difference" formControlName="estimate_reason" required>
|
<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()"
|
<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">
|
matTooltip="Add More Estimated Value" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="i==0">
|
||||||
<mat-icon>add</mat-icon>
|
<mat-icon>add</mat-icon>
|
||||||
|
|||||||
@ -109,7 +109,7 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
estimate_net_profit: ['', Validators.compose([Validators.required, Validators.pattern(/^-?[1-9]\d*|0$/)])],
|
estimate_net_profit: ['', Validators.compose([Validators.required, Validators.pattern(/^-?[1-9]\d*|0$/)])],
|
||||||
estimate_margin: ['', Validators.compose([Validators.required])],
|
estimate_margin: ['', Validators.compose([Validators.required])],
|
||||||
estimate_variation: [''],
|
estimate_variation: [''],
|
||||||
estimate_reason: ['', Validators.compose([Validators.required])],
|
// estimate_reason: ['', Validators.compose([Validators.required])],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
addDate() {
|
addDate() {
|
||||||
|
|||||||
@ -44,15 +44,15 @@
|
|||||||
<mat-label>Complete address of the property</mat-label>
|
<mat-label>Complete address of the property</mat-label>
|
||||||
<textarea matInput placeholder="Address" formControlName="complete_add"></textarea>
|
<textarea matInput placeholder="Address" formControlName="complete_add"></textarea>
|
||||||
</mat-form-field>
|
</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)"
|
<input matInput placeholder="Area of the Property(in sq yd or Sq ft)"
|
||||||
formControlName="area_of_property">
|
formControlName="area_of_property">
|
||||||
</mat-form-field>
|
</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)"
|
<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">
|
formControlName="structure_property">
|
||||||
</mat-form-field>
|
</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)"
|
<input type="number" matInput placeholder="Total rooms let out (eg single room,2 BHK, let out rooms on each floor)"
|
||||||
formControlName="total_room">
|
formControlName="total_room">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@ -107,15 +107,15 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</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)"
|
<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">
|
formControlName="rent_each_floor">
|
||||||
</mat-form-field>
|
</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)"
|
<input matInput placeholder="Total rent received (Total montly rental from property/ies, with break up)"
|
||||||
formControlName="total_rent">
|
formControlName="total_rent">
|
||||||
</mat-form-field>
|
</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)"
|
<input matInput placeholder="Property paper or other related document to prove ownership (eg. Property registry etc)"
|
||||||
formControlName="related_doc_owner">
|
formControlName="related_doc_owner">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|||||||
@ -14,16 +14,16 @@
|
|||||||
<input matInput placeholder="Name" formControlName="raw_name" required>
|
<input matInput placeholder="Name" formControlName="raw_name" required>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<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>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Value" formControlName="raw_value" (keypress)="keyPress($event)" required>
|
<input matInput placeholder="Value" formControlName="raw_value" (keypress)="keyPress($event)" required>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:76%">
|
<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>
|
||||||
<mat-form-field style="width:76%">
|
<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>
|
</mat-form-field>
|
||||||
|
|
||||||
<button type="button" mat-raised-button mat-icon-button (click)="addRawMaterials()"
|
<button type="button" mat-raised-button mat-icon-button (click)="addRawMaterials()"
|
||||||
@ -50,16 +50,16 @@
|
|||||||
<input matInput placeholder="Name" formControlName="goods_name" required>
|
<input matInput placeholder="Name" formControlName="goods_name" required>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<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>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Value" formControlName="goods_value" (keypress)="keyPress($event)" required>
|
<input matInput placeholder="Value" formControlName="goods_value" (keypress)="keyPress($event)" required>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:76%">
|
<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>
|
||||||
<mat-form-field style="width:76%">
|
<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>
|
</mat-form-field>
|
||||||
|
|
||||||
<button type="button" mat-raised-button mat-icon-button (click)="addGoods()"
|
<button type="button" mat-raised-button mat-icon-button (click)="addGoods()"
|
||||||
@ -77,7 +77,7 @@
|
|||||||
<div fxLayout="row">
|
<div fxLayout="row">
|
||||||
<div fxFlex="60" class="pb-0 text-sm-left">
|
<div fxFlex="60" class="pb-0 text-sm-left">
|
||||||
<mat-form-field appearance="outline" style="width: 100%">
|
<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>
|
<textarea matInput placeholder="Remarks" formControlName="stock_remarks"></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -59,19 +59,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div fxLayout="row" fxLayoutGap="14px" fxLayoutAlign="start none">
|
<div fxLayout="row" fxLayoutGap="14px" fxLayoutAlign="start none">
|
||||||
<div fxFlex="30">
|
<!-- <div fxFlex="30">
|
||||||
<mat-form-field style="width:100%">
|
<mat-form-field style="width:100%">
|
||||||
<mat-select (selectionChange)="selectedFreqPurchase($event)" placeholder="Frequency of Purchase" formControlName="frequency_of_purchase" required>
|
<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-option *ngFor="let feq of m_freqOfPurchase" [value]="feq.frequency_id">{{ feq.name }}</mat-option>
|
||||||
</mat-select>
|
</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>
|
||||||
<div *ngIf="sup.get('frequency_of_purchase').value == 8" fxFlex="30">
|
<div *ngIf="sup.get('frequency_of_purchase').value == 8" fxFlex="30">
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
<input matInput placeholder="Others Details" formControlName="freq_purchase_others_text_value">
|
<input matInput placeholder="Others Details" formControlName="freq_purchase_others_text_value">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>-->
|
||||||
|
|
||||||
<div fxFlex="30" style="text-align:center;">
|
<div fxFlex="30" style="text-align:center;">
|
||||||
<span *ngIf="_supplierQuesFrom.controls.supplier_details.controls.length > 1" (click)="removeLanguage(i)">
|
<span *ngIf="_supplierQuesFrom.controls.supplier_details.controls.length > 1" (click)="removeLanguage(i)">
|
||||||
|
|||||||
@ -50,7 +50,7 @@ public m_paymentModeType= [];
|
|||||||
// 'name': 'Combination of Both'
|
// 'name': 'Combination of Both'
|
||||||
// },
|
// },
|
||||||
// ];
|
// ];
|
||||||
public m_freqOfPurchase= [];
|
//public m_freqOfPurchase= [];
|
||||||
// public m_freqOfPurchase= [
|
// public m_freqOfPurchase= [
|
||||||
// {
|
// {
|
||||||
// 'id': "1",
|
// 'id': "1",
|
||||||
@ -95,24 +95,24 @@ public m_freqOfPurchase= [];
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getM_FreqOfPurchase();
|
// this.getM_FreqOfPurchase();
|
||||||
this.getM_PaymentModeType();
|
this.getM_PaymentModeType();
|
||||||
this.getPdSupplierFormDetails();
|
this.getPdSupplierFormDetails();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ==================
|
// ==================
|
||||||
|
|
||||||
getM_FreqOfPurchase() {
|
//getM_FreqOfPurchase() {
|
||||||
this.pdTrigerService.getAllMasterDatas('FREQUENCY').subscribe(
|
// this.pdTrigerService.getAllMasterDatas('FREQUENCY').subscribe(
|
||||||
data => {
|
// data => {
|
||||||
this.m_freqOfPurchase = data.records.filter(data => data.isactive == 1);
|
// this.m_freqOfPurchase = data.records.filter(data => data.isactive == 1);
|
||||||
},
|
// },
|
||||||
error => {
|
// error => {
|
||||||
// this.notifier.notify('warning', 'No Category Records Found.!');
|
// this.notifier.notify('warning', 'No Category Records Found.!');
|
||||||
// this.m_assets_type = "No Category Records Found.";
|
// this.m_assets_type = "No Category Records Found.";
|
||||||
}
|
/// }
|
||||||
)
|
// )
|
||||||
}
|
// }
|
||||||
|
|
||||||
getM_PaymentModeType() {
|
getM_PaymentModeType() {
|
||||||
this.pdTrigerService.getAllMasterDatas('PAYMENTMODE').subscribe(
|
this.pdTrigerService.getAllMasterDatas('PAYMENTMODE').subscribe(
|
||||||
@ -183,8 +183,8 @@ apiLoadFinish: boolean = false;
|
|||||||
payment_mode: ['', Validators.compose([Validators.required])],
|
payment_mode: ['', Validators.compose([Validators.required])],
|
||||||
per_of_immediate_advance_payment:[''],
|
per_of_immediate_advance_payment:[''],
|
||||||
credit_period:[''],
|
credit_period:[''],
|
||||||
frequency_of_purchase: ['', Validators.compose([Validators.required])],
|
// frequency_of_purchase: ['', Validators.compose([Validators.required])],
|
||||||
freq_purchase_others_text_value: ['']
|
// freq_purchase_others_text_value: ['']
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,8 +196,8 @@ apiLoadFinish: boolean = false;
|
|||||||
payment_mode: [data.payment_mode, Validators.compose([Validators.required])],
|
payment_mode: [data.payment_mode, Validators.compose([Validators.required])],
|
||||||
per_of_immediate_advance_payment:[data.per_of_immediate_advance_payment || ''],
|
per_of_immediate_advance_payment:[data.per_of_immediate_advance_payment || ''],
|
||||||
credit_period:[data.credit_period || ''],
|
credit_period:[data.credit_period || ''],
|
||||||
frequency_of_purchase: [data.frequency_of_purchase, Validators.compose([Validators.required])],
|
//frequency_of_purchase: [data.frequency_of_purchase, Validators.compose([Validators.required])],
|
||||||
freq_purchase_others_text_value: [data.freq_purchase_others_text_value || '']
|
//freq_purchase_others_text_value: [data.freq_purchase_others_text_value || '']
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -213,9 +213,9 @@ apiLoadFinish: boolean = false;
|
|||||||
mobile_number: val.mobile_number,
|
mobile_number: val.mobile_number,
|
||||||
payment_mode: val.payment_mode,
|
payment_mode: val.payment_mode,
|
||||||
per_of_immediate_advance_payment: val.per_of_immediate_advance_payment,
|
per_of_immediate_advance_payment: val.per_of_immediate_advance_payment,
|
||||||
credit_period: val.credit_period,
|
credit_period: val.credit_period
|
||||||
frequency_of_purchase: val.frequency_of_purchase,
|
// frequency_of_purchase: val.frequency_of_purchase,
|
||||||
freq_purchase_others_text_value: val.freq_purchase_others_text_value
|
// freq_purchase_others_text_value: val.freq_purchase_others_text_value
|
||||||
};
|
};
|
||||||
const control = <FormArray>this._supplierQuesFrom.controls['supplier_details'];
|
const control = <FormArray>this._supplierQuesFrom.controls['supplier_details'];
|
||||||
control.push(this.initDetailsWithdata(vals));
|
control.push(this.initDetailsWithdata(vals));
|
||||||
|
|||||||
@ -1,12 +1,35 @@
|
|||||||
<mat-card style="min-height:540px;">
|
<mat-card>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div style="text-align: right;" class="mb-1">
|
|
||||||
|
<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"
|
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Close" matTooltipPosition="above"
|
||||||
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>
|
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>
|
||||||
</div>
|
</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-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">
|
<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) }} -->
|
<!--{{ (currentPDStatus==pdStatusCheck.INPROGRESS)? 'COMPLETE':(currentPDStatus) }} -->
|
||||||
<div *ngIf="categoryList != ''">
|
<div *ngIf="categoryList != ''">
|
||||||
@ -28,10 +51,14 @@
|
|||||||
</mat-expansion-panel>
|
</mat-expansion-panel>
|
||||||
</div>
|
</div>
|
||||||
<mat-list *ngFor="let formButton of categoryFormButtons">
|
<mat-list *ngFor="let formButton of categoryFormButtons">
|
||||||
<mat-list-item class="custm-list-item" (click)="OnSelectDirectForms(formButton)" style="background-color:#e0e0e0">
|
<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>
|
<span class="mt-0">{{ (formButton.form_name.length>17)? (formButton.form_name | slice:0:17)+'..':(formButton.form_name) }}</span>
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
</mat-list>
|
</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>-->
|
||||||
<!--<mat-list-item (click)="OnSelectDirectForms(rentalDetail)" style="background-color:#e0e0e0">-->
|
<!--<mat-list-item (click)="OnSelectDirectForms(rentalDetail)" style="background-color:#e0e0e0">-->
|
||||||
<!--<span class="mt-0">{{rentalDetail.form_name}}</span>-->
|
<!--<span class="mt-0">{{rentalDetail.form_name}}</span>-->
|
||||||
@ -39,32 +66,17 @@
|
|||||||
<!--</mat-list>-->
|
<!--</mat-list>-->
|
||||||
|
|
||||||
</mat-sidenav>
|
</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>
|
<button (click)="mailnav.toggle()" mat-icon-button>
|
||||||
<mat-icon style="color: white;">short_text</mat-icon>
|
<mat-icon style="color: white;">short_text</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<span class="mr-1 ml-1">Category</span>
|
<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">
|
<div class="main-content" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||||
|
|
||||||
<figure>
|
<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">
|
<div *ngIf="!formsCategoryEnable">
|
||||||
<mat-card-content style="min-height: 500px;" *ngIf="selectedCategory.length==0">
|
<mat-card-content style="min-height: 500px;" *ngIf="selectedCategory.length==0">
|
||||||
<p>No Records Found..</p>
|
<p>No Records Found..</p>
|
||||||
@ -77,6 +89,7 @@
|
|||||||
<ng-container *ngSwitchCase="1">
|
<ng-container *ngSwitchCase="1">
|
||||||
|
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
|
|
||||||
<form [formGroup]="optionsForm" *ngIf="answerList.length>0 ; else noanswers;" style="min-height: 450px;">
|
<form [formGroup]="optionsForm" *ngIf="answerList.length>0 ; else noanswers;" style="min-height: 450px;">
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
|
|
||||||
|
|||||||
@ -1,51 +1,67 @@
|
|||||||
<div style="height: 550px;">
|
<h2 mat-dialog-title>
|
||||||
<div style="text-align: right">
|
<div fxFlex="70">
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="closeAllocationComponent()"><mat-icon>close</mat-icon></button>
|
{{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;">
|
|
||||||
<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()"> -->
|
<!-- <form [formGroup]="_pdAllocationForm" (submit)="onSubmit()"> -->
|
||||||
|
|
||||||
<div *ngIf="pdCentralOfficerList.length > 0" >
|
<mat-list role="list" *ngIf="pdCentralOfficerList.length > 0">
|
||||||
<div fxLayout="row wrap" fxFlex="100%">
|
|
||||||
<div fxLayout="row wrap" fxFlex="22%" *ngFor="let officer of pdCentralOfficerList; ">
|
<mat-list-item role="listitem" *ngFor="let officer of pdCentralOfficerList; let i = index">
|
||||||
<mat-card fxFlex="100%">
|
<div fxFlex="100">
|
||||||
<mat-card-content style="text-align:center">
|
<div fxLayout="row wrap">
|
||||||
<mat-radio-button [value]="officer" (change)="selectPdOfficer(officer)"></mat-radio-button>
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
|
||||||
<img [src]="officer.profile_url ||'https://image.ibb.co/mGjZB9/usernew.png'" alt="No Image" style="border-radius:50%;width:100px;height:100px;"><br>
|
<mat-radio-button color="primary" [value]="officer" (change)="selectedItem = $event.value">
|
||||||
<span>{{officer.first_name}}</span>
|
{{officer.first_name}}
|
||||||
<br>
|
</mat-radio-button>
|
||||||
<span>{{officer.mobile_no}}</span><br>
|
</div>
|
||||||
<span>PD in hand - {{officer.count}}</span>
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
|
||||||
</mat-card-content>
|
<span>{{officer.mobile_no}}</span>
|
||||||
</mat-card>
|
</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>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</mat-list-item>
|
||||||
|
|
||||||
|
</mat-list>
|
||||||
<mat-list *ngIf="pdCentralOfficerList.length == 0">
|
<mat-list *ngIf="pdCentralOfficerList.length == 0">
|
||||||
<mat-list-item>
|
<mat-list-item>
|
||||||
<p>No central pd officer available.</p>
|
<p>No central officer available.</p>
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
</mat-list>
|
</mat-list>
|
||||||
|
|
||||||
|
|
||||||
<!-- </form> -->
|
<!-- </form> -->
|
||||||
</mat-card-content>
|
</mat-dialog-content>
|
||||||
<mat-card-actions>
|
|
||||||
<div style="text-align:right;">
|
<mat-dialog-actions >
|
||||||
<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 fxFlex="50" align="left">
|
||||||
|
<p *ngIf="selectedItem">Central Officer: {{selectedItem.first_name}}</p>
|
||||||
</div>
|
</div>
|
||||||
</mat-card-actions>
|
<div fxFlex="50" align="right">
|
||||||
</mat-card>
|
<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>
|
</div>
|
||||||
|
|
||||||
|
</mat-dialog-actions>
|
||||||
|
|
||||||
|
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,14 @@
|
|||||||
.example-full-width{
|
.example-full-width{
|
||||||
width: 100%;
|
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;
|
||||||
|
}
|
||||||
@ -1,8 +1,9 @@
|
|||||||
import { Component, OnInit, Inject } from '@angular/core';
|
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 { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
|
||||||
import { NotifierService } from 'angular-notifier';
|
import { NotifierService } from 'angular-notifier';
|
||||||
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
||||||
|
import { AllocationViewMoreComponent } from './../allocation-view-more/allocation-view-more.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-tele-pd-allocation',
|
selector: 'app-tele-pd-allocation',
|
||||||
@ -18,7 +19,7 @@ export class TelePdAllocationComponent implements OnInit {
|
|||||||
selectedItem:any;
|
selectedItem:any;
|
||||||
isDisabled: boolean;
|
isDisabled: boolean;
|
||||||
constructor( notifier: NotifierService,
|
constructor( notifier: NotifierService,
|
||||||
private _fb: FormBuilder,
|
private _fb: FormBuilder, private dialog: MatDialog,
|
||||||
private dialogRef: MatDialogRef<TelePdAllocationComponent>,
|
private dialogRef: MatDialogRef<TelePdAllocationComponent>,
|
||||||
private _pd: PdTrigerService,
|
private _pd: PdTrigerService,
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any) {
|
@Inject(MAT_DIALOG_DATA) public data: any) {
|
||||||
@ -42,22 +43,16 @@ export class TelePdAllocationComponent implements OnInit {
|
|||||||
}, error => this.errorMessage = <any> error);
|
}, 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*/
|
/** To update pd officer*/
|
||||||
updatePdOfficer(allocateDate:any) {
|
updatePdOfficer(allocateDetails:any) {
|
||||||
if(this.isDisabled){
|
if(!allocateDetails){
|
||||||
this.notifier.notify('warning', 'Please Choose PD Officer.!');
|
this.notifier.notify('warning', 'Please Choose Central Officer.!');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let updateData = {
|
let updateData = {
|
||||||
"pd_id":this.data.pd_id,
|
"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(
|
this._pd.updatePdOfficer(updateData).subscribe(
|
||||||
result => {
|
result => {
|
||||||
@ -80,5 +75,24 @@ export class TelePdAllocationComponent implements OnInit {
|
|||||||
closeAllocationComponent(): void {
|
closeAllocationComponent(): void {
|
||||||
this.dialogRef.close();
|
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');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,11 +4,11 @@
|
|||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card-content style="background:#e00201;">
|
<mat-card-content style="background:#e00201;">
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
<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>
|
<h4>{{master.lender_full_name}} </h4>
|
||||||
<span *ngIf="master.lender_applicant_id"> {{master.lender_applicant_id}} - </span> {{master.pd_date_of_initiation}}
|
<span *ngIf="master.lender_applicant_id"> {{master.lender_applicant_id}} - </span> {{master.pd_date_of_initiation}}
|
||||||
</div>
|
</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="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.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" 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>
|
||||||
|
|||||||
@ -114,6 +114,8 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
if(pdData.fk_pd_type == 1){
|
if(pdData.fk_pd_type == 1){
|
||||||
const dialogRef = this.dialog.open(PdAllocationComponent, {
|
const dialogRef = this.dialog.open(PdAllocationComponent, {
|
||||||
data: pdData,
|
data: pdData,
|
||||||
|
width: '60%',
|
||||||
|
maxHeight: '60%',
|
||||||
disableClose: true
|
disableClose: true
|
||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
@ -125,6 +127,8 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
else if(pdData.fk_pd_type == 2){
|
else if(pdData.fk_pd_type == 2){
|
||||||
const dialogRef = this.dialog.open(SmartPdAllocationComponent, {
|
const dialogRef = this.dialog.open(SmartPdAllocationComponent, {
|
||||||
data: pdData,
|
data: pdData,
|
||||||
|
width: '60%',
|
||||||
|
maxHeight: '60%',
|
||||||
disableClose: true
|
disableClose: true
|
||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
@ -137,6 +141,8 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
else if(pdData.fk_pd_type == 3){
|
else if(pdData.fk_pd_type == 3){
|
||||||
const dialogRef = this.dialog.open(TelePdAllocationComponent, {
|
const dialogRef = this.dialog.open(TelePdAllocationComponent, {
|
||||||
data: pdData,
|
data: pdData,
|
||||||
|
width: '60%',
|
||||||
|
maxHeight: '60%',
|
||||||
disableClose: true,
|
disableClose: true,
|
||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
|
|||||||
@ -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 { PdReportComponent } from './list-pd/pd-report/pd-report.component';
|
||||||
|
|
||||||
import {RentalInfoComponent} from "./list-pd/start-pd/forms/rental-info/rental-info.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,
|
// AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}), OwlDateTimeModule,
|
||||||
// OwlNativeDateTimeModule,
|
// 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],
|
// exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent],
|
||||||
// providers: [PdTrigerService, GetGeometricLocationService],
|
// providers: [PdTrigerService, GetGeometricLocationService],
|
||||||
@ -172,9 +173,9 @@ const pdCustomNotifierOptions: NotifierOptions = {
|
|||||||
OwlNativeDateTimeModule,
|
OwlNativeDateTimeModule,
|
||||||
],
|
],
|
||||||
// declarations: [ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, AssetsInfoComponent],
|
// 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],
|
providers: [PdTrigerService, GetGeometricLocationService],
|
||||||
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent]
|
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, AllocationViewMoreComponent]
|
||||||
})
|
})
|
||||||
export class ManagePdModule {
|
export class ManagePdModule {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,11 +4,11 @@
|
|||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card-content style="background:#e00201;">
|
<mat-card-content style="background:#e00201;">
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" class="filter-header">
|
<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>
|
<h4>{{master.lender_full_name}} </h4>
|
||||||
<span *ngIf="master.lender_applicant_id"> {{master.lender_applicant_id}} - </span> {{master.pd_date_of_initiation}}
|
<span *ngIf="master.lender_applicant_id"> {{master.lender_applicant_id}} - </span> {{master.pd_date_of_initiation}}
|
||||||
</div>
|
</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="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.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" 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>
|
||||||
|
|||||||
@ -112,6 +112,8 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
|||||||
if(pdData.fk_pd_type == 1){
|
if(pdData.fk_pd_type == 1){
|
||||||
const dialogRef = this.dialog.open(PdAllocationComponent, {
|
const dialogRef = this.dialog.open(PdAllocationComponent, {
|
||||||
data: pdData,
|
data: pdData,
|
||||||
|
width: '60%',
|
||||||
|
maxHeight: '60%',
|
||||||
disableClose: true
|
disableClose: true
|
||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
@ -123,6 +125,8 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
|||||||
else if(pdData.fk_pd_type == 2){
|
else if(pdData.fk_pd_type == 2){
|
||||||
const dialogRef = this.dialog.open(SmartPdAllocationComponent, {
|
const dialogRef = this.dialog.open(SmartPdAllocationComponent, {
|
||||||
data: pdData,
|
data: pdData,
|
||||||
|
width: '60%',
|
||||||
|
maxHeight: '60%',
|
||||||
disableClose: true
|
disableClose: true
|
||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
@ -135,6 +139,8 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
|||||||
else if(pdData.fk_pd_type == 3){
|
else if(pdData.fk_pd_type == 3){
|
||||||
const dialogRef = this.dialog.open(TelePdAllocationComponent, {
|
const dialogRef = this.dialog.open(TelePdAllocationComponent, {
|
||||||
data: pdData,
|
data: pdData,
|
||||||
|
width: '60%',
|
||||||
|
maxHeight: '60%',
|
||||||
disableClose: true,
|
disableClose: true,
|
||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user