image issue fixed and completing

This commit is contained in:
venbainfotech 2021-12-28 17:05:33 +05:30
parent 4d5033fb8f
commit b756f7a60f
5 changed files with 32 additions and 16 deletions

View File

@ -1507,7 +1507,7 @@ this.proceedonChangeProperty(modified)
// return invalid;
}
onSubmit(flag){
this.loaderService.showMatSpinnerDialog('Please wait...')
// this.loaderService.showMatSpinnerDialog('Please wait...')
//1-Submit 0-Draft
// alert(' enter save');

View File

@ -829,10 +829,11 @@ checkTheUploadingProgress(sec_value){
localStorage.removeItem('sales_pd_id_PRIMARYKEY')
// this.SalesPDService.clear_local_key('sales_pd_id_PRIMARYKEY');
localStorage.removeItem('product_id_salesPD')
setTimeout(()=>{
this.router.navigate([SalesPdComponent], {relativeTo: this.route});
this.dialogRef.close(event);
// setTimeout(()=>{
// this.router.navigate([SalesPdComponent], {relativeTo: this.route});
// this.navCtrl.setRoot(SalesPDlistPage)
},2000)
// },2000)
}
}
// sendDatatoApi(){

View File

@ -41,7 +41,7 @@ export class AdvanceFilterComponent implements OnInit {
ngOnInit() {
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
this.searchForm=this._fb.group({
@ -50,7 +50,7 @@ export class AdvanceFilterComponent implements OnInit {
pd_from_date:[''],
pd_to_date:[''],
pd_products:[''],
pd_lender:[local.fk_entity_id],
pd_lender:[entity_id],
pd_applicant_name:[''],
pd_officer:[''],
sales_pd_officer_id:[this.is_sales_login ? local.userid : '']

View File

@ -386,11 +386,16 @@ export class SectionListComponent implements OnInit {
});
dialogRef.afterClosed()
.subscribe(dataresult => {
console.log(dataresult);
// this.notifier.notify('success', 'Successfully allocated.!');
// if(dataresult == 'refresh') {
this.getSectionStats()
this.loadTemplates(this.product_id,2,this.sales_pd_type);
// }
if(dataresult.is_completed == true){
console.log('396')
this.loadPdViewCompoent()
}
});
// setTimeout(()=>{
//this.router.navigate(['Section9',section_id],{ relativeTo: this.route })

View File

@ -173,26 +173,33 @@ saveQuestions(params): Observable<Response>{
// else{
if(!params.hasOwnProperty('status') && params.status != 'COMPLETED') {
console.log('176')
if(params.sales_pd_id != null) {
console.log('178')
modified_values.sales_pd_id = params.sales_pd_id
}
else{
console.log('182')
modified_values.sales_pd_id = result['records']
}
}
if(params.hasOwnProperty('status') && params.status == 'COMPLETED') {
console.log('187')
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=>{
observer.next(result_from_api);
observer.complete();
// })
}
else{
console.log('196')
observer.next(result_from_api);
observer.complete();
}
}
else {
console.log('202')
// this.checkAndCreatePDLocally(modified_values,params,'online').then(lc=>{
observer.next(result_from_api);
@ -204,7 +211,9 @@ saveQuestions(params): Observable<Response>{
}
else{
console.log('214')
if(params.hasOwnProperty('status') && params.status != 'COMPLETED') {
console.log('216')
modified_values.sales_pd_id = null
}
let req_params = {url:api_url+'saveSalesPD',
@ -228,8 +237,8 @@ saveQuestions(params): Observable<Response>{
// })
})
}
// observer.next(result_from_api);
// observer.complete();
observer.next(result_from_api);
observer.complete();
// })
})
@ -384,7 +393,8 @@ getSalesPDImgDataCusLink(params) {
}
generateSatelliteImg(params,form_structure):Observable<Response> {
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
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})
@ -411,11 +421,11 @@ let modified_params = form_structure
offline_params.section_data = section_data
console.log(offline_params.request_items.params)
//this.checkAndCreatePDLocally(values,'','offline','',offline_params).then(res=>{
//observer.next({dataStatus:true});
//observer.complete()
observer.next({dataStatus:true});
observer.complete()
// })
}
})
// })
})
}
@ -581,8 +591,8 @@ getCityPincode(value){
modified_params.is_synced = true
modified_params.section_data = section_data
// this.checkAndCreatePDLocally(values,'','online','',modified_params).then(res=>{
// observer.next('');
// observer.complete();
observer.next('');
observer.complete();
//})
// },err=>{
// console.clear();
@ -600,8 +610,8 @@ getCityPincode(value){
offline_params.section_data = section_data
console.log(offline_params)
// this.checkAndCreatePDLocally(values,'','offline','',offline_params).then(res=>{
// observer.next({dataStatus:true});
// observer.complete()
observer.next({dataStatus:true});
observer.complete()
//})
}
// })