General and business Form Slowness issue fixed
This commit is contained in:
parent
4bf0fdfc5f
commit
42ae3f0978
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<widget id="com.sineedge.pdgenie" version="0.0.13" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
<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">
|
||||
<name>PD Genie Officer </name>
|
||||
<description>info@pdgenie.com</description>
|
||||
<author email="info@pdgenie.com" href="https://pdgenie.com">PD Genie</author>
|
||||
@ -101,5 +101,5 @@
|
||||
<variable name="FCM_VERSION" value="11.6.2" />
|
||||
</plugin>
|
||||
<engine name="browser" spec="5.0.4" />
|
||||
<engine name="android" spec="8.0.0" />
|
||||
<engine name="android" spec="^8.0.0" />
|
||||
</widget>
|
||||
|
||||
34
package-lock.json
generated
34
package-lock.json
generated
@ -2382,14 +2382,14 @@
|
||||
}
|
||||
},
|
||||
"graceful-fs": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.0.tgz",
|
||||
"integrity": "sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg=="
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.2.tgz",
|
||||
"integrity": "sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q=="
|
||||
},
|
||||
"semver": {
|
||||
"version": "5.7.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
|
||||
"integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA=="
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
|
||||
},
|
||||
"strip-bom": {
|
||||
"version": "3.0.0",
|
||||
@ -6054,8 +6054,7 @@
|
||||
"path-parse": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
|
||||
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
|
||||
},
|
||||
"path-to-regexp": {
|
||||
"version": "1.7.0",
|
||||
@ -6148,14 +6147,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"base64-js": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz",
|
||||
"integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw=="
|
||||
},
|
||||
"xmlbuilder": {
|
||||
"version": "9.0.7",
|
||||
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
|
||||
"integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0="
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
|
||||
"integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g=="
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -7251,11 +7245,6 @@
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
},
|
||||
"path-parse": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
|
||||
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
|
||||
},
|
||||
"resolve": {
|
||||
"version": "1.11.1",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz",
|
||||
@ -8557,8 +8546,7 @@
|
||||
"xmlbuilder": {
|
||||
"version": "9.0.7",
|
||||
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
|
||||
"integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=",
|
||||
"dev": true
|
||||
"integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0="
|
||||
},
|
||||
"xmldom": {
|
||||
"version": "0.1.27",
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
"@types/chart.js": "^2.7.40",
|
||||
"amazon-cognito-identity-js": "^3.0.3",
|
||||
"chart.js": "^2.7.3",
|
||||
"cordova-android": "8.0.0",
|
||||
"cordova-android": "^8.0.0",
|
||||
"cordova-browser": "5.0.4",
|
||||
"cordova-plugin-android-permissions": "1.0.0",
|
||||
"cordova-plugin-app-version": "0.1.9",
|
||||
|
||||
24
plugins/android.json
Executable file → Normal file
24
plugins/android.json
Executable file → Normal file
@ -32,6 +32,17 @@
|
||||
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+",
|
||||
"PACKAGE_NAME": "com.sineedge.pdgenie"
|
||||
},
|
||||
"cordova-plugin-mauron85-background-geolocation": {
|
||||
"GOOGLE_PLAY_SERVICES_VERSION": "11+",
|
||||
"ANDROID_SUPPORT_LIBRARY_VERSION": "26+",
|
||||
"ICON": "@mipmap/icon",
|
||||
"SMALL_ICON": "@mipmap/icon",
|
||||
"ACCOUNT_NAME": "@string/app_name",
|
||||
"ACCOUNT_LABEL": "@string/app_name",
|
||||
"ACCOUNT_TYPE": "$PACKAGE_NAME.account",
|
||||
"CONTENT_AUTHORITY": "$PACKAGE_NAME",
|
||||
"PACKAGE_NAME": "com.sineedge.pdgenie"
|
||||
},
|
||||
"cordova-plugin-request-location-accuracy": {
|
||||
"PACKAGE_NAME": "com.sineedge.pdgenie"
|
||||
},
|
||||
@ -55,17 +66,6 @@
|
||||
"uk.co.workingedge.phonegap.plugin.launchnavigator": {
|
||||
"OKHTTP_VERSION": "3.+",
|
||||
"PACKAGE_NAME": "com.sineedge.pdgenie"
|
||||
},
|
||||
"cordova-plugin-mauron85-background-geolocation": {
|
||||
"GOOGLE_PLAY_SERVICES_VERSION": "11+",
|
||||
"ANDROID_SUPPORT_LIBRARY_VERSION": "26+",
|
||||
"ICON": "@mipmap/icon",
|
||||
"SMALL_ICON": "@mipmap/icon",
|
||||
"ACCOUNT_NAME": "@string/app_name",
|
||||
"ACCOUNT_LABEL": "@string/app_name",
|
||||
"ACCOUNT_TYPE": "$PACKAGE_NAME.account",
|
||||
"CONTENT_AUTHORITY": "$PACKAGE_NAME",
|
||||
"PACKAGE_NAME": "com.sineedge.pdgenie"
|
||||
}
|
||||
},
|
||||
"dependent_plugins": {
|
||||
@ -85,4 +85,4 @@
|
||||
"PACKAGE_NAME": "com.sineedge.pdgenie"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
22
plugins/cordova-sqlite-storage/package-lock.json
generated
22
plugins/cordova-sqlite-storage/package-lock.json
generated
@ -21,11 +21,11 @@
|
||||
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"nice-try": "1.0.5",
|
||||
"path-key": "2.0.1",
|
||||
"semver": "5.7.0",
|
||||
"shebang-command": "1.2.0",
|
||||
"which": "1.3.1"
|
||||
"nice-try": "^1.0.4",
|
||||
"path-key": "^2.0.1",
|
||||
"semver": "^5.5.0",
|
||||
"shebang-command": "^1.2.0",
|
||||
"which": "^1.2.9"
|
||||
}
|
||||
},
|
||||
"fs-extra": {
|
||||
@ -34,9 +34,9 @@
|
||||
"integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"graceful-fs": "4.2.0",
|
||||
"jsonfile": "4.0.0",
|
||||
"universalify": "0.1.2"
|
||||
"graceful-fs": "^4.2.0",
|
||||
"jsonfile": "^4.0.0",
|
||||
"universalify": "^0.1.0"
|
||||
}
|
||||
},
|
||||
"graceful-fs": {
|
||||
@ -57,7 +57,7 @@
|
||||
"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"graceful-fs": "4.2.0"
|
||||
"graceful-fs": "^4.1.6"
|
||||
}
|
||||
},
|
||||
"nice-try": {
|
||||
@ -84,7 +84,7 @@
|
||||
"integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"shebang-regex": "1.0.0"
|
||||
"shebang-regex": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"shebang-regex": {
|
||||
@ -105,7 +105,7 @@
|
||||
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"isexe": "2.0.0"
|
||||
"isexe": "^2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,26 +5,29 @@ password: pdgenieofficer
|
||||
|
||||
commands:
|
||||
|
||||
GENERATE A KEY(One Time Generation only)
|
||||
------------
|
||||
command 1 GENERATE A KEY(One Time Generation only)
|
||||
--------------------------------------------------
|
||||
|
||||
keytool -genkey -v -keystore lender.jks -keyalg RSA -keysize 2048 -validity 10000 -alias my-alias (One time only)
|
||||
keytool -genkey -v -keystore lender.jks -keyalg RSA -keysize 2048 -validity 10000 -alias my-alias (One time only)
|
||||
|
||||
SIGN THE APK
|
||||
-----------
|
||||
<we have already jks file in releaseApk folder do not run this command >
|
||||
|
||||
command 2 SIGN THE APK
|
||||
----------------------
|
||||
|
||||
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore pd-genie-officer.jks app-release-unsigned.apk my-alias
|
||||
|
||||
OPTIMIZE THE APK
|
||||
-------------------
|
||||
command 3 OPTIMIZE THE APK
|
||||
--------------------------
|
||||
|
||||
zipalign -v 4 app-release-unsigned.apk pd_genie_officer.apk
|
||||
|
||||
VERIFY THE SIGNED APK
|
||||
---------------------
|
||||
command 4 VERIFY THE SIGNED APK
|
||||
-------------------------------
|
||||
|
||||
apksigner verify pd_genie_officer.apk
|
||||
|
||||
|
||||
password:
|
||||
pdgenieofficer
|
||||
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
</button>
|
||||
<ion-title *ngIf="!viewchange">{{formdetails.form_name}}</ion-title>
|
||||
<ion-buttons end>
|
||||
<a (click)="capture()">
|
||||
<a (click)="capture('')">
|
||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;">
|
||||
<ion-icon name="md-camera"></ion-icon>
|
||||
</span>
|
||||
|
||||
@ -1752,6 +1752,25 @@ 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'
|
||||
if(res != 'error'){
|
||||
this.cons.getGeoTag().then(geoCoordinates=>{
|
||||
let bucket:any=[]
|
||||
bucket.push({ 'image': res, 'Name': img_name, 'link': geoCoordinates });
|
||||
let records: any = {
|
||||
'pd_id': this.pdDetails.pd_id,
|
||||
'formid': this.FormId,
|
||||
'images': bucket,
|
||||
'company_id': this.pdDetails.company_id,
|
||||
}
|
||||
console.log("params savePDImage",records)
|
||||
this.qustCat.savePDImages(records).subscribe(result=>{
|
||||
if(result['dataStatus']){
|
||||
console.log(result);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}, error => {
|
||||
console.log("Camera Error ", JSON.stringify(error));
|
||||
})
|
||||
@ -2130,6 +2149,23 @@ export class PdQuestionBusinessInfoPage {
|
||||
// }
|
||||
// console.log('records',records);
|
||||
this.spinner_access=true;
|
||||
//FOR REMOVING THE base64 data from json
|
||||
console.log("record params1",records.gst_Regn_cert_pic)
|
||||
records.hasOwnProperty('shop_eat_act_cert_pic') && records.shop_eat_act_cert_pic != '' ? records.shop_eat_act_cert_pic = 'SAVED' :''
|
||||
records.hasOwnProperty('gst_Regn_cert_pic') && records.gst_Regn_cert_pic != '' ? records.gst_Regn_cert_pic = 'SAVED' :''
|
||||
records.hasOwnProperty('export_import_cert_pic') && records.export_import_cert_pic != '' ? records.export_import_cert_pic = 'SAVED' :''
|
||||
records.hasOwnProperty('factory_cert_pic') && records.factory_cert_pic != '' ? records.factory_cert_pic = 'SAVED' :''
|
||||
records.hasOwnProperty('practice_cert_pic') && records.practice_cert_pic != '' ? records.practice_cert_pic = 'SAVED' :''
|
||||
records.hasOwnProperty('pf_regn_pic') && records.pf_regn_pic != '' ? records.pf_regn_pic = 'SAVED' :''
|
||||
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.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
|
||||
@ -2588,16 +2624,34 @@ export class PdQuestionBusinessInfoPage {
|
||||
}
|
||||
|
||||
ImageUpload(Flag: any) {
|
||||
|
||||
let img_name
|
||||
this.cameraProvider.getpicture().then(res => {
|
||||
if (Flag == 1) { this.businessForm.controls.shop_eat_act_cert_pic.setValue(res != 'error' ? res : ''); }//alert('Inside Mobile Upload Function' + Flag);}
|
||||
if (Flag == 2) { this.businessForm.controls.gst_Regn_cert_pic.setValue(res != 'error' ? res : ''); }//alert('Inside Mobile Upload Function' + Flag);}
|
||||
if (Flag == 3) { this.businessForm.controls.export_import_cert_pic.setValue(res != 'error' ? res : ''); }//alert('Inside Mobile Upload Function' + Flag);}
|
||||
if (Flag == 4) { this.businessForm.controls.factory_cert_pic.setValue(res != 'error' ? res : ''); }//alert('Inside Mobile Upload Function' + Flag);}
|
||||
if (Flag == 5) { this.businessForm.controls.practice_cert_pic.setValue(res != 'error' ? res : ''); }// alert('Inside Mobile Upload Function' + Flag);}
|
||||
if (Flag == 6) { this.businessForm.controls.pf_regn_pic.setValue(res != 'error' ? res : ''); }//alert('Inside Mobile Upload Function' + Flag);}
|
||||
if (Flag == 7) { this.businessForm.controls.esic_regn_pic.setValue(res != 'error' ? res : ''); }//alert('Inside Mobile Upload Function' + Flag);}
|
||||
if (Flag == 8) { this.businessForm.controls.fire_noc_pic.setValue(res != 'error' ? res : ''); }//alert('Inside Mobile Upload Function' + Flag);}
|
||||
if (Flag == 1) { this.businessForm.controls.shop_eat_act_cert_pic.setValue(res != 'error' ? res : ''); img_name="shop_eat_act_cert_pic"}//alert('Inside Mobile Upload Function' + Flag);}
|
||||
if (Flag == 2) { this.businessForm.controls.gst_Regn_cert_pic.setValue(res != 'error' ? res : ''); img_name="gst_Regn_cert_pic" }//alert('Inside Mobile Upload Function' + Flag);}
|
||||
if (Flag == 3) { this.businessForm.controls.export_import_cert_pic.setValue(res != 'error' ? res : ''); img_name="export_import_cert_pic"}//alert('Inside Mobile Upload Function' + Flag);}
|
||||
if (Flag == 4) { this.businessForm.controls.factory_cert_pic.setValue(res != 'error' ? res : ''); img_name="factory_cert_pic"}//alert('Inside Mobile Upload Function' + Flag);}
|
||||
if (Flag == 5) { this.businessForm.controls.practice_cert_pic.setValue(res != 'error' ? res : ''); img_name="practice_cert_pic"}// alert('Inside Mobile Upload Function' + Flag);}
|
||||
if (Flag == 6) { this.businessForm.controls.pf_regn_pic.setValue(res != 'error' ? res : ''); img_name="pf_regn_pic"}//alert('Inside Mobile Upload Function' + Flag);}
|
||||
if (Flag == 7) { this.businessForm.controls.esic_regn_pic.setValue(res != 'error' ? res : ''); img_name="esic_regn_pic"}//alert('Inside Mobile Upload Function' + Flag);}
|
||||
if (Flag == 8) { this.businessForm.controls.fire_noc_pic.setValue(res != 'error' ? res : ''); img_name="fire_noc_pic"}//alert('Inside Mobile Upload Function' + Flag);}
|
||||
if(res != 'error'){
|
||||
this.cons.getGeoTag().then(geoCoordinates=>{
|
||||
let bucket:any=[]
|
||||
bucket.push({ 'image': res, 'Name': img_name, 'link': geoCoordinates });
|
||||
let records: any = {
|
||||
'pd_id': this.pdDetails.pd_id,
|
||||
'formid': this.FormId,
|
||||
'images': bucket,
|
||||
'company_id': this.pdDetails.company_id,
|
||||
}
|
||||
console.log("params savePDImage",records)
|
||||
this.qustCat.savePDImages(records).subscribe(result=>{
|
||||
if(result['dataStatus']){
|
||||
console.log(result);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}, error => {
|
||||
console.log("Camera Error ", JSON.stringify(error));
|
||||
})
|
||||
|
||||
@ -255,7 +255,7 @@ export class PdQuestionGeneralInfoPage {
|
||||
}
|
||||
}
|
||||
|
||||
initlistv(data,purpose) :void
|
||||
initlistv(data,purpose,response_value?) :void
|
||||
{
|
||||
const control=<FormArray>this.generalForm.controls['list_value'];
|
||||
// console.log("control",control.length)
|
||||
@ -268,8 +268,8 @@ export class PdQuestionGeneralInfoPage {
|
||||
applicant_title_name:[val.applicant_title_name],
|
||||
applicant_name:[val.applicant_name],
|
||||
is_person_met:val.is_person_met,
|
||||
is_person_met_pic :val.is_person_met_pic != null ? val.is_person_met_pic : '',
|
||||
is_person_met_id_proof : val.is_person_met_id_proof,
|
||||
is_person_met_pic :response_value.is_person_met_pic != null ? response_value.is_person_met_pic : '',
|
||||
is_person_met_id_proof : response_value.is_person_met_id_proof,
|
||||
is_applicant:val.is_applicant,
|
||||
age:[val.age],
|
||||
qualification:[val.qualification],
|
||||
@ -278,7 +278,7 @@ export class PdQuestionGeneralInfoPage {
|
||||
individuals_order_id:[control.length+1],
|
||||
is_new:true,
|
||||
is_active:true,
|
||||
pd_co_applicant_id:[control.length+1],
|
||||
pd_co_applicant_id:[response_value.pd_co_applicant_id],
|
||||
|
||||
qualification_name:[c_qualification_name]
|
||||
|
||||
@ -288,6 +288,7 @@ export class PdQuestionGeneralInfoPage {
|
||||
this.buttonClick=false;
|
||||
// this.generalForm.value.individuals.value=""
|
||||
}
|
||||
console.log(control.value);
|
||||
}
|
||||
if(purpose=='get'){
|
||||
for(let val of data)
|
||||
@ -643,13 +644,16 @@ dataobj:any;
|
||||
// const control=this.list_value
|
||||
var c_qualification_name=this.qualificationById(val.qualification)
|
||||
const control=this.generalForm.controls['list_value']['controls'][this.updateIndex_indi]
|
||||
let param_data=val
|
||||
param_data.pd_co_applicant_id=old.pd_co_applicant_id
|
||||
this.saveApplicants(val,'update')
|
||||
control.patchValue({
|
||||
|
||||
applicant_title_name:val.applicant_title_name,
|
||||
applicant_name:val.applicant_name,
|
||||
is_person_met:val.is_person_met,
|
||||
is_person_met_pic : val.is_person_met_pic != null ? val.is_person_met_pic : '',
|
||||
is_person_met_id_proof: val.is_person_met_id_proof,
|
||||
// is_person_met_pic : val.is_person_met_pic != null ? val.is_person_met_pic : '',
|
||||
// is_person_met_id_proof: val.is_person_met_id_proof,
|
||||
is_applicant:val.is_applicant,
|
||||
age:val.age,
|
||||
qualification:val.qualification,
|
||||
@ -662,7 +666,10 @@ dataobj:any;
|
||||
|
||||
qualification_name:c_qualification_name
|
||||
});
|
||||
|
||||
this.buttonClick=false;
|
||||
console.log("edit",control.value)
|
||||
|
||||
// console.log(this.generalForm.controls.list_value['controls'])
|
||||
// this.generalForm.controls.list_value.value.scrollToTop();
|
||||
// this.generalForm.controls['list_value']._scrollContent;
|
||||
@ -748,8 +755,9 @@ dataobj:any;
|
||||
this.toast.pdTriggerappmessage("Please Fill all Mandatory field Marked with '*'");
|
||||
}
|
||||
else{
|
||||
this.initlistv(this.generalForm.value.individuals,'ins');
|
||||
this.initPersonRelationship('');
|
||||
this.saveApplicants(this.generalForm.value.individuals[0],'ins')
|
||||
// this.initlistv(this.generalForm.value.individuals,'ins');
|
||||
// this.initPersonRelationship('');
|
||||
}
|
||||
}
|
||||
else if(v=='2')
|
||||
@ -762,6 +770,48 @@ dataobj:any;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
saveApplicants(datas,purpose){
|
||||
let dataResponse
|
||||
|
||||
let params=datas
|
||||
console.log("fresh param",params)
|
||||
params.fk_pd_id=this.pdDetails.pd_id
|
||||
params.fk_createdby=this.users;
|
||||
params.hasOwnProperty('pd_co_applicant_id') ? params.pd_co_applicant_id : params.pd_co_applicant_id=''
|
||||
this.cons.getGeoTag().then(res=>{
|
||||
// console.log("Geo Coords",res)
|
||||
params.link=res
|
||||
|
||||
console.log("Params value",params)
|
||||
this.qustCat.saveApplicantFromGeneralForm(params).subscribe(result=>{
|
||||
if(result['dataStatus']){
|
||||
let result_data=result['records']
|
||||
|
||||
|
||||
dataResponse={pd_co_applicant_id:result_data.pd_co_applicant_id,
|
||||
is_person_met_pic:result_data.is_person_met_pic,
|
||||
is_person_met_id_proof:result_data.is_person_met_id_proof}
|
||||
if(purpose == 'ins'){
|
||||
|
||||
this.initlistv(this.generalForm.value.individuals,'ins',dataResponse);
|
||||
this.initPersonRelationship('');
|
||||
}
|
||||
|
||||
else if(purpose == 'update'){
|
||||
const control=this.generalForm.controls['list_value']['controls'][this.updateIndex_indi]
|
||||
//FOR UPDATING THE
|
||||
control.patchValue({
|
||||
is_person_met_pic : dataResponse.is_person_met_pic != null ? dataResponse.is_person_met_pic : '',
|
||||
is_person_met_id_proof: dataResponse.is_person_met_id_proof,
|
||||
})
|
||||
this.buttonClick=false;
|
||||
console.log("edit",control.value)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
// return dataResponse
|
||||
}
|
||||
removeList(i,index){
|
||||
if(index=='1')
|
||||
@ -1309,7 +1359,7 @@ console.log('1)',this.temp);
|
||||
|
||||
}
|
||||
else{
|
||||
// console.log("Else data",this.pd_applicants_details)
|
||||
console.log("Else data",this.pd_applicants_details)
|
||||
this.pd_applicants_details.forEach((datas,index)=>{
|
||||
datas.is_applicant=true,
|
||||
datas.is_person_met = false;
|
||||
|
||||
@ -157,5 +157,10 @@ getCustomersDetails(): Observable<any> {
|
||||
saveAssessedIncomePurchaseDeclaredByCustomer(data){
|
||||
return this.http.post(this.apiurl+'saveAssessedIncomePurchaseDeclaredByCustomer',{records:data})
|
||||
}
|
||||
|
||||
//FOR GENERAL FORM APPLICANT SAVE
|
||||
saveApplicantFromGeneralForm(datas){
|
||||
return this.http.post(this.apiurl+'saveApplicantFromGeneralForm',datas)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user