This commit is contained in:
dineshkumarkannan 2018-12-13 09:53:03 +05:30
commit 942de57799
85 changed files with 765 additions and 205 deletions

View File

@ -1,6 +1,6 @@
<div class="pad-wrap">
<div fxFlex.gt-sm="100" fxFlex.gt-xs="100" fxFlex="100">
<mat-card style="min-height: 110%;">
<mat-card style="min-height: 90%;">
<mat-card-title>
<div fxFlex.gt-sm="25" fxFlex="100">
{{dashboardTitle}}
@ -45,7 +45,7 @@
<!-- <pre> Full - {{doughnutChartDataForFullPD}} Smart -{{doughnutChartDataForSmartPD}} TELE -{{doughnutChartDataForTelePD}} </pre> -->
<mat-card-content>
<div fxLayout="row" style="min-height:280px;">
<div *ngIf="total1 != 0" fxFlex.gt-sm="30" fxFlex="100" >
<div *ngIf="total1 != 0" fxFlex.gt-sm="30" fxFlex="100" style="text-align:-webkit-center;">
<canvas baseChart class="chart" id="FullCanvas" name="FullCanvas"
height="280px" width="280px"
[data]="doughnutChartDataForFullPD"
@ -57,7 +57,7 @@
<div *ngIf="total1 != 0" class="donut-inner"><span>Full - {{total1}}</span></div>
</div>
<div *ngIf="total2 != 0" fxFlexOffset.gt-sm="5" fxFlex.gt-sm="30" fxFlex="100">
<div *ngIf="total2 != 0" fxFlexOffset.gt-sm="5" fxFlex.gt-sm="30" fxFlex="100" style="text-align:-webkit-center;">
<canvas baseChart class="chart" id="SmartCanvas" name="SmartCanvas"
height="280px" width="280px"
[data]="doughnutChartDataForSmartPD"
@ -68,7 +68,7 @@
[chartType]="doughnutChartType"></canvas>
<div *ngIf="total2 != 0" class="donut-inner"><span>Smart - {{total2}}</span></div>
</div>
<div *ngIf="total3 != 0" fxFlexOffset.gt-sm="5" fxFlex.gt-sm="30" fxFlex="100">
<div *ngIf="total3 != 0" fxFlexOffset.gt-sm="5" fxFlex.gt-sm="30" fxFlex="100" style="text-align:-webkit-center;">
<canvas baseChart class="chart" id="TeleCanvas" name="TeleCanvas"
height="280px" width="280px"
[data]="doughnutChartDataForTelePD"

View File

@ -48,8 +48,8 @@ li
}
.donut-inner{
margin-top: -171px;
margin-left: 120px;
margin-top: -165px;
// margin-left: 120px;
}
@ -68,3 +68,6 @@ min-height: 400px;
.chart{
padding: 0.8rem;
}
::ng-deep .body-container{
padding: 0rem !important;
}

View File

@ -67,6 +67,7 @@ export class DashboardComponent {
}
};
/** Declaration Part Of Title Section */

View File

@ -108,12 +108,12 @@
</div>
</div>
<div fxFlex.sm="100" fxFlex.xs="100" fxFlex.md="33.33" fxFlex.lg="33.33" fxFlex.xl="33.33" fxFlex="100">
<div class="search-bar" fxFlex>
<!--<div class="search-bar" fxFlex>
<form class="search-form">
<mat-icon>search</mat-icon>
<input type="text" placeholder="Search" autofocus="true" />
</form>
</div>
</div>-->
</div>
<div fxFlex.sm="100" fxFlex.xs="100" fxFlex.md="33.33" fxFlex.lg="33.33" fxFlex.xl="33.33" fxFlex="100">
@ -124,7 +124,7 @@
<!--<span>{{ menuitem.name | translate }}</span>-->
</button>
</span>
<button [mat-menu-trigger-for]="multi" matTooltip="settings" matTooltipPosition="below" mat-icon-button class="ml-xs">
<button [mat-menu-trigger-for]="multi" matTooltip="Settings" matTooltipPosition="below" mat-icon-button class="ml-xs">
<mat-icon>settings</mat-icon>
</button>
<mat-menu #multi="matMenu" class="opt-menu" x-position="before">
@ -145,7 +145,7 @@
</div>
</div>
</mat-menu>
<button appToggleFullscreen mat-icon-button>
<button appToggleFullscreen matTooltip="Fullscreen" matTooltipPosition="below" mat-icon-button>
<mat-icon>fullscreen</mat-icon>
</button>
<!--<button [mat-menu-trigger-for]="user2" mat-icon-button class="ml-xs overflow-visible">
@ -193,7 +193,7 @@
Calendar Settings
</button>
</mat-menu> -->
<button (click)="end.toggle()" mat-icon-button class="ml-xs overflow-visible">
<button (click)="end.toggle()" matTooltip="Notifications" matTooltipPosition="below" mat-icon-button class="ml-xs overflow-visible">
<mat-icon>notifications</mat-icon>
<!-- <span class="notification-label">2</span> -->
<span *ngIf="alertCount != 0" style = "width:23px" class="notification-label" >{{alertCount}}</span>
@ -288,7 +288,7 @@
<mat-icon>notifications</mat-icon>
<span *ngIf="alertCount != 0" style = "width:23px" class="notification-label" >{{alertCount}}</span>
</button>
<button [mat-menu-trigger-for]="user" mat-icon-button class="ml-xs">
<button [mat-menu-trigger-for]="user" matTooltip="Person" matTooltipPosition="below" mat-icon-button class="ml-xs">
<mat-icon>person</mat-icon>
</button>
<mat-menu #user="matMenu" class="opt-menu" x-position="before">

View File

@ -176,12 +176,12 @@
</mat-form-field>
<mat-form-field style="width: 10%">
<input matInput placeholder="Code" formControlName="statecode" type="text" (keypress)="keyPress($event)">
<mat-error *ngIf="pdMain.statecode.hasError('maxlength') || pdMain.statecode.hasError('minlength')">Enter Valid LandLine Number. </mat-error>
<input matInput placeholder="STD Code" formControlName="stdcode" type="text" (keypress)="keyPress($event)">
<mat-error *ngIf="pdMain.stdcode.hasError('maxlength') || pdMain.stdcode.hasError('minlength')">Enter Valid STD Code Number. </mat-error>
</mat-form-field> &nbsp; - &nbsp;
<mat-form-field style="width: 20%">
<input matInput placeholder="Number" formControlName="landline" type="text" (keypress)="keyPress($event)">
<mat-error *ngIf="pdMain.landline.hasError('maxlength') || pdMain.landline.hasError('minlength')">Enter Valid statuscode Number. </mat-error>
<input matInput placeholder="Landline Number" formControlName="landline" type="text" (keypress)="keyPress($event)">
<mat-error *ngIf="pdMain.landline.hasError('maxlength') || pdMain.landline.hasError('minlength')">Enter Valid LandLine Number. </mat-error>
</mat-form-field>
<!-- Phone field to be split into 2 parts. Mobile Number mandatory and optional land line number with std code. -->

View File

