|
@@ -52,6 +52,8 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
|
|
|
role: any;
|
|
|
check_date: any;
|
|
|
|
|
|
+ nextstep:any;
|
|
|
+
|
|
|
checkupdatedelete:boolean;
|
|
|
saveautoData = [];
|
|
|
autofillData = [];
|
|
@@ -101,6 +103,7 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
|
|
|
this.stage_des = response.data[0].stage_desc;
|
|
|
this.stage_id = response.data[0].stage_id;
|
|
|
this.check_date = response.data[0].created_on;
|
|
|
+ this.nextstep=response.data[0].nextstep;
|
|
|
//this.visit_date = datePipetransform(this.visit_date.now(),'dd/MM/yyyy');
|
|
|
this.visit_date = this.formatDate(this.visit_date);
|
|
|
this.check_date=this.formatDate(this.check_date);
|
|
@@ -116,6 +119,7 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
|
|
|
custName: new FormControl(this.customer_name, Validators.required),
|
|
|
stageName: new FormControl(this.stage_des, Validators.required),
|
|
|
ph_meet: new FormControl('yes', Validators.required),
|
|
|
+ nextstep: new FormControl(this.nextstep, Validators.required),
|
|
|
|
|
|
|
|
|
});
|
|
@@ -163,7 +167,7 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
|
|
|
custName: new FormControl(null, Validators.required),
|
|
|
stageName: new FormControl(null, Validators.required),
|
|
|
ph_meet: new FormControl('yes', Validators.required),
|
|
|
-
|
|
|
+ nextstep: new FormControl(null, Validators.required),
|
|
|
|
|
|
});
|
|
|
|
|
@@ -311,8 +315,8 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
|
|
|
message: new FormControl(this.autofillData["message"], Validators.required),
|
|
|
contactName: new FormControl(this.contact_name, Validators.required),
|
|
|
custName: new FormControl(this.customer_name, Validators.required),
|
|
|
- stageName: new FormControl(this.stage_des, Validators.required)
|
|
|
-
|
|
|
+ stageName: new FormControl(this.stage_des, Validators.required),
|
|
|
+ nextstep: new FormControl(this.autofillData["nextstep"], Validators.required),
|
|
|
|
|
|
});
|
|
|
}
|
|
@@ -350,7 +354,7 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
|
|
|
custName: new FormControl(this.customer_name, Validators.required),
|
|
|
stageName: new FormControl(this.stage_des, Validators.required),
|
|
|
ph_meet: new FormControl(this.autofillData["ph_meet"], Validators.required),
|
|
|
-
|
|
|
+ nextstep: new FormControl(this.autofillData["nextstep"], Validators.required),
|
|
|
|
|
|
});
|
|
|
}
|
|
@@ -415,7 +419,9 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
|
|
|
message: form.value.message,
|
|
|
physical_metting: form.value.ph_meet,
|
|
|
stage_id: this.stage_id,
|
|
|
- updated_by: this.login_id
|
|
|
+ updated_by: this.login_id,
|
|
|
+ nextstep: form.value.nextstep
|
|
|
+
|
|
|
}
|
|
|
|
|
|
console.log("createdvr", createdvr);
|
|
@@ -472,7 +478,8 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
|
|
|
physical_metting: form.value.ph_meet,
|
|
|
sale_person: this.username,
|
|
|
stage_id: (form.value.stageName ? form.value.stageName.stage_id : ''),
|
|
|
- created_by: this.login_id
|
|
|
+ created_by: this.login_id,
|
|
|
+ nextstep: form.value.nextstep
|
|
|
|
|
|
}
|
|
|
} else {
|
|
@@ -485,7 +492,8 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
|
|
|
physical_metting: form.value.ph_meet,
|
|
|
sale_person: this.username,
|
|
|
stage_id: this.stage_id,
|
|
|
- created_by: this.login_id
|
|
|
+ created_by: this.login_id,
|
|
|
+ nextstep: form.value.nextstep
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -528,6 +536,8 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
|
|
|
custName: new FormControl(null, Validators.required),
|
|
|
stageName: new FormControl(null, Validators.required),
|
|
|
ph_meet: new FormControl('yes', Validators.required),
|
|
|
+ nextstep: new FormControl(null, Validators.required),
|
|
|
+
|
|
|
});
|
|
|
// console.log("response.data.message", response.data[0].exception.errorid);
|
|
|
if (response.data[0].exception.errorid != '') {
|
|
@@ -585,6 +595,8 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
|
|
|
custName: new FormControl(null, Validators.required),
|
|
|
stageName: new FormControl(null, Validators.required),
|
|
|
ph_meet: new FormControl('yes', Validators.required),
|
|
|
+ nextstep: new FormControl(null, Validators.required),
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -622,6 +634,25 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ customerDetails(form: FormGroup){
|
|
|
+ console.log("form value", form.value.custName.customer_name);
|
|
|
+ if(form.value.custName){
|
|
|
+ this.commonservice.getAllData(this.commonservice.projectpath + "/getcustcontactdetails?customer_id="+form.value.custName.customer_name).subscribe(response => {
|
|
|
+ if (response.status == 'falsetoken') {
|
|
|
+ this.router.navigate(['/login'])
|
|
|
+ } else {
|
|
|
+ this.contact_data = response.data[0].conrtactData;
|
|
|
+ console.log("aaaaaaaaaaa------------>", this.contact_data);
|
|
|
+ // this.dtTrigger.next(this.dtOptions)
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ }else{
|
|
|
+ console.log("customer not selected yet");
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
get dateValidationCheck() {
|
|
|
return this.formControlName.get('date');
|
|
@@ -718,6 +749,8 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
|
|
|
custName: new FormControl(null, Validators.required),
|
|
|
stageName: new FormControl(null, Validators.required),
|
|
|
ph_meet: new FormControl('yes', Validators.required),
|
|
|
+ nextstep: new FormControl(null, Validators.required),
|
|
|
+
|
|
|
});
|
|
|
//this.router.navigate(['/home'])
|
|
|
// console.log("response.data.message", response.data[0].exception.errorid);
|