This commit is contained in:
venbatechnologies@gmail.com 2020-12-14 11:39:57 +05:30
parent 4c4f60e5e4
commit 62d8cdf9aa
2 changed files with 7 additions and 2 deletions

View File

@ -1084,7 +1084,9 @@ this.proceedonChangeProperty(modified)
}
calculation(control,submitProperty,sales_pd_id?){
function addorUpdateLocalStorage(key,value) {
if(sales_pd_id == null || !sales_pd_id) {
return;
}
let storageKey = 'PD_FORM_VALUES-'+sales_pd_id
let existing_value:any = localStorage.getItem(storageKey)

View File

@ -53,6 +53,7 @@ export class SectionListPage {
},50)
}
checkTemplateConfig() {
console.log(this.sales_pd_id);
if(this.raw_data && this.raw_data.hasOwnProperty('config') && this.raw_data.config && this.sales_pd_id != null && this.sales_pd_id) {
this.raw_data.config.forEach(singleConfig=>{
if(singleConfig.purpose == 'LOCAL_OR_API_FORM_VALUES') {
@ -188,7 +189,6 @@ export class SectionListPage {
this.SalesPDService.getData_fromLocal('sales_pd_id_PRIMARYKEY').then((key_value)=>{
if(key_value && key_value != null && key_value != '' && key_value != undefined){
this.sales_pd_id=key_value
this.checkTemplateConfig()
if(!this.sales_pd_id.includes('local')) {
this.SalesPDService.getData_fromLocal('sales_rand_string').then((rand_string_sales)=>{
if(rand_string_sales) {
@ -203,6 +203,7 @@ export class SectionListPage {
if(this.section_template.length > 0)
{
console.log("if part")
this.checkTemplateConfig()
this.merge_saved_status(res);
}
else{
@ -210,11 +211,13 @@ export class SectionListPage {
console.log("Else part",this.section_template.length)
if(this.section_template.length > 0)
{
this.checkTemplateConfig()
this.merge_saved_status(res);
}
},500)
}
})
}
else{
this.sales_pd_id=null