image issue fixed and completing
This commit is contained in:
parent
4d5033fb8f
commit
b756f7a60f
@ -1507,7 +1507,7 @@ this.proceedonChangeProperty(modified)
|
|||||||
// return invalid;
|
// return invalid;
|
||||||
}
|
}
|
||||||
onSubmit(flag){
|
onSubmit(flag){
|
||||||
this.loaderService.showMatSpinnerDialog('Please wait...')
|
// this.loaderService.showMatSpinnerDialog('Please wait...')
|
||||||
//1-Submit 0-Draft
|
//1-Submit 0-Draft
|
||||||
|
|
||||||
// alert(' enter save');
|
// alert(' enter save');
|
||||||
|
|||||||
@ -829,10 +829,11 @@ checkTheUploadingProgress(sec_value){
|
|||||||
localStorage.removeItem('sales_pd_id_PRIMARYKEY')
|
localStorage.removeItem('sales_pd_id_PRIMARYKEY')
|
||||||
// this.SalesPDService.clear_local_key('sales_pd_id_PRIMARYKEY');
|
// this.SalesPDService.clear_local_key('sales_pd_id_PRIMARYKEY');
|
||||||
localStorage.removeItem('product_id_salesPD')
|
localStorage.removeItem('product_id_salesPD')
|
||||||
setTimeout(()=>{
|
this.dialogRef.close(event);
|
||||||
this.router.navigate([SalesPdComponent], {relativeTo: this.route});
|
// setTimeout(()=>{
|
||||||
|
// this.router.navigate([SalesPdComponent], {relativeTo: this.route});
|
||||||
// this.navCtrl.setRoot(SalesPDlistPage)
|
// this.navCtrl.setRoot(SalesPDlistPage)
|
||||||
},2000)
|
// },2000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// sendDatatoApi(){
|
// sendDatatoApi(){
|
||||||
|
|||||||
@ -41,7 +41,7 @@ export class AdvanceFilterComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
let local:any = JSON.parse(localStorage.getItem('user_details'));
|
let local:any = JSON.parse(localStorage.getItem('user_details'));
|
||||||
// let entity_id=localStorage.getItem('LocalSetEntity');
|
let entity_id=localStorage.getItem('LocalSetEntity');
|
||||||
|
|
||||||
// 'drop_down_datas':this.filter_drop_down_data,is_sales_login:this.is_sales_login
|
// 'drop_down_datas':this.filter_drop_down_data,is_sales_login:this.is_sales_login
|
||||||
this.searchForm=this._fb.group({
|
this.searchForm=this._fb.group({
|
||||||
@ -50,7 +50,7 @@ export class AdvanceFilterComponent implements OnInit {
|
|||||||
pd_from_date:[''],
|
pd_from_date:[''],
|
||||||
pd_to_date:[''],
|
pd_to_date:[''],
|
||||||
pd_products:[''],
|
pd_products:[''],
|
||||||
pd_lender:[local.fk_entity_id],
|
pd_lender:[entity_id],
|
||||||
pd_applicant_name:[''],
|
pd_applicant_name:[''],
|
||||||
pd_officer:[''],
|
pd_officer:[''],
|
||||||
sales_pd_officer_id:[this.is_sales_login ? local.userid : '']
|
sales_pd_officer_id:[this.is_sales_login ? local.userid : '']
|
||||||
|
|||||||
@ -386,11 +386,16 @@ export class SectionListComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
|
console.log(dataresult);
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
// if(dataresult == 'refresh') {
|
// if(dataresult == 'refresh') {
|
||||||
this.getSectionStats()
|
this.getSectionStats()
|
||||||
this.loadTemplates(this.product_id,2,this.sales_pd_type);
|
this.loadTemplates(this.product_id,2,this.sales_pd_type);
|
||||||
// }
|
// }
|
||||||
|
if(dataresult.is_completed == true){
|
||||||
|
console.log('396')
|
||||||
|
this.loadPdViewCompoent()
|
||||||
|
}
|
||||||
});
|
});
|
||||||
// setTimeout(()=>{
|
// setTimeout(()=>{
|
||||||
//this.router.navigate(['Section9',section_id],{ relativeTo: this.route })
|
//this.router.navigate(['Section9',section_id],{ relativeTo: this.route })
|
||||||
|
|||||||
@ -173,26 +173,33 @@ saveQuestions(params): Observable<Response>{
|
|||||||
|
|
||||||
// else{
|
// else{
|
||||||
if(!params.hasOwnProperty('status') && params.status != 'COMPLETED') {
|
if(!params.hasOwnProperty('status') && params.status != 'COMPLETED') {
|
||||||
|
console.log('176')
|
||||||
if(params.sales_pd_id != null) {
|
if(params.sales_pd_id != null) {
|
||||||
|
console.log('178')
|
||||||
modified_values.sales_pd_id = params.sales_pd_id
|
modified_values.sales_pd_id = params.sales_pd_id
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
console.log('182')
|
||||||
modified_values.sales_pd_id = result['records']
|
modified_values.sales_pd_id = result['records']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(params.hasOwnProperty('status') && params.status == 'COMPLETED') {
|
if(params.hasOwnProperty('status') && params.status == 'COMPLETED') {
|
||||||
|
console.log('187')
|
||||||
if(!result_from_api.hasOwnProperty('pd_status') && result_from_api['pd_status'] != 'DRAFT'){
|
if(!result_from_api.hasOwnProperty('pd_status') && result_from_api['pd_status'] != 'DRAFT'){
|
||||||
|
console.log('189')
|
||||||
// this.offlineManagerProvider.deleteCompletedPD(params.sales_pd_id).then(rd=>{
|
// this.offlineManagerProvider.deleteCompletedPD(params.sales_pd_id).then(rd=>{
|
||||||
observer.next(result_from_api);
|
observer.next(result_from_api);
|
||||||
observer.complete();
|
observer.complete();
|
||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
console.log('196')
|
||||||
observer.next(result_from_api);
|
observer.next(result_from_api);
|
||||||
observer.complete();
|
observer.complete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
console.log('202')
|
||||||
// this.checkAndCreatePDLocally(modified_values,params,'online').then(lc=>{
|
// this.checkAndCreatePDLocally(modified_values,params,'online').then(lc=>{
|
||||||
|
|
||||||
observer.next(result_from_api);
|
observer.next(result_from_api);
|
||||||
@ -204,7 +211,9 @@ saveQuestions(params): Observable<Response>{
|
|||||||
}
|
}
|
||||||
|
|
||||||
else{
|
else{
|
||||||
|
console.log('214')
|
||||||
if(params.hasOwnProperty('status') && params.status != 'COMPLETED') {
|
if(params.hasOwnProperty('status') && params.status != 'COMPLETED') {
|
||||||
|
console.log('216')
|
||||||
modified_values.sales_pd_id = null
|
modified_values.sales_pd_id = null
|
||||||
}
|
}
|
||||||
let req_params = {url:api_url+'saveSalesPD',
|
let req_params = {url:api_url+'saveSalesPD',
|
||||||
@ -228,8 +237,8 @@ saveQuestions(params): Observable<Response>{
|
|||||||
// })
|
// })
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// observer.next(result_from_api);
|
observer.next(result_from_api);
|
||||||
// observer.complete();
|
observer.complete();
|
||||||
|
|
||||||
// })
|
// })
|
||||||
})
|
})
|
||||||
@ -384,7 +393,8 @@ getSalesPDImgDataCusLink(params) {
|
|||||||
}
|
}
|
||||||
generateSatelliteImg(params,form_structure):Observable<Response> {
|
generateSatelliteImg(params,form_structure):Observable<Response> {
|
||||||
return Observable.create((observer:Observer<any>)=>{
|
return Observable.create((observer:Observer<any>)=>{
|
||||||
this.getData_fromLocal('sales_pd_id_PRIMARYKEY').then(key_value=>{
|
// this.getData_fromLocal('sales_pd_id_PRIMARYKEY').then(key_value=>{
|
||||||
|
let key_value = localStorage.getItem('sales_pd_id_PRIMARYKEY')
|
||||||
params.sales_pd_id = key_value
|
params.sales_pd_id = key_value
|
||||||
let values={sales_pd_id:key_value,dataStatus:true}
|
let values={sales_pd_id:key_value,dataStatus:true}
|
||||||
let section_data=JSON.stringify({section_id:form_structure.section_id,section_name:form_structure.section_name,onsubmit:null,questions:form_structure.questions})
|
let section_data=JSON.stringify({section_id:form_structure.section_id,section_name:form_structure.section_name,onsubmit:null,questions:form_structure.questions})
|
||||||
@ -411,11 +421,11 @@ let modified_params = form_structure
|
|||||||
offline_params.section_data = section_data
|
offline_params.section_data = section_data
|
||||||
console.log(offline_params.request_items.params)
|
console.log(offline_params.request_items.params)
|
||||||
//this.checkAndCreatePDLocally(values,'','offline','',offline_params).then(res=>{
|
//this.checkAndCreatePDLocally(values,'','offline','',offline_params).then(res=>{
|
||||||
//observer.next({dataStatus:true});
|
observer.next({dataStatus:true});
|
||||||
//observer.complete()
|
observer.complete()
|
||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
})
|
// })
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -581,8 +591,8 @@ getCityPincode(value){
|
|||||||
modified_params.is_synced = true
|
modified_params.is_synced = true
|
||||||
modified_params.section_data = section_data
|
modified_params.section_data = section_data
|
||||||
// this.checkAndCreatePDLocally(values,'','online','',modified_params).then(res=>{
|
// this.checkAndCreatePDLocally(values,'','online','',modified_params).then(res=>{
|
||||||
// observer.next('');
|
observer.next('');
|
||||||
// observer.complete();
|
observer.complete();
|
||||||
//})
|
//})
|
||||||
// },err=>{
|
// },err=>{
|
||||||
// console.clear();
|
// console.clear();
|
||||||
@ -600,8 +610,8 @@ getCityPincode(value){
|
|||||||
offline_params.section_data = section_data
|
offline_params.section_data = section_data
|
||||||
console.log(offline_params)
|
console.log(offline_params)
|
||||||
// this.checkAndCreatePDLocally(values,'','offline','',offline_params).then(res=>{
|
// this.checkAndCreatePDLocally(values,'','offline','',offline_params).then(res=>{
|
||||||
// observer.next({dataStatus:true});
|
observer.next({dataStatus:true});
|
||||||
// observer.complete()
|
observer.complete()
|
||||||
//})
|
//})
|
||||||
}
|
}
|
||||||
// })
|
// })
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user