review changes : ps

This commit is contained in:
venbatechnologies@gmail.com 2018-12-03 17:48:55 +05:30
parent 5b6c588083
commit f26e1d5c47
14 changed files with 187 additions and 55 deletions

View File

@ -7,8 +7,7 @@
</div>
<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 fxFlex.gt-sm="25" fxFlex="100">
<mat-form-field class="example-full-width">
@ -46,7 +45,7 @@
<!-- <pre> Full - {{doughnutChartDataForFullPD}} Smart -{{doughnutChartDataForSmartPD}} TELE -{{doughnutChartDataForTelePD}} </pre> -->
<mat-card-content>
<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"
height="280px" width="280px"
[data]="doughnutChartDataForFullPD"
@ -58,7 +57,7 @@
<div *ngIf="total1 != 0" class="donut-inner"><span>Full - {{total1}}</span></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"
height="280px" width="280px"
[data]="doughnutChartDataForSmartPD"
@ -69,7 +68,7 @@
[chartType]="doughnutChartType"></canvas>
<div *ngIf="total2 != 0" class="donut-inner"><span>Smart - {{total2}}</span></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"
height="280px" width="280px"
[data]="doughnutChartDataForTelePD"
@ -81,7 +80,7 @@
<div *ngIf="total3 != 0" class="donut-inner"><span>Tele - {{total3}}</span></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">
<ul class="lengend-list">
<li class="lengend-element"><span class="oval" style="background-color:#c1c1c1"> &nbsp;&nbsp;&nbsp;&nbsp; </span>&nbsp; Draft</li>

View File

