+
Address Required
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts
index 5ca35e3df..cd6f91b26 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts
@@ -11,11 +11,13 @@ import { ActivatedRoute, Router } from "@angular/router";
/** Service */
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
+import { TitleCasePipe } from '@angular/common';
@Component({
selector: 'app-address',
templateUrl: './address.component.html',
styleUrls: ['./address.component.scss'],
+ providers: [TitleCasePipe],
encapsulation: ViewEncapsulation.None
})
@@ -80,12 +82,12 @@ export class AddressComponent implements OnInit {
private router: Router,
private _pd: PdTrigerService,
private dialogRef: MatDialogRef
,
+ private titlecasePipe:TitleCasePipe,
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
// console.log('pd_all_details',pd_all_details);
this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id;
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
this.form_id = 5;
-
this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant;
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
@@ -125,7 +127,7 @@ export class AddressComponent implements OnInit {
} else {
data.records.addresses.forEach((datas, index) => {
let obj = {
- 'address': datas.address,
+ 'address': this.transformName(datas.address),
'address_type': datas.address_type.toString(),
'address_type_others': datas.address_type_others,
'state': datas.state,
@@ -248,7 +250,7 @@ export class AddressComponent implements OnInit {
if (this.addressesList.length > 0) {
this.addressesList.forEach((val, index) => {
let obj = {
- 'address': val.addressline1,
+ 'address': this.transformName(val.addressline1),
'address_type': '',
'address_type_others': '',
'state': val.fk_state,
@@ -331,7 +333,7 @@ export class AddressComponent implements OnInit {
createAddresses(AddressDetails): FormGroup {
if (AddressDetails != null) {
return this.fb.group({
- address: [AddressDetails.address, Validators.compose([Validators.required])],
+ address: [this.transformName(AddressDetails.address), Validators.compose([Validators.required])],
address_type: [AddressDetails.address_type || '', Validators.compose([Validators.required])],
address_type_others: [AddressDetails.address_type_others],
state: [AddressDetails.state],
@@ -425,6 +427,8 @@ export class AddressComponent implements OnInit {
}
getOtherPincode(e, i) { this.otherPincodeFlag[i] = e == 1 ? true : false; }
+ transformName(vals){ return this.titlecasePipe.transform(vals); }
+
/** TO Save Address Forms Details*/
onSubmit() {
@@ -435,6 +439,9 @@ export class AddressComponent implements OnInit {
while(cnt < CtrlLength){
let ChildCtrl : any = control.controls[cnt]
+ console.log('ChildCtrl.controls.address.value',ChildCtrl.controls.address.value);
+ ChildCtrl.controls.address.value = this.transformName(ChildCtrl.controls.address.value);
+ console.log('ChildCtrl.controls.address.value',ChildCtrl.controls.address.value);
if(ChildCtrl.controls.address_type.value == 1){
ChildCtrl.controls['address_type_others'].setValidators([Validators.required]);}
else{
@@ -489,6 +496,7 @@ export class AddressComponent implements OnInit {
let records: any = {};
records.addresses = this.addressForm.controls.addresses.value;
+ this.addressForm.controls.addresses.value
records.address_form_remark = this.addressForm.controls.address_form_remark.value;
records.pdid = this.pdid;
records.parent_pdid= this.parent_pdid;
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/AI-diologue/manage-busines-expense/manage-busines-expense.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/AI-diologue/manage-busines-expense/manage-busines-expense.component.html
index 5969ccc44..d7e276c07 100644
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/AI-diologue/manage-busines-expense/manage-busines-expense.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/AI-diologue/manage-busines-expense/manage-busines-expense.component.html
@@ -17,11 +17,14 @@
{{expense.expense_item}}
-
+
+
+
+
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/AI-diologue/manage-busines-expense/manage-busines-expense.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/AI-diologue/manage-busines-expense/manage-busines-expense.component.ts
index 27023c224..66e281b79 100644
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/AI-diologue/manage-busines-expense/manage-busines-expense.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/AI-diologue/manage-busines-expense/manage-busines-expense.component.ts
@@ -46,6 +46,7 @@ export class ManageBusinesExpenseComponent implements OnInit {
fk_pd_id:[this.data.masterData.pdid],
company_id:[this.data.masterData.company_id],
expense_item_id:['',Validators.compose([Validators.required])],
+ other_expense_item:[''],
expense_value:['',Validators.compose([Validators.required])],
fk_frequency_id:['',Validators.compose([Validators.required])],
annual_expenses_value:['',Validators.compose([Validators.required])],
@@ -60,6 +61,7 @@ createBusinessItemWithData(values: any) {
fk_pd_id:[this.data.masterData.pdid],
company_id:[this.data.masterData.company_id],
expense_item_id:[values.expense_item_id,Validators.compose([Validators.required])],
+ other_expense_item:[values.other_expense_item || ''],
expense_value:[values.expense_value,Validators.compose([Validators.required])],
fk_frequency_id:[values.fk_frequency_id,Validators.compose([Validators.required])],
annual_expenses_value:[values.annual_expenses_value,Validators.compose([Validators.required])],
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.html
index 214e12f36..ea5fc2794 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.html
@@ -128,7 +128,7 @@
- Age of Asset in Year
+ Age of Asset in Years
@@ -329,7 +329,7 @@
- Age of Asset in Year
+ Age of Asset in Years
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 e4f54efd0..45df62bc6 100755
--- 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
@@ -520,52 +520,52 @@
- other_reason_for_working_capital_facilities_availed Required
+ Other Reason For Working Capital Facilities Availed Required
- reason_for_working_capital_facilities_availed Required
+ Reason For Working Capital Facilities Availed Required
- reason_for_working_capital_facilities_availed Required
+ Bank Guarantee Required
- cash_credit_limit Required
+ Cash Credit Limit Required
- cash_credit_limit Required
+ Factoring Required
- letter_of_credit Required
+ Letter Of Credit Required
- forfaiting Required
+ Forfaiting Required
- forfaiting Required
+ OD Limit Required
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 ad4fa489e..fd408bdcb 100755
--- 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
@@ -404,12 +404,9 @@ export class FinancialInfoComponent implements OnInit {
changeWorkingCapitalFacilities(event: any) {
console.log('event',event);
if (event.value.exist_status == true && event.value.id == 2) {
- console.log('event.value.exist_status == true && event.value.id == 2',event.value.exist_status,event.value.id)
-
this.financialForm.removeControl('bank_guarantee');
}
else if (event.value.exist_status == false && event.value.id == 2) {
- console.log('event.value.exist_status == true && event.value.id == 2',event.value.exist_status,event.value.id)
this.financialForm.addControl('bank_guarantee', new FormControl(''));
}
if (event.value.exist_status == true && event.value.id == 3) {
@@ -560,53 +557,53 @@ export class FinancialInfoComponent implements OnInit {
}
}
- selectedWorkkingCptl(e){
- console.log(e);
- const workingCptlControl =
this.financialForm.controls['select_working_capital_facilities_availed'];
- let CtrlLength = workingCptlControl.controls.length;
- if (CtrlLength > 0) {
- let cnt = 0;
- while(cnt < CtrlLength){
- let ChildCtrl : any = workingCptlControl.controls[cnt]
- if(ChildCtrl.controls.exist_status.value == 1 && ChildCtrl.controls.id.value == 2){
- ChildCtrl.controls['exist_status'].setValue(0);
- ChildCtrl.controls['exist_status'].updateValueAndValidity();
- this.financialForm.removeControl('bank_guarantee');
- }
- if(ChildCtrl.controls.exist_status.value == 1 && ChildCtrl.controls.id.value == 3){
- ChildCtrl.controls['exist_status'].setValue(0);
- ChildCtrl.controls['exist_status'].updateValueAndValidity();
- this.financialForm.removeControl('cash_credit_limit');
- }
- if(ChildCtrl.controls.exist_status.value == 1 && ChildCtrl.controls.id.value == 4){
- ChildCtrl.controls['exist_status'].setValue(0);
- ChildCtrl.controls['exist_status'].updateValueAndValidity();
- this.financialForm.removeControl('factoring');
- }
- if(ChildCtrl.controls.exist_status.value == 1 && ChildCtrl.controls.id.value == 5){
- ChildCtrl.controls['exist_status'].setValue(0);
- ChildCtrl.controls['exist_status'].updateValueAndValidity();
- this.financialForm.removeControl('forfaiting');
- }
- if(ChildCtrl.controls.exist_status.value == 1 && ChildCtrl.controls.id.value == 6){
- ChildCtrl.controls['exist_status'].setValue(0);
- ChildCtrl.controls['exist_status'].updateValueAndValidity();
- this.financialForm.removeControl('letter_of_credit');
- }
- if(ChildCtrl.controls.exist_status.value == 1 && ChildCtrl.controls.id.value == 7){
- ChildCtrl.controls['exist_status'].setValue(0);
- ChildCtrl.controls['exist_status'].updateValueAndValidity();
- this.financialForm.removeControl('od_limit');
- }
- if(ChildCtrl.controls.exist_status.value == 1 && ChildCtrl.controls.id.value == 1){
- ChildCtrl.controls['exist_status'].setValue(0);
- ChildCtrl.controls['exist_status'].updateValueAndValidity();
- this.financialForm.removeControl('other_reason_for_working_capital_facilities_availed');
- this.financialForm.removeControl('reason_for_working_capital_facilities_availed');
- }
- }
- }
- }
+ // selectedWorkkingCptl(e){
+ // console.log(e);
+ // const workingCptlControl = this.financialForm.controls['select_working_capital_facilities_availed'];
+ // let CtrlLength = workingCptlControl.controls.length;
+ // if (CtrlLength > 0) {
+ // let cnt = 0;
+ // while(cnt < CtrlLength){
+ // let ChildCtrl : any = workingCptlControl.controls[cnt]
+ // if(ChildCtrl.controls.exist_status.value == 1 && ChildCtrl.controls.id.value == 2){
+ // ChildCtrl.controls['exist_status'].setValue(0);
+ // ChildCtrl.controls['exist_status'].updateValueAndValidity();
+ // this.financialForm.removeControl('bank_guarantee');
+ // }
+ // if(ChildCtrl.controls.exist_status.value == 1 && ChildCtrl.controls.id.value == 3){
+ // ChildCtrl.controls['exist_status'].setValue(0);
+ // ChildCtrl.controls['exist_status'].updateValueAndValidity();
+ // this.financialForm.removeControl('cash_credit_limit');
+ // }
+ // if(ChildCtrl.controls.exist_status.value == 1 && ChildCtrl.controls.id.value == 4){
+ // ChildCtrl.controls['exist_status'].setValue(0);
+ // ChildCtrl.controls['exist_status'].updateValueAndValidity();
+ // this.financialForm.removeControl('factoring');
+ // }
+ // if(ChildCtrl.controls.exist_status.value == 1 && ChildCtrl.controls.id.value == 5){
+ // ChildCtrl.controls['exist_status'].setValue(0);
+ // ChildCtrl.controls['exist_status'].updateValueAndValidity();
+ // this.financialForm.removeControl('forfaiting');
+ // }
+ // if(ChildCtrl.controls.exist_status.value == 1 && ChildCtrl.controls.id.value == 6){
+ // ChildCtrl.controls['exist_status'].setValue(0);
+ // ChildCtrl.controls['exist_status'].updateValueAndValidity();
+ // this.financialForm.removeControl('letter_of_credit');
+ // }
+ // if(ChildCtrl.controls.exist_status.value == 1 && ChildCtrl.controls.id.value == 7){
+ // ChildCtrl.controls['exist_status'].setValue(0);
+ // ChildCtrl.controls['exist_status'].updateValueAndValidity();
+ // this.financialForm.removeControl('od_limit');
+ // }
+ // if(ChildCtrl.controls.exist_status.value == 1 && ChildCtrl.controls.id.value == 1){
+ // ChildCtrl.controls['exist_status'].setValue(0);
+ // ChildCtrl.controls['exist_status'].updateValueAndValidity();
+ // this.financialForm.removeControl('other_reason_for_working_capital_facilities_availed');
+ // this.financialForm.removeControl('reason_for_working_capital_facilities_availed');
+ // }
+ // }
+ // }
+ // }
/** For Auto-generating FinYear */
dynamicalFinYear(){
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html
index f41942342..1bcc6b451 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html
@@ -92,10 +92,10 @@
matTooltipPosition="below">
delete
-
+
-
+
@@ -149,6 +149,7 @@
+ Select
{{entity.business_entity_type_name}}
Business Entity Type Required
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts
index b0cc7319f..6772213da 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts
@@ -6,7 +6,7 @@ import { PdTrigerService } from './../../../../../pd-service/pd-triger.service';
import { OtherApplicantDetailsComponent } from './../dialogue/other-applicant-details/other-applicant-details.component';
import { element } from '@angular/core/src/render3/instructions';
import { ELEMENT_PROBE_PROVIDERS } from '@angular/platform-browser/src/dom/debug/ng_probe';
-import { DatePipe } from '@angular/common';
+import { DatePipe,TitleCasePipe } from '@angular/common';
import { SearchRelationPipe } from './../../../../../pd-pipes/search-relation.pipe';
import { Options } from 'selenium-webdriver/edge';
// import { ImageCropperComponent } from '../dialogue/image-cropper/image-cropper.component';
@@ -15,7 +15,7 @@ import { Options } from 'selenium-webdriver/edge';
selector: 'app-general-info',
templateUrl: './general-info.component.html',
styleUrls: ['./general-info.component.scss'],
- providers: [SearchRelationPipe],
+ providers: [SearchRelationPipe,TitleCasePipe],
})
export class GeneralInfoComponent implements OnInit {
@@ -64,7 +64,7 @@ export class GeneralInfoComponent implements OnInit {
/********************** Declaration Section Ends Here *****************/
/** Constructor Section */
- constructor(notifier: NotifierService, private _fb: FormBuilder, private _pd: PdTrigerService, private dialog: MatDialog, @Inject(MAT_DIALOG_DATA) public pd_all_details: any, private dialogRef: MatDialogRef) {
+ constructor(notifier: NotifierService, private _fb: FormBuilder, private _pd: PdTrigerService, private dialog: MatDialog, @Inject(MAT_DIALOG_DATA) public pd_all_details: any, private dialogRef: MatDialogRef,private titleCase:TitleCasePipe) {
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id;
this.notifier = notifier;
@@ -350,7 +350,7 @@ export class GeneralInfoComponent implements OnInit {
return this._fb.group({
pd_co_applicant_id: [elementValue.pd_co_applicant_id],
applicant_title_name: [elementValue.applicant_title_name],
- applicant_name: [elementValue.applicant_name],
+ applicant_name: [this.titleCase.transform(elementValue.applicant_name)],
is_applicant: [elementValue.is_applicant],
is_person_met: [elementValue.is_person_met],
is_person_met_pic :[elementValue.is_person_met_pic],
@@ -368,7 +368,7 @@ export class GeneralInfoComponent implements OnInit {
createPersonsWithRelationships(elementValue: any) {
return this._fb.group({
pd_co_applicant_id: [elementValue.pd_co_applicant_id],
- applicant_name: [elementValue.applicant_name],
+ applicant_name: [this.titleCase.transform(elementValue.applicant_name)],
relationship: [elementValue.relationship],
relation_to: [elementValue.relation_to],
individuals_order_id: [elementValue.individuals_order_id],
@@ -411,7 +411,7 @@ export class GeneralInfoComponent implements OnInit {
createCompaniesRelationshipWithData(elementValue: any) {
return this._fb.group({
- applicant_name: [elementValue.applicant_name],
+ applicant_name: [this.titleCase.transform(elementValue.applicant_name)],
company_relationship: [elementValue.company_relationship],
relation_to_company: [elementValue.relation_to_company]
});
@@ -458,7 +458,7 @@ export class GeneralInfoComponent implements OnInit {
createApplicant(elementValue: any) {
return this._fb.group({
pd_co_applicant_id: [elementValue.pd_co_applicant_id],
- applicant_name: [elementValue.applicant_name],
+ applicant_name: [this.titleCase.transform(elementValue.applicant_name)],
company_name: [elementValue.company_name,],
exist_status: [elementValue.exist_status == 1 && elementValue.pd_co_applicant_id > 0 ? true : false]
});
@@ -468,7 +468,7 @@ export class GeneralInfoComponent implements OnInit {
createApplicantRelation(elementValue: any) {
return this._fb.group({
pd_co_applicant_id: [elementValue.pd_co_applicant_id],
- applicant_name: [elementValue.applicant_name],
+ applicant_name: [this.titleCase.transform(elementValue.applicant_name)],
multiple_relation: this._fb.array([]),
multiple_company_relation: this._fb.array([]),
individuals_order_id: [elementValue.individuals_order_id]
@@ -542,7 +542,7 @@ export class GeneralInfoComponent implements OnInit {
element.is_main_applicant = false;
individualsControl.push(this.createIndividulas(element));
let relationControl = this._generalForm.controls['persons_with_relationships'];
- let applicant_details: any = { 'pd_co_applicant_id': element.pd_co_applicant_id, 'applicant_name': element.applicant_name, 'relationship': '', 'relation_to': '', 'individuals_order_id': element.individuals_order_id, 'is_active': element.is_active };
+ let applicant_details: any = { 'pd_co_applicant_id': element.pd_co_applicant_id, 'applicant_name': this.titleCase.transform(element.applicant_name), 'relationship': '', 'relation_to': '', 'individuals_order_id': element.individuals_order_id, 'is_active': element.is_active };
relationControl.push(this.createPersonsWithRelationships(applicant_details));
});
@@ -561,7 +561,7 @@ export class GeneralInfoComponent implements OnInit {
// details.value.applicant_name
let control = relationControl.controls[index1] as FormArray;
- control.controls['applicant_name'].setValue(event.target.value);
+ control.controls['applicant_name'].setValue(this.titleCase.transform(event.target.value));
// event.target.value
// controls.controls[index1].disable();
@@ -598,7 +598,7 @@ export class GeneralInfoComponent implements OnInit {
let controls = this._generalForm.controls['persons_with_relationships'];
- let name = details.value.applicant_name;
+ let name = this.titleCase.transform(details.value.applicant_name);
let index1 = controls.value.map(data => data.applicant_name).indexOf(name);
// controls.controls[index1].disable();
// let personsWithRelationshipsControl : any = control.controls[index1];
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 7c6266f33..e11920926 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts
@@ -1,7 +1,6 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
-
import { CKEditorModule } from 'ng2-ckeditor';
import { PdfViewerModule } from 'ng2-pdf-viewer';
diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.scss b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.scss
index 293864e96..eeed339b4 100644
--- a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.scss
+++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.scss
@@ -128,4 +128,11 @@ $product-bg-color-hover: rgba(103, 58, 183, 0.7);
}
.empty-spacer {
flex: 1 1 auto;
-}
\ No newline at end of file
+}
+
+@-moz-document url-prefix() {
+ iframe {
+ width:100px;
+ height: 3000px !important;
+ }
+ }
\ No newline at end of file
diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.ts
index 272a2b4fd..c68f319b4 100644
--- a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.ts
+++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.ts
@@ -208,7 +208,7 @@ export class QcPdReportComponent implements OnInit {
if (data.status == 200) {
console.log('getPdReportDetails',data);
this.pdReportRecords = data.records;
- this.qcStatus = data.records.pdstatus;
+ this.qcStatus = data.records.pd_status;
console.log(this.qcStatus);
this.generateBtn = data.records.is_original_report_created == 1 ? false : true;
console.log(this.generateBtn);
@@ -230,6 +230,8 @@ export class QcPdReportComponent implements OnInit {
// load pd view component
loadPdViewCompoent() {
+ let getItem = localStorage.getItem('userEdits');
+ localStorage.removeItem('userEdits');
this.router.navigate(['../../../viewpd',this.startPD], { relativeTo: this.route });
}
diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html
index 69268336c..182ab2304 100755
--- a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html
+++ b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html
@@ -71,12 +71,12 @@
-
- -->
+
Lender Contact Details
diff --git a/ng6-seed/src/app/quality-check/qc-pipe/number-to-words.pipe.spec.ts b/ng6-seed/src/app/quality-check/qc-pipe/number-to-words.pipe.spec.ts
new file mode 100644
index 000000000..a67a5af9b
--- /dev/null
+++ b/ng6-seed/src/app/quality-check/qc-pipe/number-to-words.pipe.spec.ts
@@ -0,0 +1,8 @@
+import { NumberToWordsPipe } from './number-to-words.pipe';
+
+describe('NumberToWordsPipe', () => {
+ it('create an instance', () => {
+ const pipe = new NumberToWordsPipe();
+ expect(pipe).toBeTruthy();
+ });
+});
diff --git a/ng6-seed/src/app/quality-check/qc-pipe/number-to-words.pipe.ts b/ng6-seed/src/app/quality-check/qc-pipe/number-to-words.pipe.ts
new file mode 100644
index 000000000..dc0f33472
--- /dev/null
+++ b/ng6-seed/src/app/quality-check/qc-pipe/number-to-words.pipe.ts
@@ -0,0 +1,139 @@
+import { Pipe, PipeTransform } from '@angular/core';
+
+@Pipe({
+ name: 'numberToWords'
+})
+export class NumberToWordsPipe implements PipeTransform {
+ transform(price: any): any{
+
+ price = price.toString();
+ let atemp = price.split(".");
+ let amount = atemp[0];
+
+ var sglDigit = ["Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"],
+ dblDigit = ["Ten", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen"],
+ tensPlace = ["", "Ten", "Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety"],
+
+ handle_tens = function(dgt, prevDgt) {
+ return 0 == dgt ? "" : " " + (1 == dgt ? dblDigit[prevDgt] : tensPlace[dgt])
+ },
+ handle_utlc = function(dgt, nxtDgt, denom) {
+ return (0 != dgt && 1 != nxtDgt ? " " + sglDigit[dgt] : "") + (0 != nxtDgt || dgt > 0 ? " " + denom : "")
+ };
+
+ var str = "",
+ digitIdx = 0,
+ digit = 0,
+ nxtDigit = 0,
+ words = [];
+ if (amount += "", isNaN(parseInt(amount))) str = "";
+ else if (parseInt(amount) > 0 && amount.length <= 10) {
+ for (digitIdx = amount.length - 1; digitIdx >= 0; digitIdx--)
+ switch (digit = amount[digitIdx] - 0, nxtDigit = digitIdx > 0 ? amount[digitIdx - 1] - 0 : 0, amount.length - digitIdx - 1) {
+ case 0:
+ words.push(handle_utlc(digit, nxtDigit, ""));
+ break;
+ case 1:
+ words.push(handle_tens(digit, amount[digitIdx + 1]));
+ break;
+ case 2:
+ words.push(0 != digit ? " " + sglDigit[digit] + " Hundred" + (0 != amount[digitIdx + 1] && 0 != amount[digitIdx + 2] ? " and" : "") : "");
+ break;
+ case 3:
+ words.push(handle_utlc(digit, nxtDigit, "Thousand"));
+ break;
+ case 4:
+ words.push(handle_tens(digit, amount[digitIdx + 1]));
+ break;
+ case 5:
+ words.push(handle_utlc(digit, nxtDigit, "Lakh"));
+ break;
+ case 6:
+ words.push(handle_tens(digit, amount[digitIdx + 1]));
+ break;
+ case 7:
+ words.push(handle_utlc(digit, nxtDigit, "Crore"));
+ break;
+ case 8:
+ words.push(handle_tens(digit, amount[digitIdx + 1]));
+ break;
+ case 9:
+ words.push(0 != digit ? " " + sglDigit[digit] + " Hundred" + (0 != amount[digitIdx + 1] || 0 != amount[digitIdx + 2] ? " and" : " Crore") : "")
+ // break;
+ // case 10:
+ // words.push(0 != digit ? " " + sglDigit[digit] + " Lakh" + (0 != price[digitIdx + 1] || 0 != price[digitIdx + 2] ? " and" : " Hundred" + (0 != price[digitIdx + 1] || 0 != price[digitIdx + 2] || 0 != price[digitIdx + 3] ? " and" : " Crore"))
+ // : "")
+ // break;
+ }
+ str = words.reverse().join("")
+ // str =(str.length > 2 && str.charAt(str.length-2)==',') ? str.slice(0, -2) : str;
+ } else str = "";
+ return str
+
+}
+
+//References
+// transform(amount: any): any {
+// let words: any = ['', 'One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten', 'Eleven', 'Twelve', 'Thirteen', 'Fourteen', 'Fifteen', 'Sixteen', 'Seventeen', 'Eighteen', 'Nineteen', 'Twenty'];
+// words[30] = 'Thirty';
+// words[40] = 'Forty';
+// words[50] = 'Fifty';
+// words[60] = 'Sixty';
+// words[70] = 'Seventy';
+// words[80] = 'Eighty';
+// words[90] = 'Ninety';
+// amount = amount.toString();
+// let atemp = amount.split(".");
+// let number = atemp[0].split(",").join("");
+// let n_length = number.length;
+// let words_string = "";
+// let value: any;
+// if (n_length <= 9) {
+// var n_array = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0);
+// var received_n_array = new Array();
+// for (var i = 0; i < n_length; i++) {
+// received_n_array[i] = number.substr(i, 1);
+// }
+// for (var i = 9 - n_length, j = 0; i < 9; i++ , j++) {
+// n_array[i] = received_n_array[j];
+// }
+// for (var i = 0, j = 1; i < 9; i++ , j++) {
+// if (i == 0 || i == 2 || i == 4 || i == 7) {
+// if (n_array[i] == 1) {
+// n_array[j] = 10 + (+n_array[j]);
+// n_array[i] = 0;
+// }
+// }
+// }
+// value = "";
+// for (var i = 0; i < 9; i++) {
+// if (i == 0 || i == 2 || i == 4 || i == 7) {
+// value = n_array[i] * 10;
+// } else {
+// value = n_array[i];
+// }
+// if (value != 0) {
+// words_string += words[value] + " ";
+// }
+// if ((i == 1 && value != 0) || (i == 0 && value != 0 && n_array[i + 1] == 0)) {
+// words_string += "Crores, ";
+// }
+// if ((i == 3 && value != 0) || (i == 2 && value != 0 && n_array[i + 1] == 0)) {
+// words_string += "Lakhs, ";
+// }
+// if ((i == 5 && value != 0) || (i == 4 && value != 0 && n_array[i + 1] == 0)) {
+// words_string += "Thousand, ";
+// }
+// if (i == 6 && value != 0 && (n_array[i + 1] != 0 && n_array[i + 2] != 0)) {
+// words_string += "Hundred and ";
+// } else if (i == 6 && value != 0) {
+// words_string += "Hundred ";
+// }
+// }
+// words_string = words_string.split(" ").join(" ");
+// words_string=(words_string.length > 2 && words_string.charAt(words_string.length-2)==',') ? words_string.slice(0, -2) : words_string;
+// }
+// return words_string;
+// }
+
+}
diff --git a/ng6-seed/src/app/quality-check/quality-check.module.ts b/ng6-seed/src/app/quality-check/quality-check.module.ts
index 771bc58c9..bc52ce653 100755
--- a/ng6-seed/src/app/quality-check/quality-check.module.ts
+++ b/ng6-seed/src/app/quality-check/quality-check.module.ts
@@ -42,8 +42,7 @@ import { QcReviewComponent } from './qc-list/qc-pd-report/qc-review/qc-review.co
import { ModelEditPdReportComponent } from './qc-list/qc-pd-report/model-edit-pd-report/model-edit-pd-report.component';
import { PdLocatedMapViewDirective } from './../personal-discussion/pd-directive/pd-located-map-view.directive';
import { InitiateAdditionalPdComponent } from './../personal-discussion/manage-pd/list-pd/initiate-additional-pd/initiate-additional-pd.component';
-
-
+import { NumberToWordsPipe } from './qc-pipe/number-to-words.pipe';
/**
* Custom angular notifier options
@@ -115,7 +114,7 @@ const customNotifierOptions: NotifierOptions = {
PdfViewerModule,
ManagePdModule,
],
- declarations: [QualityCheckComponent,QcListComponent, QcViewComponent, QcStartComponent, QcPdReportComponent,DialogChangeCurrentVenrsion, QcReviewComponent, ModelEditPdReportComponent],
+ declarations: [QualityCheckComponent,QcListComponent, QcViewComponent, QcStartComponent, QcPdReportComponent,DialogChangeCurrentVenrsion, QcReviewComponent, ModelEditPdReportComponent, NumberToWordsPipe],
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent,DialogChangeCurrentVenrsion, QcReviewComponent, ModelEditPdReportComponent, InitiateAdditionalPdComponent],
providers : [QcService,{provide: MAT_DATE_LOCALE, useValue: 'en-GB'},
{provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]},