new changes :: ps
This commit is contained in:
parent
a36743770f
commit
bd5eadb7b1
@ -129,7 +129,8 @@
|
||||
<div formArrayName="addresses" *ngFor="let addresses of pdAddresses.controls; let i = index;">
|
||||
<mat-card-content [formGroupName]="i">
|
||||
<mat-form-field style="width: 96%">
|
||||
<textarea matInput autocomplete="off" placeholder="Address at which PD is to be done" formControlName="addressline1" style="text-transform: uppercase"></textarea>
|
||||
<textarea matInput autocomplete="off" placeholder="Address at which PD is to be done" formControlName="addressline1"
|
||||
[value]="addresses.get('addressline1').value | titlecase"></textarea>
|
||||
<!-- oninput="this.value = this.value.toUpperCase()" -->
|
||||
<!-- <mat-error *ngIf="pdAddresses.addressline1.hasError('required')">Address1 required.</mat-error> -->
|
||||
</mat-form-field>
|
||||
@ -198,7 +199,8 @@
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 38%">
|
||||
<input matInput autocomplete="off" placeholder="Name of Individual Applicant" formControlName="applicant_name">
|
||||
<input matInput autocomplete="off" placeholder="Name of Individual Applicant" formControlName="applicant_name"
|
||||
[value]="pdMain.applicant_name.value | titlecase">
|
||||
<!-- <mat-error *ngIf="pdMain.applicant_name.hasError('required')">Name is Required.</mat-error> -->
|
||||
</mat-form-field>
|
||||
|
||||
@ -238,7 +240,8 @@
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 38%">
|
||||
<input matInput autocomplete="off" placeholder="Name of Individual Applicant" formControlName="coapplicant_name" type="text" required>
|
||||
<input matInput autocomplete="off" placeholder="Name of Individual Applicant" formControlName="coapplicant_name" type="text"
|
||||
[value]="coDetails['controls'].coapplicant_name.value | titlecase" required>
|
||||
<!-- <mat-error *ngIf="pdMain.applicant_name.hasError('required')">Name is Required.</mat-error> -->
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
@ -6,12 +6,14 @@ import { NotifierService } from 'angular-notifier';
|
||||
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
||||
import { ListPdComponent } from '../list-pd.component';
|
||||
import { AwsService } from '../../../../AwsService/aws.service';
|
||||
import { TitleCasePipe } from '@angular/common';
|
||||
/**sweet alert */
|
||||
import Swal from 'sweetalert2';
|
||||
@Component({
|
||||
selector: 'app-add-pd',
|
||||
templateUrl: './add-pd.component.html',
|
||||
styleUrls: ['./add-pd.component.scss'],
|
||||
providers:[TitleCasePipe],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class AddPdComponent implements OnInit, OnDestroy {
|
||||
@ -48,7 +50,8 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
disableAfterSubmit: boolean;
|
||||
pincodeflag : any = [];
|
||||
constructor(notifier: NotifierService, private _fb: FormBuilder, private route: ActivatedRoute,
|
||||
private router: Router, private _pd: PdTrigerService, private _aws: AwsService, private ListPdComponent: ListPdComponent) {
|
||||
private router: Router, private _pd: PdTrigerService, private _aws: AwsService, private ListPdComponent: ListPdComponent,
|
||||
private titleCase : TitleCasePipe) {
|
||||
this.notifier = notifier;
|
||||
this.disableAfterSubmit = false;
|
||||
}
|
||||
@ -495,7 +498,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
"fk_pd_type": formValue.fk_pd_type,
|
||||
"fk_customer_segment": formValue.fk_customer_segment,
|
||||
"loan_amount": formValue.loan_amount,
|
||||
"addressline1": !formValue.addresses[0].addressline1 ? null : formValue.addresses[0].addressline1.toUpperCase(),
|
||||
"addressline1": !formValue.addresses[0].addressline1 ? null : this.titleCase.transform(formValue.addresses[0]),
|
||||
"fk_city": formValue.addresses[0].fk_city,
|
||||
"fk_state": formValue.addresses[0].fk_state,
|
||||
"pincode": formValue.addresses[0].pincode,
|
||||
@ -510,7 +513,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
var addresses_details: any = [];
|
||||
if (formValue.applicant_name) {
|
||||
pd_applicant_details.push({
|
||||
"applicant_name": formValue.applicant_name,
|
||||
"applicant_name": this.titleCase.transform(formValue.applicant_name),
|
||||
"applicant_title_name": formValue.applicant_title_name,
|
||||
"company_name": formValue.company_name,
|
||||
"mobile_no": formValue.mobile_no,
|
||||
@ -550,7 +553,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
// }
|
||||
|
||||
let obj1 = {
|
||||
"applicant_name":itemElement.coapplicant_name,
|
||||
"applicant_name":this.titleCase.transform(itemElement.coapplicant_name),
|
||||
"applicant_title_name": itemElement.applicant_title_name,
|
||||
"company_name": itemElement.company_name,
|
||||
"mobile_no":itemElement.coapplicant_mobile_no,
|
||||
@ -564,7 +567,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
if (formValue.addresses.length > 0) {
|
||||
formValue.addresses.forEach((addressElement, itemIndex) => {
|
||||
let addressobj = {
|
||||
"addressline1": !addressElement.addressline1 ? null : addressElement.addressline1.toUpperCase(),
|
||||
"addressline1": !addressElement.addressline1 ? null : this.titleCase.transform(addressElement.addressline1),
|
||||
"fk_city": addressElement.fk_city,
|
||||
"fk_state": addressElement.fk_state,
|
||||
"pincode": addressElement.pincode,
|
||||
|
||||
@ -51,10 +51,17 @@
|
||||
<input matInput type="text" formControlName="pd_applicant_id" placeholder="Applicant Id">
|
||||
</mat-form-field>
|
||||
<div align="right">
|
||||
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="onReset()"
|
||||
matTooltip="Reset" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary">
|
||||
<mat-icon>settings_backup_restore</mat-icon>
|
||||
</button>
|
||||
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="searchItem()"
|
||||
matTooltip="Search" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||
<mat-icon>search</mat-icon>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</mat-list>
|
||||
|
||||
@ -42,7 +42,7 @@ export class AllPdComponent implements OnInit, OnChanges {
|
||||
PdListData:any[] = [];
|
||||
|
||||
// pagination variable details
|
||||
length = 50;
|
||||
length = 5;
|
||||
pageIndex = 0;
|
||||
pageSize = 10;
|
||||
pageEvent: PageEvent;
|
||||
@ -69,10 +69,6 @@ export class AllPdComponent implements OnInit, OnChanges {
|
||||
// this.loadPDDetails();
|
||||
//this.getcommonDropDown();
|
||||
}
|
||||
ngAfterViewInit() {
|
||||
this.dataSourceTab1.paginator = this.paginator;
|
||||
this.dataSourceTab1.sort = this.sort;
|
||||
}
|
||||
|
||||
// get changes for filter from parent componnet filter
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
@ -171,6 +167,7 @@ export class AllPdComponent implements OnInit, OnChanges {
|
||||
{
|
||||
console.log(e);
|
||||
}
|
||||
|
||||
searchItem()
|
||||
{
|
||||
|
||||
@ -198,12 +195,26 @@ export class AllPdComponent implements OnInit, OnChanges {
|
||||
this.xpandStatus = false;
|
||||
if(res['dataStatus']==true)
|
||||
{
|
||||
this.dataSourceTab1 = res['records'];
|
||||
this.dataSourceTab1.data = res['records'];
|
||||
this.dataSourceTab1.paginator = this.paginator;
|
||||
|
||||
}else{
|
||||
// this.notifier.notify('warning', 'No Records Found');
|
||||
this.dataSourceTab1 = this.tempStore;
|
||||
this.dataSourceTab1.paginator = this.paginator;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
onReset(){
|
||||
this.searchForm.reset();
|
||||
this.dataSourceTab1 = this.tempStore;
|
||||
this.dataSourceTab1.paginator = this.paginator;
|
||||
this.xpandStatus = false;
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.dataSourceTab1.paginator = this.paginator;
|
||||
this.dataSourceTab1.sort = this.sort;
|
||||
}
|
||||
}
|
||||
|
||||
@ -51,6 +51,11 @@
|
||||
<input matInput type="text" formControlName="pd_applicant_id" placeholder="Applicant Id">
|
||||
</mat-form-field>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="onReset()"
|
||||
matTooltip="Reset" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary">
|
||||
<mat-icon>settings_backup_restore</mat-icon>
|
||||
</button>
|
||||
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="searchItem()"
|
||||
matTooltip="Search" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||
<mat-icon>search</mat-icon>
|
||||
|
||||
@ -42,7 +42,7 @@ export class CompletedPdComponent implements OnInit, OnChanges {
|
||||
completedPdListData:any[] = [];
|
||||
|
||||
// pagination variable details
|
||||
length = 50;
|
||||
length = 5;
|
||||
pageIndex = 0;
|
||||
pageSize = 10;
|
||||
pageEvent: PageEvent;
|
||||
@ -69,10 +69,7 @@ export class CompletedPdComponent implements OnInit, OnChanges {
|
||||
// this.loadPDDetails();
|
||||
// this.getcommonDropDown();
|
||||
}
|
||||
ngAfterViewInit() {
|
||||
this.dataSourceTab4.paginator = this.paginator;
|
||||
this.dataSourceTab4.sort = this.sort;
|
||||
}
|
||||
|
||||
|
||||
// get changes for filter from parent componnet filter
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
@ -213,6 +210,17 @@ export class CompletedPdComponent implements OnInit, OnChanges {
|
||||
}
|
||||
})
|
||||
}
|
||||
onReset(){
|
||||
this.searchForm.reset();
|
||||
this.dataSourceTab4 = this.tempStore;
|
||||
this.dataSourceTab4.paginator = this.paginator;
|
||||
this.xpandStatus = false;
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.dataSourceTab4.paginator = this.paginator;
|
||||
this.dataSourceTab4.sort = this.sort;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -26,7 +26,8 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 65%">
|
||||
<input matInput placeholder="Name of Individual Applicant" formControlName="applicant_name" required>
|
||||
<input matInput placeholder="Name of Individual Applicant" formControlName="applicant_name"
|
||||
[value]="pdMainApplicant.applicant_name.value | titlecase" required>
|
||||
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 40%" *ngIf="CSAbbr != 'SE-RI'">
|
||||
|
||||
@ -4,10 +4,13 @@ import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@ang
|
||||
import { CustomValidators } from 'ng2-validation';
|
||||
import { NotifierService } from 'angular-notifier';
|
||||
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
||||
import { TitleCasePipe } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'app-edit-pd-applicant',
|
||||
templateUrl: './edit-pd-applicant.component.html',
|
||||
styleUrls: ['./edit-pd-applicant.component.scss'],
|
||||
providers:[TitleCasePipe],
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
})
|
||||
export class EditPdApplicantComponent implements OnInit {
|
||||
@ -24,7 +27,7 @@ export class EditPdApplicantComponent implements OnInit {
|
||||
CSAbbr:any;
|
||||
constructor(private _fb: FormBuilder,
|
||||
private _pd: PdTrigerService, notifier: NotifierService, private dialogRef: MatDialogRef<EditPdApplicantComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: any) {
|
||||
@Inject(MAT_DIALOG_DATA) public data: any,private titleCase : TitleCasePipe) {
|
||||
|
||||
this.notifier=notifier
|
||||
}
|
||||
@ -71,7 +74,7 @@ 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])],
|
||||
applicant_name: [this.titleCase.transform(this.mainApplicantData[0].applicant_name), Validators.compose([Validators.required])],
|
||||
mobile_no: [this.mainApplicantData[0].mobile_no, Validators.compose([Validators.minLength(10),Validators.maxLength(12)])],
|
||||
stdcode: [stdcode, Validators.compose([Validators.minLength(3),Validators.maxLength(5)])],
|
||||
landline: [landline, Validators.compose([Validators.minLength(6),Validators.maxLength(8)])],
|
||||
@ -105,7 +108,7 @@ export class EditPdApplicantComponent implements OnInit {
|
||||
label: ['Co Applicant'],
|
||||
fk_applicant_primary_id: [listData.pd_co_applicant_id],
|
||||
applicant_title_name: [listData.applicant_title_name, Validators.compose([Validators.required])],
|
||||
coapplicantName: [listData.applicant_name, Validators.compose([Validators.required])],
|
||||
coapplicantName: [this.titleCase.transform(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_stdcode: [stdcode, Validators.compose([Validators.minLength(3),Validators.maxLength(5)])],
|
||||
// landline: [landline, Validators.compose([Validators.minLength(6),Validators.maxLength(8)])],
|
||||
@ -192,7 +195,7 @@ export class EditPdApplicantComponent implements OnInit {
|
||||
let pd_applicant_details : any=[{
|
||||
"fk_pd_id": this.data.pdID,
|
||||
"pd_co_applicant_id": formValue.fk_applicant_primary_id,
|
||||
"applicant_name":formValue.applicant_name,
|
||||
"applicant_name":this.titleCase.transform(formValue.applicant_name),
|
||||
"company_name":formValue.company_name,
|
||||
"mobile_no":formValue.mobile_no,
|
||||
"landline":concat_landline1,
|
||||
@ -236,7 +239,7 @@ export class EditPdApplicantComponent implements OnInit {
|
||||
"fk_pd_id": this.data.pdID,
|
||||
"pd_co_applicant_id": itemElement.fk_applicant_primary_id,
|
||||
"applicant_title_name":itemElement.applicant_title_name,
|
||||
"applicant_name":itemElement.coapplicantName,
|
||||
"applicant_name":this.titleCase.transform(itemElement.coapplicantName),
|
||||
// "relation":itemElement.relationship,
|
||||
"mobile_no":itemElement.coapplicant_mobile_no,
|
||||
"landline":concat_landline,
|
||||
|
||||
@ -4,10 +4,13 @@ import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@ang
|
||||
import { CustomValidators } from 'ng2-validation';
|
||||
import { NotifierService } from 'angular-notifier';
|
||||
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
||||
import { TitleCasePipe } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'app-edit-pd-master',
|
||||
templateUrl: './edit-pd-master.component.html',
|
||||
styleUrls: ['./edit-pd-master.component.scss'],
|
||||
providers:[TitleCasePipe],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class EditPdMasterComponent implements OnInit {
|
||||
@ -50,7 +53,7 @@ export class EditPdMasterComponent implements OnInit {
|
||||
};
|
||||
constructor(private _fb: FormBuilder,
|
||||
private _pd: PdTrigerService, notifier: NotifierService,private dialogRef: MatDialogRef<EditPdMasterComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: any) {
|
||||
@Inject(MAT_DIALOG_DATA) public data: any,private titleCase : TitleCasePipe) {
|
||||
this.notifier=notifier
|
||||
this.currentPDStatus = data.records.pd_status;
|
||||
this.pdid = data.records.pd_id;
|
||||
@ -200,7 +203,7 @@ export class EditPdMasterComponent implements OnInit {
|
||||
this.addressesDeactivited[index] = true;
|
||||
let obj = {
|
||||
pd_address_id:val.pd_address_id,
|
||||
addressline1: !val.addressline1 ? null : val.addressline1.toUpperCase(),
|
||||
addressline1: !val.addressline1 ? null : this.titleCase.transform(val.addressline1),
|
||||
fk_city: val.fk_city,
|
||||
fk_state: val.fk_state,
|
||||
pincode: val.pincode_id,
|
||||
@ -275,7 +278,7 @@ export class EditPdMasterComponent implements OnInit {
|
||||
return this._fb.group({
|
||||
fk_pd_id:[this.pdid],
|
||||
pd_address_id:[data.pd_address_id],
|
||||
addressline1: [data.addressline1 != null ? data.addressline1.toUpperCase() : null],
|
||||
addressline1: [data.addressline1 != null ? this.titleCase.transform(data.addressline1) : null],
|
||||
fk_city: [data.fk_city],
|
||||
fk_state: [data.fk_state],
|
||||
pincode : [data.pincode],
|
||||
@ -449,7 +452,7 @@ export class EditPdMasterComponent implements OnInit {
|
||||
"fk_pd_type": my_array.fk_pd_type,
|
||||
"fk_customer_segment": my_array.fk_customer_segment,
|
||||
"loan_amount": my_array.loan_amount,
|
||||
"addressline1": filteredAddressesdata[0].addressline1 != null ? filteredAddressesdata[0].addressline1.toUpperCase() : null,
|
||||
"addressline1": filteredAddressesdata[0].addressline1 != null ? this.titleCase.transform(filteredAddressesdata[0].addressline1) : null,
|
||||
"fk_city": filteredAddressesdata[0].fk_city,
|
||||
"fk_state": filteredAddressesdata[0].fk_state,
|
||||
"pincode": filteredAddressesdata[0].pincode,
|
||||
|
||||
@ -50,6 +50,11 @@
|
||||
<input matInput type="text" formControlName="pd_applicant_id" placeholder="Applicant Id">
|
||||
</mat-form-field>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="onReset()"
|
||||
matTooltip="Reset" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary">
|
||||
<mat-icon>settings_backup_restore</mat-icon>
|
||||
</button>
|
||||
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="searchItem()"
|
||||
matTooltip="Search" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||
<mat-icon>search</mat-icon>
|
||||
|
||||
@ -36,7 +36,7 @@ export class InprogressPdComponent implements OnInit, OnChanges {
|
||||
progressPdListData:any[] = [];
|
||||
|
||||
// pagination variable details
|
||||
length = 50;
|
||||
length = 5;
|
||||
pageIndex = 0;
|
||||
pageSize = 10;
|
||||
pageEvent: PageEvent;
|
||||
@ -63,10 +63,6 @@ export class InprogressPdComponent implements OnInit, OnChanges {
|
||||
// this.loadPDDetails();
|
||||
// this.getcommonDropDown();
|
||||
}
|
||||
ngAfterViewInit() {
|
||||
this.dataSourceTab2.paginator = this.paginator;
|
||||
this.dataSourceTab2.sort = this.sort;
|
||||
}
|
||||
|
||||
// get changes for filter from parent componnet filter
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
@ -198,10 +194,25 @@ export class InprogressPdComponent implements OnInit, OnChanges {
|
||||
if(res['dataStatus']==true)
|
||||
{
|
||||
this.dataSourceTab2 = res['records'];
|
||||
this.dataSourceTab2.paginator = this.paginator;
|
||||
}else{
|
||||
// this.notifier.notify('warning', 'No Records Found');
|
||||
this.dataSourceTab2 = this.tempStore;
|
||||
this.dataSourceTab2.paginator = this.paginator;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
onReset(){
|
||||
this.searchForm.reset();
|
||||
this.dataSourceTab2 = this.tempStore;
|
||||
this.dataSourceTab2.paginator = this.paginator;
|
||||
this.xpandStatus = false;
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.dataSourceTab2.paginator = this.paginator;
|
||||
this.dataSourceTab2.sort = this.sort;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -50,6 +50,11 @@
|
||||
<input matInput type="text" formControlName="pd_applicant_id" placeholder="Applicant Id">
|
||||
</mat-form-field>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="onReset()"
|
||||
matTooltip="Reset" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary">
|
||||
<mat-icon>settings_backup_restore</mat-icon>
|
||||
</button>
|
||||
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="searchItem()"
|
||||
matTooltip="Search" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||
<mat-icon>search</mat-icon>
|
||||
|
||||
@ -40,7 +40,7 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
|
||||
qcCompletedPdListData: any[] = [];
|
||||
|
||||
// pagination variable details
|
||||
length = 50;
|
||||
length = 5;
|
||||
pageIndex = 0;
|
||||
pageSize = 10;
|
||||
pageEvent: PageEvent;
|
||||
@ -67,6 +67,7 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
|
||||
// this.loadPDDetails();
|
||||
// this.getcommonDropDown();
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.dataSourceTab5.paginator = this.paginator;
|
||||
this.dataSourceTab5.sort = this.sort;
|
||||
@ -80,6 +81,12 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
|
||||
this.dataSourceTab5.filter = filteredText;
|
||||
}
|
||||
|
||||
onReset(){
|
||||
this.searchForm.reset();
|
||||
this.dataSourceTab5 = this.tempStore;
|
||||
this.dataSourceTab5.paginator = this.paginator;
|
||||
this.xpandStatus = false;
|
||||
}
|
||||
// load inprogress pd list
|
||||
|
||||
loadPDDetails() {
|
||||
@ -182,10 +189,12 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
|
||||
this.xpandStatus = false;
|
||||
if (res['dataStatus'] == true) {
|
||||
this.dataSourceTab5 = res['records'];
|
||||
this.dataSourceTab5.paginator = this.paginator;
|
||||
} else {
|
||||
console.log('else');
|
||||
// this.notifier.notify('warning', 'No Records Found');
|
||||
this.dataSourceTab5 = this.tempStore;
|
||||
this.dataSourceTab5.paginator = this.paginator;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@ -50,6 +50,10 @@
|
||||
<input matInput type="text" formControlName="pd_applicant_id" placeholder="Applicant Id">
|
||||
</mat-form-field>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="onReset()"
|
||||
matTooltip="Reset" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary">
|
||||
<mat-icon>settings_backup_restore</mat-icon>
|
||||
</button>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="searchItem()"
|
||||
matTooltip="Search" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||
<mat-icon>search</mat-icon>
|
||||
|
||||
@ -37,7 +37,7 @@ export class ScheduledPdComponent implements OnInit, OnChanges {
|
||||
scheduledPdListData:any[] = [];
|
||||
|
||||
// pagination variable details
|
||||
length = 50;
|
||||
length = 5;
|
||||
pageIndex = 0;
|
||||
pageSize = 10;
|
||||
pageEvent: PageEvent;
|
||||
@ -198,12 +198,21 @@ export class ScheduledPdComponent implements OnInit, OnChanges {
|
||||
if(res['dataStatus']==true)
|
||||
{
|
||||
this.dataSourceTab3 = res['records'];
|
||||
this.dataSourceTab3.paginator = this.paginator;
|
||||
}else{
|
||||
// this.notifier.notify('warning', 'No Records Found');
|
||||
this.dataSourceTab3 = this.tempStore;
|
||||
this.dataSourceTab3.paginator = this.paginator;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
onReset(){
|
||||
this.searchForm.reset();
|
||||
this.dataSourceTab3 = this.tempStore;
|
||||
this.dataSourceTab3.paginator = this.paginator;
|
||||
this.xpandStatus = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -30,9 +30,11 @@
|
||||
<mat-card-content class="matcard" [formGroup]="item">
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="100">
|
||||
<!-- oninput="this.value = this.value.toUpperCase()" -->
|
||||
<mat-form-field style="width: 96%">
|
||||
<input matInput placeholder="Address" formControlName="address"
|
||||
oninput="this.value = this.value.toUpperCase()" required
|
||||
[value]="item.get('address').value | titlecase"
|
||||
required
|
||||
autocomplete="off">
|
||||
<mat-error *ngIf="item.controls['address'].hasError('required')">Address Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
@ -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<AddressComponent>,
|
||||
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;
|
||||
|
||||
@ -22,6 +22,9 @@
|
||||
matTooltip="Remove Business Expense Item" matTooltipPosition="above">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
<mat-form-field style="width: 87%" *ngIf="item.get('expense_item_id').value == 1">
|
||||
<input type="text" matInput placeholder="Specify Business Expense" formControlName="other_expense_item" required>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="item-margin" fxFlex="100">
|
||||
<mat-form-field style="width: 25%">
|
||||
|
||||
@ -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])],
|
||||
|
||||
@ -128,7 +128,7 @@
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-label>Age of Asset in Year</mat-label>
|
||||
<mat-label>Age of Asset in Years</mat-label>
|
||||
<input matInput autocomplete="off" placeholder="eg.99" formControlName="business_vintage"
|
||||
minlength="1" maxlength="2" OnlyNumber type="text" (keyup)="calculateVintagePurchase($event.target.value,i,3)">
|
||||
<!-- <mat-error> Invalid format</mat-error> -->
|
||||
@ -329,7 +329,7 @@
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-label>Age of Asset in Year</mat-label>
|
||||
<mat-label>Age of Asset in Years</mat-label>
|
||||
<input matInput autocomplete="off" placeholder="eg.99" formControlName="business_vintage"
|
||||
minlength="1" maxlength="2" OnlyNumber type="text" (keyup)="calculateVintagePurchase($event.target.value,i,1)">
|
||||
<!-- <mat-error> Invalid format</mat-error> -->
|
||||
|
||||
@ -520,52 +520,52 @@
|
||||
<mat-form-field style="width:42%;" *ngIf="financialForm.controls['other_reason_for_working_capital_facilities_availed']">
|
||||
<input matInput autocomplete="off" placeholder="Others Working Capital Facilities availed"
|
||||
formControlName="other_reason_for_working_capital_facilities_availed">
|
||||
<mat-error *ngIf="financialForm.controls['other_reason_for_working_capital_facilities_availed'].hasError('required')">other_reason_for_working_capital_facilities_availed Required</mat-error>
|
||||
<mat-error *ngIf="financialForm.controls['other_reason_for_working_capital_facilities_availed'].hasError('required')">Other Reason For Working Capital Facilities Availed Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:42%;" *ngIf="financialForm.controls['reason_for_working_capital_facilities_availed']">
|
||||
<input matInput autocomplete="off" placeholder="Details of Others Facility"
|
||||
formControlName="reason_for_working_capital_facilities_availed">
|
||||
<mat-error *ngIf="financialForm.controls['reason_for_working_capital_facilities_availed'].hasError('required')">reason_for_working_capital_facilities_availed Required</mat-error>
|
||||
<mat-error *ngIf="financialForm.controls['reason_for_working_capital_facilities_availed'].hasError('required')">Reason For Working Capital Facilities Availed Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:42%;" *ngIf="financialForm.controls['bank_guarantee']">
|
||||
<input matInput autocomplete="off" placeholder="Details of Bank Guarantee Facility"
|
||||
formControlName="bank_guarantee">
|
||||
<mat-error *ngIf="financialForm.controls['bank_guarantee'].hasError('required')">reason_for_working_capital_facilities_availed Required</mat-error>
|
||||
<mat-error *ngIf="financialForm.controls['bank_guarantee'].hasError('required')">Bank Guarantee Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:42%;" *ngIf="financialForm.controls['cash_credit_limit']">
|
||||
<input matInput autocomplete="off" placeholder="Details of Cash Credit Limit"
|
||||
formControlName="cash_credit_limit">
|
||||
<mat-error *ngIf="financialForm.controls['cash_credit_limit'].hasError('required')">cash_credit_limit Required</mat-error>
|
||||
<mat-error *ngIf="financialForm.controls['cash_credit_limit'].hasError('required')">Cash Credit Limit Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:42%;" *ngIf="financialForm.controls['factoring']">
|
||||
<input matInput autocomplete="off" placeholder="Details of Factoring"
|
||||
formControlName="factoring">
|
||||
<mat-error *ngIf="financialForm.controls['factoring'].hasError('required')">cash_credit_limit Required</mat-error>
|
||||
<mat-error *ngIf="financialForm.controls['factoring'].hasError('required')">Factoring Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
<mat-form-field style="width:42%;" *ngIf="financialForm.controls['letter_of_credit']">
|
||||
<input matInput autocomplete="off" placeholder="Details of Letter of Credit"
|
||||
formControlName="letter_of_credit">
|
||||
<mat-error *ngIf="financialForm.controls['letter_of_credit'].hasError('required')">letter_of_credit Required</mat-error>
|
||||
<mat-error *ngIf="financialForm.controls['letter_of_credit'].hasError('required')">Letter Of Credit Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
<mat-form-field style="width:42%;" *ngIf="financialForm.controls['forfaiting']">
|
||||
<input matInput autocomplete="off" placeholder="Details of Forfaiting"
|
||||
formControlName="forfaiting">
|
||||
<mat-error *ngIf="financialForm.controls['forfaiting'].hasError('required')">forfaiting Required</mat-error>
|
||||
<mat-error *ngIf="financialForm.controls['forfaiting'].hasError('required')">Forfaiting Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
<mat-form-field style="width:42%;" *ngIf="financialForm.controls['od_limit']">
|
||||
<input matInput autocomplete="off" placeholder="Details of OD Limit"
|
||||
formControlName="od_limit">
|
||||
<mat-error *ngIf="financialForm.controls['od_limit'].hasError('required')">forfaiting Required</mat-error>
|
||||
<mat-error *ngIf="financialForm.controls['od_limit'].hasError('required')">OD Limit Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
@ -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 = <FormArray>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 = <FormArray>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(){
|
||||
|
||||
|
||||
@ -92,10 +92,10 @@
|
||||
matTooltipPosition="below">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
<div *ngIf="_generalForm.controls.individuals.value[i].is_person_met_pic != '' ">
|
||||
<div *ngIf="_generalForm.controls.individuals.value[i].is_person_met_pic ">
|
||||
<img mat-card-avatar src="{{_generalForm.controls.individuals.value[i].is_person_met_pic}}" class="ml-0 mt-0 mb-0 mr-2 " ngxViewer>
|
||||
</div>
|
||||
<div *ngIf="_generalForm.controls.individuals.value[i].is_person_met_id_proof != '' ">
|
||||
<div *ngIf="_generalForm.controls.individuals.value[i].is_person_met_id_proof ">
|
||||
<img mat-card-avatar src="{{_generalForm.controls.individuals.value[i].is_person_met_id_proof}}" class="ml-0 mt-0 mb-0 mr-2 " ngxViewer>
|
||||
</div>
|
||||
</mat-cell>
|
||||
@ -149,6 +149,7 @@
|
||||
<mat-form-field style="width: 45%;">
|
||||
<mat-select placeholder="Business Entity Type" formControlName="business_entity_type"
|
||||
(selectionChange)="checkEntityType(com.value.business_entity_type,c)" required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option [value]="entity.business_entity_type_id" *ngFor="let entity of businessEntityTypeList">{{entity.business_entity_type_name}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="com.controls['business_entity_type'].invalid">Business Entity Type Required</mat-error>
|
||||
|
||||
@ -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<GeneralInfoComponent>) {
|
||||
constructor(notifier: NotifierService, private _fb: FormBuilder, private _pd: PdTrigerService, private dialog: MatDialog, @Inject(MAT_DIALOG_DATA) public pd_all_details: any, private dialogRef: MatDialogRef<GeneralInfoComponent>,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 = <FormArray>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 = <FormArray>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 = <FormArray>control.controls[index1];
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -129,3 +129,10 @@ $product-bg-color-hover: rgba(103, 58, 183, 0.7);
|
||||
.empty-spacer {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
@-moz-document url-prefix() {
|
||||
iframe {
|
||||
width:100px;
|
||||
height: 3000px !important;
|
||||
}
|
||||
}
|
||||
@ -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 });
|
||||
}
|
||||
|
||||
|
||||
@ -71,12 +71,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</mat-list-item>
|
||||
<!-- <mat-list-item role="listitem" *ngIf="master.loan_amount">
|
||||
<mat-list-item role="listitem" *ngIf="master.loan_amount">
|
||||
<div fxFlex="70" fxFlexOffset="30" >
|
||||
<div style="font-size:0.9rem !important;">{{master.loan_amount | numberToWords}} Only</div>
|
||||
!-- <div style="font-size:0.9rem !important;">{{ 9999999999 | numberToWords}} Only</div> --
|
||||
<!-- <div style="font-size:0.9rem !important;">{{ 9999999999 | numberToWords}} Only</div> -->
|
||||
</div>
|
||||
</mat-list-item> -->
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
<div>
|
||||
<mat-card-title style="color:#e00201;">Lender Contact Details</mat-card-title>
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
import { NumberToWordsPipe } from './number-to-words.pipe';
|
||||
|
||||
describe('NumberToWordsPipe', () => {
|
||||
it('create an instance', () => {
|
||||
const pipe = new NumberToWordsPipe();
|
||||
expect(pipe).toBeTruthy();
|
||||
});
|
||||
});
|
||||
139
ng6-seed/src/app/quality-check/qc-pipe/number-to-words.pipe.ts
Normal file
139
ng6-seed/src/app/quality-check/qc-pipe/number-to-words.pipe.ts
Normal file
@ -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;
|
||||
// }
|
||||
|
||||
}
|
||||
@ -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]},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user