From d38de2243ee712052d598463c70f823424d9ea0e Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 26 Nov 2018 16:01:53 +0530 Subject: [PATCH 1/8] assessed income changes --- .../assessed-income.component.html | 281 ++++++++++++++++++ .../assessed-income.component.scss | 46 +++ .../assessed-income.component.spec.ts | 25 ++ .../assessed-income.component.ts | 150 ++++++++++ 4 files changed, 502 insertions(+) create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.html create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.scss create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.spec.ts create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.ts diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.html new file mode 100644 index 000000000..f6b85d4b4 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.html @@ -0,0 +1,281 @@ +
+ + + + + + + + + + + + + + + Sales Calculate Items Wise + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Item{{salesItem.sales_item}} Qty/UOM{{salesItem.sales_qty }}/{{salesItem.uom_name }} Rate/Unit {{salesItem.rate_per_unit }} Frequency {{salesItem.frequency_name}} Annual Sale Value {{salesItem.annual_sale_value}}
+
+
+
+ + + + Sales Calculate Items Month Wise + + + + + + + + {{expandDetails.salesItem}} + + + +
+
+ +

{{eachItem.header}}

+ + + + + + + + + + + + + + + + +
Date{{itemValue.sales_date | date: 'dd-MM-yyyy'}} Total Amount{{itemValue.sales_value}} {{getTotalCost(eachItem.value)}}
+
+ + +
+ +
+ + +
+ {{footer.month_message}} +
+
+ {{footer.year_message}} +
+
+
+
+
+
+ + + + + Purchase Details + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Item{{purchaseItem.purchase_item}} Qty/UOM{{purchaseItem.purchase_qty }}/{{purchaseItem.uom_name }} Rate/Unit {{purchaseItem.rate_per_unit }} Frequency {{purchaseItem.frequency_name}} Annual Purchase Value {{purchaseItem.annual_purchase_value}}
+
+
+
+ + + + Business Expenses + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Item {{businessEx.expense_item}} Value {{businessEx.expense_value }} Frequency {{businessEx.frequency_name}} Annual Expenses Value {{businessEx.annual_expenses_value}}
+
+
+
+ + + + House Hold Expenses + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Item{{householdItem.expense_item}} Value{{householdItem.expense_value }}Frequency {{householdItem.frequency_name}} Annual Expenses Value {{householdItem.annual_expense_value}}
+
+
+
+
+ + +
+
+ + +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.scss new file mode 100644 index 000000000..1ca16c276 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.scss @@ -0,0 +1,46 @@ +.example-container { + max-height: 300px; + overflow: auto; +} + +table { + width: 100%; +} + +tr.mat-footer-row { + font-weight: bold; +} + +.mat-table-sticky { + border-top: 1px solid #e0e0e0; +} + + .mat-form-field { + width: 100%; + } + .expan_footer{ + font-size: 18px; + direction: rtl; + } + .expan_table_header { + font-size: 18px; + text-align: center; + } + .h4_font { + font-size: 18px; + } + +// table, th, td { +// border: 1px solid rgba(0, 0, 0, 0.12); +// border-collapse: collapse; +// } +// td { +// padding: 5px; +// text-align: left; +// } +// th { +// padding: 5px; +// text-align: center; +// } + + \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.spec.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.spec.ts new file mode 100644 index 000000000..0e5f1ba73 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AssessedIncomeComponent } from './assessed-income.component'; + +describe('AssessedIncomeComponent', () => { + let component: AssessedIncomeComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ AssessedIncomeComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AssessedIncomeComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.ts new file mode 100644 index 000000000..e2aebdb6b --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.ts @@ -0,0 +1,150 @@ +import {Component,OnInit,Inject,Input, ViewChild } from '@angular/core'; +import {FormBuilder,FormGroup,Validators,FormArray, FormControl,} from '@angular/forms'; +import { NotifierService } from 'angular-notifier'; +/** Service */ +import { PdTrigerService } from '../../../../../pd-service/pd-triger.service'; +import { ActivatedRoute, Router } from "@angular/router"; + +@Component({ + selector: 'app-assessed-income', + templateUrl: './assessed-income.component.html', + styleUrls: ['./assessed-income.component.scss'] +}) +export class AssessedIncomeComponent implements OnInit { + public _assessedIncomeFormFrom: FormGroup; + private notifier: NotifierService; + @Input() pdid: number; + @Input() form_id: number; + salesCaluatedItemColumns: string[] = ['Item', 'Qty/UOM','Rate/Unit','Frequency','Annual Sale Value']; + public salesCaluatedItem:any= []; + salesItemMonthWiseColumns: string[] = ['Item', 'Value','Frequency','Annual Expenses Value']; + public salesItemMonthWise:any= []; + purchaseDetailsColumns: string[] = ['Item', 'Qty/UOM','Rate/Unit','Frequency','Annual Purchase Value']; + public purchaseDetails:any= []; + businessExpensesColumns: string[] = ['Item', 'Value','Frequency','Annual Expenses Value']; + public businessExpenses:any= []; + houseHoldExpensesColumns: string[] = ['Item', 'Value','Frequency','Annual Expenses Value']; + public houseHoldExpenses:any= []; + + public salesMonthItemColumns = ['Date','Amount']; + + +// Sales Item MonthWise declare table header,body andd footer elements +salesMonthWiseTable:any=[]; +salesItemMonthWiseBody: any[]; +salesItemMonthWiseFooter: any[]; + +salesMonthWiseExpandedItems: any=[] + + + constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, + private router: Router, + private _pd: PdTrigerService) { + + } + + ngOnInit() { + + this.initAssessedIncomeForm(); + let params: any = {}; + params.pd_id = this.pdid; + params.pd_form_id = this.form_id; + this._pd.getAssessedIncomeFormDetails(params).subscribe(value => { + if (value.status == 200) { + if(value.records.sales_declared_by_customer){ + this._assessedIncomeFormFrom.controls['sales_declared_by_customer'].setValue(value.records.sales_declared_by_customer[0].sales_declared_by_customer); + } + else{ + this._assessedIncomeFormFrom.controls['sales_declared_by_customer'].setValue(''); + + } + if(value.records.sales_calculated_by_itemwise){ + this.salesCaluatedItem = value.records.sales_calculated_by_itemwise; + } + if(value.records.sales_items_by_monthwise){ + this.salesItemMonthWise = value.records.sales_items_by_monthwise; + // hide table format start + + // this.salesItemMonthWise.forEach((itemElement, itemIndex) => { + // this.salesItemMonthWiseBody= Object.keys(itemElement.items).map(key => ({ header:key, value: itemElement.items[key] })); + // let combineTableColumn = Object.keys(itemElement.items).map(key => (itemElement.items[key])); + // let sumItems: any=[]; + // combineTableColumn.forEach((sumValue, sumIndex) => { + // let calculateItems = sumValue.reduce((acc, calculate) => acc + Number(calculate.sales_value), 0); + // sumItems.push({bodyElement:sumValue, bodyElementTotal:calculateItems}); + // }) + // let calculateAllItemsTotal:number=sumItems.reduce((racc, rcalculate) => racc + Number(rcalculate.bodyElementTotal), 0); + // let convertYear : number = 12 / sumItems.length; + // let tableFooterMessage: any=[]; + // tableFooterMessage.push({ + // message: sumItems.length + ' Months ' + itemElement.sales_item + ' Sales ', + // value:calculateAllItemsTotal, + // cols_span_length:sumItems.length * 2 -1, + // }) + // tableFooterMessage.push({ + // message: ' Yearly ' + itemElement.sales_item + ' Sales Arrived', + // value: calculateAllItemsTotal * convertYear, + // cols_span_length:sumItems.length * 2 -1 , + // }) + // this.salesMonthWiseTable.push({salesItem:itemElement.sales_item,headerElement:this.salesItemMonthWiseBody, bodyElements:sumItems, parentTableFooter:tableFooterMessage}); + // //console.log(this.salesMonthWiseTable) + // }); + // hide table format end + + + this.salesItemMonthWise.forEach((itemElement, itemIndex) => { + let expandBodyContent= Object.keys(itemElement.items).map(key => ({ header:key, value: itemElement.items[key] })); + let listItems: any=[]; + expandBodyContent.forEach((expnadElement, expnadIndex) => { + let calculateItems = expnadElement.value.reduce((acc, calculate) => acc + Number(calculate.sales_value), 0); + listItems.push({items:expnadElement, itemsTotal:calculateItems}) + }) + let calculateAllItemsTotal:number=listItems.reduce((racc, rcalculate) => racc + Number(rcalculate.itemsTotal), 0); + + let convertYear : number = 12 / listItems.length; + let footerMessage: any=[]; + footerMessage.push({ + month_message: listItems.length + ' Months ' + itemElement.sales_item + ' Sales : '+ calculateAllItemsTotal, + month_value:calculateAllItemsTotal, + year_message: ' Yearly ' + itemElement.sales_item + ' Sales Arrived : '+ calculateAllItemsTotal * convertYear, + year_value: calculateAllItemsTotal * convertYear, + }) + // footerMessage.push({ + // message: ' Yearly ' + itemElement.sales_item + ' Sales Arrived', + // value: calculateAllItemsTotal * convertYear, + // }) + this.salesMonthWiseExpandedItems.push({salesItem:itemElement.sales_item, expandElements:expandBodyContent, footerMessage: footerMessage}); + }); + + + } + if(value.records.purchase_details){ + this.purchaseDetails = value.records.purchase_details; + } + if(value.records.business_expenses){ + this.businessExpenses=value.records.business_expenses; + } + if(value.records.house_hold_expenses){ + this.houseHoldExpenses = value.records.house_hold_expenses; + } + } + + }) + } + + // get total cost + getTotalCost(getItems:any) { + return getItems.map(t => t.sales_value).reduce((acc, value) => acc + Number(value), 0); + } + + + // Dynamic Form field creation + + public initAssessedIncomeForm(): void { + this._assessedIncomeFormFrom = this.fb.group({ + sales_declared_by_customer: ['', Validators.compose([Validators.required])], + // lender_representative_details: this.fb.array([]), + }); +} + +} From 0a8685f13d926e1d69254ab6719c050dd4db0754 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 26 Nov 2018 16:02:32 +0530 Subject: [PATCH 2/8] merge:kms --- ng6-seed/package-lock.json | 28 +- .../app/dashboard/dashboard.component.html | 205 +++--- .../app/dashboard/dashboard.component.scss | 584 +----------------- .../src/app/dashboard/dashboard.component.ts | 339 +++++----- .../src/app/dashboard/dashboard.service.ts | 17 +- .../layouts/admin/admin-layout.component.html | 2 +- .../list-pd/add-pd/add-pd.component.html | 57 +- .../list-pd/add-pd/add-pd.component.ts | 19 +- .../edit-pd-applicant.component.html | 35 +- .../edit-pd-applicant.component.ts | 19 +- .../edit-pd-master.component.html | 6 +- .../edit-pd-master.component.ts | 9 + .../pd-allocation.component.html | 4 +- .../pd-report/pd-report.component.html | 45 ++ .../pd-report/pd-report.component.scss | 0 .../pd-report/pd-report.component.spec.ts | 25 + .../list-pd/pd-report/pd-report.component.ts | 266 ++++++++ .../smart-pd-allocation.component.html | 10 +- .../forms/address/address.component.html | 4 +- .../assets-info/assets-info.component.html | 32 +- .../assets-info/assets-info.component.ts | 13 +- .../banking-details.component.html | 36 +- .../banking-details.component.ts | 29 +- .../business-info.component.html | 72 +-- .../business-info/business-info.component.ts | 11 + .../client-info/client-info.component.html | 16 +- .../client-info/client-info.component.ts | 13 +- .../current-loan/current-loan.component.html | 16 +- .../current-loan/current-loan.component.ts | 9 + .../employment-info.component.html | 62 +- .../employment-info.component.ts | 32 + .../family-details.component.html | 10 +- .../financial-info.component.html | 26 +- .../financial-info.component.ts | 10 + .../loan-details/loan-details.component.html | 32 +- .../loan-details/loan-details.component.ts | 30 +- .../other-income/other-income.component.html | 8 +- .../other-income/other-income.component.ts | 10 + .../personal-info.component.html | 2 +- .../personal-info/personal-info.component.ts | 9 + .../rental-info/rental-info.component.html | 190 ++++++ .../rental-info/rental-info.component.scss | 27 + .../rental-info/rental-info.component.ts | 167 +++++ .../start-pd/forms/stock/stock.component.html | 24 +- .../start-pd/forms/stock/stock.component.ts | 9 + .../supplier-info.component.html | 27 +- .../supplier-info/supplier-info.component.ts | 14 +- .../list-pd/start-pd/start-pd.component.html | 14 +- .../list-pd/start-pd/start-pd.component.ts | 3 + .../tele-pd-allocation.component.html | 4 +- .../list-pd/view-pd/view-pd.component.html | 3 + .../list-pd/view-pd/view-pd.component.ts | 5 + .../manage-pd/manage-pd.module.ts | 12 +- .../manage-pd/manage-pd.routing.ts | 53 +- .../pd-service/pd-triger.service.ts | 10 + .../pd-notification-list.component.html | 12 +- .../pd-notification-list.component.ts | 3 +- .../pd-team-add/pd-team-add.component.ts | 31 +- .../pd-team-edit/pd-team-edit.component.html | 2 +- .../pd-team-edit/pd-team-edit.component.ts | 146 +++-- .../pd-team-list/pd-team-list.component.html | 7 +- .../pd-team-list/pd-team-list.component.ts | 40 +- .../app/settings/pd-team/pd-team.routing.ts | 2 +- .../service/masters/masters.service.ts | 23 +- .../users/register/register.component.html | 4 +- .../users/register/register.component.ts | 9 + 66 files changed, 1733 insertions(+), 1260 deletions(-) create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.html create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.scss create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.spec.ts create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-info/rental-info.component.html create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-info/rental-info.component.scss create mode 100644 ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-info/rental-info.component.ts diff --git a/ng6-seed/package-lock.json b/ng6-seed/package-lock.json index 0b81ab213..ed7e8f852 100644 --- a/ng6-seed/package-lock.json +++ b/ng6-seed/package-lock.json @@ -4294,12 +4294,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -4314,17 +4316,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -4441,7 +4446,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -4453,6 +4459,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -4467,6 +4474,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -4474,12 +4482,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -4498,6 +4508,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -4578,7 +4589,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -4590,6 +4602,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -4711,6 +4724,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", diff --git a/ng6-seed/src/app/dashboard/dashboard.component.html b/ng6-seed/src/app/dashboard/dashboard.component.html index 058c6c795..af25828e4 100644 --- a/ng6-seed/src/app/dashboard/dashboard.component.html +++ b/ng6-seed/src/app/dashboard/dashboard.component.html @@ -1,108 +1,101 @@ -
- - -
- - -
- {{dashboardTitle}} - -
-
- - -
-
- - - - {{myControl.value ? myControl.value[0].name : ''}} - - (+{{myControl.value.length - 1}} {{myControl.value?.length === 2 ? 'other' : 'others'}}) - - - {{ cd.name }} / {{cd.state_name}} - - - - -
-
+
+
+ + +
+ {{dashboardTitle}} - - - - {{myControl2.value ? myControl2.value[0].short_name : ''}} - - (+{{myControl2.value.length - 1}} {{myControl2.value?.length === 2 ? 'other' : 'others'}}) - - - - {{ ld.full_name }} ({{ ld.short_name }}) - - - -
-
+
+
+ + +
+
+ + + + {{myControl.value != null && myControl.value != '' ? myControl.value[0].name : ''}} + + (+{{myControl.value.length - 1}} {{myControl.value?.length === 2 ? 'other' : 'others'}}) + + + {{ cd.name }} / {{cd.state_name}} + + + - -
-
- -
Full - {{total1}}
-
-
-
-
- -
Smart - {{total2}}
-
-
-
-
- -
Tele - {{total3}}
-
-
- -
-
-





- -
    -
  •        Draft
  • -
  •        Triggered
  • -
  •        Allocated
  • -
  •        Scheduled
  • -
  •        InProgress
  • -
  •        Completed
  • -
  •        QC Completed
  • -
-
-
-
- -
- -
+
+
+ + + + + {{myControl2.value != null && myControl2.value != '' ? myControl2.value[0].short_name : ''}} + + (+{{myControl2.value.length - 1}} {{myControl2.value?.length === 2 ? 'other' : 'others'}}) + + + + {{ ld.full_name }} ({{ ld.short_name }}) + + + +
+ +
+ + +
+
+ +
Full - {{total1}}
+
+ +
+ +
Smart - {{total2}}
+
+
+ +
Tele - {{total3}}
+
+
+
+
+
    +
  •        Draft
  • +
  •        Triggered
  • +
  •        Allocated
  • +
  •        Scheduled
  • +
  •        InProgress
  • +
  •        Completed
  • +
  •        QC Completed
  • +
+
+
+
+
+
+ +
\ No newline at end of file diff --git a/ng6-seed/src/app/dashboard/dashboard.component.scss b/ng6-seed/src/app/dashboard/dashboard.component.scss index 69e8f2f0f..28e26b986 100644 --- a/ng6-seed/src/app/dashboard/dashboard.component.scss +++ b/ng6-seed/src/app/dashboard/dashboard.component.scss @@ -5,34 +5,17 @@ $p: 12px; mat-card-title{ background-color:#E00201 !important; color:#fff; - //padding-bottom: 1rem; - //margin-bottom: 0px; } .mat-input-wrapper { background: #fff; } -// .example-form { -// min-width: 150px; -// max-width: 500px; -// width: 95%; -// } + li { - display:block; - float:left; + display:inline-block; + //float:left; } - -//::ng-deep { - // .mat-form-field-appearance-outline .mat-form-field-outline { - // color: white; - //} - //mat-form-field { - // .mat-hint, input, ::placeholder, .mat-form-field-label { - // color: white; - //} - //} - //} - + .example-full-width { width: 95%; } @@ -47,25 +30,23 @@ li color: #fff; } -.lengend-list { - list-style-type: none; - margin: 0; - padding: 0; - overflow: hidden; - text-align:justify; -} +//.lengend-list { + // list-style-type: none; + //margin: 0; + // padding: 0; + // overflow: hidden; + // text-align:justify; +//} .lengend-element { - font-size: 1rem; + font-size: 1rem !important; padding-right: 3%; } .donut-inner{ margin-top: -171px; margin-left: 120px; - //margin-bottom: 154px; - //margin-top: -221px; - //margin-left: 145px; + } .donut-inner h5 { @@ -77,545 +58,10 @@ li font-size:1rems; } -// .profile { -// position: relative; -// width: 100%; -// height: 100%; -// background: rgba(white, .25); -// border-radius: 2px; -// overflow: hidden; -// box-shadow: 0 0 20px rgba(darken($red, 40%), .2); -// &.pre-enter { -// transform-origin: center center; -// transform: scaleY(0); -// .avatar { -// transform-origin: center top; -// transform: scaleY(0); -// } -// h1, -// h2, -// a.follow, -// a.link { -// opacity: 0; -// transform: translateY(300px); -// } -// } -// &.on-enter { -// animation: scaleYIn 1000ms ease-out forwards; -// .avatar { -// animation: scaleYIn-small 750ms ease-out forwards 1000ms; -// } -// h1, -// h2, -// a.follow, -// a.link { -// opacity: 1; -// animation: slideInUp 1000ms ease-out forwards; -// } -// h1 { -// animation-delay: 1050ms; -// } -// h2 { -// animation-delay: 1100ms; -// } -// a.follow { -// animation-delay: 1250ms; -// } -// li { -// &:nth-child(1) { -// a.link { -// animation-delay: 1300ms; -// } -// } -// &:nth-child(2) { -// a.link { -// animation-delay: 1350ms; -// } -// } -// &:nth-child(3) { -// a.link { -// animation-delay: 1400ms; -// } -// } -// } -// } -// } - -// .background { -// position: absolute; -// top: 0; -// left: 0; -// width: 100%; -// height: 100%; -// background: white; -// border-radius: 2px; -// } - -// .avatar, -// .info { -// width: 100%; -// height: 50%; -// } - -// .avatar { -// background: url('../../assets/images/1.jpg') no-repeat center center / cover; -// clip-path: polygon(0 0, 100% 0, 100% 75%, 0% 100%); -// } - -// .prof-list { -// li { -// display: inline-block; -// list-style: none; -// } -// } - -// .info { -// display: flex; -// flex-flow: row wrap; -// align-items: center; -// align-content: center; -// justify-content: center; -// position: relative; -// text-align: center; -// h1 { -// padding: $p $p 0; -// width: 100%; -// font-size: 24px; -// font-weight: 800; -// letter-spacing: 2px; -// text-transform: uppercase; -// } -// h2, -// a.follow { -// display: block; - -// border-radius: 2px; -// padding: $p/2; -// color: white; -// font-size: 12px; -// font-weight: 500; -// letter-spacing: 1px; -// text-transform: uppercase; -// } -// h2 { -// background: $red; -// background: linear-gradient(135deg, rgba(#f5825f, 1) 0%, rgba(#f5005f, 1) 100%); -// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5825f', endColorstr='#f5005f', GradientType=1); -// } -// a.follow { -// margin-left: $p; -// background: $blue; -// background: linear-gradient(135deg, rgba(#05c8e0, 1) 0%, rgba(#057fe0, 1) 100%); -// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#05c8e0', endColorstr='#057fe0', GradientType=1); -// &:hover, -// &:focus { -// background: #05c8e0; -// background: linear-gradient(135deg, rgba(lighten(#05c8e0, 10%), 1) 0%, rgba(lighten(#057fe0, 10%), 1) 100%); -// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='lighten(#05c8e0, 10%)', endColorstr='lighten(#057fe0, 10%)', GradientType=1); -// } -// &:active { -// background: #057fe0; -// background: linear-gradient(135deg, rgba(darken(#05c8e0, 5%), 1) 0%, rgba(darken(#057fe0, 5%), 1) 100%); -// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='darken(#05c8e0, 5%)', endColorstr='darken(#057fe0, 5%)', GradientType=1); -// } -// } -// ul { -// display: flex; -// justify-content: center; -// padding: $p/2; -// width: 100%; -// li { -// padding: $p/2; -// } -// } -// a.link { -// display: block; -// border-radius: 100%; -// background: $blue; -// width: 30px; -// height: 30px; -// line-height: 30px; -// display: block; -// } -// } - -// a.link { -// &.portfolio { -// background: #f5c8bf; -// background: linear-gradient(135deg, rgba(#f5c8bf, 1) 0%, rgba(#f58dbf, 1) 100%); -// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5c8bf', endColorstr='#f58dbf', GradientType=1); -// box-shadow: inset 0 0 10px rgba(#f58dbf, .5); -// &:hover, -// &:focus { -// background: lighten(#f5c8bf, 5%); -// background: linear-gradient(135deg, rgba(lighten(#f5c8bf, 5%), 1) 0%, rgba(lighten(#f58dbf, 5%), 1) 100%); -// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='lighten(#f5c8bf, 5%)', endColorstr='lighten(#f58dbf, 5%)', GradientType=1); -// box-shadow: inset 0 0 10px rgba(lighten(#f58dbf, 5%), .5); -// } -// &:active { -// background: darken(#f5c8bf, 5%); -// background: linear-gradient(135deg, rgba(darken(#f5c8bf, 5%), 1) 0%, rgba(darken(#f58dbf, 5%), 1) 100%); -// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='darken(#f5c8bf, 5%)', endColorstr='darken(#f58dbf, 5%)', GradientType=1); -// box-shadow: inset 0 0 10px rgba(darken(#f58dbf, 5%), .5); -// } -// } -// &.codepen { -// background: #fcd000; -// background: linear-gradient(135deg, rgba(#fcd000, 1) 0%, rgba(#fc9a00, 1) 100%); -// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcd000', endColorstr='#fc9a00', GradientType=1); -// box-shadow: inset 0 0 10px rgba(#fc9a00, .5); -// &:hover, -// &:focus { -// background: lighten(#fcd000, 5%); -// background: linear-gradient(135deg, rgba(lighten(#fcd000, 5%), 1) 0%, rgba(lighten(#fc9a00, 5%), 1) 100%); -// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='lighten(#fcd000, 5%)', endColorstr='lighten(#fc9a00, 5%)', GradientType=1); -// box-shadow: inset 0 0 10px rgba(lighten(#fc9a00, 5%), .5); -// } -// &:active { -// background: darken(#fcd000, 5%); -// background: linear-gradient(135deg, rgba(darken(#fcd000, 5%), 1) 0%, rgba(darken(#fc9a00, 5%), 1) 100%); -// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='darken(#fcd000, 5%)', endColorstr='darken(#fc9a00, 5%)', GradientType=1); -// box-shadow: inset 0 0 10px rgba(darken(#fc9a00, 5%), .5); -// } -// } -// &.github { -// background: #41adc4; -// background: linear-gradient(135deg, rgba(#41adc4, 1) 0%, rgba(#4183c4, 1) 100%); -// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#41adc4', endColorstr='#4183c4', GradientType=1); -// box-shadow: inset 0 0 10px rgba(#4183c4, .5); -// &:hover, -// &:focus { -// background: lighten(#41adc4, 5%); -// background: linear-gradient(135deg, rgba(lighten(#41adc4, 5%), 1) 0%, rgba(lighten(#4183c4, 5%), 1) 100%); -// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='lighten(#41adc4, 5%)', endColorstr='lighten(#4183c4, 5%)', GradientType=1); -// box-shadow: inset 0 0 10px rgba(lighten(#4183c4, 5%), .5); -// } -// &:active { -// background: darken(#41adc4, 5%); -// background: linear-gradient(135deg, rgba(darken(#41adc4, 5%), 1) 0%, rgba(darken(#4183c4, 5%), 1) 100%); -// filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='darken(#41adc4, 5%)', endColorstr='darken(#4183c4, 5%)', GradientType=1); -// box-shadow: inset 0 0 10px rgba(darken(#4183c4, 5%), .5); -// } -// } -// } - -// @media only screen and (min-width: 470px) { -// .profile { -// display: flex; -// &.pre-enter { -// transform: scaleX(0); -// .avatar { -// transform-origin: left center; -// transform: scaleX(0); -// } -// h1, -// h2, -// a.follow, -// a.link { -// transform: translateX(300px); -// } -// } -// &.on-enter { -// animation-name: scaleXIn; -// .avatar { -// animation-name: scaleXIn-small; -// } -// h1, -// h2, -// a.follow, -// a.link { -// animation-name: slideInLeft; -// } -// } -// } -// .background { -// mix-blend-mode: overlay; -// } -// .avatar, -// .info { -// width: 50%; -// height: 100%; -// } -// .avatar { -// clip-path: polygon(0 0, 100% 0, 75% 100%, 0% 100%); -// } -// } - -// @media only screen and (min-width: 470px) and (min-height: 600px) { -// .profile { -// max-height: 400px; -// } -// } - - -// /* https://goo.gl/jIUq3E */ - -// @keyframes scaleXIn { -// 0% { -// transform: matrix3d(0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 4.7% { -// transform: matrix3d(0.45, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 9.41% { -// transform: matrix3d(0.883, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 14.11% { -// transform: matrix3d(1.141, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 18.72% { -// transform: matrix3d(1.212, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 24.32% { -// transform: matrix3d(1.151, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 29.93% { -// transform: matrix3d(1.048, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 35.54% { -// transform: matrix3d(0.979, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 41.04% { -// transform: matrix3d(0.961, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 52.15% { -// transform: matrix3d(0.991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 63.26% { -// transform: matrix3d(1.007, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 85.49% { -// transform: matrix3d(0.999, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 100% { -// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// } - - -// /* https://goo.gl/auuhcg */ - -// @keyframes scaleYIn { -// 0% { -// transform: matrix3d(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 4.7% { -// transform: matrix3d(1, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 9.41% { -// transform: matrix3d(1, 0, 0, 0, 0, 0.883, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 14.11% { -// transform: matrix3d(1, 0, 0, 0, 0, 1.141, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 18.72% { -// transform: matrix3d(1, 0, 0, 0, 0, 1.212, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 24.32% { -// transform: matrix3d(1, 0, 0, 0, 0, 1.151, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 29.93% { -// transform: matrix3d(1, 0, 0, 0, 0, 1.048, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 35.54% { -// transform: matrix3d(1, 0, 0, 0, 0, 0.979, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 41.04% { -// transform: matrix3d(1, 0, 0, 0, 0, 0.961, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 52.15% { -// transform: matrix3d(1, 0, 0, 0, 0, 0.991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 63.26% { -// transform: matrix3d(1, 0, 0, 0, 0, 1.007, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 85.49% { -// transform: matrix3d(1, 0, 0, 0, 0, 0.999, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 100% { -// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// } - - -// /* https://goo.gl/dNBqrt */ - -// @keyframes scaleXIn-small { -// 0% { -// transform: matrix3d(0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 6.31% { -// transform: matrix3d(0.384, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 12.51% { -// transform: matrix3d(0.621, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 18.82% { -// transform: matrix3d(0.771, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 25.03% { -// transform: matrix3d(0.862, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 37.54% { -// transform: matrix3d(0.952, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 50.05% { -// transform: matrix3d(0.984, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 75.08% { -// transform: matrix3d(0.999, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 100% { -// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// } - - -// /* https://goo.gl/jZL0uj */ - -// @keyframes scaleYIn-small { -// 0% { -// transform: matrix3d(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 6.31% { -// transform: matrix3d(1, 0, 0, 0, 0, 0.384, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 12.51% { -// transform: matrix3d(1, 0, 0, 0, 0, 0.621, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 18.82% { -// transform: matrix3d(1, 0, 0, 0, 0, 0.771, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 25.03% { -// transform: matrix3d(1, 0, 0, 0, 0, 0.862, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 37.54% { -// transform: matrix3d(1, 0, 0, 0, 0, 0.952, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 50.05% { -// transform: matrix3d(1, 0, 0, 0, 0, 0.984, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 75.08% { -// transform: matrix3d(1, 0, 0, 0, 0, 0.999, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// 100% { -// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// } - - -// /* https://goo.gl/Ne0Mkr */ - -// @keyframes slideInLeft { -// 0% { -// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 300, 0, 0, 1); -// } -// 6.31% { -// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 184.858, 0, 0, 1); -// } -// 12.51% { -// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 113.68, 0, 0, 1); -// } -// 18.82% { -// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 68.663, 0, 0, 1); -// } -// 25.03% { -// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 41.37, 0, 0, 1); -// } -// 37.54% { -// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 14.382, 0, 0, 1); -// } -// 50.05% { -// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 4.724, 0, 0, 1); -// } -// 75.08% { -// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0.381, 0, 0, 1); -// } -// 100% { -// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// } - - -// /* https://goo.gl/MSqtd5 */ - -// @keyframes slideInUp { -// 0% { -// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 300, 0, 1); -// } -// 6.31% { -// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 184.858, 0, 1); -// } -// 12.51% { -// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 113.68, 0, 1); -// } -// 18.82% { -// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 68.663, 0, 1); -// } -// 25.03% { -// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 41.37, 0, 1); -// } -// 37.54% { -// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 14.382, 0, 1); -// } -// 50.05% { -// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 4.724, 0, 1); -// } -// 75.08% { -// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0.381, 0, 1); -// } -// 100% { -// transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); -// } -// } - -// //wheather -// .card-wheather { -// height: 220px; -// color: #fff; -// } - - - -// .city { - -// font-size: 26px; -// } - -// .date { -// font-size: 20px; -// line-height: 40px; -// } - -// .sun { -// height: 70px; -// } - -// .grad-blue { -// background: linear-gradient(58deg, #f44336, #673ab7); -// color: #fff; -// } - -// .grad-green { -// background: linear-gradient(58deg, #009688, #673ab7); -// color: #fff; -// } - -// .grad-red { -// background: linear-gradient(58deg, #f44336, #673ab7); -// color: #fff; -// } -// .card-wheather{ -// padding: 2rem; -// } -// .temp { -// font-size: 50px; -// display: inline-block; -// } + mat-card-content{ min-height: 400px; } .chart{ - - padding: 0.8rem; + padding: 0.8rem; } \ No newline at end of file diff --git a/ng6-seed/src/app/dashboard/dashboard.component.ts b/ng6-seed/src/app/dashboard/dashboard.component.ts index 5d0e576f0..c773c9964 100644 --- a/ng6-seed/src/app/dashboard/dashboard.component.ts +++ b/ng6-seed/src/app/dashboard/dashboard.component.ts @@ -1,16 +1,11 @@ //import { Component } from '@angular/core'; import {Component, NgModule, ElementRef, Inject, Injectable, ViewChild} from '@angular/core' import { FormBuilder, FormGroup, Validators , ValidatorFn, AbstractControl, FormControl} from '@angular/forms' -import { HttpClient } from '@angular/common/http'; -import {BrowserModule} from '@angular/platform-browser' import {ChartsModule, Color} from 'ng2-charts'; -import {Observable} from 'rxjs'; -import {map, startWith, debounceTime, distinctUntilChanged, switchMap} from 'rxjs/operators'; import { MastersService } from '../settings/service/masters/masters.service'; import { DashboardService } from './dashboard.service'; import { NgxDrpOptions, PresetItem, Range } from 'ngx-mat-daterange-picker'; import { BaseChartDirective } from 'ng2-charts/ng2-charts'; -//import { DatePipe } from '@angular/common'; @Component({ selector: 'app-dashboard', @@ -32,10 +27,12 @@ export class DashboardComponent { dashboardTitle = 'PD Status'; /** Declaration Part Of Doughnut Chart */ - @ViewChild('mycanvas') canvas:ElementRef; + //@ViewChild('BaseChartDirective') canvas ; + @ViewChild(BaseChartDirective) FullCanvas: BaseChartDirective; + @ViewChild(BaseChartDirective) TeleCanvas: BaseChartDirective; + @ViewChild(BaseChartDirective) SmartCanvas: BaseChartDirective; //myChart: BaseChartDirective; - doughnutChartType = 'doughnut'; doughnutChartLabels: string[] = ['Draft','Triggered','Allocated','Scheduled','InProgress','Completed','QC Completed']; @@ -50,9 +47,6 @@ export class DashboardComponent { total1: number = 0; total2: number = 0; total3: number = 0; - total4: number = 0; - total5: number = 0; - total6: number = 0; flag : number = 0; // doughnutChartColors: any[] = [{ @@ -72,14 +66,8 @@ export class DashboardComponent { } }; - /** Declaration Part Of SubCard Section */ - - cityWisePD : any=[]; - lenderWisePD :any=[]; - alertMessage : any=[]; + /** Declaration Part Of Title Section */ - selectedCity : any=[]; - selectedLender : any=[]; /** Declaration Part Of Title Form Section */ myControl = new FormControl(); @@ -89,6 +77,8 @@ export class DashboardComponent { lenderData : any[]; cityData : any[]; + selectedCity : any=[]; + selectedLender : any=[]; constructor(private _dashboardService: DashboardService, private _masterService: MastersService) { @@ -117,9 +107,9 @@ export class DashboardComponent { ngOnInit(){ - - this.getDoughnutChartData(); - + this.getDoughnutChartData(); + + const today = new Date(); const fromMin = new Date(today.getFullYear(), today.getMonth()-2, 1); const fromMax = new Date(today.getFullYear(), today.getMonth()+1, 0); @@ -129,12 +119,12 @@ export class DashboardComponent { const LastDateForPreMonth = new Date(today.getFullYear(), today.getMonth(), 0); const FirstDateForPreMonth = new Date(today.getFullYear(), today.getMonth()-1, 1); - console.log('FromDateMin:',fromMin); - console.log('FromDateMax:',fromMax); - console.log('ToDateMin',toMin); - console.log('ToDateMax',toMax); - console.log('LastDateForPreMonth',LastDateForPreMonth); - console.log('FirstDateForPreMonth',FirstDateForPreMonth); + // console.log('FromDateMin:',fromMin); + // console.log('FromDateMax:',fromMax); + // console.log('ToDateMin',toMin); + // console.log('ToDateMax',toMax); + // console.log('LastDateForPreMonth',LastDateForPreMonth); + // console.log('FirstDateForPreMonth',FirstDateForPreMonth); // const resetRange = {fromDate: today, toDate: today}; // this.dateRangePicker.resetDates(resetRange); // will trigger selectedDateRangeChanged @@ -144,7 +134,7 @@ export class DashboardComponent { this.options = { presets: this.presets, format: 'mediumDate', - range: {fromDate:toMin, toDate: fromMax}, + range: {fromDate:FirstDateForPreMonth, toDate: fromMax}, applyLabel: "Submit", calendarOverlayConfig: { shouldCloseOnBackdropClick: false, @@ -159,7 +149,6 @@ export class DashboardComponent { } updateRange(range: Range){ - this.range = range; this.onChange(this.range,1); } @@ -202,10 +191,7 @@ getDoughnutChartData(){ this._dashboardService.getPDDetailForDoughnut(fromdate,todate,cityarr,lenderarr).subscribe(data => { this.flag = 1; - console.log(' ***** Doughnut Chart Data *****'); - console.log('Whole Data',data); - console.log('Monthly Status',data.records.current_month); - + console.log(' ***** Doughnut Chart Data *****',data); let DraftIndexvalue = this.doughnutChartLabels.indexOf('Draft'); let TriggedIndexvalue = this.doughnutChartLabels.indexOf('Triggered'); @@ -227,9 +213,8 @@ getDoughnutChartData(){ if(DraftFullPDvalue.length != '0'){ //console.log('console triggered value',TriggerFullPDvalue); for(let FPD of DraftFullPDvalue){ - let y = +FPD.count; - this.total1 = this.total1+y; - this.tempDataFullPD[DraftIndexvalue] = y; + + this.tempDataFullPD[DraftIndexvalue] = +FPD.count; } } else{ @@ -238,11 +223,10 @@ getDoughnutChartData(){ let TriggerFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'TRIGGERED'); if(TriggerFullPDvalue.length != '0'){ - //console.log('console triggered value',TriggerFullPDvalue); + for(let FPD of TriggerFullPDvalue){ - let y = +FPD.count; - this.total1 = this.total1+y; - this.tempDataFullPD[TriggedIndexvalue] = y; + + this.tempDataFullPD[TriggedIndexvalue] = +FPD.count; } } else{ @@ -252,9 +236,8 @@ getDoughnutChartData(){ let AllocatedFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'ALLOCATED'); if(AllocatedFullPDvalue.length != '0'){ for(let FPD of AllocatedFullPDvalue){ - let y = +FPD.count; - this.total1 = this.total1+y; - this.tempDataFullPD[AllocatedIndexvalue] = y; + + this.tempDataFullPD[AllocatedIndexvalue] = +FPD.count; } } else{ @@ -264,11 +247,10 @@ getDoughnutChartData(){ let ScheduledFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'SCHEDULED'); if(ScheduledFullPDvalue.length != '0'){ for(let FPD of ScheduledFullPDvalue){ - let y = +FPD.count; - this.total1 = this.total1+y; - this.tempDataFullPD[ScheduledIndexvalue] = y; + + this.tempDataFullPD[ScheduledIndexvalue] = +FPD.count; } - //let y = +ScheduledFullPDvalue.count; + } else{ @@ -278,9 +260,8 @@ getDoughnutChartData(){ let InProgressFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'INPROGRESS'); if(InProgressFullPDvalue.length != '0'){ for(let FPD of InProgressFullPDvalue){ - let y = +FPD.count; - this.total1 = this.total1+y; - this.tempDataFullPD[InProgressIndexvalue] = y; + + this.tempDataFullPD[InProgressIndexvalue] = +FPD.count; } //let y = +InProgressFullPDvalue.count; @@ -292,9 +273,8 @@ getDoughnutChartData(){ let CompletedFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'COMPLETED'); if(CompletedFullPDvalue.length != '0'){ for(let FPD of CompletedFullPDvalue){ - let y = +FPD.count; - this.total1 = this.total1+y; - this.tempDataFullPD[CompletedIndexvalue] = y; + + this.tempDataFullPD[CompletedIndexvalue] = +FPD.count; } //let y = +CompletedFullPDvalue.count; @@ -306,9 +286,8 @@ getDoughnutChartData(){ let QCCompletedFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == "QC_COMPLETED"); if(QCCompletedFullPDvalue.length != '0'){ for(let FPD of QCCompletedFullPDvalue){ - let y = +FPD.count; - this.total1 = this.total1+y; - this.tempDataFullPD[QCCompletedIndexvalue] = y; + + this.tempDataFullPD[QCCompletedIndexvalue] = +FPD.count; } //let y = +QCCompletedFullPDvalue.count; @@ -321,9 +300,8 @@ getDoughnutChartData(){ if(DraftSmartPDvalue.length != '0'){ //console.log('console triggered value',TriggerFullPDvalue); for(let FPD of DraftSmartPDvalue){ - let y = +FPD.count; - this.total2 = this.total2+y; - this.tempDataSmartPD[DraftIndexvalue] = y; + + this.tempDataSmartPD[DraftIndexvalue] = +FPD.count; } } else{ @@ -334,9 +312,7 @@ getDoughnutChartData(){ if(TriggerSmartPDvalue.length != '0'){ for(let FPD of TriggerSmartPDvalue){ - let y = +FPD.count; - this.total2 = this.total2+y; - this.tempDataSmartPD[TriggedIndexvalue] = y; + this.tempDataSmartPD[TriggedIndexvalue] = +FPD.count; } } else{ @@ -346,9 +322,8 @@ getDoughnutChartData(){ let AllocatedSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'ALLOCATED'); if(AllocatedSmartPDvalue.length != '0'){ for(let FPD of AllocatedSmartPDvalue){ - let y = +FPD.count; - this.total2 = this.total2+y; - this.tempDataSmartPD[AllocatedIndexvalue] = y; + + this.tempDataSmartPD[AllocatedIndexvalue] = +FPD.count; } } else{ @@ -358,9 +333,8 @@ getDoughnutChartData(){ let ScheduledSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'SCHEDULED'); if(ScheduledSmartPDvalue.length != '0'){ for(let FPD of ScheduledSmartPDvalue){ - let y = +FPD.count; - this.total2 = this.total2+y; - this.tempDataSmartPD[ScheduledIndexvalue] = y; + + this.tempDataSmartPD[ScheduledIndexvalue] = +FPD.count; } //let y = +ScheduledFullPDvalue.count; @@ -372,9 +346,8 @@ getDoughnutChartData(){ let InProgressSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'INPROGRESS'); if(InProgressSmartPDvalue.length != '0'){ for(let FPD of InProgressSmartPDvalue){ - let y = +FPD.count; - this.total2 = this.total2+y; - this.tempDataSmartPD[InProgressIndexvalue] = y; + + this.tempDataSmartPD[InProgressIndexvalue] = +FPD.count; } //let y = +InProgressFullPDvalue.count; @@ -386,9 +359,8 @@ getDoughnutChartData(){ let CompletedSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'COMPLETED'); if(CompletedSmartPDvalue.length != '0'){ for(let FPD of CompletedSmartPDvalue){ - let y = +FPD.count; - this.total2 = this.total2+y; - this.tempDataSmartPD[CompletedIndexvalue] = y; + + this.tempDataSmartPD[CompletedIndexvalue] = +FPD.count; } //let y = +CompletedFullPDvalue.count; @@ -400,9 +372,8 @@ getDoughnutChartData(){ let QCCompletedSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == "QC_COMPLETED"); if(QCCompletedSmartPDvalue.length != '0'){ for(let FPD of QCCompletedSmartPDvalue){ - let y = +FPD.count; - this.total2 = this.total2+y; - this.tempDataSmartPD[QCCompletedIndexvalue] = y; + + this.tempDataSmartPD[QCCompletedIndexvalue] = +FPD.count; } //let y = +QCCompletedFullPDvalue.count; @@ -416,9 +387,8 @@ getDoughnutChartData(){ if(DraftTelePDvalue.length != '0'){ for(let FPD of DraftTelePDvalue){ - let y = +FPD.count; - this.total1 = this.total3+y; - this.tempDataTelePD[DraftIndexvalue] = y; + + this.tempDataTelePD[DraftIndexvalue] = +FPD.count; } } else{ @@ -429,9 +399,8 @@ getDoughnutChartData(){ if(TriggerTelePDvalue.length != '0'){ //console.log('console triggered value',TriggerTelePDvalue); for(let FPD of TriggerTelePDvalue){ - let y = +FPD.count; - this.total3 = this.total3+y; - this.tempDataTelePD[TriggedIndexvalue] = y; + + this.tempDataTelePD[TriggedIndexvalue] = +FPD.count; } } else{ @@ -441,9 +410,8 @@ getDoughnutChartData(){ let AllocatedTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'ALLOCATED'); if(AllocatedTelePDvalue.length != '0'){ for(let FPD of AllocatedTelePDvalue){ - let y = +FPD.count; - this.total3 = this.total3+y; - this.tempDataTelePD[AllocatedIndexvalue] = y; + + this.tempDataTelePD[AllocatedIndexvalue] = +FPD.count; } } else{ @@ -453,9 +421,8 @@ getDoughnutChartData(){ let ScheduledTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'SCHEDULED'); if(ScheduledTelePDvalue.length != '0'){ for(let FPD of ScheduledTelePDvalue){ - let y = +FPD.count; - this.total3 = this.total3+y; - this.tempDataTelePD[ScheduledIndexvalue] = y; + + this.tempDataTelePD[ScheduledIndexvalue] = +FPD.count; } //let y = +ScheduledFullPDvalue.count; @@ -467,9 +434,8 @@ getDoughnutChartData(){ let InProgressTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'INPROGRESS'); if(InProgressTelePDvalue.length != '0'){ for(let FPD of InProgressTelePDvalue){ - let y = +FPD.count; - this.total3 = this.total3+y; - this.tempDataTelePD[InProgressIndexvalue] = y; + + this.tempDataTelePD[InProgressIndexvalue] = +FPD.count; } //let y = +InProgressFullPDvalue.count; @@ -481,9 +447,8 @@ getDoughnutChartData(){ let CompletedTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'COMPLETED'); if(CompletedTelePDvalue.length != '0'){ for(let FPD of CompletedTelePDvalue){ - let y = +FPD.count; - this.total3 = this.total3+y; - this.tempDataTelePD[CompletedIndexvalue] = y; + + this.tempDataTelePD[CompletedIndexvalue] = +FPD.count; } //let y = +CompletedFullPDvalue.count; @@ -495,9 +460,8 @@ getDoughnutChartData(){ let QCCompletedTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == "QC_COMPLETED"); if(QCCompletedTelePDvalue.length != '0'){ for(let FPD of QCCompletedTelePDvalue){ - let y = +FPD.count; - this.total3 = this.total3+y; - this.tempDataTelePD[QCCompletedIndexvalue] = y; + + this.tempDataTelePD[QCCompletedIndexvalue] = +FPD.count; } //let y = +QCCompletedFullPDvalue.count; @@ -508,23 +472,22 @@ getDoughnutChartData(){ } else{ - //console.log('Else Condition month'); + this.tempDataFullPD = [0,0,0,0,0,0,0]; + this.tempDataSmartPD = [0,0,0,0,0,0,0]; + this.tempDataTelePD = [0,0,0,0,0,0,0]; } + this.doughnutChartDataForFullPD = this.tempDataFullPD; this.doughnutChartDataForSmartPD = this.tempDataSmartPD; this.doughnutChartDataForTelePD = this.tempDataTelePD; + this.total1 = this.tempDataFullPD.reduce((a, b) => a + b, 0); + this.total2 = this.tempDataSmartPD.reduce((a, b) => a + b, 0); + this.total3 = this.tempDataTelePD.reduce((a, b) => a + b, 0); - console.log('Final full Data Completed',this.doughnutChartDataForFullPD); - console.log('temp full Data',this.tempDataFullPD); - console.log('Final Smart Data Completed',this.doughnutChartDataForSmartPD); - console.log('temp Smart Data',this.tempDataSmartPD); - console.log('Final Tele Data Completed',this.doughnutChartDataForTelePD); - console.log('temp Tele Data',this.tempDataTelePD); - console.log('total3',this.total3); - console.log('total2',this.total2); - console.log('total1',this.total1); - - + console.log('Final Full Data '+ this.doughnutChartDataForFullPD+'Temp Data'+this.tempDataFullPD+'Full Total '+this.total1); + console.log('Final Smart Data '+ this.doughnutChartDataForSmartPD+' Temp Data '+this.tempDataSmartPD+'Smart Total '+this.total2); + console.log('Final Tele Data '+ this.doughnutChartDataForTelePD+' Temp Data'+this.tempDataTelePD+'Tele Total '+this.total3); + }) } @@ -538,10 +501,17 @@ doughnutOptions: any = Object.assign({ centertext:'One' },this.globalChartOptions); +// ngOnChanges(){ +// // this.barChartData=this.chartData; +// this.barChartLabel=this.chartLabel; +// } + + onChange(e :any,flag: any) { + let fromdate; let todate; - console.log('flag',flag); + if(flag == 1){ fromdate = new Date(e.fromDate); @@ -553,7 +523,7 @@ onChange(e :any,flag: any) { let data = e.source.value.city_id; e.source._selected == true ? this.selectedCity.push(data) : this.selectedCity.splice(this.selectedCity.indexOf(data),1); - console.log(this.selectedCity); + } if(flag == 3){ @@ -561,24 +531,29 @@ onChange(e :any,flag: any) { e.source._selected == true ? this.selectedLender.push(data) : this.selectedLender.splice(this.selectedLender.indexOf(data),1); - console.log(this.selectedLender); + } - - this._dashboardService.getPDDetailForDoughnut(fromdate,todate,this.selectedLender,this.selectedCity).subscribe(data => { - console.log(' *****Updated Date Doughnut Chart Data *****'); - console.log('Whole Data',data); + + this._dashboardService.getPDDetailForDoughnut(fromdate,todate,this.selectedCity,this.selectedLender).subscribe(data => { + + console.log(' *****Updated Date Doughnut Chart Data *****',data); + if(data.records.current_month.length != 0){ this.total1 = 0; this.total2 = 0; this.total3 = 0; } + this.doughnutChartDataForFullPD = []; this.doughnutChartDataForSmartPD = []; this.doughnutChartDataForTelePD = []; + this.tempDataFullPD = []; + this.tempDataSmartPD =[]; + this.tempDataTelePD = []; let DraftIndexvalue = this.doughnutChartLabels.indexOf('Draft'); @@ -614,9 +589,8 @@ onChange(e :any,flag: any) { if(TriggerFullPDvalue.length != '0'){ for(let FPD of TriggerFullPDvalue){ - let y = +FPD.count; - this.total1 = this.total1+y; - this.tempDataFullPD[TriggedIndexvalue] = y; + + this.tempDataFullPD[TriggedIndexvalue] = +FPD.count; } } else{ @@ -626,9 +600,8 @@ onChange(e :any,flag: any) { let AllocatedFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'ALLOCATED'); if(AllocatedFullPDvalue.length != '0'){ for(let FPD of AllocatedFullPDvalue){ - let y = +FPD.count; - this.total1 = this.total1+y; - this.tempDataFullPD[AllocatedIndexvalue] = y; + + this.tempDataFullPD[AllocatedIndexvalue] = +FPD.count; } } else{ @@ -638,9 +611,8 @@ onChange(e :any,flag: any) { let ScheduledFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'SCHEDULED'); if(ScheduledFullPDvalue.length != '0'){ for(let FPD of ScheduledFullPDvalue){ - let y = +FPD.count; - this.total1 = this.total1+y; - this.tempDataFullPD[ScheduledIndexvalue] = y; + + this.tempDataFullPD[ScheduledIndexvalue] = +FPD.count; } //let y = +ScheduledFullPDvalue.count; @@ -652,9 +624,8 @@ onChange(e :any,flag: any) { let InProgressFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'INPROGRESS'); if(InProgressFullPDvalue.length != '0'){ for(let FPD of InProgressFullPDvalue){ - let y = +FPD.count; - this.total1 = this.total1+y; - this.tempDataFullPD[InProgressIndexvalue] = y; + + this.tempDataFullPD[InProgressIndexvalue] = +FPD.count; } //let y = +InProgressFullPDvalue.count; @@ -666,9 +637,8 @@ onChange(e :any,flag: any) { let CompletedFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == 'COMPLETED'); if(CompletedFullPDvalue.length != '0'){ for(let FPD of CompletedFullPDvalue){ - let y = +FPD.count; - this.total1 = this.total1+y; - this.tempDataFullPD[CompletedIndexvalue] = y; + + this.tempDataFullPD[CompletedIndexvalue] = +FPD.count; } //let y = +CompletedFullPDvalue.count; @@ -680,9 +650,8 @@ onChange(e :any,flag: any) { let QCCompletedFullPDvalue = MonthlyFullPDArr.filter(arr=>arr.pd_status == "QC_COMPLETED"); if(QCCompletedFullPDvalue.length != '0'){ for(let FPD of QCCompletedFullPDvalue){ - let y = +FPD.count; - this.total1 = this.total1+y; - this.tempDataFullPD[QCCompletedIndexvalue] = y; + + this.tempDataFullPD[QCCompletedIndexvalue] = +FPD.count; } //let y = +QCCompletedFullPDvalue.count; @@ -695,9 +664,8 @@ onChange(e :any,flag: any) { if(DraftSmartPDvalue.length != '0'){ //console.log('console triggered value',TriggerFullPDvalue); for(let FPD of DraftSmartPDvalue){ - let y = +FPD.count; - this.total2 = this.total2+y; - this.tempDataSmartPD[DraftIndexvalue] = y; + + this.tempDataSmartPD[DraftIndexvalue] = +FPD.count; } } else{ @@ -708,9 +676,8 @@ onChange(e :any,flag: any) { if(TriggerSmartPDvalue.length != '0'){ for(let FPD of TriggerSmartPDvalue){ - let y = +FPD.count; - this.total2 = this.total2+y; - this.tempDataSmartPD[TriggedIndexvalue] = y; + + this.tempDataSmartPD[TriggedIndexvalue] = +FPD.count; } } else{ @@ -720,9 +687,8 @@ onChange(e :any,flag: any) { let AllocatedSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'ALLOCATED'); if(AllocatedSmartPDvalue.length != '0'){ for(let FPD of AllocatedSmartPDvalue){ - let y = +FPD.count; - this.total2 = this.total2+y; - this.tempDataSmartPD[AllocatedIndexvalue] = y; + + this.tempDataSmartPD[AllocatedIndexvalue] = +FPD.count; } } else{ @@ -732,9 +698,8 @@ onChange(e :any,flag: any) { let ScheduledSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'SCHEDULED'); if(ScheduledSmartPDvalue.length != '0'){ for(let FPD of ScheduledSmartPDvalue){ - let y = +FPD.count; - this.total2 = this.total2+y; - this.tempDataSmartPD[ScheduledIndexvalue] = y; + + this.tempDataSmartPD[ScheduledIndexvalue] = +FPD.count; } //let y = +ScheduledFullPDvalue.count; @@ -746,9 +711,8 @@ onChange(e :any,flag: any) { let InProgressSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'INPROGRESS'); if(InProgressSmartPDvalue.length != '0'){ for(let FPD of InProgressSmartPDvalue){ - let y = +FPD.count; - this.total2 = this.total2+y; - this.tempDataSmartPD[InProgressIndexvalue] = y; + + this.tempDataSmartPD[InProgressIndexvalue] = +FPD.count; } //let y = +InProgressFullPDvalue.count; @@ -760,9 +724,8 @@ onChange(e :any,flag: any) { let CompletedSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == 'COMPLETED'); if(CompletedSmartPDvalue.length != '0'){ for(let FPD of CompletedSmartPDvalue){ - let y = +FPD.count; - this.total2 = this.total2+y; - this.tempDataSmartPD[CompletedIndexvalue] = y; + + this.tempDataSmartPD[CompletedIndexvalue] = +FPD.count; } //let y = +CompletedFullPDvalue.count; @@ -774,9 +737,8 @@ onChange(e :any,flag: any) { let QCCompletedSmartPDvalue = MonthlySmartPDArr.filter(arr=>arr.pd_status == "QC_COMPLETED"); if(QCCompletedSmartPDvalue.length != '0'){ for(let FPD of QCCompletedSmartPDvalue){ - let y = +FPD.count; - this.total2 = this.total2+y; - this.tempDataSmartPD[QCCompletedIndexvalue] = y; + + this.tempDataSmartPD[QCCompletedIndexvalue] = +FPD.count; } //let y = +QCCompletedFullPDvalue.count; @@ -790,9 +752,8 @@ onChange(e :any,flag: any) { if(DraftTelePDvalue.length != '0'){ for(let FPD of DraftTelePDvalue){ - let y = +FPD.count; - this.total1 = this.total3+y; - this.tempDataTelePD[DraftIndexvalue] = y; + + this.tempDataTelePD[DraftIndexvalue] = +FPD.count; } } else{ @@ -803,9 +764,8 @@ onChange(e :any,flag: any) { if(TriggerTelePDvalue.length != '0'){ //console.log('console triggered value',TriggerTelePDvalue); for(let FPD of TriggerTelePDvalue){ - let y = +FPD.count; - this.total3 = this.total3+y; - this.tempDataTelePD[TriggedIndexvalue] = y; + + this.tempDataTelePD[TriggedIndexvalue] = +FPD.count; } } else{ @@ -815,9 +775,8 @@ onChange(e :any,flag: any) { let AllocatedTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'ALLOCATED'); if(AllocatedTelePDvalue.length != '0'){ for(let FPD of AllocatedTelePDvalue){ - let y = +FPD.count; - this.total3 = this.total3+y; - this.tempDataTelePD[AllocatedIndexvalue] = y; + + this.tempDataTelePD[AllocatedIndexvalue] = +FPD.count; } } else{ @@ -827,9 +786,8 @@ onChange(e :any,flag: any) { let ScheduledTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'SCHEDULED'); if(ScheduledTelePDvalue.length != '0'){ for(let FPD of ScheduledTelePDvalue){ - let y = +FPD.count; - this.total3 = this.total3+y; - this.tempDataTelePD[ScheduledIndexvalue] = y; + + this.tempDataTelePD[ScheduledIndexvalue] = +FPD.count; } //let y = +ScheduledFullPDvalue.count; @@ -841,9 +799,8 @@ onChange(e :any,flag: any) { let InProgressTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'INPROGRESS'); if(InProgressTelePDvalue.length != '0'){ for(let FPD of InProgressTelePDvalue){ - let y = +FPD.count; - this.total3 = this.total3+y; - this.tempDataTelePD[InProgressIndexvalue] = y; + + this.tempDataTelePD[InProgressIndexvalue] = +FPD.count; } //let y = +InProgressFullPDvalue.count; @@ -855,9 +812,8 @@ onChange(e :any,flag: any) { let CompletedTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == 'COMPLETED'); if(CompletedTelePDvalue.length != '0'){ for(let FPD of CompletedTelePDvalue){ - let y = +FPD.count; - this.total3 = this.total3+y; - this.tempDataTelePD[CompletedIndexvalue] = y; + + this.tempDataTelePD[CompletedIndexvalue] = +FPD.count; } //let y = +CompletedFullPDvalue.count; @@ -869,9 +825,8 @@ onChange(e :any,flag: any) { let QCCompletedTelePDvalue = MonthlyTelePDArr.filter(arr=>arr.pd_status == "QC_COMPLETED"); if(QCCompletedTelePDvalue.length != '0'){ for(let FPD of QCCompletedTelePDvalue){ - let y = +FPD.count; - this.total3 = this.total3+y; - this.tempDataTelePD[QCCompletedIndexvalue] = y; + + this.tempDataTelePD[QCCompletedIndexvalue] = +FPD.count; } //let y = +QCCompletedFullPDvalue.count; @@ -882,24 +837,28 @@ onChange(e :any,flag: any) { } else{ - //console.log('Else Condition month'); + this.tempDataFullPD = [0,0,0,0,0,0,0]; + this.tempDataSmartPD = [0,0,0,0,0,0,0]; + this.tempDataTelePD = [0,0,0,0,0,0,0]; } - this.doughnutChartDataForFullPD = this.tempDataFullPD; + + this.doughnutChartDataForFullPD= this.tempDataFullPD; this.doughnutChartDataForSmartPD = this.tempDataSmartPD; this.doughnutChartDataForTelePD = this.tempDataTelePD; + this.doughnutChartLabels = this.doughnutChartLabels; + this.total1 = this.tempDataFullPD.reduce((a, b) => a + b, 0); + this.total2 = this.tempDataSmartPD.reduce((a, b) => a + b, 0); + this.total3 = this.tempDataTelePD.reduce((a, b) => a + b, 0); + + this.FullCanvas.chart.update(); + this.SmartCanvas.chart.update(); + this.TeleCanvas.chart.update(); + + console.log('Final Full Data '+ this.doughnutChartDataForFullPD+'Temp Data'+this.tempDataFullPD+'Full Total '+this.total1); + console.log('Final Smart Data '+ this.doughnutChartDataForSmartPD+' Temp Data '+this.tempDataSmartPD+'Smart Total '+this.total2); + console.log('Final Tele Data '+ this.doughnutChartDataForTelePD+' Temp Data'+this.tempDataTelePD+'Tele Total '+this.total3); - console.log('Final full Data Completed',this.doughnutChartDataForFullPD); - console.log('temp full Data',this.tempDataFullPD); - console.log('Final Smart Data Completed',this.doughnutChartDataForSmartPD); - console.log('temp Smart Data',this.tempDataSmartPD); - console.log('Final Tele Data Completed',this.doughnutChartDataForTelePD); - console.log('temp Tele Data',this.tempDataTelePD); - console.log('total3',this.total3); - console.log('total2',this.total2); - console.log('total1',this.total1); - - - }) + }) } } \ No newline at end of file diff --git a/ng6-seed/src/app/dashboard/dashboard.service.ts b/ng6-seed/src/app/dashboard/dashboard.service.ts index f9c663f5c..282adb26d 100644 --- a/ng6-seed/src/app/dashboard/dashboard.service.ts +++ b/ng6-seed/src/app/dashboard/dashboard.service.ts @@ -21,7 +21,6 @@ const currentdate = new Date().toJSON().slice(0,19).replace('T',' '); export class DashboardService { private apiUrl = environment.apiEndpoint; - //private apiUrl = 'http://localhost/sparqapi/api/'; constructor(private _http: HttpClient, private _aws:AwsService) { } @@ -53,17 +52,13 @@ export class DashboardService { // } getPDDetailForDoughnut(fromdate,todate,cityarr,lenderarr): Observable { - console.log(')))))'); -console.log(fromdate); -console.log(todate); -console.log(cityarr); -console.log(lenderarr); -console.log('((('); + +console.log(' From : ' + fromdate + ' To : ' + todate + ' Lender Array : ' + lenderarr + ' City Array : ' + cityarr); + return this._http.post(this.apiUrl+'getDashBoardMaster', { - "fromdate":fromdate, - "todate": todate, - "cityarr":cityarr, - "lenderarr": lenderarr}) + "fromdate":fromdate != '' && fromdate != null && fromdate != undefined ? fromdate : '', + "todate": todate != '' && todate != null && todate != undefined ? todate : '', + "cityarr":cityarr,"lenderarr": lenderarr}) .pipe(catchError(this.handleError('role', [])) ) diff --git a/ng6-seed/src/app/layouts/admin/admin-layout.component.html b/ng6-seed/src/app/layouts/admin/admin-layout.component.html index 93218012f..3b54dc446 100644 --- a/ng6-seed/src/app/layouts/admin/admin-layout.component.html +++ b/ng6-seed/src/app/layouts/admin/admin-layout.component.html @@ -312,7 +312,7 @@
- +
Not Yet Scheduled
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html index 58a8e09a6..a2701b740 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.html @@ -87,7 +87,7 @@ - + Enter valid amount. @@ -126,9 +126,9 @@ - + - Enter Valid Pincode. + Enter Valid Pincode. @@ -158,19 +158,25 @@
Main Applicant
- - Name is Required. - - - - Enter Valid Mobile Number. - - + +
+ + + Enter Valid Mobile Number. + + + + + Enter Valid Phone Number. + +
+ + @@ -190,24 +196,31 @@
{{coDetails.controls.label.value}} {{i+1}}
- + - - - Enter Valid Mobile Number. - - - - - + +
+ + + Enter Valid Mobile Number. + + + + + Enter Valid Phone Number. + +
+ + + {{rel.name}} - - + +
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 4badcdf6d..e858b0690 100644 --- 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 @@ -77,14 +77,15 @@ export class AddPdComponent implements OnInit, OnDestroy { fk_customer_segment: [null], loan_amount: [null,Validators.compose([Validators.pattern('^[0-9]*$')])], applicant_name: [null], - mobile_no: [null,Validators.compose([Validators.minLength(10),Validators.maxLength(12),Validators.pattern('^[0-9]*$')])], + mobile_no: [null,Validators.compose([Validators.minLength(10),Validators.maxLength(10),Validators.required])], + landline : [null,Validators.compose([Validators.minLength(12),Validators.maxLength(13)])], email: [null],   addressline1: [null], addressline2: [null], addressline3: [null], fk_city: [null], fk_state: [null], -  pincode : [null,Validators.compose([Validators.minLength(6),Validators.maxLength(6),Validators.pattern('^[0-9]*$')])], +  pincode : [null,Validators.compose([Validators.minLength(6),Validators.maxLength(6)])], remarks:[null],   // allocation_type: [null],   // sub_allocation_type: [null], @@ -206,7 +207,8 @@ export class AddPdComponent implements OnInit, OnDestroy { return this._fb.group({ label: ['Co Applicant'], coapplicantName: [null, Validators.compose([Validators.required])], - coapplicant_mobile_no: [null, Validators.compose([Validators.minLength(10),Validators.maxLength(12),Validators.pattern('^[0-9]*$')])], + coapplicant_mobile_no: [null,Validators.compose([Validators.minLength(10),Validators.maxLength(10),Validators.required])], + coapplicant_landline : [null,Validators.compose([Validators.minLength(12),Validators.maxLength(13)])], relationship: [null], }); }; @@ -315,6 +317,7 @@ export class AddPdComponent implements OnInit, OnDestroy { "applicant_name":formValue.applicant_name, "email":formValue.email, "mobile_no":formValue.mobile_no, + "landline":formValue.landline, "applicant_type":1, "relation":"", }]; @@ -324,6 +327,7 @@ export class AddPdComponent implements OnInit, OnDestroy { "relation":itemElement.relationship, "email":"", "mobile_no":itemElement.coapplicant_mobile_no, + "landline":itemElement.coapplicant_landline, "applicant_type":0, } pd_applicant_details.push(obj1) @@ -410,4 +414,13 @@ export class AddPdComponent implements OnInit, OnDestroy { onReset() { this.loadFormData(); } + /** On Key Press Event For Mobile Number */ + keyPress(event: any) { + const pattern = /[0-9/ /./-]/; + + let inputChar = String.fromCharCode(event.charCode); + if (event.keyCode != 8 && !pattern.test(inputChar)) { + event.preventDefault(); + } + } } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.html index 3ae92fc5a..4980cad00 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.html @@ -3,6 +3,7 @@
+
@@ -22,13 +23,18 @@ - - +
+ + Mobile number is required. - Enter Valid Mobile Number. - - - + Enter Valid Mobile Number. + + + + Enter Valid Phone Number. + +
+
@@ -45,11 +51,18 @@ Name is Required. - - - Enter Valid Mobile Number. - - + +
+ + + Enter Valid Mobile Number. + + + + Enter Valid Phone Number. + +
+ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.ts index ba5b70d88..e1b521fd5 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.ts @@ -42,7 +42,8 @@ export class EditPdApplicantComponent implements OnInit { this._EditApplicantForm = this._fb.group({ fk_applicant_primary_id: [null], applicant_name: [null, Validators.compose([Validators.required])], - mobile_no: [null, Validators.compose([Validators.required,Validators.minLength(10),Validators.maxLength(12),Validators.pattern('^[0-9]*$')])], + mobile_no: [null, Validators.compose([Validators.required,Validators.minLength(10),Validators.maxLength(12)])], + landline: [null, Validators.compose([Validators.required,Validators.minLength(12),Validators.maxLength(13)])], email: [null, Validators.compose([Validators.required, CustomValidators.email])], applicant_type: [1], coApplicantItems: this._fb.array([]), @@ -54,7 +55,8 @@ export class EditPdApplicantComponent implements OnInit { this._EditApplicantForm = this._fb.group({ fk_applicant_primary_id: [this.mainApplicantData[0].pd_co_applicant_id], applicant_name: [this.mainApplicantData[0].applicant_name, Validators.compose([Validators.required])], - mobile_no: [this.mainApplicantData[0].mobile_no, Validators.compose([Validators.required,Validators.minLength(10),Validators.maxLength(12),Validators.pattern('^[0-9]*$')])], + mobile_no: [this.mainApplicantData[0].mobile_no, Validators.compose([Validators.required,Validators.minLength(10),Validators.maxLength(12)])], + landline: [this.mainApplicantData[0].landline, Validators.compose([Validators.required,Validators.minLength(12),Validators.maxLength(13)])], email: [this.mainApplicantData[0].email, Validators.compose([Validators.required, CustomValidators.email])], applicant_type: [this.mainApplicantData[0].applicant_type, Validators.compose([Validators.required])], coApplicantItems: this._fb.array([]), @@ -74,6 +76,7 @@ export class EditPdApplicantComponent implements OnInit { fk_applicant_primary_id: [listData.pd_co_applicant_id], coapplicantName: [listData.applicant_name, Validators.compose([Validators.required])], coapplicant_mobile_no: [listData.mobile_no,Validators.compose([Validators.minLength(10),Validators.maxLength(12),Validators.pattern('^[0-9]*$')])], + coapplicant_landline: [listData.landline,Validators.compose([Validators.minLength(12),Validators.maxLength(13)])], relationship: [listData.relation], applicant_type: [listData.applicant_type, Validators.compose([Validators.required])], }); @@ -84,6 +87,7 @@ export class EditPdApplicantComponent implements OnInit { fk_applicant_primary_id: [null], coapplicantName: [null, Validators.compose([Validators.required])], coapplicant_mobile_no: [null, Validators.compose([Validators.minLength(10),Validators.maxLength(12),Validators.pattern('^[0-9]*$')])], + coapplicant_landline: [null, Validators.compose([Validators.minLength(12),Validators.maxLength(13)])], relationship: [null], applicant_type: [0], }); @@ -108,6 +112,7 @@ export class EditPdApplicantComponent implements OnInit { "applicant_name":formValue.applicant_name, "email":formValue.email, "mobile_no":formValue.mobile_no, + "landline":formValue.landline, "applicant_type":formValue.applicant_type, "relation":formValue.relationship, "isactive":1 @@ -120,6 +125,7 @@ export class EditPdApplicantComponent implements OnInit { "relation":itemElement.relationship, "email":"", "mobile_no":itemElement.coapplicant_mobile_no, + "landline":itemElement.coapplicant_landline, "applicant_type":itemElement.applicant_type, "isactive":1 } @@ -164,4 +170,13 @@ export class EditPdApplicantComponent implements OnInit { closeEditComponent(): void { this.dialogRef.close(); } + /** On Key Press Event For Mobile Number */ + keyPress(event: any) { + const pattern = /[0-9/ /./-]/; + + let inputChar = String.fromCharCode(event.charCode); + if (event.keyCode != 8 && !pattern.test(inputChar)) { + event.preventDefault(); + } + } } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html index 294808f73..941ac1f08 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.html @@ -119,10 +119,8 @@ - - Enter Valid Pincode. - - + + Enter Valid Pincode. diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts index 2ef8f5a29..79367d614 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts @@ -199,6 +199,15 @@ export class EditPdMasterComponent implements OnInit { closeEditMasterComponent(): void { this.dialogRef.close(); } + /** On Key Press Event For Mobile Number */ + keyPress(event: any) { + const pattern = /[0-9/ /./-]/; + + let inputChar = String.fromCharCode(event.charCode); + if (event.keyCode != 8 && !pattern.test(inputChar)) { + event.preventDefault(); + } + } } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.html index 09b7d660a..d7cd16fcc 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.html @@ -13,11 +13,11 @@
-
+
- No Image
+ No Image
{{officer.first_name}}
{{officer.mobile_no}}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.html new file mode 100644 index 000000000..366f2a5f3 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.html @@ -0,0 +1,45 @@ + + +
+ +
+
+ +
+
+
+ {{pdReportRecords.billing_name}} +
+
+ {{pdReportRecords.product_name}} +
+
+ {{pdReportRecords.customer_segment_name}} +
+
+ {{pdReportRecords.pd_type_name}} +
+
+ {{pdReportRecords.pd_status}} +
+
+ {{applicants.applicant_name}} , +
+ +
+

{{data.Name}}

+
+
{{dataQA.question}}
+
{{dataQA.answer}}
+
+
+
+
+
+ +
+ + + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.spec.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.spec.ts new file mode 100644 index 000000000..6629a0598 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.spec.ts @@ -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; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ PdReportComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PdReportComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts new file mode 100644 index 000000000..94f65d910 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts @@ -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}); + } + +} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/smart-pd-allocation/smart-pd-allocation.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/smart-pd-allocation/smart-pd-allocation.component.html index 0c7f1b24d..b5711e5a9 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/smart-pd-allocation/smart-pd-allocation.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/smart-pd-allocation/smart-pd-allocation.component.html @@ -13,7 +13,7 @@
-
+
+
+ +
+
+ + + + + + +
+
@@ -142,7 +154,7 @@
Remarks - +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts index 08279586e..02dfce354 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts @@ -29,9 +29,11 @@ import {ActivatedRoute, Router} from "@angular/router"; }) export class BankingDetailsComponent implements OnInit { @Input() pdid: number; + @Input() pd_all_details:any; public bankingForm: FormGroup; step: number; private notifier: NotifierService; + public pd_cus_segment:string; m_accountType= []; constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, @@ -45,6 +47,11 @@ export class BankingDetailsComponent implements OnInit { this.step = 0; this.initBankingForm(); this.getM_AccountType(); + this.pd_cus_segment = this.pd_all_details.pdmaster_details.customer_segment_abbr.toUpperCase(); + // console.log("(0,3): " + this.pd_cus_segment.substring(0,3)); + // console.log(this.pd_all_details.pdmaster_details); + // console.log(this.pd_cus_segment); + this.pd_cus_segment = this.pd_cus_segment.substring(0,3); let params: any = {}; params.pd_id = this.pdid; params.pd_form_id = '7'; @@ -98,9 +105,14 @@ export class BankingDetailsComponent implements OnInit { account_type: ['', Validators.compose([Validators.required])], salary: ['', Validators.compose([Validators.required])], limit: ['', Validators.compose([Validators.required])], - is_main: ['', Validators.compose([Validators.required])], - vintage: ['', Validators.compose([Validators.required])], + //is_main: ['', Validators.compose([Validators.required])], + //is_main: [this.pd_cus_segment == 'SAL' ? '' : '', Validators.compose([Validators.required])], + //is_main:[''], + is_main: this.pd_cus_segment == 'SAL' ? [''] : ['', Validators.compose([Validators.required])], + vintage_year: ['', Validators.compose([Validators.required])], + vintage_month: ['', Validators.compose([Validators.required])], }); + } addBankdetails(index, event) { @@ -109,6 +121,10 @@ export class BankingDetailsComponent implements OnInit { let length = control.length; this.step = length; control.push(this.createBankarray()); + // if(this.pd_cus_segment != 'SAL') { + // this.bankingForm.controls.is_main.setValidators([Validators.required]); + // this.bankingForm.controls.is_main.updateValueAndValidity(); + // } } deleteBankdetails(index: number) { @@ -150,4 +166,13 @@ export class BankingDetailsComponent implements OnInit { } }); } + /** On Key Press Event For Numbers */ + keyPress(event: any) { + const pattern = /[0-9]/; + + let inputChar = String.fromCharCode(event.charCode); + if (event.keyCode != 8 && !pattern.test(inputChar)) { + event.preventDefault(); + } + } } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html index 2e77dd01a..4dc50790e 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html @@ -2,25 +2,25 @@

Business Details

- + - + + formControlName="industry" required> {{list.name}} + formControlName="type_of_activity" requried> {{type.name}} - + @@ -32,10 +32,10 @@ [formGroupName]="i"> - + - +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts index 732af4e74..b24341aea 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts @@ -293,4 +293,15 @@ export class BusinessInfoComponent implements OnInit { } }); } + + /** On Key Press Event For Mobile Number */ + keyPress(event: any) { + const pattern = /[0-9]/; + + let inputChar = String.fromCharCode(event.charCode); + if (event.keyCode != 8 && !pattern.test(inputChar)) { + event.preventDefault(); + } + } + } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html index 8ad3212fd..d27fe4526 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html @@ -9,34 +9,36 @@
- +
- +
- - + + + Valid Mobile Number Requried + Valid Mobile Number Requried
- + {{ pm.name }}
- +
@@ -50,7 +52,7 @@
- + {{ feq.name }} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts index 0edbad0cb..683297014 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts @@ -177,7 +177,7 @@ apiLoadFinish: boolean = false; return this._formBuilder.group({ client_name: ['', Validators.compose([Validators.required])], contact_person: ['', Validators.compose([Validators.required])], - mobile_number: ['', Validators.compose([Validators.required])], + mobile_number: ['', Validators.compose([Validators.required, Validators.minLength(10), Validators.maxLength(10)])], payment_mode: ['', Validators.compose([Validators.required])], per_of_immediate_advance_payment:[''], credit_period:[''], @@ -190,7 +190,7 @@ apiLoadFinish: boolean = false; return this._formBuilder.group({ client_name: [data.client_name, Validators.compose([Validators.required])], contact_person: [data.contact_person, Validators.compose([Validators.required])], - mobile_number: [data.mobile_number, Validators.compose([Validators.required])], + mobile_number: [data.mobile_number, Validators.compose([Validators.required, Validators.minLength(10), Validators.maxLength(10)])], payment_mode: [data.payment_mode, Validators.compose([Validators.required])], per_of_immediate_advance_payment:[data.per_of_immediate_advance_payment || ''], credit_period:[data.credit_period || ''], @@ -280,6 +280,15 @@ var result = Object.keys(supp_data).map(function(key) { onReset() { // this._addQuesFrom.reset(); } + /** On Key Press Event For Mobile Number */ + keyPress(event: any) { + const pattern = /[0-9]/; + + let inputChar = String.fromCharCode(event.charCode); + if (event.keyCode != 8 && !pattern.test(inputChar)) { + event.preventDefault(); + } + } // { // 'main_raw_materials': 'sdkjfal', diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html index ec2f92b62..d3ce744d2 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html @@ -4,7 +4,7 @@ + formControlName="existing_loan" required> Yes No @@ -18,22 +18,22 @@ [formGroupName]="i"> - + - + - + - + - + - +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.ts index 99521e2a6..78dd06331 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.ts @@ -138,4 +138,13 @@ export class CurrentLoanComponent implements OnInit { } }); } + /** On Key Press Event For Amount */ + keyPress(event: any) { + const pattern = /[0-9]/; + + let inputChar = String.fromCharCode(event.charCode); + if (event.keyCode != 8 && !pattern.test(inputChar)) { + event.preventDefault(); + } + } } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html index 6ace32f28..afb0576b1 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html @@ -2,55 +2,55 @@

Employement Information

- +

- + - +
+ formControlName="was_met" required> Yes No
- - + + - - + +
+ formControlName="confirm_salary" required> Yes No - + + formControlName="attendance_seen" required> Yes No + formControlName="sal_reg_seen" required> Yes No @@ -60,23 +60,49 @@

Salary Details

+ + + - + + formControlName="net_monthly_salary" (keypress)="keyPress($event)" required> + formControlName="bonus_incentive" (keypress)="keyPress($event)" required> + + + + {{ fd.name }} + + + + + + Fixed + Variable depending on performance + Others + + + + + - + + Yes + No + + @@ -84,7 +110,7 @@

Remarks - +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.ts index 119ac1e7a..860bad2e9 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.ts @@ -36,10 +36,13 @@ export class EmploymentInfoComponent implements OnInit { public employmentForm: FormGroup; private notifier: NotifierService; public pd_cus_segment:string; + public frequency_data:any[]; + constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, private router: Router, private _pd: PdTrigerService) { this.notifier = notifier; + //getAllMasterDatas(); } ngOnInit() { @@ -66,13 +69,25 @@ export class EmploymentInfoComponent implements OnInit { } this.employmentForm.controls['attendance_seen'].setValue(value.records.attendance_seen); this.employmentForm.controls['sal_reg_seen'].setValue(value.records.sal_reg_seen); + this.employmentForm.controls['which_date_the_salary_is_rcv'].setValue(value.records.which_date_the_salary_is_rcv); this.employmentForm.controls['gross_monthly_salary'].setValue(value.records.gross_monthly_salary); this.employmentForm.controls['net_monthly_salary'].setValue(value.records.net_monthly_salary); this.employmentForm.controls['bonus_incentive'].setValue(value.records.bonus_incentive); + this.employmentForm.controls['bonus_frequency'].setValue(value.records.bonus_frequency); + this.employmentForm.controls['bonus_type'].setValue(value.records.bonus_type); + this.employmentForm.controls['bonus_type_other'].setValue(value.records.bonus_type_other); this.employmentForm.controls['any_delays'].setValue(value.records.any_delays); this.employmentForm.controls['employment_remarks'].setValue(value.records.employment_remarks); } }) + /** For Bonus Frequency Dropdown */ + this._pd.getAllMasterDatas('FREQUENCY').subscribe( + data => { + if (data.status == 200) { + this.frequency_data = data.records; + this.frequency_data = this.frequency_data.filter(freq=>freq.isactive == 1 ); + } + }); } public initemploymentForm(): void { this.employmentForm = this.fb.group({ @@ -86,9 +101,13 @@ export class EmploymentInfoComponent implements OnInit { confirm_salary_amount: [''], attendance_seen: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])], sal_reg_seen: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])], + which_date_the_salary_is_rcv:[''], gross_monthly_salary: ['', Validators.compose([Validators.required])], net_monthly_salary: ['', Validators.compose([Validators.required])], bonus_incentive: ['', Validators.compose([Validators.required])], + bonus_frequency: [''], + bonus_type: [''], + bonus_type_other: [''], any_delays: ['', Validators.compose([Validators.required])], employment_remarks: ['', Validators.compose([Validators.required])], }); @@ -115,9 +134,13 @@ export class EmploymentInfoComponent implements OnInit { } records.attendance_seen = this.employmentForm.controls['attendance_seen'].value; records.sal_reg_seen = this.employmentForm.controls['sal_reg_seen'].value; + records.which_date_the_salary_is_rcv = this.employmentForm.controls['which_date_the_salary_is_rcv'].value; records.gross_monthly_salary = this.employmentForm.controls['gross_monthly_salary'].value; records.net_monthly_salary = this.employmentForm.controls['net_monthly_salary'].value; records.bonus_incentive = this.employmentForm.controls['bonus_incentive'].value; + records.bonus_frequency = this.employmentForm.controls['bonus_frequency'].value; + records.bonus_type = this.employmentForm.controls['bonus_type'].value; + records.bonus_type_other = this.employmentForm.controls['bonus_type_other'].value; records.any_delays = this.employmentForm.controls['any_delays'].value; records.employment_remarks = this.employmentForm.controls['employment_remarks'].value; console.log('data', records); @@ -128,5 +151,14 @@ export class EmploymentInfoComponent implements OnInit { this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); }) } + /** On Key Press Event For Numbers */ + keyPress(event: any) { + const pattern = /[0-9]/; + + let inputChar = String.fromCharCode(event.charCode); + if (event.keyCode != 8 && !pattern.test(inputChar)) { + event.preventDefault(); + } + } } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html index 526514332..5053fbe6c 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html @@ -4,7 +4,7 @@

Family Details

- + {{personMet.person_met_name}} @@ -14,7 +14,7 @@ - + @@ -111,13 +111,13 @@ + formControlName="residence" required> - + - + {{ownerShip.name}} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html index 26880e2f1..d5836c874 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html @@ -10,22 +10,22 @@ [formGroupName]="i"> - + - + - + - + - + - +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts index cc3b02487..19b660937 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts @@ -191,4 +191,14 @@ export class FinancialInfoComponent implements OnInit { } }); } + + /** On Key Press Event For Input Field */ + keyPress(event: any) { + const pattern = /[0-9\-\.\ ]/; + + let inputChar = String.fromCharCode(event.charCode); + if (event.keyCode != 8 && !pattern.test(inputChar)) { + event.preventDefault(); + } + } } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html index db7dbacfa..082d27377 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html @@ -2,10 +2,10 @@

Loan Details

- + - + {{ enduse.name }} + +
- - + +
- - + + + Valid Mobile Number Requried + Vaild Mobile Number Requried +
- + {{ pm.name }}
- - +
- - +
- + {{ feq.name }} +
-
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.ts index e359094f9..cc0166ca1 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.ts @@ -179,7 +179,7 @@ apiLoadFinish: boolean = false; return this._formBuilder.group({ supplier_name: ['', Validators.compose([Validators.required])], contact_person: ['', Validators.compose([Validators.required])], - mobile_number: ['', Validators.compose([Validators.required])], + mobile_number: ['', Validators.compose([Validators.required, Validators.minLength(10), Validators.maxLength(10)])], payment_mode: ['', Validators.compose([Validators.required])], per_of_immediate_advance_payment:[''], credit_period:[''], @@ -192,7 +192,7 @@ apiLoadFinish: boolean = false; return this._formBuilder.group({ supplier_name: [data.supplier_name, Validators.compose([Validators.required])], contact_person: [data.contact_person, Validators.compose([Validators.required])], - mobile_number: [data.mobile_number, Validators.compose([Validators.required])], + mobile_number: [data.mobile_number, Validators.compose([Validators.required, Validators.minLength(10), Validators.maxLength(10)])], payment_mode: [data.payment_mode, Validators.compose([Validators.required])], per_of_immediate_advance_payment:[data.per_of_immediate_advance_payment || ''], credit_period:[data.credit_period || ''], @@ -284,6 +284,16 @@ apiLoadFinish: boolean = false; // this._addQuesFrom.reset(); } + /** On Key Press Event For Mobile Number */ + keyPress(event: any) { + const pattern = /[0-9]/; + + let inputChar = String.fromCharCode(event.charCode); + if (event.keyCode != 8 && !pattern.test(inputChar)) { + event.preventDefault(); + } + } + // { // 'main_raw_materials': 'sdkjfal', // 'supplier_details' ; [ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html index 61a3146a5..b426f5d57 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html @@ -31,9 +31,12 @@ {{ (formButton.form_name.length>17)? (formButton.form_name | slice:0:17)+'..':(formButton.form_name) }} - - + + + + + @@ -407,7 +410,7 @@ - + @@ -433,9 +436,12 @@ - + + +
+ 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 627291c50..34c87317c 100644 --- 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 @@ -29,6 +29,7 @@ export class StartPdComponent implements OnInit, OnDestroy { answerList: any = []; ansPDList: any = []; relationDetails: any = [1]; + rentalDetail: any = { form_id: "16", form_name: "Rental Information", isAnswered: true} // errorMessage:any; // selectedCategory:any=[]; // categoryList: any=[]; @@ -294,6 +295,7 @@ pdFullDetails:any=[]; this.pdMasterList=data.records.pdmaster_details; this.categoryList=data.records.question_answers; this.categoryFormButtons = data.records.template_forms; + console.log('formButtons', this.categoryFormButtons); let filterApplicantName= data.records.pdapplicants_detials.filter(item => item.applicant_type == 1); this.mainApplicantName = filterApplicantName[0].applicant_name; this.currentPDStatus = data.records.pdmaster_details.pd_status; @@ -625,6 +627,7 @@ pdFullDetails:any=[]; OnSelectDirectForms(details: any) { this.formsCategoryEnable = true; this.selectedFormsCategory = details; + console.log('select..', this.selectedFormsCategory); } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/tele-pd-allocation/tele-pd-allocation.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/tele-pd-allocation/tele-pd-allocation.component.html index 125066e83..fc8ef5769 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/tele-pd-allocation/tele-pd-allocation.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/tele-pd-allocation/tele-pd-allocation.component.html @@ -13,11 +13,11 @@
-
+
- No Image
+ No Image
{{officer.first_name}}
{{officer.mobile_no}}
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 34b5b48c5..631982786 100644 --- 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 @@ -12,6 +12,9 @@ + + +
- -
diff --git a/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.ts b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.ts index 1c5c0a727..0207a9a5f 100644 --- a/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.ts +++ b/ng6-seed/src/app/settings/masters/component/pd-notification/pd-notification-list.component.ts @@ -79,7 +79,8 @@ export class PdNotificationListComponent implements OnInit { //To get data for listing getPdNotification() { - this._MastersService.getAllPDNotification().subscribe( + //this._MastersService.getAllPDNotification().subscribe( + this._MastersService.getAllMasterData('PDNOTIFICATION').subscribe( data => { // console.log(data); // console.log(data.status); diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.ts b/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.ts index b4e93019b..160249623 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.ts +++ b/ng6-seed/src/app/settings/pd-team/pd-team-add/pd-team-add.component.ts @@ -6,24 +6,26 @@ import { FormBuilder, import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; + /** Service */ import { MastersService } from '../../service/masters/masters.service'; import { PdTeamService } from '../../service/masters/pd-team.service'; - import { NotifierService } from 'angular-notifier'; + import { Router } from '@angular/router'; + import { empty } from 'rxjs'; -import { Router } from '@angular/router'; -import { empty } from 'rxjs'; /**sweet alert */ import Swal from 'sweetalert2'; + @Component({ selector: 'app-pd-team-add', templateUrl: './pd-team-add.component.html', styleUrls: ['./pd-team-add.component.scss'] }) + export class PdTeamAddComponent implements OnInit { public _pdTeamForm: FormGroup; -private notifier: NotifierService; + color = 'primary'; errorMessage:string; @@ -42,17 +44,16 @@ selectedProductDatas : any=[]; selectedSegmentDatas : any=[]; constructor(private _formBuilder: FormBuilder, - private _notifier: NotifierService, private _pdTeamService: PdTeamService, private _router: Router, private _masterService: MastersService) { - this.notifier = _notifier; + } ngOnInit() { - //console.log(this.notifier); + this.PdTeamFormDatas(); /** For Checking City Validation datas - checking purpose - Already exists are not */ @@ -143,15 +144,16 @@ onSubmit() { this._pdTeamService.addPdTeamDetail(this._pdTeamForm.value).subscribe( dataresult => { if(dataresult.dataStatus == true) { - this.notifier.notify('success', 'Record Saved Successfully.!'); + Swal('Record Saved Successfully.!','success'); this._router.navigate(['/setting/pdteam/pdteamlist']); + } else { - this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); - Swal('Wrong.!'); - //alert('Some Thing Wents Wrong Try Again !'); + + //Swal('Wrong.!'); + Swal('Some Thing Wents Wrong Try Again !'); //this.errorMessage = "Some Thing Wents Wrong Try Again !"; } }); @@ -225,13 +227,12 @@ onChangeEntityId($event){ } if($event.isUserInput != false){ - //console.log(this.CityValidation,lenderId); + //console.log(this.CityValidation,lenderId); this._pdTeamService.getLenderData(lenderId).subscribe( dataresult => { - if(dataresult.dataStatus == true) { this.CityValidation = dataresult.records; - console.log(this.CityValidation); + //console.log(this.CityValidation); } }, error => this.errorMessage = error); } @@ -263,7 +264,7 @@ onChangeCityDatas($event){ mycheck = 1; } } - } + } if(mycheck == 0){ this.selectedCityDatas.push(cityName.name); diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.html b/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.html index 4a7f784b1..c15dee04b 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.html +++ b/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.html @@ -1,4 +1,4 @@ -
+
diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.ts b/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.ts index ed79490e0..2a2f6067c 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.ts +++ b/ng6-seed/src/app/settings/pd-team/pd-team-edit/pd-team-edit.component.ts @@ -6,9 +6,9 @@ import { FormBuilder, /** Service */ import { MastersService } from '../../service/masters/masters.service'; import { PdTeamService } from '../../service/masters/pd-team.service'; -import { NotifierService } from 'angular-notifier'; /** Here this component is like as a partent component */ -import { PdTeamListComponent } from './../pd-team-list/pd-team-list.component'; +import { Router,ActivatedRoute } from '@angular/router'; + /**sweet alert */ import Swal from 'sweetalert2'; @Component({ @@ -22,14 +22,15 @@ export class PdTeamEditComponent implements OnInit { public _pdTeamForm: FormGroup; public submitted = false; public listView: any = true; - private notifier: NotifierService; color = 'primary'; errorMessage:string; lenderId:any; + teamID: any; + apiFinishLoad: boolean; //This "childMessage" to get the function or data from partent component - @Input() public childMessage: any; - + //@Input() public childMessage: any; + public childMessage: any[]; //This Type Of Array Declaration for select dropdown to list the datas citydatas: any[]; lenderdatas: any[]; @@ -51,27 +52,33 @@ export class PdTeamEditComponent implements OnInit { selectedCityDatas : any=[]; selectedProductDatas : any=[]; selectedSegmentDatas : any=[]; + //EditDatasforFormGroup: any; constructor(private _formBuilder: FormBuilder, - private _notifier: NotifierService, + private _router: Router,private route: ActivatedRoute, private _pdTeamService: PdTeamService, - private _PdTeamListComponent: PdTeamListComponent, private _masterService: MastersService) { - this.notifier = _notifier; + } /** Onready function */ ngOnInit() { + //console.log(atob(this.route.snapshot.params['id'])); + this.teamID = atob(this.route.snapshot.params['id']); + //console.log(this.teamID); + this._pdTeamForm = this._formBuilder.group({ + pdteam_id: ['', Validators.compose([Validators.required])], + team_name: ['', Validators.compose([Validators.required])], + fk_lender: ['', Validators.compose([Validators.required])], + fk_city: ['', Validators.compose([Validators.required])], + fk_customer_segment: ['', Validators.compose([Validators.required])], + fk_product:['', Validators.compose([Validators.required])], + }); + this.PdTeamFormDatas(); - //console.log('hai I am Child This onready function',this.childMessage); - // this._pdTeamService.getAllPDTeamWithPDTeamID(this.childMessage).subscribe( - // dataresult => { - // console.log(dataresult); - // this.EditDatasforFormGroup = dataresult.records; - // console.log(this.EditDatasforFormGroup); - // }); + /** For Checking City Validation datas - checking purpose - Already exists are not */ this._pdTeamService.getAllPdTeamCityMapping().subscribe( dataresult => { @@ -117,18 +124,30 @@ export class PdTeamEditComponent implements OnInit { this.customerSegmentdatas = this.customerSegmentdatas.filter(segment=>segment.isactive == 1 ); } }, error => this.errorMessage = error); - this.lenderId = this._pdTeamForm.value['fk_lender']; - this._pdTeamService.getLenderData(this.lenderId).subscribe( - dataresult => { - if(dataresult.dataStatus == true){ - this.CityValidation = dataresult.records; - } - }, error => this.errorMessage = error); + + // this.lenderId = this._pdTeamForm.value.fk_lender; + // console.log('form data',this._pdTeamForm); + // console.log('form data Particular Value',this._pdTeamForm.value.fk_lender); + // this._pdTeamService.getLenderData(this.lenderId).subscribe( + // dataresult => { + // if(dataresult.dataStatus == true){ + // this.CityValidation = dataresult.records; + // } + // }); } /** Pd Team Form Datas */ PdTeamFormDatas(){ + this._pdTeamService.getAllPDTeamWithPDTeamID(this.teamID).subscribe( + dataresult => { + //console.log('Response Data',dataresult); + if(dataresult.status == 200) + this.childMessage = dataresult.records; + + // console.log('Record Data',dataresult.records); + // console.log('sdafd',this.childMessage[0].team_name); + //console.log('Patricular pdteam_id Datas',this.childMessage); // let PdTeamcity:any = []; @@ -142,7 +161,7 @@ export class PdTeamEditComponent implements OnInit { let PdTeamCity:any = []; for(let ptc of this.childMessage[0].CITYMAP){ PdTeamCity.push(ptc.city_id); - } + } let PdTeamProduct:any = []; // for(let ptp of this.childMessage[0].PRODUCTS){ @@ -173,17 +192,37 @@ export class PdTeamEditComponent implements OnInit { } } }, error => this.errorMessage = error); + + this._pdTeamForm.controls['pdteam_id'].setValue(this.childMessage[0].pdteam_id); + this._pdTeamForm.controls['team_name'].setValue(this.childMessage[0].team_name); + this._pdTeamForm.controls['fk_lender'].setValue(this.childMessage[0].fk_lender_id); + this._pdTeamForm.controls['fk_city'].setValue(PdTeamCity); + this._pdTeamForm.controls['fk_customer_segment'].setValue(this.DBCustomerSegmentDatas); + this._pdTeamForm.controls['fk_product'].setValue(this.DBProductDatas); + this.apiFinishLoad = true; + + + // this.lenderId = this._pdTeamForm.get('fk_customer_segment').value; + // console.log('asf',this.lenderId); + // console.log('form data',this._pdTeamForm); + + this._pdTeamService.getLenderData(this.childMessage[0].fk_lender_id).subscribe( + dataresult => { + if(dataresult.dataStatus == true){ + this.CityValidation = dataresult.records; + } + }); - this._pdTeamForm = this._formBuilder.group({ - pdteam_id: [this.childMessage[0].pdteam_id, Validators.compose([Validators.required])], - team_name: [this.childMessage[0].team_name, Validators.compose([Validators.required])], - fk_lender: [this.childMessage[0].fk_lender_id, Validators.compose([Validators.required])], - fk_city: [PdTeamCity, Validators.compose([Validators.required])], - fk_customer_segment: [this.DBCustomerSegmentDatas, Validators.compose([Validators.required])], - fk_product:[this.DBProductDatas, Validators.compose([Validators.required])], + // this._pdTeamForm = this._formBuilder.group({ + // pdteam_id: [this.childMessage[0].pdteam_id, Validators.compose([Validators.required])], + // team_name: [this.childMessage[0].team_name, Validators.compose([Validators.required])], + // fk_lender: [this.childMessage[0].fk_lender_id, Validators.compose([Validators.required])], + // fk_city: [PdTeamCity, Validators.compose([Validators.required])], + // fk_customer_segment: [this.DBCustomerSegmentDatas, Validators.compose([Validators.required])], + // fk_product:[this.DBProductDatas, Validators.compose([Validators.required])], + // }); + }); - - } /** convenience getter for easy access to form fields */ @@ -191,9 +230,9 @@ export class PdTeamEditComponent implements OnInit { /** For Popup Close Button */ onNoClick(): void { - this._PdTeamListComponent.changeListView(); + this._router.navigate(['/setting/pdteam/pdteamlist']); } - + /** To Reset Popup Data For Add*/ // onResetForEdit(){ // this.PdTeamFormDatas(); @@ -225,9 +264,9 @@ export class PdTeamEditComponent implements OnInit { this._pdTeamService.editPdTeamchildDetails(ActiveDatas,'PDTEAMCUSTOMERSEGMENT') .subscribe(dataresult=>{ if (dataresult.dataStatus == true){ - //alert('InActive Changes Done in cs'); - let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName.name); - this.selectedSegmentDatas.splice(index,1); + // alert('InActive Changes Done in cs'); + // let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName.name); + // this.selectedSegmentDatas.splice(index,1); }else{} }); @@ -326,6 +365,7 @@ export class PdTeamEditComponent implements OnInit { else if($event.source._selected == false ){ console.log('Return False for city Selection Data'); + let index = this.selectedCityDatas.indexOf(cityName.name); this.selectedCityDatas.splice(index,1); @@ -336,16 +376,20 @@ export class PdTeamEditComponent implements OnInit { dataresult => { if (dataresult.dataStatus == true) { data = dataresult.records; + //console.log('data',data); data = data.filter(pdteamcity=>pdteamcity.fk_city_id == $event.source.value); data = data.filter(pdteamcity=>pdteamcity.fk_pdteam_id == this._pdTeamForm.value.pdteam_id)[0]; - //console.log(data.pdteam_city_id); + // console.log('cityID',data.pdteam_city_id); + // console.log('Event value',$event.source.value); + this._pdTeamService.deletePDteamCity($event.source.value).subscribe(data=>{ - if (dataresult.dataStatus == true) {//alert('Deleted'); - let index = this.selectedCityDatas.indexOf(cityName.name); - this.selectedCityDatas.splice(index,1); - //this._PdTeamListComponent.changeListView(); - } + // console.log('Response Data',data); + // if (dataresult.dataStatus == true) { + // alert('Deleted'); + // // let index = this.selectedCityDatas.indexOf(cityName.name); + // // this.selectedCityDatas.splice(index,1); + // } }); } }, error => this.errorMessage = error); @@ -378,17 +422,17 @@ export class PdTeamEditComponent implements OnInit { dataresult => { if (dataresult.dataStatus == true) { data = dataresult.records; - console.log('data',data); + //console.log('data',data); data = data.filter(pdteamproduct=>pdteamproduct.fk_product_id == $event.source.value && pdteamproduct.isactive == 1); data = data.filter(pdteamcity=>pdteamcity.fk_pdteam_id == this._pdTeamForm.value.pdteam_id)[0]; - console.log(data.pdteam_city_id); + //console.log(data.pdteam_city_id); let ActiveDatas = { 'pdteam_product_id':data.pdteam_product_id,'isactive': '0'} ; this._pdTeamService.editPdTeamchildDetails(ActiveDatas,'PDTEAMPRODUCT') .subscribe(dataresult=>{ if (dataresult.dataStatus == true){ - //alert('InActive Changes Done in product'); - let index = this.selectedProductDatas.indexOf(productName.name); - this.selectedProductDatas.splice(index,1); + // alert('InActive Changes Done in product'); + // let index = this.selectedProductDatas.indexOf(productName.name); + // this.selectedProductDatas.splice(index,1); } else{ //alert("Sorry Try Again !"); @@ -411,11 +455,13 @@ export class PdTeamEditComponent implements OnInit { dataresult=>{ if (dataresult.dataStatus == true){ Swal("Data Edited Successfully"); - // this.notifier.notify('success', 'Record Edited Successfully.!'); + + this._router.navigate(['/setting/pdteam/pdteamlist']); + } else{ Swal("SomeThing Wents Wrong Try Again !"); - // this.notifier.notify('warning', 'SomeThing Wents Wrong Try Again !'); + } }); diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html b/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html index c81881908..eeba5d56a 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html +++ b/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.html @@ -1,4 +1,4 @@ -
+
@@ -57,7 +57,7 @@ Action - + @@ -71,8 +71,7 @@
-
+ - \ No newline at end of file diff --git a/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.ts b/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.ts index bbbe37999..7cb76a8eb 100644 --- a/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.ts +++ b/ng6-seed/src/app/settings/pd-team/pd-team-list/pd-team-list.component.ts @@ -9,8 +9,7 @@ MatTableDataSource } from '@angular/material'; import { MastersService } from '../../service/masters/masters.service'; import { PdTeamService } from '../../service/masters/pd-team.service'; -import { NotifierService } from 'angular-notifier'; -import { Router } from '@angular/router'; +import { Router,ActivatedRoute } from '@angular/router'; /**sweet alert */ import Swal from 'sweetalert2'; @@ -38,47 +37,36 @@ export class PdTeamListComponent implements OnInit { userData = null; noRecordFound: boolean = false; - private notifier: NotifierService; - public listView: any = true; + public dataLength: number; public dataSource = new MatTableDataSource(); - public parentMessage: any = []; - + displayedColumns = ['serialno','team_name','lender_name','actions','isactive']; @ViewChild(MatPaginator) paginator: MatPaginator; @ViewChild(MatSort) sort: MatSort; - constructor(notifier: NotifierService, - private router: Router, + constructor( + private router: Router,private route: ActivatedRoute, private _MasterService: MastersService, private _PdTeamService: PdTeamService) { this.getPdTeam(); - this.notifier = notifier; } ngOnInit() { this.getPdTeam(); } /** To edit data */ - editPdTeam(detail){ - - this._PdTeamService.getAllPDTeamWithPDTeamID(detail).subscribe( - dataresult => { - this.parentMessage = dataresult; - this.parentMessage = this.parentMessage.records; - this.listView = false; - - }); - } -/**To Manage Team */ -managepdteam(){ - this.router.navigate(['/setting/pdteam/pdteammanage']); -} - changeListView(){ - this.getPdTeam(); - this.listView = true; + toEditPdTeam(pdteam_id){ + //this.router.navigate(['/setting/pdteam/editpdteam',pdteam_id]); + console.log(btoa(pdteam_id)); + this.router.navigate(['/setting/pdteam/editpdteam',btoa(pdteam_id)]); } + + /**To Manage Team */ + managepdteam(){ + this.router.navigate(['/setting/pdteam/pdteammanage']); + } /** To get data for listing */ getPdTeam() { diff --git a/ng6-seed/src/app/settings/pd-team/pd-team.routing.ts b/ng6-seed/src/app/settings/pd-team/pd-team.routing.ts index 6c6fa741b..3c065b3e4 100755 --- a/ng6-seed/src/app/settings/pd-team/pd-team.routing.ts +++ b/ng6-seed/src/app/settings/pd-team/pd-team.routing.ts @@ -15,7 +15,7 @@ export const PdTeamRoutes: Routes = [{ path: 'addpdteam', component: PdTeamAddComponent },{ - path:'editpdteam', + path:'editpdteam/:id', component:PdTeamEditComponent },{ path:'pdteammanage', diff --git a/ng6-seed/src/app/settings/service/masters/masters.service.ts b/ng6-seed/src/app/settings/service/masters/masters.service.ts index 67a22174f..7c2946799 100644 --- a/ng6-seed/src/app/settings/service/masters/masters.service.ts +++ b/ng6-seed/src/app/settings/service/masters/masters.service.ts @@ -29,6 +29,7 @@ export class MastersService { // private apiUrl = "http://ssa.sineedge.com/sparqapi/api/"; +private apiUrll = 'http://localhost/sparqapi/api/'; private apiUrl = environment.apiEndpoint; @@ -260,18 +261,18 @@ editPDAllocationType(Records: any,MasterName:string): Observable { } - getAllPDNotification(): Observable { + // getAllPDNotification(): Observable { - return this._http.get(this.apiUrl+'getPDNotificationsList') - .pipe( - catchError(this.handleError('role', [])) - ) - // return this._http.get(this.apiUrl+'getListOfCompany') - // .pipe( - // catchError(this.handleError('role', [])) - // ) + // return this._http.get(this.apiUrl+'getPDNotificationsList') + // .pipe( + // catchError(this.handleError('role', [])) + // ) + // // return this._http.get(this.apiUrl+'getListOfCompany') + // // .pipe( + // // catchError(this.handleError('role', [])) + // // ) - } + // } /** @@ -302,7 +303,7 @@ editPDAllocationType(Records: any,MasterName:string): Observable { item.fk_updatedby = this._aws.getlocale();//to get user id for who is update the record item.updatedon = currentdate;//to get Current date and Time for when the Record is updated - delete item.pd_status_name; // to delete the pd_status_name + //delete item.pd_status_name; // to delete the pd_status_name delete item.serialno; }); diff --git a/ng6-seed/src/app/settings/users/register/register.component.html b/ng6-seed/src/app/settings/users/register/register.component.html index 4564ad88a..d791fb434 100755 --- a/ng6-seed/src/app/settings/users/register/register.component.html +++ b/ng6-seed/src/app/settings/users/register/register.component.html @@ -55,12 +55,12 @@
- email Address Required. + Email Address Required. Invalid Email Address. - + Phone Number Required. Invalid Phone Number. diff --git a/ng6-seed/src/app/settings/users/register/register.component.ts b/ng6-seed/src/app/settings/users/register/register.component.ts index 20e3fbe8c..372df5901 100755 --- a/ng6-seed/src/app/settings/users/register/register.component.ts +++ b/ng6-seed/src/app/settings/users/register/register.component.ts @@ -430,5 +430,14 @@ this.loader = true; delete this.users.localUserId; this.router.navigate(['setting/users/userlist']); } + /** On Key Press Event For Numbers */ + keyPress(event: any) { + const pattern = /[0-9]/; + + let inputChar = String.fromCharCode(event.charCode); + if (event.keyCode != 8 && !pattern.test(inputChar)) { + event.preventDefault(); + } + } } \ No newline at end of file From c391d87ebec7f73ce3c5d0d2e0590857e8c6a1f8 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 26 Nov 2018 16:10:36 +0530 Subject: [PATCH 3/8] assessed chnages in qc --- .../manage-pd/list-pd/start-pd/start-pd.component.html | 3 +++ .../app/personal-discussion/manage-pd/manage-pd.module.ts | 6 +++--- .../personal-discussion/pd-service/pd-triger.service.ts | 7 +++++++ .../quality-check/qc-list/qc-start/qc-start.component.html | 3 +++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html index b426f5d57..d843ac592 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.component.html @@ -436,6 +436,9 @@ + + + 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 7c88cf7cc..1e1259666 100644 --- 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 @@ -60,7 +60,7 @@ import {EmploymentInfoComponent} from "./list-pd/start-pd/forms/employment-info/ import {BusinessInfoComponent} from "./list-pd/start-pd/forms/business-info/business-info.component"; import {FinancialInfoComponent} from "./list-pd/start-pd/forms/financial-info/financial-info.component"; import { LenderRepresentativeComponent } from './list-pd/start-pd/forms/lender-representative/lender-representative.component'; - +import { AssessedIncomeComponent } from './list-pd/start-pd/forms/assessed-income/assessed-income.component'; import { TelePdAllocationComponent } from './list-pd/tele-pd-allocation/tele-pd-allocation.component'; import { PdReportComponent } from './list-pd/pd-report/pd-report.component'; @@ -140,7 +140,7 @@ const pdCustomNotifierOptions: NotifierOptions = { // AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}), OwlDateTimeModule, // OwlNativeDateTimeModule, // ], - declarations: [RentalInfoComponent, 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], + declarations: [RentalInfoComponent, 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, AssessedIncomeComponent], // exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent], // providers: [PdTrigerService, GetGeometricLocationService], @@ -172,7 +172,7 @@ const pdCustomNotifierOptions: NotifierOptions = { OwlNativeDateTimeModule, ], // declarations: [ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, AssetsInfoComponent], - exports: [PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent], + exports: [PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent, AssessedIncomeComponent], providers: [PdTrigerService, GetGeometricLocationService], entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent] }) 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 8828b9706..97ab9f238 100644 --- 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 @@ -233,6 +233,13 @@ export class PdTrigerService { // catchError(this.handleError('operation', [])) // ) // } + // get assessed income form details + getAssessedIncomeFormDetails(formDetails):Observable { + return this._http.post(this.apiUrl+"getAssessedIncome",formDetails) + .pipe( + catchError(this.handleError('operation', [])) + ) + } private handleError(operation = 'operation', result?: T) { return (error: any): Observable => { diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.html index 441604b3f..585b19bad 100644 --- a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.html +++ b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.html @@ -429,6 +429,9 @@ + + + From 6c6b1e4ebf85b945f08f79d9f4872cd1ad78f42b Mon Sep 17 00:00:00 2001 From: dineshkumarkannan Date: Mon, 26 Nov 2018 16:32:28 +0530 Subject: [PATCH 4/8] pd-report details service changes : kdk --- .../pd-report/pd-report.component.html | 26 +++++++++++-------- .../list-pd/pd-report/pd-report.component.ts | 3 +-- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.html index 366f2a5f3..174555bf2 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.html @@ -9,31 +9,35 @@
- {{pdReportRecords.billing_name}} + {{pdReportRecords?.billing_name}}
- {{pdReportRecords.product_name}} + {{pdReportRecords?.product_name}}
- {{pdReportRecords.customer_segment_name}} + {{pdReportRecords?.customer_segment_name}}
- {{pdReportRecords.pd_type_name}} + {{pdReportRecords?.pd_type_name}}
- {{pdReportRecords.pd_status}} + {{pdReportRecords?.pd_status}}
- {{applicants.applicant_name}} , + + {{applicants.applicant_name}} ,
-

{{data.Name}}

-
-
{{dataQA.question}}
-
{{dataQA.answer}}
-
+ +
+

{{data.name}}

+
+
{{dataQA.question}}
+
{{dataQA.answer}}
+

+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts index 94f65d910..ffeebb0ca 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts @@ -248,8 +248,7 @@ export class PdReportComponent implements OnInit { } } - this.pdReportRecords = Records.records; - + this.pdReportRecords = data.records; // this.pdReportRecords = data.records.qu; } }, err=> { From 1e848b94b16c5deb6d47c90ddfe9e6d313cf91a5 Mon Sep 17 00:00:00 2001 From: dineshkumarkannan Date: Mon, 26 Nov 2018 17:35:53 +0530 Subject: [PATCH 5/8] pd report details changes : kdk --- .../list-pd/pd-report/pd-report.component.ts | 431 +++++++++--------- 1 file changed, 216 insertions(+), 215 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts index ffeebb0ca..2793bbc28 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts @@ -33,221 +33,6 @@ export class PdReportComponent implements OnInit { 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 = data.records; // this.pdReportRecords = data.records.qu; } @@ -263,3 +48,219 @@ export class PdReportComponent implements OnInit { } } + + + // 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": [ + // ] + // } + // } + // } From c6de6f45b16ec773777d0ec2662a21219fa92826 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 26 Nov 2018 19:15:05 +0530 Subject: [PATCH 6/8] assessts view changes --- .../assessed-income.component.html | 94 ++++++++++++------- .../assessed-income.component.scss | 10 +- .../assessed-income.component.ts | 4 +- 3 files changed, 72 insertions(+), 36 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.html index f6b85d4b4..e94b46460 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.html @@ -61,8 +61,11 @@ - Sales Calculate Items Wise + Sales Calculate Item Wise + + {{salesCaluatedItem.length}}  Items +
@@ -103,11 +106,14 @@ - Sales Calculate Items Month Wise + Sales Calculate Month Wise + + {{salesMonthWiseExpandedItems.length}}  Items + - + - - Amount - {{itemValue.sales_value}} - {{getTotalCost(eachItem.value)}} - - - - - - -
- - -
+ @@ -152,7 +134,47 @@
- + --> + + + {{expandDetails.salesItem}} + +
+ {{footer.month_message}}   {{footer.year_message}} +
+ +
+
+ + + +
+ +

{{eachItem.header}}

+ + + + + + + + + + + + + + + + +
Date{{itemValue.sales_date | date: 'dd-MM-yyyy'}} Total Amount{{itemValue.sales_value}} {{getTotalCost(eachItem.value)}}
+
+ +
+ +
+ @@ -161,6 +183,9 @@ Purchase Details + + {{purchaseDetails.length}}  Items +
@@ -203,6 +228,9 @@ Business Expenses + + {{businessExpenses.length}}  Items +
@@ -240,6 +268,9 @@ House Hold Expenses + + {{houseHoldExpenses.length}}  Items +
@@ -272,10 +303,7 @@ - - + - - diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.scss index 1ca16c276..340230c9f 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.scss @@ -1,5 +1,5 @@ .example-container { - max-height: 300px; + max-height: 500px; overflow: auto; } @@ -29,6 +29,9 @@ tr.mat-footer-row { .h4_font { font-size: 18px; } + .subtitle_message { + color:#e00201 !important; + } // table, th, td { // border: 1px solid rgba(0, 0, 0, 0.12); @@ -43,4 +46,9 @@ tr.mat-footer-row { // text-align: center; // } +.row_border { + display: flex; + border:1px solid rgba(0, 0, 0, 0.12); +} + \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.ts index e2aebdb6b..87470a02e 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.ts @@ -104,9 +104,9 @@ salesMonthWiseExpandedItems: any=[] let convertYear : number = 12 / listItems.length; let footerMessage: any=[]; footerMessage.push({ - month_message: listItems.length + ' Months ' + itemElement.sales_item + ' Sales : '+ calculateAllItemsTotal, + month_message: listItems.length + ' Month Sales : '+ calculateAllItemsTotal, month_value:calculateAllItemsTotal, - year_message: ' Yearly ' + itemElement.sales_item + ' Sales Arrived : '+ calculateAllItemsTotal * convertYear, + year_message: ' Yearly Sales Arrived : '+ calculateAllItemsTotal * convertYear, year_value: calculateAllItemsTotal * convertYear, }) // footerMessage.push({ From b36a2ca9ada69f05c05ff3a54f743d4641796b7f Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 26 Nov 2018 19:15:35 +0530 Subject: [PATCH 7/8] merge: kms --- .../pd-report/pd-report.component.html | 26 +- .../list-pd/pd-report/pd-report.component.ts | 434 +++++++++--------- 2 files changed, 232 insertions(+), 228 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.html index 366f2a5f3..174555bf2 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.html @@ -9,31 +9,35 @@
- {{pdReportRecords.billing_name}} + {{pdReportRecords?.billing_name}}
- {{pdReportRecords.product_name}} + {{pdReportRecords?.product_name}}
- {{pdReportRecords.customer_segment_name}} + {{pdReportRecords?.customer_segment_name}}
- {{pdReportRecords.pd_type_name}} + {{pdReportRecords?.pd_type_name}}
- {{pdReportRecords.pd_status}} + {{pdReportRecords?.pd_status}}
- {{applicants.applicant_name}} , + + {{applicants.applicant_name}} ,
-

{{data.Name}}

-
-
{{dataQA.question}}
-
{{dataQA.answer}}
-
+ +
+

{{data.name}}

+
+
{{dataQA.question}}
+
{{dataQA.answer}}
+

+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts index 94f65d910..2793bbc28 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-report/pd-report.component.ts @@ -33,223 +33,7 @@ export class PdReportComponent implements OnInit { 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; // this.pdReportRecords = data.records.qu; } }, err=> { @@ -264,3 +48,219 @@ export class PdReportComponent implements OnInit { } } + + + // 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": [ + // ] + // } + // } + // } From 14e49cded4b818529f275324ff117bef617c800b Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 26 Nov 2018 19:24:04 +0530 Subject: [PATCH 8/8] rental verification added in qc --- .../src/app/personal-discussion/manage-pd/manage-pd.module.ts | 2 +- .../app/quality-check/qc-list/qc-start/qc-start.component.html | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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 1e1259666..a23a13efa 100644 --- 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 @@ -172,7 +172,7 @@ const pdCustomNotifierOptions: NotifierOptions = { OwlNativeDateTimeModule, ], // declarations: [ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, AssetsInfoComponent], - exports: [PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent, AssessedIncomeComponent], + exports: [PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent], providers: [PdTrigerService, GetGeometricLocationService], entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent] }) diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.html index 585b19bad..c5f78c18a 100644 --- a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.html +++ b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.html @@ -432,6 +432,9 @@ + + +