Fairoj : Issue Fixes and new requirements are implemented

This commit is contained in:
venbatechnologies@gmail.com 2019-10-14 12:00:06 +05:30
parent 13bbd7bd9f
commit da0cd6c132
35 changed files with 389 additions and 54 deletions

View File

@ -1502,6 +1502,11 @@
"positioning": "^1.3.1"
}
},
"angular-csv-ext": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/angular-csv-ext/-/angular-csv-ext-1.0.1.tgz",
"integrity": "sha512-+pB+m5OrI6aRqlRv/Dl+3+z0uxhHfDL9W0uNlhDWKe829itgndhVHcKFhJyeFVhQKIEIBBLzR/sr4+eEns6q3w=="
},
"angular-draggable-droppable": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/angular-draggable-droppable/-/angular-draggable-droppable-2.0.0.tgz",
@ -2506,6 +2511,23 @@
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
},
"cdk-table-exporter": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/cdk-table-exporter/-/cdk-table-exporter-1.2.1.tgz",
"integrity": "sha512-9nGu711YnsBdRb5C45yIMCWXxc/zdJZzq3siwQCWb1zD+cwNNm3+MY1UksL90bhFRkVNXUTumezu1O8AZ9NfbA==",
"requires": {
"file-saver": "^2.0.2",
"tslib": "^1.9.0",
"xlsx": "^0.14.1"
},
"dependencies": {
"file-saver": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/file-saver/-/file-saver-2.0.2.tgz",
"integrity": "sha512-Wz3c3XQ5xroCxd1G8b7yL0Ehkf0TC9oYC6buPFkNnU9EnaPlifeAFCyCh+iewXTyFRcg0a6j3J7FmJsIhlhBdw=="
}
}
},
"cfb": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/cfb/-/cfb-1.1.0.tgz",
@ -7818,6 +7840,15 @@
"object-visit": "^1.0.0"
}
},
"mat-table-exporter": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/mat-table-exporter/-/mat-table-exporter-1.2.1.tgz",
"integrity": "sha512-ldYRm8eIgZKrBEa+/Q1ZifjOKgp3tRt2+b/33podcocH2cMWSu3J6B7VuCnQ38xRReOZcc1kCWgwJhATMTZq9g==",
"requires": {
"cdk-table-exporter": "^1.2.1",
"tslib": "^1.9.0"
}
},
"math-random": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz",
@ -8406,7 +8437,7 @@
},
"supports-color": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
"resolved": "http://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
}
}

View File

@ -36,6 +36,7 @@
"@types/file-saver": "^2.0.0",
"amazon-cognito-identity-js": "^2.0.27",
"angular-calendar": "0.23.3",
"angular-csv-ext": "^1.0.1",
"angular-notifier": "^4.1.1",
"angular-sortablejs": "^2.0.6",
"angular-split": "^3.0.2",
@ -52,6 +53,7 @@
"jquery": "^3.4.1",
"karma-jasmine": "^1.1.1",
"leaflet": "^1.0.2",
"mat-table-exporter": "^1.2.1",
"moment": "^2.15.0",
"ng-pick-datetime": "^6.0.16",
"ng2-charts": "1.6.0",

View File

