diff --git a/ng6-seed/src/app/_guard/req-token.interceptor.ts b/ng6-seed/src/app/_guard/req-token.interceptor.ts index efc34e0..1273122 100755 --- a/ng6-seed/src/app/_guard/req-token.interceptor.ts +++ b/ng6-seed/src/app/_guard/req-token.interceptor.ts @@ -218,7 +218,7 @@ private handleError (operation = 'operation', error?: T) { } else if(error.status == 0){ console.log("NO Internet") - this.router.navigate(['/error/404']); + // this.router.navigate(['/error/404']); } else{ // alert("Please Check your Internet connection"); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/excel-upload-dialog/excel-upload-dialog.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/excel-upload-dialog/excel-upload-dialog.component.ts index e4e0f0e..0212e55 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/excel-upload-dialog/excel-upload-dialog.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/excel-upload-dialog/excel-upload-dialog.component.ts @@ -1,5 +1,5 @@ -import { Component, OnInit } from '@angular/core'; -import { MatDialogRef, MatSnackBar } from '@angular/material'; +import { Component, Inject, OnInit } from '@angular/core'; +import { MatDialogRef, MatSnackBar, MAT_DIALOG_DATA } from '@angular/material'; import { PdTrigerService } from 'app/personal-discussion/pd-service/pd-triger.service'; import { LoaderService } from 'app/shared/loaderService/loader.service'; @@ -13,7 +13,7 @@ export class ExcelUploadDialogComponent implements OnInit { sheetBufferRender: File; constructor(private snackBar:MatSnackBar,private loaderService:LoaderService,private _pdService:PdTrigerService, - private dialogRef:MatDialogRef) { } + private dialogRef:MatDialogRef, @Inject(MAT_DIALOG_DATA)public data:any) { } ngOnInit() { } @@ -68,7 +68,8 @@ export class ExcelUploadDialogComponent implements OnInit { return; } this.loaderService.showMatSpinnerDialog("Upload is in progress.. Please wait..") - this._pdService.uploadSMCDataFile(this.sheetBufferRender).subscribe(res=>{ + let pd_id = this.data && this.data.hasOwnProperty('pd_id') ? this.data.pd_id : null + this._pdService.uploadSMCDataFile(this.sheetBufferRender,pd_id).subscribe(res=>{ if(res['dataStatus']) { this.dialogRef.close(res) } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html index c105d70..7948c23 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/all-pd/all-pd.component.html @@ -74,7 +74,7 @@

Showing data for last {{common}}. To see older records, please use advanced filter


-
+
@@ -165,7 +165,7 @@
{{details.fk_pd_allocated_to == user_id ? 'Self' : details.pd_allocated_to }}
-
+
+ +
+ + + + + + + + +
+
+
+ + {{officer.first_name}} {{officer.last_name}} + +
+ +
+ +
+ +
+ +
+ + +

No Credit Managers available.

+
+
+ + + +
+ + +
+

Credit Manager: {{selectedItem.first_name}}

+
+
+ + +
+ +
+ + + + + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.scss new file mode 100755 index 0000000..044bbd9 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.scss @@ -0,0 +1,23 @@ +.example-full-width{ + width: 100%; +} +.view_more { + cursor: pointer; + color: #e00201 !important; + // text-decoration-line: underline; + // text-decoration-style: dotted; + // font-weight: bold; + +} +.text_change { + color: #e00201 !important; +} + .cdk-global-overlay-wrapper{ + justify-content: center !important; +} +.paragraph_change { + color: #fff !important; + background-color: #e00201 !important; + // padding: 10px !important; +} + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts new file mode 100755 index 0000000..ea12af1 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts @@ -0,0 +1,116 @@ +import { Component, OnInit, Inject, ViewEncapsulation } from '@angular/core'; +import { MatDialog, MatDialogRef, MAT_DIALOG_DATA , DialogPosition} from '@angular/material'; +import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms'; +import { NotifierService } from 'angular-notifier'; +import { PdTrigerService } from '../../../pd-service/pd-triger.service'; +// import { AllocationViewMoreComponent } from './../allocation-view-more/allocation-view-more.component'; +// import { VendorPdAllocationComponent } from '../vendor-pd-allocation/VendorPdAllocationComponent'; + +@Component({ + selector: 'app-pd-allocation', + templateUrl: './pd-allocation.component.html', + styleUrls: ['./pd-allocation.component.scss'], + encapsulation: ViewEncapsulation.None + +}) +export class PdAllocationComponent implements OnInit { + public pageTitle: string = "Allocation To PD Officer"; + public _pdAllocationForm: FormGroup; + public pdOfficerList: any = []; + errorMessage: any; + notifier : NotifierService; + selectedItem:any; + isDisabled: boolean; + + constructor( notifier: NotifierService, + private _fb: FormBuilder, + private dialogRef: MatDialogRef, + private _pd: PdTrigerService, private dialog: MatDialog, + @Inject(MAT_DIALOG_DATA) public data: any) { + console.log(data) + this.notifier=notifier; + } + + ngOnInit() { + this.isDisabled=true; + console.log(this.data) + this.getPDOfficerList(this.data.pd_id); + + // this._pdAllocationForm = this._fb.group({ + // pd_primary_id: [null], + // allocation_id: [null], + // }); + } + +// convenience getter for easy access to form fields +// get readForm() { return this._pdAllocationForm.controls; } + +// pd officer list + getPDOfficerList(pdID:string){ + this._pd.getCMUsers(this.data.city_id).subscribe( + data => { + if (data.status == 200) { + this.pdOfficerList= data.records + + } + }, error => this.errorMessage = error); + + } + /** To update pd officer*/ + updatePdOfficer(allocateDetails:any) { + if(!allocateDetails){ + this.notifier.notify('warning', 'Please Choose PD Officer.!'); + } + else { + let updateData = { + "pd_id":this.data.pd_id, + // "fk_pd_allocated_to":allocateDetails.fk_user_id, + "fk_pd_allocated_to":allocateDetails.userid, + } + this._pd.updatePdOfficer(updateData).subscribe( + result => { + if (result.status == 200) { + this.notifier.notify('success', 'PD Allocated.!'); + this.dialogRef.close(); + } + else { + this.notifier.notify('warning', 'Something Went Wrong Try Again.!'); + this.errorMessage = "Something Went Wrong Try Again.!"; + } + }, error => { + this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!'); + this.errorMessage = "Some Thing Wents Wrong Try Again.!"; + // this.dialogRef.close(); + }); + } + } +/** For Popup Close Button */ + closeAllocationComponent(): void { + this.dialogRef.close(); + } + // pd officer view more +// viewMoreDetails(details:any){ +// if(Number(details.count) > 0) { +// const dialogSchedule = this.dialog.open(AllocationViewMoreComponent, { +// data: details, +// disableClose: true, +// position: { right: '0'}, +// width:'100%', +// // hasBackdrop:false +// }); +// // dialogSchedule.afterClosed() +// // .subscribe(dataresult => { +// // }); +// } +// else { +// this.notifier.notify('warning', 'No PD In Hand'); + +// } +// } + // pd Vendor officer + viewVendorOfficer(){ + this.dialogRef.close('openvendorallocation'); + + +} +} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts index bdf38fa..39d8377 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component.ts @@ -25,8 +25,8 @@ export class PdStatusChangeDialogueComponent implements OnInit { constructor(notifier: NotifierService , private pd: PdTrigerService,private dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data: any) { this.notifier = notifier; - this.dialoge_title_content = this.data.pd_status=='INPROGRESS' ? 'Start Discussion' : this.data.pd_status=='COMPLETED' ? 'Complete Discussion' : this.data.pd_status=='ALLOCATED' ? 'Allocate to Self' : this.data.pd_status=='BOUNCED' ? 'PD Reject' : 'Change Discussion'; - this.dialoge_content = this.data.pd_status=='INPROGRESS' ? 'Are you starting the Discussion ?' : this.data.pd_status=='COMPLETED' ? 'Please confirm you are completing the Discussion and forwarding for Quality Check ?' : this.data.pd_status=='ALLOCATED' ? 'Do you want to allocate the PD to yourself ?' : this.data.pd_status=='BOUNCED' ? 'Do you want to reject this PD' : 'Change Discussion'; + this.dialoge_title_content = this.data.pd_status=='INPROGRESS' ? 'Start Discussion' : this.data.pd_status=='COMPLETED' ? 'Complete Discussion' : this.data.pd_status=='ALLOCATED' ? 'Allocate to CPA' : this.data.pd_status=='BOUNCED' ? 'PD Reject' : 'Change Discussion'; + this.dialoge_content = this.data.pd_status=='INPROGRESS' ? 'Are you starting the Discussion ?' : this.data.pd_status=='COMPLETED' ? 'Please confirm you are completing the Discussion and forwarding for Quality Check ?' : this.data.pd_status=='ALLOCATED' ? 'Do you want to allocate the PD to CPA ?' : this.data.pd_status=='BOUNCED' ? 'Do you want to reject this PD' : 'Change Discussion'; this.enableAddonPD = false; this.CompletenessCheck = this.data.pd_status=='INPROGRESS' ? true : this.data.pd_status=='COMPLETED' ? false : true; this.Loading = this.data.pd_status=='INPROGRESS' ? false : this.data.pd_status=='COMPLETED' ? true : false; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/form/form.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/form/form.component.ts index e0f186c..bc39124 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/form/form.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/form/form.component.ts @@ -42,6 +42,7 @@ export class FormComponent implements OnInit { private pdTriggerService:PdTrigerService, private awsService:AwsService,private loaderService:LoaderService) { // console.log(this.pd_all_details) + // debugger; this.form_id = 24; this.pd_all_details.pdmaster_details=this.pd_all_details.pdmaster_details[0] this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id; @@ -135,10 +136,17 @@ export class FormComponent implements OnInit { // this.commonFormGroup.patchValue(formValues) } } - + if(this.pd_all_details.pdmaster_details.re_uploaded == '1' && this.pd_all_details.is_reupload_data_fetched != '1') { + console.log("Reuploaded excel") + // let data = {"permanant_employees_person_met":"1","temporary_employees_person_met":"2","permanant_employees_cm":"3","temporary_employees_cm":"45","permanant_employees_salary":"55","temporary_employees_salary":"55","common_remarks":"dummy datas"} + // setTimeout(()=>{ + // this.commonFormGroup.patchValue(data) + // },1000) + this.getExcelData(1) + } }) } - getExcelData() { + getExcelData(re_uploaded?) { let params = {"pd_id":this.pd_all_details.pdmaster_details.pd_id,"random_string":this.pd_all_details.pdmaster_details.random_string,"form_id":this.pd_all_details.form_id} this.pdTriggerService.loadDataFromExcel(params).subscribe(result=>{ if(result['dataStatus']) { @@ -153,10 +161,15 @@ export class FormComponent implements OnInit { // }) console.log(formValues) // debugger; + if(re_uploaded && re_uploaded == '1') { + this.commonFormGroup.patchValue(formValues) + } + else { this.form_answers= formValues setTimeout(()=>{ this.form_answers = null },2500) + } // this.commonFormGroup.patchValue(formValues) } } @@ -278,7 +291,10 @@ export class FormComponent implements OnInit { return; } this.loaderService.showMatSpinnerDialog('') - let params = {"fk_pd_id":this.pd_all_details.pdmaster_details.pd_id,"fk_form_id":this.pd_all_details.form_id,"json":this.commonFormGroup.getRawValue(),createdby:''} + let params :any = {"fk_pd_id":this.pd_all_details.pdmaster_details.pd_id,"fk_form_id":this.pd_all_details.form_id,"json":this.commonFormGroup.getRawValue(),createdby:''} + if(this.pd_all_details.pdmaster_details.re_uploaded == '1') { + params.is_reupload_data_fetched = '1' + } this.pdTriggerService.saveSMCCreditPDsection(params).subscribe(result=>{ if(result['dataStatus']) { this.notifier.notify("success","Saved successfully..") diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts index 9c01160..35b6d39 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.ts @@ -196,6 +196,7 @@ export class StartPdComponent implements OnInit, OnDestroy { this.pdFullDetails.pdmaster_details.curr_vendor_ans_fetch_status = curr_vendor_ans_fetch_status this.pdFullDetails.form_id= this.selectedFormsCategory.fk_form_id this.pdFullDetails.is_answered = this.selectedFormsCategory.is_answered + this.pdFullDetails.is_reupload_data_fetched = this.selectedFormsCategory.is_reupload_data_fetched console.log(this.pdFullDetails); let componen_name:any = FormComponent if(this.pdFullDetails.form_id == '20') { 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 a2cb46e..079e76b 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 @@ -21,6 +21,10 @@ videocam  Call + @@ -192,9 +196,10 @@
- - - + + + +
@@ -234,7 +239,7 @@
- +
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 601524b..b4f3041 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 @@ -5,9 +5,8 @@ import { MatDialog } from '@angular/material'; import { DatePipe } from '@angular/common'; import { NotifierService } from 'angular-notifier'; import { PdTrigerService } from '../../../pd-service/pd-triger.service'; -// import { PdAllocationComponent } from '../pd-allocation/pd-allocation.component'; -import { SmartPdAllocationComponent } from '../smart-pd-allocation/smart-pd-allocation.component'; -import { TelePdAllocationComponent } from './../tele-pd-allocation/tele-pd-allocation.component'; +import { PdAllocationComponent } from '../pd-allocation/pd-allocation.component'; + import { ListPdComponent } from '../list-pd.component'; // import { SchedulePdComponent } from '../schedule-pd/schedule-pd.component'; import { EditPdApplicantComponent } from '../edit-pd-applicant/edit-pd-applicant.component'; @@ -20,6 +19,7 @@ import { InitiateAdditionalPdComponent } from './../initiate-additional-pd/initi import Swal from 'sweetalert2'; import { VideoPlayerComponent } from 'app/video-player/video-player.component'; import { AwsService } from 'app/AwsService/aws.service'; +import { ExcelUploadDialogComponent } from '../add-pd/excel-upload-dialog/excel-upload-dialog.component'; @Component({ selector: 'app-view-pd', @@ -123,6 +123,7 @@ export class ViewPdComponent implements OnInit, OnDestroy { // } ] }; + userId: any; constructor(notifier: NotifierService, private dialog: MatDialog, private _fb: FormBuilder, private _pd: PdTrigerService, private route: ActivatedRoute, private router: Router, private ListPdComponent: ListPdComponent, @@ -133,6 +134,7 @@ export class ViewPdComponent implements OnInit, OnDestroy { } ngOnInit() { + this.userId = this._aws.getlocale() this.ListPdComponent.showListView(false); this.route.params.subscribe(params => { this.viewID = params['pdid']; @@ -504,46 +506,68 @@ else { } /** To update pd officer*/ - selfAllocation() { - const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, { - data: { pdid:this.viewID, pd_status: this.pdStatusCheck.ALLOCATED,random_string:this.pdMasterData[0].random_string,dialogType:'actionOnly' }, - disableClose: true, - minWidth: '30%', - // maxWidth: '40%', - }); - dialogRef.afterClosed() - .subscribe(dataresult => { - if (dataresult.update_status == true) { - // return; - let user_id = this._aws.getlocale(); - if(!user_id) { - this.notifier.notify('error',"Something went wrong. Try again!!"); - return; - } - let updateData = { - "pd_id":this.viewID, - "fk_pd_allocated_to":user_id, - } - this._pd.updatePdOfficer(updateData).subscribe( - result => { - if (result.status == 200) { - this.notifier.notify('success', 'PD Allocated Successfully.!'); - this.viewPdDetails(this.viewID) - } - else { - this.notifier.notify('warning', 'Something Went Wrong Try Again.!'); - this.errorMessage = "Something Went Wrong Try Again.!"; - } - }, error => { - this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!'); - this.errorMessage = "Some Thing Wents Wrong Try Again.!"; - // this.dialogRef.close(); - }); - } - }); + selfAllocation(city_id) { + const dialogRef1 = this.dialog.open(PdAllocationComponent, { + data: { pdid:this.viewID, pd_status: this.pdStatusCheck.ALLOCATED,random_string:this.pdMasterData[0].random_string,dialogType:'actionOnly',city_id:city_id }, + disableClose: true, + minWidth: '30%', + }) + dialogRef1.afterClosed().subscribe(rr=>{ + this.notifier.notify("success","Allocated Successfully") + }) + // return; + // const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, { + // data: { pdid:this.viewID, pd_status: this.pdStatusCheck.ALLOCATED,random_string:this.pdMasterData[0].random_string,dialogType:'actionOnly' }, + // disableClose: true, + // minWidth: '30%', + // // maxWidth: '40%', + // }); + // dialogRef.afterClosed() + // .subscribe(dataresult => { + // if (dataresult.update_status == true) { + // // return; + // let user_id = this._aws.getlocale(); + // if(!user_id) { + // this.notifier.notify('error',"Something went wrong. Try again!!"); + // return; + // } + // let updateData = { + // "pd_id":this.viewID, + // "fk_pd_allocated_to":user_id, + // } + // this._pd.updatePdOfficer(updateData).subscribe( + // result => { + // if (result.status == 200) { + // this.notifier.notify('success', 'PD Allocated Successfully.!'); + // this.viewPdDetails(this.viewID) + // } + // else { + // this.notifier.notify('warning', 'Something Went Wrong Try Again.!'); + // this.errorMessage = "Something Went Wrong Try Again.!"; + // } + // }, error => { + // this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!'); + // this.errorMessage = "Some Thing Wents Wrong Try Again.!"; + // // this.dialogRef.close(); + // }); + // } + // }); } + openExcelUpload() { + const dialogRef = this.dialog.open(ExcelUploadDialogComponent,{ + data:{pd_id:this.viewID}, + minWidth:'50vw', + maxWidth:'75vw' + }) + dialogRef.afterClosed().subscribe(rr=>{ + if(rr.dataStatus) { + this.notifier.notify("success","Uploaded Successuflly") + } + }) + } + rejectPD() { const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, { data: { pdid: this.viewID, pd_status: this.pdStatusCheck.BOUNCED,random_string:this.pdMasterData[0].random_string }, @@ -559,6 +583,32 @@ else { } }); } + allocateToCpa() { + const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, { + data: { pdid:this.viewID, pd_status: this.pdStatusCheck.ALLOCATED,random_string:this.pdMasterData[0].random_string,dialogType:'actionOnly' }, + disableClose: true, + minWidth: '30%', + // maxWidth: '40%', + }); + dialogRef.afterClosed() + .subscribe(dataresult => { + if (dataresult.update_status == true) { + // return; + let lenderMasterArray = { "pd_id": this.viewID,random_string:this.masterRandomString } + this._pd.editPdMasterDetails(lenderMasterArray, this.pdStatusCheck.TRIGGERED).subscribe(result => { + if (result.status == 200) { + this.notifier.notify('success', 'Updated successfully.'); + this.viewPdDetails(this.viewID); + } + else { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + } + }, error => { + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + }); + } + }); + } // updateViewComponent(editBack:string) { diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts index 2576df4..c653977 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts @@ -127,6 +127,7 @@ import { ExcelUploadDialogComponent } from './list-pd/add-pd/excel-upload-dialog import { SpeedDialFabComponent } from './list-pd/view-pd/speed-dial-fab/speed-dial-fab.component'; import { VideoPlayerComponent } from 'app/video-player/video-player.component'; import { MatVideoModule } from 'mat-video'; +import { PdAllocationComponent } from './list-pd/pd-allocation/pd-allocation.component'; /** * Custom angular notifier options @@ -174,7 +175,7 @@ const pdCustomNotifierOptions: NotifierOptions = { @NgModule({ declarations: [TelePdAllocationComponent, ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, SmartPdAllocationComponent, EditPdApplicantComponent, EditPdMasterComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, PdReportComponent, PdRequirementComponent, ModelEditPdReportComponent, DialogChangeCurrentVenrsion, QcReviewComponent, SearchRelationPipe, RupeeCurrencyFormatPipe, DeleteRecordsCountPipe, PdLocatedMapViewDirective, ViewLocationComponent, GetAnswerableFormsPipe,PdStatusChangeDialogueComponent,InitiateAdditionalPdComponent, ExcelUploadDialogComponent, - SpeedDialFabComponent,VideoPlayerComponent], + SpeedDialFabComponent,VideoPlayerComponent,PdAllocationComponent], imports: [ CommonModule, ManagePdRoutingModule, @@ -216,7 +217,8 @@ const pdCustomNotifierOptions: NotifierOptions = { {provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]}, {provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}, PdLocatedMapViewDirective], - entryComponents: [SmartPdAllocationComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, PdRequirementComponent, ModelEditPdReportComponent, DialogChangeCurrentVenrsion, QcReviewComponent, ViewLocationComponent,PdStatusChangeDialogueComponent,InitiateAdditionalPdComponent,ExcelUploadDialogComponent,VideoPlayerComponent], + entryComponents: [SmartPdAllocationComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, PdRequirementComponent, ModelEditPdReportComponent, DialogChangeCurrentVenrsion, QcReviewComponent, ViewLocationComponent,PdStatusChangeDialogueComponent,InitiateAdditionalPdComponent,ExcelUploadDialogComponent,VideoPlayerComponent, + PdAllocationComponent], }) export class ManagePdModule { } \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts index 9ed5307..2cc2c3a 100755 --- a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts +++ b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts @@ -175,9 +175,9 @@ export class PdTrigerService { const Lender:any = entity_id ? { params: new HttpParams().set('lenderid', entity_id) } : { }; - if(LenderRoleID == '25') { + // if(LenderRoleID == '25') { Lender.params = Lender.params.set('createdby',userid) - } + // } return this._http.get(this.apiUrl + "listLessPDDetails/get",Lender) .pipe( catchError(this.handleError('operation', [])) @@ -198,9 +198,9 @@ export class PdTrigerService { // { params: new HttpParams().set('createdby', userid) }; let paramHttp:any= entity_id && status ? {params : new HttpParams().set('lenderid', entity_id).set('status',status)} : {}; - if(LenderRoleID == '25') { + // if(LenderRoleID == '25') { paramHttp.params = paramHttp.params.set('createdby',userid) - } + // } return this._http.get(this.apiUrl + "listLessPDDetails/get", paramHttp) .pipe( catchError(this.handleError('operation', [])) @@ -656,9 +656,9 @@ export class PdTrigerService { overAllSearchFormDetails(searchItem) { let LenderRoleID : any = localStorage.getItem('LenderRoleID'); let userid=this._aws.getlocale() - if(LenderRoleID == '25') { + // if(LenderRoleID == '25') { searchItem.createdby = userid - } + // } let records = { 'records': searchItem }; return this._http.post(this.apiUrl + 'filterPDList', records).pipe( catchError(this.handleError('operation', [])) @@ -813,8 +813,12 @@ checkExistPDDetails(datas,entity_id){ return this._http.post(this.apiUrl+'checkExistPDDetails',{records:datas,client:entity_id}) .pipe(catchError(this.handleError("checkExistPDDetails",[]))) } -uploadSMCDataFile(file) { - let records = {"rand_key":"qwerty1234"} +uploadSMCDataFile(file,pd_id ?) { + // let records = {"rand_key":"qwerty1234"} + let records :any= {} + if(pd_id) { + records.fk_pd_id = pd_id + } let formData= new FormData() formData.append("pd_excel_data",file) formData.append("records",JSON.stringify(records)) @@ -881,6 +885,9 @@ loadTemplate(form_id) { return this._http.post(this.apiUrl+'updateTwlioVideoStatus',params) .pipe(catchError(this.handleError("updateTwlioVideoStatus",[]))) } - + getCMUsers(city_id):Observable { + let param = new HttpParams().set('city_id',city_id) + return this._http.get(this.apiUrl+"getCMUsers",{params:param}) + } }