review changes : ps
This commit is contained in:
parent
5b6c588083
commit
f26e1d5c47
@ -7,8 +7,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.gt-sm="25" fxFlex="100">
|
<div fxFlex.gt-sm="25" fxFlex="100">
|
||||||
<ngx-mat-drp (selectedDateRangeChanged)="updateRange($event)" (change)="onChange($event,'One')" [options]="options" #dateRangePicker></ngx-mat-drp>
|
<ngx-mat-drp (selectedDateRangeChanged)="updateRange($event);" [options]="options" #dateRangePicker></ngx-mat-drp>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.gt-sm="25" fxFlex="100">
|
<div fxFlex.gt-sm="25" fxFlex="100">
|
||||||
<mat-form-field class="example-full-width">
|
<mat-form-field class="example-full-width">
|
||||||
@ -46,7 +45,7 @@
|
|||||||
<!-- <pre> Full - {{doughnutChartDataForFullPD}} Smart -{{doughnutChartDataForSmartPD}} TELE -{{doughnutChartDataForTelePD}} </pre> -->
|
<!-- <pre> Full - {{doughnutChartDataForFullPD}} Smart -{{doughnutChartDataForSmartPD}} TELE -{{doughnutChartDataForTelePD}} </pre> -->
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div fxLayout="row" style="min-height:280px;">
|
<div fxLayout="row" style="min-height:280px;">
|
||||||
<div fxFlex.gt-sm="30" fxFlex="100" >
|
<div *ngIf="total1 != 0" fxFlex.gt-sm="30" fxFlex="100" >
|
||||||
<canvas baseChart class="chart" id="FullCanvas" name="FullCanvas"
|
<canvas baseChart class="chart" id="FullCanvas" name="FullCanvas"
|
||||||
height="280px" width="280px"
|
height="280px" width="280px"
|
||||||
[data]="doughnutChartDataForFullPD"
|
[data]="doughnutChartDataForFullPD"
|
||||||
@ -58,7 +57,7 @@
|
|||||||
<div *ngIf="total1 != 0" class="donut-inner"><span>Full - {{total1}}</span></div>
|
<div *ngIf="total1 != 0" class="donut-inner"><span>Full - {{total1}}</span></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div fxFlexOffset.gt-sm="5" fxFlex.gt-sm="30" fxFlex="100">
|
<div *ngIf="total2 != 0" fxFlexOffset.gt-sm="5" fxFlex.gt-sm="30" fxFlex="100">
|
||||||
<canvas baseChart class="chart" id="SmartCanvas" name="SmartCanvas"
|
<canvas baseChart class="chart" id="SmartCanvas" name="SmartCanvas"
|
||||||
height="280px" width="280px"
|
height="280px" width="280px"
|
||||||
[data]="doughnutChartDataForSmartPD"
|
[data]="doughnutChartDataForSmartPD"
|
||||||
@ -69,7 +68,7 @@
|
|||||||
[chartType]="doughnutChartType"></canvas>
|
[chartType]="doughnutChartType"></canvas>
|
||||||
<div *ngIf="total2 != 0" class="donut-inner"><span>Smart - {{total2}}</span></div>
|
<div *ngIf="total2 != 0" class="donut-inner"><span>Smart - {{total2}}</span></div>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlexOffset.gt-sm="5" fxFlex.gt-sm="30" fxFlex="100">
|
<div *ngIf="total3 != 0" fxFlexOffset.gt-sm="5" fxFlex.gt-sm="30" fxFlex="100">
|
||||||
<canvas baseChart class="chart" id="TeleCanvas" name="TeleCanvas"
|
<canvas baseChart class="chart" id="TeleCanvas" name="TeleCanvas"
|
||||||
height="280px" width="280px"
|
height="280px" width="280px"
|
||||||
[data]="doughnutChartDataForTelePD"
|
[data]="doughnutChartDataForTelePD"
|
||||||
@ -81,7 +80,7 @@
|
|||||||
<div *ngIf="total3 != 0" class="donut-inner"><span>Tele - {{total3}}</span></div>
|
<div *ngIf="total3 != 0" class="donut-inner"><span>Tele - {{total3}}</span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div fxLayout="row" class="pt-3">
|
<div fxLayout="row" class="pt-3" *ngIf="total3 != 0 && total2 != 0 && total1 != 0">
|
||||||
<div fxFlex.gt-sm="100" fxFlex="100" style="text-align:center">
|
<div fxFlex.gt-sm="100" fxFlex="100" style="text-align:center">
|
||||||
<ul class="lengend-list">
|
<ul class="lengend-list">
|
||||||
<li class="lengend-element"><span class="oval" style="background-color:#c1c1c1"> </span> Draft</li>
|
<li class="lengend-element"><span class="oval" style="background-color:#c1c1c1"> </span> Draft</li>
|
||||||
|
|||||||
@ -2,10 +2,14 @@ $red: #f5515f;
|
|||||||
$blue: #05abe0;
|
$blue: #05abe0;
|
||||||
$grey: #343434;
|
$grey: #343434;
|
||||||
$p: 12px;
|
$p: 12px;
|
||||||
|
|
||||||
|
::ng-deep .ngx-mat-drp-date-input{text-overflow:ellipsis !important;color:#fff !important;}
|
||||||
|
|
||||||
mat-card-title{
|
mat-card-title{
|
||||||
background-color:#E00201 !important;
|
background-color:#E00201 !important;
|
||||||
color:#fff;
|
color:#fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mat-input-wrapper {
|
.mat-input-wrapper {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
@ -25,10 +29,10 @@ li
|
|||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ngx-mat-drp-date-input[_ngcontent-c17] {
|
// .ngx-mat-drp-date-input[_ngcontent-c17] {
|
||||||
text-overflow: ellipsis;
|
// text-overflow: ellipsis;
|
||||||
color: #fff;
|
// color: #fff;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//.lengend-list {
|
//.lengend-list {
|
||||||
// list-style-type: none;
|
// list-style-type: none;
|
||||||
@ -57,7 +61,6 @@ li
|
|||||||
.donut-inner span{
|
.donut-inner span{
|
||||||
font-size:1rems;
|
font-size:1rems;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
mat-card-content{
|
mat-card-content{
|
||||||
min-height: 400px;
|
min-height: 400px;
|
||||||
|
|||||||
@ -48,6 +48,7 @@ export class DashboardComponent {
|
|||||||
total2: number = 0;
|
total2: number = 0;
|
||||||
total3: number = 0;
|
total3: number = 0;
|
||||||
flag : number = 0;
|
flag : number = 0;
|
||||||
|
evt:Range
|
||||||
|
|
||||||
// doughnutChartColors: any[] = [{
|
// doughnutChartColors: any[] = [{
|
||||||
// backgroundColor: ['#f44336', '#3f51b5', '#ffeb3b', '#4caf50', '#2196f3','#673ab7']
|
// backgroundColor: ['#f44336', '#3f51b5', '#ffeb3b', '#4caf50', '#2196f3','#673ab7']
|
||||||
@ -134,7 +135,7 @@ export class DashboardComponent {
|
|||||||
this.options = {
|
this.options = {
|
||||||
presets: this.presets,
|
presets: this.presets,
|
||||||
format: 'mediumDate',
|
format: 'mediumDate',
|
||||||
range: {fromDate:FirstDateForPreMonth, toDate: fromMax},
|
range: {fromDate: today, toDate: today},
|
||||||
applyLabel: "Submit",
|
applyLabel: "Submit",
|
||||||
calendarOverlayConfig: {
|
calendarOverlayConfig: {
|
||||||
shouldCloseOnBackdropClick: false,
|
shouldCloseOnBackdropClick: false,
|
||||||
@ -150,7 +151,17 @@ export class DashboardComponent {
|
|||||||
|
|
||||||
updateRange(range: Range){
|
updateRange(range: Range){
|
||||||
this.range = range;
|
this.range = range;
|
||||||
this.onChange(this.range,1);
|
|
||||||
|
if(range.fromDate != range.toDate){
|
||||||
|
// console.log('if from Date',range.fromDate);
|
||||||
|
// console.log('if to date',range.toDate);
|
||||||
|
this.onChange(this.range,1);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
// console.log('else from Date',range.fromDate);
|
||||||
|
// console.log('else to date',range.toDate);
|
||||||
|
// console.log('same');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setupPresets() {
|
setupPresets() {
|
||||||
@ -507,15 +518,15 @@ doughnutOptions: any = Object.assign({
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
onChange(e :any,flag: any) {
|
onChange(e: any,flag: any) {
|
||||||
|
|
||||||
let fromdate;
|
let fromdate;
|
||||||
let todate;
|
let todate;
|
||||||
|
|
||||||
if(flag == 1){
|
if(flag == 1){
|
||||||
|
this.evt = e
|
||||||
fromdate = new Date(e.fromDate);
|
fromdate = new Date(this.evt.fromDate);
|
||||||
todate = new Date(e.toDate);
|
todate = new Date(this.evt.toDate);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -31,6 +31,11 @@
|
|||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<mat-form-field *ngIf="detail.get('property_type').value == 5">
|
||||||
|
<input matInput placeholder="Other Property Type" formControlName="other_property_type">
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -146,14 +151,19 @@
|
|||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex="33">
|
<!-- <div fxFlex="33" *ngIf="detail.get('investments_type').value == 6 "> -->
|
||||||
|
<mat-form-field>
|
||||||
|
<input matInput placeholder="Specify Other Type" formControlName="other_investments_type">
|
||||||
|
</mat-form-field>
|
||||||
|
<!-- </div> -->
|
||||||
|
<div fxFlex="33" >
|
||||||
<mat-form-field class="ml-xs example-full-width">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
<input matInput placeholder="Amount of Investment" formControlName="amount_of_invest" required (keypress)="keyPress($event)">
|
<input matInput placeholder="Amount of Investment" formControlName="amount_of_invest" required (keypress)="keyPress($event)">
|
||||||
</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="Bank Name" formControlName="bank_name" required>
|
<input matInput placeholder="Bank Name" formControlName="bank_name" required>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -170,6 +180,23 @@
|
|||||||
<mat-form-field class="ml-xs example-full-width">
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
<input matInput placeholder="Description of the Assets" formControlName="any_other_assets" required>
|
<input matInput placeholder="Description of the Assets" formControlName="any_other_assets" required>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
|
<input matInput placeholder="Value of the Assets" formControlName="any_other_asset_value" required>
|
||||||
|
</mat-form-field>
|
||||||
|
<!-- <mat-form-field class="ml-xs example-full-width"> -->
|
||||||
|
<!-- <input matInput placeholder="Is Any Loan" formControlName="any_other_asset_loan" required> -->
|
||||||
|
<!-- </mat-form-field> -->
|
||||||
|
<mat-form-field class="ml-xs example-full-width">
|
||||||
|
<mat-select placeholder="Is there any asset loan?" formControlName="any_other_asset_loan" required>
|
||||||
|
<mat-option value="yes">Yes</mat-option>
|
||||||
|
<mat-option value="no">No</mat-option>
|
||||||
|
<mat-option value="nan">NAN</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field class="ml-xs example-full-width" *ngIf="detail.get(any_other_asset_loan).value == 'yes'">
|
||||||
|
<input matInput placeholder="What is the EMI amount ?" formControlName="other_asset_emi_amt">
|
||||||
|
<span matSuffix>.00</span>
|
||||||
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -222,7 +249,7 @@
|
|||||||
</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" style="width:95%">
|
<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="Original Loan Tenure in Months" formControlName="elapsed_tenure">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33" style="width:95%">
|
<div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33" style="width:95%">
|
||||||
|
|||||||
@ -365,7 +365,8 @@ public m_investmentType = [];
|
|||||||
|
|
||||||
loadProperty() {
|
loadProperty() {
|
||||||
return this._formBuilder.group({
|
return this._formBuilder.group({
|
||||||
property_type: ['', Validators.compose([Validators.required])]
|
property_type: ['', Validators.compose([Validators.required])],
|
||||||
|
other_property_type: ['']
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -383,7 +384,11 @@ public m_investmentType = [];
|
|||||||
|
|
||||||
otherAssetsDescription() {
|
otherAssetsDescription() {
|
||||||
return this._formBuilder.group({
|
return this._formBuilder.group({
|
||||||
any_other_assets: ['', Validators.compose([Validators.required])]
|
any_other_assets: ['', Validators.compose([Validators.required])],
|
||||||
|
any_other_asset_value : [''],
|
||||||
|
any_other_asset_loan : [''],
|
||||||
|
other_asset_emi_amt : ['']
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -400,6 +405,7 @@ public m_investmentType = [];
|
|||||||
loadInvestDescription() {
|
loadInvestDescription() {
|
||||||
return this._formBuilder.group({
|
return this._formBuilder.group({
|
||||||
investments_type: ['', Validators.compose([Validators.required])],
|
investments_type: ['', Validators.compose([Validators.required])],
|
||||||
|
other_investment_type:[''],
|
||||||
amount_of_invest: ['', Validators.compose([Validators.required])],
|
amount_of_invest: ['', Validators.compose([Validators.required])],
|
||||||
bank_name: ['', Validators.compose([Validators.required])]
|
bank_name: ['', Validators.compose([Validators.required])]
|
||||||
});
|
});
|
||||||
@ -440,6 +446,9 @@ 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])],
|
||||||
|
any_other_asset_value : [data.any_other_asset_value],
|
||||||
|
any_other_asset_loan : [data.any_other_asset_loan],
|
||||||
|
other_asset_emi_amt : [data.other_asset_emi_amt]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -456,6 +465,7 @@ public m_investmentType = [];
|
|||||||
loadInvestDescriptionWithData(data) {
|
loadInvestDescriptionWithData(data) {
|
||||||
return this._formBuilder.group({
|
return this._formBuilder.group({
|
||||||
investments_type: [data.investments_type, Validators.compose([Validators.required])],
|
investments_type: [data.investments_type, Validators.compose([Validators.required])],
|
||||||
|
other_investment_type : [data.other_investment_type],
|
||||||
amount_of_invest: [data.amount_of_invest, Validators.compose([Validators.required])],
|
amount_of_invest: [data.amount_of_invest, Validators.compose([Validators.required])],
|
||||||
bank_name: [data.bank_name, Validators.compose([Validators.required])]
|
bank_name: [data.bank_name, Validators.compose([Validators.required])]
|
||||||
});
|
});
|
||||||
|
|||||||
@ -28,13 +28,13 @@
|
|||||||
<input matInput placeholder="Loan Amount" formControlName="loan_amount" (keypress)="keyPress($event)" required>
|
<input matInput placeholder="Loan Amount" formControlName="loan_amount" (keypress)="keyPress($event)" required>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select (selectionChange)="selectedfrequency($event,i)" placeholder="Frequency"
|
<mat-select (selectionChange)="selectedfrequency($event.value,i)" placeholder="Frequency"
|
||||||
formControlName="frequency" required>
|
formControlName="frequency" required>
|
||||||
<mat-option *ngFor="let freq of frequencyData" value="{{freq.frequency_id}}">{{freq.name}}</mat-option>
|
<mat-option *ngFor="let freq of frequencyData" value="{{freq.frequency_id}}">{{freq.name}}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput [placeholder]="placeholderName != '' && IDXval == i ? placeholderName :'Instalment Amount' " formControlName="emi" (keypress)="keyPress($event)" required>
|
<input matInput [placeholder]="placeholderName[i] != '' ? placeholderName[i] : 'Instalment Amount' " formControlName="emi" (keypress)="keyPress($event)" required>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Loan Type" formControlName="loan_type" required>
|
<input matInput placeholder="Loan Type" formControlName="loan_type" required>
|
||||||
|
|||||||
@ -37,7 +37,7 @@ export class CurrentLoanComponent implements OnInit {
|
|||||||
lenderData: any = [];
|
lenderData: any = [];
|
||||||
frequencyData: any = [];
|
frequencyData: any = [];
|
||||||
applicants: any;
|
applicants: any;
|
||||||
placeholderName : any;
|
placeholderName : any = [];
|
||||||
holder: any = 'amount';
|
holder: any = 'amount';
|
||||||
IDXval : any;
|
IDXval : any;
|
||||||
|
|
||||||
@ -68,8 +68,9 @@ export class CurrentLoanComponent implements OnInit {
|
|||||||
return value.records.loan_details[key];
|
return value.records.loan_details[key];
|
||||||
});
|
});
|
||||||
if (result.length > 0) {
|
if (result.length > 0) {
|
||||||
result.forEach(val => {
|
result.forEach((val,index) => {
|
||||||
control.push(this.createLoanDetail());
|
control.push(this.createLoanDetail());
|
||||||
|
this.selectedfrequency(val.frequency,index);
|
||||||
});
|
});
|
||||||
this.currentLoanForm.controls['loan_details'].setValue(result);
|
this.currentLoanForm.controls['loan_details'].setValue(result);
|
||||||
} else {
|
} else {
|
||||||
@ -100,21 +101,16 @@ export class CurrentLoanComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
selectedfrequency(e,i){
|
selectedfrequency(e,i){
|
||||||
// console.log(+e.value);
|
|
||||||
// console.log(i);
|
|
||||||
|
|
||||||
|
switch(+e){
|
||||||
this.IDXval = i;
|
case 1: this.placeholderName[i] = 'Weekly Instalment Amount'; break;
|
||||||
|
case 2: this.placeholderName[i] = 'Daily Instalment Amount'; break;
|
||||||
switch(+e.value){
|
case 3: this.placeholderName[i] = 'Annual Instalment Amount'; break;
|
||||||
case 1: this.placeholderName = 'Weekly Installment Amount'; break;
|
case 4: this.placeholderName[i] = 'Hourly Instalment Amount'; break;
|
||||||
case 2: this.placeholderName = 'Daily Installment Amount'; break;
|
case 5: this.placeholderName[i] = 'EMI Amount'; break;
|
||||||
case 3: this.placeholderName = 'Annual Installment Amount'; break;
|
case 6: this.placeholderName[i] = 'Quarterly Instalment Amount'; break;
|
||||||
case 4: this.placeholderName = 'Hourly Installment Amount'; break;
|
case 7: this.placeholderName[i] = 'Halfyearly Instalment Amount'; break;
|
||||||
case 5: this.placeholderName = 'EMI Amount'; break;
|
default : this.placeholderName[i] = ''; break;
|
||||||
case 6: this.placeholderName = 'Quarterly Installment Amount'; break;
|
|
||||||
case 7: this.placeholderName = 'HalfYearly Installment Amount'; break;
|
|
||||||
default : this.placeholderName = ''; break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -51,6 +51,7 @@ export class FamilyDetailsComponent implements OnInit {
|
|||||||
customerSegData: any = [];
|
customerSegData: any = [];
|
||||||
// earnMemberArrCount :any ;
|
// earnMemberArrCount :any ;
|
||||||
// nonEarnMemberArrCount :any ;
|
// nonEarnMemberArrCount :any ;
|
||||||
|
count : number;
|
||||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private _pd: PdTrigerService) {
|
private _pd: PdTrigerService) {
|
||||||
@ -174,15 +175,16 @@ export class FamilyDetailsComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
addMembers() {
|
addMembers() {
|
||||||
const control = <FormArray>this.familyForm.controls['nonEarningMembers'];
|
const control = <FormArray>this.familyForm.controls['nonEarningMembers'];
|
||||||
|
this.count++;
|
||||||
// this.nonEarnMemberArrCount = control.length;
|
// this.nonEarnMemberArrCount = control.length;
|
||||||
// console.log(this.earnMemberArrCount);
|
// console.log(this.earnMemberArrCount);
|
||||||
// console.log(this.nonEarnMemberArrCount);
|
// console.log(this.nonEarnMemberArrCount);
|
||||||
if(control.length == this.familyForm.controls['members'].value)
|
// if(control.length == this.familyForm.controls['members'].value)
|
||||||
{
|
// {
|
||||||
|
|
||||||
}else{
|
// }else{
|
||||||
control.push(this.createNonMembers());
|
// control.push(this.createNonMembers());
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -80,15 +80,17 @@
|
|||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="EMI Comfort Level" formControlName="emi_level" (keypress)="keyPress($event)" required>
|
<input matInput placeholder="EMI Comfort Level" formControlName="emi_level" (keypress)="keyPress($event)" required>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<!-- <div *ngIf="productAbbr === 'HL' || productAbbr === 'LL' || productAbbr === 'LAP' "> -->
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card-header>
|
<mat-card-header *ngIf="loanDetailsForm.controls['source'].value =='other'" >
|
||||||
<p>Mortgage
|
<p>Mortgage
|
||||||
<p>
|
<p>
|
||||||
|
<!-- {{m_mortageTypeProperty | json}} -->
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content class="matcard">
|
<mat-card-content class="matcard">
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select placeholder="Type of Property" formControlName="property_type" required>
|
<mat-select placeholder="Type of Property" formControlName="property_type" required>
|
||||||
<mat-option *ngFor="let typeprop of m_mortageTypeProperty" [value]="typeprop.id">{{ typeprop.name }}</mat-option>
|
<mat-option *ngFor="let typeprop of m_mortageTypeProperty" [value]="typeprop.mortage_property_id">{{ typeprop.property_name }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
|
||||||
<!--<mat-select placeholder="Type of property" formControlName="property_type">
|
<!--<mat-select placeholder="Type of property" formControlName="property_type">
|
||||||
@ -108,7 +110,7 @@
|
|||||||
<mat-option value="others">Others</mat-option>
|
<mat-option value="others">Others</mat-option>
|
||||||
</mat-select>-->
|
</mat-select>-->
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field *ngIf="loanDetailsForm.controls['property_type'].value =='others'">
|
<mat-form-field *ngIf="loanDetailsForm.controls['property_type'].value == 'others'">
|
||||||
<input matInput placeholder="Specify Type of Property" formControlName="ownershipOther">
|
<input matInput placeholder="Specify Type of Property" formControlName="ownershipOther">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
@ -149,6 +151,7 @@
|
|||||||
</mat-form-field> -->
|
</mat-form-field> -->
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
<!-- </div> -->
|
||||||
<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%">
|
||||||
|
|||||||
@ -35,8 +35,10 @@ export class LoanDetailsComponent implements OnInit {
|
|||||||
@Input() form_id: number;
|
@Input() form_id: number;
|
||||||
@Input() applicant_details: any;
|
@Input() applicant_details: any;
|
||||||
applicants: any;
|
applicants: any;
|
||||||
|
productAbbr: any;
|
||||||
isOtherPurpose: boolean = false;
|
isOtherPurpose: boolean = false;
|
||||||
isSource: boolean = false;
|
isSource: boolean = false;
|
||||||
|
mortageCheck : boolean = true;
|
||||||
endUserList: any = [];
|
endUserList: any = [];
|
||||||
ownerNames: any = [];
|
ownerNames: any = [];
|
||||||
m_endUseofLoad = [];
|
m_endUseofLoad = [];
|
||||||
@ -62,6 +64,7 @@ export class LoanDetailsComponent implements OnInit {
|
|||||||
console.log(this.applicant_details.pdapplicants_detials);
|
console.log(this.applicant_details.pdapplicants_detials);
|
||||||
console.log(this.applicant_details);
|
console.log(this.applicant_details);
|
||||||
this.applicants = this.applicant_details.pdapplicants_detials;
|
this.applicants = this.applicant_details.pdapplicants_detials;
|
||||||
|
this.productAbbr = this.applicant_details.pdmaster_details.product_abbr;
|
||||||
|
|
||||||
this.initloanDetailsForm();
|
this.initloanDetailsForm();
|
||||||
this.getM_EndUseofLoad();
|
this.getM_EndUseofLoad();
|
||||||
@ -73,6 +76,7 @@ export class LoanDetailsComponent implements OnInit {
|
|||||||
params.pd_id = this.pdid;
|
params.pd_id = this.pdid;
|
||||||
params.pd_form_id = this.form_id;
|
params.pd_form_id = this.form_id;
|
||||||
this._pd.retriveForm(params).subscribe(value => {
|
this._pd.retriveForm(params).subscribe(value => {
|
||||||
|
// *ngIf="productAbbr === 'HL' || productAbbr === 'LL' || productAbbr === 'LAP' "
|
||||||
console.log('value', value);
|
console.log('value', value);
|
||||||
if (value.status == 200) {
|
if (value.status == 200) {
|
||||||
let result = Object.keys(value.records.end_use_group).map(function(key) {
|
let result = Object.keys(value.records.end_use_group).map(function(key) {
|
||||||
@ -169,9 +173,13 @@ getM_sourceofamount() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getM_MortageTypeProperty() {
|
getM_MortageTypeProperty() {
|
||||||
this._pd.getAllMasterDatas('MORTAGEPROPERTYTYPE').subscribe(
|
// this._pd.getAllMasterDatas('MORTAGEPROPERTYTYPE').subscribe(
|
||||||
|
this._pd.getAllMasterDatas('MORTAGEPROPERTIES').subscribe(
|
||||||
data => {
|
data => {
|
||||||
|
console.log('sadfdfads',this.productAbbr);
|
||||||
this.m_mortageTypeProperty = data.records.filter(data => data.isactive == 1);
|
this.m_mortageTypeProperty = data.records.filter(data => data.isactive == 1);
|
||||||
|
this.m_mortageTypeProperty = data.records.filter(data => data.group == this.productAbbr);
|
||||||
|
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
// this.notifier.notify('warning', 'No Category Records Found.!');
|
// this.notifier.notify('warning', 'No Category Records Found.!');
|
||||||
@ -203,7 +211,7 @@ getM_sourceofamount() {
|
|||||||
// ==================
|
// ==================
|
||||||
public initloanDetailsForm(): void {
|
public initloanDetailsForm(): void {
|
||||||
this.loanDetailsForm = this.fb.group({
|
this.loanDetailsForm = this.fb.group({
|
||||||
loan_amount: ['', Validators.compose([Validators.required])],
|
loan_amount: [this.applicant_details.loan_amount, Validators.compose([Validators.required])],
|
||||||
end_use: ['', Validators.compose([Validators.required])],
|
end_use: ['', Validators.compose([Validators.required])],
|
||||||
end_use_other: [''],
|
end_use_other: [''],
|
||||||
is_transfer: ['', Validators.compose([Validators.required])],
|
is_transfer: ['', Validators.compose([Validators.required])],
|
||||||
|
|||||||
@ -66,14 +66,17 @@
|
|||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-select placeholder="Source"
|
<mat-select placeholder="Source"
|
||||||
formControlName="source" required>
|
formControlName="source" required>
|
||||||
<mat-option value="rental_income">Rental Income</mat-option>
|
|
||||||
|
<mat-option value="{{src.id}}" *ngFor="let src of sourceData">{{src.name}}</mat-option>
|
||||||
|
|
||||||
|
<!-- <mat-option value="rental_income">Rental Income</mat-option>
|
||||||
<mat-option value="interest_income">Interest Income</mat-option>
|
<mat-option value="interest_income">Interest Income</mat-option>
|
||||||
<mat-option value="agricultural_income">Agricultural Income</mat-option>
|
<mat-option value="agricultural_income">Agricultural Income</mat-option>
|
||||||
<mat-option value="dividend_income">Dividend Income</mat-option>
|
<mat-option value="dividend_income">Dividend Income</mat-option>
|
||||||
<mat-option value="others">Others</mat-option>
|
<mat-option value="others">Others</mat-option> -->
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field *ngIf="details.get('source').value == 'others'">
|
<mat-form-field *ngIf="details.get('source').value == 5 ">
|
||||||
<input matInput placeholder="Specify Others Source"
|
<input matInput placeholder="Specify Others Source"
|
||||||
formControlName="others_source">
|
formControlName="others_source">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|||||||
@ -34,6 +34,7 @@ export class OtherIncomeComponent implements OnInit {
|
|||||||
public otherIncomeForm: FormGroup;
|
public otherIncomeForm: FormGroup;
|
||||||
private notifier: NotifierService;
|
private notifier: NotifierService;
|
||||||
frequencyData: any = [];
|
frequencyData: any = [];
|
||||||
|
sourceData : any = [];
|
||||||
|
|
||||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
@ -42,6 +43,7 @@ export class OtherIncomeComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getFrequency();
|
this.getFrequency();
|
||||||
|
this.getSourceOtherIncome();
|
||||||
this.initOtherincomeForm();
|
this.initOtherincomeForm();
|
||||||
let params: any = {};
|
let params: any = {};
|
||||||
params.pd_id = this.pdid;
|
params.pd_id = this.pdid;
|
||||||
@ -110,6 +112,17 @@ export class OtherIncomeComponent implements OnInit {
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
getSourceOtherIncome() {
|
||||||
|
let master_name = 'SOURCEOFOTHERINCOME';
|
||||||
|
this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
||||||
|
console.log('data', data);
|
||||||
|
data.records.forEach(val => {
|
||||||
|
if (val.isactive == 1) {
|
||||||
|
this.sourceData.push(val);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
addIncomeDetails() {
|
addIncomeDetails() {
|
||||||
const control = <FormArray>this.otherIncomeForm.controls['income_details'];
|
const control = <FormArray>this.otherIncomeForm.controls['income_details'];
|
||||||
control.push(this.createDetail());
|
control.push(this.createDetail());
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<mat-card style="padding: 12px;">
|
<mat-card style="padding: 12px;">
|
||||||
<p>Stock Details</p>
|
<p>Stock Details</p>
|
||||||
<form [formGroup]="stockForm" class="address">
|
<form [formGroup]="stockForm" class="address">
|
||||||
|
<!-- {{uomData | json}} -->
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<p>Raw Materials<p>
|
<p>Raw Materials<p>
|
||||||
@ -13,9 +13,26 @@
|
|||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<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-select placeholder="is the Stock is Observed ?"
|
||||||
|
formControlName="stock_observed" required>
|
||||||
|
<mat-option value="yes" >Yes</mat-option>
|
||||||
|
<mat-option value="no" >No</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<div *ngIf="details.get('stock_observed').value == 'no'" >
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Estimated Quantity" formControlName="raw_quantity" required>
|
<input matInput placeholder="Estimated Quantity" formControlName="raw_quantity" required>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<mat-select placeholder="Unit of Mearsurement"
|
||||||
|
formControlName="raw_uom" required>
|
||||||
|
<mat-option value="{{uom.uom_id}}" *ngFor="let uom of uomData">{{uom.name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field *ngIf="details.get('raw_uom').value == 61" >
|
||||||
|
<input matInput placeholder="Specify Other UOM" formControlName="other_uom" required>
|
||||||
|
</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>
|
||||||
@ -25,6 +42,7 @@
|
|||||||
<mat-form-field style="width:76%">
|
<mat-form-field style="width:76%">
|
||||||
<input matInput placeholder="Is the stock of raw materials observed ?" 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>
|
||||||
|
</div>
|
||||||
|
|
||||||
<button type="button" mat-raised-button mat-icon-button (click)="addRawMaterials()"
|
<button type="button" mat-raised-button mat-icon-button (click)="addRawMaterials()"
|
||||||
matTooltip="Add More Raw Materials" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="i==0">
|
matTooltip="Add More Raw Materials" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="i==0">
|
||||||
|
|||||||
@ -22,6 +22,7 @@ import {
|
|||||||
/** Service */
|
/** Service */
|
||||||
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
||||||
import {ActivatedRoute, Router} from '@angular/router';
|
import {ActivatedRoute, Router} from '@angular/router';
|
||||||
|
import { analyzeAndValidateNgModules } from '@angular/compiler';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-stock',
|
selector: 'app-stock',
|
||||||
@ -33,7 +34,9 @@ export class StockComponent implements OnInit {
|
|||||||
@Input() form_id: number;
|
@Input() form_id: number;
|
||||||
public stockForm: FormGroup;
|
public stockForm: FormGroup;
|
||||||
private notifier: NotifierService;
|
private notifier: NotifierService;
|
||||||
|
public uomData : any = [];
|
||||||
|
rawmaterial : any;
|
||||||
|
|
||||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private _pd: PdTrigerService) {
|
private _pd: PdTrigerService) {
|
||||||
@ -41,9 +44,26 @@ export class StockComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.initstockForm();
|
this.initstockForm();
|
||||||
|
this.getUOM();
|
||||||
|
this.setSku('data',0);
|
||||||
let params: any = {};
|
let params: any = {};
|
||||||
params.pd_id = this.pdid;
|
params.pd_id = this.pdid;
|
||||||
params.pd_form_id = this.form_id;
|
params.pd_form_id = this.form_id;
|
||||||
|
|
||||||
|
this._pd.retriveForm({pd_id:this.pdid,pd_form_id:'1'}).subscribe(value => {
|
||||||
|
console.log('Raw material Name',value.records.main_raw_materials);
|
||||||
|
|
||||||
|
|
||||||
|
// const faControl = (<FormArray>this.stockForm.controls['raw_materials']).at(1);
|
||||||
|
|
||||||
|
const control = (<FormArray>this.stockForm.controls['raw_materials']).at(0);
|
||||||
|
console.log(control);
|
||||||
|
|
||||||
|
// this.stockForm.controls['raw_materials'].setValue(value.records.main_raw_materials);
|
||||||
|
if (value.status == 200) {
|
||||||
|
this.rawmaterial = value.records.main_raw_materials;
|
||||||
|
}else{ this.rawmaterial = ''; }
|
||||||
|
})
|
||||||
this._pd.retriveForm(params).subscribe(value => {
|
this._pd.retriveForm(params).subscribe(value => {
|
||||||
console.log('value', value);
|
console.log('value', value);
|
||||||
const rawMaterial = <FormArray>this.stockForm.controls['raw_materials'];
|
const rawMaterial = <FormArray>this.stockForm.controls['raw_materials'];
|
||||||
@ -85,10 +105,18 @@ export class StockComponent implements OnInit {
|
|||||||
finished_goods: this.fb.array([])
|
finished_goods: this.fb.array([])
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
setSku(sku: string, index: number) {
|
||||||
|
// const faControl =
|
||||||
|
// (<FormArray>this.stockForm.controls['raw_materials']).at(index);
|
||||||
|
// faControl['controls'].raw_name.setValue(sku);
|
||||||
|
}
|
||||||
createRawmaterial() {
|
createRawmaterial() {
|
||||||
return this.fb.group({
|
return this.fb.group({
|
||||||
raw_name: ['', Validators.compose([Validators.required])],
|
raw_name: ['', Validators.compose([Validators.required])],
|
||||||
|
stock_observed:['', Validators.compose([Validators.required])],
|
||||||
raw_quantity: ['', Validators.compose([Validators.required])],
|
raw_quantity: ['', Validators.compose([Validators.required])],
|
||||||
|
raw_uom: ['', Validators.compose([Validators.required])],
|
||||||
|
other_uom : [''],
|
||||||
raw_value: ['', Validators.compose([Validators.required])],
|
raw_value: ['', Validators.compose([Validators.required])],
|
||||||
rawmaterial_value: ['', Validators.compose([Validators.required])],
|
rawmaterial_value: ['', Validators.compose([Validators.required])],
|
||||||
is_sufficiant_raw: ['', Validators.compose([Validators.required])],
|
is_sufficiant_raw: ['', Validators.compose([Validators.required])],
|
||||||
@ -148,6 +176,17 @@ export class StockComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
getUOM() {
|
||||||
|
this._pd.getAllMasterDatas('UOM').subscribe(data => {
|
||||||
|
|
||||||
|
data.records.forEach(val => {
|
||||||
|
if (val.isactive == 1) {
|
||||||
|
this.uomData.push(val);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** On Key Press Event For Numbers */
|
/** On Key Press Event For Numbers */
|
||||||
keyPress(event: any) {
|
keyPress(event: any) {
|
||||||
const pattern = /[0-9]/;
|
const pattern = /[0-9]/;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user