@ -2,10 +2,14 @@ $red: #f5515f;
$blue: #05abe0;
$grey: #343434;
$p: 12px;
::ng-deep .ngx-mat-drp-date-input{text-overflow:ellipsis !important;color:#fff !important;}
mat-card-title{
background-color:#E00201 !important;
color:#fff;
}
.mat-input-wrapper {
background: #fff;
}
@ -25,10 +29,10 @@ li
border-radius: 50%;
}
.ngx-mat-drp-date-input[_ngcontent-c17] {
text-overflow: ellipsis;
color: #fff;
}
// .ngx-mat-drp-date-input[_ngcontent-c17] {
// text-overflow: ellipsis;
// color: #fff;
// }
//.lengend-list {
// list-style-type: none;
@ -57,7 +61,6 @@ li
.donut-inner span{
font-size:1rems;
}
mat-card-content{
min-height: 400px;

View File

@ -48,6 +48,7 @@ export class DashboardComponent {
total2: number = 0;
total3: number = 0;
flag : number = 0;
evt:Range
// doughnutChartColors: any[] = [{
// backgroundColor: ['#f44336', '#3f51b5', '#ffeb3b', '#4caf50', '#2196f3','#673ab7']
@ -134,7 +135,7 @@ export class DashboardComponent {
this.options = {
presets: this.presets,
format: 'mediumDate',
range: {fromDate:FirstDateForPreMonth, toDate: fromMax},
range: {fromDate: today, toDate: today},
applyLabel: "Submit",
calendarOverlayConfig: {
shouldCloseOnBackdropClick: false,
@ -150,7 +151,17 @@ export class DashboardComponent {
updateRange(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() {
@ -507,15 +518,15 @@ doughnutOptions: any = Object.assign({
// }
onChange(e :any,flag: any) {
onChange(e: any,flag: any) {
let fromdate;
let todate;
if(flag == 1){
fromdate = new Date(e.fromDate);
todate = new Date(e.toDate);
this.evt = e
fromdate = new Date(this.evt.fromDate);
todate = new Date(this.evt.toDate);
}

View File

@ -31,6 +31,11 @@
</mat-select>
</mat-form-field>
</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>
@ -146,14 +151,19 @@
</mat-select>
</mat-form-field>
</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">
<input matInput placeholder="Amount of Investment" formControlName="amount_of_invest" required (keypress)="keyPress($event)">
</mat-form-field>
</div>
<div fxFlex="33">
<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>
</div>
</div>
@ -170,6 +180,23 @@
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Description of the Assets" formControlName="any_other_assets" required>
</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>
@ -222,7 +249,7 @@
</div>
<div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33">
<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>
</div>
<div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33" style="width:95%">

View File

@ -365,7 +365,8 @@ public m_investmentType = [];
loadProperty() {
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() {
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() {
return this._formBuilder.group({
investments_type: ['', Validators.compose([Validators.required])],
other_investment_type:[''],
amount_of_invest: ['', Validators.compose([Validators.required])],
bank_name: ['', Validators.compose([Validators.required])]
});
@ -440,6 +446,9 @@ public m_investmentType = [];
otherAssetsDescriptionWithData(data) {
return this._formBuilder.group({
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) {
return this._formBuilder.group({
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])],
bank_name: [data.bank_name, Validators.compose([Validators.required])]
});

View File

@ -28,13 +28,13 @@
<input matInput placeholder="Loan Amount" formControlName="loan_amount" (keypress)="keyPress($event)" required>
</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>
<mat-option *ngFor="let freq of frequencyData" value="{{freq.frequency_id}}">{{freq.name}}</mat-option>
</mat-select>
</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>
<input matInput placeholder="Loan Type" formControlName="loan_type" required>

View File

@ -37,7 +37,7 @@ export class CurrentLoanComponent implements OnInit {
lenderData: any = [];
frequencyData: any = [];
applicants: any;
placeholderName : any;
placeholderName : any = [];
holder: any = 'amount';
IDXval : any;
@ -68,8 +68,9 @@ export class CurrentLoanComponent implements OnInit {
return value.records.loan_details[key];
});
if (result.length > 0) {
result.forEach(val => {
result.forEach((val,index) => {
control.push(this.createLoanDetail());
this.selectedfrequency(val.frequency,index);
});
this.currentLoanForm.controls['loan_details'].setValue(result);
} else {
@ -100,21 +101,16 @@ export class CurrentLoanComponent implements OnInit {
}
selectedfrequency(e,i){
// console.log(+e.value);
// console.log(i);
this.IDXval = i;
switch(+e.value){
case 1: this.placeholderName = 'Weekly Installment Amount'; break;
case 2: this.placeholderName = 'Daily Installment Amount'; break;
case 3: this.placeholderName = 'Annual Installment Amount'; break;
case 4: this.placeholderName = 'Hourly Installment Amount'; break;
case 5: this.placeholderName = 'EMI Amount'; break;
case 6: this.placeholderName = 'Quarterly Installment Amount'; break;
case 7: this.placeholderName = 'HalfYearly Installment Amount'; break;
default : this.placeholderName = ''; break;
switch(+e){
case 1: this.placeholderName[i] = 'Weekly Instalment Amount'; break;
case 2: this.placeholderName[i] = 'Daily Instalment Amount'; break;
case 3: this.placeholderName[i] = 'Annual Instalment Amount'; break;
case 4: this.placeholderName[i] = 'Hourly Instalment Amount'; break;
case 5: this.placeholderName[i] = 'EMI Amount'; break;
case 6: this.placeholderName[i] = 'Quarterly Instalment Amount'; break;
case 7: this.placeholderName[i] = 'Halfyearly Instalment Amount'; break;
default : this.placeholderName[i] = ''; break;
}
}

View File

@ -51,6 +51,7 @@ export class FamilyDetailsComponent implements OnInit {
customerSegData: any = [];
// earnMemberArrCount :any ;
// nonEarnMemberArrCount :any ;
count : number;
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
private router: Router,
private _pd: PdTrigerService) {
@ -174,15 +175,16 @@ export class FamilyDetailsComponent implements OnInit {
}
addMembers() {
const control = <FormArray>this.familyForm.controls['nonEarningMembers'];
this.count++;
// this.nonEarnMemberArrCount = control.length;
// console.log(this.earnMemberArrCount);
// console.log(this.nonEarnMemberArrCount);
if(control.length == this.familyForm.controls['members'].value)
{
// if(control.length == this.familyForm.controls['members'].value)
// {
}else{
control.push(this.createNonMembers());
}
// }else{
// control.push(this.createNonMembers());
// }
}

View File

@ -80,15 +80,17 @@
<mat-form-field>
<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>
<mat-card-header *ngIf="loanDetailsForm.controls['source'].value =='other'" >
<p>Mortgage
<p>
<!-- {{m_mortageTypeProperty | json}} -->
</mat-card-header>
<mat-card-content class="matcard">
<mat-form-field>
<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 placeholder="Type of property" formControlName="property_type">
@ -108,7 +110,7 @@
<mat-option value="others">Others</mat-option>
</mat-select>-->
</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">
</mat-form-field>
<mat-form-field>
@ -149,6 +151,7 @@
</mat-form-field> -->
</mat-card-content>
</mat-card>
<!-- </div> -->
<div fxLayout="row">
<div fxFlex="60" class="pb-0 text-sm-left">
<mat-form-field appearance="outline" style="width: 100%">

View File

@ -35,8 +35,10 @@ export class LoanDetailsComponent implements OnInit {
@Input() form_id: number;
@Input() applicant_details: any;
applicants: any;
productAbbr: any;
isOtherPurpose: boolean = false;
isSource: boolean = false;
mortageCheck : boolean = true;
endUserList: any = [];
ownerNames: any = [];
m_endUseofLoad = [];
@ -62,6 +64,7 @@ export class LoanDetailsComponent implements OnInit {
console.log(this.applicant_details.pdapplicants_detials);
console.log(this.applicant_details);
this.applicants = this.applicant_details.pdapplicants_detials;
this.productAbbr = this.applicant_details.pdmaster_details.product_abbr;
this.initloanDetailsForm();
this.getM_EndUseofLoad();
@ -73,6 +76,7 @@ export class LoanDetailsComponent implements OnInit {
params.pd_id = this.pdid;
params.pd_form_id = this.form_id;
this._pd.retriveForm(params).subscribe(value => {
// *ngIf="productAbbr === 'HL' || productAbbr === 'LL' || productAbbr === 'LAP' "
console.log('value', value);
if (value.status == 200) {
let result = Object.keys(value.records.end_use_group).map(function(key) {
@ -169,9 +173,13 @@ getM_sourceofamount() {
}
getM_MortageTypeProperty() {
this._pd.getAllMasterDatas('MORTAGEPROPERTYTYPE').subscribe(
// 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 == this.productAbbr);
},
error => {
// this.notifier.notify('warning', 'No Category Records Found.!');
@ -203,7 +211,7 @@ getM_sourceofamount() {
// ==================
public initloanDetailsForm(): void {
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_other: [''],
is_transfer: ['', Validators.compose([Validators.required])],

View File

@ -66,14 +66,17 @@
<mat-form-field>
<mat-select placeholder="Source"
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="agricultural_income">Agricultural 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-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"
formControlName="others_source">
</mat-form-field>

View File

@ -34,6 +34,7 @@ export class OtherIncomeComponent implements OnInit {
public otherIncomeForm: FormGroup;
private notifier: NotifierService;
frequencyData: any = [];
sourceData : any = [];
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
private router: Router,
@ -42,6 +43,7 @@ export class OtherIncomeComponent implements OnInit {
}
ngOnInit() {
this.getFrequency();
this.getSourceOtherIncome();
this.initOtherincomeForm();
let params: any = {};
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() {
const control = <FormArray>this.otherIncomeForm.controls['income_details'];
control.push(this.createDetail());

View File

@ -1,7 +1,7 @@
<mat-card style="padding: 12px;">
<p>Stock Details</p>
<form [formGroup]="stockForm" class="address">
<!-- {{uomData | json}} -->
<mat-card>
<mat-card-header>
<p>Raw Materials<p>
@ -13,9 +13,26 @@
<mat-form-field>
<input matInput placeholder="Name" formControlName="raw_name" required>
</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>
<input matInput placeholder="Estimated Quantity" formControlName="raw_quantity" required>
</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>
<input matInput placeholder="Value" formControlName="raw_value" (keypress)="keyPress($event)" required>
</mat-form-field>
@ -25,6 +42,7 @@
<mat-form-field style="width:76%">
<input matInput placeholder="Is the stock of raw materials observed ?" formControlName="is_sufficiant_raw" required>
</mat-form-field>
</div>
<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">

View File

@ -22,6 +22,7 @@ import {
/** Service */
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
import {ActivatedRoute, Router} from '@angular/router';
import { analyzeAndValidateNgModules } from '@angular/compiler';
@Component({
selector: 'app-stock',
@ -33,7 +34,9 @@ export class StockComponent implements OnInit {
@Input() form_id: number;
public stockForm: FormGroup;
private notifier: NotifierService;
public uomData : any = [];
rawmaterial : any;
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
private router: Router,
private _pd: PdTrigerService) {
@ -41,9 +44,26 @@ export class StockComponent implements OnInit {
}
ngOnInit() {
this.initstockForm();
this.getUOM();
this.setSku('data',0);
let params: any = {};
params.pd_id = this.pdid;
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 => {
console.log('value', value);
const rawMaterial = <FormArray>this.stockForm.controls['raw_materials'];
@ -85,10 +105,18 @@ export class StockComponent implements OnInit {
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() {
return this.fb.group({
raw_name: ['', Validators.compose([Validators.required])],
stock_observed:['', Validators.compose([Validators.required])],
raw_quantity: ['', Validators.compose([Validators.required])],
raw_uom: ['', Validators.compose([Validators.required])],
other_uom : [''],
raw_value: ['', Validators.compose([Validators.required])],
rawmaterial_value: ['', 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 */
keyPress(event: any) {
const pattern = /[0-9]/;