image capture error fixed
This commit is contained in:
parent
c1cb3b6176
commit
9c7ccb020f
@ -576,7 +576,7 @@ this.proceedonChangeProperty(modified)
|
|||||||
single_ques.controls.is_image_status.setValue(true)
|
single_ques.controls.is_image_status.setValue(true)
|
||||||
single_ques.controls.is_loader.setValue(true);
|
single_ques.controls.is_loader.setValue(true);
|
||||||
single_ques.controls.is_saved.setValue(false);
|
single_ques.controls.is_saved.setValue(false);
|
||||||
let params={"fk_sales_pd_id":"","img":watermarked_img,"img_name":single_ques.value.question_key}
|
let params={"fk_sales_pd_id":"","img":watermarked_img,"img_name":single_ques.value.question_key,"location": geoCoordinates}
|
||||||
let storage_param=this.questions_JSON
|
let storage_param=this.questions_JSON
|
||||||
let form_structure=this.questions_JSON
|
let form_structure=this.questions_JSON
|
||||||
form_structure.questions=this.quesAnsForm.getRawValue().questions
|
form_structure.questions=this.quesAnsForm.getRawValue().questions
|
||||||
@ -756,8 +756,10 @@ this.proceedonChangeProperty(modified)
|
|||||||
|
|
||||||
form_structure.questions=this.quesAnsForm.getRawValue().questions
|
form_structure.questions=this.quesAnsForm.getRawValue().questions
|
||||||
// this.httpListener(apiresult);
|
// this.httpListener(apiresult);
|
||||||
|
console.log(params)
|
||||||
this.SalesPdService.updateSectionDataLocally(params,form_structure).subscribe(res=>{
|
this.SalesPdService.updateSectionDataLocally(params,form_structure).subscribe(res=>{
|
||||||
this.sendGeoCordsForSatellite(this.geoCoordinates,form_structure)
|
console.log(res)
|
||||||
|
this.sendGeoCordsForSatellite(geoCoordinates,form_structure)
|
||||||
})
|
})
|
||||||
console.log("Result",apiresult['dataStatus'])
|
console.log("Result",apiresult['dataStatus'])
|
||||||
// this.toastProvider.lenderappmessage(parent_control.value.question+ " Saved Successfully")
|
// this.toastProvider.lenderappmessage(parent_control.value.question+ " Saved Successfully")
|
||||||
|
|||||||
@ -163,6 +163,7 @@ saveQuestions(params): Observable<Response>{
|
|||||||
params.product_id=product_id
|
params.product_id=product_id
|
||||||
params.sales_pd_type = sales_pd_type
|
params.sales_pd_type = sales_pd_type
|
||||||
let modified_values =params;
|
let modified_values =params;
|
||||||
|
console.log(params)
|
||||||
if(key_value != null ? (typeof(key_value) == 'string' ? !key_value.includes('local') : true) : true) {
|
if(key_value != null ? (typeof(key_value) == 'string' ? !key_value.includes('local') : true) : true) {
|
||||||
console.log('160',params)
|
console.log('160',params)
|
||||||
return this._http.post(api_url+'saveSalesPD',{records:params}).pipe().subscribe(result => {
|
return this._http.post(api_url+'saveSalesPD',{records:params}).pipe().subscribe(result => {
|
||||||
@ -525,7 +526,9 @@ getCityPincode(value){
|
|||||||
let key_value = localStorage.getItem('sales_pd_id_PRIMARYKEY')
|
let key_value = localStorage.getItem('sales_pd_id_PRIMARYKEY')
|
||||||
// this.cameraService.getGeoTag().then(geoCords=>{
|
// this.cameraService.getGeoTag().then(geoCords=>{
|
||||||
//params.location=geoCords
|
//params.location=geoCords
|
||||||
//params.fk_sales_pd_id=key_value
|
console.log(key_value)
|
||||||
|
params.fk_sales_pd_id=key_value
|
||||||
|
console.log(params)
|
||||||
// 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})
|
||||||
// let modified_params = form_structure
|
// let modified_params = form_structure
|
||||||
@ -533,6 +536,7 @@ getCityPincode(value){
|
|||||||
this._http.post(api_url+'saveSalesPDImage',{records:params},{
|
this._http.post(api_url+'saveSalesPDImage',{records:params},{
|
||||||
reportProgress: true,
|
reportProgress: true,
|
||||||
}).pipe().subscribe(result => {
|
}).pipe().subscribe(result => {
|
||||||
|
console.log(result)
|
||||||
// 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=>{
|
||||||
@ -577,8 +581,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();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user