@ -574,7 +574,7 @@ export class AwsService {
},
{
Name: "custom:role_id" /* required */,
Value: userData.user_role
Value: changeusers.role.role_id
},{
Name:"email_verified",
Value:"true"
@ -600,7 +600,7 @@ export class AwsService {
Value: "+91" + changeusers.phone
},{
Name: "custom:role_id" /* required */,
Value: userData.user_role
Value: changeusers.role.role_id
},{
Name:"email_verified",
Value:"true"
@ -627,7 +627,7 @@ export class AwsService {
Value: "+91" + changeusers.phone
},{
Name: "custom:role_id" /* required */,
Value: userData.user_role
Value: changeusers.role.role_id
},{
Name:"email_verified",
Value:"true"

View File

@ -35,7 +35,7 @@
</mat-form-field>
<mat-form-field style="width: 28%">
<input matInput autocomplete="off" placeholder=" Loan Application ID" formControlName="lender_applicant_id" type="text" required>
<input matInput autocomplete="off" placeholder=" Loan Application ID" formControlName="lender_applicant_id" type="text" required (change)="checkExistPd($event.target.value)">
<!-- <mat-error *ngIf="pdMain.lender_applicant_id.hasError('required')">Applicant ID Required</mat-error> -->
</mat-form-field>
<!-- <div *ngIf="sales_and_credit_enable"> -->
@ -266,7 +266,7 @@
</mat-form-field>
<mat-form-field style="width: 38%" *ngIf="pdMain.fk_customer_segment.value != '8'">
<input matInput autocomplete="off" placeholder="Company / Firm Name" formControlName="company_name" type="text">
<input matInput autocomplete="off" [placeholder]="selected_cus_abbr == 'SEP_INDV' ? 'Nature of Service' : 'Company / Firm Name'" formControlName="company_name" type="text">
</mat-form-field>
<!-- <mat-form-field style="width: 100%">

View File

@ -891,5 +891,20 @@ customerSegmentChange(value){
console.log(this.selected_cus_abbr);
}
checkExistPd(value){
// console.log(value);
let param={lender_applicant_id:value}
this._pd.checkExistPDDetails(param).subscribe(result=>{
if(result['dataStatus']){
if(result['records'].length > 0){
Swal({
title:"Warning!",
type:'warning',
text:"The Entered Loan Application Id ("+value+") is already exists on the Case No. "+result['records'][0].pd_sno})
// this._PDtriggerForm.controls['lender_applicant_id'].setValue('');
}
}
})
}
}

View File

@ -31,7 +31,7 @@
</mat-form-field>
<mat-form-field style="width: 40%" *ngIf="CSAbbr != 'SE-RI'">
<input matInput [placeholder]="selected_cus_abbr == 'SEP_INDV' ? 'Nature of Service' : 'Company / Firm Name'" formControlName="company_name" type="text">
<input matInput [placeholder]="CSAbbr == 'SEP_INDV' ? 'Nature of Service' : 'Company / Firm Name'" formControlName="company_name" type="text">
</mat-form-field>
@ -68,7 +68,7 @@
</mat-form-field>
<mat-form-field style="width: 40%" *ngIf="CSAbbr != 'SE-RI'">
<input matInput placeholder="Company / Firm Name" formControlName="company_name" type="text">
<input matInput [placeholder]="CSAbbr == 'SEP_INDV' ? 'Nature of Service' : 'Company / Firm Name'" formControlName="company_name" type="text">
</mat-form-field>
<mat-form-field style="width: 40%">

View File

@ -48,7 +48,7 @@
<mat-form-field style="width: 29%">
<input matInput placeholder=" Loan Application ID" formControlName="lender_applicant_id"
type="text" required>
type="text" required (change)="checkExistPd($event.target.value)">
</mat-form-field>
<!-- <div *ngIf="sales_and_credit_enable"> -->
<mat-form-field style="width: 28%">

View File

@ -6,6 +6,7 @@ import { NotifierService } from 'angular-notifier';
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
import { TitleCasePipe } from '@angular/common';
import { getRandomString } from 'selenium-webdriver/safari';
import Swal from 'sweetalert2'
@Component({
selector: 'app-edit-pd-master',
@ -819,4 +820,19 @@ checkLender(value){
return this.lenderList.filter(val=>val.entity_id == value).map(mapping=>mapping.short_name)[0]
}
}
checkExistPd(value){
// console.log(value);
let param={lender_applicant_id:value}
this._pd.checkExistPDDetails(param).subscribe(result=>{
if(result['dataStatus']){
if(result['records'].length > 0){
Swal({
title:"Warning!",
type:'warning',
text:"The Entered Loan Application Id ("+value+") is already exists on the Case No. "+result['records'][0].pd_sno})
// this._EditPDtriggerForm.controls['lender_applicant_id'].setValue('');
}
}
})
}
}

View File

@ -18,7 +18,7 @@
<input matInput placeholder="Queries" formControlName="add_requirement">
</mat-form-field>
<!-- <button mat-raised-button mat-icon-button color="primary" matTooltip="Delete" matTooltipPosition="above" (click)="removeRequirements(i)" type="button"><mat-icon>delete</mat-icon></button> -->
<button mat-raised-button mat-icon-button color="primary" matTooltip="Delete" matTooltipPosition="above" (click)="removeRequirements(i)" type="button"><mat-icon>delete</mat-icon></button>
</mat-card-content>
</mat-card>

View File

@ -66,10 +66,10 @@ export class PdRequirementComponent implements OnInit {
}
}
// removeRequirements(index: number) {
// const requirement_control = <FormArray>this._EditPDRequirementForm.controls['additional_requirements'];
// requirement_control.removeAt(index);
// }
removeRequirements(index: number) {
const requirement_control = <FormArray>this._EditPDRequirementForm.controls['addtional_requirements'];
requirement_control.removeAt(index);
}
updateAdditionalRequirement(formValue: any) {
if(this._EditPDRequirementForm.invalid) {

View File

@ -99,9 +99,42 @@ export class ManageSalesComponent implements OnInit {
}
if(this.data.editData.sales_type =="3"){
let control: any = <FormArray>this.salesItemForm.controls['salesCalItemwise'];
control.controls[0].controls['fk_frequency_id'].setValue("");
control.controls[0].controls['fk_frequency_id'].clearValidators();
control.controls[0].controls['fk_frequency_id'].updateValueAndValidity();
control.controls[0].controls['rate_per_unit'].setValue("")
control.controls[0].controls['rate_per_unit'].clearValidators();
control.controls[0].controls['rate_per_unit'].updateValueAndValidity();
control.controls[0].controls['sales_qty'].setValue("");
control.controls[0].controls['sales_qty'].clearValidators();
control.controls[0].controls['sales_qty'].updateValueAndValidity();
control.controls[0].controls['fk_uom_id'].setValue("");
control.controls[0].controls['fk_uom_id'].clearValidators();
control.controls[0].controls['fk_uom_id'].updateValueAndValidity();
// control.controls[0]['controls'].margin_per.setValue('');
control.controls[0]['controls'].margin_per_uom.setValue('')
if(this.data.margin_calculation_status === true){
control.controls[0]['controls'].margin_per.setValidators(Validators.compose([Validators.required]))
control.controls[0]['controls'].margin_per_uom.clearValidators();
control.controls[0]['controls'].margin_per_uom.updateValueAndValidity();
}
else{
control.controls[0]['controls'].margin_per.clearValidators();
control.controls[0]['controls'].margin_per.updateValueAndValidity();
control.controls[0]['controls'].margin_per_uom.clearValidators();
control.controls[0]['controls'].margin_per_uom.updateValueAndValidity();
}
control.controls[0].controls['margin_per_uom'].setValue("");
// console.log(this.data.editData)
// console.log(this.salesItemForm.controls['salesCalItemwise'])
let control: any = <FormArray>this.salesItemForm.controls['salesCalItemwise'];
control.controls[0].addControl('child',this._fb.array([]))
// console.log("control after",control);
let innercontrol:any= control.controls[0].controls['child'] as FormArray
@ -359,6 +392,14 @@ submitDetails(records) {
if (this.salesItemForm.invalid) {
this.validateAllFormFields(this.salesItemForm);
// const invalid = [];
// const controls = this.salesItemForm.controls['salesCalItemwise']['controls'][0];
// for (const name in controls) {
// if (controls[name].invalid) {
// invalid.push(name);
// }
// }
// console.log(invalid);
this.notifier.notify('warning',"Please Check All Manatory Fields..");
return;
}

View File

@ -367,6 +367,14 @@
minlength="1" maxlength="2" OnlyNumber type="text" (keyup)="calculateVintagePurchase($event.target.value,i,3)">
<!-- <mat-error> Invalid format</mat-error> -->
</mat-form-field>
<mat-form-field style="width:45%">
<mat-label>Age of Asset in Months</mat-label>
<input matInput autocomplete="off" placeholder="eg.12" formControlName="asset_months"
minlength="1" maxlength="2" OnlyNumber type="text" (keyup)="calculateVintagePurchase($event.target.value,i,2)">
<!-- <mat-error> Invalid format</mat-error> -->
</mat-form-field>
<mat-form-field style="width:45%">

View File

@ -327,6 +327,7 @@ export class AssetsInfoComponent implements OnInit {
other_owner: [''],
// relation: [''],
vintage_personal: [''],
asset_months:[''],
purchase_year: ['', Validators.compose([Validators.pattern("[1-9]{1}[0-9]{3}")])],
//purchase_month: [''],
emi: [''],
@ -574,6 +575,7 @@ export class AssetsInfoComponent implements OnInit {
other_owner: [data.other_owner || ''],
//relation: [data.relation || ''],
vintage_personal: [data.vintage_personal],
asset_months:[data.asset_months],
purchase_year: [data.purchase_year, Validators.compose([Validators.pattern("[1-9]{1}[0-9]{3}")])],
// purchase_month: [data.purchase_month],
emi: [data.emi || 0],
@ -612,6 +614,7 @@ export class AssetsInfoComponent implements OnInit {
other_owner: val.other_owner,
// relation: val.relation,
vintage_personal: val.vintage_personal,
asset_months:val.asset_months,
purchase_year: val.purchase_year,
// purchase_month: val.purchase_month,
emi: val.emi,
@ -796,7 +799,35 @@ export class AssetsInfoComponent implements OnInit {
// calculate vintage and purchase {}
calculateVintagePurchase(value: any, controlKey: any, type: number) {
if (type == 1) { }
else if (type == 2) { }
else if (type == 2) {
let control: any = <FormArray>this._assetsQuesFrom.controls['assets_details'];
let vintage_personal=control.controls[controlKey].controls['vintage_personal'].value
// control.controls[controlKey].controls['asset_months'].setValue('')
control.controls[controlKey].controls['vintage_personal'].setValue('')
control.controls[controlKey].controls['purchase_year'].setValue('');
if(value >= 12){
let years = Math.floor(value/12);
let months = value % 12;
console.log(years,months);
vintage_personal=parseInt(vintage_personal)+ years
control.controls[controlKey].controls['asset_months'].setValue(months)
}
control.controls[controlKey].controls['vintage_personal'].setValue(vintage_personal)
control.controls[controlKey].controls['purchase_year'].setValue(vintage_personal != '' ? parseInt(this.currentYear) - parseInt(vintage_personal) : '');
if(control.controls[controlKey].controls['asset_months'].value > 0 && (vintage_personal != '' || vintage_personal != 0)){
// vintage_personal=parseInt(vintage_personal)-1
control.controls[controlKey].controls['purchase_year'].setValue(control.controls[controlKey].controls['purchase_year'].value - 1);
}
else if(control.controls[controlKey].controls['asset_months'].value > 0 && control.controls[controlKey].controls['asset_months'].value <12 && (vintage_personal == '' || vintage_personal == 0)){
control.controls[controlKey].controls['purchase_year'].setValue(parseInt(this.currentYear));
}
}
else if (type == 3) {
let control: any = <FormArray>this._assetsQuesFrom.controls['assets_details'];
control.controls[controlKey].controls['purchase_year'].setValue(value != '' ? parseInt(this.currentYear) - parseInt(value) : '');
@ -805,6 +836,7 @@ export class AssetsInfoComponent implements OnInit {
let control: any = <FormArray>this._assetsQuesFrom.controls['assets_details'];
value != '' && value <= this.currentYear ? control.controls[controlKey].controls['purchase_year'].setValue(value) : control.controls[controlKey].controls['purchase_year'].setValue('');
value != '' && value <= this.currentYear ? control.controls[controlKey].controls['vintage_personal'].setValue(parseInt(this.currentYear) - parseInt(value)) : control.controls[controlKey].controls['vintage_personal'].setValue('')
control.controls[controlKey].controls['asset_months'].setValue('')
}
}

View File

@ -163,6 +163,14 @@
(keyup)="calculateVintagePurchase($event.target.value,i,3)">
<!-- <mat-error> Invalid format</mat-error> -->
</mat-form-field>
<mat-form-field style="width:45%">
<mat-label>Age of Asset in Months</mat-label>
<input matInput autocomplete="off" placeholder="eg.12" formControlName="asset_months"
minlength="1" maxlength="2" OnlyNumber type="text" (keyup)="calculateVintagePurchase($event.target.value,i,5)">
<!-- <mat-error> Invalid format</mat-error> -->
</mat-form-field>
<mat-form-field style="width:45%">
<mat-label>Purchase Year</mat-label>
@ -416,6 +424,13 @@
<!-- <mat-error> Invalid format</mat-error> -->
</mat-form-field>
<mat-form-field style="width:45%">
<mat-label>Age of Asset in Months</mat-label>
<input matInput autocomplete="off" placeholder="eg.12" formControlName="asset_months"
minlength="1" maxlength="2" OnlyNumber type="text" (keyup)="calculateVintagePurchase($event.target.value,i,6)">
<!-- <mat-error> Invalid format</mat-error> -->
</mat-form-field>
<mat-form-field style="width:45%">
<mat-label>Purchase Year</mat-label>
<input matInput autocomplete="off" placeholder="YYYY eg.2018"

View File

@ -269,6 +269,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
business_name_of_the_owner: '',
business_name_of_the_other_owner: '',
business_vintage: '',
asset_months:'',
business_purchase_year: '',
business_emi: ''
}
@ -311,6 +312,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
business_name_of_the_owner: '',
business_name_of_the_other_owner: '',
business_vintage: '',
asset_months:'',
business_purchase_year: '',
business_emi: ''
}
@ -402,6 +404,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
business_name_of_the_owner: [''],
business_name_of_the_other_owner: [''],
business_vintage: [''],
asset_months:[''],
business_purchase_year: ['', Validators.compose([Validators.pattern("[1-9]{1}[0-9]{3}")])],
business_emi: [''],
});
@ -424,6 +427,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
business_name_of_the_owner: [''],
business_name_of_the_other_owner: [''],
business_vintage: [''],
asset_months:[''],
business_purchase_year: ['', Validators.compose([Validators.pattern("[1-9]{1}[0-9]{3}")])],
business_emi: [''],
});
@ -571,6 +575,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
business_name_of_the_owner: [data.business_name_of_the_owner],
business_name_of_the_other_owner: [data.business_name_of_the_other_owner || ''],
business_vintage: [data.business_vintage],
asset_months:[data.asset_months],
business_purchase_year: [data.business_purchase_year, Validators.compose([Validators.pattern("[1-9]{1}[0-9]{3}")])],
business_emi: [data.business_emi || ''],
});
@ -591,6 +596,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
business_name_of_the_owner: [data.business_name_of_the_owner],
business_name_of_the_other_owner: [data.business_name_of_the_other_owner || ''],
business_vintage: [data.business_vintage],
asset_months:[data.asset_months],
business_purchase_year: [data.business_purchase_year, Validators.compose([Validators.pattern("[1-9]{1}[0-9]{3}")])],
business_emi: [data.business_emi || ''],
});
@ -681,6 +687,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
business_name_of_the_owner: val.business_name_of_the_owner,
business_name_of_the_other_owner: val.business_name_of_the_other_owner,
business_vintage: val.business_vintage,
asset_months:val.asset_months,
business_purchase_year: val.business_purchase_year,
business_emi: val.business_emi
}
@ -725,6 +732,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
business_name_of_the_other_owner: val.business_name_of_the_other_owner,
business_purchase_year: val.business_purchase_year,
business_vintage: val.business_vintage,
asset_months:val.asset_months,
business_emi: val.business_emi,
};
@ -864,6 +872,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
let control: any = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_details'];
value != '' && value <= this.currentYear ? control.controls[controlKey].controls['business_purchase_year'].setValue(value) : control.controls[controlKey].controls['business_purchase_year'].setValue('');
value != '' && value <= this.currentYear ? control.controls[controlKey].controls['business_vintage'].setValue(parseInt(this.currentYear) - parseInt(value)) : control.controls[controlKey].controls['business_vintage'].setValue('')
control.controls[controlKey].controls['asset_months'].setValue('')
}
if (type == 3) {
let control: any = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
@ -873,6 +882,43 @@ export class BusinessAssetsInfoComponent implements OnInit {
let control: any = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
value != '' && value <= this.currentYear ? control.controls[controlKey].controls['business_purchase_year'].setValue(value) : control.controls[controlKey].controls['business_purchase_year'].setValue('');
value != '' && value <= this.currentYear ? control.controls[controlKey].controls['business_vintage'].setValue(parseInt(this.currentYear) - parseInt(value)) : control.controls[controlKey].controls['business_vintage'].setValue('')
control.controls[controlKey].controls['asset_months'].setValue('')
}
else if(type == 5 || type == 6){
let control: any
if(type == 5){
control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
}
else if(type == 6){
control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_details'];
}
let vintage_personal=control.controls[controlKey].controls['business_vintage'].value
// control.controls[controlKey].controls['asset_months'].setValue('')
control.controls[controlKey].controls['business_vintage'].setValue('')
control.controls[controlKey].controls['business_purchase_year'].setValue('');
if(value >= 12){
let years = Math.floor(value/12);
let months = value % 12;
console.log(years,months);
vintage_personal=parseInt(vintage_personal)+ years
control.controls[controlKey].controls['asset_months'].setValue(months)
}
control.controls[controlKey].controls['business_vintage'].setValue(vintage_personal)
control.controls[controlKey].controls['business_purchase_year'].setValue(vintage_personal != '' ? parseInt(this.currentYear) - parseInt(vintage_personal) : '');
if(control.controls[controlKey].controls['asset_months'].value > 0 && (vintage_personal != '' || vintage_personal != 0)){
// vintage_personal=parseInt(vintage_personal)-1
control.controls[controlKey].controls['business_purchase_year'].setValue(control.controls[controlKey].controls['business_purchase_year'].value - 1);
}
else if(control.controls[controlKey].controls['asset_months'].value > 0 && control.controls[controlKey].controls['asset_months'].value <12 && (vintage_personal == '' || vintage_personal == 0)){
control.controls[controlKey].controls['business_purchase_year'].setValue(parseInt(this.currentYear));
}
}
}

