Pd report view details : kdk

This commit is contained in:
dineshkumarkannan 2018-11-23 19:02:27 +05:30
parent b489fd4c37
commit b674a92f62
9 changed files with 385 additions and 25 deletions

View File

@ -0,0 +1,45 @@
<mat-card style="min-height:540px;">
<mat-card-content>
<div style="text-align: right;" class="mb-1">
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Close" matTooltipPosition="above"
(click)="loadPdViewCompoent()"><mat-icon>close</mat-icon></button>
</div>
<div style="text-align: right;" class="mb-1">
</div>
<div>
<div>
<label>Billing Name : </label> {{pdReportRecords.billing_name}}
</div>
<div>
<label>Product Name : </label> {{pdReportRecords.product_name}}
</div>
<div>
<label>Customer Segment Name: </label> {{pdReportRecords.customer_segment_name}}
</div>
<div>
<label>PD Type: </label> {{pdReportRecords.pd_type_name}}
</div>
<div>
<label>Status: </label> {{pdReportRecords.pd_status}}
</div>
<div>
<label>Applicant Details : </label> <span *ngFor="let applicants of pdReportRecords?.pd_applicant_details; let last = last"> {{applicants.applicant_name}} <span *ngIf="!last"> , </span></span>
</div>
<!--{{pdReportRecords.question_answers | json}}-->
<div *ngFor="let data of pdReportRecords?.question_answers.form_details">
<h4><b>{{data.Name}}</b></h4>
<div *ngFor="let dataQA of data?.Details">
<div><b>{{dataQA.question}}</b></div>
<div>{{dataQA.answer}}</div>
</div>
<hr>
</div>
</div>
</mat-card-content>
</mat-card>
<notifier-container></notifier-container>

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PdReportComponent } from './pd-report.component';
describe('PdReportComponent', () => {
let component: PdReportComponent;
let fixture: ComponentFixture<PdReportComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PdReportComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PdReportComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,266 @@
import {Component, ViewChild, OnInit, ViewEncapsulation, OnDestroy} from '@angular/core';
import {FormBuilder, FormGroup, Validators, FormControl, FormArray, AbstractControl} from '@angular/forms';
import {ActivatedRoute, Router} from '@angular/router';
import {NotifierService} from 'angular-notifier';
import {ListPdComponent} from './../list-pd.component';
import {PdTrigerService} from '../../../pd-service/pd-triger.service';
@Component({
selector: 'app-pd-report',
templateUrl: './pd-report.component.html',
styleUrls: ['./pd-report.component.scss']
})
export class PdReportComponent implements OnInit {
startPD: any;
pdReportRecords:any;
private notifier: NotifierService;
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
private router: Router, public pdTrigerService: PdTrigerService, private listPDComponent: ListPdComponent) {
this.startPD = this.route.snapshot.params['pdid'];
this.notifier = notifier;
}
ngOnInit() {
this.listPDComponent.showListView(false);
this.getPdReportDetails();
}
getPdReportDetails() {
this.pdTrigerService.getPdFinalReportDetails(this.startPD).subscribe(data => {
if (data.status == 200) {
// this.pdReportRecords = data.records.question_answers;
let Records = {
"dataStatus": true,
"status": 200,
"records": {
"pd_id": "1",
"fk_lender_id": "7",
"lender_full_name": "check",
"lender_short_name": "check",
"fk_entity_billing_id": "1",
"billing_name": "ICICI- CHENNAI",
"lender_applicant_id": "Le123",
"pd_date_of_initiation": "06\/10\/2018",
"fk_product_id": "8",
"product_name": "Land Loan",
"product_abbr": "LL",
"fk_subproduct_id": "1",
"subproduct_name": "Purchase (Resale) Loan. ",
"subproduct_abbr": "HL PUR-RESALE",
"fk_pd_type": "1",
"pd_type_name": "Full PD ",
"pd_status": "COMPLETED",
"pd_status_name": null,
"pd_specific_clarification": null,
"createdon": "06\/10\/2018 05:43:58",
"fk_createdby": "1",
"updatedon": "16\/11\/2018 11:11:00",
"fk_updatedby": "1",
"createdby": "Krishna kumar",
"updatedby": "Krishna kumar",
"fk_pd_allocation_type": "1",
"pd_allocation_type_name": "AUTO",
"fk_pd_allocated_to": "128",
"pd_allocated_to": "VinothKumar S",
"executive_id": null,
"executive_name": null,
"central_pd_officer_id": null,
"centralofficer": null,
"fk_pd_template_id": "11",
"template_name": "TMB",
"fk_customer_segment": "2",
"customer_segment_name": "Salary Cheque",
"customer_segment_abbr": "SAL-CHQ",
"pd_officier_final_judgement": null,
"pd_agency_id": null,
"agency_name": null,
"loan_amount": "60000",
"addressline1": "MGR Street,Vengaivasal Main Road",
"addressline2": "Santhoshpuram",
"addressline3": "chennai",
"fk_city": "2",
"city_name": "Chennai",
"fk_state": "2",
"state_name": "Tamil Nadu",
"pincode": "600100",
"pd_contact_person": "Ram",
"pd_contact_mobileno": "32131233",
"scheduled_on": "31\/12\/2018 12:59 PM",
"completed_on": null,
"remarks": null,
"pd_applicant_details": [
{
"pd_co_applicant_id": "1",
"fk_pd_id": "1",
"applicant_name": "Karthi Raj",
"applicant_type": "1",
"mobile_no": "4234234155",
"email": "sivak@gmail.com",
"addressline1": null,
"addressline2": null,
"addressline3": null,
"fk_city": null,
"fk_state": null,
"pincode": null,
"relation": "brother",
"relation_name": null,
"landline": null
},
{
"pd_co_applicant_id": "2",
"fk_pd_id": "1",
"applicant_name": "ramesh",
"applicant_type": "0",
"mobile_no": "3123123213",
"email": "",
"addressline1": null,
"addressline2": null,
"addressline3": null,
"fk_city": null,
"fk_state": null,
"pincode": null,
"relation": "brother",
"relation_name": null,
"landline": null
}
],
"question_answers": {
"form_details": [
{
"Name": "Supplied Details",
"Details": [
{
"question": "What are the main raw materials?(MEG Only)",
"answer": "check checkcheck"
},
{
"question": "Supplier Name",
"answer": "Resico"
},
{
"question": "Contact Person Name",
"answer": "Karthick"
},
{
"question": "Contact Mobile Number",
"answer": "9874115221"
},
{
"question": "Payment Mode",
"answer": "Immediate Or Advanced Payment"
},
{
"question": "% of immediate \/ Advance Payment Purchase to Total Purchase?",
"answer": "212"
},
{
"question": "Credit Period",
"answer": ""
},
{
"question": "Frequency of Purchase",
"answer": "Monthly"
},
{
"question": "Others Details",
"answer": ""
}
]},
{
"Name": "Client Details",
"Details": [
{
"question": "Client Name",
"answer": "Venba"
},
{
"question": "Contact Person Name",
"answer": "test"
},
{
"question": "Contact Mobile Number",
"answer": "9685471122"
},
{
"question": "Payment Mode",
"answer": "Combination of Both"
},
{
"question": "% of immediate \/ Advance Payment Purchase to Total Purchase?",
"answer": "12"
},
{
"question": "Credit Period",
"answer": "10"
},
{
"question": "Frequency of Purchase",
"answer": "Weekly"
},
{
"question": "Others Details",
"answer": ""
}
]},
{ "Name": "Personal Details",
"Details": [
{
"question": "Name",
"answer": "Karthi Raj"
},
{
"question": "Age",
"answer": "50"
},
{
"question": "Entity",
"answer": "Individual"
},
{
"question": "Name",
"answer": "ramesh"
},
{
"question": "Age",
"answer": "45"
},
{
"question": "Entity",
"answer": "Individual"
},
{
"question": "Relationship With Main Applicant",
"answer": "Brother"
},
{
"question": "Remarks",
"answer": "good"
}
]}
],
"general_questions": [
]
}
}
}
this.pdReportRecords = Records.records;
// this.pdReportRecords = data.records.qu;
}
}, err=> {
})
}
// load pd view component
loadPdViewCompoent() {
this.router.navigate(['../../viewpd', this.startPD], {relativeTo: this.route});
}
}

View File

@ -12,6 +12,9 @@
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master)"><mat-icon>verified_user</mat-icon></button>
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master)"><mat-icon>schedule</mat-icon></button>
<button *ngIf="master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.TRIGGERED && currentPDStatus!=pdStatusCheck.DRAFT" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(viewID)"><mat-icon>question_answer</mat-icon></button>
<button *ngIf="master.pd_type_name && currentPDStatus===pdStatusCheck.QC_COMPLETED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above" (click)="getPDIDReport(viewID)"><mat-icon>ballot</mat-icon></button>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" (click)="loadPdListCompoent()"><mat-icon>close</mat-icon></button>
<br>
<!-- <span *ngIf="master.pd_allocated_to" style="color:red;text-align:left" class="fa-1x fa fa-user-secret" matTooltip="PD Officer"

