This commit is contained in:
saravanakumarkandasami 2018-11-15 12:59:01 +05:30
commit 24ac686aba
2 changed files with 85 additions and 7 deletions

View File

@ -4,7 +4,10 @@
<input matInput placeholder="Loan Amount applied" formControlName="loan_amount">
</mat-form-field>
<mat-form-field>
<mat-select multiple placeholder="What is the end use"
<mat-select multiple (selectionChange)="endUserChange($event)" placeholder="What is the end use" formControlName="end_use">
<mat-option *ngFor="let enduse of m_endUseofLoad" [value]="enduse.id">{{ enduse.name }}</mat-option>
</mat-select>
<!--<mat-select multiple placeholder="What is the end use"
formControlName="end_use" (selectionChange)="endUserChange($event)">
<mat-option value="purchase_of_property"> Puchase of property</mat-option>
<mat-option value="construction">Construction</mat-option>
@ -14,7 +17,7 @@
<mat-option value="purchase_of_business_asset">Purchase of business asset</mat-option>
<mat-option value="to_close_an_existing_debt">to close an existing debt</mat-option>
<mat-option value="other">Other purpose</mat-option>
</mat-select>
</mat-select>-->
</mat-form-field>
<mat-form-field *ngIf="isOtherPurpose">
<input matInput placeholder="Specify end use" formControlName="end_use_other">
@ -47,12 +50,16 @@
</mat-form-field>
<mat-form-field>
<mat-select placeholder="Source"
<mat-select placeholder="Source" formControlName="source">
<mat-option *ngFor="let sour of m_sourceofamount" [value]="sour.id">{{ sour.name }}</mat-option>
</mat-select>
<!--<mat-select placeholder="Source"
formControlName="source">
<mat-option value="borrowed">Borrowed from Relatives & Friends</mat-option>
<mat-option value="own_money">Own money</mat-option>
<mat-option value="other">Loan from another lender</mat-option>
</mat-select>
</mat-select>-->
</mat-form-field>
<mat-form-field *ngIf="loanDetailsForm.controls['source'].value =='other'">
<input matInput placeholder="Specify lender name and type" formControlName="lender_name_type">
@ -68,6 +75,10 @@
<mat-card-content class="matcard">
<mat-form-field>
<mat-select placeholder="Type of property" formControlName="property_type">
<mat-option *ngFor="let typeprop of m_mortageTypeProperty" [value]="typeprop.id">{{ typeprop.name }}</mat-option>
</mat-select>
<!--<mat-select placeholder="Type of property" formControlName="property_type">
<mat-option value="bungalow">Bungalow</mat-option>
<mat-option value="flat">Flat</mat-option>
<mat-option value="row_house">Row House</mat-option>
@ -82,7 +93,7 @@
<mat-option value="factory">Factory</mat-option>
<mat-option value="vacant_land">Vacant Land</mat-option>
<mat-option value="others">Others</mat-option>
</mat-select>
</mat-select>-->
</mat-form-field>
<mat-form-field *ngIf="loanDetailsForm.controls['property_type'].value =='others'">
<input matInput placeholder="Please specify type of property" formControlName="ownershipOther">
@ -94,12 +105,17 @@
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="Status of construction"
<mat-select placeholder="Status of construction" formControlName="construction_status">
<mat-option *ngFor="let status of m_statusofCunstruction" [value]="status.id">{{ status.name }}</mat-option>
</mat-select>
<!--<mat-select placeholder="Status of construction"
formControlName="construction_status">
<mat-option value="other_purpose">Under-construction</mat-option>
<mat-option value="other_purpose">Complete</mat-option>
<mat-option value="other_purpose">Vacant Land</mat-option>
</mat-select>
</mat-select>-->
</mat-form-field>
<mat-form-field>

View File

@ -39,6 +39,10 @@ export class LoanDetailsComponent implements OnInit {
isSource: boolean = false;
endUserList: any = [];
ownerNames: any = [];
m_endUseofLoad = [];
m_sourceofamount = [];
m_mortageTypeProperty = [];
m_statusofCunstruction = [];
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
private router: Router,
private _pd: PdTrigerService) {
@ -48,6 +52,10 @@ export class LoanDetailsComponent implements OnInit {
ngOnInit() {
this.applicants = this.applicant_details.pdapplicants_detials;
this.initloanDetailsForm();
this.getM_EndUseofLoad();
this.getM_sourceofamount();
this.getM_MortageTypeProperty();
this.getM_StatusofCunstruction();
let params: any = {};
params.pd_id = this.pdid;
params.pd_form_id = this.form_id;
@ -102,6 +110,60 @@ export class LoanDetailsComponent implements OnInit {
}
})
}
// =============
getM_EndUseofLoad() {
this._pd.getAllMasterDatas('ENDUSEOFLOAN').subscribe(
data => {
this.m_endUseofLoad = data.records.filter(data => data.isactive == 1);
},
error => {
// this.notifier.notify('warning', 'No Category Records Found.!');
// this.m_assets_type = "No Category Records Found.";
}
)
}
getM_sourceofamount() {
this._pd.getAllMasterDatas('SOURCEOFBALANCETRANSFER').subscribe(
data => {
this.m_sourceofamount = data.records.filter(data => data.isactive == 1);
},
error => {
// this.notifier.notify('warning', 'No Category Records Found.!');
// this.m_assets_type = "No Category Records Found.";
}
)
}
getM_MortageTypeProperty() {
this._pd.getAllMasterDatas('MORTAGEPROPERTYTYPE').subscribe(
data => {
this.m_mortageTypeProperty = data.records.filter(data => data.isactive == 1);
},
error => {
// this.notifier.notify('warning', 'No Category Records Found.!');
// this.m_assets_type = "No Category Records Found.";
}
)
}
getM_StatusofCunstruction() {
this._pd.getAllMasterDatas('STATUSOFCONSTRUCTION').subscribe(
data => {
this.m_statusofCunstruction = data.records.filter(data => data.isactive == 1);
},
error => {
// this.notifier.notify('warning', 'No Category Records Found.!');
// this.m_assets_type = "No Category Records Found.";
}
)
}
// ==================
public initloanDetailsForm(): void {
this.loanDetailsForm = this.fb.group({
loan_amount: ['', Validators.compose([Validators.required])],