View File

@ -226,6 +226,7 @@
</button>
</mat-card-actions>
</mat-card>
<div #business_activity_type></div>
<mat-card>
<mat-card-header>
<mat-card-title>Type of Business Activity</mat-card-title>
@ -235,7 +236,7 @@
formControlName="type_of_business_activity" required>
<mat-option value="{{type.type_of_activity_id}}" *ngFor="let type of activityData">{{type.name}}</mat-option>
</mat-select> -->
<div fxLayout="row wrap" class="example-section" formArrayName="select_business_activity_type">
<div fxLayout="row wrap" class="example-section" formArrayName="select_business_activity_type" >
<div fxFlex.xs="100" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25"
*ngFor="let entityType of businessForm.controls.select_business_activity_type['controls']; let e = index;"
[formGroupName]="e">

View File

@ -2,7 +2,9 @@ import {
Component,
OnInit,
Inject,
Input
Input,
ElementRef,
ViewChild
} from '@angular/core';
import {
@ -93,6 +95,7 @@ export class BusinessInfoComponent implements OnInit {
temp_noofposmachine: any;
temp_additiondetailofposmachine: any = [];
image_doc_params: { pdid: number; form_id: number; company_id: String; };
@ViewChild('business_activity_type') business_activity_type_scroll : ElementRef
constructor(notifier: NotifierService,
private fb: FormBuilder,
@ -1251,7 +1254,7 @@ export class BusinessInfoComponent implements OnInit {
// if(this.businessForm.controls.partners['controls'].length > 1)
// {}
if (this.businessEntityTypeList.business_entity_type_name == 'OPC (One Person Company)' || this.businessEntityTypeList.business_entity_type_name == 'Sole proprietorship') {
if (this.businessEntityTypeList.business_entity_type_name == 'OPC (One Person Company)' || this.businessEntityTypeList.business_entity_type_name == 'Sole proprietorship' || this.customer_segment_abbr == 'SEP_INDV') {
this.EntityTypeFlag = true;
}
// data.records.forEach(val => {
@ -1519,6 +1522,15 @@ export class BusinessInfoComponent implements OnInit {
}
// let design: any;
let records = this.businessForm.value;
// console.log("cehc",type_of_activity_check)
let type_of_activity_check:any=records.select_business_activity_type.filter(val=>val.exist_status == true)
console.log("cehc",type_of_activity_check)
if(type_of_activity_check.length == 0){
this.notifier.notify('warning',"Please Choose atleast one Business Activity")
// document.getElementById('business_activity_type').scrollIntoView()
this.business_activity_type_scroll.nativeElement.scrollIntoView({ behavior: "smooth", block: "start" })
return;
}
//to check the Appx. sale validation.

View File

@ -35,7 +35,7 @@
<mat-option value="No">No</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:60% !important;" *ngIf="currentLoanForm.controls.existing_loan.value == 'Yes'">
<mat-form-field style="width:60% !important;" *ngIf="currentLoanForm.controls.existing_loan.value == 'Yes' && (product_abbr == 'LAEP' || product_abbr == 'BL' )">
<mat-select (selectionChange)="selectedLoanChanges($event.value)" placeholder="Details of all loan info available"
formControlName="loan_info_available">
<mat-option>Select</mat-option>
@ -43,7 +43,7 @@
<mat-option value="No">No</mat-option>
</mat-select>
</mat-form-field>
<mat-card *ngIf="currentLoanForm.controls.loan_info_available.value == 'Yes' && currentLoanForm.controls.existing_loan.value == 'Yes'">
<div formArrayName="loan_details">

View File

@ -45,6 +45,7 @@ export class CurrentLoanComponent implements OnInit {
mergeCompanyApplicant: any = [];
isOtherLoanTakenBy:any = [];
image_doc_params: { pdid: number; form_id: number; company_id: string; };
product_abbr: any;
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
private router: Router,
@ -63,6 +64,7 @@ export class CurrentLoanComponent implements OnInit {
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
this.image_doc_params={pdid:this.pdid,form_id:this.form_id,company_id:''}
this.product_abbr=this.pd_all_details.pdmaster_details.product_abbr
}
pdf(fileURL){
window.open(fileURL);
@ -428,7 +430,7 @@ export class CurrentLoanComponent implements OnInit {
public initCurrentloanForm(): void {
this.currentLoanForm = this.fb.group({
existing_loan: [''],
loan_info_available:[''],
loan_info_available:[this.product_abbr == 'BL' || this.product_abbr == 'LAEP' ? '' : 'Yes'],
currentloan_remarks: [''],
loan_details: this.fb.array([]),
});

View File

@ -181,7 +181,7 @@ export class GeneralInfoComponent implements OnInit {
this.qualificationList = data.records;
}
if (type == 4) {
this.businessEntityTypeList = data.records;
this.businessEntityTypeList = data.records.filter(val=>val.isactive != '0');
}
}

View File

@ -821,11 +821,28 @@ export class LoanDetailsComponent implements OnInit {
}
}
}
if(this.lenderShortName == 'CLIX'){
this.loanDetailsForm.controls['own_contribution'].setValue('');
this.loanDetailsForm.controls['own_contribution'].clearValidators();
this.loanDetailsForm.controls['own_contribution'].updateValueAndValidity();
this.loanDetailsForm.controls['source'].setValue('');
this.loanDetailsForm.controls['source'].clearValidators();
this.loanDetailsForm.controls['source'].updateValueAndValidity();
console.log("con",this.isContribution);
}
if (!this.loanDetailsForm.valid) {
this.validateAllFormFields(this.loanDetailsForm);
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
const invalid = [];
const controls = this.loanDetailsForm.controls;
for (const name in controls) {
if (controls[name].invalid) {
invalid.push(name);
}
}
console.log(invalid);
this.disableAfterSubmit = false;
return;
}
@ -858,7 +875,7 @@ export class LoanDetailsComponent implements OnInit {
records.balance_transfer_amount = this.loanDetailsForm.controls['balance_transfer_amount'].value;
}
else if (this.loanDetailsForm.controls['is_transfer'].value == 'no') {
if (this.isContribution) {
if (this.isContribution || this.lenderShortName == 'CLIX') {
records.own_contribution = '';
records.source_group = '';
records.other_source = '';

View File

@ -18,11 +18,11 @@
<h5>Credit Managers Specific Queries</h5>
</mat-card-title>
</mat-card-header>
<mat-card style="margin-left: 15px;">
<mat-card style="margin-left: 15px;margin-right: 15px;">
<mat-card-content formArrayName="addtional_requirements">
<div *ngFor="let qu of docsCollectedForm.controls.addtional_requirements['controls'];let i=index;" [formGroupName]="i">
<div *ngFor="let item of queries_docs">
<mat-form-field style="width:50%">
<mat-form-field style="width:90%">
<input matInput type="text" [formControlName]="item.add_req_id" [placeholder]="item.add_requirement">
</mat-form-field>
</div>

View File

@ -1,4 +1,33 @@
.paragraph_change {
color: #fff !important;
background-color: #e00201 !important;
}
// mat-placeholder{
// margin-top: 20px;
// word-wrap: break-word;
// }
// input{
// height:50px;
// }
::-webkit-input-placeholder { /* Chrome/Opera/Safari */
white-space:pre-line;
position:relative;
top:-7px;
}
::-moz-placeholder { /* Firefox 19+ */
white-space:pre-line;
position:relative;
top:-7px;
}
:-ms-input-placeholder { /* IE 10+ */
white-space:pre-line;
position:relative;
top:-7px;
}
:-moz-placeholder { /* Firefox 18- */
white-space:pre-line;
position:relative;
top:-7px;
}

View File

@ -771,5 +771,9 @@ export class PdTrigerService {
datas.fk_createdby=this._aws.getlocale();
return this._http.post(this.apiUrl+'saveApplicantFromGeneralForm',datas)
}
checkExistPDDetails(datas){
return this._http.post(this.apiUrl+'checkExistPDDetails',{records:datas})
.pipe(catchError(this.handleError("checkExistPDDetails",[])))
}
}

View File

@ -79,7 +79,7 @@
</as-split-area>
</as-split>
</as-split-area>
<!-- <as-split-area style="background-color:grey;" [size]="pdf_viewer_split_size" *ngIf="pdf_src !=''">
<as-split-area style="background-color:grey;" [size]="pdf_viewer_split_size" *ngIf="pdf_src !=''">
<as-split direction="vertical">
<as-split-area>
<pdf-viewer [src]="pdf_src"
@ -88,9 +88,9 @@
</as-split-area>
</as-split>
</as-split-area> -->
</as-split-area>
</as-split>
<!-- <button style="position:absolute;z-index:2;bottom:3px;" type="button" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" matTooltip="Preview" matTooltipPosition="above" (click)="getPDreportPDF()" ><mat-icon>remove_red_eye</mat-icon></button> -->
<button style="position:absolute;z-index:2;bottom:3px;" type="button" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" matTooltip="Preview" matTooltipPosition="above" (click)="getPDreportPDF()" ><mat-icon>remove_red_eye</mat-icon></button>
<!-- latestPDDetails.doc_uri -->
</div>

View File

@ -477,18 +477,19 @@ export class QcPdReportComponent implements OnInit {
this.pdf_src=''
this.pdf_viewer_split_size='70'
this.html_viewer_split_size='30'
console.log("data datacontainer",this.dataContainer)
let modifiedHtml=''
if(this.dataContainer != undefined){
modifiedHtml =this.dataContainer.nativeElement.outerHTML;
modifiedHtml =this.dataContainer.nativeElement.innerHTML;
console.log("data datacontainer",this.dataContainer.nativeElement.innerHTML)
}
console.log(this.dataContainer);
let encryptReportRandomString = atob(this.route.snapshot.params['string']);
this.pdTrigerService.getPDReportPDFpreview(encryptReportRandomString,this.startPD,modifiedHtml).subscribe(response=>{
// if(response['dataStatus']){
// 'https://cors-anywhere.herokuapp.com/'
this.pdf_src=response['link']
this.pdf_src='https://cors-anywhere.herokuapp.com/'+response['link'];
// this.pdf_src=response['link']
// window.open(this.pdf_src);
console.log("pdf source",this.pdf_src)
//}

View File

@ -130,7 +130,7 @@ export class QcReviewComponent implements OnInit {
statusChangeClick(): void {
let template = this.ngForm.value;
let savePDRemark_values={'pd_id':this.data.startId,'remark':template.change_status_remark}
let savePDRemark_values={'pd_id':this.data.startId,'remark':template.change_status_remark,is_revert_remark:'1'}
this.serviceFromPD.savePDRemark(savePDRemark_values).subscribe(result=>{
let changeStatus_values={'pd_id':this.data.startId,random_string:this.data.random_string,parent_pd_id:this.data.startId,pd_status:template.pd_status}

View File

@ -3,7 +3,8 @@
<div fxLayout="row" fxLayoutAlign="start center" class="mb-1">
<div class="ml-xs mr-xs" style="width: 100%;">
<mat-card-title><span> PD MIS Report </span>
<button class="btn_export" mat-raised-button color="primary" (click)="exportAsExcel()" [disabled]="dataLength == 0 ? true : false || dataLength == -1 ? true : false" >Export CSV</button>
<button class="btn_export" mat-raised-button color="primary" (click)="exp.exportTable('csv',{fileName:'Daily MIS Report'})" [disabled]="dataLength == 0 ? true : false || dataLength == -1 ? true : false" >Export CSV</button>
<!-- (click)="ExportTOExcel()" -->
</mat-card-title>
</div>
@ -237,7 +238,7 @@
<div class="report-table-container mat-elevation-z8 " #TABLE>
<div *ngIf="dataLength != 0 && dataLength != -1">
<table mat-table #table [dataSource]="dataSource" matSort>
<mat-table matTableExporter [dataSource]="dataSource" matSort #exporter="matTableExporter">
<ng-container matColumnDef="serialno" sticky>
<th mat-header-cell *matHeaderCellDef mat-sort-header>Sr. No. </th>
@ -360,6 +361,24 @@
</td>
</ng-container>
<ng-container matColumnDef="bounced">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Bounced
DD:MM:YYYY HH:MM </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.bounced" mat-line>{{row.bounced | date: 'dd-MM-yyyy hh:mm a'}}</span>
<span *ngIf="!row.bounced" mat-line>00-00-0000 00:00</span>
</td>
</ng-container>
<ng-container matColumnDef="allocated_to_bounced">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Allocated to Bounced
HH:MM:SS </th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.allocated_to_bounced" mat-line>{{row.allocated_to_bounced }}</span>
<span *ngIf="!row.allocated_to_bounced" mat-line>00:00:00</span>
</td>
</ng-container>
<ng-container matColumnDef="accepted">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Accepted
DD:MM:YYYY HH:MM </th>
@ -531,7 +550,7 @@
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;">
</tr>
</table>
</mat-table>
</div>
<div *ngIf="dataLength == 0" class="nocontent ml-xs mr-xs" style="padding: 1rem !important;">No records found</div>
</div>

View File

@ -6,6 +6,7 @@ import { FormGroup, FormControl,FormBuilder } from '@angular/forms';
import * as XLSX from 'xlsx';
import { MatSort,MatPaginator, MatTableDataSource,PageEvent } from '@angular/material';
import { NotifierService } from 'angular-notifier';
import { AngularCsv } from 'angular-csv-ext/dist/Angular-csv';
@Component({
selector: 'app-pd-mis',
@ -48,6 +49,8 @@ export class PdMisComponent implements OnInit {
'draft_to_trigger',
'allocated',
'triggered_to_allocated',
'bounced',
'allocated_to_bounced',
'accepted',
'allocated_to_accepted',
'confirmation_pd_date',
@ -79,6 +82,7 @@ export class PdMisComponent implements OnInit {
constructor(private reportsService:ReportsService,private route:ActivatedRoute,private router:Router,private form_builder:FormBuilder,private notifier:NotifierService) {
this.reportform = this.form_builder.group({ from_date:[null],to_date:[null],city:[null],branch:[null],applicant_id:[null],lender_short_name:[null] });
}
ngOnInit(){
@ -118,6 +122,7 @@ export class PdMisComponent implements OnInit {
@ViewChild(MatSort) sort: MatSort;
// @ViewChild('TABLE') table: ElementRef;
@ViewChild('TABLE',{ read: ElementRef }) table: ElementRef;
@ViewChild('exporter') exp
exportAsExcel():void {
@ -128,7 +133,23 @@ export class PdMisComponent implements OnInit {
/* save to file */
XLSX.writeFile(wb, 'Daily MIS Report.xlsx');
}
exportAsCSV(){
console.log(this.table.nativeElement.innerText,this.exp)
var options = {
fieldSeparator: ',',
quoteStrings: '"',
decimalseparator: '.',
showLabels: true,
showTitle: true,
title: 'Your title',
useBom: true,
noDownload: true,
headers: this.displayedColumns,
nullToEmptyString: true,
};
// console.log(this.table.nativeElement)
new AngularCsv(this.dataSource.data,'sample')
}
ngAfterViewInit() {
this.dataSource.paginator = this.paginator;

View File

@ -26,6 +26,7 @@ import { ReportsService } from '../reports/reports.service';
import { ReportsRoutingModule } from './reports-routing.module';
import { PdMisComponent } from './pd-mis/pd-mis.component';
import {NotifierModule,NotifierOptions} from 'angular-notifier'
import { MatTableExporterModule } from 'mat-table-exporter';
const pdCustomNotifierOptions: NotifierOptions = {
@ -93,6 +94,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
MatTooltipModule,
MatListModule,
MatDatepickerModule,
MatTableExporterModule
],
exports: [MatExpansionModule],
declarations: [PdMisComponent],

View File

@ -78,13 +78,15 @@
<input matInput placeholder="Contact Person Email" formControlName="contact_email">
<mat-error *ngIf="submitted && conts['controls'].contact_email.hasError('required')" class="mat-text-warn">You must Include Contact Person Email.</mat-error>
</mat-form-field>
<button style="float:right;" *ngIf="f_contacts.controls.length > 0" mat-button color="primary" matTooltip="Delete" matTooltipPosition="above" (click)="deleteContacts(i); false"><mat-icon>delete</mat-icon></button>
</div>
</div>
</div>
<button mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above" (click)="addContacts(null); false">Add More</button>
<button style="justify-content:flex-end;" mat-button color="primary" matTooltip="Add More Answer" matTooltipPosition="above" (click)="addContacts(null); false"><mat-icon style="font-size: 34px;">add_circle</mat-icon></button>
<!--<a (click)="addLanguage()" style="cursor: default">Add another Answer </a>-->
</div>
</div>
</div><br/>
<div class="row" style="text-align:right;">
<!-- <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Clear Changes" matTooltipPosition="above" type="button"(click)="onReset()"><mat-icon>settings_backup_restore</mat-icon></button> -->

View File

@ -149,7 +149,7 @@ export class DialogAddEditBillingInfo implements OnInit {
loadContactsDetails(record: any) {
if(record == null || record == undefined){
this.addContacts(null);
// this.addContacts(null);
} else {
if(record.length > 0) {
for (let val of record) {
@ -195,7 +195,7 @@ export class DialogAddEditBillingInfo implements OnInit {
control.push(this.initContacts(conts));
}
removeContacts(i: number) {
deleteContacts(i: number) {
const control = <FormArray>this._editEntityBillingInfoFrom.controls['contacts'];
control.removeAt(i);
}

View File

@ -35,7 +35,7 @@
<mat-error *ngIf="regForm.controls['firstName'].hasError('maxlength') && regForm.controls['firstName'].touched" class="mat-text-warn">Not More Than 10 Characters.</mat-error>
</mat-form-field>
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
<input matInput placeholder="Last Name" [formControl]="regForm.controls['lastName']" required>
<input matInput placeholder="Last Name" [formControl]="regForm.controls['lastName']" >
<mat-error *ngIf="regForm.controls['lastName'].hasError('required') && regForm.controls['lastName'].touched" class="mat-text-warn">Last Name Required.</mat-error>
</mat-form-field>
<mat-form-field style="display: none;">
@ -97,7 +97,7 @@
<mat-card-content>
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" >
<mat-select matInput placeholder="Enitity Type" (selectionChange)="checktype($event.value)" [formControl]="regForm.controls['type']"
<mat-select matInput placeholder="Entity Type" (selectionChange)="checktype($event.value)" [formControl]="regForm.controls['type']"
required>
<mat-option>--</mat-option>
<mat-option *ngFor="let types of types" [value]="types">
@ -109,7 +109,7 @@
</mat-form-field>
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" *ngIf="typeValue == '2'">
<mat-select matInput placeholder="Lender Name" [formControl]="regForm.controls['lenVenName']" required>
<mat-select matInput placeholder="Lender Name" [formControl]="regForm.controls['lenVenName']" >
<mat-option>--</mat-option>
<mat-option *ngFor="let ent of entities" [value]="ent">
{{ent.full_name}}
@ -119,7 +119,7 @@
</mat-form-field>
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" *ngIf="typeValue == '3'">
<mat-select matInput placeholder="Vendor Name" [formControl]="regForm.controls['lenVenName']" required>
<mat-select matInput placeholder="Vendor Name" [formControl]="regForm.controls['lenVenName']" >
<mat-option>--</mat-option>
<mat-option *ngFor="let ent of entities" [value]="ent">
{{ent.full_name}}
@ -129,7 +129,7 @@
</mat-form-field>
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" >
<mat-select matInput placeholder="Role" (selectionChange)="toggleAllSelection($event,regForm.controls['type'].value)" [formControl]="regForm.controls['role']" required>
<mat-select matInput placeholder="Role" (selectionChange)="toggleAllSelection($event,regForm.controls['type'].value)" [formControl]="regForm.controls['role']" >
<mat-option *ngFor="let role of roles" [value]="role" >
{{role.role_name}}
</mat-option>
@ -140,7 +140,7 @@
<mat-error *ngIf="regForm.controls['role'].errors?.phone && regForm.controls['role'].touched" class="mat-text-warn">User Role Required</mat-error>
</mat-form-field>
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" *ngIf="roleAccess">
<mat-select matInput placeholder="PD Team" [formControl]="regForm.controls['pdteam']" required >
<mat-select matInput placeholder="PD Team" [formControl]="regForm.controls['pdteam']" >
<mat-option>--</mat-option>
<mat-option *ngFor="let pd of pdTeam" [value]="pd" >
{{pd.team_name}}

View File

@ -11,6 +11,7 @@ import { UserService } from '../../service/user.service';
import { ifStmt } from '@angular/compiler/src/output/output_ast';
/**sweet alert */
import Swal from 'sweetalert2';
import { NotifierService } from 'angular-notifier';
const pdoff = "PD Officer";
const pdexu = "PD Executive";
@ -58,9 +59,13 @@ export class RegisterComponent implements OnInit {
profileaccess: boolean;
entitiesDetails:any;
entities:any;
notifier:NotifierService;
constructor(
private router: Router, public fb: FormBuilder, public AWS: AwsService, private cd: ChangeDetectorRef
,private elementRef: ElementRef,public users:UserService) { }
,private elementRef: ElementRef,public users:UserService,notifier:NotifierService) {
this.notifier=notifier
// console.log(this.notifier)
}
ngOnInit() {
if (this.users.localUserId != '' && this.users.localUserId != null && this.users.localUserId !== undefined) {
@ -73,18 +78,18 @@ export class RegisterComponent implements OnInit {
this.regForm = this.fb.group({
userid: [null],
firstName: [null, Validators.compose([Validators.required, Validators.minLength(2)])],
lastName: ['', Validators.compose([Validators.required])],
lastName: [''],
phone: [null, Validators.compose([Validators.required, Validators.minLength(10), Validators.maxLength(12)])],
email: [null, Validators.compose([Validators.required, CustomValidators.email])],
role: [null, Validators.compose([Validators.required])],
type: [null, Validators.compose([Validators.required])],
state: [null, Validators.compose([Validators.required])],
city: [null, Validators.compose([Validators.required])],
lenVenName: [null, Validators.compose([Validators.required])],
lenVenName: [null],
userpic: [null],
isactive: [true],
pdteam:[null,Validators.compose([Validators.required])],
pdtype:[null,Validators.compose([Validators.required])],
pdteam:[null],
pdtype:[null],
});
@ -172,6 +177,19 @@ export class RegisterComponent implements OnInit {
register(userData) {
if(this.regForm.invalid){
// this.notifier.notify('success','Please Fill all the Fields')
Swal('Please Fill all the Fields');
const invalid = [];
const controls = this.regForm.controls;
for (const name in controls) {
if (controls[name].invalid) {
invalid.push(name);
}
}
console.log(invalid);
return;
}
// console.log(userData);
let data:any;
@ -189,6 +207,7 @@ export class RegisterComponent implements OnInit {
}
//console.log(this.usersData);
this.loader = true;
console.log("cog",userData,this.usersData)
if (this.usersData === undefined) {
this.AWS.register(userData).subscribe(res => {
if (res.User.UserStatus != '' && res.User.UserStatus !== undefined && res.User.UserStatus != null) {

View File

@ -1,5 +1,5 @@
<mat-selection-list #list [(ngModel)]="selectedOptions" (ngModelChange)="onNgModelChange($event)" class="flexlist">
<mat-list-option *ngFor="let tta of masterFormsList" [value]="tta.form_id">
<mat-list-option *ngFor="let tta of masterFormsList" [value]="tta.pd_form_id" [disabled]="tta.pd_form_id != '13' && tta.is_business_form == '1'">
{{tta.pd_form_name}}
</mat-list-option>
</mat-selection-list>