PD subform changes : ps

This commit is contained in:
venbatechnologies@gmail.com 2018-11-20 19:18:55 +05:30
parent 69897d4143
commit 23eb0edc57
10 changed files with 53 additions and 31 deletions

View File

@ -81,8 +81,8 @@
<div *ngIf="total3 != 0" class="donut-inner"><span>Tele - {{total3}}</span></div>
</div>
</div>
<div fxLayout="row">
<div fxFlex.gt-sm="100" fxFlex="100">
<div fxLayout="row" class="pt-3">
<div fxFlex.gt-sm="100" fxFlex="100" style="text-align:center">
<ul class="lengend-list">
<li class="lengend-element"><span class="oval" style="background-color:#c1c1c1"> &nbsp;&nbsp;&nbsp;&nbsp; </span>&nbsp; Draft</li>
<li class="lengend-element"><span class="oval" style="background-color:#f44336"> &nbsp;&nbsp;&nbsp;&nbsp; </span>&nbsp; Triggered</li>

View File

@ -12,7 +12,7 @@ mat-card-title{
li
{
display:inline;
display:inline-block;
//float:left;
}
@ -30,16 +30,16 @@ li
color: #fff;
}
.lengend-list {
list-style-type: none;
//.lengend-list {
// list-style-type: none;
//margin: 0;
// padding: 0;
overflow: hidden;
text-align:justify;
}
// overflow: hidden;
// text-align:justify;
//}
.lengend-element {
//font-size: 1rem;
font-size: 1rem !important;
padding-right: 3%;
}

View File