@ -75,8 +75,8 @@ export class AddPdComponent implements OnInit, OnDestroy {
mobile_no: [null,Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
// landline : [null,Validators.compose([Validators.minLength(12),Validators.maxLength(13)])],
// email: [null],
statecode:[null, Validators.compose([Validators.required,Validators.minLength(2),Validators.maxLength(4),Validators.required,Validators.pattern('^[0-9]*$')])],
landline : [null, Validators.compose([Validators.required,Validators.minLength(6),Validators.maxLength(8),Validators.required,Validators.pattern('^[0-9]*$')])],
stdcode:[null, Validators.compose([Validators.minLength(2),Validators.maxLength(4),Validators.pattern('^[0-9]*$')])],
landline : [null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
company_name: [null],
  addressline1: [null],
@ -218,7 +218,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
createRequiremnt(): FormGroup {
return this._fb.group({
add_req_id:[null],
add_requirement: [null, Validators.compose([Validators.required])],
add_requirement: [null],
isactive: [1],
});
};
@ -379,7 +379,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
"applicant_name":formValue.applicant_name,
"company_name":formValue.company_name,
"mobile_no":formValue.mobile_no,
"landline":formValue.statecode +'-'+formValue.landline,
"landline":formValue.stdcode +'-'+formValue.landline,
"applicant_type":1,
"relation":"",
});

View File

@ -1,5 +1,5 @@
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left">
<div fxFlex="70" align="left" style="padding: 10px !important;">
{{data.first_name}}
</div>
<div fxFlex="30" align="end">

View File

@ -1,5 +1,6 @@
.paragraph_change {
color: #e00201 !important;
color: #fff !important;
background-color: #e00201 !important;
}
ol {
list-style-type: none;

View File

@ -1,7 +1,7 @@
<form [formGroup]="_EditApplicantForm">
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left">
<div fxFlex="70" align="left" style="padding: 10px !important;">
{{pageTitle}}
</div>
@ -32,12 +32,12 @@
<mat-error *ngIf="pdMainApplicant.mobile_no.hasError('maxlength') || pdMainApplicant.mobile_no.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
</mat-form-field>
<mat-form-field style="width: 10%">
<input matInput placeholder="LandLine Code" formControlName="statecode" type="text" (keypress)="keyPress($event)">
<mat-error *ngIf="pdMainApplicant.statecode.hasError('maxlength') || pdMainApplicant.statecode.hasError('minlength')">Enter Valid Phone Number. </mat-error>
<input matInput placeholder="STD Code" formControlName="stdcode" type="text" (keypress)="keyPress($event)">
<mat-error *ngIf="pdMainApplicant.stdcode.hasError('maxlength') || pdMainApplicant.stdcode.hasError('minlength')">Enter Valid STD Code. </mat-error>
</mat-form-field> &nbsp;-&nbsp;
<mat-form-field style="width: 25%">
<input matInput placeholder="LandLine Number" formControlName="landline" type="text" (keypress)="keyPress($event)">
<mat-error *ngIf="pdMainApplicant.landline.hasError('maxlength') || pdMainApplicant.landline.hasError('minlength')">Enter Valid Phone Number. </mat-error>
<mat-error *ngIf="pdMainApplicant.landline.hasError('maxlength') || pdMainApplicant.landline.hasError('minlength')">Enter Valid Landline Number. </mat-error>
</mat-form-field>
</mat-card-content>
@ -60,10 +60,18 @@
<mat-error *ngIf="coDetails['controls'].coapplicant_mobile_no.hasError('pattern') || coDetails['controls'].coapplicant_mobile_no.hasError('maxlength') || coDetails['controls'].coapplicant_mobile_no.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
</mat-form-field>
<mat-form-field style="width: 40%" >
<!-- <mat-form-field style="width: 40%" >
<input matInput placeholder="LandLine Number" formControlName="coapplicant_landline" type="text" (keypress)="keyPress($event)">
<mat-error *ngIf=" coDetails['controls'].coapplicant_landline.hasError('maxlength') || coDetails['controls'].coapplicant_landline.hasError('minlength')">Enter Valid Phone Number. </mat-error>
</mat-form-field>
</mat-form-field> -->
<mat-form-field style="width: 10%">
<input matInput placeholder="STD Code" formControlName="coapplicant_stdcode" type="text" (keypress)="keyPress($event)">
<mat-error *ngIf="coDetails['controls'].coapplicant_stdcode.hasError('maxlength') || coDetails['controls'].coapplicant_stdcode.hasError('minlength')">Enter Valid STD Number. </mat-error>
</mat-form-field> &nbsp;-&nbsp;
<mat-form-field style="width: 25%">
<input matInput placeholder="LandLine Number" formControlName="coapplicant_landline" type="text" (keypress)="keyPress($event)">
<mat-error *ngIf="coDetails['controls'].coapplicant_landline.hasError('maxlength') || coDetails['controls'].coapplicant_landline.hasError('minlength')">Enter Valid Landline Number. </mat-error>
</mat-form-field>
<mat-form-field style="width: 82%">
<mat-select placeholder="Relationship With Main Applicant" formControlName="relationship">

View File

@ -2,5 +2,7 @@ mat-form-field {
margin: 0 2%;
}
.paragraph_change {
color: #e00201 !important;
color: #fff !important;
background-color: #e00201 !important;
// padding: 10px !important;
}

View File

@ -52,15 +52,15 @@ export class EditPdApplicantComponent implements OnInit {
}
loadApplicantFormData() {
let statecodesearch = this.mainApplicantData[0].landline.search("-");
let statecode = this.mainApplicantData[0].landline.substr(0,statecodesearch);
console.log(statecode);
let landline = this.mainApplicantData[0].landline.substr(+statecodesearch + 1,8);
let stdcodesearch = this.mainApplicantData[0].landline.search("-");
let stdcode = this.mainApplicantData[0].landline.substr(0,stdcodesearch);
console.log(stdcode);
let landline = this.mainApplicantData[0].landline.substr(+stdcodesearch + 1,8);
this._EditApplicantForm = this._fb.group({
fk_applicant_primary_id: [this.mainApplicantData[0].pd_co_applicant_id],
applicant_name: [this.mainApplicantData[0].applicant_name, Validators.compose([Validators.required])],
mobile_no: [this.mainApplicantData[0].mobile_no, Validators.compose([Validators.required,Validators.required,Validators.minLength(10),Validators.maxLength(12)])],
statecode: [statecode, Validators.compose([Validators.minLength(2),Validators.maxLength(4)])],
stdcode: [stdcode, Validators.compose([Validators.minLength(2),Validators.maxLength(4)])],
landline: [landline, Validators.compose([Validators.minLength(6),Validators.maxLength(8)])],
company_name: [this.mainApplicantData[0].company_name],
applicant_type: [this.mainApplicantData[0].applicant_type, Validators.compose([Validators.required])],
@ -76,12 +76,17 @@ export class EditPdApplicantComponent implements OnInit {
}
createItem(listData): FormGroup {
if(listData){
let stdcodesearch = listData.landline.search("-");
let stdcode = listData.landline.substr(0,stdcodesearch);
let landline = listData.landline.substr(+stdcodesearch + 1,8);
return this._fb.group({
label: ['Co Applicant'],
fk_applicant_primary_id: [listData.pd_co_applicant_id],
coapplicantName: [listData.applicant_name, Validators.compose([Validators.required])],
coapplicant_mobile_no: [listData.mobile_no,Validators.compose([Validators.minLength(10),Validators.maxLength(12),Validators.pattern('^[0-9]*$')])],
coapplicant_landline: [listData.landline,Validators.compose([Validators.minLength(8),Validators.maxLength(12)])],
coapplicant_stdcode: [stdcode, Validators.compose([Validators.minLength(2),Validators.maxLength(4)])],
// landline: [landline, Validators.compose([Validators.minLength(6),Validators.maxLength(8)])],
coapplicant_landline: [landline,Validators.compose([Validators.minLength(6),Validators.maxLength(8)])],
relationship: [listData.relation],
applicant_type: [listData.applicant_type, Validators.compose([Validators.required])],
company_name: [listData.company_name],
@ -93,7 +98,9 @@ export class EditPdApplicantComponent implements OnInit {
fk_applicant_primary_id: [null],
coapplicantName: [null, Validators.compose([Validators.required])],
coapplicant_mobile_no: [null, Validators.compose([Validators.minLength(10),Validators.maxLength(12),Validators.pattern('^[0-9]*$')])],
coapplicant_landline: [null, Validators.compose([Validators.minLength(8),Validators.maxLength(12)])],
coapplicant_stdcode: [null, Validators.compose([Validators.minLength(2),Validators.maxLength(4)])],
coapplicant_landline: [null,Validators.compose([Validators.minLength(6),Validators.maxLength(8)])],
//coapplicant_landline: [null, Validators.compose([Validators.minLength(8),Validators.maxLength(12)])],
relationship: [null],
applicant_type: [0],
company_name: [null],
@ -123,7 +130,7 @@ export class EditPdApplicantComponent implements OnInit {
"applicant_name":formValue.applicant_name,
"company_name":formValue.company_name,
"mobile_no":formValue.mobile_no,
"landline":formValue.statecode+'-'+formValue.landline,
"landline":formValue.stdcode+'-'+formValue.landline,
"applicant_type":formValue.applicant_type,
"relation":formValue.relationship,
"isactive":1
@ -135,7 +142,7 @@ export class EditPdApplicantComponent implements OnInit {
"applicant_name":itemElement.coapplicantName,
"relation":itemElement.relationship,
"mobile_no":itemElement.coapplicant_mobile_no,
"landline":itemElement.coapplicant_landline,
"landline":itemElement.coapplicant_stdcode+'-'+itemElement.coapplicant_landline,
"applicant_type":itemElement.applicant_type,
"company_name":itemElement.company_name,
"isactive":1

View File

@ -1,7 +1,7 @@
<form [formGroup]="_EditPDtriggerForm" novalidate>
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left">
<div fxFlex="70" align="left" style="padding: 10px !important;">
{{pageTitle}}
</div>
<div fxFlex="30" align="end">

View File

@ -2,5 +2,13 @@ mat-form-field {
margin: 0 2%;
}
.paragraph_change {
color: #e00201 !important;
color: #fff !important;
background-color: #e00201 !important;
// padding: 10px !important;
}
.cdk-global-overlay-wrapper{
justify-content: center !important;
}
mat-dialog-actions{
border-top: 2px solid #e00201;
}

View File

@ -81,7 +81,7 @@
</mat-card>
</div>
</div><!--End Row-->
<div style="text-align:right;position:absolute;z-index:2;bottom: 0;right: 0;">
<div style="text-align:right;position:absolute;z-index:2;bottom: 0;right: 0;margin-right: 70px;margin-bottom: 65px;">
<span style="width: 30px; height: 10px; background:#009688;color:#009688">II</span> Full &nbsp; <span style="width: 30px; height: 10px; background:#673ab7;color:#673ab7">II</span> Smart
</div>
</div>

View File

@ -40,3 +40,6 @@ $mat-toolbar-height-mobile-landscape: 48px !default;
::-webkit-scrollbar-thumb {
background: #FF0000;
}
::ng-deep .body-container{
padding:0px !important;
}

View File

@ -1,5 +1,5 @@
<h2 mat-dialog-title>
<div fxFlex="70">
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" style="padding: 10px !important;">
{{pageTitle}}
</div>
<div fxFlex="30" align="end">

View File

@ -12,3 +12,12 @@
.text_change {
color: #e00201 !important;
}
.cdk-global-overlay-wrapper{
justify-content: center !important;
}
.paragraph_change {
color: #fff !important;
background-color: #e00201 !important;
// padding: 10px !important;
}

View File

@ -1,4 +1,4 @@
import { Component, OnInit, Inject } from '@angular/core';
import { Component, OnInit, Inject, ViewEncapsulation } from '@angular/core';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA , DialogPosition} from '@angular/material';
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
import { NotifierService } from 'angular-notifier';
@ -8,7 +8,9 @@ import { AllocationViewMoreComponent } from './../allocation-view-more/allocatio
@Component({
selector: 'app-pd-allocation',
templateUrl: './pd-allocation.component.html',
styleUrls: ['./pd-allocation.component.scss']
styleUrls: ['./pd-allocation.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class PdAllocationComponent implements OnInit {
public pageTitle: string = "Allocation To PD Officer";
@ -89,7 +91,7 @@ export class PdAllocationComponent implements OnInit {
data: details,
disableClose: true,
position: { right: '0'},
width:'80%',
width:'100%',
// hasBackdrop:false
});
// dialogSchedule.afterClosed()

View File

@ -1,7 +1,7 @@
<form [formGroup]="_EditPDRequirementForm" novalidate>
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left">
<div fxFlex="70" align="left" style="padding: 10px !important;">
{{pageTitle}}
</div>
<div fxFlex="30" align="end">

View File

@ -2,5 +2,6 @@ mat-form-field {
margin: 0 2%;
}
.paragraph_change {
color: #e00201 !important;
color: #fff !important;
background-color: #e00201 !important;
}

View File

@ -2,7 +2,7 @@
<form class="address" [formGroup]="addressForm">
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left">
<div fxFlex="70" align="left" style="padding: 10px !important;">
{{pageTitle}}
</div>
<div fxFlex="30" align="end">
@ -51,7 +51,7 @@
formControlName="locality_others">
</mat-form-field>
<mat-form-field>
<mat-form-field style="width: 30%">
<mat-select placeholder="Approach to PD Location" formControlName="pd_location" required>
<mat-option value="{{data.pd_location_approach_id}}"
*ngFor="let data of locationdata">{{data.description}}
@ -59,7 +59,7 @@
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-form-field style="width: 30%">
<mat-select placeholder="Comment on Locality" formControlName="comment_locality" required>
<mat-option value="{{data.comments_on_locality_id}}"
*ngFor="let data of commentData">{{data.rating}}
@ -86,11 +86,15 @@
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="addressForm.controls['address_ownership'].value == 4 ">
<mat-form-field *ngIf="addressForm.controls['address_ownership'].value == 4 " style="width: 38%">
<input matInput placeholder="Specify Other Ownership" formControlName="other_ownership">
</mat-form-field>
<mat-form-field>
<mat-form-field *ngIf="addressForm.controls['address_ownership'].value == 3 " style="width: 38%">
<input matInput placeholder="What is the monthly rent paid?" formControlName="rent_amt">
</mat-form-field>
<mat-form-field style="width: 42%">
<mat-select placeholder="Is there any business activity is being run?"
formControlName="bussiness_activity" required>
<mat-option value="yes">Yes</mat-option>
@ -98,18 +102,64 @@
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="addressForm.controls['bussiness_activity'].value == 'yes'">
<mat-select placeholder="Bussiness Type" formControlName="bussiness_address_type">
<mat-form-field *ngIf="addressForm.controls['bussiness_activity'].value == 'yes'" style="width: 100%">
<!-- <mat-select placeholder="Bussiness Type" formControlName="bussiness_address_type">
<mat-option value="{{m_addressType.address_type_id}}"
*ngFor="let m_addressType of addressData">{{m_addressType.address_type}}
</mat-option>
</mat-select> -->
<mat-select placeholder="Type of Premises" formControlName="bussiness_address_type" multiple>
<mat-option *ngFor="let m_addressType of addressData" [value]="m_addressType.address_type_id" (onSelectionChange)="SelectedPremises($event)" > {{m_addressType.address_type}} </mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="addressForm.controls['bussiness_address_type'].value == 12">
<input matInput placeholder="Bussiness Address Type Others" formControlName="bussiness_address_type_others">
<mat-form-field *ngIf="PremisesOtherFlag == true" style="width: 40%">
<input matInput placeholder="Specify Other Premises Type" formControlName="bussiness_address_type_others">
</mat-form-field>
<mat-card formArrayName="premises">
<div
*ngFor="let item of addressForm.controls.premises['controls']; let i = index;" [formGroupName]="i">
<mat-card-header>
<mat-card-title>{{i+1}} . {{PremisesLabel[i]}}</mat-card-title>
</mat-card-header>
<mat-card-content>
<mat-form-field style="width: 40%;">
<input matInput placeholder="Number Of Additional Units"
formControlName="no_of_additional_units">
</mat-form-field>
<mat-form-field *ngIf="item.get('no_of_additional_units').value > 2" style="width: 40%;">
<mat-select placeholder="City" formControlName="premises_city"> <!--multiple (selectionChange)="relationChanged($event)"> -->
<mat-option *ngFor="let CL of cityData" [value]="CL.city_id">
{{CL.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="item.get('no_of_additional_units').value <= 2 && item.get('no_of_additional_units').value != '' " style="width: 40%;">
<mat-select placeholder="Ownership" formControlName="premises_ownership">
<mat-option value="{{ownerShip.id}}" *ngFor="let ownerShip of ownerShipData">
{{ownerShip.name}}
</mat-option>
</mat-select>
</mat-form-field>
<!-- <mat-form-field *ngIf="addressForm.controls['premises_ownership'].value == 4 "> -->
<mat-form-field *ngIf="item.get('premises_ownership').value == 4" style="width: 40%;">
<input matInput placeholder="Specify Other Ownership" formControlName="premises_ownership_others">
</mat-form-field>
<mat-form-field *ngIf="item.get('premises_ownership').value == 3" style="width: 40%;">
<input matInput placeholder="What is the monthly rent paid?" formControlName="premises_rent_amt">
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Remarks"
formControlName="premises_remarks" style="width: 65%;">
</mat-form-field>
</mat-card-content>
</div>
</mat-card>
<!--- Don't Remove To replace atlast of the PD Completion and creating new form (Neighbourhood check) --
<mat-card>
<mat-card-header>

View File

@ -1,5 +1,6 @@
.paragraph_change {
color: #e00201 !important;
color: #fff !important;
background-color: #e00201 !important;
}
.mat-card-content {
background-color: white;

View File

@ -37,13 +37,23 @@ export class AddressComponent implements OnInit {
loadDataStatus: boolean=true;
PremisesOtherFlag:boolean;
PremisesLabel : any = [];
locationdata: any = [];
commentData: any = [];
//customerData: any = []; 221118 review doc s.no 3.e
addressData:any = [];
localityData:any = [];
ownerShipData:any = [];
cityData:any = [];
z = 0;
formPremisesArray: any = [];
relativeNames2: any = [];
//neighbourStatusData:any=["Yes","No"];
//applicantOwnerData:any=["Yes","No","Dont Know"];
@ -58,6 +68,7 @@ export class AddressComponent implements OnInit {
public customerBehaviour: AbstractControl;
public ownership: AbstractControl;
public other_ownership: AbstractControl;
public rent_amt : AbstractControl;
public bussinessActivity: AbstractControl;
//constructor(notifier: NotifierService,private _fb: FormBuilder,private _pd: PdTrigerService , ) {
constructor(private el: ElementRef, notifier: NotifierService,
@ -81,6 +92,7 @@ export class AddressComponent implements OnInit {
this.getMasterDetails('LOCALITY',4);
this.getMasterDetails('ADDRESSTYPE',5);
this.getMasterDetails('RESIDENCEOWNERSHIP',6);
this.getMasterDetails('CITY',7);
this.initAddressForm();
let params: any = {};
params.pd_id = this.pdid;
@ -88,10 +100,12 @@ export class AddressComponent implements OnInit {
this._pd.retriveForm(params).subscribe(data => {
console.log('data', data);
//const control = <FormArray>this.addressForm.controls['neighbourhood'];
const control = <FormArray>this.addressForm.controls['premises'];
if(data.status == 200) {
// var result = Object.keys(data.records.neighbourhood).map(function (key) {
// return data.records.neighbourhood[key];
// });
this.addressForm.controls.address.setValue(data.records.address);
this.addressForm.controls.pd_location.setValue(data.records.pd_location);
this.addressForm.controls.address_type.setValue(data.records.address_type);
@ -104,9 +118,39 @@ export class AddressComponent implements OnInit {
this.addressForm.controls.address_form_remark.setValue(data.records.address_form_remark);
this.addressForm.controls.address_ownership.setValue(data.records.address_ownership);
this.addressForm.controls.other_ownership.setValue(data.records.other_ownership);
this.addressForm.controls.rent_amt.setValue(data.records.rent_amt);
this.addressForm.controls.bussiness_activity.setValue(data.records.bussiness_activity);
if(data.records.bussiness_activity == 'yes') {
this.addressForm.controls.bussiness_address_type.setValue(data.records.bussiness_address_type);
let selectedMembers = Object.keys(data.records.bussiness_address_type).map(function (key) {
return data.records.bussiness_address_type[key];
});
let enduse: any = [];
let existPremises: any =[];
selectedMembers.forEach(val => {
enduse.push(val.premises);
existPremises.push(val);
});
this.formPremisesArray = existPremises;
this.addressForm.controls.bussiness_address_type.setValue(enduse);
var result = Object.keys(data.records.premises).map(function (key) {
return data.records.premises[key];
});
if (result.length == 0) {
control.push(this.createPremises());
} else {
result.forEach(datas => {
control.push(this.createPremises());
});
}
this.addressForm.controls['premises'].setValue(result);
if(data.records.bussiness_address_type == 12) {
this.addressForm.controls.bussiness_address_type_others.setValue(data.records.bussiness_address_type_others);
}
@ -141,9 +185,11 @@ export class AddressComponent implements OnInit {
address_form_remark:[''],
address_ownership:[''],
other_ownership:[''],
rent_amt:[''],
bussiness_activity:[''],
bussiness_address_type:[''],
bussiness_address_type_others: ['']
bussiness_address_type_others: [''],
premises: this.fb.array([])
});
this.address = this.addressForm.controls['address'];
this.addressType = this.addressForm.controls['address_type'];
@ -153,6 +199,7 @@ export class AddressComponent implements OnInit {
//this.customerBehaviour = this.addressForm.controls['customer_behaviour'];
this.ownership = this.addressForm.controls['address_ownership'];
this.other_ownership = this.addressForm.controls['other_ownership'];
this.rent_amt = this.addressForm.controls['rent_amt'];
this.bussinessActivity = this.addressForm.controls['bussiness_activity'];
// this.bussiessAddressType = this.addressForm.controls['bussiness_address_type'];
}
@ -165,6 +212,16 @@ export class AddressComponent implements OnInit {
// is_owner: ['', Validators.compose([Validators.required])],
// });
// }
createPremises(): FormGroup {
return this.fb.group({
no_of_additional_units: [''],
premises_city: [''],
premises_remarks: [''],
premises_ownership: [''],
premises_ownership_others: [''],
premises_rent_amt:[''],
});
}
getMasterDetails(table:string,type:number){
this._pd.getAllMasterDatas(table).subscribe(data => {
data.records.forEach(val => {
@ -186,6 +243,9 @@ export class AddressComponent implements OnInit {
else if(type==6 && val.isactive == 1){
this.ownerShipData.push(val);
}
else if(type==7 && val.isactive == 1){
this.cityData.push(val);
}
})
});
}
@ -223,13 +283,23 @@ export class AddressComponent implements OnInit {
records.address_form_remark = this.addressForm.controls.address_form_remark.value;
records.address_ownership = this.ownership.value;
records.other_ownership = this.other_ownership.value;
records.rent_amt = this.rent_amt.value;
records.bussiness_activity = this.bussinessActivity.value;
if (this.bussinessActivity.value == 'yes') {
records.bussiness_address_type = this.addressForm.controls.bussiness_address_type.value;
// records.bussiness_address_type = this.addressForm.controls.bussiness_address_type.value;
records.bussiness_address_type = this.formPremisesArray;
if (records.bussiness_address_type == 12) {
records.bussiness_address_type_others = this.addressForm.controls.bussiness_address_type_others.value;
}
}
records.premises = this.addressForm.controls.premises.value;
console.log(this.addressForm.controls.premises.value);
records.pdid = this.pdid;
records.formid = '5';
// records.fk_createdby = '250';
@ -242,6 +312,67 @@ export class AddressComponent implements OnInit {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
});
}
relationChanged(event) {
this.relativeNames2 = [];
event.value.forEach(option => {
this.relativeNames2.push({city: option});
});
}
SelectedPremises($event){
let premisesData = $event.source.value;
if($event.source._selected === true ){
//this.formPremisesArray.push({member: $event.source.value});
//this.selectedSegmentDatas.push(CustomerSegmentName.name);
//console.log('true',premisesData);
//console.log(this.formPremisesArray);
this.formPremisesArray.push({premises: $event.source.value});
//console.log(this.formPremisesArray);
let array = this.addressData.filter(data => data.address_type_id == premisesData);
if(premisesData == 12){
this.PremisesOtherFlag = true;
this.PremisesLabel[this.z] = this.addressForm.get('bussiness_address_type_others').value;
}
else{
this.PremisesLabel[this.z] = array[0].address_type;
}
this.z++;
const control = <FormArray>this.addressForm.controls['premises'];
control.push(this.createPremises());
}
else if($event.source._selected === false ){
console.log('false',premisesData);
if(premisesData == 12){
this.PremisesOtherFlag = false;
}
const control = <FormArray>this.addressForm.controls['neighbourhood'];
control.removeAt(this.z);
this.z--;
//let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName.name);
//this.selectedSegmentDatas.splice(index,1);
}
}
validateAllFormFields(formGroup: FormGroup) {
Object.keys(formGroup.controls).forEach(field => {
const control = formGroup.get(field);

View File

@ -1,7 +1,7 @@
<form [formGroup]="_assessedIncomeFormFrom">
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left">
<div fxFlex="70" align="left" style="padding: 10px !important;">
{{pageTitle}}
</div>
<div fxFlex="30" align="end">

View File

@ -35,7 +35,8 @@ tr.mat-footer-row {
.paragraph_change {
color: #e00201 !important;
color: #fff !important;
background-color: #e00201 !important;
}
.mat-card-content {
background-color: white;

View File

@ -1,7 +1,7 @@
<form *ngIf="apiLoadFinish && loadDetails" [formGroup]="_assetsQuesFrom" (submit)="onSubmit()" novalidate>
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left">
<div fxFlex="70" align="left" style="padding: 10px !important;">
{{pageTitle}}
</div>
<div fxFlex="30" align="end">
@ -294,7 +294,7 @@
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Asset Details" matTooltipPosition="above"
class="mr-1 mb-1 hover-icon" (click)="addSupplierDetails($event); false"><mat-icon>add</mat-icon></button>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" (click)="onReset(); false"><mat-icon>settings_backup_restore</mat-icon></button>
</div>
@ -428,6 +428,7 @@
</mat-form-field>
</div>
<div fxFlex="40" align="end">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" (click)="onReset(); false"><mat-icon>settings_backup_restore</mat-icon></button>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
</div>
</mat-dialog-actions>

View File

@ -1,5 +1,6 @@
.paragraph_change {
color: #e00201 !important;
color: #fff !important;
background-color: #e00201 !important;
}
.mat-card-content {
background-color: white;

View File

@ -69,7 +69,7 @@
<!--=======-->
<form [formGroup]="bankingForm" class="bankForm">
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left">{{pageTitle}}</div>
<div fxFlex="70" align="left" style="padding: 10px !important;">{{pageTitle}}</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>

View File

@ -11,7 +11,8 @@
.paragraph_change {
color: #e00201 !important;
color: #fff !important;
background-color: #e00201 !important;
}
.mat-card-content {
background-color: white;

View File

@ -1,7 +1,7 @@
<form [formGroup]="businessForm" class="address">
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left">{{pageTitle}}</div>
<div fxFlex="70" align="left" style="padding: 10px !important;">{{pageTitle}}</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>

View File

@ -33,7 +33,8 @@
.paragraph_change {
color: #e00201 !important;
color: #fff !important;
background-color: #e00201 !important;
}
.mat-card-content {
background-color: white;

View File

@ -1,7 +1,7 @@
<form *ngIf="apiLoadFinish" [formGroup]="_clientQuesFrom" (submit)="onSubmit()" novalidate>
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left">{{pageTitle}}</div>
<div fxFlex="70" align="left" style="padding: 10px !important;">{{pageTitle}}</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>
@ -17,6 +17,7 @@
<div fxLayout="row wrap">
<div fxFlex="100">
<mat-card>
<mat-card>
<!-- <mat-card-title></mat-card-title> -->
<mat-card-content formArrayName="client_details" fxFill>
@ -97,6 +98,13 @@
</mat-card-actions>
</mat-card>
<mat-dialog-actions>
<div fxFlex="100" align="end">
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Client Details" matTooltipPosition="above"
class="mr-1 mb-1 hover-icon" (click)="addSupplierDetails($event); false"><mat-icon>add</mat-icon></button>
</div>
</mat-dialog-actions>
</mat-card>
</div>
</div>
</ng-template>
@ -229,8 +237,6 @@
</mat-form-field> -->
</div>
<div fxFlex="40" align="end">
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Client Details" matTooltipPosition="above"
class="mr-1 mb-1 hover-icon" (click)="addSupplierDetails($event); false"><mat-icon>add</mat-icon></button>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="reset"><mat-icon>settings_backup_restore</mat-icon></button>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
</div>

View File

@ -1,5 +1,6 @@
.paragraph_change {
color: #e00201 !important;
color: #fff !important;
background-color: #e00201 !important;
}
.mat-card-content {
background-color: white;

View File

@ -1,7 +1,7 @@
<form [formGroup]="currentLoanForm" class="address">
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left">{{pageTitle}}</div>
<div fxFlex="70" align="left" style="padding: 10px !important;">{{pageTitle}}</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>

View File

@ -19,7 +19,8 @@
// }
.paragraph_change {
color: #e00201 !important;
color: #fff !important;
background-color: #e00201 !important;
}
.mat-card-content {
background-color: white;

View File

@ -1,6 +1,6 @@
<form [formGroup]="employmentForm" class="address">
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left">
<div fxFlex="70" align="left" style="padding: 10px !important;">
{{pageTitle}}
</div>
<div fxFlex="30" align="end">

View File

@ -21,7 +21,8 @@
}
.paragraph_change {
color: #e00201 !important;
color: #fff !important;
background-color: #e00201 !important;
}
.mat-card-content {
background-color: white;

View File

@ -1,6 +1,6 @@
<form class="address" [formGroup]="familyForm">
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left">
<div fxFlex="70" align="left" style="padding: 10px !important;">
{{pageTitle}}
</div>
<div fxFlex="30" align="end">

View File

@ -24,7 +24,8 @@
.paragraph_change {
color: #e00201 !important;
color: #fff !important;
background-color: #e00201 !important;
}
.mat-card-content {
background-color: white;

View File

@ -2,7 +2,7 @@
<form [formGroup]="financialForm" class="address">
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left">
<div fxFlex="70" align="left" style="padding: 10px !important;">
{{pageTitle}}
</div>
<div fxFlex="30" align="end">
@ -23,33 +23,62 @@
<mat-card-header>
<p>Data as Per Financial Statements<p>
</mat-card-header>
<div formArrayName="date_per_financial">
<mat-form-field>
<input matInput placeholder="Starting Financial Year" formControlName="staring_financial_year" required>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Total Financial Year" formControlName="total_financial_year" required (change)="dynamicalFinYear($event)">
</mat-form-field>
<div *ngIf="total_financial_year != ''" formArrayName="date_per_financial">
<!-- <div formArrayName="date_per_financial"> -->
<div *ngFor="let details of financialForm.controls.date_per_financial['controls']; let i=index"
[formGroupName]="i">
<mat-card-content class="matcard">
<mat-form-field>
<input matInput placeholder="Year (format: 2015-16)" formControlName="financial_year" required>
<!-- <input matInput placeholder="Year (format: 2015-16)" formControlName="financial_year" required> -->
<input matInput placeholder="Latest Financial Year" formControlName="financial_year" required>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Annual Sale" formControlName="financial_annual_sale" (change)="calMargin(i, details)" type="number" required>
<!-- <input matInput placeholder="Annual Sale" formControlName="financial_annual_sale" (change)="calMargin(i, details)" type="number" required> -->
<input matInput placeholder="Annual Sale" formControlName="financial_annual_sale" (change)="calMargin(i, details)" (keypress)="keyPress($event)" required>
</mat-form-field>
<mat-form-field>
<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-select placeholder="Is there Net Profit or Net Loss?" formControlName="finanical_profit_or_loss" required>
<mat-option value="1" >Net Profit</mat-option>
<mat-option value="2" >Net Loss</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="details.get('finanical_profit_or_loss').value == 1 ">
<mat-form-field>
<!-- <input matInput placeholder="Net Profit to Sales %" formControlName="financial_margin" (keypress)="keyPress($event)" required> -->
<input matInput placeholder="Net Profit Amount" formControlName="financial_net_profit" (change)="calMargin( i, details); calYearVariation( i, details)" (keypress)="keyPress($event)" required>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Net Profit to Sales %" formControlName="financial_margin" (keypress)="keyPress($event)" required>
<input matInput placeholder="Net Profit to Sales %" formControlName="financial_margin_of_profit" (keypress)="keyPress($event)" required>
</mat-form-field>
</span>
<span *ngIf="details.get('finanical_profit_or_loss').value == 2 ">
<mat-form-field>
<input matInput placeholder="Net Loss Amount" formControlName="financial_net_loss" (change)="calMargin( i, details); calYearVariation( i, details)" type="number" required>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Net Loss to Sales %" formControlName="financial_margin_of_loss" (keypress)="keyPress($event)" required>
</mat-form-field>
</span>
<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)">
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Reason For Major Difference" formControlName="financial_reason" required>
<!-- <input matInput placeholder="Reason For Major Difference" formControlName="financial_reason" required> -->
<input matInput placeholder="Customer Comments on variances in Financials" formControlName="financial_reason" required>
</mat-form-field>
<button type="button" mat-raised-button mat-icon-button (click)="addDate()"
<!-- <button type="button" mat-raised-button mat-icon-button (click)="addDate()"
matTooltip="Add More Financial Statements" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="i==0">
<mat-icon>add</mat-icon>
</button>
</button> -->
<button type="button" mat-raised-button mat-icon-button (click)="deleteDate(i)"
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="i>0">
<mat-icon>delete</mat-icon>
@ -72,7 +101,8 @@
[formGroupName]="i">
<mat-card-content class="matcard">
<mat-form-field>
<input matInput placeholder="Year (format: 2015-16)" formControlName="estimate_year" required>
<!-- <input matInput placeholder="Year (format: 2015-16)" formControlName="estimate_year" required> -->
<input matInput placeholder="Year (format: 2015-2016)" formControlName="estimate_year" required>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Annual Sale" formControlName="estimate_annual_sale" (change)="calMarginVal( i, details)" type="number" required>

View File

@ -23,7 +23,8 @@
.paragraph_change {
color: #e00201 !important;
color: #fff !important;
background-color: #e00201 !important;
}
.mat-card-content {
background-color: white;

View File

@ -35,12 +35,14 @@ export class FinancialInfoComponent implements OnInit {
public financialForm: FormGroup;
private notifier: NotifierService;
marginVal: any = [] ;
placeholderName : any = [];
setmargin: AbstractControl;
constructor(notifier: NotifierService,
private fb: FormBuilder,
private route: ActivatedRoute,
private router: Router,
private _pd: PdTrigerService,
private dialogRef: MatDialogRef<FinancialInfoComponent>,
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
this.form_id = 14;
@ -65,11 +67,13 @@ export class FinancialInfoComponent implements OnInit {
});
if (result.length > 0) {
result.forEach(val => {
financial_date.push(this.createDate());
//financial_date.push(this.createDate());
financial_date.push(this.createDate(''));
});
retriveData.date_per_financial = result;
} else {
financial_date.push(this.createDate());
//financial_date.push(this.createDate());
financial_date.push(this.createDate(''));
}
if (result_val.length > 0) {
result_val.forEach(val => {
@ -84,7 +88,7 @@ export class FinancialInfoComponent implements OnInit {
retriveData.fk_createdby = this.pdid;
this.financialForm.setValue(retriveData);
} else {
financial_date.push(this.createDate());
//financial_date.push(this.createDate());
estimated_val.push(this.createValue());
}
})
@ -95,16 +99,31 @@ export class FinancialInfoComponent implements OnInit {
formid: this.form_id,
fk_createdby: this.pdid,
financial_remarks: ['', Validators.compose([Validators.required])],
staring_financial_year : ['', Validators.compose([Validators.required])],
total_financial_year : ['', Validators.compose([Validators.required])],
date_per_financial: this.fb.array([]),
estimated_value: this.fb.array([])
});
}
createDate() {
// createDate() {
// return this.fb.group({
// financial_year: ['', Validators.compose([Validators.required, Validators.pattern(/^[0-9]{4}-[0-9]{2}$/)])],
// financial_annual_sale: ['', Validators.compose([Validators.required, Validators.pattern(/^[0-9\(\)]+$/)])],
// financial_net_profit: ['', Validators.compose([Validators.required, Validators.pattern(/^-?[1-9]\d*|0$/)])],
// financial_margin: ['', Validators.compose([Validators.required])],
// financial_variation: [''],
// financial_reason: ['', Validators.compose([Validators.required])],
// });
// }
createDate(date) {
return this.fb.group({
financial_year: ['', Validators.compose([Validators.required, Validators.pattern(/^[0-9]{4}-[0-9]{2}$/)])],
financial_year: [date, Validators.compose([Validators.required, Validators.pattern(/^[0-9]{4}-[0-9]{2}$/)])],
financial_annual_sale: ['', Validators.compose([Validators.required, Validators.pattern(/^[0-9\(\)]+$/)])],
financial_net_profit: ['', Validators.compose([Validators.required, Validators.pattern(/^-?[1-9]\d*|0$/)])],
financial_margin: ['', Validators.compose([Validators.required])],
finanical_profit_or_loss:['', Validators.compose([Validators.required])],
financial_net_profit: ['', Validators.compose([Validators.pattern(/^-?[1-9]\d*|0$/)])],
financial_net_loss: ['', Validators.compose([Validators.pattern(/^-?[1-9]\d*|0$/)])],
financial_margin_of_profit: [''],
financial_margin_of_loss: [''],
financial_variation: [''],
financial_reason: ['', Validators.compose([Validators.required])],
});
@ -121,7 +140,7 @@ export class FinancialInfoComponent implements OnInit {
}
addDate() {
const control = <FormArray>this.financialForm.controls['date_per_financial'];
control.push(this.createDate());
//control.push(this.createDate());
}
deleteDate(index) {
const control = <FormArray>this.financialForm.controls['date_per_financial'];
@ -135,26 +154,116 @@ export class FinancialInfoComponent implements OnInit {
const control = <FormArray>this.financialForm.controls['estimated_value'];
control.removeAt(index);
}
calYearVariation(index, detail) {
let profit = detail.value.financial_net_profit;
if ( profit != '' && index != 0) {
console.log('value')
let array = <FormArray>this.financialForm.controls['date_per_financial']
let prev_profit = array.value[index - 1].financial_net_profit;
let variation = ((profit - prev_profit)/ prev_profit) * 100;
detail.controls.financial_variation.setValue(variation.toFixed(2))
// detail.controls.financial_variation.disable()
dynamicalFinYear($event){
//console.log(this.financialForm.controls['total_financial_year'].value);
//console.log('data',$event.target.value);
let e = $event.target.value;
let startingYear = this.financialForm.controls['staring_financial_year'].value;
const control = <FormArray>this.financialForm.controls['date_per_financial'];
while (control.length !== 0) {
control.removeAt(0);
}
if(e > 0 ){
for(let i = 1 ; i<= e ; i++ ){
let Year = (+startingYear+(i-1)) +'-'+ ((+startingYear)+(+i));
control.push(this.createDate(Year));
//console.log(this.financialForm.controls['staring_financial_year'].value);
}
}
}
// calYearVariation(index, detail) {
// let profit = detail.value.financial_net_profit;
// if ( profit != '' && index != 0) {
// console.log('value')
// let array = <FormArray>this.financialForm.controls['date_per_financial']
// let prev_profit = array.value[index - 1].financial_net_profit;
// let variation = ((profit - prev_profit)/ prev_profit) * 100;
// detail.controls.financial_variation.setValue(variation.toFixed(2))
// // detail.controls.financial_variation.disable()
// }
// }
calYearVariation(index, detail) {
let profit = detail.value.financial_net_profit;
let loss = detail.value.financial_net_loss;
if ( profit != '' || loss != '' && index != 0) {
let array = <FormArray>this.financialForm.controls['date_per_financial']
let prev_profit = array.value[index - 1].financial_net_profit != '' ? array.value[index - 1].financial_net_profit : 0;
let prev_loss = array.value[index - 1].financial_net_loss !='' ? array.value[index - 1].financial_net_loss : 0 ;
let variation = (((profit != '' ? profit : loss ) - ( prev_profit != '' ? prev_profit : prev_loss ))/ (prev_profit != '' ? prev_profit : prev_loss)) * 100;
detail.controls.financial_variation.setValue(variation.toFixed(2));
}
// if(detail.value.finanical_profit_or_loss == 1){
// let profit = detail.value.financial_net_profit;
// if ( profit != '' && index != 0) {
// let array = <FormArray>this.financialForm.controls['date_per_financial']
// let prev_profit = array.value[index - 1].financial_net_profit;
// let variation = ((profit - prev_profit)/ prev_profit) * 100;
// detail.controls.financial_variation.setValue(variation.toFixed(2))
// }
// }else if (detail.value.finanical_profit_or_loss == 2){
// let loss = detail.value.financial_net_loss;
// if ( loss != '' && index != 0) {
// let array = <FormArray>this.financialForm.controls['date_per_financial']
// let prev_loss = array.value[index - 1].financial_net_loss;
// let variation = ((loss - prev_loss)/ prev_loss) * 100;
// detail.controls.financial_variation.setValue(variation.toFixed(2))
// }
// }
}
// calMargin(index, detail) {
// console.log('detail', detail);
// let salary = detail.value.financial_annual_sale;
// let profit = detail.value.financial_net_profit;
// if (salary != '' && profit != '') {
// let margin = (profit / salary) * 100;
// detail.controls.financial_margin.setValue(margin.toFixed(2))
// // detail.controls.financial_margin.disable()
// }
// }
calMargin(index, detail) {
console.log('detail', detail);
let salary = detail.value.financial_annual_sale;
let profit = detail.value.financial_net_profit;
if (salary != '' && profit != '') {
let margin = (profit / salary) * 100;
detail.controls.financial_margin.setValue(margin.toFixed(2))
// detail.controls.financial_margin.disable()
}
if(detail.value.finanical_profit_or_loss == 1){
let profit = detail.value.financial_net_profit;
if (salary != '' && profit != '') {
let margin = (profit / salary) * 100;
detail.controls.financial_margin_of_profit.setValue(margin.toFixed(2))
// detail.controls.financial_margin.disable()
}
}
else if (detail.value.finanical_profit_or_loss == 2){
let loss = detail.value.financial_net_loss;
if (salary != '' && loss != '') {
let margin = (loss / salary) * 100;
detail.controls.financial_margin_of_loss.setValue(margin.toFixed(2))
// detail.controls.financial_margin.disable()
}
}
}
calVariation(index, detail) {
let profit = detail.value.estimate_net_profit;
@ -176,6 +285,35 @@ export class FinancialInfoComponent implements OnInit {
}
}
submitDetails() {
console.log(this.financialForm.value.date_per_financial['financial_variation']);
if(this.financialForm.value.date_per_financial['finanical_profit_or_loss'] == 1){
this.financialForm.value.date_per_financial['financial_net_profit'].setValidators([Validators.required]);
this.financialForm.value.date_per_financial['financial_net_profit'].updateValueAndValidity();
this.financialForm.value.date_per_financial['financial_net_loss'].clearValidators();
this.financialForm.value.date_per_financial['financial_net_loss'].updateValueAndValidity();
this.financialForm.value.date_per_financial['financial_margin_of_profit'].setValidators([Validators.required]);
this.financialForm.value.date_per_financial['financial_margin_of_profit'].updateValueAndValidity();
this.financialForm.value.date_per_financial['financial_margin_of_loss'].clearValidators();
this.financialForm.value.date_per_financial['financial_margin_of_loss'].updateValueAndValidity();
}else if(this.financialForm.value.date_per_financial['finanical_profit_or_loss'] == 2) {
this.financialForm.value.date_per_financial['financial_net_profit'].clearValidators();
this.financialForm.value.date_per_financial['financial_net_profit'].updateValueAndValidity();
this.financialForm.value.date_per_financial['financial_net_loss'].setValidators([Validators.required]);
this.financialForm.value.date_per_financial['financial_net_loss'].updateValueAndValidity();
this.financialForm.value.date_per_financial['financial_margin_of_profit'].clearValidators();
this.financialForm.value.date_per_financial['financial_margin_of_profit'].updateValueAndValidity();
this.financialForm.value.date_per_financial['financial_margin_of_loss'].setValidators([Validators.required]);
this.financialForm.value.date_per_financial['financial_margin_of_loss'].updateValueAndValidity();
}
if (!this.financialForm.valid) {
return;
}
@ -184,6 +322,7 @@ export class FinancialInfoComponent implements OnInit {
this._pd.saveForm(records).subscribe(data => {
console.log('data', data);
this.notifier.notify('success', 'Saved Successfully.');
//this.dialogRef.close();
}, error => {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
})

View File

@ -1,7 +1,7 @@
<form [formGroup]="_generalForm" novalidate>
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left">
<div fxFlex="70" align="left" style="padding: 10px !important;">
{{pageTitle}}
</div>
<div fxFlex="30" align="end">

View File

@ -1,5 +1,6 @@
.paragraph_change {
color: #e00201 !important;
color: #fff !important;
background-color: #e00201 !important;
}
.example-section {
height: 120px;

View File

@ -1,6 +1,6 @@
<form [formGroup]="representativeForm" class="address">
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left">
<div fxFlex="70" align="left" style="padding: 10px !important;">
{{pageTitle}}
</div>
<div fxFlex="30" align="end">

View File

@ -11,7 +11,8 @@
// }
.paragraph_change {
color: #e00201 !important;
color: #fff !important;
background-color: #e00201 !important;
}
.mat-card-content {
background-color: white;

View File

@ -1,6 +1,6 @@
<form [formGroup]="loanDetailsForm" class="address">
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left">
<div fxFlex="70" align="left" style="padding: 10px !important;">
{{pageTitle}}
</div>
<div fxFlex="30" align="end">
@ -73,12 +73,13 @@
<input matInput placeholder="Top Up Amt" (keypress)="keyPress($event)" formControlName="topup_amount" (keyup)="inWords($event,5)">
<mat-hint align="end" *ngIf="loanDetailsForm.controls['topup_amount'].value != ''">{{"&#8377;"}} {{topUpAmtInWords}} Only</mat-hint>
</mat-form-field>
<mat-form-field>
<mat-form-field *ngIf="loanDetailsForm.controls['is_transfer'].value != 'yes'">
<input matInput placeholder="Amount of Own Contribution" formControlName="own_contribution" (keypress)="keyPress($event)" required (keyup)="inWords($event,4)">
<mat-hint align="end" *ngIf="loanDetailsForm.controls['own_contribution'].value != ''">{{"&#8377;"}} {{ownContributionInWords}} Only</mat-hint>
</mat-form-field>
<mat-form-field>
<mat-form-field *ngIf="loanDetailsForm.controls['is_transfer'].value != 'yes'">
<mat-select placeholder="Source" formControlName="source" required>
<mat-option *ngFor="let sour of m_sourceofamount" [value]="sour.id">{{ sour.name }}</mat-option>
</mat-select>
@ -97,17 +98,14 @@
<input matInput placeholder="EMI Comfort Level" formControlName="emi_level" (keypress)="keyPress($event)" required>
</mat-form-field>
<!-- <div *ngIf="productAbbr === 'HL' || productAbbr === 'LL' || productAbbr === 'LAP' "> -->
<mat-card>
<mat-card-header *ngIf="loanDetailsForm.controls['source'].value =='other'" >
<p>Mortgage
<p>
<!-- {{m_mortageTypeProperty | json}} -->
</mat-card-header>
<mat-card *ngIf="mortageCardAccess">
<mat-card-header><p>Mortgage</p></mat-card-header>
<mat-card-content class="matcard">
<mat-form-field>
<mat-select placeholder="Type of Property" formControlName="property_type" required>
<mat-select placeholder="Type of Property" formControlName="property_type" (selectionChange)="mortage_type($event.value)" required>
<mat-option *ngFor="let typeprop of m_mortageTypeProperty" [value]="typeprop.mortage_property_id">{{ typeprop.property_name }}</mat-option>
</mat-select>
</mat-form-field>
<!--<mat-select placeholder="Type of property" formControlName="property_type">
<mat-option value="bungalow">Bungalow</mat-option>
@ -125,25 +123,27 @@
<mat-option value="vacant_land">Vacant Land</mat-option>
<mat-option value="others">Others</mat-option>
</mat-select>-->
</mat-form-field>
<mat-form-field *ngIf="loanDetailsForm.controls['property_type'].value == 'others'">
<input matInput placeholder="Specify Type of Property" formControlName="ownershipOther">
<mat-form-field *ngIf="mortageAccess">
<input matInput placeholder="Specify Type of Property" formControlName="property_type_others">
</mat-form-field>
<mat-form-field>
<mat-select multiple placeholder="Name of Owner"
formControlName="owner_name" (selectionChange)="ownerNameChange($event)" required>
<mat-option value="{{owner.pd_co_applicant_id}}" *ngFor="let owner of applicants">{{owner.applicant_name}}</mat-option>
<mat-option value="Others">Others</mat-option>
<mat-option value="Others">Others (Please Specify)</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="OtherOwnerFlag">
<input matInput placeholder="Specify Other Owner Name" formControlName="other_owners_name">
</mat-form-field>
<mat-form-field>
<mat-select placeholder="Status of Construction" formControlName="construction_status" required>
<mat-option *ngFor="let status of m_statusofCunstruction" [value]="status.id">{{ status.name }} {{status.id}}</mat-option>
</mat-select>
</mat-form-field>
<mat-select placeholder="Status of Construction" formControlName="construction_status" required>
<mat-option *ngFor="let status of m_statusofCunstruction" [value]="status.id">{{ status.name }} {{status.id}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="loanDetailsForm.controls['construction_status'].value == 4">
<input matInput placeholder="What is the approximate stage of construction (%)?"
@ -166,10 +166,6 @@
formControlName="value_per_agreement" (keypress)="keyPress($event)" required (keyup)="inWords($event,3)">
<mat-hint align="end" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"&#8377;"}} {{valAsPerAgmtInWords}} Only</mat-hint>
</mat-form-field> -->
<mat-form-field>
<input matInput placeholder="Estimate Market Value as Per Customer"
formControlName="emv_per_customer" (keypress)="keyPress($event)" required>
</mat-form-field>
</mat-card-content>
</mat-card>
</mat-card>

View File

@ -23,7 +23,8 @@
.paragraph_change {
color: #e00201 !important;
color: #fff !important;
background-color: #e00201 !important;
}
.mat-card-content {
background-color: white;

View File

@ -31,15 +31,20 @@ import {ActivatedRoute, Router} from '@angular/router';
export class LoanDetailsComponent implements OnInit {
public loanDetailsForm: FormGroup;
private notifier: NotifierService;
pdid: number;
form_id: number;
exist_loan_amt: any;
applicants: any;
productAbbr: any;
subProductName: any;
isOtherPurpose: boolean = false;
isSource: boolean = false;
mortageCheck : boolean = true;
OtherOwnerFlag : boolean;
endUserList: any = [];
ownerNames: any = [];
m_endUseofLoad = [];
@ -55,6 +60,10 @@ export class LoanDetailsComponent implements OnInit {
topUpAmtInWords: any;
pageTitle: string ="Loan Details";
mortageCardAccess: boolean;
mortageAccess: boolean = false;
propertyType : any;
constructor(notifier: NotifierService,
private fb: FormBuilder,
private route: ActivatedRoute,
@ -63,6 +72,7 @@ export class LoanDetailsComponent implements OnInit {
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
this.applicants = this.pd_all_details.pdapplicants_detials;
this.productAbbr = this.pd_all_details.pdmaster_details.product_abbr;
this.subProductName = this.pd_all_details.pdmaster_details.subproduct_name;
this.exist_loan_amt = this.pd_all_details.pdmaster_details.loan_amount != '' ? this.pd_all_details.pdmaster_details.loan_amount :'';
this.loanAmtInWords = this._pd.convertNumberToWords(this.exist_loan_amt);
this.form_id = 10;
@ -99,9 +109,15 @@ export class LoanDetailsComponent implements OnInit {
let ownername: any = [];
owner.forEach(val => {
ownername.push(val.owner_name);
if(val.owner_name == 'Others'){
this.OtherOwnerFlag = true;
}
else{
this.OtherOwnerFlag = false;
}
});
console.log('enduse', enduse);
console.log('ownername', ownername);
// console.log('enduse', enduse);
// console.log('ownername', ownername);
this.loanDetailsForm.controls['loan_amount'].setValue(value.records.loan_amount);
if(value.records.loan_amount){ this.loanAmtInWords = this._pd.convertNumberToWords(value.records.loan_amount); }
@ -126,18 +142,28 @@ export class LoanDetailsComponent implements OnInit {
if (value.records.other_bt_lender) {
this.loanDetailsForm.controls['other_bt_lender'].setValue(value.records.other_bt_lender);
}
if(value.records.is_transfer != 'yes'){
this.loanDetailsForm.controls['own_contribution'].setValue(value.records.own_contribution);
if(value.records.own_contribution){ this.ownContributionInWords = this._pd.convertNumberToWords(value.records.own_contribution); }
this.loanDetailsForm.controls['own_contribution'].setValue(value.records.own_contribution);
if(value.records.own_contribution){ this.ownContributionInWords = this._pd.convertNumberToWords(value.records.own_contribution); }
this.loanDetailsForm.controls['source'].setValue(value.records.source);
}
this.loanDetailsForm.controls['source'].setValue(value.records.source);
if (value.records.lender_name_type) {
this.loanDetailsForm.controls['lender_name_type'].setValue(value.records.lender_name_type);
}
this.loanDetailsForm.controls['emi_level'].setValue(value.records.emi_level);
this.loanDetailsForm.controls['property_type'].setValue(value.records.property_type);
this.propertyType = value.records.property_type;
//console.log(value.records.property_type);
this.mortage_type(value.records.property_type);
//console.log(this.propertyType);
this.loanDetailsForm.controls['property_type_others'].setValue(value.records.property_type_others);
this.loanDetailsForm.controls['owner_name'].setValue(ownername);
this.loanDetailsForm.controls['other_owners_name'].setValue(value.records.other_owners_name);
this.loanDetailsForm.controls['construction_status'].setValue(value.records.construction_status);
if(value.records.construction_status == 4 ){
this.loanDetailsForm.controls['percentage_of_construction'].setValue(value.records.percentage_of_construction);
}
@ -150,6 +176,12 @@ export class LoanDetailsComponent implements OnInit {
this.loanDetailsForm.controls['loandetails_remarks'].setValue(value.records.loandetails_remarks);
}
})
if(this.productAbbr == 'BL' || this.productAbbr == 'PL' || this.productAbbr == 'LL'){
this.mortageCardAccess = false;
}else{
this.mortageCardAccess = true;
}
}
// =============
@ -182,9 +214,42 @@ getM_sourceofamount() {
// this._pd.getAllMasterDatas('MORTAGEPROPERTYTYPE').subscribe(
this._pd.getAllMasterDatas('MORTAGEPROPERTIES').subscribe(
data => {
// console.log('sadfdfads',this.productAbbr);
this.m_mortageTypeProperty = data.records.filter(data => data.isactive == 1);
this.m_mortageTypeProperty = data.records.filter(data => data.group_name == this.productAbbr);
// this.m_mortageTypeProperty = data.records.filter(data => data.isactive == 1);
// this.m_mortageTypeProperty = data.records.filter(data => data.group_name == this.productAbbr);
if(data.dataStatus==true){
let that = this;
this.m_mortageTypeProperty = data.records.filter(
function(data){
if(that.productAbbr != "LAP"){
if(data.group_name == that.productAbbr && data.isactive==1){
console.log('if data');
return data;
}
}
else if(that.productAbbr == "LAP"){
if(data.sub_group_name == that.subProductName && data.isactive==1){
console.log('else data');
return data;
}
}
// if(data.isactive==1 && data.group_name != "LAP"){
// if(data.group_name == that.productAbbr){
// return data;}
// }else if(data.group_name == "LAP" && data.sub_group_name == that.subProductName){
// return data;
// }else{
// return ;
// }
});
// console.log(this.m_mortageTypeProperty);
// console.log(this.propertyType);
// this.mortage_type(this.propertyType);
// if(this.propertyType != ''){
// this.mortage_type(this.propertyType);
// }
}
},
error => {
// this.notifier.notify('warning', 'No Category Records Found.!');
@ -227,12 +292,14 @@ getM_sourceofamount() {
topup_amount: [''],
lender: [''],
other_bt_lender : [''],
own_contribution: ['', Validators.compose([Validators.required])],
source: ['', Validators.compose([Validators.required])],
own_contribution: [''],
source: [''],
lender_name_type: [''],
emi_level: ['', Validators.compose([Validators.required])],
property_type: ['', Validators.compose([Validators.required])],
property_type_others:[''],
owner_name: ['', Validators.compose([Validators.required])],
other_owners_name :[''],
construction_status: ['', Validators.compose([Validators.required])],
percentage_of_construction : [''],
emv_per_customer: ['', Validators.compose([Validators.required])],
@ -250,6 +317,18 @@ getM_sourceofamount() {
});
}
ownerNameChange(event) {
let EventValue;
event.value.forEach(option => {
EventValue = option;
if(EventValue == 'Others'){
this.OtherOwnerFlag = true;
}
else{
this.OtherOwnerFlag = false;
}
});
// this.ownerNames = [];
// event.value.forEach(option => {
// this.ownerNames.push({owner_name: option});
@ -282,6 +361,13 @@ getM_sourceofamount() {
if (this.loanDetailsForm.controls['is_transfer'].value == 'yes') {
records.balance_transfer_amount = this.loanDetailsForm.controls['balance_transfer_amount'].value;
}
else if(this.loanDetailsForm.controls['is_transfer'].value == 'no') {
records.own_contribution = this.loanDetailsForm.controls['own_contribution'].value;
records.source = this.loanDetailsForm.controls['source'].value;
if (this.loanDetailsForm.controls['source'].value == 'other') {
records.lender_name_type = this.loanDetailsForm.controls['lender_name_type'].value;
}
}
if (this.loanDetailsForm.controls['is_topup'].value == 'yes') {
records.topup_amount = this.loanDetailsForm.controls['topup_amount'].value;
}
@ -292,13 +378,9 @@ getM_sourceofamount() {
records.other_bt_lender = this.loanDetailsForm.controls['other_bt_lender'].value;
}
records.own_contribution = this.loanDetailsForm.controls['own_contribution'].value;
records.source = this.loanDetailsForm.controls['source'].value;
if (this.loanDetailsForm.controls['source'].value == 'other') {
records.lender_name_type = this.loanDetailsForm.controls['lender_name_type'].value;
}
records.emi_level = this.loanDetailsForm.controls['emi_level'].value;
records.property_type = this.loanDetailsForm.controls['property_type'].value;
records.property_type_others = this.loanDetailsForm.controls['property_type_others'].value;
// records.owner_name_group = this.ownerNames;
// console.log(this.loanDetailsForm.controls['owner_name'].value);
let dataOwner_name = [];
@ -306,6 +388,7 @@ getM_sourceofamount() {
dataOwner_name.push({owner_name: element})
});
records.owner_name_group = dataOwner_name;
records.other_owners_name = this.loanDetailsForm.controls['other_owners_name'].value;
records.construction_status = this.loanDetailsForm.controls['construction_status'].value;
records.percentage_of_construction = this.loanDetailsForm.controls['percentage_of_construction'].value;
records.emv_per_customer = this.loanDetailsForm.controls['emv_per_customer'].value;
@ -337,10 +420,21 @@ getM_sourceofamount() {
this.loanDetailsForm.controls['is_topup'].clearValidators();
this.loanDetailsForm.controls['is_topup'].updateValueAndValidity();
// console.log('no',event.value);
this.loanDetailsForm.controls['source'].setValidators([Validators.required]);
this.loanDetailsForm.controls['source'].updateValueAndValidity();
this.loanDetailsForm.controls['own_contribution'].setValidators([Validators.required]);
this.loanDetailsForm.controls['own_contribution'].updateValueAndValidity();
}
else if(event.value == 'yes'){
this.loanDetailsForm.controls['is_topup'].setValidators([Validators.required]);
this.loanDetailsForm.controls['is_topup'].updateValueAndValidity();
this.loanDetailsForm.controls['source'].clearValidators();
this.loanDetailsForm.controls['source'].updateValueAndValidity();
this.loanDetailsForm.controls['own_contribution'].clearValidators();
this.loanDetailsForm.controls['own_contribution'].updateValueAndValidity();
// console.log('yes',event.value);
}
@ -379,4 +473,22 @@ getM_sourceofamount() {
}
}
/**
* mortage_type
*/
mortage_type(mortage_value)
{
//console.log(mortage_value);
//let mortagetypes = this.m_mortageTypeProperty.filter(mor=>mor.mortage_property_id==mortage_value)[0];
let mortagetypes = this.m_mortageTypeProperty.filter(mor=>mor.mortage_property_id == mortage_value)[0];
// console.log(mortagetypes);
if(mortagetypes.property_name=='Others (Please Specify)'){
this.mortageAccess = true;
}else{
this.mortageAccess = false;
}
}
}

View File

@ -1,16 +1,12 @@
<form [formGroup]="_neighbourhoodForm" novalidate>
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left">
<div fxFlex="70" align="left" style="padding: 10px !important;">
<div fxLayout="row wrap">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
{{pageTitle}}
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
<mat-radio-group formControlName="check_type" class="example-radio-group">
<mat-radio-button class="example-radio-button" color="primary" [value]="types.id" *ngFor="let types of check_type; let t = index">{{types.type_name}}</mat-radio-button>
</mat-radio-group>
</div>
</div>
</div>
@ -18,39 +14,50 @@
<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>
<h6>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
<mat-radio-group formControlName="check_type" class="example-radio-group">
<mat-radio-button class="example-radio-button" color="primary" [value]="types.id" *ngFor="let types of check_type; let t = index">{{types.type_name}}</mat-radio-button>
</mat-radio-group>
</div>
</h6>
<mat-dialog-content formArrayName="neighbourhood_list" *ngIf="_neighbourhoodForm.controls.check_type.value==0">
<mat-card>
<mat-card *ngFor="let neighbourhood of _neighbourhoodForm.controls.neighbourhood_list['controls']; let n = index;" [formGroupName]="n">
<mat-card-content>
<div fxLayout="row nowrap">
<mat-form-field style="width: 42%">
<input matInput placeholder="Neighbour Name" formControlName="neighbourhood_name" type="text">
</mat-form-field>
<mat-form-field style="width: 42%">
<mat-form-field style="width: 40%">
<mat-select placeholder="Do You Know" formControlName="do_know">
<mat-option value="Yes">Yes</mat-option>
<mat-option value="No">No</mat-option>
</mat-select>
</mat-form-field>
</div>
<div fxLayout="row nowrap" *ngIf="neighbourhood.controls.do_know.value=='Yes'">
<mat-form-field style="width: 42%">
<mat-form-field style="width: 42%" *ngIf="neighbourhood.controls.do_know.value=='Yes'">
<input matInput placeholder="How Long to Know the Applicant " formControlName="how_long_do_know" type="text" (keypress)="keyPress($event)">
</mat-form-field>
<mat-form-field style="width: 42%">
<mat-form-field style="width: 42%" *ngIf="neighbourhood.controls.do_know.value=='Yes'">
<mat-select placeholder="Is the Applicant Owner" formControlName="is_applicant_owner">
<mat-option value="Yes">Yes</mat-option>
<mat-option value="No">No</mat-option>
</mat-select>
</mat-form-field>
<button type="button" mat-raised-button mat-icon-button (click)="removeNeighbourhood(r)"
<button type="button" mat-raised-button mat-icon-button (click)="removeNeighbourhood(n)"
matTooltip="Remove neighbourhood" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="n!=0">
<mat-icon>delete</mat-icon></button>
</div>
</mat-card-content>
</mat-card>
<mat-dialog-actions>
<div fxFlex="100" align="end">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Add More" matTooltipPosition="above" (click)="_neighbourhoodForm.controls.check_type.value==0 ? addNeighbourhood() : addReferencecheck()" color="primary"><mat-icon>add</mat-icon></button>
</div>
</mat-dialog-actions>
</mat-card>
</mat-dialog-content>
<mat-dialog-content formArrayName="referencecheck_list" *ngIf="_neighbourhoodForm.controls.check_type.value==1">
<mat-card>
<mat-card *ngFor="let reference of _neighbourhoodForm.controls.referencecheck_list['controls']; let r = index;" [formGroupName]="r">
<mat-card-content>
<mat-form-field style="width: 28%">
@ -102,6 +109,12 @@
<mat-icon>delete</mat-icon></button>
</mat-card-content>
</mat-card>
<mat-dialog-actions>
<div fxFlex="100" align="end">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Add More" matTooltipPosition="above" (click)="_neighbourhoodForm.controls.check_type.value==0 ? addNeighbourhood() : addReferencecheck()" color="primary"><mat-icon>add</mat-icon></button>
</div>
</mat-dialog-actions>
</mat-card>
</mat-dialog-content>
<mat-dialog-actions>
@ -112,7 +125,6 @@
</mat-form-field>
</div>
<div fxFlex="40" align="end">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Save" matTooltipPosition="above" (click)="_neighbourhoodForm.controls.check_type.value==0 ? addNeighbourhood() : addReferencecheck()"><mat-icon>add</mat-icon></button>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Save" matTooltipPosition="above" (click)="saveNeighbourhood(_neighbourhoodForm.value)"><mat-icon>save</mat-icon></button>
</div>

View File

@ -1,5 +1,6 @@
.paragraph_change {
color: #e00201 !important;
color: #fff !important;
background-color: #e00201 !important;
}
mat-form-field {
margin: 0 2%;

View File

@ -1,7 +1,7 @@
<form [formGroup]="_OtherForm" novalidate>
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left">
<div fxFlex="70" align="left" style="padding: 10px !important;">
{{pageTitle}}
</div>
<div fxFlex="30" align="end">

View File

@ -1,5 +1,6 @@
.paragraph_change {
color: #e00201 !important;
color: #fff !important;
background-color: #e00201 !important;
}
mat-form-field {
margin: 0 2%;

View File

@ -1,7 +1,7 @@
<form [formGroup]="otherIncomeForm" class="address">
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left">
<div fxFlex="70" align="left" style="padding: 10px !important;">
{{pageTitle}}
</div>
<div fxFlex="30" align="end">

View File

@ -18,7 +18,8 @@
// }
.paragraph_change {
color: #e00201 !important;
color: #fff !important;
background-color: #e00201 !important;
}
.mat-card-content {
background-color: white;

View File

@ -1,7 +1,7 @@
<form [formGroup]="_personalForm" (submit)="submitPersonalForm(_personalForm.value)" novalidate>
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left">
<div fxFlex="70" align="left" style="padding: 10px !important;">
{{pageTitle}}
</div>
<div fxFlex="30" align="end">

View File

@ -1,5 +1,6 @@
.paragraph_change {
color: #e00201 !important;
color: #fff !important;
background-color: #e00201 !important;
}
.mat-card-content {
background-color: white;

View File

@ -1,7 +1,7 @@
<form class="address" [formGroup]="rentalForm">
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left">
<div fxFlex="70" align="left" style="padding: 10px !important;">
{{pageTitle}}
</div>
<div fxFlex="30" align="end">

View File

@ -27,7 +27,8 @@
// }
.paragraph_change {
color: #e00201 !important;
color: #fff !important;
background-color: #e00201 !important;
}
.mat-card-content {
background-color: white;

View File

@ -1,6 +1,6 @@
<form [formGroup]="stockForm" class="address">
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left">
<div fxFlex="70" align="left" style="padding: 10px !important;">
{{pageTitle}}
</div>
<div fxFlex="30" align="end">

View File

@ -18,7 +18,8 @@
// }
.paragraph_change {
color: #e00201 !important;
color: #fff !important;
background-color: #e00201 !important;
}
.mat-card-content {
background-color: white;

View File

@ -1,7 +1,8 @@
<div style="max-width: 100vw !important;width: 100% !important;height: 95% !important;">
<form *ngIf="apiLoadFinish" [formGroup]="_supplierQuesFrom" (submit)="onSubmit()" novalidate>
<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left">{{pageTitle}}</div>
<div fxFlex="70" align="left" style="padding: 10px !important;">{{pageTitle}}</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>
@ -14,6 +15,7 @@
<mat-tab label="Questions">
<ng-template matTabContent>
<mat-card>
<div fxLayout="row wrap">
<div fxFlex="100">
<mat-card>
@ -110,6 +112,13 @@
</mat-card>
</div>
</div>
<mat-dialog-actions>
<div fxFlex="100" align="end">
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Supplier Details" matTooltipPosition="above"
class="mr-1 mb-1 hover-icon" (click)="addSupplierDetails($event); false"><mat-icon>add</mat-icon></button>
</div>
</mat-dialog-actions>
</mat-card>
</ng-template>
</mat-tab>
@ -241,12 +250,11 @@
</div>
<div fxFlex="40" align="end">
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Supplier Details" matTooltipPosition="above"
class="mr-1 mb-1 hover-icon" (click)="addSupplierDetails($event); false"><mat-icon>add</mat-icon></button>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
<!----<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="reset"><mat-icon>settings_backup_restore</mat-icon></button>-->
</div>
</mat-dialog-actions>
</form>
</div>
<notifier-container></notifier-container>

View File

@ -3,8 +3,14 @@
// }
.paragraph_change {
color: #e00201 !important;
color: #fff !important;
background-color: #e00201 !important;
}
// ::ng-deep .cdk-overlay-pane{
// max-width: 100vw !important;
// width: 100% !important;
// height: 95% !important;
// }
.mat-card-content {
background-color: white;
}

View File

@ -56,6 +56,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
}
ngOnInit() {
this.ListPdComponent.showListView(false);
this.route.params.subscribe(params => {
this.viewID = params['pdid'];
});

View File

@ -1,7 +1,7 @@
<div *ngIf="listView">
<mat-card>
<mat-card-content>
<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap fxLayoutAlign="center none" style="padding-top:1%">
<div fxLayout="row" fxLayout.xs="column" fxLayoutWrap style="padding-top:1%">
<div fxFlex="80%">
<mat-card-title><span style="font-size:24px"> Entity Master</span></mat-card-title>
</div>

View File

@ -38,7 +38,7 @@ const HORIZONTALMENUITEMS = [
{state:'setting/mastermodule',name:'Master Details'},
{state:'setting/entity',name:'Entities'},
{state:'setting/pdteamlist',name:'PD Team'},
{state:'template/questions', name: 'Questions'},
// {state:'template/questions', name: 'Questions'},
{state:'template/templates', name: 'Templates'},
]
},

View File

@ -14,7 +14,7 @@
</mat-form-field>
</div>
<div fxFlex="30%">
<mat-form-field style="width: 80px; text-align: center" appearance="outline">
<mat-form-field style="width: 110px; text-align: center">
<input matInput placeholder="Weightage *" formControlName="weightage">
</mat-form-field> <span>%</span>
<mat-error *ngIf="submitted && answ['controls'].weightage.hasError('required')" class="mat-text-warn">Weightage Required.!</mat-error>

View File

@ -13,7 +13,7 @@
<span>{{i+1}}</span> ) <label>{{ques.get('question').value}}</label>
</div>
<div fxFlex="1 1 auto" class="ml-xs" fxFlex="20%">
<mat-form-field style="width: 35%; text-align: center" appearance="outline">
<mat-form-field style="width: 100px; text-align: center">
<input matInput formControlName="weightage">
</mat-form-field> <span> % </span>
<mat-error *ngIf="submitted && ques['controls'].weightage.hasError('required')" class="mat-text-warn">Ques. WT is Required.!</mat-error>
@ -61,7 +61,7 @@
</div>
<div class="row" style="text-align:right;">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Add More Question and Answer" matTooltipPosition="above" color="primary" (click)="openDialog(); false"><mat-icon>add</mat-icon></button>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Add Data Points" matTooltipPosition="above" color="primary" (click)="openDialog(); false"><mat-icon>add</mat-icon></button>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save" matTooltipPosition="above" type="submit"><mat-icon>save</mat-icon></button>
</div>
</form>

View File

@ -26,14 +26,16 @@
</div>
</div>
<ng-container>
<mat-table [dataSource]="dataSource" *ngIf="templateList.length > 0" >
<mat-table [dataSource]="dataSource" *ngIf="templateList.length > 0" matSort>
<ng-container matColumnDef="template_name">
<mat-header-cell *matHeaderCellDef mat-sort-header>Template Name</mat-header-cell>
<mat-cell fxFlex="25%" *matCellDef="let template;">
<span *ngIf="template.template_name" mat-line>{{ template.template_name }}</span>
</mat-cell>
</ng-container>
<ng-container matColumnDef="lender_details">
<mat-header-cell *matHeaderCellDef mat-sort-header>Lender Details</mat-header-cell>
<mat-cell fxFlex="65%" *matCellDef="let template;">
<div *ngIf="template.lender_details.length > 0" class="text-line-limit">
<span *ngFor="let lender of template.lender_details ; let last = last" > {{lender.full_name}} - {{lender.product_name}} - {{lender.customer_segment_name}} <span *ngIf="!last">,<br><br></span></span>
@ -41,10 +43,12 @@
</mat-cell>
</ng-container>
<ng-container matColumnDef="actions">
<mat-header-cell *matHeaderCellDef mat-sort-header style="justify-content: flex-end;">Actions</mat-header-cell>
<mat-cell fxFlex="10%" *matCellDef="let template;">
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Edit" matTooltipPosition="above" (click)="goToEdit(template.template_id)"><mat-icon>edit</mat-icon></button>
</mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row style="align-items: normal !important;" *matRowDef="let row; columns: displayedColumns;">
</mat-row>
</mat-table>