+
+
+
+
+
+
+ Select
+ {{data.description}}
+
+
+ PD Location is Required
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/pd-question/pd-question-address/pd-question-address.scss b/src/pages/pd-question/pd-question-address/pd-question-address.scss
index d8db5989..1589a355 100755
--- a/src/pages/pd-question/pd-question-address/pd-question-address.scss
+++ b/src/pages/pd-question/pd-question-address/pd-question-address.scss
@@ -14,6 +14,9 @@ page-pd-question-address {
textarea {
resize: none;
}
+ .my-width{
+ width:600px;
+ }
//FOR IMAGE AND INPUT FIELD
img{
padding:0 5px 0 0;
diff --git a/src/pages/pd-question/pd-question-address/pd-question-address.ts b/src/pages/pd-question/pd-question-address/pd-question-address.ts
index ad8e2d2d..190d9432 100755
--- a/src/pages/pd-question/pd-question-address/pd-question-address.ts
+++ b/src/pages/pd-question/pd-question-address/pd-question-address.ts
@@ -13,6 +13,7 @@ import { takeUntil } from 'rxjs/operators';
import{LoadingProvider} from '../../../providers/common-provider/loading'
import {StorageProvider} from '../../../providers/storage/storage'
import 'rxjs/add/observable/interval';
+import { DatePipe } from '@angular/common';
// import{CacheService} from 'ionic-cache-observable'
/**
* Generated class for the PdQuestionAddressPage page.
@@ -71,7 +72,8 @@ export class PdQuestionAddressPage {
pincodeValue:any=[]
cityDataValue:any=[]
complete_status : boolean = false;
-
+ pipe = new DatePipe('en-US');
+ AppxPDLocationImgValid : boolean = false;
// counts:number = 1;
private search:searchValue[]
protected _onDestroy = new Subject();
@@ -643,6 +645,10 @@ countRowsForTextarea(text){
this.toast.pdTriggerappmessage("Please Fill all the Mandatory Fields marked with ' * '")
return
}
+ if(this.AppxPDLocationImgValid == false){
+ this.toast.pdTriggerappmessage("Please Take the Image for Approach to PD Location");
+ return
+ }
records.addresses=answerData.addresses
// records.addressess
records.address_form_remark=answerData.address_form_remark
@@ -980,12 +986,14 @@ countRowsForTextarea(text){
this.imageDisplay=[]
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id,'company_id':null}
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
- console.log('inside getPDImages Fn - its response ',val);
if(!val['msg']){
- console.log('Response Data - records only',val['records'])
if(val['records'].length>0){
val['records'].forEach(result=>{
this.imageDisplay.push({'image':result.doc_url,'Name':result.pd_document_title,'option':'dummy','is_show_report': result.is_show_report == null ? 0 : result.is_show_report })
+ let img_title = (result.pd_document_title).split('(');
+ if(img_title[0] == 'Approach to PD Location '){
+ this.AppxPDLocationImgValid = true;
+ }
})
console.log("image Display Data Are",this.imageDisplay);
}
@@ -994,34 +1002,34 @@ countRowsForTextarea(text){
}
changeName(value,index,img){
- console.log('inside changeName Fn - its param are ',value,'Index are ',index,'active are');
+ // console.log('inside changeName Fn - its param are ',value,'Index are ',index,'active are');
this.imageDisplay[index]={'image':img,'Name':value,'is_show_report':0}
- console.log("image Display Data Are",this.imageDisplay);
+ // console.log("image Display Data Are",this.imageDisplay);
}
changeNameForBucket(value,index,img,active){
- console.log('inside change-Name-For-Bucket Fn - its param are',value,'Index are ',index,'active are',active);
+ // console.log('inside change-Name-For-Bucket Fn - its param are',value,'Index are ',index,'active are',active);
this.imageBucket[index]={'image':img,'Name':value,'is_show_report':0}
}
changeOptions(event: any,index: any){
- console.log('Option Changed ' + event);
+ // console.log('Option Changed ' + event);
this.imageBucket[index].is_show_report=event;
- console.log('this.imageBucket',JSON.stringify(this.imageBucket));
+ // console.log('this.imageBucket',JSON.stringify(this.imageBucket));
}
removeImg(index){
- console.log('inside removeImg Fn - its param are - Index only ',index);
+ // console.log('inside removeImg Fn - its param are - Index only ',index);
this.imageDisplay.splice(index,1);
}
removeImgForBucket(index){
- console.log('inside removeImgForBucket Fn - its param are - Index only ',index);
+ // console.log('inside removeImgForBucket Fn - its param are - Index only ',index);
this.imageBucket.splice(index,1)
- console.log("image Display Data Are",this.imageDisplay);
+ // console.log("image Display Data Are",this.imageDisplay);
}
- savePhoto(){
- console.log('savePhoto');
-
+ savePhoto(flag){
+ // console.log('savePhoto');
+ let currentDate = this.pipe.transform(new Date(), 'yyyy-MM-dd hh:mm:ss');
this.camera.getPicture({
quality: 100,
destinationType: this.camera.DestinationType.DATA_URL,
@@ -1029,11 +1037,16 @@ countRowsForTextarea(text){
targetHeight: 600,
correctOrientation: true
}).then((imageData)=>{
- console.log('inside savePhoto Fn - its response ',imageData);
+ // console.log('inside savePhoto Fn - its response ',imageData);
this.base64='data:image/png;base64,'+imageData
- this.imageBucket.push({'image':this.base64,'Name':'','is_show_report':''});
- // this.imageDisplay.push({'image':this.base64,'Name':''})
- this.getImageName(this.imageBucket.length-1)
+ if(flag == 1){
+ this.imageBucket.push({'image':this.base64,'Name':'','is_show_report':''});
+ // this.imageDisplay.push({'image':this.base64,'Name':''})
+ this.getImageName(this.imageBucket.length-1)
+ }else if(flag == 2){
+ // console.log('flag');
+ this.imageBucket.push({'image':this.base64,'Name':'Approach to PD Location ( ' + currentDate + ' )','is_show_report':''});
+ }
},(err)=>{
//alert("error");
})
@@ -1045,12 +1058,12 @@ countRowsForTextarea(text){
}
getImageName(index){
- console.log('inside get Image Name Fn - its param are - Index only ',index);
+ // console.log('inside get Image Name Fn - its param are - Index only ',index);
let alert =this.toast.setAlertForDocName()
alert.present()
alert.onDidDismiss(value=>{
- console.log('Reponse',value,'Reponse AS Name',value.Name,value.IsShowReport);
+ // console.log('Reponse',value,'Reponse AS Name',value.Name,value.IsShowReport);
this.imageBucket[index].Name=value.Name;
});
@@ -1086,7 +1099,6 @@ countRowsForTextarea(text){
sendImage(){
this.loading.loaderForSendImage()
-
let records:any={
'pd_id':this.pdDetails.pd_id,
'formid':this.FormId.form_id,
@@ -1094,7 +1106,7 @@ countRowsForTextarea(text){
'company_id':''
}
- console.log("inside SendImage Function - records array",JSON.stringify(records))
+ // console.log("inside SendImage Function - records array",JSON.stringify(records))
this.qustCat.savePDImages(records).subscribe(res=>{
if(res['dataStatus']== true){
@@ -1117,7 +1129,7 @@ countRowsForTextarea(text){
this.storagedb.insertData(datas).then(res=>{
// let alert=this.toast.setAlert('data',JSON.stringify(res))
// alert.present();
- console.log("inside localInsert Fn - its Response",res);
+ // console.log("inside localInsert Fn - its Response",res);
})
}
}
\ No newline at end of file
diff --git a/src/pages/pd-question/pd-question-assessed-business/pd-question-assessed-business.html b/src/pages/pd-question/pd-question-assessed-business/pd-question-assessed-business.html
index 2d58237e..bfc6f4ab 100755
--- a/src/pages/pd-question/pd-question-assessed-business/pd-question-assessed-business.html
+++ b/src/pages/pd-question/pd-question-assessed-business/pd-question-assessed-business.html
@@ -32,7 +32,7 @@
">{{expense.expense_item}}
-
+
diff --git a/src/pages/pd-question/pd-question-business-group/pd-question-financial-info/pd-question-financial-info.ts b/src/pages/pd-question/pd-question-business-group/pd-question-financial-info/pd-question-financial-info.ts
index 332ac86b..580482bb 100755
--- a/src/pages/pd-question/pd-question-business-group/pd-question-financial-info/pd-question-financial-info.ts
+++ b/src/pages/pd-question/pd-question-business-group/pd-question-financial-info/pd-question-financial-info.ts
@@ -361,20 +361,20 @@ submitDetails(){
if(records.reason_for_working_capital_facilities_availed) delete records.reason_for_working_capital_facilities_availed ;
}
- // this.qustCat.saveForm(records).subscribe(res=>{
- // if(res['status']== 200){
- // this.financialForm.markAsUntouched();
- // this.toast.pdTriggerappmessage("Record Saved Successfully");
- // setTimeout(()=>{
- // this.navCtrl.pop();
- // },2000);
- // }
- // else{
- // this.toast.pdTriggerappmessage("Warning !! Something went Wrong");
- // }
- // },err=>{
- // this.toast.pdTriggerappmessage("Server is not Responding");
- // })
+ this.qustCat.saveForm(records).subscribe(res=>{
+ if(res['status']== 200){
+ this.financialForm.markAsUntouched();
+ this.toast.pdTriggerappmessage("Record Saved Successfully");
+ setTimeout(()=>{
+ this.navCtrl.pop();
+ },2000);
+ }
+ else{
+ this.toast.pdTriggerappmessage("Warning !! Something went Wrong");
+ }
+ },err=>{
+ this.toast.pdTriggerappmessage("Server is not Responding");
+ })
}
getDetails(){
const financeDate=this.financialForm.controls['date_per_financial']