@ -1,16 +1,11 @@
//import { Component } from '@angular/core';
import {Component, NgModule, ElementRef, Inject, Injectable, ViewChild} from '@angular/core'
import { FormBuilder, FormGroup, Validators , ValidatorFn, AbstractControl, FormControl} from '@angular/forms'
import { HttpClient } from '@angular/common/http';
import {BrowserModule} from '@angular/platform-browser'
import {ChartsModule, Color} from 'ng2-charts';
import {Observable} from 'rxjs';
import {map, startWith, debounceTime, distinctUntilChanged, switchMap} from 'rxjs/operators';
import { MastersService } from '../settings/service/masters/masters.service';
import { DashboardService } from './dashboard.service';
import { NgxDrpOptions, PresetItem, Range } from 'ngx-mat-daterange-picker';
import { BaseChartDirective } from 'ng2-charts/ng2-charts';
//import { DatePipe } from '@angular/common';
@Component({
selector: 'app-dashboard',
@ -52,9 +47,6 @@ export class DashboardComponent {
total1: number = 0;
total2: number = 0;
total3: number = 0;
total4: number = 0;
total5: number = 0;
total6: number = 0;
flag : number = 0;
// doughnutChartColors: any[] = [{
@ -74,12 +66,8 @@ export class DashboardComponent {
}
};
/** Declaration Part Of SubCard Section */
/** Declaration Part Of Title Section */
alertMessage : any=[];
selectedCity : any=[];
selectedLender : any=[];
/** Declaration Part Of Title Form Section */
myControl = new FormControl();
@ -89,6 +77,8 @@ export class DashboardComponent {
lenderData : any[];
cityData : any[];
selectedCity : any=[];
selectedLender : any=[];
constructor(private _dashboardService: DashboardService,
private _masterService: MastersService) {

View File

@ -117,17 +117,29 @@
<input matInput placeholder="Limit in case of OD / CC account"
formControlName="limit" (keypress)="keyPress($event)" required>
</mat-form-field>
<mat-form-field *ngIf="pd_cus_segment!='SAL-CHQ'">
<mat-form-field *ngIf="pd_cus_segment!='SAL'">
<mat-select placeholder="Is this the main business account"
formControlName="is_main" required>
<mat-option value="Yes">Yes</mat-option>
<mat-option value="No">No</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<!-- <mat-form-field>
<input matInput placeholder="Approximate Vintage"
formControlName="vintage" required>
</mat-form-field> -->
<div>
<label>Approximate Vintage?</label>
<br>
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field>
<input matInput type="number" placeholder="Year" formControlName="vintage_year" required min='0'>
</mat-form-field>
<mat-form-field>
<input matInput type="number" placeholder="Month" formControlName="vintage_month" required min='0' max='12'>
</mat-form-field>
</div>
</div>
<button *ngIf="i > 0" mat-raised-button mat-icon-button matTooltip="Delete" matTooltipPosition="above" (click)="deleteBankdetails(i)">
<mat-icon >delete</mat-icon>
</button>

View File

@ -29,9 +29,11 @@ import {ActivatedRoute, Router} from "@angular/router";
})
export class BankingDetailsComponent implements OnInit {
@Input() pdid: number;
@Input() pd_all_details:any;
public bankingForm: FormGroup;
step: number;
private notifier: NotifierService;
public pd_cus_segment:string;
m_accountType= [];
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
@ -45,6 +47,11 @@ export class BankingDetailsComponent implements OnInit {
this.step = 0;
this.initBankingForm();
this.getM_AccountType();
this.pd_cus_segment = this.pd_all_details.pdmaster_details.customer_segment_abbr.toUpperCase();
// console.log("(0,3): " + this.pd_cus_segment.substring(0,3));
// console.log(this.pd_all_details.pdmaster_details);
// console.log(this.pd_cus_segment);
this.pd_cus_segment = this.pd_cus_segment.substring(0,3);
let params: any = {};
params.pd_id = this.pdid;
params.pd_form_id = '7';
@ -99,7 +106,8 @@ export class BankingDetailsComponent implements OnInit {
salary: ['', Validators.compose([Validators.required])],
limit: ['', Validators.compose([Validators.required])],
is_main: ['', Validators.compose([Validators.required])],
vintage: ['', Validators.compose([Validators.required])],
vintage_year: ['', Validators.compose([Validators.required])],
vintage_month: ['', Validators.compose([Validators.required])],
});
}

View File

@ -61,7 +61,7 @@
</mat-card-header>
<mat-card-content class="matcard">
<mat-form-field>
<input matInput placeholder="Date of Salary" formControlName="when_salary_rcv_date" type="number" min='1' max='31'>
<input matInput placeholder="Date of Salary" formControlName="which_date_the_salary_is_rcv" type="number" min='1' max='31'>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Gross Monthly Salary" formControlName="gross_monthly_salary" (keypress)="keyPress($event)" required>

View File

@ -69,6 +69,7 @@ export class EmploymentInfoComponent implements OnInit {
}
this.employmentForm.controls['attendance_seen'].setValue(value.records.attendance_seen);
this.employmentForm.controls['sal_reg_seen'].setValue(value.records.sal_reg_seen);
this.employmentForm.controls['which_date_the_salary_is_rcv'].setValue(value.records.which_date_the_salary_is_rcv);
this.employmentForm.controls['gross_monthly_salary'].setValue(value.records.gross_monthly_salary);
this.employmentForm.controls['net_monthly_salary'].setValue(value.records.net_monthly_salary);
this.employmentForm.controls['bonus_incentive'].setValue(value.records.bonus_incentive);
@ -100,6 +101,7 @@ export class EmploymentInfoComponent implements OnInit {
confirm_salary_amount: [''],
attendance_seen: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
sal_reg_seen: [this.pd_cus_segment=='SAL-CHQ' ? 'No' : '', Validators.compose([Validators.required])],
which_date_the_salary_is_rcv:[''],
gross_monthly_salary: ['', Validators.compose([Validators.required])],
net_monthly_salary: ['', Validators.compose([Validators.required])],
bonus_incentive: ['', Validators.compose([Validators.required])],
@ -132,6 +134,7 @@ export class EmploymentInfoComponent implements OnInit {
}
records.attendance_seen = this.employmentForm.controls['attendance_seen'].value;
records.sal_reg_seen = this.employmentForm.controls['sal_reg_seen'].value;
records.which_date_the_salary_is_rcv = this.employmentForm.controls['which_date_the_salary_is_rcv'].value;
records.gross_monthly_salary = this.employmentForm.controls['gross_monthly_salary'].value;
records.net_monthly_salary = this.employmentForm.controls['net_monthly_salary'].value;
records.bonus_incentive = this.employmentForm.controls['bonus_incentive'].value;

View File

@ -407,7 +407,7 @@
</ng-container>
<ng-container *ngSwitchCase="7">
<!--<p>Banking details</p>-->
<app-banking-details [pdid]="startPD" ></app-banking-details>
<app-banking-details [pdid]="startPD" [pd_all_details]="pdFullDetails" ></app-banking-details>
</ng-container>
<ng-container *ngSwitchCase="8">
<app-current-loan [pdid]="startPD" [form_id]="selectedFormsCategory.form_id"></app-current-loan>

View File

@ -55,12 +55,12 @@
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
<input matInput placeholder="Email Address" [formControl]="regForm.controls['email']" type="email" required>
<mat-error *ngIf="regForm.controls['email'].hasError('required') && regForm.controls['email'].touched" class="mat-text-warn">email Address Required.</mat-error>
<mat-error *ngIf="regForm.controls['email'].hasError('required') && regForm.controls['email'].touched" class="mat-text-warn">Email Address Required.</mat-error>
<mat-error *ngIf="regForm.controls['email'].errors?.email && regForm.controls['email'].touched" class="mat-text-warn">Invalid Email Address.</mat-error>
</mat-form-field>
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
<input matInput placeholder="Phone Number" [formControl]="regForm.controls['phone']" type="number" required>
<input matInput placeholder="Phone Number" [formControl]="regForm.controls['phone']" required (keypress)="keyPress($event)">
<mat-error *ngIf="regForm.controls['phone'].hasError('required') && regForm.controls['phone'].touched" class="mat-text-warn">Phone Number Required.</mat-error>
<mat-error *ngIf="regForm.controls['phone'].errors?.phone && regForm.controls['phone'].touched" class="mat-text-warn">Invalid Phone Number.</mat-error>

View File

@ -430,5 +430,14 @@ this.loader = true;
delete this.users.localUserId;
this.router.navigate(['setting/users/userlist']);
}
/** On Key Press Event For Numbers */
keyPress(event: any) {
const pattern = /[0-9]/;
let inputChar = String.fromCharCode(event.charCode);
if (event.keyCode != 8 && !pattern.test(inputChar)) {
event.preventDefault();
}
}
}