From 5d04b39ead74770dad4a058ab629edf29b34ea82 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Wed, 16 Mar 2022 10:42:38 +0000 Subject: [PATCH 1/4] view-pd.component.ts edited online with Bitbucket --- .../manage-pd/list-pd/view-pd/view-pd.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts index fc28523..df71b57 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts @@ -409,8 +409,8 @@ export class ViewPdComponent implements OnInit, OnDestroy { StatusUpdate(master) { - let status='QC COMPLETED'; - + //let status='QC COMPLETED'; + let status='QC_COMPLETED'; let update_status = { "pd_id":master.pd_id, "random_string":master.random_string From e67fbc9eb3bafb231e09ca21a979d45bb7cadd95 Mon Sep 17 00:00:00 2001 From: surya Date: Fri, 18 Mar 2022 19:50:32 +0530 Subject: [PATCH 2/4] city issue fixed --- .../list-pd/add-pd/add-pd.component.ts | 41 ++++++++++++++++--- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts index 4ec1f29..4ea76d3 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts @@ -15,6 +15,7 @@ import { takeUntil } from 'rxjs/operators'; import { Subject } from 'rxjs'; import { MatDialog } from '@angular/material'; import { ExcelUploadDialogComponent } from './excel-upload-dialog/excel-upload-dialog.component'; +import { log } from 'console'; @Component({ selector: 'app-add-pd', templateUrl: './add-pd.component.html', @@ -84,6 +85,7 @@ export class AddPdComponent implements OnInit, OnDestroy { prod_seg: any; usertype: string; range: any; + pincodedata: any; constructor(notifier: NotifierService, private _fb: FormBuilder, private route: ActivatedRoute, private router: Router, private _pd: PdTrigerService, private _aws: AwsService, private ListPdComponent: ListPdComponent, private titleCase : TitleCasePipe,private userService:UserService,private matDialog:MatDialog) { @@ -407,9 +409,11 @@ export class AddPdComponent implements OnInit, OnDestroy { //get city list details based on state id getCityList(stateID: string,index) { + console.log(stateID) this.getvendor(stateID) this._pd.getStateWiseCities(stateID).subscribe(data => { if (data.status == 200) { + console.log(data.records) this.cityList[index] = data.records.cities; this.pincodeList[index] = data.records.pincode; this.cityData[index]=this.cityList[index] @@ -587,7 +591,8 @@ export class AddPdComponent implements OnInit, OnDestroy { this.lengthCheckToaddMore = 1; } } - getPincode(e,i){ this.pincodeflag[i] = e == 1 ? true : false;} + getPincode(e,i){ this.pincodeflag[i] = e == 1 ? true : false; + console.log(e , i)} // save pd in draft saveDraftPD(formValue: any, status: string) { //alert('Inside The Draft PD'); @@ -794,7 +799,7 @@ export class AddPdComponent implements OnInit, OnDestroy { control_address.get('pincode').enable() // this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!'); } - else if(formValue.addresses[0].pincode == undefined ) + else if(formValue.addresses[0].pincode == undefined && formValue.addresses[0].pincode == "") { let control_address = this._PDtriggerForm.get('addresses')['controls'][0] as FormArray control_address.get('pincode').enable() @@ -1326,10 +1331,13 @@ searchFun(control:any,i:number,option){ // control_address.get('fk_state') // control_address.get('fk_city') // control_address.get('pincode') + console.log('jkhjjjhguhg') control_address.get('addressline1').disable() control_address.get('fk_state').disable() control_address.get('fk_city').disable() control_address.get('pincode').disable() + let pincode = control_address.get('pincode'); + console.log(pincode); this.choosed_address.setValidators(Validators.required) } @@ -1341,9 +1349,8 @@ searchFun(control:any,i:number,option){ } }) } + onChangeSelectedAddress(value) { - console.log(value) - let state=value.state; this.getvendor(state) if(value) { @@ -1351,9 +1358,31 @@ searchFun(control:any,i:number,option){ console.log(control_address); control_address.get('addressline1').setValue(value.addressline) control_address.get('fk_state').setValue(value.state) - this.getCityList(value.state,0); control_address.get('fk_city').setValue(value.city) - control_address.get('pincode').setValue(value.pincode) + this.getCityList(value.state,0); + this._pd.getStateWiseCities(value.state).subscribe(data => { + if (data.status == 200) { + + this.pincodedata = data.records.pincode; + console.log( this.pincodedata ) + let pincode_is_avai = this.pincodedata.filter(t=>t.pincode_id ==value.pincode); + let length=pincode_is_avai.length; + console.log( length ) + if(length==0) + { + control_address.get('pincode').enable() + control_address.get('pincode').setValue("") + } + else + { + control_address.get('pincode').setValue(value.pincode) + } + + } + }); + + + } } changePDTypeSlideValue(event) { From 16dc9444103203ef3d2dd8f561089d60aff6c7cd Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Tue, 22 Mar 2022 21:31:39 +0530 Subject: [PATCH 3/4] status checked : ps --- .../manage-pd/list-pd/view-pd/view-pd.component.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html index 09aae0e..cb07fde 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html @@ -44,8 +44,8 @@ - - + + @@ -221,7 +221,7 @@
- + From 9f575c06198c274acaf4e354c136940e954498ca Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Sat, 2 Apr 2022 18:07:14 +0530 Subject: [PATCH 4/4] vendor-pd rcm allocate restriction : ps --- .../manage-pd/list-pd/view-pd/view-pd.component.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts index df71b57..56c4d6f 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts @@ -377,18 +377,23 @@ export class ViewPdComponent implements OnInit, OnDestroy { // console.log("status = ",status); // console.log("pdDetails",pdDetails,pdDetails.fk_pd_id,this.pdMasterData); + // console.log("i am @379 - pdDetails",pdDetails,pdDetails.fk_pd_id,this.pdMasterData); let pd_allocated_to = this.pdMasterData[0].pd_allocated_to; + let vendor_status = this.pdMasterData[0].vendor_status; localStorage.setItem('pdid',pdDetails.fk_pd_id) this.destroyType = 3; let doSelfAllocated = 0;/** this for flag **/ - if(this.userId != pd_allocated_to && (status == this.pdStatusCheck.ALLOCATED || status == this.pdStatusCheck.ALLOCATED_TO_FIA) && (this.userRoleID == 27 || this.userRoleID == 28)){ + /* if(this.userId != pd_allocated_to && (status == this.pdStatusCheck.ALLOCATED || status == this.pdStatusCheck.ALLOCATED_TO_FIA) && (this.userRoleID == 27 || this.userRoleID == 28)){ */ + if(this.userId != pd_allocated_to && (status == this.pdStatusCheck.ALLOCATED) && (this.userRoleID == 27 || this.userRoleID == 28)){ console.log(this.userId,pd_allocated_to); /* console.log("if for flag",status); doSelfAllocated = 1;*/ - this.selfallocate(pdDetails.fk_pd_id); + if(status != this.pdStatusCheck.ALLOCATED_TO_FIA && this.userRoleID != 27){ + this.selfallocate(pdDetails.fk_pd_id);} // new Promise( resolve => setTimeout(resolve, 300) ); } - if (status == this.pdStatusCheck.ALLOCATED || status == this.pdStatusCheck.SCHEDULED || status == this.pdStatusCheck.TRIGGERED||status == this.pdStatusCheck.ALLOCATED_TO_FIA) { + /* if (status == this.pdStatusCheck.ALLOCATED || status == this.pdStatusCheck.SCHEDULED || status == this.pdStatusCheck.TRIGGERED||status == this.pdStatusCheck.ALLOCATED_TO_FIA) {*/ + if (status == this.pdStatusCheck.ALLOCATED || status == this.pdStatusCheck.SCHEDULED || status == this.pdStatusCheck.TRIGGERED|| (status == this.pdStatusCheck.ALLOCATED_TO_FIA && vendor_status == this.pdStatusCheck.ALLOCATED && this.userRoleID == 28)) { const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, { data: { pdid: pdDetails.assigned_pd, pd_status: this.pdStatusCheck.INPROGRESS,random_string:this.pdMasterData[0].random_string }, disableClose: true,