View File

@ -170,6 +170,11 @@ export class ViewPdComponent implements OnInit, OnDestroy {
this.router.navigate([ '../../startpd',pdID], { relativeTo: this.route });
}
getPDIDReport(pdID:any) {
this.destroyType=3;
this.router.navigate([ '../../pdRecord',pdID], { relativeTo: this.route });
}
// updateViewComponent(editBack:string) {
// if(editBack=='1'){

View File

@ -62,6 +62,7 @@ import {FinancialInfoComponent} from "./list-pd/start-pd/forms/financial-info/fi
import { LenderRepresentativeComponent } from './list-pd/start-pd/forms/lender-representative/lender-representative.component';
import { TelePdAllocationComponent } from './list-pd/tele-pd-allocation/tele-pd-allocation.component';
import { PdReportComponent } from './list-pd/pd-report/pd-report.component';
/**
* Custom angular notifier options
@ -135,7 +136,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
// AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}), OwlDateTimeModule,
// OwlNativeDateTimeModule,
// ],
declarations: [TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent],
declarations: [TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent],
// exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent],
// providers: [PdTrigerService, GetGeometricLocationService],

View File

@ -6,6 +6,7 @@ import { MapPdViewComponent } from './list-pd/map-pd-view/map-pd-view.component'
import { AddPdComponent } from '../manage-pd/list-pd/add-pd/add-pd.component';
import { ViewPdComponent } from '../manage-pd/list-pd/view-pd/view-pd.component';
import { StartPdComponent } from './list-pd/start-pd/start-pd.component';
import { PdReportComponent } from './list-pd/pd-report/pd-report.component';
/*
* manage pd router
*/
@ -18,7 +19,7 @@ const routes: Routes = [
path: '',
pathMatch: 'full',
redirectTo: 'pdlist'
},{
}, {
path: 'pdlist',
component: ListPdComponent,
children: [
@ -37,6 +38,10 @@ const routes: Routes = [
{
path: 'startpd/:pdid',
component: StartPdComponent,
},
{
path: 'pdRecord/:pdid',
component: PdReportComponent,
}
]
}

View File

@ -272,6 +272,16 @@ getPDFormDetailsWithID(pdID, formID ):Observable<any> {
)
}
// get Pd Final report Question Answer
getPdFinalReportDetails(pdId: number) {
return this._http.post<any>(this.apiUrl+"getFinalPDReportQuestions",{"pd_id":pdId})
.pipe(
catchError(this.handleError('operation', []))
)
}
// private handleError<T>(operation = 'operation', result?: T) {
// return (error: any): Observable<T> => {
// return of(result as T);