This commit is contained in:
venbatechnologies@gmail.com 2018-12-21 17:40:08 +05:30
commit 39c1fe0fb0
18 changed files with 792 additions and 259 deletions

View File

@ -146,11 +146,11 @@
</mat-select>
</mat-form-field>
</div>
<!-- <div fxFlex="33" *ngIf="detail.get('investments_type').value == 6 "> -->
<div fxFlex="33" *ngIf="detail.get('investments_type').value == 6 ">
<mat-form-field>
<input matInput placeholder="Specify Other Type" formControlName="other_investments_type" autocomplete="off">
</mat-form-field>
<!-- </div> -->
</div>
<div fxFlex="33" >
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Amount of Investment" formControlName="amount_of_invest" required (keypress)="keyPress($event)" autocomplete="off">

View File

@ -31,6 +31,7 @@ export class AssetsInfoComponent implements OnInit {
pageTitle: string ="Assets Details";
//@Input() pdid: number;
pdid:string;
businessProfessionName :string;
public _assetsQuesFrom: FormGroup;
public submitted = false;
@ -198,7 +199,8 @@ public m_investmentType = [];
ngOnInit() {
this.getPdSupplierFormDetails();
this.getOwnerName();
this.getM_Assets_Type();
this.getM_PropertyType();
this.getM_InvestmentType();
@ -208,6 +210,11 @@ public m_investmentType = [];
}
// ======================
getOwnerName(){
this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid).subscribe(data => {
this.businessProfessionName = (data.status == 200) ? data.records.profession_name : '' ;
});
}
getM_Assets_Type() {
this.pdTrigerService.getAllMasterDatas('ASSETTYPE').subscribe(
@ -361,7 +368,7 @@ public m_investmentType = [];
business_assets_mode: ['', Validators.compose([Validators.required])],
business_details: this._formBuilder.array([]),
business_approximate_market_value: ['', Validators.compose([])],
business_name_of_the_owner: ['', Validators.compose([])],
business_name_of_the_owner: [this.businessProfessionName, Validators.compose([])],
// other_owner:[''],
// relation:[''],
// purchase_year: ['', Validators.compose([])],
@ -556,7 +563,7 @@ public m_investmentType = [];
loadInvestDescriptionWithData(data) {
return this._formBuilder.group({
investments_type: [data.investments_type, Validators.compose([Validators.required])],
other_investment_type : [data.other_investment_type],
other_investments_type : [data.other_investments_type],
amount_of_invest: [data.amount_of_invest, Validators.compose([Validators.required])],
bank_name: [data.bank_name, Validators.compose([Validators.required])]
});

View File

@ -200,4 +200,10 @@
</div>
</mat-dialog-actions>
</form>
</div>
</div>
<div *ngIf="!noRecordsFound">
<div style="margin: 12px; font-size: 18px;"> {{ errorMessage }} </div>
</div>
<!--
<notifier-container></notifier-container>-->

View File

@ -101,6 +101,7 @@ export class ClientInfoComponent implements OnInit {
};
noRecordsFound: Boolean = false;
errorMessage: any = '';
ngOnInit() {
this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid).subscribe(data => {
@ -135,10 +136,12 @@ export class ClientInfoComponent implements OnInit {
}else {
this.notifier.notify('warning', 'No Category Records Found.!');
this.noRecordsFound = false;
this.errorMessage = data.msg;
}
}, err => {
this.notifier.notify('warning', 'No Category Records Found.!');
this.noRecordsFound = false;
this.errorMessage = 'No Records Found , Something went Wrong!';
})
// this.getM_FreqOfPurchase();

View File

@ -46,7 +46,7 @@
<mat-option *ngFor="let freq of frequencyData" value="{{freq.frequency_id}}">{{freq.name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-form-field *ngIf="details.get('frequency').value != ''" >
<input matInput [placeholder]="placeholderName[i] != '' ? placeholderName[i] : 'Instalment Amount' " formControlName="emi" (keypress)="keyPress($event)" required>
</mat-form-field>
<mat-form-field>

View File

@ -103,7 +103,8 @@ export class CurrentLoanComponent implements OnInit {
}
}
} else {
control.push(this.createLoanDetail());
// console.log('overall else');
// control.push(this.createLoanDetail());
}
})
}
@ -116,10 +117,13 @@ export class CurrentLoanComponent implements OnInit {
}
selectedLoanChanges(e): void {
console.log(e);
if (e.value == 'Yes') {
// console.log('if()');
const control = <FormArray>this.currentLoanForm.controls['loan_details'];
control.push(this.createLoanDetail());
} else if (e.value == 'No') {
// console.log('else()');
const arr = <FormArray>this.currentLoanForm.controls.loan_details;
arr.removeAt(0);
}

View File

@ -269,181 +269,277 @@
<!--<h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left" style="padding: 10px !important;">
{{pageTitle}}
</div>
<div fxFlex="30" align="end" style="padding: 10px !important;">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="right"
mat-dialog-close><mat-icon>close</mat-icon></button>
</div>
</h2>
<form *ngIf="noRecordsFound" class="address" [formGroup]="familyForm">
<mat-dialog-content>
<mat-tab-group>
<mat-tab label="Questions">
<ng-template matTabContent>
<div fxLayout="row wrap">
<div fxFlex="100">
<div formArrayName="family_details">
<mat-card *ngFor="let sup of familyForm.controls.family_details['controls']; let ix=index" [formGroupName]="ix">
<mat-card-content>
<div>
<mat-form-field>
<mat-select placeholder="Select a person" formControlName="selected_person" required>
<mat-option value="{{person.pd_co_applicant_id}}" *ngFor="let person of selectPerson">
{{person.applicant_name}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div>
<h5>Residence Details</h5>
<mat-form-field>
<input matInput placeholder="Place" formControlName="residence_place" required>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="City" formControlName="residence_city" required>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="State" formControlName="residence_state" required>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Pin" formControlName="residence_pin" required>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Number of yrs" formControlName="residence_No_of_years" type="number" required>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="Ownership" formControlName="residence_ownership" required>
<mat-option value="{{ownerShip.id}}" *ngFor="let ownerShip of ownerShipData">
{{ownerShip.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="sup.get('residence_ownership').value == 4">
<input matInput placeholder="Please specify" formControlName="ownershipOther">
</mat-form-field>
<mat-form-field *ngIf="sup.get('residence_ownership').value == 3">
<input matInput placeholder="Rent Amount" formControlName="rent">
</mat-form-field>
</div>
<div>
<mat-form-field>
<input matInput placeholder="Number of Family Members" formControlName="total_number_of_family_members" (focusout)="getNumberOfFamilyMemberDetails(ix)"
type="number" max='20' min='1'>
</mat-form-field>
</div>
<div>
<div formArrayName="family_members_details">
<div *ngFor="let item of sup.controls.family_members_details['controls']; let i=index" [formGroupName]="i">
<mat-card>
<div>
<mat-form-field>
<input matInput placeholder="Name" formControlName="family_member_name" required>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="Relationship" formControlName="family_member_relationship" required>
<mat-option value="{{relation.relationship_id}}" *ngFor="let relation of relationData">
{{relation.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Age" formControlName="family_member_age" required>
</mat-form-field>
</div>
<div>
<mat-form-field>
<mat-select placeholder="Earning Status" formControlName="family_member_earning_status" required>
<mat-option value="{{earnings.id}}" *ngFor="let earnings of earningStatus">
{{earnings.type}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div *ngIf="item.get('family_member_earning_status').value == 1">
<mat-form-field>
<mat-select placeholder="Segment" formControlName="earning_segment" required>
<mat-option value="{{segment.customer_segment_id}}" *ngFor="let segment of customerSegData">
{{segment.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Income Per Month" formControlName="earning_gross_income_per_month" required>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Name of the Employer/Business" formControlName="earning_name_of_the_employer_or_business" required>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="No. of years in Employer/Business" formControlName="earning_number_of_years_in_employment_or_business"
required>
</mat-form-field>
</div>
<div *ngIf="item.get('family_member_earning_status').value == 2">
<mat-form-field>
<mat-select placeholder="Occupation" formControlName="non_earning_occupation" required>
<mat-option value="{{occupation.occupation_non_earning_member_id}}" *ngFor="let occupation of occupationData">
{{occupation.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="item.get('non_earning_occupation').value==9">
<input matInput placeholder="Specify Others" formControlName="non_earning_if_others" required>
</mat-form-field>
<mat-form-field *ngIf="item.get('non_earning_occupation').value==3">
<input matInput placeholder="Retired From" formControlName="non_earning_if_retired_from" type="date" required>
</mat-form-field>
</div>
</mat-card>
</div>
</div>
</div>
</mat-card-content>
</mat-card>
</div>
</div>
</div>
</ng-template>
</mat-tab>
<!-- <mat-card style="min-height: 550px;">
<mat-card-content>
<p>Family Details</p>
<form class="address" [formGroup]="familyForm"> -->
<!-- <mat-form-field>
<mat-select placeholder="Person Met" formControlName="person" required>
<mat-option *ngFor="let personMet of personMetData" [value]="personMet.person_met_id">
{{personMet.person_met_name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="person.value ==8">
<input matInput placeholder="Enter the relationship" formControlName="personOther">
</mat-form-field> -->
<!-- <mat-form-field>
<input matInput placeholder="Number Of Family Members" formControlName="members" required>
</mat-form-field>
<mat-card>
<mat-card-header>
<p>Earning Members
</p>
</mat-card-header>
<div formArrayName="earningMembers">
<div *ngFor="let item of familyForm.controls.earningMembers['controls']; let i=index"
[formGroupName]="i">
<mat-card-content class="matcards">
<mat-form-field>
<input matInput placeholder="Name"
formControlName="earning_member_name" required>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Age" (keypress)="keyPress($event)"
formControlName="earning_member_age" required>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="Relation" formControlName="relation" required>
<mat-option value="{{relations.relationship_id}}"
*ngFor="let relations of relationData">
{{relations.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="Segment" formControlName="segment" required>
<mat-option value="{{cusSeg.customer_segment_id}}"
*ngFor="let cusSeg of customerSegData">
{{cusSeg.name}}
</mat-option>
<mat-tab label="Docs">
<ng-template matTabContent>
<div ngxViewer>
<div fxLayout="row wrap" style="padding:20px;">
<div fxFlex="100">
<div fxFlex="20" class="m-gap p-gap">
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
<div class="p-list">
<div class="top"> <img src="https://picsum.photos/2000/1500/?random=1" alt="Image 1"></div>
</div>
</div>
</div>
<div fxFlex="20" class="m-gap p-gap">
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
<div class="p-list">
<div class="top"> <img src="https://picsum.photos/2000/1500/?random=2" alt="Image 2"></div>
</div>
</div>
</div>
<div fxFlex="20" class="m-gap p-gap">
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
<div class="p-list">
<div class="top"><img src="https://picsum.photos/2000/1500/?random=3" alt="Image 3"></div>
</div>
</div>
</div>
<div fxFlex="20" class="m-gap p-gap">
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
<div class="p-list">
<div class="top"> <img src="https://picsum.photos/2000/1500/?random=2" alt="Image 2"></div>
</div>
</div>
</div>
<div fxFlex="20" class="m-gap p-gap">
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
<div class="p-list">
<div class="top"><img src="https://picsum.photos/2000/1500/?random=3" alt="Image 3"></div>
</div>
</div>
</div>
<div fxFlex="20" class="m-gap p-gap">
<div class="p-list-main mb-2" style="width: 60%;height: auto;">
<div class="p-list">
<div class="top"> <img src="https://picsum.photos/2000/1500/?random=1" alt="Image 1"></div>
</div>
</div>
</div>
</div>
<div fxFlex="row">
<div fxFlex="100" class="m-gap p-gap">
<div fxLayout="row" fxLayoutWrap="wrap">
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
<a href="http://www.google.com">
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
</div>
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
<a href="http://www.google.com">
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
</div>
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
<a href="http://www.google.com">
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
</div>
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
<a href="http://www.google.com">
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
</div>
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
<a href="http://www.google.com">
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
</div>
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
<a href="http://www.google.com">
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
</div>
</div>
<div fxLayout="row" fxLayoutWrap="wrap">
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
<a href="http://www.google.com">
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
</div>
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
<a href="http://www.google.com">
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
</div>
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
<a href="http://www.google.com">
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
</div>
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="25" fxFlex.lg="25" fxFlex.xl="25">
<a href="http://www.google.com">
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
</div>
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
<a href="http://www.google.com">
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
</div>
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20">
<a href="http://www.google.com">
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;">picture_as_pdf</mat-icon> <span class="d-block">version_111</span></a>
</div>
</div>
</div>
</div>
</div>
</div>
</ng-template>
</mat-tab>
</mat-select>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Income / Revenue"
formControlName="income" required>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Name of Employer / Business"
formControlName="employer_name" required>
</mat-form-field>
<button type="button" mat-raised-button mat-icon-button *ngIf="i==0" color="primary"
matTooltip="Add More Earning Members" matTooltipPosition="above" (click)="addearningMembers()">
<mat-icon>add</mat-icon>
</button>
<button type="button" mat-raised-button mat-icon-button
matTooltip="Delete" matTooltipPosition="above" (click)="deleteEarningMembers(i)" *ngIf="i>0">
<mat-icon>delete</mat-icon>
</button>
</mat-card-content>
</div>
</div>
</mat-card>
<mat-card>
<mat-card-header>
<p>Non Earning Members
</p>
</mat-card-header>
<div formArrayName="nonEarningMembers">
<div *ngFor="let members of familyForm.controls.nonEarningMembers['controls']; let i=index"
[formGroupName]="i">
<mat-card-content class="matcard">
<mat-form-field>
<input matInput placeholder="Name"
formControlName="non_earning_member_name" required>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Age" (keypress)="keyPress($event)"
formControlName="non_earning_member_age" required>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="Relation"
formControlName="relationship" required>
<mat-option value="{{relation.relationship_id}}"
*ngFor="let relation of relationData">
{{relation.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="Occupation"
formControlName="occupation" required>
<mat-option value="{{occupation.occupation_non_earning_member_id}}"
*ngFor="let occupation of occupationData">{{occupation.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="members['controls'].occupation.value==3">
<input matInput placeholder="Retired From"
formControlName="retired">
</mat-form-field>
<mat-form-field *ngIf="members['controls'].occupation.value==9">
<input matInput placeholder="Specify Others Occupation"
formControlName="others_occupation">
</mat-form-field>
<button type="button" mat-raised-button mat-icon-button (click)="addMembers()" color="primary"
matTooltip="Add More Non Earning Members" matTooltipPosition="above" *ngIf="i==0">
<mat-icon>add</mat-icon>
</button>
<button type="button" mat-raised-button mat-icon-button (click)="deleteMembers(i)"
matTooltip="Delete" matTooltipPosition="above" *ngIf="i>0">
<mat-icon>delete</mat-icon>
</button>
</mat-card-content>
</div>
</div>
</mat-card>
<mat-card>
<mat-card-header>
<p>Residence </p>
</mat-card-header>
<mat-card-content class="matcard">
<mat-form-field>
<input matInput placeholder="Residence Address"
formControlName="residence" required>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Number of yrs" formControlName="years" required>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="Ownership" formControlName="ownership" required>
<mat-option value="{{ownerShip.id}}"
*ngFor="let ownerShip of ownerShipData">
{{ownerShip.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="ownership.value ==4">
<input matInput placeholder="Please specify" formControlName="ownershipOther">
</mat-form-field>
<mat-form-field *ngIf="ownership.value ==3">
<input matInput placeholder="Rent Amount"
formControlName="rent">
</mat-form-field>
</mat-card-content>
</mat-card>
<div fxLayout="row">
<div fxFlex="60" class="pb-0 text-sm-left">
<mat-form-field appearance="outline" style="width: 100%">
</mat-tab-group>
</mat-dialog-content>
<mat-dialog-actions>
<div fxFlex="60" class="pb-0 text-sm-left" align="left">
<mat-form-field appearance="outline" style="width: 100%">
<mat-label>Remarks</mat-label>
<textarea matInput placeholder="Remarks" formControlName="family_details_form_remark"></textarea>
</mat-form-field>
</div>
</div>
<div style="text-align: right;">
<button type="submit" mat-raised-button mat-icon-button type="submit" matTooltip="Submit" matTooltipPosition="above" (click)="submitFamily()"><mat-icon>save</mat-icon>
</button>
</div>
</form>
</mat-form-field>
</div>
<div fxFlex="40" align="end">
<button mat-raised-button mat-icon-button mat-button color="primary" matTooltip="Add More Applicant Family Details" matTooltipPosition="above"
class="mr-1 mb-1 hover-icon" (click)="addMoreApplicantFamilyDetails($event); false"><mat-icon>add</mat-icon></button>
<button type="submit" mat-raised-button mat-icon-button type="submit" matTooltip="Submit" matTooltipPosition="above" (click)="submitFamily()"><mat-icon>save</mat-icon></button>
</div>
</mat-dialog-actions>
</mat-card-content>
</mat-card> -->
</form>
<notifier-container></notifier-container>-->

View File

@ -254,4 +254,354 @@ export class FamilyDetailsComponent implements OnInit {
// }
// }
}
}
// =================== other family details multiple add
// import {
// Component,
// OnInit,
// Inject,
// Input, Output
// } from '@angular/core';
// import {
// FormBuilder,
// FormGroup,
// Validators,
// FormArray, FormControl, AbstractControl,
// } from '@angular/forms';
// import { NotifierService } from 'angular-notifier';
// import {
// MatDialog,
// MatDialogRef,
// MAT_DIALOG_DATA
// } from '@angular/material';
// /** Service */
// import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
// import {ActivatedRoute, Router} from "@angular/router";
// @Component({
// selector: 'app-family-details',
// templateUrl: './family-details.component.html',
// styleUrls: ['./family-details.component.scss']
// })
// export class FamilyDetailsComponent implements OnInit {
// //@Input() pdid: number;
// pageTitle: string ="Other Family Details";
// pdid : string;
// form_id : number;
// private notifier: NotifierService;
// public familyForm: FormGroup;
// public selectPerson;
// // selectPerson = [{
// // name : 'person 1',
// // id : 111
// // }, {
// // name : 'person 2',
// // id : 222
// // }];
// earningStatus = [{
// type: 'Earning',
// id: 1
// }, {
// type: 'Non Earning',
// id: 2
// }]
// relationData: any = [];
// occupationData: any = [];
// //personMetData: any = [];
// ownerShipData: any = [];
// customerSegData: any = [];
// // earnMemberArrCount :any ;
// // nonEarnMemberArrCount :any ;
// count : number;
// constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
// private router: Router,
// private _pd: PdTrigerService,
// @Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
// console.log(pd_all_details);
// this.selectPerson = this.pd_all_details.pdapplicants_detials;
// this.pdid = this.pd_all_details.pdmaster_details.pd_id;
// this.form_id = 6;
// this.notifier = notifier;
// }
// ngOnInit() {
// this.getMasterDetails('RELATIONSHIPS',1);
// this.getMasterDetails('OCCUPATIONMEMBERS',2);
// //this.getMasterDetails('PERSONSMET',3);
// this.getMasterDetails('RESIDENCEOWNERSHIP',4);
// this.getMasterDetails('CUSTOMERSEGMENT',5);
// this.initFamilyFormDetails();
// let params: any = {};
// params.pd_id = this.pdid;
// params.pd_form_id = '6';
// this._pd.retriveForm(params).subscribe(data => {
// const control = <FormArray>this.familyForm.controls['nonEarningMembers'];
// const value = <FormArray>this.familyForm.controls['earningMembers'];
// if (data.status == 200) {
// this.initFamilyForm(data.records);
// // this.familyForm.controls.selected_person.setValue(data.records.selected_person);
// // this.familyForm.controls.residence_place.setValue(data.records.residence_place);
// // this.familyForm.controls.residence_city.setValue(data.records.residence_city);
// // this.familyForm.controls.residence_state.setValue(data.records.residence_state);
// // this.familyForm.controls.residence_pin.setValue(data.records.residence_pin);
// // this.familyForm.controls.residence_No_of_years.setValue(data.records.residence_No_of_years);
// // this.familyForm.controls.residence_ownership.setValue(data.records.residence_ownership);
// // this.familyForm.controls.ownershipOther.setValue(data.records.ownershipOther);
// // this.familyForm.controls.rent.setValue(data.records.rent);
// // this.familyForm.controls.total_number_of_family_members.setValue(data.records.total_number_of_family_members);
// // this.familyForm.controls.family_details_form_remark.setValue(data.records.family_details_form_remark);
// // this.generateFamilyMembersDetailsGetData(data.records.family_members_details);
// } else {
// // value.push(this.createMembers());
// // control.push(this.createNonMembers());
// }
// });
// }
// initgenerateFamilyMembersDetailsGet(val): FormGroup {
// return this.fb.group({
// family_member_name : [val.family_member_name, Validators.compose([])],
// family_member_relationship : [val.family_member_relationship, Validators.compose([])],
// family_member_age : [val.family_member_age, Validators.compose([])],
// family_member_earning_status : [val.family_member_earning_status, Validators.compose([])],
// earning_segment: [val.earning_segment, Validators.compose([])],
// earning_gross_income_per_month: [val.earning_gross_income_per_month, Validators.compose([])],
// earning_name_of_the_employer_or_business: [val.earning_name_of_the_employer_or_business, Validators.compose([])],
// earning_number_of_years_in_employment_or_business: [val.earning_number_of_years_in_employment_or_business, Validators.compose([])],
// non_earning_occupation: [val.non_earning_occupation, Validators.compose([])],
// non_earning_if_others: [val.non_earning_if_others, Validators.compose([])],
// non_earning_if_retired_from: [val.non_earning_if_retired_from, Validators.compose([])],
// })
// }
// generateFamilyMembersDetailsGetData(data) {
// var result = Object.keys(data).map(function (key) {
// return data[key];
// });
// if (result.length > 0) {
// for (let val of result) {
// const control = <FormArray>this.familyForm.controls['family_members_details'];
// control.push(this.initgenerateFamilyMembersDetailsGet(val));
// }
// }
// }
// onSearchChange(e):void {
// e.preventDefault();
// }
// public initFamilyFormDetails(): void {
// this.familyForm = this.fb.group({
// family_details: this.fb.array([]),
// family_details_form_remark: ['']
// })
// }
// public noRecordsFound: Boolean = false;
// public initFamilyForm(records): void {
// // let data = [...records];
// let recordss = {
// "selected_person":"95",
// "residence_place":"check ",
// "residence_city":"check ",
// "residence_state":"check ",
// "residence_pin":"123456",
// "residence_No_of_years":"2",
// "residence_ownership":"1",
// "ownershipOther":"",
// "rent":"",
// "total_number_of_family_members":"2",
// "family_members_details":{
// "1":{
// "family_member_name":"name",
// "family_member_relationship":"1",
// "family_member_age":"21",
// "family_member_earning_status":"1",
// "earning_segment":"1",
// "earning_gross_income_per_month":"12000",
// "earning_name_of_the_employer_or_business":"check",
// "earning_number_of_years_in_employment_or_business":"2",
// "non_earning_occupation":"",
// "non_earning_if_others":"",
// "non_earning_if_retired_from":""
// },
// "2":{
// "family_member_name":"chekc ",
// "family_member_relationship":"2",
// "family_member_age":"31",
// "family_member_earning_status":"2",
// "earning_segment":"",
// "earning_gross_income_per_month":"",
// "earning_name_of_the_employer_or_business":"",
// "earning_number_of_years_in_employment_or_business":"",
// "non_earning_occupation":"9",
// "non_earning_if_others":"others check ",
// "non_earning_if_retired_from":""
// }
// },
// "family_details_form_remark":"check remark"
// };
// if(recordss === null) {
// this.fb.group({
// selected_person: ['', Validators.compose([Validators.required])],
// residence_place: ['', Validators.compose([])],
// residence_city: ['', Validators.compose([])],
// residence_state: ['', Validators.compose([])],
// residence_pin: ['', Validators.compose([])],
// residence_No_of_years: ['', Validators.compose([])],
// residence_ownership: ['', Validators.compose([])],
// ownershipOther: [''],
// rent: [''],
// total_number_of_family_members: ['', Validators.compose([Validators.min(1), Validators.max(20)])],
// family_members_details: this.fb.array([this.addFamilyMemberDetails()]),
// });
// } else {
// let formData: FormGroup = this.fb.group({
// selected_person: ['1', Validators.compose([Validators.required])],
// residence_place: ['as', Validators.compose([])],
// residence_city: ['as', Validators.compose([])],
// residence_state: ['sa', Validators.compose([])],
// residence_pin: ['sa', Validators.compose([])],
// residence_No_of_years: ['sa', Validators.compose([])],
// residence_ownership: ['s', Validators.compose([])],
// ownershipOther: ['s'],
// rent: ['as'],
// total_number_of_family_members: ['1', Validators.compose([Validators.min(1), Validators.max(20)])],
// family_members_details: this.fb.array([]),
// });
// const control = <FormArray>this.familyForm.controls['family_details'];
// control.push(formData);
// console.log(this.familyForm.value);
// }
// this.noRecordsFound = true;
// }
// addFamilyMemberDetails(): void {
// }
// addMoreApplicantFamilyDetails(e): void {
// e.stopPropagation();
// this.initFamilyForm('chck');
// }
// getNumberOfFamilyMemberDetails(inx){
// // alert(inx);
// let formData = <FormArray>this.familyForm.controls['family_details']['controls'][inx].controls;
// // alert(formData['total_number_of_family_members'].value);
// // alert(this.familyForm.controls.total_number_of_family_members.valid);
// if(formData['total_number_of_family_members'].valid){
// let totalMem = formData['total_number_of_family_members'].value;
// const control = <FormArray>this.familyForm.controls['family_details']['controls'][inx].controls.family_members_details;
// if(totalMem > control.length) {
// let len = totalMem - control.length;
// for(let i = 0; i < len; i++){
// control.push(this.generateFamilyMembersDetailsGet());
// }
// } else if (totalMem < control.length) {
// // control.controls.slice(0, totalMem);
// control.controls = [];
// for(let i = 0; i < totalMem; i++){
// control.push(this.generateFamilyMembersDetailsGet());
// }
// }
// } else {
// }
// }
// generateFamilyMembersDetailsGet(): FormGroup {
// return this.fb.group({
// family_member_name : ['', Validators.compose([])],
// family_member_relationship : ['', Validators.compose([])],
// family_member_age : ['', Validators.compose([])],
// family_member_earning_status : ['', Validators.compose([])],
// earning_segment: ['', Validators.compose([])],
// earning_gross_income_per_month: ['', Validators.compose([])],
// earning_name_of_the_employer_or_business: ['', Validators.compose([])],
// earning_number_of_years_in_employment_or_business: ['', Validators.compose([])],
// non_earning_occupation: ['', Validators.compose([])],
// non_earning_if_others: ['', Validators.compose([])],
// non_earning_if_retired_from: ['', Validators.compose([])],
// })
// }
// // get all master details
// getMasterDetails(table:string,type:number){
// this._pd.getAllMasterDatas(table).subscribe(
// data => {
// if (data.status == 200) {
// if(type==1){
// this.relationData=data.records.filter(item => item.isactive == 1);
// }
// else if(type==2){
// this.occupationData=data.records.filter(item => item.isactive == 1);
// }
// // else if(type==3){
// // this.personMetData=data.records.filter(item => item.isactive == 1);
// // }
// else if(type==4){
// this.ownerShipData=data.records.filter(item => item.isactive == 1);
// }
// else if(type==5){
// this.customerSegData=data.records.filter(item => item.isactive == 1);
// }
// }
// });
// }
// submitFamily() {
// if (!this.familyForm.valid) {
// return;
// }
// var records = this.familyForm.value;
// //To Remove The "Null" With Key also
// Object.keys(records).forEach((key) => (records[key] == null) && delete records[key]);
// // records.other_family_details = answerFormValues;
// records.pdid = this.pdid;
// records.formid = '6';
// // records.fk_createdby = '251';
// console.log(JSON.stringify(records));
// this._pd.saveForm(records).subscribe(data => {
// this.notifier.notify('success', 'Saved Successfully.');
// }, error => {
// this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
// });
// }
// // validateAllFormFields(formGroup: FormGroup) {
// // Object.keys(formGroup.controls).forEach(field => {
// // const control = formGroup.get(field);
// // if (control instanceof FormControl) {
// // control.markAsTouched({onlySelf: true});
// // } else if (control instanceof FormGroup) {
// // this.validateAllFormFields(control);
// // }
// // });
// // }
// // /** On Key Press Event For Age */
// // keyPress(event: any) {
// // const pattern = /[0-9]/;
// // let inputChar = String.fromCharCode(event.charCode);
// // if (event.keyCode != 8 && !pattern.test(inputChar)) {
// // event.preventDefault();
// // }
// // }
// }

View File

@ -135,7 +135,7 @@
<input matInput placeholder="Net Loss" formControlName="estimate_net_loss" (change)="calMarginVal( i, details); calVariation( i, details)" required>
</mat-form-field>
<mat-form-field>
<input matInput disabled placeholder="Margin" formControlName="estimate_margin_of_loss" (keypress)="keyPress($event)" (change)="calAmount( i, details); calVariation( i, details)" required>
<input matInput disabled placeholder="Margin" formControlName="estimate_margin_of_loss" (keypress)="keyPress($event)" (change)="calAmount(i, details); calVariation( i, details)" required>
</mat-form-field>
</span>
<mat-form-field *ngIf="i != 0" style="width:65%">

View File

@ -35,8 +35,9 @@
<mat-card-title>{{relation.controls.applicant_name.value | titlecase}}</mat-card-title>
</mat-card-header>
<mat-card-content>
<mat-form-field style="width: 50%" *ngIf="relation.controls.company_name.value">
<input matInput placeholder="Company / Firm" formControlName="company_name" type="text">
<input matInput placeholder="Company / Firm" formControlName="company_name" [readonly]="true" type="text">
</mat-form-field>
<mat-form-field style="width: 40%" *ngIf="relation.controls.company_name.value">
<mat-select placeholder="Relation" formControlName="company_relationship">
@ -66,7 +67,17 @@
</mat-option>
</mat-select>
</mat-form-field>
<div align="end" *ngIf="relation.controls.pd_co_applicant_id.value==0">
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeOthers(r,relation.value)"
matTooltip="Delete" matTooltipPosition="above">
<mat-icon>delete</mat-icon>
</button>
</div>
</mat-card-content>
</mat-card>
</div>
</div>

View File

@ -127,7 +127,7 @@ export class GeneralInfoComponent implements OnInit {
return this._fb.group({
pd_co_applicant_id: [elementValue.pd_co_applicant_id],
applicant_name: [elementValue.applicant_name],
company_name: [elementValue.company_name],
company_name: [elementValue.company_name,],
exist_status:[elementValue.exist_status==1 && elementValue.pd_co_applicant_id > 0 ? true : false]
});
}
@ -192,6 +192,18 @@ export class GeneralInfoComponent implements OnInit {
}
}
// remove other details
removeOthers(index, item: any){
console.log(item)
if(item.pd_co_applicant_id==0){
let relationControl = <FormArray>this._generalForm.controls['applicant_relation'];
relationControl.removeAt(index);
// remove related to details
let pos_name=this.fetch_related_details.indexOf(item.applicant_name);
this.fetch_related_details.splice(pos_name, 1);
}
}
// submit form details
submitGeneralForm(formData:any) {
if (this._generalForm.invalid) {

View File

@ -50,7 +50,7 @@
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Estimated Value of Stock Observed" formControlName="raw_value" (keypress)="keyPress($event)" required>
<!-- <mat-hint align="end" *ngIf="mrm.get('raw_value').value != ''">{{"&#8377;"}} {{rawValueInWords}} Only</mat-hint> (keyup)="inWords($event,1)" -->
<mat-hint align="end" *ngIf="mrm.get('raw_value').value != ''">{{"&#8377;"}} {{M_rawValueInWords}} Only</mat-hint> (keyup)="inWords($event,1)"
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Value of raw materials as per latest financial Statements" formControlName="rawmaterial_value" (keypress)="keyPress($event)" required>
@ -97,7 +97,7 @@
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Estimated Value of Stock Observed" formControlName="goods_value" (keypress)="keyPress($event)" required>
<!-- <mat-hint align="end" *ngIf="mfg.get('goods_value').value != ''">{{"&#8377;"}} {{goodsValueInWords}} Only</mat-hint> (keyup)="inWords($event,2)" -->
<mat-hint align="end" *ngIf="mfg.get('goods_value').value != ''">{{"&#8377;"}} {{M_goodsValueInWords}} Only</mat-hint> (keyup)="inWords($event,2)"
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Value of finished goods as per latest financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" required>
@ -145,7 +145,7 @@
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" (keypress)="keyPress($event)" required>
<!-- <mat-hint align="end" *ngIf="mtg.get('estimated_traded_goods_value').value != ''">{{"&#8377;"}} {{tradedGoodsValueInWords}} Only</mat-hint>(keyup)="inWords($event,3)" -->
<mat-hint align="end" *ngIf="mtg.get('estimated_traded_goods_value').value != ''">{{"&#8377;"}} {{M_tradedGoodsValueInWords}} Only</mat-hint>(keyup)="inWords($event,3)"
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Value of traded goods as per latest financial statements" formControlName="traded_goods_value" (keypress)="keyPress($event)" required>
@ -205,7 +205,7 @@
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Estimated Value of Stock Observed" formControlName="goods_value" (keypress)="keyPress($event)" required>
<!-- <mat-hint align="end" *ngIf="retailfg.get('goods_value').value != ''">{{"&#8377;"}} {{goodsValueInWords}} Only</mat-hint>(keyup)="inWords($event,2)" -->
<mat-hint align="end" *ngIf="retailfg.get('goods_value').value != ''">{{"&#8377;"}} {{R_goodsValueInWords}} Only</mat-hint>(keyup)="inWords($event,4)"
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Value of finished goods as per latest financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" required>
@ -254,7 +254,7 @@
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" (keypress)="keyPress($event)" required>
<!-- <mat-hint align="end" *ngIf="item.get('estimated_traded_goods_value').value != ''">{{"&#8377;"}} {{tradedGoodsValueInWords}} Only</mat-hint>(keyup)="inWords($event,3)" -->
<mat-hint align="end" *ngIf="item.get('estimated_traded_goods_value').value != ''">{{"&#8377;"}} {{R_tradedGoodsValueInWords}} Only</mat-hint>(keyup)="inWords($event,5)"
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Value of traded goods as per latest financial statements" formControlName="traded_goods_value" (keypress)="keyPress($event)" required>
@ -315,7 +315,7 @@
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Estimated Value of Stock Observed" formControlName="goods_value" (keypress)="keyPress($event)" required>
<!-- <mat-hint align="end" *ngIf="tradesubdetail.get('goods_value').value != ''">{{"&#8377;"}} {{goodsValueInWords}} Only</mat-hint>(keyup)="inWords($event,2)" -->
<mat-hint align="end" *ngIf="tradesubdetail.get('goods_value').value != ''">{{"&#8377;"}} {{T_goodsValueInWords}} Only</mat-hint>(keyup)="inWords($event,6)"
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Value of finished goods as per latest financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" required>
@ -365,7 +365,7 @@
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" (keypress)="keyPress($event)" required>
<!-- <mat-hint align="end" *ngIf="tradetg.get('estimated_traded_goods_value').value != ''">{{"&#8377;"}} {{tradedGoodsValueInWords}} Only</mat-hint> (keyup)="inWords($event,3)" -->
<mat-hint align="end" *ngIf="tradetg.get('estimated_traded_goods_value').value != ''">{{"&#8377;"}} {{T_tradedGoodsValueInWords}} Only</mat-hint> (keyup)="inWords($event,7)"
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Value of traded goods as per latest financial statements" formControlName="traded_goods_value" (keypress)="keyPress($event)" required>
@ -399,6 +399,13 @@
</div>
</mat-card>
<mat-card *ngIf="serviceProviderForm">
<mat-card-header>
<p>Service Provider</p>
</mat-card-header>
<div style="text-align: center; margin: 12px;">Service Provider Details Not applicable here !!</div>
</mat-card>
</div>
</div>

View File

@ -40,14 +40,23 @@ export class StockComponent implements OnInit {
public uomData : any = [];
rawmaterial : any;
goodsValueInWords : any;
rawValueInWords : any;
tradedGoodsValueInWords : any;
M_rawValueInWords : any;
M_goodsValueInWords : any;
R_goodsValueInWords : any;
T_goodsValueInWords : any;
M_tradedGoodsValueInWords : any;
R_tradedGoodsValueInWords : any;
T_tradedGoodsValueInWords : any;
rawMaterialAccess: boolean;
finishedGoodsAccess: boolean;
tradeConcernAccess: boolean;
public submitted = false;
noRecordsFound: Boolean = false;
serviceProviderForm: Boolean = false;
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
private router: Router,
@ -85,37 +94,27 @@ export class StockComponent implements OnInit {
// this.notifier.notify('warning', 'There is No Type Of Activity Please Check Bussiness Information.!');
// })
this._pd.getTypeofActivityForSuppliedInfoForm(this.pdid).subscribe(data => {
// if(data.dataStatus === undefined){
let datas = {
"profession_name": "Others",
"type_of_activity": [
{
"type_of_activity_id": 1,
"name": "Manufacturing Details"
},
{
"type_of_activity_id": 2,
"name": "Retail trading"
},
{
"type_of_activity_id": 3,
"name": "Trading Concern"
},
{
"type_of_activity_id": 4,
"name": "Service Provider"
}
]
};
this.initstockForms(datas.type_of_activity);
// }else {
// this.notifier.notify('warning', 'No Category Records Found.!');
// this.noRecordsFound = false;
// }
//this._pd.getTypeofActivityForSuppliedInfoForm(this.pdid).subscribe(
this._pd.stockFormAccess({pd_id:this.pdid}).subscribe(data => {
if(data.dataStatus == true){
let datas = data.records;
if(datas.type_of_activity != undefined){
this.initstockForms(datas.type_of_activity)
}
else{
this.notifier.notify('warning', 'Business Type Of Activity Not Available Please Check Business Information.!');
}
}else if(data.dataStatus == false)
{
this.notifier.notify('warning', data.msg);
return;
}
else{
return;
}
}, err => {
this.notifier.notify('warning', 'There is No Type Of Activity Please Check Bussiness Information.!');
this.notifier.notify('warning', 'Business Type Of Activity Not Available Please Check Business Information.!');
this.noRecordsFound = false;
})
@ -133,7 +132,7 @@ export class StockComponent implements OnInit {
let dataForm = value.records;
if(dataForm !== undefined) {
console.log('dtaForm',dataForm);
this.stockForms = this.fb.group({
pdid: [this.pdid],
formid: [this.form_id],
@ -142,7 +141,12 @@ export class StockComponent implements OnInit {
retail_details : this.fb.array([this.retailFormCreation(record)]),
trade_details: this.fb.array([this.tradingFormCreation(record)]),
});
let arr = record.filter(data => data.type_of_activity_id === 1);
let arr0 = Object.keys(record).map(function (key) {
return record[key];
});
let arr = record.filter(data => data.type_of_activity_id == 1);
if(arr.length > 0) {
let retail_finished_goods;
let manufacturing_raw_materials;
@ -175,7 +179,7 @@ export class StockComponent implements OnInit {
manufacturing_temparr['manufacturing_traded_goods'] = manufacturing_traded_goods;manufacturing_temparr['manufacturing_finished_goods'] = manufacturing_finished_goods;manufacturing_temparr['manufacturing_raw_materials'] = manufacturing_raw_materials;
this.initManufacturingDetails(manufacturing_temparr);
}
let arr1 = record.filter(data => data.type_of_activity_id === 2);
let arr1 = record.filter(data => data.type_of_activity_id == 2);
if(arr1.length > 0) {
let retail_finished_goods;
let retail_traded_goods;
@ -199,7 +203,7 @@ export class StockComponent implements OnInit {
retail_temparr['retail_finished_goods'] = retail_finished_goods;
this.initRetailDetails(retail_temparr);
}
let arr2 = record.filter(data => data.type_of_activity_id === 3);
let arr2 = record.filter(data => data.type_of_activity_id == 3);
if(arr2.length > 0) {
let trading_finished_goods;
let trading_traded_goods;
@ -223,10 +227,14 @@ export class StockComponent implements OnInit {
trading_temparr['trading_traded_goods'] = trading_traded_goods;
this.initTradingDetails(trading_temparr);
}
let arr3 = record.filter(data => data.type_of_activity_id == 4);
if(arr3.length > 0) {
this.serviceProviderForm = true;
}
this.noRecordsFound = true;
}
else{
console.log('dataForm',dataForm);
// console.log('dataForm',dataForm);
this.stockForms = this.fb.group({
pdid: [this.pdid],
formid: [this.form_id],
@ -235,21 +243,21 @@ export class StockComponent implements OnInit {
retail_details : this.fb.array([this.retailFormCreation(record)]),
trade_details: this.fb.array([this.tradingFormCreation(record)]),
});
let arr = record.filter(data => data.type_of_activity_id === 1);
let arr = record.filter(data => data.type_of_activity_id == 1);
if(arr.length > 0) {
this.initManufacturingDetails(null);
}
let arr1 = record.filter(data => data.type_of_activity_id === 2);
let arr1 = record.filter(data => data.type_of_activity_id == 2);
if(arr1.length > 0) {
this.initRetailDetails(null);
}
let arr2 = record.filter(data => data.type_of_activity_id === 3);
let arr2 = record.filter(data => data.type_of_activity_id == 3);
if(arr2.length > 0) {
this.initTradingDetails(null);
}
let arr3 = record.filter(data => data.type_of_activity_id === 4);
let arr3 = record.filter(data => data.type_of_activity_id == 4);
if(arr3.length > 0) {
//this.serviceProviderForm = true;
this.serviceProviderForm = true;
}
this.noRecordsFound = true;
}
@ -263,21 +271,21 @@ export class StockComponent implements OnInit {
retail_details : this.fb.array([this.retailFormCreation(record)]),
trade_details: this.fb.array([this.tradingFormCreation(record)]),
});
let arr = record.filter(data => data.type_of_activity_id === 1);
let arr = record.filter(data => data.type_of_activity_id == 1);
if(arr.length > 0) {
this.initManufacturingDetails(null);
}
let arr1 = record.filter(data => data.type_of_activity_id === 2);
let arr1 = record.filter(data => data.type_of_activity_id == 2);
if(arr1.length > 0) {
this.initRetailDetails(null);
}
let arr2 = record.filter(data => data.type_of_activity_id === 3);
let arr2 = record.filter(data => data.type_of_activity_id == 3);
if(arr2.length > 0) {
this.initTradingDetails(null);
}
let arr3 = record.filter(data => data.type_of_activity_id === 4);
let arr3 = record.filter(data => data.type_of_activity_id == 4);
if(arr3.length > 0) {
//this.serviceProviderForm = true;
this.serviceProviderForm = true;
}
this.noRecordsFound = true;
}
@ -292,8 +300,8 @@ export class StockComponent implements OnInit {
}
manufacturingForm: Boolean = false;
manufacturingFormCreation(val) {
let arr = val.filter(data => data.type_of_activity_id === 1);
manufacturingFormCreation(record) {
let arr = record.filter(data => data.type_of_activity_id == 1);
if (arr.length > 0) {
this.manufacturingForm = true;
return this.fb.group({
@ -309,7 +317,8 @@ export class StockComponent implements OnInit {
retailForm: Boolean = false;
retailFormCreation(val) {
let arr = val.filter(data => data.type_of_activity_id === 2);
let arr = val.filter(data => data.type_of_activity_id == 2);
if (arr.length > 0) {
this.retailForm = true;
return this.fb.group({
@ -324,7 +333,7 @@ export class StockComponent implements OnInit {
tradingForm: Boolean = false;
tradingFormCreation(val) {
let arr = val.filter(data => data.type_of_activity_id === 3);
let arr = val.filter(data => data.type_of_activity_id == 3);
if (arr.length > 0) {
this.tradingForm = true;
return this.fb.group({
@ -350,32 +359,32 @@ export class StockComponent implements OnInit {
const control = <FormArray>this.stockForms.controls['manufacturing_details']['controls'][0].controls['main_raw_materials'];
if(datas === null){
console.log(299,'if');
// console.log(299,'if');
// rawMaterial.push(this.createRawmaterial(null));
// finishedGoods.push(this.createGoods(null));
// tradedGoods.push(this.createTradedGoods(null));
} else {
console.log(305,'else')
// console.log(305,'else')
for (let val of datas.manufacturing_raw_materials) {
console.log(val);
// console.log(val);
rawMaterial.push(this.createRawmaterial(val));
}
for (let val of datas.manufacturing_finished_goods) {
console.log(val);
// console.log(val);
finishedGoods.push(this.createGoods(val));
}
for (let val of datas.manufacturing_traded_goods) {
console.log(val);
// console.log(val);
tradedGoods.push(this.createTradedGoods(val));
}
console.log(310,rawMaterial);
// console.log(310,rawMaterial);
}
}
@ -439,13 +448,13 @@ export class StockComponent implements OnInit {
} else {
for (let val of datas.retail_finished_goods) {
console.log(val);
// console.log(val);
finishedGoods.push(this.createGoods(val));
}
for (let val of datas.retail_traded_goods) {
console.log(val);
// console.log(val);
tradedGoods.push(this.createTradedGoods(val));
}
@ -521,13 +530,13 @@ export class StockComponent implements OnInit {
// }
for (let val of datas.trading_finished_goods) {
console.log(val);
// console.log(val);
finishedGoods.push(this.createGoods(val));
}
for (let val of datas.trading_traded_goods) {
console.log(val);
// console.log(val);
tradedGoods.push(this.createTradedGoods(val));
}
@ -751,13 +760,25 @@ export class StockComponent implements OnInit {
inWords(e,flag:number){
switch(flag){
case 1 :
this.rawValueInWords = this._pd.convertNumberToWords(e.target.value);
this.M_rawValueInWords = this._pd.convertNumberToWords(e.target.value);
break;
case 2 :
this.goodsValueInWords = this._pd.convertNumberToWords(e.target.value);
this.M_goodsValueInWords = this._pd.convertNumberToWords(e.target.value);
break;
case 3 :
this.tradedGoodsValueInWords = this._pd.convertNumberToWords(e.target.value);
this.M_tradedGoodsValueInWords = this._pd.convertNumberToWords(e.target.value);
break;
case 4 :
this.R_goodsValueInWords = this._pd.convertNumberToWords(e.target.value);
break;
case 5 :
this.R_tradedGoodsValueInWords = this._pd.convertNumberToWords(e.target.value);
break;
case 6 :
this.T_goodsValueInWords = this._pd.convertNumberToWords(e.target.value);
break;
case 7 :
this.T_tradedGoodsValueInWords = this._pd.convertNumberToWords(e.target.value);
break;
default:
break;

View File

@ -131,4 +131,9 @@
</div>
</mat-dialog-actions>
</form>
</div>
</div>
<div *ngIf="!noRecordsFound">
<div style="margin: 12px; font-size: 18px;"> {{ errorMessage }} </div>
</div>
<!--
<notifier-container></notifier-container>-->

View File

@ -74,8 +74,8 @@ export class SupplierInfoComponent implements OnInit {
};
noRecordsFound: Boolean = false;
errorMessage: any = '';
ngOnInit() {
this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid).subscribe(data => {
if(data.dataStatus){
// let datas = {
@ -100,10 +100,12 @@ export class SupplierInfoComponent implements OnInit {
}else {
this.notifier.notify('warning', 'No Category Records Found.!');
this.noRecordsFound = false;
this.errorMessage = data.msg;
}
}, err => {
this.notifier.notify('warning', 'No Category Records Found.!');
this.noRecordsFound = false;
this.errorMessage = 'No Records Found , Something went Wrong!';
})
// this.getM_FreqOfPurchase();

View File

@ -60,7 +60,7 @@ mat-card .child_mat_card > mat-card {
transition: box-shadow 0.5s, transform 0.5s;
&:hover {
cursor: pointer;
background-color: #e00201 !important;
// background-color: #e00201 !important;
transform: scale(1);
box-shadow: 5px 20px 30px rgba(0, 0, 0, 0.2);
}

View File

@ -82,10 +82,18 @@
<mat-list *ngFor="let applicant of pdApplicantData">
<mat-list-item style="height:68px !important;">
<p><span *ngIf="applicant.applicant_name!=null" class="mb-2 text-center hover-icon">
<i class="fa-1x fa fa-user-o"></i>
&nbsp;{{applicant.applicant_name}} </span> &nbsp;&nbsp;&nbsp;<span *ngIf="applicant.mobile_no!=''" class="mb-2 text-center hover-icon">
<i class="fa-1x fa fa-phone"></i>
&nbsp;{{applicant.mobile_no}} </span> <br><span *ngIf="applicant.applicant_type=='1';else codetails" style="font-size:12px;">Main Applicant </span>
<i class="fa-1x fa fa-user-o"></i>
&nbsp;{{applicant.applicant_name}}
</span> &nbsp;&nbsp;&nbsp;
<span *ngIf="applicant.mobile_no != '' && applicant.mobile_no != null" class="mb-2 text-center hover-icon">
<i class="fa-1x fa fa-phone"></i>
&nbsp;{{applicant.mobile_no}}
</span> &nbsp;&nbsp;&nbsp;
<span *ngIf="applicant.landline != '' && applicant.landline != 'null-null' && applicant.landline != null " class="mb-2 text-center hover-icon">
<i class="fa-1x fa fa-phone"></i>
&nbsp;{{applicant.landline}}
</span>
<br><span *ngIf="applicant.applicant_type=='1';else codetails" style="font-size:12px;">Main Applicant </span>
<ng-template #codetails><span>{{applicant.relation_name}}</span></ng-template>
</p>
</mat-list-item>

View File

@ -11,10 +11,10 @@ import { environment } from 'environments/environment';
/** Imported Service Files Are., */
import { AwsService } from '../../../AwsService/aws.service';
/** Consant Value For Created Date And Updated Date */
const currentdate = new Date().toJSON().slice(0, 19).replace('T', ' ');
@Injectable({
providedIn: 'root'
})
@ -24,6 +24,7 @@ const currentdate = new Date().toJSON().slice(0, 19).replace('T', ' ');
* Kdk
*/
export class EntityService {
private apiUrl = environment.apiEndpoint;
private serviceUrl = 'https://jsonplaceholder.typicode.com/users';