Fairoj : userid missing issue and loan details property others duplicate issue fixed

This commit is contained in:
venbatechnologies@gmail.com 2019-12-11 16:44:38 +05:30
parent b2102242dc
commit 97e42f8123
45 changed files with 92 additions and 49 deletions

View File

@ -1 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
{"version":3,"sources":["../../@angular/common/http (ignored)"],"names":[],"mappings":";;;;;AAAA,e","file":"0.js","sourcesContent":["/* (ignored) */\n\n\n//////////////////\n// WEBPACK FOOTER\n// @angular/common/http (ignored)\n// module id = 726\n// module chunks = 0"],"sourceRoot":""}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -218,6 +218,7 @@ let alert=this.alertCtrl.create({
// console.log("Inside user details notification access value",this.notificationAccess)
this.userAccess = true;
this.userDetails = this.userDetails.records[0];
localStorage.setItem("pd_user_details",JSON.stringify(this.userDetails))
this.notification()
}

View File

@ -34,7 +34,8 @@ export class BouncedRejectPage {
// this.status = this.navParams.get('status');
this.pdDetails=this.navParams.get('details')
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.getDropdown();
}

View File

@ -148,7 +148,8 @@ checkOtpAccess:boolean = false;
// this.getenableAccuracy();
// }
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
console.log("users",this.users)
this.requirement_hide=false;
// this.getcurrentBackgroundLocation();

View File

@ -92,6 +92,7 @@ login() {
if (this.users.dataStatus == true) {
if(this.users.records[0].role_name == "PD Officer" || this.users.records[0].role_name == "PD Executive"){
localStorage.setItem("pd_user_details",JSON.stringify(this.users.records[0]))
this.notification()
this.checkAppVersion()
this.navCtrl.setRoot(PdListPage);

View File

@ -79,7 +79,9 @@ console.log("d",this.master,'kd',this.applicants,'dks',this.applicants);
this.toast.pdTriggerappmessage("Please Fill all the Fields");
return;
}
let update_records={"pd_id":null,"parent_pd_id":this.master.parent_pd_id,"fk_address_id":this.addressData.pd_address_id,"pd_status":"ACCEPTED","fk_updatedby":this.aws.getlocale(),
let users = localStorage.getItem('pd_user_details')
users=JSON.parse(users).userid
let update_records={"pd_id":null,"parent_pd_id":this.master.parent_pd_id,"fk_address_id":this.addressData.pd_address_id,"pd_status":"ACCEPTED","fk_updatedby":users,
"fk_customer_segment":values.fk_customer_segment,
"pd_co_applicant_id":values.pd_co_applicant_id,
"mobile_no":values.mobile_no,

View File

@ -44,8 +44,9 @@ export class OtpPage {
this.applicatentDetails = this.navParams.get('pdDetails');
console.log("this",this.applicatentDetails);
// this.address_pd_id=this.navParams.get('address_pd_id')
this.users = this.aws.getlocale();
console.log("user",this.users)
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.reasonForm = this.fb.group(
{
reason:[null,Validators.compose([Validators.required])],

View File

@ -11,6 +11,8 @@ import { OtpPage } from '../otp/otp';
import { DatabaseProvider } from '../../providers/database/database';
import { AndroidPermissions } from '@ionic-native/android-permissions';
import {Content} from 'ionic-angular'
import { StorageProvider } from '../../providers/storage/storage';
/**
* Generated class for the PdListPage page.
*
@ -40,7 +42,7 @@ export class PdListPage {
notification:any=[]
from:any;
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public pdofficer:PdtriggerProvider,public shared:CognitoServiceProvider,public db:DatabaseProvider,public androidPermissions:AndroidPermissions,private event:Events) {
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public pdofficer:PdtriggerProvider,public shared:CognitoServiceProvider,public db:DatabaseProvider,public androidPermissions:AndroidPermissions,private event:Events,private ionicStrorage:StorageProvider) {
//this.getlenderpddetails();
// this.getpdTriggerdetails();
this.event.subscribe('notify',(res)=>{
@ -68,6 +70,7 @@ export class PdListPage {
console.log('ionViewDidLoad PdListPage');
this.db.getuserDetails();
this.setpermission();
}
ionViewCanEnter()
{
@ -132,7 +135,8 @@ export class PdListPage {
getpdTriggerdetails()
{
let userid = this.aws.getlocale();
let userid = localStorage.getItem('pd_user_details')
userid=JSON.parse(userid).userid
//.log("User",userid)
this.pdlistaccess = true;
@ -223,7 +227,7 @@ export class PdListPage {
PdAllocation(pddetails)
{
this.ionicStrorage.clearItem('pd_images');
if(pddetails.pd_status == '')//for STARTED
{
this.navCtrl.push(OtpPage,{'pdDetails':pddetails});

View File

@ -441,7 +441,8 @@ else{ //IF ADDRESS COUNT 0 THIS BLOCK EXECUTED
//alert.present();
let users = this.aws.getlocale();
let users = localStorage.getItem('pd_user_details')
users=JSON.parse(users).userid
if(!this.overallqustioncountAccess){// For checking Answered Forms
this.toast.pdTriggerappmessage("Please complete all the Forms");
}

View File

@ -110,7 +110,8 @@ export class PdQuestionAddressPage {
this.FormId = this.navParams.get('FormId');
this.lender_short_name=this.pdDetails.lender_short_name
this.product_abbr=this.pdDetails.product_abbr
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid

View File

@ -36,7 +36,8 @@ export class PdQuestionAssessedBusinessIncomePage {
this.pdDetails = this.navParams.get('pdDetails');
this.expenseDetails = this.navParams.get('income');
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.BuissnessForm = this.fb.group(
{
busIncome:this.fb.array([]),

View File

@ -40,7 +40,8 @@ export class PdQuestionAssessedBusinessPage {
this.pdDetails = this.navParams.get('pdDetails');
this.expenseDetails = this.navParams.get('expense');
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.BuissnessForm = this.fb.group(
{
busExpense:this.fb.array([]),

View File

@ -49,7 +49,8 @@ export class PdQuestionAssessedDailyPurchasePage {
this.purchaseData=this.navParams.get('purchaseDaily')
console.log("data",this.purchaseData);
this.margin_calculation_status=this.navParams.get('margin_calculation_status');
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.purchaseItemForm=this.fb.group({
// purchase_item:[''],

View File

@ -52,7 +52,8 @@ export class PdQuestionAssessedDailySalesPage {
this.salesDaily = this.navParams.get('salesDaily');
// this.grossprofitCalc = this.navParams.get('grossprofit');
this.margin_calculation_status=this.navParams.get('margin_calculation_status');
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.currentDate = constant.getcurrentDate().replace("T00:00",'');
this.salesDailyForm = this.fb.group(

View File

@ -50,7 +50,8 @@ export class PdQuestionAssessedDashPage {
this.pdDetails = this.navParams.get('pdDetails');
this.FormId = this.navParams.get('formDetails');
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.assessedForm = this.fb.group(
{
calc_type_id:[null],

View File

@ -37,7 +37,8 @@ export class PdQuestionAssessedHouseholdPage {
this.pdDetails = this.navParams.get('pdDetails');
this.houseExpenseDetails = this.navParams.get('FormId');
this.expenseDetails = this.navParams.get('expense');
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.houseHoldForm = this.fb.group(
{
houseExpense:this.fb.array([]),

View File

@ -106,7 +106,8 @@ export class PdQuestionAssessedInfoPage {
this.FormName = "Question Page";
break;
}
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.assessedForm = this.fb.group(
{
sdc_id:[null],

View File

@ -51,7 +51,8 @@ export class PdQuestionAssessedPurchasePage {
this.purchaseDetails = this.navParams.get('purchase');
console.log("purchase",this.purchaseDetails)
console.log("pd",this.pdDetails);
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.rawMaterialForm = this.fb.group(
{
purchase:this.fb.array([]),

View File

@ -56,7 +56,8 @@ export class PdQuestionAssessedSalesPage {
this.FormId = this.navParams.get('FormId');
//this.grossprofitCalc = this.navParams.get('grossprofit');
this.margin_calculation_status=this.navParams.get('margin_calculation_status');
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.assessedForm = this.fb.group(
{

View File

@ -83,7 +83,8 @@ export class PdQuestionAssestsPage {
this.lender_short_name=this.pdDetails.lender_short_name
this.product_abbr=this.pdDetails.product_abbr
this.pdid=this.pdDetails.pd_id;
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.applicants = this.pdDetails.applicat_details;
this.applicants=this.applicants.filter(val=>val.applicant_type==0 || val.applicant_type==1)
this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'});

View File

@ -67,7 +67,8 @@ export class PdQuestionBankingPage {
// alert();
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.bankDetails = this.fb.group(
{
bankitems:this.fb.array([]),

View File

@ -89,7 +89,8 @@ export class PdQuestionBusinessAssetsPage {
this.lender_short_name=this.pdDetails.lender_short_name
this.product_abbr=this.pdDetails.product_abbr
this.formDetails=this.navParams.get('formDetails');
this.users=this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.company_id=this.pdDetails.company_id;
this.applicants = this.pdDetails.applicat_details;
this.applicants = this.applicants.filter(appt=>appt.applicant_type != 2)

View File

@ -82,7 +82,8 @@ step:number
this.generalExistBusinessYear=this.pdDetails.business_years
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.step=0
this.bankingForm = this.fb.group(
{

View File

@ -111,7 +111,8 @@ export class PdQuestionBusinessInfoPage {
this.formdetails = this.navParams.get('formDetails');
this.FormId = this.formdetails.form_id;
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.applicants = this.pdDetails.applicat_details;
console.log("pd", this.pdDetails);

View File

@ -69,7 +69,8 @@ export class PdQuestionClientInfoPage {
this.pdDetails = this.navParams.get('pdDetails');
this.lender_short_name=this.pdDetails.lender_short_name
this.formDetails = this.navParams.get('formDetails');
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.pdid = this.pdDetails.pd_id;
this.company_id = this.pdDetails.company_id;
this.pd_value_params={pd_id:this.pdDetails.pd_id,form_id:this.formDetails.form_id,company_id:this.pdDetails.company_id}

View File

@ -87,7 +87,8 @@ export class PdQuestionFinancialInfoPage {
this.FormId = this.formDetails.form_id;
// this.FormId=this.navParams.get('FormId');
this.company_id=this.pdDetails.company_id
this.users=this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
let x = this.pdDetails.customer_segment_abbr.split("-");
this.CustSegAbbr=x[1]
this.lender_short_name = this.pdDetails.lender_short_name;

View File

@ -55,7 +55,8 @@ export class PdQuestionFuturePlansAndBusinessEnvironmentPage {
this.pdid = this.pdDetails.pd_id
this.FormId = this.formDetails.form_id;
this.company_id=this.pdDetails.company_id
this.users = aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.lender_short_name = this.pdDetails.lender_short_name;
this.product_abbr = this.pdDetails.product_abbr;
this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;

View File

@ -84,7 +84,8 @@ export class PdQuestionStockInfoPage {
this.lender_short_name=this.pdDetails.lender_short_name
this.product_abbr=this.pdDetails.product_abbr
this.formDetails = this.navParams.get('formDetails');
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.company_id = this.pdDetails.company_id;
this.pdid = this.pdDetails.pd_id;
this.qustCat.stockFormAccess(this.pdid, this.company_id).subscribe(data => {

View File

@ -67,7 +67,8 @@ export class PdQuestionSupplierInfoPage {
this.formDetails = this.navParams.get('formDetails');
this.form_id = this.formDetails.form_id;
this.company_id = this.pdDetails.company_id;
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.pd_value_params={pd_id:this.pdDetails.pd_id,form_id:this.formDetails.form_id,company_id:this.pdDetails.company_id}

View File

@ -81,7 +81,8 @@ applicants: any;
this.getdropdown();
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.currentLoans = this.fb.group(
{
existing_loan: [null],

View File

@ -72,7 +72,8 @@ export class PdQuestionEmpInfoPage {
this.FormId = this.navParams.get('FormId');
this.questionDetails = this.navParams.get('questionDetails');
this.pdDetails = this.navParams.get('pdDetails');
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.pdid=this.pdDetails.pd_id;
this.customer_segment_abbr = this.pdDetails.customer_segment_abbr;
this.pd_cus_segment = this.pdDetails.customer_segment_abbr.toUpperCase();

View File

@ -93,7 +93,8 @@ data:any;
this.product_abbr=this.pdDetails.product_abbr
this.selected_person=this.pdDetails.pdapplicants_details;
this.selectPerson=this.pdDetails.applicat_details
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.familyForm = this.fb.group({

View File

@ -57,7 +57,8 @@ export class PdQuestionFinalRemarkPage {
this.pdDetails=this.navParams.get('pdDetails');
this.pdid=this.pdDetails.pd_id
this.FormId=this.navParams.get('FormId');
this.users=aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.lender_short_name = this.pdDetails.lender_short_name;
this.product_abbr = this.pdDetails.product_abbr;

View File

@ -110,7 +110,8 @@ export class PdQuestionGeneralInfoPage {
this.FormId = this.navParams.get('FormId');
this.customer_segment_abbr = this.pdDetails.customer_segment_abbr;
// console.log('this.customer_segment_abbr',this.customer_segment_abbr)
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.generalForm = this.fb.group({

View File

@ -41,7 +41,8 @@ export class PdQuestionLenderRepresentativePage {
this.pdDetails = this.navParams.get('pdDetails');
this.FormId = this.navParams.get('FormId');
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.representativeForm = this.fb.group({
parent_pdid:[this.pdDetails.parent_pd_id],
pdid:[this.pdDetails.pd_id],

View File

@ -110,7 +110,8 @@ export class PdQuestionLoansPage {
this.applicants = this.applicants.filter(appt => appt.applicant_type != 2 && appt.applicant_type != 3);
this.productAbbr = this.pdDetails.product_abbr;
this.subProductName = this.pdDetails.subproduct_name;
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.pdid=this.pdDetails.pd_id;
this.lender_short_name = this.pdDetails.lender_short_name;
@ -351,7 +352,7 @@ export class PdQuestionLoansPage {
if (data.group_name == that.productAbbr && data.sub_group_name == that.subProductName && data.isactive == 1) {
return data;
}
else if (data.group_name == that.pdDetails.product_abbr && data.sub_group_name == null || data.sub_group_name == '' && data.isactive == 1) {
else if (data.group_name == that.pdDetails.product_abbr && (data.sub_group_name == null || data.sub_group_name == '') && data.isactive == 1) {
return data;
}
}
@ -525,7 +526,7 @@ export class PdQuestionLoansPage {
if (data.group_name == that.productAbbr && data.sub_group_name == that.subProductName && data.isactive == 1) {
return data;
}
else if (data.group_name == that.pdDetails.product_abbr && data.sub_group_name == null || data.sub_group_name == '' && data.isactive == 1) {
else if (data.group_name == that.pdDetails.product_abbr && (data.sub_group_name == null || data.sub_group_name == '') && data.isactive == 1) {
return data;
}
}

View File

@ -74,7 +74,8 @@ export class PdQuestionNeighbourHoodPage {
referencecheck_list: this.fb.array([]),
neighbour_reference_remark:''
})
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.getdropdown();

View File

@ -69,8 +69,8 @@ export class PdQuestionOtherIncomePage {
this.applicants=this.pdDetails.applicat_details.filter(val=>val.pd_co_applicant_id != 0)
//this.applicants.push({'pd_co_applicant_id': 0,'applicant_name': "Others"})
this.getFrequency();
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
// this.qustCat.getLoadTemplate(this.pdid).subscribe(res=>
// {
// this.one = res;

View File

@ -46,7 +46,8 @@ export class PdQuestionPersonalInfoPage implements OnInit{
this.questionDetails = this.navParams.get('questionDetails');
this.pdDetails = this.navParams.get('pdDetails');
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
// this.getRelationMaster();

View File

@ -95,7 +95,8 @@ export class PdQuestionRentalInfoPage {
this.pageTitle = this.data.manage_status==1 ? 'Add RI Details' : 'Update RI Details';
this.FormId = this.navParams.get('FormId');
this.pdDetails = this.navParams.get('pdDetails');
this.users = this.aws.getlocale();
this.users = localStorage.getItem('pd_user_details')
this.users=JSON.parse(this.users).userid
this.applicants = this.pdDetails.applicat_details;
this.applicants=this.applicants.filter(val=>val.applicant_type==0 || val.applicant_type==1)
this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'});

View File

@ -62,7 +62,8 @@ export class PdQuestionPage {
questionRemarks:[null]
})
this.getpdQuestionDetails();
this.userid = this.aws.getlocale();
this.userid = localStorage.getItem('pd_user_details')
this.userid=JSON.parse(this.userid).userid
}
ionViewDidLoad() {

View File

@ -66,7 +66,7 @@ public commonimage = "http://pdgenie.com/logo/avatar.jpg";
userPoolId:'ap-south-1_qQ85yQZJO',
clientId:'2o5c3cs9k3als16nqhp3irh8rs' //for mobile
}
return production;
return testing;
}
getcurrentDate()

View File

@ -66,7 +66,7 @@ insertData(data){
}
insertPDImageLocally(data){
this.toast.pdTriggerappmessage(this.storage.driver);
// this.toast.pdTriggerappmessage(this.storage.driver);
const storage_key=data.storage_key
console.log("storage provider")
console.log(data);