Fairoj: 3 Forms Merged
This commit is contained in:
parent
1860efb647
commit
621aae1bca
File diff suppressed because one or more lines are too long
2048
package-lock.json
generated
2048
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -69,8 +69,7 @@
|
||||
"description": "An Ionic project",
|
||||
"config": {
|
||||
"ionic_copy": "./config/copy.config.js",
|
||||
"ionic_bundler": "webpack",
|
||||
|
||||
"ionic_bundler": "webpack"
|
||||
},
|
||||
"cordova": {
|
||||
"plugins": {
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
platforms/android/.gradle/4.4/fileChanges/last-build.bin
Normal file
BIN
platforms/android/.gradle/4.4/fileChanges/last-build.bin
Normal file
Binary file not shown.
BIN
platforms/android/.gradle/4.4/fileHashes/fileHashes.bin
Normal file
BIN
platforms/android/.gradle/4.4/fileHashes/fileHashes.bin
Normal file
Binary file not shown.
BIN
platforms/android/.gradle/4.4/fileHashes/fileHashes.lock
Normal file
BIN
platforms/android/.gradle/4.4/fileHashes/fileHashes.lock
Normal file
Binary file not shown.
BIN
platforms/android/.gradle/4.4/taskHistory/taskHistory.bin
Normal file
BIN
platforms/android/.gradle/4.4/taskHistory/taskHistory.bin
Normal file
Binary file not shown.
BIN
platforms/android/.gradle/4.4/taskHistory/taskHistory.lock
Normal file
BIN
platforms/android/.gradle/4.4/taskHistory/taskHistory.lock
Normal file
Binary file not shown.
Binary file not shown.
@ -1,2 +1,2 @@
|
||||
#Sun Feb 17 13:36:54 IST 2019
|
||||
gradle.version=4.1
|
||||
#Mon Feb 18 14:01:47 IST 2019
|
||||
gradle.version=4.4
|
||||
|
||||
BIN
platforms/android/.gradle/buildOutputCleanup/outputFiles.bin
Normal file
BIN
platforms/android/.gradle/buildOutputCleanup/outputFiles.bin
Normal file
Binary file not shown.
Binary file not shown.
@ -0,0 +1,50 @@
|
||||
|
||||
// Ionicons Icon Font CSS
|
||||
// --------------------------
|
||||
// Ionicons CSS for Ionic's <ion-icon> element
|
||||
// ionicons-icons.scss has the icons and their unicode characters
|
||||
|
||||
$ionicons-font-path: $font-path !default;
|
||||
|
||||
@import "ionicons-icons";
|
||||
@import "ionicons-variables";
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: "Ionicons";
|
||||
src: url("#{$ionicons-font-path}/ionicons.woff2?v=#{$ionicons-version}") format("woff2"),
|
||||
url("#{$ionicons-font-path}/ionicons.woff?v=#{$ionicons-version}") format("woff"),
|
||||
url("#{$ionicons-font-path}/ionicons.ttf?v=#{$ionicons-version}") format("truetype");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
ion-icon {
|
||||
display: inline-block;
|
||||
|
||||
font-family: "Ionicons";
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
font-style: normal;
|
||||
font-variant: normal;
|
||||
font-weight: normal;
|
||||
line-height: 1;
|
||||
text-rendering: auto;
|
||||
text-transform: none;
|
||||
speak: none;
|
||||
|
||||
@include rtl() {
|
||||
&[aria-label^="arrow"]::before,
|
||||
&[flip-rtl]::before {
|
||||
transform: scaleX(-1);
|
||||
}
|
||||
|
||||
&[unflip-rtl]::before {
|
||||
transform: scaleX(1);
|
||||
}
|
||||
}
|
||||
|
||||
&::before {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
2630
platforms/android/app/src/main/assets/www/assets/fonts/ionicons.svg
Normal file
2630
platforms/android/app/src/main/assets/www/assets/fonts/ionicons.svg
Normal file
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 391 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,34 @@
|
||||
// Noto Sans Font
|
||||
// Google
|
||||
// Apache License, version 2.0
|
||||
// http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
$noto-sans-font-path: $font-path !default;
|
||||
|
||||
@font-face {
|
||||
font-family: "Noto Sans";
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: local("Noto Sans"), local("Noto-Sans-Regular"), url("#{$noto-sans-font-path}/noto-sans-regular.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-regular.ttf") format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Noto Sans";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local("Noto Sans"), local("Noto-Sans-Regular"), url("#{$noto-sans-font-path}/noto-sans-regular.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-regular.ttf") format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Noto Sans";
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
src: local("Noto Sans Bold"), local("Noto-Sans-Bold"), url("#{$noto-sans-font-path}/noto-sans-bold.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-bold.ttf") format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Noto Sans";
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: local("Noto Sans Bold"), local("Noto-Sans-Bold"), url("#{$noto-sans-font-path}/noto-sans-bold.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-bold.ttf") format("truetype");
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,34 @@
|
||||
// Roboto Font
|
||||
// Google
|
||||
// Apache License, version 2.0
|
||||
// http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
$roboto-font-path: $font-path !default;
|
||||
|
||||
@font-face {
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: local("Roboto Light"), local("Roboto-Light"), url("#{$roboto-font-path}/roboto-light.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-light.woff") format("woff"), url("#{$roboto-font-path}/roboto-light.ttf") format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local("Roboto"), local("Roboto-Regular"), url("#{$roboto-font-path}/roboto-regular.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-regular.woff") format("woff"), url("#{$roboto-font-path}/roboto-regular.ttf") format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
src: local("Roboto Medium"), local("Roboto-Medium"), url("#{$roboto-font-path}/roboto-medium.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-medium.woff") format("woff"), url("#{$roboto-font-path}/roboto-medium.ttf") format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: local("Roboto Bold"), local("Roboto-Bold"), url("#{$roboto-font-path}/roboto-bold.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-bold.woff") format("woff"), url("#{$roboto-font-path}/roboto-bold.ttf") format("truetype");
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
null
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -111,6 +111,10 @@ import { PdPipe } from '../pipes/pd/pd';
|
||||
import { PdQuestionAssessedBusinessIncomePage } from '../pages/pd-question/pd-question-assessed-business-income/pd-question-assessed-business-income';
|
||||
import { PdGeneralImagesPage } from '../pages/pd-general-images/pd-general-images';
|
||||
import { PdQuestionSalaryInfoPage } from '../pages/pd-question/pd-question-salary-info/pd-question-salary-info';
|
||||
import { DatabaseProvider } from '../providers/database/database'
|
||||
import { SQLite } from '@ionic-native/sqlite'
|
||||
import { AndroidPermissions } from '@ionic-native/android-permissions';
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
@ -251,7 +255,7 @@ import { PdQuestionSalaryInfoPage } from '../pages/pd-question/pd-question-salar
|
||||
],
|
||||
providers: [
|
||||
StatusBar,AwsServiceProvider,AuthGuard,TokenInterceptor,ToastProvider,
|
||||
ConstantsProvider,CognitoServiceProvider,SplashScreen,PdtriggerProvider,FingerprintAIO,
|
||||
ConstantsProvider,CognitoServiceProvider,SplashScreen,PdtriggerProvider,FingerprintAIO,SQLite,AndroidPermissions,
|
||||
{
|
||||
provide:HTTP_INTERCEPTORS,
|
||||
useClass: TokenInterceptor,
|
||||
@ -265,7 +269,8 @@ import { PdQuestionSalaryInfoPage } from '../pages/pd-question/pd-question-salar
|
||||
QuestionCategoryProvider,
|
||||
CameraProvider,Camera,
|
||||
PdPipe,
|
||||
LoadingProvider,Geolocation
|
||||
LoadingProvider,Geolocation,
|
||||
DatabaseProvider
|
||||
]
|
||||
})
|
||||
export class AppModule {}
|
||||
@ -83,6 +83,7 @@ pin:any;
|
||||
}
|
||||
setnewpin(newpin)
|
||||
{
|
||||
console.log("set Pin")
|
||||
this.aws.userpinupdate(newpin).subscribe(res=>
|
||||
{
|
||||
this.newpindetails = res;
|
||||
@ -95,11 +96,12 @@ pin:any;
|
||||
/**Finger print */
|
||||
|
||||
checkpin(pin) {
|
||||
console.log(pin);
|
||||
console.log("Check pin",pin);
|
||||
if(pin !='' && pin !=null)
|
||||
{
|
||||
if(this.userDetails[0].mpin == pin)
|
||||
{
|
||||
console.log("Entering List page")
|
||||
this.navCtrl.setRoot(PdListPage);
|
||||
}else
|
||||
{
|
||||
@ -115,6 +117,7 @@ pin:any;
|
||||
}
|
||||
checkfingerprint()
|
||||
{
|
||||
console.log("Check Finger");
|
||||
this.faio.show({
|
||||
clientId: 'Fingerprint-Demo',
|
||||
clientSecret: 'password', // Only Android
|
||||
|
||||
@ -37,6 +37,7 @@ export class PdListPage {
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public pdofficer:PdtriggerProvider,public shared:CognitoServiceProvider,public db:DatabaseProvider,public androidPermissions:AndroidPermissions) {
|
||||
//this.getlenderpddetails();
|
||||
// this.getpdTriggerdetails();
|
||||
console.log("Entered")
|
||||
}
|
||||
|
||||
ionViewDidLoad() {
|
||||
@ -47,6 +48,7 @@ export class PdListPage {
|
||||
}
|
||||
ionViewCanEnter()
|
||||
{
|
||||
console.log("Pd list ionViewCanEnter")
|
||||
this.getpdTriggerdetails();
|
||||
}
|
||||
filter(view){
|
||||
@ -107,7 +109,9 @@ export class PdListPage {
|
||||
}
|
||||
getpdTriggerdetails()
|
||||
{
|
||||
|
||||
let userid = this.aws.getlocale();
|
||||
console.log("User",userid)
|
||||
|
||||
this.pdofficer.getpddetails(userid).subscribe(res=>
|
||||
{
|
||||
|
||||
@ -62,26 +62,29 @@
|
||||
<button ion-button clear (click)="deletePartnerDetails(i)"><ion-icon style="font-size:22px" color="optblue" name="md-trash"></ion-icon></button>
|
||||
</ion-col>
|
||||
|
||||
<ion-col offset-1 col-1>
|
||||
<ion-col offset-1 col-2>
|
||||
<button *ngIf="l" ion-button clear (click)="addPartnerDetails($event)"><ion-icon style="font-size:24px" color="optblue" name="add-circle"></ion-icon></button>
|
||||
</ion-col>
|
||||
|
||||
</mat-expansion-panel>
|
||||
|
||||
</mat-accordion>
|
||||
</mat-accordion><br/>
|
||||
</div>
|
||||
<br/><div>
|
||||
<h4>Person RelationShip</h4><br/>
|
||||
<br/>
|
||||
|
||||
<div>
|
||||
|
||||
<div formArrayName="persons_with_relationships">
|
||||
<h4>Person RelationShip</h4><br/>
|
||||
<mat-accordion *ngFor="let person of businessForm.controls.persons_with_relationships['controls']; let i=index" [formGroupName]="i" >
|
||||
<mat-expansion-panel [expanded]="step == i" >
|
||||
<mat-expansion-panel-header>
|
||||
<!-- <mat-panel-title >{{person.get('family_member_name').value | titlecase}}</mat-panel-title> -->
|
||||
<mat-panel-title><h5>Person #{{i+1}}</h5></mat-panel-title>
|
||||
</mat-expansion-panel-header>
|
||||
|
||||
<mat-card-content>
|
||||
<mat-form-field >
|
||||
<mat-select formControlName="family_member_salutation">
|
||||
<mat-select formControlName="family_member_salutation" placeholder="Title">
|
||||
<mat-option [value]="title.title_id" *ngFor="let title of titleData">{{title.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@ -110,14 +113,15 @@
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<ion-col>
|
||||
</mat-card-content>
|
||||
<ion-col col-3 offset-3>
|
||||
<button float-right ion-button clear (click)="deletePersonRelationship(i)" ><ion-icon style="font-size:22px" color="optblue" name="md-trash"></ion-icon></button>
|
||||
</ion-col>
|
||||
</ion-col><br/>
|
||||
</mat-expansion-panel>
|
||||
</mat-accordion>
|
||||
</mat-accordion><br/>
|
||||
</div>
|
||||
<button ion-button block style="font-size: 13px;" color="optblue" (click)="addPersonRelationship($event)">Add More Family</button>
|
||||
</div>
|
||||
</div><br/>
|
||||
<mat-card>
|
||||
<mat-card-header>Type of Business Activity</mat-card-header>
|
||||
<mat-card-content formArrayName="select_business_activity_type">
|
||||
|
||||
@ -26,7 +26,7 @@ export class PdQuestionBusinessInfoPage {
|
||||
FormId: any;
|
||||
pdDetails: any;
|
||||
businessForm:FormGroup;
|
||||
applicants:any;
|
||||
applicants:any=[];
|
||||
businessEntityTypeList: any ={
|
||||
business_entity_type_id:String,
|
||||
business_entity_type_name:String,
|
||||
@ -68,6 +68,7 @@ export class PdQuestionBusinessInfoPage {
|
||||
this.users = this.aws.getlocale();
|
||||
//console.log("pd",this.pdDetails);
|
||||
this.applicants=this.pdDetails.applicat_details;
|
||||
console.log("Applicants",this.applicants)
|
||||
this.generalExistEntityType=this.pdDetails.business_entity_type
|
||||
this.generalExistEntityType_other=this.pdDetails.business_entity_type_other
|
||||
this.generalExistBusinessYear=this.pdDetails.business_years
|
||||
@ -116,6 +117,7 @@ export class PdQuestionBusinessInfoPage {
|
||||
|
||||
|
||||
})
|
||||
this.getdropdown();
|
||||
|
||||
// this.initBusinessForm();
|
||||
|
||||
@ -123,6 +125,7 @@ export class PdQuestionBusinessInfoPage {
|
||||
|
||||
ionViewDidLoad() {
|
||||
console.log('ionViewDidLoad PdQuestionBusinessInfoPage');
|
||||
this.getDetails();
|
||||
|
||||
|
||||
}
|
||||
@ -191,8 +194,7 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
|
||||
// console.log("data first23",data.records)
|
||||
this.stateList=data.records
|
||||
// console.log("stateListFun",this.stateList)
|
||||
this.getdropdown();
|
||||
this.getDetails();
|
||||
|
||||
});
|
||||
|
||||
|
||||
@ -636,6 +638,7 @@ this.qustCat.getStateCityDetails().subscribe(data=>{
|
||||
}
|
||||
else{
|
||||
Partnr.push(this.createPartners());
|
||||
control1.push(this.createRelationShip())
|
||||
|
||||
//otherDoc.push(this.createDocument());
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<button ion-button menuToggle>
|
||||
<ion-icon name="menu"></ion-icon>
|
||||
</button>
|
||||
<ion-title *ngIf="!viewchange">CurrentLoans Category</ion-title>
|
||||
|
||||
|
||||
|
||||
</ion-navbar>
|
||||
@ -16,49 +16,98 @@
|
||||
<form [formGroup]="currentLoans">
|
||||
<mat-card>
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Do you have any other existing Loan"
|
||||
<mat-label>Do you have any other Existing Loans</mat-label>
|
||||
<mat-select
|
||||
formControlName="existing_loan" (selectionChange)="exitsCheck($event.value)">
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</mat-card>
|
||||
<mat-card *ngIf="currentLoans.controls.existing_loan.value == 'Yes'">
|
||||
|
||||
<div *ngIf="currentLoans.controls.existing_loan.value == 'Yes'">
|
||||
<div formArrayName="loan_details">
|
||||
<div *ngFor="let details of currentLoans.get('loan_details').controls; let i=index;let last=last"
|
||||
[formGroupName]="i">
|
||||
<h5>Loan Details #{{i+1}}-{{details.get('label').value}}</h5>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Loan Type" formControlName="loan_type">
|
||||
<mat-option *ngFor="let types of loanTypeData" [value]="types.existing_loan_type_id">{{types.loan_type_name}}</mat-option>
|
||||
</mat-select>
|
||||
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="details.get('loan_type').value == 1 ">
|
||||
<input matInput placeholder="Specify Other Loan Type" formControlName="others_loan_type">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Loan Amount" formControlName="loan_amount">
|
||||
<input matInput type="number" placeholder="Loan Amount" formControlName="loan_amount" (keyup)="inWords($event,i,1)">
|
||||
<mat-hint align="end" *ngIf="details.get('loan_amount').value != '' ">{{"₹"}}{{amtInwords[i]}}only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Lender" formControlName="lender">
|
||||
<mat-option *ngFor="let btLen of lenderData" [value]="btLen.bt_lender_list_id">{{btLen.lender_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="details.get('lender').value == 3 ">
|
||||
<input matInput placeholder="Specify Lender" formControlName="others_lender">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Loan Taken By" formControlName="loan_taken_by" [compareWith]="compareObjects">
|
||||
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
||||
<mat-option [value]="val" *ngFor="let val of group.groupValues">{{val.name}}</mat-option>
|
||||
|
||||
</mat-optgroup>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="checkOthers(details.get('loan_taken_by').value) == true">
|
||||
<input matInput autocomplete="off" placeholder="Specify Borrower" formControlName="others_loan_taken">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<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 *ngIf="details.get('frequency').value == 1">
|
||||
<input matInput autocomplete="off" placeholder="Specify Frequency" formControlName="other_frequency">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%" *ngIf="details.get('frequency').value != '' ">
|
||||
<input matInput type="number" [placeholder] ="placeholderName[i] != '' ? placeholderName[i] :'Instalment Amount' " formControlName="emi" (keypress)="keyPress($event)" (keyup)="inWords($event,i,2)" required>
|
||||
<mat-hint align="end" *ngIf="details.get('emi').value != '' " >{{"₹"}}{{emiAmtInwords[i]}}only</mat-hint>
|
||||
</mat-form-field>
|
||||
<!-- <mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="EMI" formControlName="emi">
|
||||
</mat-form-field> -->
|
||||
|
||||
|
||||
|
||||
|
||||
<mat-form-field style="width: 100%">
|
||||
<input type="number" matInput placeholder="Original Tenure" formControlName="original_tenure" (change)="checkTenure(details);calculateTenure(details)">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Loan Type" formControlName="loan_type">
|
||||
<input type="number" matInput placeholder="Current Balance Tenure" formControlName="current_balance_tenure" (change)="calculateTenure(details)">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Lender" formControlName="lender">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Original Tenure" formControlName="original_tenure">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Current Balance Tenure" formControlName="current_balance_tenure">
|
||||
<mat-form-field>
|
||||
<input type="number" matInput placeholder="Elapsed Tenure in Months" formControlName="elapsed_tenure" autocomplete="off">
|
||||
</mat-form-field>
|
||||
<ion-buttons end>
|
||||
<ion-col col-3>
|
||||
<a (click)="addLoanDetails()" *ngIf="last">
|
||||
<ion-icon name="md-add" color="optblue" style="font-size: 22px;"></ion-icon></a>
|
||||
<a (click)="addLoanDetails()" *ngIf="last">
|
||||
<ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon></a>
|
||||
</ion-col>
|
||||
<ion-col offset-6 col-3 *ngIf="!last">
|
||||
<ion-col offset-2 col-3>
|
||||
<a (click)="deleteLoanDetails(i)">
|
||||
<ion-icon name="md-close" color="optblue" style="font-size: 22px;"></ion-icon></a>
|
||||
<ion-icon name="close-circle" color="optblue" style="font-size: 24px;"></ion-icon></a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
</mat-card-content>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</mat-card>
|
||||
<br/>
|
||||
<mat-card>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Remarks"
|
||||
|
||||
@ -1,3 +1,20 @@
|
||||
page-pd-question-current-loans {
|
||||
mat-form-field{
|
||||
width:100%;
|
||||
}
|
||||
mat-hint{
|
||||
font-size:11px;
|
||||
}
|
||||
.scroll-content{
|
||||
background-color: #eee;
|
||||
}
|
||||
.mat-card{
|
||||
margin-bottom: 15px;
|
||||
border-radius: 10px !important;
|
||||
box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.56), 0 4px 25px 0 rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2) !important;
|
||||
}
|
||||
.mat-card-content{
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
||||
import { FormGroup,FormArray,FormBuilder } from '@angular/forms';
|
||||
import { FormGroup,FormArray,FormBuilder,Validators } from '@angular/forms';
|
||||
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
||||
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
||||
import { ToastProvider } from '../../../providers/common-provider/toast';
|
||||
|
||||
import {ConstantsProvider} from '../../../providers/constants/constants'
|
||||
/**
|
||||
* Generated class for the PdQuestionCurrentLoansPage page.
|
||||
*
|
||||
@ -18,13 +18,33 @@ import { ToastProvider } from '../../../providers/common-provider/toast';
|
||||
templateUrl: 'pd-question-current-loans.html',
|
||||
})
|
||||
export class PdQuestionCurrentLoansPage {
|
||||
applicants: any;
|
||||
placeholderName: any = [];
|
||||
lenderData: any;
|
||||
frequencyData: any;
|
||||
loanTypeData:any;
|
||||
FormId: any;
|
||||
users: any;
|
||||
pdDetails: any;
|
||||
questionDetails: any;
|
||||
currentLoans:FormGroup;
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,public toast:ToastProvider, public aws:AwsServiceProvider) {
|
||||
existCompanyList: any=[];
|
||||
mergeCompanyApplicant: any=[];
|
||||
pdid:number;
|
||||
amtInwords: any=[];
|
||||
emiAmtInwords: any=[];
|
||||
dataFromAssets : any = [];
|
||||
labelArr : any = [];
|
||||
investmentTypeData: any=[];
|
||||
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,public toast:ToastProvider, public aws:AwsServiceProvider,public constant:ConstantsProvider) {
|
||||
this.questionDetails = this.navParams.get('questionDetails');
|
||||
this.pdDetails = this.navParams.get('pdDetails');
|
||||
this.pdid=this.pdDetails.pd_id;
|
||||
this.FormId = this.navParams.get('FormId');
|
||||
this.applicants = this.pdDetails.applicat_details;
|
||||
// this.applicants.push
|
||||
console.log(this.applicants);
|
||||
this.users = this.aws.getlocale();
|
||||
this.currentLoans = this.fb.group(
|
||||
{
|
||||
@ -32,9 +52,57 @@ export class PdQuestionCurrentLoansPage {
|
||||
currentloan_remarks:[null],
|
||||
loan_details: this.fb.array([])
|
||||
});
|
||||
this.getcurrentLoans()
|
||||
this.getdropdown();
|
||||
this.getcurrentLoans();
|
||||
}
|
||||
|
||||
|
||||
getdropdown()
|
||||
{
|
||||
this.qustCat.getcommondrop('BTLENDERLIST').subscribe(res=>
|
||||
{
|
||||
this.lenderData = res['records'].filter(len=>len.isactive==1);
|
||||
});
|
||||
this.qustCat.getcommondrop('FREQUENCY').subscribe(res=>
|
||||
{
|
||||
this.frequencyData = res['records'].filter(frq=>frq.isactive==1);
|
||||
});
|
||||
this.qustCat.getcommondrop('EXISTINGLOANTYPES').subscribe(val=>{
|
||||
this.loanTypeData=val['records'].filter(loan=>loan.isactive == 1 );
|
||||
});
|
||||
|
||||
this.qustCat.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
||||
console.log("Entering company List")
|
||||
if(data['dataStatus']==true){
|
||||
this.existCompanyList=data['records'].filter(val =>val.is_active===true && val.is_company_applicant===true)
|
||||
console.log("company List",data['records'])
|
||||
}
|
||||
let modifyCompanyList : any=[];
|
||||
if(this.existCompanyList.length>0){
|
||||
modifyCompanyList = this.existCompanyList.map(element => {
|
||||
return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
|
||||
});
|
||||
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
|
||||
console.log("Company applicant",this.mergeCompanyApplicant)
|
||||
}
|
||||
})
|
||||
let modifyApplicantList: any=[];
|
||||
if(this.applicants.length > 0){
|
||||
modifyApplicantList = this.applicants.map(element => {
|
||||
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
|
||||
});
|
||||
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
|
||||
console.log(this.mergeCompanyApplicant);
|
||||
// this.listOfLanguagues.splice(this.listOfLanguagues.indexOf(languague), 1);
|
||||
}
|
||||
|
||||
this.qustCat.getcommondrop('INVESTMENTTYPE').subscribe(data => {
|
||||
this.investmentTypeData=data['records'].filter(val=>val.isactive == 1);
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
ionViewDidLoad() {
|
||||
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
|
||||
}
|
||||
@ -48,30 +116,126 @@ export class PdQuestionCurrentLoansPage {
|
||||
}
|
||||
|
||||
}
|
||||
createLoanDetail() {
|
||||
createLoanDetail(data) {
|
||||
return this.fb.group({
|
||||
loan_amount: [null],
|
||||
emi: [null],
|
||||
loan_type: [null],
|
||||
lender: [null],
|
||||
original_tenure: [null],
|
||||
current_balance_tenure: [null],
|
||||
label: data == null ? [''] : [data.label],
|
||||
other_frequency:[''],
|
||||
loan_amount: [''],
|
||||
frequency:[''],
|
||||
emi: [''],
|
||||
loan_type: [''],
|
||||
others_loan_type:[''],
|
||||
loan_taken_by:[''],
|
||||
others_loan_taken:[''],
|
||||
lender: [''],
|
||||
others_lender:[''],
|
||||
original_tenure: [''],
|
||||
current_balance_tenure: [''],
|
||||
elapsed_tenure:[],
|
||||
});
|
||||
}
|
||||
addLoanDetails() {
|
||||
const control = <FormArray>this.currentLoans.controls['loan_details'];
|
||||
control.push(this.createLoanDetail());
|
||||
control.push(this.createLoanDetail(null));
|
||||
}
|
||||
deleteLoanDetails(index) {
|
||||
const control = <FormArray>this.currentLoans.controls['loan_details'];
|
||||
if(control.length==1)
|
||||
{
|
||||
this.currentLoans.controls['loan_details'].reset();
|
||||
}else{
|
||||
control.removeAt(index);
|
||||
}
|
||||
}
|
||||
compareObjects(o1: any, o2: any) {
|
||||
if(o1.id == o2.id && o1.group_id == o2.group_id)
|
||||
return true;
|
||||
else return false
|
||||
}
|
||||
checkOthers(values){
|
||||
if(values!=null) {
|
||||
return values.id==0 ? true : false;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
checkTenure(details){
|
||||
let originalTenure = details.value.original_tenure;
|
||||
// alert(originalTenure);
|
||||
details.controls.current_balance_tenure.setValidators([Validators.required, Validators.max(+originalTenure)]);
|
||||
details.controls.current_balance_tenure.updateValueAndValidity();
|
||||
// details.controls.current_balance_tenure.setValidators([Validators.max(+originalTenure)]);
|
||||
// details.controls.current_balance_tenure.updateValueAndValidity();
|
||||
// let BalanceTenure = details.value.current_balance_tenure;
|
||||
// if( originalTenure < BalanceTenure){
|
||||
// alert('Greater');
|
||||
// details.controls.current_balance_tenure.setValue('');
|
||||
// alert('validation setted For');
|
||||
// details.controls.current_balance_tenure.setValidators([Validators.min(+originalTenure)]);
|
||||
// details.controls.current_balance_tenure.updateValueAndValidity();
|
||||
|
||||
|
||||
// }
|
||||
}
|
||||
calculateTenure(details)
|
||||
{
|
||||
let ElapsedValues;
|
||||
|
||||
if(details.value.original_tenure != null && details.value.original_tenure != '' && details.value.current_balance_tenure != null && details.value.current_balance_tenure != ''){
|
||||
ElapsedValues = details.value.original_tenure - details.value.current_balance_tenure ;
|
||||
details.controls['elapsed_tenure'].setValue(ElapsedValues);
|
||||
}
|
||||
|
||||
}
|
||||
keyPress(event: any) {
|
||||
const pattern = /[0-9]/;
|
||||
|
||||
let inputChar = String.fromCharCode(event.charCode);
|
||||
if (event.keyCode != 8 && !pattern.test(inputChar)) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
inWords(e,i,flag){
|
||||
switch(flag){
|
||||
case 1 :
|
||||
this.amtInwords[i] = this.constant.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 2 :
|
||||
this.emiAmtInwords[i] = this.constant.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
selectedfrequency(e,i){
|
||||
// console.log(+e.value);
|
||||
// console.log(i);
|
||||
|
||||
// alert('function in');
|
||||
|
||||
|
||||
switch(+e){
|
||||
case 1: this.placeholderName[i] = 'Instalment Amount'; break;
|
||||
case 2: this.placeholderName[i] = 'Annual Instalment Amount'; break;
|
||||
case 3: this.placeholderName[i] = 'Halfyearly Instalment Amount'; break;
|
||||
case 4: this.placeholderName[i] = 'Fortnightly Instalment Amount'; break;
|
||||
case 5: this.placeholderName[i] = 'Daily Instalment Amount'; break;
|
||||
case 6: this.placeholderName[i] = 'Quarterly Instalment Amount'; break;
|
||||
case 7: this.placeholderName[i] = 'Monthly Instalment Amount'; break;
|
||||
default: this.placeholderName[i] = 'Instalment Amount'; break;
|
||||
}
|
||||
// console.log(this.placeholderName);
|
||||
}
|
||||
|
||||
submitCurrentloan(answerData) {
|
||||
console.log(answerData);
|
||||
let records: any = {};
|
||||
records.pdid = this.pdDetails.pd_id;
|
||||
records.formid = '336';
|
||||
records.formid = this.FormId.form_id;
|
||||
records.fk_createdby = this.users;
|
||||
records.existing_loan = answerData.existing_loan;
|
||||
records.loan_details = answerData.loan_details;
|
||||
@ -90,33 +254,179 @@ submitCurrentloan(answerData) {
|
||||
}
|
||||
getcurrentLoans()
|
||||
{
|
||||
let records = {'pd_id':this.pdDetails.pd_id,'pd_form_id':'336'};
|
||||
let records = {'pd_id':this.pdDetails.pd_id,'pd_form_id':this.FormId.form_id};
|
||||
this.qustCat.retiverForm(records).subscribe(res=>
|
||||
{
|
||||
if(res['dataStatus']==true)
|
||||
const control = <FormArray>this.currentLoans.controls['loan_details'];
|
||||
if(res['dataStatus']==true )
|
||||
{
|
||||
let currentLoanDetails = res['records'];
|
||||
console.log("res",res['records']);
|
||||
if(res['records'].loan_details !== undefined && res['records'].loan_details !=null && res['records'].loan_details !=''){
|
||||
var result = Object.keys(res['records'].loan_details).map(function(key) {
|
||||
//console.log(res);
|
||||
console.log("Function result",res['records'].loan_details[key]);
|
||||
return res['records'].loan_details[key];
|
||||
|
||||
});
|
||||
let currentLoanDetails = res['records'];
|
||||
|
||||
this.currentLoans.controls['existing_loan'].setValue(currentLoanDetails.existing_loan);
|
||||
this.currentLoans.controls['currentloan_remarks'].setValue(currentLoanDetails.currentloan_remarks);
|
||||
const control = <FormArray>this.currentLoans.controls['loan_details'];
|
||||
|
||||
if(result.length ==0)
|
||||
{
|
||||
control.push(this.createLoanDetail());
|
||||
control.push(this.createLoanDetail(null));
|
||||
}else
|
||||
{
|
||||
result.forEach(datas=>
|
||||
result.forEach((datas,index)=>
|
||||
{
|
||||
control.push(this.createLoanDetail());
|
||||
console.log("Datas",datas)
|
||||
control.push(this.createLoanDetail(null));
|
||||
this.selectedfrequency(datas.frequency,index);
|
||||
if(datas.loan_amount!=''){
|
||||
this.amtInwords[index]=this.constant.convertNumberToWords(datas.loan_amount);
|
||||
}
|
||||
if(datas.emi!=''){
|
||||
this.emiAmtInwords[index]=this.constant.convertNumberToWords(datas.emi);
|
||||
}
|
||||
})
|
||||
this.currentLoans.controls['loan_details'].setValue(result);
|
||||
|
||||
}
|
||||
}else
|
||||
{
|
||||
this.currentLoans.controls['existing_loan'].setValue(currentLoanDetails.existing_loan);
|
||||
this.currentLoans.controls['currentloan_remarks'].setValue(currentLoanDetails.currentloan_remarks);
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
// console.log('else part',value.status);
|
||||
this.qustCat.getAssetsWithLoanFromBusiness(this.pdid).subscribe(data=>{
|
||||
// console.log(data);
|
||||
|
||||
if(data.dataStatus == true){
|
||||
|
||||
// console.log(data.record);
|
||||
|
||||
let AssetData = data.record;
|
||||
|
||||
// console.log(AssetData.business_assets);
|
||||
// console.log(AssetData.other_assests);
|
||||
|
||||
if(AssetData.business_assets.length>0){
|
||||
AssetData.business_assets.map(element => {
|
||||
this.dataFromAssets.push({mode:element.business_assets_mode,
|
||||
mode_name:element.business_assets_mode_name,
|
||||
details:element.business_details,
|
||||
owner_name:element.business_name_of_the_owner})
|
||||
});
|
||||
}
|
||||
|
||||
if(AssetData.other_assests.length > 0){
|
||||
AssetData.other_assests.map(element => {
|
||||
this.dataFromAssets.push({mode:element.assets_mode,
|
||||
mode_name:element.assets_mode_name,
|
||||
details:element.details,
|
||||
owner_name:element.name_of_the_owner
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
// id: "4", name: "Equipments and machinaries", isactive: "1", flag: "1", is_others: "0"
|
||||
// id: "7", name: "Investments", isactive: "1", flag: "0", is_others: "0"
|
||||
// id: "6", name: "Life Insurance Policy", isactive: "1", flag: "0", is_others: "0"
|
||||
// id: "2", name: "Property", isactive: "1", flag: "1", is_others: "0"
|
||||
// id: "3", name: "Vehicle", isactsive: "1", flag: "1", is_others: "0"
|
||||
// id: "1", name: "Others", isactive: "1", flag: "1", is_others: "1"}
|
||||
|
||||
if(this.dataFromAssets.length > 0){
|
||||
let labelarray : any = [];
|
||||
|
||||
this.dataFromAssets.forEach((val,index) => {
|
||||
|
||||
if(val.mode == 1){
|
||||
let data;
|
||||
val.details.forEach((v,index) => {
|
||||
data = v.any_other_assets;
|
||||
});
|
||||
let description = data != '' ? '( '+ data +' )' : '';
|
||||
labelarray[index] = ' : '+val.owner_name +' - '+ val.mode_name + description;
|
||||
}
|
||||
if(val.mode == 2){
|
||||
let data;
|
||||
val.details.forEach((v,index) => {
|
||||
data = v.property_type_name;
|
||||
});
|
||||
let description = data != '' ? '( '+ data +' )' : '';
|
||||
labelarray[index] = ' : '+val.owner_name +' - '+ val.mode_name + description;
|
||||
}
|
||||
if(val.mode == 3){
|
||||
let data;
|
||||
val.details.forEach((v,index) => {
|
||||
data = v.manufacturer_model_vehicle;
|
||||
});
|
||||
let description = data != '' ? '( '+ data +' )' : '';
|
||||
labelarray[index] = ' : '+val.owner_name +' - '+ val.mode_name + description;
|
||||
}
|
||||
if(val.mode == 4){
|
||||
let data;
|
||||
val.details.forEach((v,index) => {
|
||||
data = v.equipment_manufacturing_description;
|
||||
});
|
||||
let description = data != '' ? '( '+ data +' )' : '';
|
||||
labelarray[index] = ' : '+val.owner_name +' - '+ val.mode_name + description;
|
||||
}
|
||||
if(val.mode == 6){
|
||||
labelarray[index] = ' : '+val.owner_name+' - '+ val.mode_name;
|
||||
}
|
||||
if(val.mode == 7){
|
||||
let data;
|
||||
val.details.forEach((v,index) => {
|
||||
data = v.investments_type != 1
|
||||
? this.investmentTypeData.filter(data => data.id == v.investments_type)[0].name
|
||||
: v.other_investments_type ;
|
||||
|
||||
});
|
||||
let description = data != '' ? '( '+ data +' )' : '';
|
||||
labelarray[index] = ' : '+val.owner_name +' - '+ val.mode_name + description;
|
||||
}
|
||||
});
|
||||
const control = <FormArray>this.currentLoans.controls['loan_details'];
|
||||
this.labelArr = labelarray;
|
||||
let arr : any = [];
|
||||
if(this.labelArr.length > 0){
|
||||
this.currentLoans.controls['existing_loan'].setValue('Yes');
|
||||
this.labelArr.forEach((v,index) => {
|
||||
arr = {
|
||||
'label': v,
|
||||
'loan_amount': '',
|
||||
'frequency':'',
|
||||
'other_frequency':'',
|
||||
'emi': '',
|
||||
'loan_type': '',
|
||||
'others_loan_type': '',
|
||||
'loan_taken_by':'',
|
||||
'others_loan_taken':'',
|
||||
'lender': '',
|
||||
'others_lender':'',
|
||||
'original_tenure': '',
|
||||
'current_balance_tenure': '',
|
||||
'elapsed_tenure':''
|
||||
}
|
||||
control.push(this.createLoanDetail(arr));
|
||||
});
|
||||
// this.currentLoanForm.controls['existing_loan'].setValue(arr);
|
||||
}
|
||||
}
|
||||
else{
|
||||
// console.log('else,else.part');
|
||||
control.push(this.createLoanDetail(null));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,76 @@
|
||||
<ion-header>
|
||||
|
||||
<ion-navbar color="optblue">
|
||||
<button ion-button menuToggle>
|
||||
<ion-icon name="menu"></ion-icon>
|
||||
</button>
|
||||
<ion-title *ngIf="!viewchange">CurrentLoans Category</ion-title>
|
||||
|
||||
|
||||
</ion-navbar>
|
||||
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-content padding>
|
||||
<form [formGroup]="currentLoans">
|
||||
<mat-card>
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Do you have any other existing Loan"
|
||||
formControlName="existing_loan" (selectionChange)="exitsCheck($event.value)">
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</mat-card>
|
||||
<mat-card *ngIf="currentLoans.controls.existing_loan.value == 'Yes'">
|
||||
<div formArrayName="loan_details">
|
||||
<div *ngFor="let details of currentLoans.get('loan_details').controls; let i=index;let last=last"
|
||||
[formGroupName]="i">
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Loan Amount" formControlName="loan_amount">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="EMI" formControlName="emi">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Loan Type" formControlName="loan_type">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Lender" formControlName="lender">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Original Tenure" formControlName="original_tenure">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Current Balance Tenure" formControlName="current_balance_tenure">
|
||||
</mat-form-field>
|
||||
<ion-col col-3>
|
||||
<a (click)="addLoanDetails()" *ngIf="last">
|
||||
<ion-icon name="md-add" color="optblue" style="font-size: 22px;"></ion-icon></a>
|
||||
</ion-col>
|
||||
<ion-col offset-6 col-3 *ngIf="!last">
|
||||
<a (click)="deleteLoanDetails(i)">
|
||||
<ion-icon name="md-close" color="optblue" style="font-size: 22px;"></ion-icon></a>
|
||||
</ion-col>
|
||||
</mat-card-content>
|
||||
</div>
|
||||
</div>
|
||||
</mat-card>
|
||||
<br/>
|
||||
<mat-card>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Remarks"
|
||||
formControlName="currentloan_remarks">
|
||||
</mat-form-field>
|
||||
</mat-card>
|
||||
<ion-row>
|
||||
<!-- <ion-buttons >
|
||||
<ion-button color="optblue"
|
||||
full[disabled]="!pdforms.valid" mat-raised-button style="width:100%" (click)="savepdDetails(pdforms.value)">Save <ion-icon name="md-disc"></ion-icon></ion-button> -->
|
||||
<button ion-button full color="optblue" (click)="submitCurrentloan(currentLoans.value)" > Save</button>
|
||||
<!-- </ion-buttons> -->
|
||||
</ion-row>
|
||||
</form>
|
||||
</ion-content>
|
||||
@ -0,0 +1,3 @@
|
||||
page-pd-question-current-loans {
|
||||
|
||||
}
|
||||
@ -0,0 +1,123 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
||||
import { FormGroup,FormArray,FormBuilder } from '@angular/forms';
|
||||
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
||||
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
||||
import { ToastProvider } from '../../../providers/common-provider/toast';
|
||||
|
||||
/**
|
||||
* Generated class for the PdQuestionCurrentLoansPage page.
|
||||
*
|
||||
* See https://ionicframework.com/docs/components/#navigation for more info on
|
||||
* Ionic pages and navigation.
|
||||
*/
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'page-pd-question-current-loans',
|
||||
templateUrl: 'pd-question-current-loans.html',
|
||||
})
|
||||
export class PdQuestionCurrentLoansPage {
|
||||
users: any;
|
||||
pdDetails: any;
|
||||
questionDetails: any;
|
||||
currentLoans:FormGroup;
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,public toast:ToastProvider, public aws:AwsServiceProvider) {
|
||||
this.questionDetails = this.navParams.get('questionDetails');
|
||||
this.pdDetails = this.navParams.get('pdDetails');
|
||||
this.users = this.aws.getlocale();
|
||||
this.currentLoans = this.fb.group(
|
||||
{
|
||||
existing_loan: [null],
|
||||
currentloan_remarks:[null],
|
||||
loan_details: this.fb.array([])
|
||||
});
|
||||
this.getcurrentLoans()
|
||||
}
|
||||
|
||||
ionViewDidLoad() {
|
||||
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
|
||||
}
|
||||
exitsCheck(val)
|
||||
{
|
||||
console.log(val);
|
||||
if(val =="Yes")
|
||||
{
|
||||
|
||||
this.addLoanDetails();
|
||||
}
|
||||
|
||||
}
|
||||
createLoanDetail() {
|
||||
return this.fb.group({
|
||||
loan_amount: [null],
|
||||
emi: [null],
|
||||
loan_type: [null],
|
||||
lender: [null],
|
||||
original_tenure: [null],
|
||||
current_balance_tenure: [null],
|
||||
});
|
||||
}
|
||||
addLoanDetails() {
|
||||
const control = <FormArray>this.currentLoans.controls['loan_details'];
|
||||
control.push(this.createLoanDetail());
|
||||
}
|
||||
deleteLoanDetails(index) {
|
||||
const control = <FormArray>this.currentLoans.controls['loan_details'];
|
||||
control.removeAt(index);
|
||||
}
|
||||
|
||||
submitCurrentloan(answerData) {
|
||||
console.log(answerData);
|
||||
let records: any = {};
|
||||
records.pdid = this.pdDetails.pd_id;
|
||||
records.formid = '336';
|
||||
records.fk_createdby = this.users;
|
||||
records.existing_loan = answerData.existing_loan;
|
||||
records.loan_details = answerData.loan_details;
|
||||
records.currentloan_remarks = answerData.currentloan_remarks;
|
||||
console.log('data', records);
|
||||
this.qustCat.saveForm(records).subscribe(data => {
|
||||
console.log('data', data);
|
||||
|
||||
|
||||
if(data['dataStatus']==true)
|
||||
{
|
||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||
this.navCtrl.pop();
|
||||
}
|
||||
});
|
||||
}
|
||||
getcurrentLoans()
|
||||
{
|
||||
let records = {'pd_id':this.pdDetails.pd_id,'pd_form_id':'336'};
|
||||
this.qustCat.retiverForm(records).subscribe(res=>
|
||||
{
|
||||
if(res['dataStatus']==true)
|
||||
{
|
||||
var result = Object.keys(res['records'].loan_details).map(function(key) {
|
||||
//console.log(res);
|
||||
return res['records'].loan_details[key];
|
||||
|
||||
});
|
||||
let currentLoanDetails = res['records'];
|
||||
this.currentLoans.controls['existing_loan'].setValue(currentLoanDetails.existing_loan);
|
||||
this.currentLoans.controls['currentloan_remarks'].setValue(currentLoanDetails.currentloan_remarks);
|
||||
const control = <FormArray>this.currentLoans.controls['loan_details'];
|
||||
|
||||
if(result.length ==0)
|
||||
{
|
||||
control.push(this.createLoanDetail());
|
||||
}else
|
||||
{
|
||||
result.forEach(datas=>
|
||||
{
|
||||
control.push(this.createLoanDetail());
|
||||
})
|
||||
this.currentLoans.controls['loan_details'].setValue(result);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
@ -4,32 +4,182 @@
|
||||
<button ion-button menuToggle>
|
||||
<ion-icon name="menu"></ion-icon>
|
||||
</button>
|
||||
<ion-title *ngIf="!viewchange">Family Category</ion-title>
|
||||
|
||||
|
||||
<ion-title *ngIf="!viewchange">{{FormId.form_name}}</ion-title>
|
||||
</ion-navbar>
|
||||
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-content padding>
|
||||
<form class="address" [formGroup]="familyForm">
|
||||
<div formArrayName="family_details">
|
||||
<section
|
||||
[formGroupName]="i"
|
||||
*ngFor="let tech of familyForm.controls.family_details['controls']; let i = index">
|
||||
<mat-card >
|
||||
<mat-card-header>
|
||||
<h4>Family Details {{i+1}}</h4>
|
||||
<span float-right ion-button large color="optblue" icon-left clear *ngIf="familyForm.controls.family_details.length > 1"
|
||||
(click)="remove_family_details(i)"><ion-icon name="md-close"></ion-icon></span>
|
||||
</mat-card-header>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Applicants" formControlName="selected_person" required>
|
||||
<mat-option value="{{pd.pd_co_applicant_id}}"
|
||||
*ngFor="let pd of pdDetails.applicat_details">{{pd.applicant_name}}</mat-option>
|
||||
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</mat-card>
|
||||
<mat-card>
|
||||
<mat-form-field style="width: 100%">
|
||||
<!-- <mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Person Met" formControlName="person">
|
||||
<mat-option *ngFor="let state of filteredStates" [value]="state">
|
||||
{{state}}
|
||||
<mat-option *ngFor="let state of filteredStates" [value]="state.person_met_id">
|
||||
{{state.person_met_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field> -->
|
||||
|
||||
<!-- <mat-form-field *ngIf="familyForm.controls['person'].value =='8'" style="width: 100%">
|
||||
<input matInput placeholder="Enter the relationship" formControlName="personOther">
|
||||
</mat-form-field> -->
|
||||
<mat-form-field style="width:100%">
|
||||
<input matInput placeholder="Place " formControlName="residence_place" required/>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-select matInput placeholder="State" formControlName="residence_state" required (selectionChange)="getCity($event.value,i)" >
|
||||
<mat-option [value]="s.state_id" *ngFor="let s of stateData">
|
||||
{{s.name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select matInput placeholder="City" formControlName="residence_city" required>
|
||||
<mat-option *ngFor="let c of cityData[i]" [value]="c.city_id" >
|
||||
{{c.city_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
{{person}}
|
||||
<mat-form-field *ngIf="person =='Other'" style="width: 100%">
|
||||
<input matInput placeholder="Enter the relationship" formControlName="personOther">
|
||||
<mat-form-field>
|
||||
<mat-select matInput placeholder="Pin" formControlName="residence_pin" required>
|
||||
<mat-option *ngFor="let p of pincodeData[i]" [value]="p.pincode_id">
|
||||
{{p.pincode}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput type="number" placeholder="No. of Years " formControlName="residence_No_of_years" required/>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Ownership " formControlName="residence_ownership" required>
|
||||
<mat-option value="{{own.id}}" *ngFor="let own of ownerShip">{{own.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="tech.get('residence_ownership').value== 3">
|
||||
<input matInput type="number" placeholder="Rent Amount" formControlName="rent" />
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="tech.get('residence_ownership').value== 4">
|
||||
<input matInput type="text" placeholder="Please Specify" formControlName="ownershipOther" />
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput type="number" min="0" placeholder="Family Members" formControlName="total_number_of_family_members" (focusout)="getNumberOfFamilyMemberDetails(i)">
|
||||
</mat-form-field>
|
||||
</mat-card>
|
||||
|
||||
<div formArrayName="family_members_details" >
|
||||
<div *ngFor="let item of tech.controls.family_members_details['controls']; let ix=index" [formGroupName]="ix">
|
||||
<mat-card>
|
||||
<mat-card-header appearence="outline">Family Member Details {{ix+1}}</mat-card-header>
|
||||
<mat-form-field>
|
||||
<input matInput type="text" placeholder="Name" formControlName="family_member_name" />
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Relationship *" formControlName="family_member_relationship" >
|
||||
<mat-option *ngFor="let relation of relationData" value="{{relation.relationship_id}}">{{relation.name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput type="number" placeholder="Age" formControlName="family_member_age"/>
|
||||
</mat-form-field>
|
||||
<mat-form-field >
|
||||
<mat-select placeholder="Earning Status *" formControlName="family_member_earning_status">
|
||||
<mat-option *ngFor="let earning of earningStatus" value="{{earning.id}}">{{earning.type}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<div *ngIf="item.get('family_member_earning_status').value == 1">
|
||||
<h6>Earning Details</h6>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Segment" formControlName="earning_segment" >
|
||||
<mat-option value="{{segment.customer_segment_id}}" *ngFor="let segment of cusSeg">
|
||||
{{segment.name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput type="number" placeholder="Income Per Month" formControlName="earning_gross_income_per_month" >
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Name of the Employer/Business" formControlName="earning_name_of_the_employer_or_business" >
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput type="number" placeholder="No. of years in Employer/Business" formControlName="earning_number_of_years_in_employment_or_business"
|
||||
>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
<div *ngIf="item.get('family_member_earning_status').value == 2">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Occupation" formControlName="non_earning_occupation" >
|
||||
<mat-option value="{{occupation.occupation_non_earning_member_id}}" *ngFor="let occupation of occupationData">
|
||||
{{occupation.name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="item.get('non_earning_occupation').value==1">
|
||||
<input matInput placeholder="Specify Others" formControlName="non_earning_if_others" >
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="item.get('non_earning_occupation').value==3">
|
||||
<input matInput type="date" placeholder="Retired From" formControlName="non_earning_if_retired_from" >
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
<!--<ion-item>
|
||||
<ion-fab>
|
||||
<button ion-fab item-end (click)="add()">add</button>
|
||||
</ion-fab>
|
||||
</ion-item>-->
|
||||
|
||||
<!--<ion-footer>
|
||||
<ion-fab>
|
||||
<button ion-fab mini align="end" (click)="addMoreApplicantFamilyDetails($event)">Small</button>
|
||||
</ion-fab>
|
||||
</ion-footer>-->
|
||||
|
||||
<!--
|
||||
old data
|
||||
|
||||
<mat-form-field style="width: 100%;">
|
||||
<mat-select placeholder="Ownership" formControlName="ownership">
|
||||
<mat-option [value]="own.id" *ngFor="let own of ownerShip">{{own.name}}</mat-option>
|
||||
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="No. Of family members" formControlName="members">
|
||||
<input matInput placeholder="No. Of family members" (blur)="checkfamilystatus()"formControlName="members">
|
||||
</mat-form-field>
|
||||
</mat-card>
|
||||
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>Earning Members
|
||||
@ -39,6 +189,14 @@
|
||||
<div *ngFor="let item of familyForm.get('earningMembers').controls; let i=index;let last = last"
|
||||
[formGroupName]="i">
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Name"
|
||||
formControlName="earning_member_name" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Age"
|
||||
formControlName="earning_member_age" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Relation" formControlName="relation">
|
||||
<mat-option value="{{relation.relationship_id}}"
|
||||
@ -49,9 +207,7 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Segment" formControlName="segment">
|
||||
<mat-option value="Salaried">Salaried</mat-option>
|
||||
<mat-option value="SENP">SENP</mat-option>
|
||||
<mat-option value="SEP">SEP</mat-option>
|
||||
<mat-option *ngFor="let seg of cusSeg" [value]="seg.customer_segment_id">{{seg.name}}</mat-option>
|
||||
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@ -61,16 +217,16 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Name of Employer / Business"
|
||||
formControlName="employerName">
|
||||
formControlName="employer_name">
|
||||
</mat-form-field>
|
||||
|
||||
<ion-buttons end >
|
||||
<ion-col col-3>
|
||||
<a (click)="addearningMembers()" *ngIf="last">
|
||||
<a (click)="addearningMembers()" *ngIf="last && !familyAddStatus" >
|
||||
<ion-icon name="md-add" color="optblue" style="font-size: 22px;"></ion-icon></a>
|
||||
</ion-col>
|
||||
<ion-col col-3>
|
||||
<a (click)="deleteEarningMembers(i)">
|
||||
<ion-col offset-3 col-3>
|
||||
<a (click)="deleteEarningMembers(i)" >
|
||||
<ion-icon name="md-close" color="optblue" style="font-size: 22px;"></ion-icon></a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
@ -90,6 +246,14 @@
|
||||
<div *ngFor="let members of familyForm.get('nonEarningMembers').controls; let i=index;let last = last"
|
||||
[formGroupName]="i">
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Name"
|
||||
formControlName="non_earning_member_name" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Age"
|
||||
formControlName="non_earning_member_age" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Relation"
|
||||
formControlName="relationship">
|
||||
@ -107,17 +271,21 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-form-field style="width: 100%" *ngIf="members.get('occupation').value=='3'">
|
||||
<input matInput placeholder="Retired From"
|
||||
formControlName="retired">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%" *ngIf="members['controls'].occupation.value==9">
|
||||
<input matInput placeholder="Specify Others Occupation"
|
||||
formControlName="others_occupation">
|
||||
</mat-form-field>
|
||||
<ion-buttons end >
|
||||
<ion-col col-3>
|
||||
<a (click)="addMembers()" *ngIf="last">
|
||||
<a (click)="addMembers()" *ngIf="last && !familyAddStatus">
|
||||
<ion-icon name="md-add" color="optblue" style="font-size: 22px;"></ion-icon></a>
|
||||
</ion-col>
|
||||
<ion-col offset-3 col-3>
|
||||
<a (click)="deleteMembers(i)">
|
||||
<a (click)="deleteMembers(i)" >
|
||||
<ion-icon name="md-close" color="optblue" style="font-size: 22px;"></ion-icon></a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
@ -140,41 +308,45 @@
|
||||
formControlName="residence">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="No.of yrs" formControlName="years">
|
||||
<input matInput placeholder="Number of years" formControlName="years">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width: 100%;">
|
||||
<mat-select placeholder="Ownership" formControlName="ownership">
|
||||
<mat-option value="Self">Self Owned</mat-option>
|
||||
<mat-option value="Family">Family Owned</mat-option>
|
||||
<mat-option value="Rented">Rented</mat-option>
|
||||
<mat-option value="Others">Others</mat-option>
|
||||
<mat-option [value]="own.id" *ngFor="let own of ownerShip">{{own.name}}</mat-option>
|
||||
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%" *ngIf="ownership =='Others'">
|
||||
|
||||
<mat-form-field style="width: 100%" *ngIf="familyForm.controls['ownership'].value =='4'">
|
||||
<input matInput placeholder="Please specify" formControlName="ownershipOther">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%" *ngIf="ownership =='Rented'">
|
||||
<input matInput placeholder="what rent"
|
||||
<mat-form-field style="width: 100%" *ngIf="familyForm.controls['ownership'].value =='3'">
|
||||
<input matInput placeholder="rent Amount"
|
||||
formControlName="rent">
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<br/>
|
||||
<br/>-->
|
||||
<mat-card>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Remarks"
|
||||
formControlName="family_details_form_remark">
|
||||
<textarea matInput placeholder="Remarks"
|
||||
formControlName="family_details_form_remark"></textarea>
|
||||
</mat-form-field>
|
||||
</mat-card>
|
||||
<ion-row>
|
||||
|
||||
|
||||
|
||||
<ion-row>
|
||||
|
||||
</ion-row>
|
||||
<!-- <ion-buttons >
|
||||
<ion-button color="optblue" full[disabled]="!pdforms.valid" mat-raised-button style="width:100%" (click)="savepdDetails(pdforms.value)">Save <ion-icon name="md-disc"></ion-icon></ion-button> -->
|
||||
<button ion-button full color="optblue" (click)="savepdfamily(familyForm.value)"> Save</button>
|
||||
<button ion-button strong color="optblue" block round (click)="savepdfamily(familyForm.value)"> Save</button>
|
||||
<!-- </ion-buttons> -->
|
||||
|
||||
</ion-row>
|
||||
</form>
|
||||
|
||||
|
||||
<ion-fab right bottom mini>
|
||||
<button mini ion-fab color="optblue" (click)="add()"><ion-icon name="add" style="font-size: 24px"></ion-icon></button></ion-fab>
|
||||
|
||||
</ion-content>
|
||||
|
||||
@ -1,3 +1,19 @@
|
||||
page-pd-question-family {
|
||||
|
||||
mat-form-field{
|
||||
width:100%;
|
||||
}
|
||||
.scroll-content{
|
||||
background-color: #eee;
|
||||
}
|
||||
.mat-card{
|
||||
margin-bottom: 15px;
|
||||
border-radius: 10px !important;
|
||||
box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.56), 0 4px 25px 0 rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2) !important;
|
||||
}
|
||||
.mat-card-content{
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
h4{
|
||||
font-size: 120%;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
||||
import { FormGroup, FormBuilder, FormArray } from '@angular/forms';
|
||||
import { FormGroup, FormBuilder, FormArray, Validators } from '@angular/forms';
|
||||
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
||||
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
||||
import { ToastProvider } from '../../../providers/common-provider/toast';
|
||||
import { controlNameBinding } from '@angular/forms/src/directives/reactive_directives/form_control_name';
|
||||
|
||||
/**
|
||||
* Generated class for the PdQuestionFamilyPage page.
|
||||
@ -19,6 +20,22 @@ import { ToastProvider } from '../../../providers/common-provider/toast';
|
||||
})
|
||||
export class PdQuestionFamilyPage {
|
||||
|
||||
|
||||
earningStatus = [{
|
||||
type: 'Earning',
|
||||
id: 1
|
||||
}, {
|
||||
type: 'Non Earning',
|
||||
id: 2
|
||||
}]
|
||||
earning_gross_income_per_month:any;
|
||||
|
||||
nofamily:number;
|
||||
data:any;
|
||||
familyAddStatus: boolean;
|
||||
ownerShip: any;
|
||||
cusSeg: any;
|
||||
FormId: any;
|
||||
users: any;
|
||||
pdDetails: any;
|
||||
occupationData: any;
|
||||
@ -26,39 +43,247 @@ export class PdQuestionFamilyPage {
|
||||
items: FormArray;
|
||||
relationData: any;
|
||||
familyForm: FormGroup;
|
||||
filteredStates: any = [
|
||||
'Co-Applicant 1 to x',
|
||||
'Accountant',
|
||||
'Manager',
|
||||
'Relative of the applicant',
|
||||
'Friend of the Applicant',
|
||||
'DSA',
|
||||
'Other'
|
||||
];
|
||||
total_number_of_family_members;
|
||||
filteredStates: any ;
|
||||
public selected_person;
|
||||
stateData:any;
|
||||
cityData: any =[];
|
||||
pincodeData:any=[];
|
||||
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,public aws:AwsServiceProvider,public toast:ToastProvider) {
|
||||
this.FormId = this.navParams.get('FormId');
|
||||
this.pdDetails = this.navParams.get('pdDetails');
|
||||
this.selected_person=this.pdDetails.pdapplicants_details;
|
||||
console.log("applicant details",this.selected_person);
|
||||
console.log('Pd Applicant',this.pdDetails);
|
||||
this.users = this.aws.getlocale();
|
||||
this.getFamilyData();
|
||||
//console.log('aws',this.users);
|
||||
|
||||
|
||||
this.familyForm = this.fb.group({
|
||||
person: [null],
|
||||
personOther: [null],
|
||||
members: [null],
|
||||
residence: [null],
|
||||
years: [null],
|
||||
ownership: [null],
|
||||
ownershipOther: [null],
|
||||
rent: [null],
|
||||
family_details_form_remark:[null],
|
||||
earningMembers: this.fb.array([]),
|
||||
nonEarningMembers: this.fb.array([])
|
||||
family_details: this.fb.array([
|
||||
//this.initFamilyDetails()
|
||||
|
||||
]),
|
||||
family_details_form_remark:[''],
|
||||
|
||||
|
||||
});
|
||||
this.getRelation();
|
||||
this.getoccupation();
|
||||
this.getFamilyData();
|
||||
|
||||
|
||||
}
|
||||
|
||||
ionViewDidLoad() {
|
||||
console.log('ionViewDidLoad PdQuestionFamilyPage');
|
||||
}
|
||||
initFamilyDetails(records) : void
|
||||
{
|
||||
if (records === null) {
|
||||
let formData: FormGroup = this.fb.group({
|
||||
selected_person: ['', Validators.compose([Validators.required])],
|
||||
residence_place: ['', Validators.compose([])],
|
||||
residence_city: ['', Validators.compose([])],
|
||||
residence_state: ['', Validators.compose([])],
|
||||
residence_pin: ['', Validators.compose([])],
|
||||
residence_No_of_years: ['', Validators.compose([])],
|
||||
residence_ownership: ['', Validators.compose([])],
|
||||
ownershipOther: [''],
|
||||
rent: [''],
|
||||
total_number_of_family_members: ['', Validators.compose([Validators.min(1), Validators.max(20)])],
|
||||
family_members_details: this.fb.array([])
|
||||
});
|
||||
const control = <FormArray>this.familyForm.controls['family_details'];
|
||||
control.push(formData);
|
||||
|
||||
}
|
||||
else{
|
||||
records.forEach((val,index)=>{
|
||||
this.getCity(val.residence_state,index);
|
||||
let formData:FormGroup=this.fb.group({
|
||||
selected_person:[val.selected_person],
|
||||
residence_place:[val.residence_place],
|
||||
residence_city:[val.residence_city],
|
||||
residence_state:[val.residence_state],
|
||||
residence_pin:[val.residence_pin],
|
||||
residence_No_of_years: [val.residence_No_of_years,Validators.compose([])],
|
||||
residence_ownership:[val.residence_ownership],
|
||||
rent:[val.rent || null],
|
||||
ownershipOther:[val.ownershipOther || null],
|
||||
total_number_of_family_members:[val.total_number_of_family_members,Validators.compose([Validators.min(1), Validators.max(20)])],
|
||||
family_members_details:this.fb.array([])
|
||||
|
||||
});
|
||||
|
||||
const control = <FormArray>this.familyForm.controls['family_details'];
|
||||
control.push(formData);
|
||||
// console.log('family full records',val);
|
||||
|
||||
let inx=control.length-1;
|
||||
//this.getNumberOfFamilyMemberDetails(inx);
|
||||
this.initFamilyMembersDetails(inx, val.family_members_details);
|
||||
console.log(control);
|
||||
|
||||
// console.log('control family',inx);
|
||||
|
||||
//this.initFamilyMembersDetails
|
||||
|
||||
})
|
||||
}
|
||||
/*
|
||||
return this.fb.group({
|
||||
//family_details
|
||||
selected_person:[''],
|
||||
residence_place:[''],
|
||||
residence_city:[''],
|
||||
residence_state:[''],
|
||||
residence_pin:[''],
|
||||
residence_No_of_years: ['',Validators.compose([])],
|
||||
residence_ownership:[],
|
||||
rent:[''],
|
||||
ownershipOther:[''],
|
||||
total_number_of_family_members:['',Validators.compose([Validators.min(1), Validators.max(20)])],
|
||||
|
||||
//family_member_details
|
||||
|
||||
|
||||
|
||||
family_members_details:this.fb.array([]),
|
||||
|
||||
|
||||
// person: [null],
|
||||
/* personOther: [''],
|
||||
members: [''],
|
||||
residence: [''],
|
||||
years: [null],
|
||||
family_details_form_remark:[''],
|
||||
|
||||
});*/
|
||||
|
||||
}
|
||||
initFamilyMembersDetails(inx,val) :void {
|
||||
const control = <FormArray>this.familyForm.controls['family_details']['controls'][inx].controls.family_members_details;
|
||||
// console.log("Controls for family members ",control.length);
|
||||
for (let vals of val) {
|
||||
let datas = this.fb.group({
|
||||
family_member_name: [vals.family_member_name || null, Validators.compose([])],
|
||||
family_member_relationship: [vals.family_member_relationship || null, Validators.compose([])],
|
||||
family_member_age: [vals.family_member_age || null, Validators.compose([])],
|
||||
family_member_earning_status: [vals.family_member_earning_status || null, Validators.compose([])],
|
||||
earning_segment: [vals.earning_segment || null, Validators.compose([])],
|
||||
earning_gross_income_per_month: [vals.earning_gross_income_per_month || null, Validators.compose([])],
|
||||
earning_name_of_the_employer_or_business: [vals.earning_name_of_the_employer_or_business || null, Validators.compose([])],
|
||||
earning_number_of_years_in_employment_or_business: [vals.earning_number_of_years_in_employment_or_business || null, Validators.compose([])],
|
||||
non_earning_occupation: [vals.non_earning_occupation || null, Validators.compose([])],
|
||||
non_earning_if_others: [vals.non_earning_if_others || null, Validators.compose([])],
|
||||
non_earning_if_retired_from: [vals.non_earning_if_retired_from || null, Validators.compose([])],
|
||||
})
|
||||
|
||||
// console.log("family member control",control);
|
||||
control.push(datas);
|
||||
}
|
||||
}
|
||||
|
||||
/*return this.fb.group({
|
||||
family_member_name:[''],
|
||||
family_member_relationship:[],
|
||||
family_member_age:[],
|
||||
family_member_earning_status:['',Validators.compose([])],
|
||||
//family_member_earnings
|
||||
earning_segment:[''],
|
||||
earning_gross_income_per_month:[''],
|
||||
earning_name_of_the_employer_or_business:[''],
|
||||
earning_number_of_years_in_employment_or_business:[''],
|
||||
|
||||
non_earning_occupation:[''],
|
||||
non_earning_if_others:[''],
|
||||
non_earning_if_retired_from:[''],
|
||||
});*/
|
||||
|
||||
|
||||
|
||||
add() :void {
|
||||
// const control=<FormArray>this.familyForm.controls['family_details'];
|
||||
//control.push(this.initFamilyDetails('chck'));
|
||||
this.initFamilyDetails(null);
|
||||
this.toast.pdTriggerappmessage("Family Details Added");
|
||||
}
|
||||
remove_family_details(i:number):void{
|
||||
const control=<FormArray>this.familyForm.controls['family_details'];
|
||||
control.removeAt(i);
|
||||
}
|
||||
getNumberOfFamilyMemberDetails(data)
|
||||
{
|
||||
|
||||
var datavalue=data;
|
||||
// console.log("Array",datavalue);
|
||||
let formData=<FormArray>this.familyForm.controls['family_details']['controls'][datavalue].controls;
|
||||
//console.log("form0",formData['total_number_of_family_members']);
|
||||
if(formData['total_number_of_family_members'].valid)
|
||||
{
|
||||
let totmem=formData['total_number_of_family_members'].value;
|
||||
console.log("Tot num",totmem);
|
||||
const control=<FormArray>this.familyForm.controls['family_details']['controls'][data].controls.family_members_details;
|
||||
console.log("Form Fields",control.length)
|
||||
if(totmem>=control.length){
|
||||
let len=totmem-control.length;
|
||||
//console.log("if",len);
|
||||
for( let i=0;i<len;i++){
|
||||
control.push(this.generateFamilyMembersDetailsGet())
|
||||
}
|
||||
}
|
||||
else if (totmem < control.length) {
|
||||
// console.log("For Slice",control.controls.length)
|
||||
//control.controls.slice(1, 2);
|
||||
// console.log(this.total_number_of_family_members);
|
||||
var numbe=control.length-totmem;
|
||||
console.log("For Remove",numbe);
|
||||
for(let i=control.length;i>=totmem;i--)
|
||||
{
|
||||
control.removeAt(i);
|
||||
}
|
||||
|
||||
// var nn=control.length-totmem;
|
||||
// control.controls = [];
|
||||
/*for (let i = 0; i < totmem; i++) {
|
||||
control.push(this.generateFamilyMembersDetailsGet());
|
||||
|
||||
}*/
|
||||
// this.initFamilyDetails(this.resValue['records'].family_details);
|
||||
// this.toast.pdTriggerappmessage("Please choose the number greater than"+control.length);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
const control=<FormArray>this.familyForm.controls['family_details']['controls'][data].controls.family_members_details;
|
||||
control.removeAt(control.length);
|
||||
control.controls=[];
|
||||
}
|
||||
/* const control=<FormArray>this.familyForm.controls['family_details']['controls'][data].controls.family_members_details;
|
||||
console.log("dataff",control);
|
||||
control.push(this.initFamilyMembersDetails());
|
||||
*/
|
||||
//console.log(formData['1']);
|
||||
}
|
||||
generateFamilyMembersDetailsGet(): FormGroup {
|
||||
return this.fb.group({
|
||||
family_member_name: ['', Validators.compose([])],
|
||||
family_member_relationship: ['', Validators.compose([])],
|
||||
family_member_age: ['', Validators.compose([])],
|
||||
family_member_earning_status: ['', Validators.compose([])],
|
||||
earning_segment: ['', Validators.compose([])],
|
||||
earning_gross_income_per_month: ['', Validators.compose([])],
|
||||
earning_name_of_the_employer_or_business: ['', Validators.compose([])],
|
||||
earning_number_of_years_in_employment_or_business: ['', Validators.compose([])],
|
||||
non_earning_occupation: ['', Validators.compose([])],
|
||||
non_earning_if_others: ['', Validators.compose([])],
|
||||
non_earning_if_retired_from: ['', Validators.compose([])],
|
||||
})
|
||||
}
|
||||
|
||||
getRelation() {
|
||||
let master_name = 'RELATIONSHIPS';
|
||||
this.qustCat.getcommondrop(master_name).subscribe(data => {
|
||||
@ -68,8 +293,49 @@ export class PdQuestionFamilyPage {
|
||||
this.relationData = data['records'].filter(rel=>rel.isactive ==1);
|
||||
}
|
||||
});
|
||||
|
||||
this.qustCat.getcommondrop('PERSONSMET').subscribe(res=>
|
||||
{
|
||||
if(res['dataStatus']==true)
|
||||
{
|
||||
this.filteredStates = res['records'].filter(per=>per.isactive==1);
|
||||
}
|
||||
});
|
||||
this.qustCat.getcommondrop('CUSTOMERSEGMENT').subscribe(res=>
|
||||
{
|
||||
if(res['dataStatus']==true)
|
||||
{
|
||||
this.cusSeg = res['records'].filter(seg=>seg.isactive==1);
|
||||
}
|
||||
});
|
||||
this.qustCat.getcommondrop('RESIDENCEOWNERSHIP').subscribe(res=>
|
||||
{
|
||||
if(res['dataStatus']==true)
|
||||
{
|
||||
this.ownerShip = res['records'].filter(own=>own.isactive==1);
|
||||
}
|
||||
});
|
||||
this.qustCat.getcommondrop('STATE').subscribe(res=>
|
||||
{
|
||||
if(res['dataStatus']==true){
|
||||
this.stateData=res['records'].filter(item=>item.isactive==1);
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
getCity(e,i){
|
||||
console.log("E value",e);
|
||||
// this.cityData = this.wholeCityData.filter(city=>city.fk_state_id == e);
|
||||
// this._pd.retriveForm(params).subscribe(data => {
|
||||
this.qustCat.getStateWiseCities(e).subscribe(data=>{
|
||||
if (data['dataStatus'] == true) {
|
||||
console.log(data.status);
|
||||
this.cityData[i] = data.records.cities;
|
||||
this.pincodeData[i] = data.records.pincode;
|
||||
console.log(this.cityData);
|
||||
}
|
||||
});
|
||||
}
|
||||
getoccupation()
|
||||
{
|
||||
let master_name = 'OCCUPATIONMEMBERS';
|
||||
@ -80,66 +346,113 @@ getoccupation()
|
||||
}
|
||||
});
|
||||
}
|
||||
createMembers(): FormGroup {
|
||||
/* createMembers(): FormGroup {
|
||||
return this.fb.group({
|
||||
earning_member_name : [null],
|
||||
earning_member_age : [null],
|
||||
relation: [null],
|
||||
segment: [null],
|
||||
income: [null],
|
||||
employerName: [null],
|
||||
employer_name: [null],
|
||||
});
|
||||
}
|
||||
|
||||
count :number = 0;
|
||||
addearningMembers()
|
||||
{
|
||||
this.items = this.familyForm.get('earningMembers') as FormArray;
|
||||
this.items.push(this.createMembers());
|
||||
this.count++;
|
||||
this.checkfamilystatus(this.count,'');
|
||||
console.log(120,this.count);
|
||||
|
||||
}
|
||||
|
||||
deleteEarningMembers(i)
|
||||
{
|
||||
|
||||
if(this.items.length==1)
|
||||
{
|
||||
this.familyForm.controls['earningMembers'].reset();
|
||||
}else{
|
||||
this.items.removeAt(i);
|
||||
}
|
||||
this.count--;
|
||||
console.log(134,this.count);
|
||||
this.checkfamilystatus(this.count,'');
|
||||
}
|
||||
createNonMembers(): FormGroup {
|
||||
return this.fb.group({
|
||||
non_earning_member_name : [''],
|
||||
non_earning_member_age : [''],
|
||||
relationship: [null],
|
||||
occupation: [null],
|
||||
retired: [null],
|
||||
others_occupation:[null],
|
||||
});
|
||||
}
|
||||
addMembers()
|
||||
{
|
||||
this.membersitem =this.familyForm.get('nonEarningMembers') as FormArray;
|
||||
this.count++;
|
||||
this.checkfamilystatus(this.count,'');
|
||||
this.membersitem.push(this.createNonMembers());
|
||||
|
||||
}
|
||||
deleteMembers(i)
|
||||
{
|
||||
if(this.membersitem.length==1){
|
||||
this.familyForm.controls['nonEarningMembers'].reset();
|
||||
|
||||
}else{
|
||||
this.membersitem.removeAt(i);
|
||||
}
|
||||
this.count--;
|
||||
this.checkfamilystatus(this.count,'');
|
||||
}
|
||||
checkfamilystatus(count,familystatus)
|
||||
{
|
||||
if(familystatus !='' && familystatus !==undefined){
|
||||
|
||||
}else{
|
||||
familystatus = this.familyForm.get('members').value;
|
||||
}
|
||||
console.log(familystatus);
|
||||
console.log(count);
|
||||
if(familystatus !== null ){
|
||||
if(familystatus == count)
|
||||
{
|
||||
|
||||
this.familyAddStatus = true;
|
||||
}else
|
||||
{
|
||||
this.familyAddStatus = false;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
/* Old
|
||||
savepdfamily(answerData)
|
||||
{
|
||||
console.log(answerData);
|
||||
let records: any = {};
|
||||
records.no_of_years = answerData.years;
|
||||
if (answerData.ownership == 'Others') {
|
||||
records.ownership = answerData.ownershipOther;
|
||||
} else {
|
||||
records.ownership = answerData.ownership;
|
||||
}
|
||||
if (answerData.ownership == '4') {
|
||||
records.ownershipOther = answerData.ownershipOther;
|
||||
}
|
||||
records.residence = answerData.residence;
|
||||
if (answerData.ownership == 'Rented') {
|
||||
if (answerData.ownership == '3') {
|
||||
records.what_rent = answerData.rent;
|
||||
}
|
||||
if (answerData.person == 'Other') {
|
||||
records.person_met = answerData.personOther.value;
|
||||
} else {
|
||||
records.person_met = answerData.person;
|
||||
}
|
||||
// if (answerData.person == '8') {
|
||||
// records.person_met = answerData.personOther.value;
|
||||
// } else {
|
||||
// records.person_met = answerData.person;
|
||||
// }
|
||||
records.ownership = answerData.ownership
|
||||
records.family_members = answerData.members;
|
||||
records.earning_members = answerData.earningMembers;
|
||||
records.non_earning_members = answerData.nonEarningMembers;
|
||||
records.pdid = this.pdDetails.pd_id;
|
||||
records.formid = '335';
|
||||
records.formid = this.FormId.form_id;
|
||||
records.fk_createdby = this.users;
|
||||
records.family_details_form_remark = answerData.family_details_form_remark;
|
||||
console.log('params', records);
|
||||
@ -152,13 +465,124 @@ savepdfamily(answerData)
|
||||
this.navCtrl.pop();
|
||||
}
|
||||
})
|
||||
}*/
|
||||
|
||||
savepdfamily(answerData)
|
||||
{
|
||||
|
||||
let records:any={};
|
||||
|
||||
records=this.familyForm.value;
|
||||
console.log("family details",records.family_details);
|
||||
//console.log("Records",records);
|
||||
|
||||
Object.keys(records).forEach((key)=>(records[key]==null)&& delete records[key]);
|
||||
records.pdid=this.pdDetails.pd_id;
|
||||
records.formid=this.FormId.form_id;
|
||||
records.fk_createdby=this.users;
|
||||
//console.log(JSON.stringify(records));
|
||||
this.qustCat.saveForm(records).subscribe(res=>{
|
||||
// console.log("Result",);
|
||||
|
||||
this.toast.pdTriggerappmessage("Record Saved Successfully");
|
||||
this.navCtrl.pop();
|
||||
|
||||
},err=>{
|
||||
console.log(err);
|
||||
this.toast.pdTriggerappmessage("Some Fields value is Missing Please Fill It");
|
||||
})
|
||||
|
||||
/*let records: any = {};
|
||||
records.no_of_years = answerData.residence_No_of_years;
|
||||
if (answerData.residence_ownership == '4') {
|
||||
records.ownershipOther = answerData.ownershipOther;
|
||||
}
|
||||
//records.residence = answerData.residence;
|
||||
if (answerData.residence_ownership == '3') {
|
||||
records.what_rent = answerData.rent;
|
||||
}
|
||||
// if (answerData.person == '8') {
|
||||
// records.person_met = answerData.personOther.value;
|
||||
// } else {
|
||||
// records.person_met = answerData.person;
|
||||
// }
|
||||
records.ownership = answerData.residence_ownership
|
||||
records.family_members = answerData.total_number_of_family_members;
|
||||
records.earning_members = answerData.earningMembers;
|
||||
records.non_earning_members = answerData.nonEarningMembers;
|
||||
records.pdid = this.pdDetails.pd_id;
|
||||
records.formid = this.FormId.form_id;
|
||||
records.fk_createdby = this.users;
|
||||
records.family_details_form_remark = answerData.family_details_form_remark;
|
||||
console.log('params', records);
|
||||
this.qustCat.saveForm(records).subscribe(res=>
|
||||
{
|
||||
//console.log(res);
|
||||
if(res['dataStatus']==true)
|
||||
{
|
||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||
this.navCtrl.pop();
|
||||
}
|
||||
})*/
|
||||
}
|
||||
generateFamilyMembersDetailsGetData(data){
|
||||
var result = Object.keys(data).map(function (key) {
|
||||
return data[key];
|
||||
});
|
||||
if (result.length > 0) {
|
||||
for (let val of result) {
|
||||
const control = <FormArray>this.familyForm.controls['family_members_details'];
|
||||
control.push(this.initgenerateFamilyMembersDetailsGet(val));
|
||||
}
|
||||
}
|
||||
}
|
||||
initgenerateFamilyMembersDetailsGet(val):FormGroup{
|
||||
return this.fb.group({
|
||||
family_member_name: [val.family_member_name, Validators.compose([])],
|
||||
family_member_relationship: [val.family_member_relationship, Validators.compose([])],
|
||||
family_member_age: [val.family_member_age, Validators.compose([])],
|
||||
family_member_earning_status: [val.family_member_earning_status, Validators.compose([])],
|
||||
earning_segment: [val.earning_segment, Validators.compose([])],
|
||||
earning_gross_income_per_month: [val.earning_gross_income_per_month, Validators.compose([])],
|
||||
earning_name_of_the_employer_or_business: [val.earning_name_of_the_employer_or_business, Validators.compose([])],
|
||||
earning_number_of_years_in_employment_or_business: [val.earning_number_of_years_in_employment_or_business, Validators.compose([])],
|
||||
non_earning_occupation: [val.non_earning_occupation, Validators.compose([])],
|
||||
non_earning_if_others: [val.non_earning_if_others, Validators.compose([])],
|
||||
non_earning_if_retired_from: [val.non_earning_if_retired_from, Validators.compose([])],
|
||||
})
|
||||
}
|
||||
resValue:any;
|
||||
|
||||
getFamilyData()
|
||||
{
|
||||
let earning:any = [];
|
||||
let records={'pd_id':this.pdDetails.pd_id,'pd_form_id':this.FormId.form_id};
|
||||
|
||||
this.qustCat.retiverForm(records).subscribe(res=>{
|
||||
//console.log("result",JSON.stringify(res));
|
||||
|
||||
console.log("datastatus",res['dataStatus']);
|
||||
|
||||
if(res['status']==200){
|
||||
console.log("getValue records",res['records'].family_details);
|
||||
this.familyForm.controls.family_details_form_remark.setValue(res['records'].family_details_form_remark);
|
||||
this.resValue=res;
|
||||
this.initFamilyDetails(res['records'].family_details);
|
||||
|
||||
}
|
||||
else{
|
||||
console.log("no data");
|
||||
this.initFamilyDetails(null);
|
||||
|
||||
}
|
||||
//this.generateFamilyMembersDetailsGetData(res['records'].family_members_details);
|
||||
|
||||
//console.log("datastatus number",res[0].status)
|
||||
},err=>{
|
||||
console.log(err);
|
||||
})
|
||||
/*let earning:any = [];
|
||||
let non_earning:any = [];
|
||||
let records = {'pd_id':this.pdDetails.pd_id,'pd_form_id':'335'}
|
||||
let records = {'pd_id':this.pdDetails.pd_id,'pd_form_id':this.FormId.form_id}
|
||||
this.qustCat.retiverForm(records).subscribe(res=>
|
||||
{
|
||||
if(res['dataStatus']==true)
|
||||
@ -167,54 +591,77 @@ savepdfamily(answerData)
|
||||
|
||||
return res['records'].non_earning_members[key];
|
||||
});
|
||||
console.log(non_earning);
|
||||
//console.log(non_earning);
|
||||
this.familyForm.controls['family_details_form_remark'].setValue(res['records'].family_details_form_remark);
|
||||
earning = Object.keys(res['records'].earning_members).map(function(key) {
|
||||
return res['records'].earning_members[key];
|
||||
});
|
||||
console.log(earning);
|
||||
let familyDetails = res['records'];
|
||||
this.familyForm.controls['person'].setValue(familyDetails.person_met);
|
||||
this.checkfamilystatus(non_earning.length + earning.length,familyDetails.family_members);
|
||||
// this.familyForm.controls['person'].setValue(familyDetails.person_met);
|
||||
this.familyForm.controls['personOther'].setValue(familyDetails.personOther);
|
||||
this.familyForm.controls['members'].setValue(familyDetails.family_members);
|
||||
this.familyForm.controls['residence'].setValue(familyDetails.residence);
|
||||
this.familyForm.controls['years'].setValue(familyDetails.no_of_years);
|
||||
this.familyForm.controls['ownership'].setValue(familyDetails.ownership);
|
||||
this.familyForm.controls['ownershipOther'].setValue(familyDetails.ownershipOther);
|
||||
this.familyForm.controls['rent'].setValue(familyDetails.rent);
|
||||
this.familyForm.controls['rent'].setValue(familyDetails.what_rent);
|
||||
// this.familyForm.controls['earningMembers'].setValue(earning);
|
||||
// for(this.)
|
||||
console.log(189);
|
||||
this.items = this.familyForm.get('earningMembers') as FormArray;
|
||||
this.membersitem =this.familyForm.get('nonEarningMembers') as FormArray;
|
||||
console.log(192);
|
||||
if(earning.length==0)
|
||||
{
|
||||
this.items.push(this.createMembers());
|
||||
this.addearningMembers();
|
||||
console.log('if');
|
||||
}else
|
||||
{
|
||||
earning.forEach(datas => {
|
||||
this.count++;
|
||||
this.items.push(this.createMembers());
|
||||
});
|
||||
}
|
||||
console.log('else',earning);
|
||||
console.log(this.items);
|
||||
this.familyForm.controls['earningMembers'].setValue(earning);
|
||||
|
||||
}
|
||||
//console.log(201,earning);
|
||||
|
||||
if(non_earning.length==0)
|
||||
{
|
||||
this.membersitem.push(this.createNonMembers());
|
||||
this.addMembers();
|
||||
}else
|
||||
{
|
||||
non_earning.forEach(datas => {
|
||||
this.count++;
|
||||
this.membersitem.push(this.createNonMembers());
|
||||
|
||||
});
|
||||
}
|
||||
this.familyForm.controls['nonEarningMembers'].setValue(non_earning);
|
||||
// this.checkfamilystatus(this.count);
|
||||
}
|
||||
|
||||
// for(let earningDetails of earning){
|
||||
// this.items = this.familyForm.get('earningMembers') as FormArray;
|
||||
// this.items.push(earning);
|
||||
// }
|
||||
|
||||
}else
|
||||
{
|
||||
this.addearningMembers();
|
||||
this.addMembers();
|
||||
}
|
||||
})
|
||||
}) */
|
||||
}
|
||||
initSetValue(records):void{
|
||||
for(let val of records){
|
||||
let formData:FormGroup=this.fb.group({
|
||||
selected_person:[val.selected_person],
|
||||
residence_place:[val.residence_place]
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,180 @@
|
||||
<ion-header>
|
||||
|
||||
<ion-navbar color="optblue">
|
||||
<button ion-button menuToggle>
|
||||
<ion-icon name="menu"></ion-icon>
|
||||
</button>
|
||||
<ion-title *ngIf="!viewchange">Family Category</ion-title>
|
||||
|
||||
|
||||
</ion-navbar>
|
||||
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-content padding>
|
||||
<form class="address" [formGroup]="familyForm">
|
||||
<mat-card>
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Person Met" formControlName="person">
|
||||
<mat-option *ngFor="let state of filteredStates" [value]="state">
|
||||
{{state}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
{{person}}
|
||||
<mat-form-field *ngIf="person =='Other'" style="width: 100%">
|
||||
<input matInput placeholder="Enter the relationship" formControlName="personOther">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="No. Of family members" formControlName="members">
|
||||
</mat-form-field>
|
||||
</mat-card>
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>Earning Members
|
||||
<p>
|
||||
</mat-card-header>
|
||||
<div formArrayName="earningMembers">
|
||||
<div *ngFor="let item of familyForm.get('earningMembers').controls; let i=index;let last = last"
|
||||
[formGroupName]="i">
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Relation" formControlName="relation">
|
||||
<mat-option value="{{relation.relationship_id}}"
|
||||
*ngFor="let relation of relationData">
|
||||
{{relation.name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Segment" formControlName="segment">
|
||||
<mat-option value="Salaried">Salaried</mat-option>
|
||||
<mat-option value="SENP">SENP</mat-option>
|
||||
<mat-option value="SEP">SEP</mat-option>
|
||||
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Income / Revenue"
|
||||
formControlName="income">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Name of Employer / Business"
|
||||
formControlName="employerName">
|
||||
</mat-form-field>
|
||||
|
||||
<ion-buttons end >
|
||||
<ion-col col-3>
|
||||
<a (click)="addearningMembers()" *ngIf="last">
|
||||
<ion-icon name="md-add" color="optblue" style="font-size: 22px;"></ion-icon></a>
|
||||
</ion-col>
|
||||
<ion-col col-3>
|
||||
<a (click)="deleteEarningMembers(i)">
|
||||
<ion-icon name="md-close" color="optblue" style="font-size: 22px;"></ion-icon></a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
|
||||
|
||||
</mat-card-content>
|
||||
</div>
|
||||
</div>
|
||||
</mat-card>
|
||||
<br/>
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>Non Earning Members
|
||||
<p>
|
||||
</mat-card-header>
|
||||
<div formArrayName="nonEarningMembers">
|
||||
<div *ngFor="let members of familyForm.get('nonEarningMembers').controls; let i=index;let last = last"
|
||||
[formGroupName]="i">
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Relation"
|
||||
formControlName="relationship">
|
||||
<mat-option value="{{relation.relationship_id}}"
|
||||
*ngFor="let relation of relationData">
|
||||
{{relation.name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Occupation"
|
||||
formControlName="occupation">
|
||||
<mat-option value="{{occupation.occupation_non_earning_member_id}}"
|
||||
*ngFor="let occupation of occupationData">{{occupation.name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Retired From"
|
||||
formControlName="retired">
|
||||
</mat-form-field>
|
||||
<ion-buttons end >
|
||||
<ion-col col-3>
|
||||
<a (click)="addMembers()" *ngIf="last">
|
||||
<ion-icon name="md-add" color="optblue" style="font-size: 22px;"></ion-icon></a>
|
||||
</ion-col>
|
||||
<ion-col offset-3 col-3>
|
||||
<a (click)="deleteMembers(i)">
|
||||
<ion-icon name="md-close" color="optblue" style="font-size: 22px;"></ion-icon></a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
|
||||
|
||||
|
||||
</mat-card-content>
|
||||
</div>
|
||||
</div>
|
||||
</mat-card>
|
||||
<br/>
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>Residence
|
||||
<p>
|
||||
</mat-card-header>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Where is the residence"
|
||||
formControlName="residence">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="No.of yrs" formControlName="years">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Ownership" formControlName="ownership">
|
||||
<mat-option value="Self">Self Owned</mat-option>
|
||||
<mat-option value="Family">Family Owned</mat-option>
|
||||
<mat-option value="Rented">Rented</mat-option>
|
||||
<mat-option value="Others">Others</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%" *ngIf="ownership =='Others'">
|
||||
<input matInput placeholder="Please specify" formControlName="ownershipOther">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%" *ngIf="ownership =='Rented'">
|
||||
<input matInput placeholder="what rent"
|
||||
formControlName="rent">
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<br/>
|
||||
<mat-card>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Remarks"
|
||||
formControlName="family_details_form_remark">
|
||||
</mat-form-field>
|
||||
</mat-card>
|
||||
<ion-row>
|
||||
|
||||
|
||||
|
||||
<!-- <ion-buttons >
|
||||
<ion-button color="optblue" full[disabled]="!pdforms.valid" mat-raised-button style="width:100%" (click)="savepdDetails(pdforms.value)">Save <ion-icon name="md-disc"></ion-icon></ion-button> -->
|
||||
<button ion-button full color="optblue" (click)="savepdfamily(familyForm.value)"> Save</button>
|
||||
<!-- </ion-buttons> -->
|
||||
|
||||
</ion-row>
|
||||
</form>
|
||||
</ion-content>
|
||||
@ -0,0 +1,3 @@
|
||||
page-pd-question-family {
|
||||
|
||||
}
|
||||
220
src/pages/pd-question/pd-question-family1/pd-question-family.ts
Normal file
220
src/pages/pd-question/pd-question-family1/pd-question-family.ts
Normal file
@ -0,0 +1,220 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
||||
import { FormGroup, FormBuilder, FormArray } from '@angular/forms';
|
||||
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
||||
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
||||
import { ToastProvider } from '../../../providers/common-provider/toast';
|
||||
|
||||
/**
|
||||
* Generated class for the PdQuestionFamilyPage page.
|
||||
*
|
||||
* See https://ionicframework.com/docs/components/#navigation for more info on
|
||||
* Ionic pages and navigation.
|
||||
*/
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'page-pd-question-family',
|
||||
templateUrl: 'pd-question-family.html',
|
||||
})
|
||||
export class PdQuestionFamilyPage {
|
||||
|
||||
users: any;
|
||||
pdDetails: any;
|
||||
occupationData: any;
|
||||
membersitem: FormArray;
|
||||
items: FormArray;
|
||||
relationData: any;
|
||||
familyForm: FormGroup;
|
||||
filteredStates: any = [
|
||||
'Co-Applicant 1 to x',
|
||||
'Accountant',
|
||||
'Manager',
|
||||
'Relative of the applicant',
|
||||
'Friend of the Applicant',
|
||||
'DSA',
|
||||
'Other'
|
||||
];
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,public aws:AwsServiceProvider,public toast:ToastProvider) {
|
||||
this.pdDetails = this.navParams.get('pdDetails');
|
||||
this.users = this.aws.getlocale();
|
||||
this.getFamilyData();
|
||||
this.familyForm = this.fb.group({
|
||||
person: [null],
|
||||
personOther: [null],
|
||||
members: [null],
|
||||
residence: [null],
|
||||
years: [null],
|
||||
ownership: [null],
|
||||
ownershipOther: [null],
|
||||
rent: [null],
|
||||
family_details_form_remark:[null],
|
||||
earningMembers: this.fb.array([]),
|
||||
nonEarningMembers: this.fb.array([])
|
||||
});
|
||||
this.getRelation();
|
||||
this.getoccupation();
|
||||
}
|
||||
|
||||
ionViewDidLoad() {
|
||||
console.log('ionViewDidLoad PdQuestionFamilyPage');
|
||||
}
|
||||
getRelation() {
|
||||
let master_name = 'RELATIONSHIPS';
|
||||
this.qustCat.getcommondrop(master_name).subscribe(data => {
|
||||
//console.log('data', data);
|
||||
|
||||
if(data['dataStatus'] == true){
|
||||
this.relationData = data['records'].filter(rel=>rel.isactive ==1);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
getoccupation()
|
||||
{
|
||||
let master_name = 'OCCUPATIONMEMBERS';
|
||||
this.qustCat.getcommondrop(master_name).subscribe(data => {
|
||||
//console.log('data', data);
|
||||
if(data['dataStatus']==true){
|
||||
this.occupationData = data['records'].filter(occ=>occ.isactive ==1);
|
||||
}
|
||||
});
|
||||
}
|
||||
createMembers(): FormGroup {
|
||||
return this.fb.group({
|
||||
relation: [null],
|
||||
segment: [null],
|
||||
income: [null],
|
||||
employerName: [null],
|
||||
});
|
||||
}
|
||||
|
||||
addearningMembers()
|
||||
{
|
||||
this.items = this.familyForm.get('earningMembers') as FormArray;
|
||||
this.items.push(this.createMembers());
|
||||
}
|
||||
|
||||
deleteEarningMembers(i)
|
||||
{
|
||||
this.items.removeAt(i);
|
||||
}
|
||||
createNonMembers(): FormGroup {
|
||||
return this.fb.group({
|
||||
relationship: [null],
|
||||
occupation: [null],
|
||||
retired: [null],
|
||||
});
|
||||
}
|
||||
addMembers()
|
||||
{
|
||||
this.membersitem =this.familyForm.get('nonEarningMembers') as FormArray;
|
||||
this.membersitem.push(this.createNonMembers());
|
||||
}
|
||||
deleteMembers(i)
|
||||
{
|
||||
this.membersitem.removeAt(i);
|
||||
}
|
||||
|
||||
savepdfamily(answerData)
|
||||
{
|
||||
console.log(answerData);
|
||||
let records: any = {};
|
||||
records.no_of_years = answerData.years;
|
||||
if (answerData.ownership == 'Others') {
|
||||
records.ownership = answerData.ownershipOther;
|
||||
} else {
|
||||
records.ownership = answerData.ownership;
|
||||
}
|
||||
records.residence = answerData.residence;
|
||||
if (answerData.ownership == 'Rented') {
|
||||
records.what_rent = answerData.rent;
|
||||
}
|
||||
if (answerData.person == 'Other') {
|
||||
records.person_met = answerData.personOther.value;
|
||||
} else {
|
||||
records.person_met = answerData.person;
|
||||
}
|
||||
records.family_members = answerData.members;
|
||||
records.earning_members = answerData.earningMembers;
|
||||
records.non_earning_members = answerData.nonEarningMembers;
|
||||
records.pdid = this.pdDetails.pd_id;
|
||||
records.formid = '335';
|
||||
records.fk_createdby = this.users;
|
||||
records.family_details_form_remark = answerData.family_details_form_remark;
|
||||
console.log('params', records);
|
||||
this.qustCat.saveForm(records).subscribe(res=>
|
||||
{
|
||||
//console.log(res);
|
||||
if(res['dataStatus']==true)
|
||||
{
|
||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||
this.navCtrl.pop();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
getFamilyData()
|
||||
{
|
||||
let earning:any = [];
|
||||
let non_earning:any = [];
|
||||
let records = {'pd_id':this.pdDetails.pd_id,'pd_form_id':'335'}
|
||||
this.qustCat.retiverForm(records).subscribe(res=>
|
||||
{
|
||||
if(res['dataStatus']==true)
|
||||
{
|
||||
non_earning = Object.keys(res['records'].non_earning_members).map(function(key) {
|
||||
|
||||
return res['records'].non_earning_members[key];
|
||||
});
|
||||
console.log(non_earning);
|
||||
this.familyForm.controls['family_details_form_remark'].setValue(res['records'].family_details_form_remark);
|
||||
earning = Object.keys(res['records'].earning_members).map(function(key) {
|
||||
return res['records'].earning_members[key];
|
||||
});
|
||||
console.log(earning);
|
||||
let familyDetails = res['records'];
|
||||
this.familyForm.controls['person'].setValue(familyDetails.person_met);
|
||||
this.familyForm.controls['personOther'].setValue(familyDetails.personOther);
|
||||
this.familyForm.controls['members'].setValue(familyDetails.family_members);
|
||||
this.familyForm.controls['residence'].setValue(familyDetails.residence);
|
||||
this.familyForm.controls['years'].setValue(familyDetails.no_of_years);
|
||||
this.familyForm.controls['ownership'].setValue(familyDetails.ownership);
|
||||
this.familyForm.controls['ownershipOther'].setValue(familyDetails.ownershipOther);
|
||||
this.familyForm.controls['rent'].setValue(familyDetails.rent);
|
||||
// this.familyForm.controls['earningMembers'].setValue(earning);
|
||||
// for(this.)
|
||||
this.items = this.familyForm.get('earningMembers') as FormArray;
|
||||
this.membersitem =this.familyForm.get('nonEarningMembers') as FormArray;
|
||||
if(earning.length==0)
|
||||
{
|
||||
this.items.push(this.createMembers());
|
||||
}else
|
||||
{
|
||||
earning.forEach(datas => {
|
||||
this.items.push(this.createMembers());
|
||||
});
|
||||
}
|
||||
this.familyForm.controls['earningMembers'].setValue(earning);
|
||||
|
||||
if(non_earning.length==0)
|
||||
{
|
||||
this.membersitem.push(this.createNonMembers());
|
||||
}else
|
||||
{
|
||||
non_earning.forEach(datas => {
|
||||
this.membersitem.push(this.createNonMembers());
|
||||
|
||||
});
|
||||
}
|
||||
this.familyForm.controls['nonEarningMembers'].setValue(non_earning);
|
||||
|
||||
// for(let earningDetails of earning){
|
||||
// this.items = this.familyForm.get('earningMembers') as FormArray;
|
||||
// this.items.push(earning);
|
||||
// }
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -76,7 +76,7 @@ export class PdQuestionGeneralInfoPage {
|
||||
console.log(this.pdDetails);
|
||||
this.users = this.aws.getlocale();
|
||||
this.getdropdown();
|
||||
this.getGeneralForm();
|
||||
|
||||
this.generalForm = this.fb.group({
|
||||
pdid:this.pdDetails.pd_id,
|
||||
formid:this.FormId.form_id,
|
||||
@ -130,6 +130,13 @@ export class PdQuestionGeneralInfoPage {
|
||||
this.i=0;
|
||||
|
||||
}
|
||||
|
||||
ionViewDidLoad() {
|
||||
this.pd_applicants_details.pop();
|
||||
console.log('ionViewDidLoad PdQuestionGeneralInfoPage');
|
||||
this.getGeneralForm()
|
||||
}
|
||||
|
||||
initlistv(data,purpose) :void
|
||||
{
|
||||
console.log("full data length",this.lengthv.individuals.length);
|
||||
@ -196,9 +203,9 @@ export class PdQuestionGeneralInfoPage {
|
||||
qualificationById(data):string{
|
||||
//console.log("qualification List",this.qualificationList.length)
|
||||
console.log("value",data)
|
||||
for(let i=0 ;i<this.qualificationList.length;i++){
|
||||
if(data==this.qualificationList[i].qualification_id){
|
||||
this.qual_name=this.qualificationList[i].qualification_name
|
||||
for(let i of this.qualificationList){
|
||||
if(data==i.qualification_id){
|
||||
this.qual_name=i.qualification_name
|
||||
console.log("i",this.qual_name)
|
||||
return this.qual_name
|
||||
}
|
||||
@ -288,10 +295,7 @@ export class PdQuestionGeneralInfoPage {
|
||||
}
|
||||
|
||||
}
|
||||
ionViewDidLoad() {
|
||||
this.pd_applicants_details.pop();
|
||||
console.log('ionViewDidLoad PdQuestionGeneralInfoPage');
|
||||
}
|
||||
|
||||
|
||||
initIndividuals():void{
|
||||
let formData : FormGroup=this.fb.group({
|
||||
|
||||
@ -104,13 +104,14 @@ export class PdQuestionLoansPage {
|
||||
}
|
||||
console.log(this.mortagetypeAccess);
|
||||
|
||||
this.getLoanDetails();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
ionViewDidLoad() {
|
||||
console.log('ionViewDidLoad PdQuestionLoansPage');
|
||||
this.getLoanDetails();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<button ion-button menuToggle>
|
||||
<ion-icon name="menu"></ion-icon>
|
||||
</button>
|
||||
<ion-title *ngIf="!viewchange">Other Income Category</ion-title>
|
||||
<ion-title *ngIf="!viewchange">{{FormId.form_name}}</ion-title>
|
||||
|
||||
|
||||
</ion-navbar>
|
||||
@ -14,39 +14,62 @@
|
||||
|
||||
<ion-content padding>
|
||||
<form [formGroup]="otherIncomeForm" class="address">
|
||||
<mat-form-field style="width: 100%" >
|
||||
<!-- <mat-form-field style="width: 100%" >
|
||||
<mat-select placeholder="Other Income"
|
||||
formControlName="other_income" (selectionChange)="checkotherDetails($event.value)">
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</mat-form-field> -->
|
||||
<mat-card style="width: 100%">
|
||||
<p>Other Income</p>
|
||||
<mat-radio-group formControlName="other_income">
|
||||
<mat-radio-button value="Yes">Yes</mat-radio-button>
|
||||
|
||||
<mat-radio-button value="No">No</mat-radio-button>
|
||||
|
||||
</mat-radio-group>
|
||||
</mat-card>
|
||||
<mat-card *ngIf="otherIncomeForm.controls.other_income.value == 'Yes'">
|
||||
<mat-card-header>
|
||||
|
||||
</mat-card-header>
|
||||
|
||||
<div formArrayName="income_details">
|
||||
<div *ngFor="let details of otherIncomeForm.get('income_details').controls; let i=index;let last=last;"
|
||||
[formGroupName]="i">
|
||||
<h3>Loan Details{{i+1}}</h3>
|
||||
<h4>Income Details {{i+1}}</h4>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Source"
|
||||
formControlName="source">
|
||||
<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 and Others</mat-option>
|
||||
<mat-option *ngFor="let source of sourceIncome" [value]="source.id">{{source.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Amount" formControlName="amount">
|
||||
<mat-form-field style="width: 100%;"*ngIf="details.get('source').value == '1'">
|
||||
<input matInput placeholder="Specify Others Source"
|
||||
formControlName="others_source">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Income Earned By" formControlName="income_earned_by">
|
||||
<mat-option *ngFor="let person of incomeEarnedBy" [value]="person">{{person}}</mat-option>
|
||||
<mat-option value="others">Others</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="details.get('income_earned_by').value == 'others'">
|
||||
<input matInput placeholder="Specify Income Earned By" formControlName="others_income_earned_by" autocomplete="off">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput type="number" placeholder="Amount" formControlName="amount" (keyup)=inWords($event,i)>
|
||||
<mat-hint align="end" *ngIf="details.get('amount').value != '' ">{{"₹"}} {{amtInWords[i]}}</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Frequency" formControlName="frequency">
|
||||
<mat-option value="{{frq.frequency_id}}" *ngFor="let frq of frequencyData">{{frq.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%"*ngIf="details.get('frequency').value == 1">
|
||||
<input matInput placeholder="Specify Others Frequency"
|
||||
formControlName="others_frequency">
|
||||
</mat-form-field>
|
||||
<ion-buttons end>
|
||||
<ion-col col-3>
|
||||
<a (click)="addIncomeDetails()" *ngIf="last">
|
||||
@ -61,11 +84,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</mat-card>
|
||||
<br/>
|
||||
|
||||
<mat-card>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Remarks"
|
||||
formControlName="otherincome_remarks">
|
||||
<textarea matInput placeholder="Remarks"
|
||||
formControlName="otherincome_remarks"></textarea>
|
||||
</mat-form-field>
|
||||
</mat-card>
|
||||
<ion-row>
|
||||
|
||||
@ -1,3 +1,17 @@
|
||||
page-pd-question-other-income {
|
||||
mat-form-field{
|
||||
width:100%
|
||||
}
|
||||
mat-hint{
|
||||
font-size:11px;
|
||||
}
|
||||
mat-card{
|
||||
margin-bottom: 15px;
|
||||
border-radius: 10px !important;
|
||||
box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.56), 0 4px 25px 0 rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2) !important;
|
||||
}
|
||||
.mat-card-content{
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import { FormGroup, FormBuilder,FormArray } from '@angular/forms';
|
||||
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
||||
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
||||
import { ToastProvider } from '../../../providers/common-provider/toast';
|
||||
import { ConstantsProvider } from '../../../providers/constants/constants'
|
||||
|
||||
/**
|
||||
* Generated class for the PdQuestionOtherIncomePage page.
|
||||
@ -19,16 +20,26 @@ import { ToastProvider } from '../../../providers/common-provider/toast';
|
||||
})
|
||||
export class PdQuestionOtherIncomePage {
|
||||
|
||||
FormId: any;
|
||||
custSeg: any;
|
||||
sourceIncome: any;
|
||||
otherIncomeDetails: any;
|
||||
users: any;
|
||||
pdDetails: any;
|
||||
questionDetails: any;
|
||||
pdid:any;
|
||||
incomeEarnedBy:any;
|
||||
amtInWords:any=[];
|
||||
|
||||
frequencyData: any;
|
||||
otherIncomeForm: FormGroup;
|
||||
incomeDetails:FormArray;
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,public aws:AwsServiceProvider,public toast:ToastProvider) {
|
||||
this.questionDetails = this.navParams.get('questionDetails');
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,public aws:AwsServiceProvider,public toast:ToastProvider, public constant:ConstantsProvider) {
|
||||
|
||||
this.pdDetails = this.navParams.get('pdDetails');
|
||||
this.pdid=this.pdDetails.pd_id;
|
||||
console.log("pdid",this.pdid);
|
||||
this.FormId = this.navParams.get('FormId');
|
||||
|
||||
this.users = this.aws.getlocale();
|
||||
|
||||
this.otherIncomeForm = this.fb.group({
|
||||
@ -36,9 +47,11 @@ export class PdQuestionOtherIncomePage {
|
||||
otherincome_remarks:[null],
|
||||
income_details: this.fb.array([])
|
||||
});
|
||||
this.getOtherIncome();
|
||||
this.getFrequency();
|
||||
|
||||
this.getOtherIncome();
|
||||
|
||||
//this.incomeDetails=this.otherIncomeForm.get('income_details')as FormArray
|
||||
//this.incomeDetails.push(this.createDetail())
|
||||
}
|
||||
|
||||
ionViewDidLoad() {
|
||||
@ -47,9 +60,13 @@ export class PdQuestionOtherIncomePage {
|
||||
|
||||
createDetail():FormGroup {
|
||||
return this.fb.group({
|
||||
source: [null],
|
||||
amount: [null],
|
||||
frequency: [null],
|
||||
source: [''],
|
||||
others_source : [''],
|
||||
income_earned_by:[''],
|
||||
others_income_earned_by:[''],
|
||||
amount: [''],
|
||||
frequency: [''],
|
||||
others_frequency : ['']
|
||||
});
|
||||
}
|
||||
addIncomeDetails() {
|
||||
@ -59,8 +76,11 @@ addIncomeDetails() {
|
||||
}
|
||||
deleteIncomeDetails(index) {
|
||||
this.incomeDetails = this.otherIncomeForm.get('income_details') as FormArray;
|
||||
|
||||
if(this.incomeDetails.length==1){
|
||||
this.otherIncomeForm.controls['income_details'].reset();
|
||||
}else{
|
||||
this.incomeDetails.removeAt(index);
|
||||
}
|
||||
}
|
||||
checkotherDetails(val)
|
||||
{
|
||||
@ -78,13 +98,32 @@ getFrequency() {
|
||||
this.frequencyData = data['records'].filter(fre=>fre.isactive==1);
|
||||
}
|
||||
});
|
||||
this.qustCat.getcommondrop('SOURCEOFOTHERINCOME').subscribe(res=>
|
||||
{
|
||||
if(res['dataStatus']==true)
|
||||
{
|
||||
this.sourceIncome = res['records'];
|
||||
}
|
||||
});
|
||||
this.qustCat.getAllPersonsName(this.pdid).subscribe(res=>{
|
||||
console.log("income earn",res)
|
||||
if(res['dataStatus']==true)
|
||||
{
|
||||
// console.log("income Earned by",res);
|
||||
this.incomeEarnedBy=res['record'];
|
||||
console.log("res",res['record'])
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
inWords(val,i){
|
||||
this.amtInWords[i]=this.constant.convertNumberToWords(val.target.value)
|
||||
}
|
||||
|
||||
submitOtherIncome(answerData)
|
||||
{
|
||||
let records: any = {};
|
||||
records.pdid = this.pdDetails.pd_id;
|
||||
records.formid = '337';
|
||||
records.formid = this.FormId.form_id;
|
||||
records.fk_createdby = this.users;
|
||||
records.other_income = answerData.other_income;
|
||||
records.income_details = answerData.income_details;
|
||||
@ -101,22 +140,28 @@ submitOtherIncome(answerData)
|
||||
|
||||
getOtherIncome()
|
||||
{
|
||||
let records = {'pd_id':this.pdDetails.pd_id,'pd_form_id':'337'};
|
||||
let records = {'pd_id':this.pdDetails.pd_id,'pd_form_id':this.FormId.form_id};
|
||||
|
||||
this.qustCat.retiverForm(records).subscribe(res=>
|
||||
{
|
||||
if(res['dataStatus']==true)
|
||||
this.incomeDetails = this.otherIncomeForm.get('income_details') as FormArray;
|
||||
console.log(124,res);
|
||||
this.otherIncomeDetails = res;
|
||||
if(this.otherIncomeDetails.dataStatus == true)
|
||||
{
|
||||
this.otherIncomeDetails = this.otherIncomeDetails.records;
|
||||
if(this.otherIncomeDetails.other_income=='Yes'){
|
||||
console.log('if');
|
||||
var incomeArray = Object.keys(res['records'].income_details).map(function(key) {
|
||||
//console.log(res);
|
||||
return res['records'].income_details[key];
|
||||
|
||||
});
|
||||
this.otherIncomeDetails = res['records'];
|
||||
console.log(this.otherIncomeDetails);
|
||||
this.otherIncomeForm.controls['other_income'].setValue(this.otherIncomeDetails.other_income);
|
||||
this.otherIncomeForm.controls['otherincome_remarks'].setValue(this.otherIncomeDetails.otherincome_remarks);
|
||||
this.incomeDetails = this.otherIncomeForm.get('income_details') as FormArray;
|
||||
|
||||
|
||||
|
||||
|
||||
if(incomeArray.length==0)
|
||||
@ -124,13 +169,25 @@ getOtherIncome()
|
||||
this.incomeDetails.push(this.createDetail());
|
||||
}else
|
||||
{
|
||||
incomeArray.forEach(datas=>
|
||||
incomeArray.forEach((datas,index)=>
|
||||
{
|
||||
this.incomeDetails.push(this.createDetail());
|
||||
// console.log("Amount",this.otherIncomeDetails.income_details.amount);
|
||||
this.amtInWords[index]=this.constant.convertNumberToWords(datas.amount)
|
||||
})
|
||||
}
|
||||
this.otherIncomeForm.controls['income_details'].setValue(incomeArray);
|
||||
|
||||
}else
|
||||
{
|
||||
console.log('else');
|
||||
this.otherIncomeForm.controls['other_income'].setValue(this.otherIncomeDetails.other_income);
|
||||
this.otherIncomeForm.controls['otherincome_remarks'].setValue(this.otherIncomeDetails.otherincome_remarks);
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.incomeDetails.push(this.createDetail())
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,79 @@
|
||||
<ion-header>
|
||||
|
||||
<ion-navbar color="optblue">
|
||||
<button ion-button menuToggle>
|
||||
<ion-icon name="menu"></ion-icon>
|
||||
</button>
|
||||
<ion-title *ngIf="!viewchange">Other Income Category</ion-title>
|
||||
|
||||
|
||||
</ion-navbar>
|
||||
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-content padding>
|
||||
<form [formGroup]="otherIncomeForm" class="address">
|
||||
<mat-form-field style="width: 100%" >
|
||||
<mat-select placeholder="Other Income"
|
||||
formControlName="other_income" (selectionChange)="checkotherDetails($event.value)">
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-card *ngIf="otherIncomeForm.controls.other_income.value == 'Yes'">
|
||||
<mat-card-header>
|
||||
|
||||
</mat-card-header>
|
||||
<div formArrayName="income_details">
|
||||
<div *ngFor="let details of otherIncomeForm.get('income_details').controls; let i=index;let last=last;"
|
||||
[formGroupName]="i">
|
||||
<h3>Loan Details{{i+1}}</h3>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Source"
|
||||
formControlName="source">
|
||||
<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 and Others</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Amount" formControlName="amount">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="Frequency" formControlName="frequency">
|
||||
<mat-option value="{{frq.frequency_id}}" *ngFor="let frq of frequencyData">{{frq.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<ion-buttons end>
|
||||
<ion-col col-3>
|
||||
<a (click)="addIncomeDetails()" *ngIf="last">
|
||||
<ion-icon name="md-add" color="optblue" style="font-size: 22px;"></ion-icon></a>
|
||||
</ion-col>
|
||||
<ion-col offset-3 col-3>
|
||||
<a (click)="deleteIncomeDetails(i)">
|
||||
<ion-icon name="md-close" color="optblue" style="font-size: 22px;"></ion-icon></a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
</mat-card-content>
|
||||
</div>
|
||||
</div>
|
||||
</mat-card>
|
||||
<br/>
|
||||
<mat-card>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Remarks"
|
||||
formControlName="otherincome_remarks">
|
||||
</mat-form-field>
|
||||
</mat-card>
|
||||
<ion-row>
|
||||
<!-- <ion-buttons >
|
||||
<ion-button color="optblue"
|
||||
full[disabled]="!pdforms.valid" mat-raised-button style="width:100%" (click)="savepdDetails(pdforms.value)">Save <ion-icon name="md-disc"></ion-icon></ion-button> -->
|
||||
<button ion-button full color="optblue" (click)="submitOtherIncome(otherIncomeForm.value)" > Save</button>
|
||||
<!-- </ion-buttons> -->
|
||||
</ion-row>
|
||||
</form>
|
||||
</ion-content>
|
||||
@ -0,0 +1,3 @@
|
||||
page-pd-question-other-income {
|
||||
|
||||
}
|
||||
@ -0,0 +1,136 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
||||
import { FormGroup, FormBuilder,FormArray } from '@angular/forms';
|
||||
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
||||
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
||||
import { ToastProvider } from '../../../providers/common-provider/toast';
|
||||
|
||||
/**
|
||||
* Generated class for the PdQuestionOtherIncomePage page.
|
||||
*
|
||||
* See https://ionicframework.com/docs/components/#navigation for more info on
|
||||
* Ionic pages and navigation.
|
||||
*/
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'page-pd-question-other-income',
|
||||
templateUrl: 'pd-question-other-income.html',
|
||||
})
|
||||
export class PdQuestionOtherIncomePage {
|
||||
|
||||
otherIncomeDetails: any;
|
||||
users: any;
|
||||
pdDetails: any;
|
||||
questionDetails: any;
|
||||
frequencyData: any;
|
||||
otherIncomeForm: FormGroup;
|
||||
incomeDetails:FormArray;
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,public aws:AwsServiceProvider,public toast:ToastProvider) {
|
||||
this.questionDetails = this.navParams.get('questionDetails');
|
||||
this.pdDetails = this.navParams.get('pdDetails');
|
||||
this.users = this.aws.getlocale();
|
||||
|
||||
this.otherIncomeForm = this.fb.group({
|
||||
other_income: [null],
|
||||
otherincome_remarks:[null],
|
||||
income_details: this.fb.array([])
|
||||
});
|
||||
this.getOtherIncome();
|
||||
this.getFrequency();
|
||||
|
||||
}
|
||||
|
||||
ionViewDidLoad() {
|
||||
console.log('ionViewDidLoad PdQuestionOtherIncomePage');
|
||||
}
|
||||
|
||||
createDetail():FormGroup {
|
||||
return this.fb.group({
|
||||
source: [null],
|
||||
amount: [null],
|
||||
frequency: [null],
|
||||
});
|
||||
}
|
||||
addIncomeDetails() {
|
||||
this.incomeDetails = this.otherIncomeForm.get('income_details') as FormArray;
|
||||
|
||||
this.incomeDetails.push(this.createDetail());
|
||||
}
|
||||
deleteIncomeDetails(index) {
|
||||
this.incomeDetails = this.otherIncomeForm.get('income_details') as FormArray;
|
||||
|
||||
this.incomeDetails.removeAt(index);
|
||||
}
|
||||
checkotherDetails(val)
|
||||
{
|
||||
if(val=="Yes")
|
||||
{
|
||||
this.addIncomeDetails();
|
||||
}
|
||||
}
|
||||
getFrequency() {
|
||||
let master_name = 'FREQUENCY';
|
||||
this.qustCat.getcommondrop(master_name).subscribe(data => {
|
||||
//console.log('data', data);
|
||||
if(data['dataStatus']==true)
|
||||
{
|
||||
this.frequencyData = data['records'].filter(fre=>fre.isactive==1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
submitOtherIncome(answerData)
|
||||
{
|
||||
let records: any = {};
|
||||
records.pdid = this.pdDetails.pd_id;
|
||||
records.formid = '337';
|
||||
records.fk_createdby = this.users;
|
||||
records.other_income = answerData.other_income;
|
||||
records.income_details = answerData.income_details;
|
||||
records.otherincome_remarks = answerData.otherincome_remarks;
|
||||
console.log('data', records);
|
||||
this.qustCat.saveForm(records).subscribe(data => {
|
||||
console.log('data', data);
|
||||
this.navCtrl.pop();
|
||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||
}, error => {
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
getOtherIncome()
|
||||
{
|
||||
let records = {'pd_id':this.pdDetails.pd_id,'pd_form_id':'337'};
|
||||
|
||||
this.qustCat.retiverForm(records).subscribe(res=>
|
||||
{
|
||||
if(res['dataStatus']==true)
|
||||
{
|
||||
var incomeArray = Object.keys(res['records'].income_details).map(function(key) {
|
||||
//console.log(res);
|
||||
return res['records'].income_details[key];
|
||||
|
||||
});
|
||||
this.otherIncomeDetails = res['records'];
|
||||
console.log(this.otherIncomeDetails);
|
||||
this.otherIncomeForm.controls['other_income'].setValue(this.otherIncomeDetails.other_income);
|
||||
this.otherIncomeForm.controls['otherincome_remarks'].setValue(this.otherIncomeDetails.otherincome_remarks);
|
||||
this.incomeDetails = this.otherIncomeForm.get('income_details') as FormArray;
|
||||
|
||||
|
||||
if(incomeArray.length==0)
|
||||
{
|
||||
this.incomeDetails.push(this.createDetail());
|
||||
}else
|
||||
{
|
||||
incomeArray.forEach(datas=>
|
||||
{
|
||||
this.incomeDetails.push(this.createDetail());
|
||||
})
|
||||
}
|
||||
this.otherIncomeForm.controls['income_details'].setValue(incomeArray);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -19,7 +19,7 @@ public commonimage = "http://ssa.sineedge.com/sparqapi/logo/avatar.jpg";
|
||||
let testapiurl = 'http://ssa.sineedge.com/sparqtest/api/';
|
||||
let devapiurl = 'http://ssa.sineedge.com/sparqapi/api/';
|
||||
let localapiurl = 'http://192.168.0.9/sparqapi/api/';
|
||||
return testapiurl;
|
||||
return devapiurl;
|
||||
}
|
||||
|
||||
getcurrentDate()
|
||||
|
||||
@ -26,7 +26,7 @@ export class PdtriggerProvider {
|
||||
|
||||
getpddetails(userid)
|
||||
{
|
||||
//console.log(userid);
|
||||
console.log(userid);
|
||||
return this.http.get(this.apiurl+'listLessPDDetails/get?pdofficerid='+userid);
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
www/assets/fonts/ionicons.eot
Normal file
BIN
www/assets/fonts/ionicons.eot
Normal file
Binary file not shown.
50
www/assets/fonts/ionicons.scss
Normal file
50
www/assets/fonts/ionicons.scss
Normal file
@ -0,0 +1,50 @@
|
||||
|
||||
// Ionicons Icon Font CSS
|
||||
// --------------------------
|
||||
// Ionicons CSS for Ionic's <ion-icon> element
|
||||
// ionicons-icons.scss has the icons and their unicode characters
|
||||
|
||||
$ionicons-font-path: $font-path !default;
|
||||
|
||||
@import "ionicons-icons";
|
||||
@import "ionicons-variables";
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: "Ionicons";
|
||||
src: url("#{$ionicons-font-path}/ionicons.woff2?v=#{$ionicons-version}") format("woff2"),
|
||||
url("#{$ionicons-font-path}/ionicons.woff?v=#{$ionicons-version}") format("woff"),
|
||||
url("#{$ionicons-font-path}/ionicons.ttf?v=#{$ionicons-version}") format("truetype");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
ion-icon {
|
||||
display: inline-block;
|
||||
|
||||
font-family: "Ionicons";
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
font-style: normal;
|
||||
font-variant: normal;
|
||||
font-weight: normal;
|
||||
line-height: 1;
|
||||
text-rendering: auto;
|
||||
text-transform: none;
|
||||
speak: none;
|
||||
|
||||
@include rtl() {
|
||||
&[aria-label^="arrow"]::before,
|
||||
&[flip-rtl]::before {
|
||||
transform: scaleX(-1);
|
||||
}
|
||||
|
||||
&[unflip-rtl]::before {
|
||||
transform: scaleX(1);
|
||||
}
|
||||
}
|
||||
|
||||
&::before {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
2630
www/assets/fonts/ionicons.svg
Normal file
2630
www/assets/fonts/ionicons.svg
Normal file
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 391 KiB |
BIN
www/assets/fonts/ionicons.ttf
Normal file
BIN
www/assets/fonts/ionicons.ttf
Normal file
Binary file not shown.
BIN
www/assets/fonts/noto-sans-bold.ttf
Normal file
BIN
www/assets/fonts/noto-sans-bold.ttf
Normal file
Binary file not shown.
BIN
www/assets/fonts/noto-sans-bold.woff
Normal file
BIN
www/assets/fonts/noto-sans-bold.woff
Normal file
Binary file not shown.
BIN
www/assets/fonts/noto-sans-regular.ttf
Normal file
BIN
www/assets/fonts/noto-sans-regular.ttf
Normal file
Binary file not shown.
BIN
www/assets/fonts/noto-sans-regular.woff
Normal file
BIN
www/assets/fonts/noto-sans-regular.woff
Normal file
Binary file not shown.
34
www/assets/fonts/noto-sans.scss
Normal file
34
www/assets/fonts/noto-sans.scss
Normal file
@ -0,0 +1,34 @@
|
||||
// Noto Sans Font
|
||||
// Google
|
||||
// Apache License, version 2.0
|
||||
// http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
$noto-sans-font-path: $font-path !default;
|
||||
|
||||
@font-face {
|
||||
font-family: "Noto Sans";
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: local("Noto Sans"), local("Noto-Sans-Regular"), url("#{$noto-sans-font-path}/noto-sans-regular.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-regular.ttf") format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Noto Sans";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local("Noto Sans"), local("Noto-Sans-Regular"), url("#{$noto-sans-font-path}/noto-sans-regular.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-regular.ttf") format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Noto Sans";
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
src: local("Noto Sans Bold"), local("Noto-Sans-Bold"), url("#{$noto-sans-font-path}/noto-sans-bold.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-bold.ttf") format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Noto Sans";
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: local("Noto Sans Bold"), local("Noto-Sans-Bold"), url("#{$noto-sans-font-path}/noto-sans-bold.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-bold.ttf") format("truetype");
|
||||
}
|
||||
BIN
www/assets/fonts/roboto-bold.woff
Normal file
BIN
www/assets/fonts/roboto-bold.woff
Normal file
Binary file not shown.
BIN
www/assets/fonts/roboto-bold.woff2
Normal file
BIN
www/assets/fonts/roboto-bold.woff2
Normal file
Binary file not shown.
BIN
www/assets/fonts/roboto-light.woff
Normal file
BIN
www/assets/fonts/roboto-light.woff
Normal file
Binary file not shown.
BIN
www/assets/fonts/roboto-light.woff2
Normal file
BIN
www/assets/fonts/roboto-light.woff2
Normal file
Binary file not shown.
BIN
www/assets/fonts/roboto-medium.woff
Normal file
BIN
www/assets/fonts/roboto-medium.woff
Normal file
Binary file not shown.
BIN
www/assets/fonts/roboto-medium.woff2
Normal file
BIN
www/assets/fonts/roboto-medium.woff2
Normal file
Binary file not shown.
BIN
www/assets/fonts/roboto-regular.woff
Normal file
BIN
www/assets/fonts/roboto-regular.woff
Normal file
Binary file not shown.
BIN
www/assets/fonts/roboto-regular.woff2
Normal file
BIN
www/assets/fonts/roboto-regular.woff2
Normal file
Binary file not shown.
34
www/assets/fonts/roboto.scss
Normal file
34
www/assets/fonts/roboto.scss
Normal file
@ -0,0 +1,34 @@
|
||||
// Roboto Font
|
||||
// Google
|
||||
// Apache License, version 2.0
|
||||
// http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
$roboto-font-path: $font-path !default;
|
||||
|
||||
@font-face {
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: local("Roboto Light"), local("Roboto-Light"), url("#{$roboto-font-path}/roboto-light.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-light.woff") format("woff"), url("#{$roboto-font-path}/roboto-light.ttf") format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local("Roboto"), local("Roboto-Regular"), url("#{$roboto-font-path}/roboto-regular.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-regular.woff") format("woff"), url("#{$roboto-font-path}/roboto-regular.ttf") format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
src: local("Roboto Medium"), local("Roboto-Medium"), url("#{$roboto-font-path}/roboto-medium.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-medium.woff") format("woff"), url("#{$roboto-font-path}/roboto-medium.ttf") format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: local("Roboto Bold"), local("Roboto-Bold"), url("#{$roboto-font-path}/roboto-bold.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-bold.woff") format("woff"), url("#{$roboto-font-path}/roboto-bold.ttf") format("truetype");
|
||||
}
|
||||
29472
www/build/main.css
29472
www/build/main.css
File diff suppressed because one or more lines are too long
1
www/build/main.css.map
Normal file
1
www/build/main.css.map
Normal file
@ -0,0 +1 @@
|
||||
null
|
||||
13738
www/build/main.js
13738
www/build/main.js
File diff suppressed because one or more lines are too long
1
www/build/main.js.map
Normal file
1
www/build/main.js.map
Normal file
File diff suppressed because one or more lines are too long
198695
www/build/vendor.js
198695
www/build/vendor.js
File diff suppressed because one or more lines are too long
1
www/build/vendor.js.map
Normal file
1
www/build/vendor.js.map
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user