Fairoj : current loan changes, credit person display in view screen and SEP_INDV changes are done
This commit is contained in:
parent
42ae3f0978
commit
c54d2199a7
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
18
build.json
Normal file
18
build.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"android": {
|
||||
"debug": {
|
||||
"keystore": "releaseApk/pd-genie-officer.jks",
|
||||
"storePassword": "pdgenieofficer",
|
||||
"alias": "my-alias",
|
||||
"password" : "pdgenieofficer",
|
||||
"keystoreType": ""
|
||||
},
|
||||
"release": {
|
||||
"keystore": "releaseApk/pd-genie-officer.jks",
|
||||
"storePassword": "pdgenieofficer",
|
||||
"alias": "my-alias",
|
||||
"password" : "pdgenieofficer",
|
||||
"keystoreType": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<widget id="com.sineedge.pdgenie" version="0.0.14" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
<widget id="com.sineedge.pdgenie" version="0.0.16" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
<name>PD Genie Officer </name>
|
||||
<description>info@pdgenie.com</description>
|
||||
<author email="info@pdgenie.com" href="https://pdgenie.com">PD Genie</author>
|
||||
@ -100,6 +100,7 @@
|
||||
<variable name="ANDROID_SUPPORT_V13_VERSION" value="27.+" />
|
||||
<variable name="FCM_VERSION" value="11.6.2" />
|
||||
</plugin>
|
||||
<plugin name="cordova-plugin-market" spec="1.2.0" />
|
||||
<engine name="browser" spec="5.0.4" />
|
||||
<engine name="android" spec="^8.0.0" />
|
||||
</widget>
|
||||
|
||||
10
package-lock.json
generated
10
package-lock.json
generated
@ -180,6 +180,11 @@
|
||||
"resolved": "https://registry.npmjs.org/@ionic-native/location-accuracy/-/location-accuracy-4.19.0.tgz",
|
||||
"integrity": "sha512-jxpAGAzMfaMB7iB48n9M28hKRQdMdQHmUBFJUDf0dFI84QKDTRIScdUTiyW9Ny7AmDSuZdwLGbpC0L3wp73Oeg=="
|
||||
},
|
||||
"@ionic-native/market": {
|
||||
"version": "4.20.0",
|
||||
"resolved": "https://registry.npmjs.org/@ionic-native/market/-/market-4.20.0.tgz",
|
||||
"integrity": "sha512-MGYj/uEbamyRHdrcV/zqX3MT9WCBer5wpAO3iK6jrdYXc5glw1EdUJ3N+HkkWJ4waVHO3+qBexJsWHSnz64+1Q=="
|
||||
},
|
||||
"@ionic-native/push": {
|
||||
"version": "4.20.0",
|
||||
"resolved": "https://registry.npmjs.org/@ionic-native/push/-/push-4.20.0.tgz",
|
||||
@ -2451,6 +2456,11 @@
|
||||
"resolved": "https://registry.npmjs.org/cordova-plugin-ionic-webview/-/cordova-plugin-ionic-webview-2.2.0.tgz",
|
||||
"integrity": "sha512-mNTJaIRsz83Vntk2d3jrPCnlqEPQsfOJW6U2AzS7WV1T15Jj/STdXI/Uv1vIyvPVd9h1OLF+yu64ZsmQH2VRMQ=="
|
||||
},
|
||||
"cordova-plugin-market": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/cordova-plugin-market/-/cordova-plugin-market-1.2.0.tgz",
|
||||
"integrity": "sha1-YeNkKBR+lUAsZOr4bjFzeP/bJ08="
|
||||
},
|
||||
"cordova-plugin-mauron85-background-geolocation": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/cordova-plugin-mauron85-background-geolocation/-/cordova-plugin-mauron85-background-geolocation-3.0.1.tgz",
|
||||
|
||||
@ -36,6 +36,7 @@
|
||||
"@ionic-native/geolocation": "^4.19.0",
|
||||
"@ionic-native/launch-navigator": "^4.16.0",
|
||||
"@ionic-native/location-accuracy": "^4.19.0",
|
||||
"@ionic-native/market": "^4.20.0",
|
||||
"@ionic-native/push": "^4.20.0",
|
||||
"@ionic-native/splash-screen": "4.4.0",
|
||||
"@ionic-native/sqlite": "^4.19.0",
|
||||
@ -56,6 +57,7 @@
|
||||
"cordova-plugin-geolocation": "2.4.3",
|
||||
"cordova-plugin-ionic-keyboard": "^2.0.5",
|
||||
"cordova-plugin-ionic-webview": "^2.0.0",
|
||||
"cordova-plugin-market": "1.2.0",
|
||||
"cordova-plugin-mauron85-background-geolocation": "3.0.1",
|
||||
"cordova-plugin-request-location-accuracy": "2.2.3",
|
||||
"cordova-plugin-splashscreen": "5.0.2",
|
||||
@ -124,7 +126,8 @@
|
||||
"ACCOUNT_LABEL": "@string/app_name",
|
||||
"ACCOUNT_TYPE": "$PACKAGE_NAME.account",
|
||||
"CONTENT_AUTHORITY": "$PACKAGE_NAME"
|
||||
}
|
||||
},
|
||||
"cordova-plugin-market": {}
|
||||
},
|
||||
"platforms": [
|
||||
"browser",
|
||||
|
||||
@ -66,6 +66,9 @@
|
||||
"uk.co.workingedge.phonegap.plugin.launchnavigator": {
|
||||
"OKHTTP_VERSION": "3.+",
|
||||
"PACKAGE_NAME": "com.sineedge.pdgenie"
|
||||
},
|
||||
"cordova-plugin-market": {
|
||||
"PACKAGE_NAME": "com.sineedge.pdgenie"
|
||||
}
|
||||
},
|
||||
"dependent_plugins": {
|
||||
|
||||
@ -174,5 +174,13 @@
|
||||
},
|
||||
"is_top_level": true,
|
||||
"variables": {}
|
||||
},
|
||||
"cordova-plugin-market": {
|
||||
"source": {
|
||||
"type": "registry",
|
||||
"id": "cordova-plugin-market"
|
||||
},
|
||||
"is_top_level": true,
|
||||
"variables": {}
|
||||
}
|
||||
}
|
||||
@ -19,6 +19,8 @@ import { CookieStorage } from 'amazon-cognito-identity-js';
|
||||
import {ToastProvider} from '../providers/common-provider/toast'
|
||||
import { PdtriggerProvider } from '../providers/pdtrigger/pdtrigger';
|
||||
import {AppVersion} from '@ionic-native/app-version'
|
||||
import { ConstantsProvider } from '../providers/constants/constants';
|
||||
import { Market } from '@ionic-native/market';
|
||||
|
||||
// declare let notificationAccess:boolean
|
||||
|
||||
@ -39,11 +41,13 @@ export class MyApp {
|
||||
|
||||
pages: Array<{title: string,icon:any, method: any}>;
|
||||
Camerauri: any;
|
||||
curr_environmnet:any;
|
||||
|
||||
constructor(public platform: Platform, public statusBar: StatusBar, public splashScreen: SplashScreen,public aws:AwsServiceProvider,public shared:CognitoServiceProvider,public AWS:AwsServiceProvider
|
||||
,public alertCtrl:AlertController,cache:CacheService,private push:Push,
|
||||
private event:Events,private toastProvider:ToastProvider,
|
||||
private pdtrigger:PdtriggerProvider,private appVersion:AppVersion) {
|
||||
private pdtrigger:PdtriggerProvider,private appVersion:AppVersion,private constantProvider:ConstantsProvider,
|
||||
private marketOpener:Market) {
|
||||
|
||||
if(this.platform.is('android')){
|
||||
this.platform.resume.subscribe((event:any)=>{
|
||||
@ -51,6 +55,7 @@ export class MyApp {
|
||||
this.handleAndroidCameraRestart(event)
|
||||
})
|
||||
}
|
||||
this.curr_environmnet=this.constantProvider.environment()
|
||||
// cache.setDefaultTTL(60*60)
|
||||
cache.enableCache(false);
|
||||
this.initializeApp();
|
||||
@ -82,6 +87,9 @@ this.notificationAccess=false
|
||||
this.platform.ready().then(() => {
|
||||
// Okay, so the platform is ready and our plugins are available.
|
||||
// Here you can do any higher level native things you might need.
|
||||
if(this.curr_environmnet.environment_name == 'production'){
|
||||
this.checkAppVersion();
|
||||
}
|
||||
this.statusBar.styleDefault();
|
||||
if (this.platform.is('android')) {
|
||||
this.statusBar.overlaysWebView(false);
|
||||
@ -333,5 +341,31 @@ let alert=this.alertCtrl.create({
|
||||
console.log("Push permission",res);
|
||||
})
|
||||
}
|
||||
checkAppVersion(){
|
||||
this.pdtrigger.checkAppVersion().subscribe(result=>{
|
||||
if(result['dataStatus']){
|
||||
console.log("app versions",this.app_version,result);
|
||||
console.log(result['records'][0].version.toString())
|
||||
if(this.app_version != result['records'][0].version.toString()){
|
||||
return new Promise((resolve,reject)=>{
|
||||
let alert= this.toastProvider.setAlertwithOKButton("Update Available","A new version of App is available Please download it..!")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data)=>{
|
||||
if(data == false){
|
||||
this.platform.exitApp();
|
||||
reject()
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
this.marketOpener.open('com.sineedge.pdgenie');
|
||||
this.platform.exitApp();
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -141,6 +141,7 @@ import {AppVersion} from '@ionic-native/app-version'
|
||||
import { OfficerNotesModalPage } from '../pages/officer-notes-modal/officer-notes-modal';
|
||||
|
||||
import { QueriesDocsPage } from '../pages/queries-docs/queries-docs';
|
||||
import {Market} from '@ionic-native/market'
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
@ -326,8 +327,8 @@ import { QueriesDocsPage } from '../pages/queries-docs/queries-docs';
|
||||
PdPipe,LocationAccuracy,
|
||||
LoadingProvider,Geolocation,
|
||||
DatabaseProvider,
|
||||
StorageProvider
|
||||
|
||||
StorageProvider,
|
||||
Market
|
||||
]
|
||||
})
|
||||
export class AppModule {
|
||||
|
||||
@ -168,8 +168,8 @@
|
||||
<mat-card-title><h5>Lender Contact Details</h5></mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
|
||||
<ion-row>
|
||||
<div *ngIf="pdMaster.pd_contact_person != null && pdMaster.pd_contact_person != ''">
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<ion-col class="cardinfo"><ion-icon name="contact"></ion-icon> {{pdMaster.pd_contact_person}}</ion-col>
|
||||
</ion-col>
|
||||
@ -181,6 +181,45 @@
|
||||
<a href="tel:?{{pdMaster.pd_contact_mobileno}}" style="text-decoration: none;"><ion-icon color="optblue" style="font-size: 24px;" name="call"></ion-icon>
|
||||
</a></ion-col>
|
||||
</ion-row>
|
||||
</div>
|
||||
|
||||
<div *ngIf="pdMaster.lender_credit_person_name != null && pdMaster.lender_credit_person_name != ''">
|
||||
<hr/>
|
||||
<!--<mat-card-header>-->
|
||||
<mat-card-subtitle>Credit Person</mat-card-subtitle>
|
||||
<!-- </mat-card-header> -->
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<ion-col class="cardinfo"><ion-icon name="contact"></ion-icon> {{pdMaster.lender_credit_person_name}}</ion-col>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col col-1><ion-icon name="call"></ion-icon></ion-col>
|
||||
<ion-col class="cardinfo">{{pdMaster.lender_credit_person_contact_mobileno}}</ion-col>
|
||||
<ion-col col-2 color="optblue">
|
||||
<a href="tel:?{{pdMaster.lender_credit_person_contact_mobileno}}" style="text-decoration: none;"><ion-icon color="optblue" style="font-size: 24px;" name="call"></ion-icon>
|
||||
</a></ion-col>
|
||||
</ion-row>
|
||||
</div>
|
||||
|
||||
<div *ngIf="pdMaster.lender_sales_person_name != null && pdMaster.lender_sales_person_name != ''">
|
||||
<hr/>
|
||||
<!-- <mat-card-sub-header> -->
|
||||
<mat-card-subtitle>Sales Person</mat-card-subtitle>
|
||||
<!-- </mat-card-sub-header> -->
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<ion-col class="cardinfo"><ion-icon name="contact"></ion-icon> {{pdMaster.lender_sales_person_name}}</ion-col>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col col-1><ion-icon name="call"></ion-icon></ion-col>
|
||||
<ion-col class="cardinfo">{{pdMaster.lender_sales_contact_mobileno}}</ion-col>
|
||||
<ion-col col-2 color="optblue">
|
||||
<a href="tel:?{{pdMaster.lender_sales_contact_mobileno}}" style="text-decoration: none;"><ion-icon color="optblue" style="font-size: 24px;" name="call"></ion-icon>
|
||||
</a></ion-col>
|
||||
</ion-row>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card><br/>
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ import {Content} from 'ionic-angular'
|
||||
})
|
||||
export class PdListPage {
|
||||
|
||||
@ViewChild(Content) content: Content
|
||||
// @ViewChild(Content) content: Content
|
||||
@ViewChild('slider') slider:Slides;
|
||||
searchinprogress: any;
|
||||
searchpast: any;
|
||||
@ -54,7 +54,7 @@ export class PdListPage {
|
||||
selectedTab(ind)
|
||||
{
|
||||
this.slider.slideTo(ind)
|
||||
this.content.scrollToTop();
|
||||
// this.content.scrollToTop();
|
||||
}
|
||||
moveButton(event){
|
||||
this.pdlist=event._snapIndex.toString();
|
||||
|
||||
@ -129,7 +129,7 @@
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<p style="margin-left: 2% !important">No of Years in Current Business</p>
|
||||
<p style="margin-left: 2% !important">No of Years in Current <span *ngIf="customer_segment_abbr == 'SEP_INDV'">Profession</span> <span *ngIf="customer_segment_abbr != 'SEP_INDV'">Business</span></p>
|
||||
<mat-form-field style="width:100%;" style="width: 45%">
|
||||
<input matInput autocomplete="off" placeholder="Year" type="number"
|
||||
formControlName="current_business_experiance_year"
|
||||
|
||||
@ -48,7 +48,7 @@ export class PdQuestionBusinessInfoPage {
|
||||
activityData: any = [];
|
||||
relativeNames: any;
|
||||
companyRelationShipList: any = []
|
||||
countryDataList: any = []
|
||||
countryDataList: any = [{}]
|
||||
exist_status: any;
|
||||
|
||||
filterCityList: any = [];
|
||||
@ -89,6 +89,7 @@ export class PdQuestionBusinessInfoPage {
|
||||
imageBucket: any = [];
|
||||
tab: string = '0';
|
||||
complete_status: boolean = false;
|
||||
customer_segment_abbr: any;
|
||||
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,
|
||||
public aws: AwsServiceProvider, public toast: ToastProvider,
|
||||
@ -112,6 +113,8 @@ export class PdQuestionBusinessInfoPage {
|
||||
this.generalExistBusinessMonth = this.pdDetails.business_month;
|
||||
this.lender_short_name = this.pdDetails.lender_short_name;
|
||||
this.product_abbr = this.pdDetails.product_abbr;
|
||||
console.log("cus",this.pdDetails.customer_segment_abbr)
|
||||
this.customer_segment_abbr=this.pdDetails.customer_segment_abbr
|
||||
this.step = 0
|
||||
|
||||
|
||||
@ -863,6 +866,7 @@ export class PdQuestionBusinessInfoPage {
|
||||
//this.businessForm.controls['persons_with_relationships'].setValue(PartnrArray1)
|
||||
|
||||
// this.businessForm.controls['manufacturing_activity_details'].setValue(businessVal.manufacturing_activity_details)
|
||||
if(this.lender_short_name != 'CLIX'){
|
||||
if (businessVal.applicant_use_pos_machines == 'yes' && businessVal.hasOwnProperty('pos_machines_details')) {
|
||||
//For Adding the bank search in data
|
||||
if(businessVal.hasOwnProperty('pos_machines_details')){
|
||||
@ -879,6 +883,7 @@ export class PdQuestionBusinessInfoPage {
|
||||
posControl.push(this.createPOSMachinesDetails(businessVal.pos_machines_details));
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log('businessVal', businessVal);
|
||||
if (data['records'].gst_Regn_cert == 'yes') { this.businessForm.addControl('gst_Regn_cert_pic', new FormControl('', Validators.compose([Validators.required]))); } else { this.businessForm.removeControl('gst_Regn_cert_pic'); }
|
||||
if (data['records'].factory_cert == 'yes') { this.businessForm.addControl('factory_cert_pic', new FormControl('', Validators.compose([Validators.required]))); } else { this.businessForm.removeControl('factory_cert_pic'); }
|
||||
@ -1426,9 +1431,16 @@ export class PdQuestionBusinessInfoPage {
|
||||
}
|
||||
// Out of Total Export Sales what % of Sales is done in Albania?
|
||||
getPlaceHolderName(id) {
|
||||
let name = this.countryDataList.filter(value => value.country_id == id);
|
||||
|
||||
return 'Out of Total Export Sales what % of Sales is done in ' + name[0].country_name + ' ?';
|
||||
let name;
|
||||
// name.country_name=''
|
||||
name = this.countryDataList.filter(value => value.country_id == id)[0];
|
||||
console.log("name[0]",name)
|
||||
if(name){
|
||||
return 'Out of Total Export Sales what % of Sales is done in ' + name.country_name + ' ?';
|
||||
}
|
||||
else {
|
||||
return 'Out of Total Export Sales what % of Sales is done in'
|
||||
}
|
||||
// return name[0].country_name +'?';
|
||||
}
|
||||
ConvertMonthintoYear(itemrow, e, i) {
|
||||
@ -1752,7 +1764,7 @@ export class PdQuestionBusinessInfoPage {
|
||||
const control_with_index = <FormArray>control.controls[index];
|
||||
this.cameraProvider.getpicture().then(res => {
|
||||
control_with_index.controls['document_pic'].setValue(res != 'error' ? res : '');
|
||||
let img_name='document_pic'
|
||||
let img_name=control_with_index.controls['document'].value
|
||||
if(res != 'error'){
|
||||
this.cons.getGeoTag().then(geoCoordinates=>{
|
||||
let bucket:any=[]
|
||||
@ -2160,12 +2172,13 @@ export class PdQuestionBusinessInfoPage {
|
||||
records.hasOwnProperty('esic_regn_pic') && records.esic_regn_pic != '' ? records.esic_regn_pic = 'SAVED' :''
|
||||
records.hasOwnProperty('fire_noc_pic') && records.fire_noc_pic != '' ? records.fire_noc_pic = 'SAVED' :''
|
||||
console.log("record params2",records.gst_Regn_cert_pic)
|
||||
|
||||
if(records.hasOwnProperty('documents')){
|
||||
if(records.documents.length >0){
|
||||
records.documents.forEach(value=>{
|
||||
value.document_pic != '' ? value.document_pic = 'SAVED' :''
|
||||
})
|
||||
}
|
||||
}
|
||||
this.cons.getGeoTag().then(geoCordinates=>{
|
||||
if(!records.business_info_location){
|
||||
records.business_info_location=geoCordinates
|
||||
|
||||
@ -195,20 +195,25 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<ion-buttons end>
|
||||
<ion-col col-3 offset-3>
|
||||
<a *ngIf="item.controls.main_raw_materials.controls.length > 1" (click)="removeRawMaterials(l)">
|
||||
<ion-icon name="md-trash" color="optblue" style="font-size: 22px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
<ion-col col-2 offset-1>
|
||||
<a (click)="addMoreRawMaterials($event); false" *ngIf="last">
|
||||
<ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
|
||||
</mat-card-content>
|
||||
</div>
|
||||
|
||||
<ion-buttons end>
|
||||
<ion-col col-3 offset-3>
|
||||
<a *ngIf="item.controls.main_raw_materials.controls.length > 0" (click)="removeRawMaterials(l)">
|
||||
<ion-icon name="md-trash" color="optblue" style="font-size: 22px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
</div><br/>
|
||||
<ion-buttons>
|
||||
<ion-col col-2 offset-1>
|
||||
<a (click)="addMoreRawMaterials($event); false" >
|
||||
<!-- <ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon> -->
|
||||
<button ion-button color="optblue" small >Add More Client</button>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
</div>
|
||||
<div *ngIf="mfgCreditCardFlag">
|
||||
<mat-form-field style="width: 100%">
|
||||
@ -333,20 +338,25 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<ion-buttons end>
|
||||
<ion-col col-3 offset-3>
|
||||
<a *ngIf="item.controls.trading_products.controls.length > 1" (click)="removeTradingProduct(l)">
|
||||
<ion-icon name="md-trash" color="optblue" style="font-size: 22px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
<ion-col col-2 offset-1>
|
||||
<a (click)="addMoretradeProduct($event); false" *ngIf="last">
|
||||
<ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
|
||||
</mat-card-content>
|
||||
</div>
|
||||
|
||||
<ion-buttons end>
|
||||
<ion-col col-3 offset-3>
|
||||
<a *ngIf="item.controls.trading_products.controls.length > 0" (click)="removeTradingProduct(l)">
|
||||
<ion-icon name="md-trash" color="optblue" style="font-size: 22px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
</div><br/>
|
||||
<ion-buttons>
|
||||
<ion-col col-2 offset-1>
|
||||
<a (click)="addMoretradeProduct($event); false" >
|
||||
<!-- <ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon> -->
|
||||
<button ion-button color="optblue" small >Add More Client</button>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
</div>
|
||||
<div *ngIf="trdCreditCardFlag">
|
||||
<mat-form-field style="width: 100%">
|
||||
@ -470,20 +480,25 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<ion-buttons end>
|
||||
<ion-col col-3 offset-3>
|
||||
<a *ngIf="item.controls.service_products.controls.length > 1" (click)="removeServiceProduct(l)">
|
||||
<ion-icon name="md-trash" color="optblue" style="font-size: 22px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
<ion-col col-2 offset-1>
|
||||
<a (click)="addMoreServiceProduct($event); false" *ngIf="last">
|
||||
<ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
|
||||
</mat-card-content>
|
||||
</div>
|
||||
|
||||
<ion-buttons end>
|
||||
<ion-col col-3 offset-3>
|
||||
<a *ngIf="item.controls.service_products.controls.length > 0" (click)="removeServiceProduct(l)">
|
||||
<ion-icon name="md-trash" color="optblue" style="font-size: 22px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
</div><br/>
|
||||
<ion-buttons>
|
||||
<ion-col col-2 offset-1>
|
||||
<a (click)="addMoreServiceProduct($event); false" >
|
||||
<!-- <ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon> -->
|
||||
<button ion-button color="optblue" small >Add More Client</button>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
</div>
|
||||
<div *ngIf="spCreditCardFlag">
|
||||
<mat-form-field style="width: 100%">
|
||||
|
||||
@ -135,21 +135,25 @@
|
||||
|
||||
</span>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<!-- <mat-card-actions> -->
|
||||
<ion-buttons end>
|
||||
<ion-col col-3 offset-3>
|
||||
<a (click)="deleteRawMaterials(a,1)" *ngIf="md.controls.manufacturing_raw_materials.controls.length>1">
|
||||
<ion-col col-3 offset-3 text-right>
|
||||
<a (click)="deleteRawMaterials(a,1)" *ngIf="md.controls.manufacturing_raw_materials.controls.length>0">
|
||||
<ion-icon name="md-trash" color="optblue" style="font-size: 22px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
<ion-col col-2 offset-1>
|
||||
<a (click)="addRawMaterials(1)" *ngIf="last">
|
||||
<ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon>
|
||||
</ion-buttons>
|
||||
</div><br/>
|
||||
<ion-buttons end>
|
||||
<ion-col col-2 offset-1 align="end">
|
||||
<a (click)="addRawMaterials(1)" >
|
||||
<button ion-button color="optblue" small >Add More Raw Materials</button>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
</mat-card-actions>
|
||||
</div>
|
||||
<!-- </ion-buttons> -->
|
||||
<!-- </mat-card-actions> -->
|
||||
|
||||
</div>
|
||||
|
||||
<div *ngIf="RMCommentCard">
|
||||
@ -176,6 +180,7 @@
|
||||
</div>
|
||||
<hr/>
|
||||
<div formArrayName="manufacturing_finished_goods">
|
||||
<mat-card-subtitle><h6>Finished Goods</h6></mat-card-subtitle>
|
||||
<div *ngFor="let mfg of md.controls.manufacturing_finished_goods['controls']; let b=index;let last=last"
|
||||
[formGroupName]="b">
|
||||
<mat-card-subtitle>Finished Goods #{{b+1}}</mat-card-subtitle>
|
||||
@ -236,21 +241,27 @@
|
||||
</mat-form-field> -->
|
||||
</span>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<ion-buttons end>
|
||||
<ion-col col-3 offset-3>
|
||||
<a (click)="deleteGoods(b,1)" *ngIf="md.controls.manufacturing_finished_goods.controls.length>1">
|
||||
<ion-icon name="md-trash" color="optblue" style="font-size: 22px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
<ion-col col-2 offset-1>
|
||||
<a (click)="addGoods(1)" *ngIf="last">
|
||||
<ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
</mat-card-actions>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <mat-card-actions> -->
|
||||
<ion-buttons end>
|
||||
<ion-col col-3 offset-3>
|
||||
<a (click)="deleteGoods(b,1)" *ngIf="md.controls.manufacturing_finished_goods.controls.length>0">
|
||||
<ion-icon name="md-trash" color="optblue" style="font-size: 22px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
</div><br/>
|
||||
<ion-buttons>
|
||||
<ion-col col-2 offset-1>
|
||||
<a (click)="addGoods(1)" >
|
||||
<!-- <ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon> -->
|
||||
<button ion-button color="optblue" small >Add More Finished Goods</button>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
<!-- </mat-card-actions> -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -326,21 +337,27 @@
|
||||
</mat-form-field> -->
|
||||
</span>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<ion-buttons end>
|
||||
<ion-col col-3 offset-3>
|
||||
<a (click)="deleteTradedGoods(e,1)" *ngIf="rd.controls.retail_traded_goods.controls.length>1">
|
||||
<ion-icon name="md-trash" color="optblue" style="font-size: 22px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
<ion-col col-2 offset-1>
|
||||
<a (click)="addTradedGoods(1)" *ngIf="last">
|
||||
<ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
</mat-card-actions>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <mat-card-actions> -->
|
||||
<ion-buttons end>
|
||||
<ion-col col-3 offset-3>
|
||||
<a (click)="deleteTradedGoods(e,1)" *ngIf="rd.controls.retail_traded_goods.controls.length>0">
|
||||
<ion-icon name="md-trash" color="optblue" style="font-size: 22px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
</div><br/>
|
||||
<ion-buttons>
|
||||
<ion-col col-2 offset-1>
|
||||
<a (click)="addTradedGoods(1)" >
|
||||
<!-- <ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon> -->
|
||||
<button ion-button color="optblue" small >Add More Traded Goods</button>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
<!-- </mat-card-actions> -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -417,21 +434,27 @@
|
||||
</mat-form-field> -->
|
||||
</span>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<ion-buttons end>
|
||||
<ion-col col-3 offset-3>
|
||||
<a (click)="deleteTradedGoods(g,2)" *ngIf="td.controls.trading_traded_goods.controls.length>1">
|
||||
<ion-icon name="md-trash" color="optblue" style="font-size: 22px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
<ion-col col-2 offset-1>
|
||||
<a (click)="addTradedGoods(2)" *ngIf="last">
|
||||
<ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
</mat-card-actions>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <mat-card-actions> -->
|
||||
<ion-buttons end>
|
||||
<ion-col col-3 offset-3>
|
||||
<a (click)="deleteTradedGoods(g,2)" *ngIf="td.controls.trading_traded_goods.controls.length>0">
|
||||
<ion-icon name="md-trash" color="optblue" style="font-size: 22px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
</div><br/>
|
||||
<ion-buttons>
|
||||
<ion-col col-2 offset-1>
|
||||
<a (click)="addTradedGoods(2)" >
|
||||
<!-- <ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon> -->
|
||||
<button ion-button color="optblue" small >Add More Traded Goods</button>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
<!-- </mat-card-actions> -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -515,21 +538,27 @@
|
||||
</mat-form-field>
|
||||
</span>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<ion-buttons end>
|
||||
<ion-col col-3 offset-3>
|
||||
<a (click)="deleteTradedGoods(c,3)" *ngIf="dtl.controls.service_provider.controls.length>1">
|
||||
<ion-icon name="md-trash" color="optblue" style="font-size: 22px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
<ion-col col-2 offset-1>
|
||||
<a (click)="addTradedGoods(3)" *ngIf="last">
|
||||
<ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
</mat-card-actions>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <mat-card-actions> -->
|
||||
<ion-buttons end>
|
||||
<ion-col col-3 offset-3>
|
||||
<a (click)="deleteTradedGoods(c,3)" *ngIf="dtl.controls.service_provider.controls.length>0">
|
||||
<ion-icon name="md-trash" color="optblue" style="font-size: 22px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
</div><br/>
|
||||
<ion-buttons>
|
||||
<ion-col col-2 offset-1>
|
||||
<a (click)="addTradedGoods(3)" >
|
||||
<!-- <ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon> -->
|
||||
<button ion-button color="optblue" small >Add More Service Provider</button>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
<!-- </mat-card-actions> -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -183,19 +183,25 @@
|
||||
</div>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
<ion-buttons end>
|
||||
<ion-col col-3 offset-3>
|
||||
<a *ngIf="item.controls.main_raw_materials.controls.length > 1" (click)="removeRawMaterials(l)">
|
||||
<ion-icon name="md-trash" color="optblue" style="font-size: 22px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
<ion-col col-2 offset-1>
|
||||
<a (click)="addMoreRawMaterials($event); false" *ngIf="last">
|
||||
<ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
</div>
|
||||
|
||||
|
||||
<ion-buttons end>
|
||||
<ion-col col-3 offset-3>
|
||||
<a *ngIf="item.controls.main_raw_materials.controls.length > 0" (click)="removeRawMaterials(l)">
|
||||
<ion-icon name="md-trash" color="optblue" style="font-size: 22px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
</div><br/>
|
||||
<ion-buttons>
|
||||
<ion-col col-2 offset-1>
|
||||
<a (click)="addMoreRawMaterials($event); false" >
|
||||
<!-- <ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon> -->
|
||||
<button ion-button color="optblue" small >Add More Supplier</button>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
|
||||
</div>
|
||||
<div *ngIf="mfgCreditCardFlag">
|
||||
<mat-form-field style="width: 100%">
|
||||
@ -310,19 +316,24 @@
|
||||
</div>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
<ion-buttons end>
|
||||
<ion-col col-3 offset-3>
|
||||
<a (click)="removeTradingProduct(l)" *ngIf="item.controls.trading_products.controls.length > 1">
|
||||
<ion-icon name="md-trash" color="optblue" style="font-size: 22px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
<ion-col col-2 offset-1>
|
||||
<a (click)="addMoretradeProduct($event); false" *ngIf="last">
|
||||
<ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
</div>
|
||||
|
||||
<ion-buttons end>
|
||||
<ion-col col-3 offset-3>
|
||||
<a (click)="removeTradingProduct(l)" *ngIf="item.controls.trading_products.controls.length > 0">
|
||||
<ion-icon name="md-trash" color="optblue" style="font-size: 22px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
</div><br/>
|
||||
<ion-buttons>
|
||||
<ion-col col-2 offset-1>
|
||||
<a (click)="addMoretradeProduct($event); false" >
|
||||
<!-- <ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon> -->
|
||||
<button ion-button color="optblue" small >Add More Supplier</button>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
|
||||
</div>
|
||||
<div *ngIf="trdCreditCardFlag">
|
||||
<mat-form-field style="width: 100%">
|
||||
@ -445,19 +456,25 @@
|
||||
</div>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
<ion-buttons end>
|
||||
<ion-col col-3 offset-3>
|
||||
<a (click)="removeServiceProvider(l)" *ngIf="item.controls.service_providers.controls.length > 1">
|
||||
<ion-icon name="md-trash" color="optblue" style="font-size: 22px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
<ion-col col-2 offset-1>
|
||||
<a (click)="addMoreServiceProvider($event); false" *ngIf="last">
|
||||
<ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
</div>
|
||||
|
||||
|
||||
<ion-buttons end>
|
||||
<ion-col col-3 offset-3>
|
||||
<a (click)="removeServiceProvider(l)" *ngIf="item.controls.service_providers.controls.length > 0">
|
||||
<ion-icon name="md-trash" color="optblue" style="font-size: 22px;"></ion-icon>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
</div><br/>
|
||||
<ion-buttons>
|
||||
<ion-col col-2 offset-1>
|
||||
<a (click)="addMoreServiceProvider($event); false" >
|
||||
<!-- <ion-icon name="add-circle" color="optblue" style="font-size: 24px;"></ion-icon> -->
|
||||
<button ion-button color="optblue" small >Add More Supplier</button>
|
||||
</a>
|
||||
</ion-col>
|
||||
</ion-buttons>
|
||||
|
||||
</div>
|
||||
<div *ngIf="spCreditCardFlag">
|
||||
<mat-form-field style="width: 100%">
|
||||
|
||||
@ -110,14 +110,22 @@
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-label>Do you have any other Existing Loans</mat-label>
|
||||
<mat-select
|
||||
formControlName="existing_loan" (selectionChange)="exitsCheck($event.value)">
|
||||
formControlName="existing_loan" >
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:100% !important;" *ngIf="currentLoans.controls.existing_loan.value == 'Yes' && currentLoans.controls.existing_loan.value == 'Yes'">
|
||||
<mat-select (selectionChange)="exitsCheck($event.value)" placeholder="Details of all loan info available"
|
||||
formControlName="loan_info_available">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<div *ngIf="currentLoans.controls.existing_loan.value == 'Yes'">
|
||||
<div *ngIf="currentLoans.controls.loan_info_available.value == 'Yes' && 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">
|
||||
@ -214,6 +222,19 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="currentLoans.controls.loan_info_available.value == 'No'&& currentLoans.controls['tot_outstanding_loans'] && currentLoans.controls.existing_loan.value == 'Yes'">
|
||||
<mat-card-content>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput type="number" placeholder="Total no of running loans" formControlName="tot_running_loans">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput type="number" placeholder="Total EMI being paid" formControlName="tot_emi_paid">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<input matInput type="number" placeholder="Total Outstanding of all running loans" formControlName="tot_outstanding_loans">
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
</div>
|
||||
</mat-card>
|
||||
<mat-card>
|
||||
<mat-form-field style="width: 100%">
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Component, ApplicationInitStatus, ViewChild, ElementRef } from '@angular/core';
|
||||
import { IonicPage, NavController, NavParams, ModalOptions, ModalController } from 'ionic-angular';
|
||||
import { FormGroup,FormArray,FormBuilder,Validators } from '@angular/forms';
|
||||
import { FormGroup,FormArray,FormBuilder,Validators, FormControl } 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';
|
||||
@ -78,6 +78,7 @@ applicants: any;
|
||||
this.currentLoans = this.fb.group(
|
||||
{
|
||||
existing_loan: [null],
|
||||
loan_info_available:[null],
|
||||
currentloan_remarks:[null],
|
||||
loan_details: this.fb.array([])
|
||||
});
|
||||
@ -219,8 +220,22 @@ tabChange(){
|
||||
|
||||
if(val =="Yes")
|
||||
{
|
||||
this.currentLoans.removeControl('tot_running_loans')
|
||||
this.currentLoans.removeControl('tot_emi_paid')
|
||||
this.currentLoans.removeControl('tot_outstanding_loans')
|
||||
|
||||
this.addLoanDetails();
|
||||
}
|
||||
else{
|
||||
const arr = <FormArray>this.currentLoans.controls.loan_details;
|
||||
arr.removeAt(0);
|
||||
// this.currentLoanForm.removeControl('')
|
||||
|
||||
|
||||
this.currentLoans.addControl('tot_running_loans',new FormControl(''))
|
||||
this.currentLoans.addControl('tot_emi_paid',new FormControl(''))
|
||||
this.currentLoans.addControl('tot_outstanding_loans',new FormControl(''))
|
||||
}
|
||||
|
||||
}
|
||||
createLoanDetail(data) {
|
||||
@ -443,11 +458,23 @@ submitCurrentloan(answerData) {
|
||||
records.formid = this.FormId.form_id;
|
||||
records.fk_createdby = this.users;
|
||||
records.existing_loan = answerData.existing_loan;
|
||||
records.loan_details = answerData.loan_details;
|
||||
records.loan_info_available=answerData.loan_info_available;
|
||||
if (records.loan_info_available == 'Yes') {
|
||||
records.loan_details = answerData.loan_details;
|
||||
records.loan_details.forEach(val=>{
|
||||
delete val.bankSearch
|
||||
})
|
||||
}
|
||||
else{
|
||||
records.tot_running_loans=answerData.tot_running_loans
|
||||
records.tot_emi_paid=answerData.tot_emi_paid
|
||||
records.tot_outstanding_loans=answerData.tot_outstanding_loans
|
||||
}
|
||||
// records.loan_details = answerData.loan_details;
|
||||
records.currentloan_remarks = answerData.currentloan_remarks;
|
||||
records.loan_details.forEach(val=>{
|
||||
delete val.bankSearch
|
||||
})
|
||||
// records.loan_details.forEach(val=>{
|
||||
// delete val.bankSearch
|
||||
// })
|
||||
this.spinner_access=true;
|
||||
console.log(' final records when save',records);
|
||||
this.qustCat.saveForm(records).subscribe(data => {
|
||||
@ -479,11 +506,29 @@ submitCurrentloan(answerData) {
|
||||
let records = {'parent_pdid':this.pdDetails.parent_pd_id,'pd_id':this.pdDetails.pd_id,'pd_form_id':this.FormId.form_id};
|
||||
this.qustCat.retiverForm(records).subscribe(res=>
|
||||
{
|
||||
console.log(res)
|
||||
const control = <FormArray>this.currentLoans.controls['loan_details'];
|
||||
if(res['dataStatus']==true )
|
||||
{
|
||||
|
||||
let currentLoanDetails = res['records'];
|
||||
|
||||
console.log(currentLoanDetails)
|
||||
|
||||
// if(currentLoanDetails.loan_info_available == 'Yes'){
|
||||
|
||||
//}
|
||||
// console.log("resutl",result);
|
||||
this.currentLoans.controls['existing_loan'].setValue(currentLoanDetails.existing_loan);
|
||||
console.log(currentLoanDetails.loan_info_available)
|
||||
this.currentLoans.controls['loan_info_available'].setValue(currentLoanDetails.hasOwnProperty('loan_info_available') ? currentLoanDetails.loan_info_available : 'Yes');
|
||||
currentLoanDetails.loan_info_available=this.currentLoans.value.loan_info_available
|
||||
this.currentLoans.controls['currentloan_remarks'].setValue(currentLoanDetails.currentloan_remarks);
|
||||
const control = <FormArray>this.currentLoans.controls['loan_details'];
|
||||
if(this.currentLoans.value.loan_info_available == 'No'){
|
||||
this.exitsCheck(currentLoanDetails.loan_info_available)
|
||||
}
|
||||
if(currentLoanDetails.loan_info_available != 'No')
|
||||
{
|
||||
if(res['records'].loan_details !== undefined && res['records'].loan_details !=null && res['records'].loan_details !=''){
|
||||
currentLoanDetails.loan_details.forEach(val=>{
|
||||
val.bankSearch=''
|
||||
@ -493,12 +538,6 @@ submitCurrentloan(answerData) {
|
||||
return res['records'].loan_details[key];
|
||||
|
||||
});
|
||||
console.log("resutl",result);
|
||||
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(currentLoanDetails.existing_loan != 'No')
|
||||
{
|
||||
if(result.length ==0)
|
||||
{
|
||||
control.push(this.createLoanDetail(null));
|
||||
@ -522,11 +561,21 @@ submitCurrentloan(answerData) {
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
// this.currentLoans.patchValue({
|
||||
// tot_running_loans:currentLoanDetails.tot_running_loans,
|
||||
// tot_emi_paid:currentLoanDetails.tot_emi_paid,
|
||||
// tot_outstanding_loans:currentLoanDetails.tot_outstanding_loans
|
||||
// })
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.currentLoans.controls['existing_loan'].setValue(currentLoanDetails.existing_loan);
|
||||
this.currentLoans.controls['currentloan_remarks'].setValue(currentLoanDetails.currentloan_remarks);
|
||||
this.currentLoans.patchValue({
|
||||
tot_running_loans:currentLoanDetails.tot_running_loans,
|
||||
tot_emi_paid:currentLoanDetails.tot_emi_paid,
|
||||
tot_outstanding_loans:currentLoanDetails.tot_outstanding_loans
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
@ -720,6 +769,7 @@ submitCurrentloan(answerData) {
|
||||
let arr : any = [];
|
||||
if(this.labelArr.length > 0){
|
||||
this.currentLoans.controls['existing_loan'].setValue('Yes');
|
||||
this.currentLoans.controls['loan_info_available'].setValue('Yes');
|
||||
this.labelArr.forEach((v,index) => {
|
||||
|
||||
arr = {
|
||||
|
||||
@ -99,7 +99,7 @@
|
||||
</ion-row>
|
||||
</ion-label>
|
||||
<!--<p><ion-icon name="school"></ion-icon> {{item.get('qualification').value}}</p>-->
|
||||
<button ion-button align="end" item-end small clear (click)="editIndividuals(i)">
|
||||
<button ion-button align="end" item-end small clear (click)="editIndividuals(i)" >
|
||||
<ion-icon name="md-create"></ion-icon>
|
||||
</button>
|
||||
</ion-item>
|
||||
@ -237,8 +237,11 @@
|
||||
|
||||
<ion-row>
|
||||
<ion-col end>
|
||||
<button *ngIf="addIndi" float-right ion-button color="optblue" (click)="addParticular(1,indi)">Save</button>
|
||||
<button *ngIf="!addIndi" float-right ion-button color="optblue" (click)="update(1,indi)">Update</button>
|
||||
<ion-buttons end>
|
||||
<ion-spinner style="font-size: 27px;" color="optblue" *ngIf="applicant_spinner_access"></ion-spinner>
|
||||
<button *ngIf="addIndi && !applicant_spinner_access" float-right ion-button color="optblue" (click)="addParticular(1,indi)">Save</button>
|
||||
<button *ngIf="!addIndi && !applicant_spinner_access" float-right ion-button color="optblue" (click)="update(1,indi)">Update</button>
|
||||
</ion-buttons>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</div>
|
||||
@ -268,7 +271,7 @@
|
||||
|
||||
<!--Company Value Display Field-->
|
||||
<mat-card style="padding: 0px 10px !important;" *ngIf="customer_segment_abbr != 'SE-RI'">
|
||||
<h6 padding> Company/Firm </h6>
|
||||
<h6 padding><span *ngIf="customer_segment_abbr == 'SEP_INDV'">Nature of Service</span><span *ngIf="customer_segment_abbr != 'SEP_INDV'"> Company/Firm </span></h6>
|
||||
<div formArrayName="company_value">
|
||||
<ion-list>
|
||||
<ion-item-sliding [formGroupName]="i" *ngFor="let item of generalForm.controls.company_value['controls']; let i=index">
|
||||
@ -328,13 +331,17 @@
|
||||
|
||||
<div *ngIf="h_companies">
|
||||
<mat-card-header>
|
||||
<mat-card-title *ngIf="addComp"> Add Company/Firm</mat-card-title>
|
||||
<mat-card-title *ngIf="!addComp">Update Company/Firm</mat-card-title>
|
||||
<mat-card-title *ngIf="addComp && customer_segment_abbr == 'SEP_INDV'" > Add Nature of Service</mat-card-title>
|
||||
<mat-card-title *ngIf="addComp && customer_segment_abbr != 'SEP_INDV'" > Add Company / Firm</mat-card-title>
|
||||
|
||||
<mat-card-title *ngIf="!addComp && customer_segment_abbr == 'SEP_INDV'">Update Nature of Service</mat-card-title>
|
||||
<mat-card-title *ngIf="!addComp && customer_segment_abbr != 'SEP_INDV'">Update Company / Firm</mat-card-title>
|
||||
</mat-card-header>
|
||||
<div formArrayName="companies" #comp>
|
||||
<div *ngFor="let cmp of generalForm.controls.companies['controls']; let i=index" [formGroupName]="i">
|
||||
<mat-form-field style="width:100%">
|
||||
<mat-label color="primary" stacked>Company / Firm</mat-label>
|
||||
<mat-label color="primary" stacked *ngIf="customer_segment_abbr == 'SEP_INDV'">Nature of Service</mat-label>
|
||||
<mat-label color="primary" stacked *ngIf="customer_segment_abbr != 'SEP_INDV'">Company / Firm</mat-label>
|
||||
<input matInput type="text" formControlName="company_name" required>
|
||||
<mat-error style="color:red;font-size:12px;margin:0;padding:0;font-weight: normal;float:right" *ngIf="cmp.controls['company_name'].errors?.required || cmp.controls['company_name'].touched">Company
|
||||
Name is Required</mat-error>
|
||||
@ -345,7 +352,7 @@
|
||||
|
||||
<br />
|
||||
<mat-form-field style="width:100%">
|
||||
<mat-select #focusBusiness placeholder="Business Entity Type" formControlName="business_entity_type" required>
|
||||
<mat-select #focusBusiness [placeholder]="customer_segment_abbr == 'SEP_INDV' ? 'Entity Type' : 'Business Entity Type'" formControlName="business_entity_type" required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let business of businessEntityTypeList" [value]="business.business_entity_type_id">
|
||||
{{business.business_entity_type_name}}
|
||||
@ -358,7 +365,9 @@
|
||||
<mat-form-field style="width:100%" *ngIf="cmp.value.business_entity_type==1">
|
||||
<input matInput type="text" placeholder="Please Specity Others" formControlName="business_entity_type_other">
|
||||
</mat-form-field>
|
||||
<p>Number of Years For Which The Business Has Been Running</p>
|
||||
<p>
|
||||
<span *ngIf="customer_segment_abbr == 'SEP_INDV'">Number of Years in Current Profession</span>
|
||||
<span *ngIf="customer_segment_abbr != 'SEP_INDV'">Number of Years For Which The Business Has Been Running</span></p>
|
||||
<mat-form-field style="width:100%">
|
||||
<mat-label>Year</mat-label>
|
||||
<input matInput type="number" placeholder="No of Years (Eg. 20)" formControlName="business_years" autocomplete="off">
|
||||
@ -439,7 +448,8 @@
|
||||
<mat-card *ngIf="customer_segment_abbr != 'SE-RI'">
|
||||
<div formArrayName="company_with_relationships">
|
||||
<mat-card-header>
|
||||
<mat-card-title style="font-size:16px;font-weight:bold"> Relationship of Individuals to Company / Firm</mat-card-title>
|
||||
<mat-card-title style="font-size:16px;font-weight:bold" *ngIf="customer_segment_abbr == 'SEP_INDV'"> Relationship of Individuals to Profession</mat-card-title>
|
||||
<mat-card-title style="font-size:16px;font-weight:bold" *ngIf="customer_segment_abbr != 'SEP_INDV'"> Relationship of Individuals to Company / Firm</mat-card-title>
|
||||
</mat-card-header>
|
||||
<div *ngFor="let cmprel of generalForm.controls.company_with_relationships['controls']; let i=index"
|
||||
[formGroupName]="i">
|
||||
|
||||
@ -77,6 +77,7 @@ export class PdQuestionGeneralInfoPage {
|
||||
|
||||
complete_status : boolean = false;
|
||||
spinner_access:boolean=false;
|
||||
applicant_spinner_access:boolean=false
|
||||
|
||||
@ViewChild('remark') nameField: ElementRef;
|
||||
@ViewChild('focusBusiness') focus_business_entity : MatSelect
|
||||
@ -286,6 +287,7 @@ export class PdQuestionGeneralInfoPage {
|
||||
});
|
||||
control.push(formData);
|
||||
this.buttonClick=false;
|
||||
|
||||
// this.generalForm.value.individuals.value=""
|
||||
}
|
||||
console.log(control.value);
|
||||
@ -667,7 +669,7 @@ dataobj:any;
|
||||
qualification_name:c_qualification_name
|
||||
});
|
||||
|
||||
this.buttonClick=false;
|
||||
// this.buttonClick=false;
|
||||
console.log("edit",control.value)
|
||||
|
||||
// console.log(this.generalForm.controls.list_value['controls'])
|
||||
@ -772,6 +774,7 @@ dataobj:any;
|
||||
|
||||
}
|
||||
saveApplicants(datas,purpose){
|
||||
this.applicant_spinner_access=true
|
||||
let dataResponse
|
||||
|
||||
let params=datas
|
||||
@ -785,6 +788,7 @@ dataobj:any;
|
||||
|
||||
console.log("Params value",params)
|
||||
this.qustCat.saveApplicantFromGeneralForm(params).subscribe(result=>{
|
||||
console.log(result)
|
||||
if(result['dataStatus']){
|
||||
let result_data=result['records']
|
||||
|
||||
@ -809,6 +813,7 @@ dataobj:any;
|
||||
console.log("edit",control.value)
|
||||
}
|
||||
}
|
||||
this.applicant_spinner_access=false
|
||||
})
|
||||
})
|
||||
// return dataResponse
|
||||
|
||||
@ -17,6 +17,7 @@ import { HttpErrorResponse } from "@angular/common/http";
|
||||
|
||||
import { CognitoServiceProvider } from '../aws-service/cognito.service';
|
||||
import {ConstantsProvider} from '../constants/constants'
|
||||
import { ToastProvider } from '../common-provider/toast';
|
||||
@Injectable()
|
||||
export class TokenInterceptor implements HttpInterceptor{
|
||||
constructor(private injector:Injector ) {
|
||||
@ -30,17 +31,20 @@ export class TokenInterceptor implements HttpInterceptor{
|
||||
return Observable.create((observer: any) => {
|
||||
setTimeout(() => {
|
||||
const authService = this.injector.get(CognitoServiceProvider)
|
||||
authService.refresh();
|
||||
observer.next(authService.getToken())
|
||||
observer.complete()
|
||||
// console.log("token",authService.getToken())
|
||||
})
|
||||
})
|
||||
.mergeMap((token: any) => {
|
||||
.mergeMap((token_res: any) => {
|
||||
let authReq = request
|
||||
|
||||
if (token) {
|
||||
let token=token_res || null
|
||||
if (token_res) {
|
||||
|
||||
token=token.idToken.jwtToken
|
||||
token=token_res.idToken.jwtToken
|
||||
}
|
||||
|
||||
// console.log("authorization",token)
|
||||
env=env.authorization
|
||||
// console.log("Sparq",env)
|
||||
@ -51,7 +55,7 @@ export class TokenInterceptor implements HttpInterceptor{
|
||||
'From':'1',
|
||||
}
|
||||
})
|
||||
}
|
||||
// }
|
||||
|
||||
return next.handle(authReq).pipe(
|
||||
catchError(this.handleError<any>('role', []))
|
||||
@ -88,7 +92,10 @@ export class TokenInterceptor implements HttpInterceptor{
|
||||
}
|
||||
|
||||
private handleError<T> (operation = 'operation', result?: T) {
|
||||
|
||||
const toastProvider=this.injector.get(ToastProvider)
|
||||
return (error: any): Observable<T> => {
|
||||
toastProvider.pdTriggerappmessage('Network Error');
|
||||
console.log("error",error)
|
||||
if(error instanceof HttpErrorResponse){
|
||||
console.error("Error: ", error.status);
|
||||
|
||||
@ -31,6 +31,7 @@ let alert=this.alertCtrl.create({
|
||||
title:title_name,
|
||||
message:msg,
|
||||
cssClass:'buttoncss',
|
||||
enableBackdropDismiss:false,
|
||||
buttons:[{
|
||||
text:'No',
|
||||
cssClass:'btnNo',
|
||||
@ -115,6 +116,7 @@ setAlertForCompletePD(){
|
||||
|
||||
return alert
|
||||
}
|
||||
//FOR NOTIFICATION
|
||||
setAlertwithButton(data){
|
||||
let alert =this.alertCtrl.create({
|
||||
title: 'Notification',
|
||||
@ -124,4 +126,19 @@ setAlertwithButton(data){
|
||||
})
|
||||
alert.present();
|
||||
}
|
||||
//FOR ALL PURPOSE CURRENTLY USED FOR APP UPDATE NOTIFICATION
|
||||
setAlertwithOKButton(title,msg){
|
||||
let alert =this.alertCtrl.create({
|
||||
title:title,
|
||||
message:msg,
|
||||
enableBackdropDismiss:false,
|
||||
buttons: [{
|
||||
text:'OK',
|
||||
handler:()=>{
|
||||
alert.dismiss('s')
|
||||
return false
|
||||
}}]
|
||||
})
|
||||
return alert;
|
||||
}
|
||||
}
|
||||
|
||||
@ -33,6 +33,7 @@ public commonimage = "http://pdgenie.com/logo/avatar.jpg";
|
||||
// LIVE ENVIRONMENT
|
||||
let production={
|
||||
url:'https://pdgenie.com/sparqprod/api/',
|
||||
environment_name:'production',
|
||||
authorization:'TnAwuc64pVpcB9xf',
|
||||
login_string: "cognito-idp.ap-south-1.amazonaws.com/ap-south-1_MlTee1O5V",
|
||||
identityPoolId:'ap-south-1:31774418-8384-4fbb-b3e2-b87ce0f26ef1',
|
||||
@ -42,6 +43,7 @@ public commonimage = "http://pdgenie.com/logo/avatar.jpg";
|
||||
// DEVELOPMENT ENVIRONMENT
|
||||
let development={
|
||||
url:'https://demo.pdgenie.com/sparqapi/api/',
|
||||
environment_name:'development',
|
||||
authorization:'sparqvenba2018',
|
||||
login_string: "cognito-idp.ap-south-1.amazonaws.com/ap-south-1_qQ85yQZJO",
|
||||
|
||||
@ -52,6 +54,7 @@ public commonimage = "http://pdgenie.com/logo/avatar.jpg";
|
||||
// TESTING ENVIRONMNET
|
||||
let testing={
|
||||
url:'https://demo.pdgenie.com/sparqtest/api/',
|
||||
environment_name:'testing',
|
||||
authorization:'sparqvenba2018',
|
||||
login_string: "cognito-idp.ap-south-1.amazonaws.com/ap-south-1_qQ85yQZJO",
|
||||
|
||||
|
||||
@ -78,4 +78,8 @@ export class PdtriggerProvider {
|
||||
getQCLenderRemarks(values){
|
||||
return this.http.post(this.apiurl+'getQCLenderRemarks',{records:{'pd_id':values.pd_id,'flag':values.flag}})
|
||||
}
|
||||
//FOR CHECKING APP VERSION
|
||||
checkAppVersion(){
|
||||
return this.http.get(this.apiurl+'checkAppVersion/get?client=MOB')
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ import { Injectable } from '@angular/core';
|
||||
import { ConstantsProvider } from '../constants/constants';
|
||||
import { Observable } from 'rxjs';
|
||||
import {CacheService} from 'ionic-cache'
|
||||
import { state } from '@angular/animations';
|
||||
|
||||
/*
|
||||
Generated class for the QuestionCategoryProvider provider.
|
||||
@ -98,9 +99,10 @@ getCompaniesListsForBusiness(pdid:any){
|
||||
// return this.cache.loadFromObservable(cacheKey,request,'companies')
|
||||
}
|
||||
getStateWiseCities(stateid:any){
|
||||
let cacheKey='getListOfStatesAndCities'
|
||||
let cacheKey='getListOfStatesAndCities-'+stateid
|
||||
let request= this.http.post<any>(this.apiurl + "getListOfStatesAndCities", { "records":{ "state_id" : stateid}})
|
||||
return this.cache.loadFromObservable(cacheKey,request,'cityandpincode',ttl);
|
||||
// return this.http.post<any>(this.apiurl + "getListOfStatesAndCities", { "records":{ "state_id" : stateid}})
|
||||
}
|
||||
getAllPersonsName(pdid:any){
|
||||
return this.http.post<any>(this.apiurl + "getAllPersonsName", {"pd_id" : pdid})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user