PD Question : ps

This commit is contained in:
venbatechnologies@gmail.com 2018-12-05 15:44:37 +05:30
commit 154d0f90bd
12 changed files with 141 additions and 179 deletions

View File

@ -45,7 +45,7 @@
<!-- <pre> Full - {{doughnutChartDataForFullPD}} Smart -{{doughnutChartDataForSmartPD}} TELE -{{doughnutChartDataForTelePD}} </pre> --> <!-- <pre> Full - {{doughnutChartDataForFullPD}} Smart -{{doughnutChartDataForSmartPD}} TELE -{{doughnutChartDataForTelePD}} </pre> -->
<mat-card-content> <mat-card-content>
<div fxLayout="row" style="min-height:280px;"> <div fxLayout="row" style="min-height:280px;">
<div fxFlex.gt-sm="30" fxFlex="100" > <div *ngIf="total1 != 0" fxFlex.gt-sm="30" fxFlex="100" >
<canvas baseChart class="chart" id="FullCanvas" name="FullCanvas" <canvas baseChart class="chart" id="FullCanvas" name="FullCanvas"
height="280px" width="280px" height="280px" width="280px"
[data]="doughnutChartDataForFullPD" [data]="doughnutChartDataForFullPD"
@ -57,7 +57,7 @@
<div *ngIf="total1 != 0" class="donut-inner"><span>Full - {{total1}}</span></div> <div *ngIf="total1 != 0" class="donut-inner"><span>Full - {{total1}}</span></div>
</div> </div>
<div fxFlexOffset.gt-sm="5" fxFlex.gt-sm="30" fxFlex="100"> <div *ngIf="total2 != 0" fxFlexOffset.gt-sm="5" fxFlex.gt-sm="30" fxFlex="100">
<canvas baseChart class="chart" id="SmartCanvas" name="SmartCanvas" <canvas baseChart class="chart" id="SmartCanvas" name="SmartCanvas"
height="280px" width="280px" height="280px" width="280px"
[data]="doughnutChartDataForSmartPD" [data]="doughnutChartDataForSmartPD"
@ -68,7 +68,7 @@
[chartType]="doughnutChartType"></canvas> [chartType]="doughnutChartType"></canvas>
<div *ngIf="total2 != 0" class="donut-inner"><span>Smart - {{total2}}</span></div> <div *ngIf="total2 != 0" class="donut-inner"><span>Smart - {{total2}}</span></div>
</div> </div>
<div fxFlexOffset.gt-sm="5" fxFlex.gt-sm="30" fxFlex="100"> <div *ngIf="total3 != 0" fxFlexOffset.gt-sm="5" fxFlex.gt-sm="30" fxFlex="100">
<canvas baseChart class="chart" id="TeleCanvas" name="TeleCanvas" <canvas baseChart class="chart" id="TeleCanvas" name="TeleCanvas"
height="280px" width="280px" height="280px" width="280px"
[data]="doughnutChartDataForTelePD" [data]="doughnutChartDataForTelePD"
@ -80,7 +80,11 @@
<div *ngIf="total3 != 0" class="donut-inner"><span>Tele - {{total3}}</span></div> <div *ngIf="total3 != 0" class="donut-inner"><span>Tele - {{total3}}</span></div>
</div> </div>
</div> </div>
<<<<<<< HEAD
<div fxLayout="row" class="pt-3"> <div fxLayout="row" class="pt-3">
=======
<div fxLayout="row" class="pt-3" *ngIf="total3 != 0 && total2 != 0 && total1 != 0">
>>>>>>> c62d273c7a10f4df22b027dc9664dc37e83c93fa
<div fxFlex.gt-sm="100" fxFlex="100" style="text-align:center"> <div fxFlex.gt-sm="100" fxFlex="100" style="text-align:center">
<ul class="lengend-list"> <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:#c1c1c1"> &nbsp;&nbsp;&nbsp;&nbsp; </span>&nbsp; Draft</li>

View File

@ -48,6 +48,11 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</div> </div>
<div>
<mat-form-field *ngIf="detail.get('property_type').value == 5">
<input matInput placeholder="Other Property Type" formControlName="other_property_type">
</mat-form-field>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -163,14 +168,19 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</div> </div>
<div fxFlex="33"> <!-- <div fxFlex="33" *ngIf="detail.get('investments_type').value == 6 "> -->
<mat-form-field>
<input matInput placeholder="Specify Other Type" formControlName="other_investments_type">
</mat-form-field>
<!-- </div> -->
<div fxFlex="33" >
<mat-form-field class="ml-xs example-full-width"> <mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Amount of Investment" formControlName="amount_of_invest" required (keypress)="keyPress($event)"> <input matInput placeholder="Amount of Investment" formControlName="amount_of_invest" required (keypress)="keyPress($event)">
</mat-form-field> </mat-form-field>
</div> </div>
<div fxFlex="33"> <div fxFlex="33">
<mat-form-field class="ml-xs example-full-width"> <mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Bank Name" formControlName="bank_name" required> <input matInput placeholder="Bank Name" formControlName="bank_name" required>
</mat-form-field> </mat-form-field>
</div> </div>
</div> </div>
@ -187,6 +197,23 @@
<mat-form-field class="ml-xs example-full-width"> <mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Description of the Assets" formControlName="any_other_assets" required> <input matInput placeholder="Description of the Assets" formControlName="any_other_assets" required>
</mat-form-field> </mat-form-field>
<mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Value of the Assets" formControlName="any_other_asset_value" required>
</mat-form-field>
<!-- <mat-form-field class="ml-xs example-full-width"> -->
<!-- <input matInput placeholder="Is Any Loan" formControlName="any_other_asset_loan" required> -->
<!-- </mat-form-field> -->
<mat-form-field class="ml-xs example-full-width">
<mat-select placeholder="Is there any asset loan?" formControlName="any_other_asset_loan" required>
<mat-option value="yes">Yes</mat-option>
<mat-option value="no">No</mat-option>
<mat-option value="nan">NAN</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field class="ml-xs example-full-width" *ngIf="detail.get(any_other_asset_loan).value == 'yes'">
<input matInput placeholder="What is the EMI amount ?" formControlName="other_asset_emi_amt">
<span matSuffix>.00</span>
</mat-form-field>
</div> </div>
</div> </div>
</div> </div>
@ -239,7 +266,7 @@
</div> </div>
<div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33"> <div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33">
<mat-form-field class="ml-xs example-full-width" style="width:95%"> <mat-form-field class="ml-xs example-full-width" style="width:95%">
<input matInput placeholder="Elapsed Tenure in Months" formControlName="elapsed_tenure"> <input matInput placeholder="Original Loan Tenure in Months" formControlName="elapsed_tenure">
</mat-form-field> </mat-form-field>
</div> </div>
<div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33" style="width:95%"> <div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33" style="width:95%">

View File

@ -370,7 +370,8 @@ public m_investmentType = [];
loadProperty() { loadProperty() {
return this._formBuilder.group({ return this._formBuilder.group({
property_type: ['', Validators.compose([Validators.required])] property_type: ['', Validators.compose([Validators.required])],
other_property_type: ['']
}); });
} }
@ -388,7 +389,11 @@ public m_investmentType = [];
otherAssetsDescription() { otherAssetsDescription() {
return this._formBuilder.group({ return this._formBuilder.group({
any_other_assets: ['', Validators.compose([Validators.required])] any_other_assets: ['', Validators.compose([Validators.required])],
any_other_asset_value : [''],
any_other_asset_loan : [''],
other_asset_emi_amt : ['']
}); });
} }
@ -405,6 +410,7 @@ public m_investmentType = [];
loadInvestDescription() { loadInvestDescription() {
return this._formBuilder.group({ return this._formBuilder.group({
investments_type: ['', Validators.compose([Validators.required])], investments_type: ['', Validators.compose([Validators.required])],
other_investment_type:[''],
amount_of_invest: ['', Validators.compose([Validators.required])], amount_of_invest: ['', Validators.compose([Validators.required])],
bank_name: ['', Validators.compose([Validators.required])] bank_name: ['', Validators.compose([Validators.required])]
}); });
@ -445,6 +451,9 @@ public m_investmentType = [];
otherAssetsDescriptionWithData(data) { otherAssetsDescriptionWithData(data) {
return this._formBuilder.group({ return this._formBuilder.group({
any_other_assets: [data.any_other_assets, Validators.compose([Validators.required])], any_other_assets: [data.any_other_assets, Validators.compose([Validators.required])],
any_other_asset_value : [data.any_other_asset_value],
any_other_asset_loan : [data.any_other_asset_loan],
other_asset_emi_amt : [data.other_asset_emi_amt]
}); });
} }
@ -461,6 +470,7 @@ public m_investmentType = [];
loadInvestDescriptionWithData(data) { loadInvestDescriptionWithData(data) {
return this._formBuilder.group({ return this._formBuilder.group({
investments_type: [data.investments_type, Validators.compose([Validators.required])], investments_type: [data.investments_type, Validators.compose([Validators.required])],
other_investment_type : [data.other_investment_type],
amount_of_invest: [data.amount_of_invest, Validators.compose([Validators.required])], amount_of_invest: [data.amount_of_invest, Validators.compose([Validators.required])],
bank_name: [data.bank_name, Validators.compose([Validators.required])] bank_name: [data.bank_name, Validators.compose([Validators.required])]
}); });

View File

@ -54,6 +54,7 @@ export class FamilyDetailsComponent implements OnInit {
customerSegData: any = []; customerSegData: any = [];
// earnMemberArrCount :any ; // earnMemberArrCount :any ;
// nonEarnMemberArrCount :any ; // nonEarnMemberArrCount :any ;
count : number;
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
private router: Router, private router: Router,
private _pd: PdTrigerService, private _pd: PdTrigerService,
@ -180,15 +181,16 @@ export class FamilyDetailsComponent implements OnInit {
} }
addMembers() { addMembers() {
const control = <FormArray>this.familyForm.controls['nonEarningMembers']; const control = <FormArray>this.familyForm.controls['nonEarningMembers'];
this.count++;
// this.nonEarnMemberArrCount = control.length; // this.nonEarnMemberArrCount = control.length;
// console.log(this.earnMemberArrCount); // console.log(this.earnMemberArrCount);
// console.log(this.nonEarnMemberArrCount); // console.log(this.nonEarnMemberArrCount);
if(control.length == this.familyForm.controls['members'].value) // if(control.length == this.familyForm.controls['members'].value)
{ // {
}else{ // }else{
control.push(this.createNonMembers()); // control.push(this.createNonMembers());
} // }
} }

View File

@ -83,61 +83,62 @@
<mat-option *ngFor="let sour of m_sourceofamount" [value]="sour.id">{{ sour.name }}</mat-option> <mat-option *ngFor="let sour of m_sourceofamount" [value]="sour.id">{{ sour.name }}</mat-option>
</mat-select> </mat-select>
<!--<mat-select placeholder="Source" <!--<mat-select placeholder="Source"
formControlName="source"> formControlName="source">
<mat-option value="borrowed">Borrowed from Relatives & Friends</mat-option> <mat-option value="borrowed">Borrowed from Relatives & Friends</mat-option>
<mat-option value="own_money">Own money</mat-option> <mat-option value="own_money">Own money</mat-option>
<mat-option value="other">Loan from another lender</mat-option> <mat-option value="other">Loan from another lender</mat-option>
</mat-select>--> </mat-select>-->
</mat-form-field> </mat-form-field>
<mat-form-field *ngIf="loanDetailsForm.controls['source'].value =='other'"> <mat-form-field *ngIf="loanDetailsForm.controls['source'].value =='other'">
<input matInput placeholder="Specify Lender Name and Type" formControlName="lender_name_type"> <input matInput placeholder="Specify Lender Name and Type" formControlName="lender_name_type">
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<input matInput placeholder="EMI Comfort Level" formControlName="emi_level" (keypress)="keyPress($event)" required> <input matInput placeholder="EMI Comfort Level" formControlName="emi_level" (keypress)="keyPress($event)" required>
</mat-form-field> </mat-form-field>
<!-- <div *ngIf="productAbbr === 'HL' || productAbbr === 'LL' || productAbbr === 'LAP' "> --> <!-- <div *ngIf="productAbbr === 'HL' || productAbbr === 'LL' || productAbbr === 'LAP' "> -->
<mat-card> <mat-card>
<mat-card-header *ngIf="loanDetailsForm.controls['source'].value =='other'" > <mat-card-header *ngIf="loanDetailsForm.controls['source'].value =='other'" >
<p>Mortgage <p>Mortgage
<p> <p>
<!-- {{m_mortageTypeProperty | json}} --> <!-- {{m_mortageTypeProperty | json}} -->
</mat-card-header> </mat-card-header>
<mat-card-content class="matcard"> <mat-card-content class="matcard">
<mat-form-field> <mat-form-field>
<mat-select placeholder="Type of Property" formControlName="property_type" required> <mat-select placeholder="Type of Property" formControlName="property_type" required>
<mat-option *ngFor="let typeprop of m_mortageTypeProperty" [value]="typeprop.mortage_property_id">{{ typeprop.property_name }}</mat-option> <mat-option *ngFor="let typeprop of m_mortageTypeProperty" [value]="typeprop.mortage_property_id">{{ typeprop.property_name }}</mat-option>
</mat-select> </mat-select>
<!--<mat-select placeholder="Type of property" formControlName="property_type"> <!--<mat-select placeholder="Type of property" formControlName="property_type">
<mat-option value="bungalow">Bungalow</mat-option> <mat-option value="bungalow">Bungalow</mat-option>
<mat-option value="flat">Flat</mat-option> <mat-option value="flat">Flat</mat-option>
<mat-option value="row_house">Row House</mat-option> <mat-option value="row_house">Row House</mat-option>
<mat-option value="floor">Floor</mat-option> <mat-option value="floor">Floor</mat-option>
<mat-option value="chawl">Chawl</mat-option> <mat-option value="chawl">Chawl</mat-option>
<mat-option value="shed">Shed</mat-option> <mat-option value="shed">Shed</mat-option>
<mat-option value="office">Office</mat-option> <mat-option value="office">Office</mat-option>
<mat-option value="shop_in_market">Shop in a market</mat-option> <mat-option value="shop_in_market">Shop in a market</mat-option>
<mat-option value="shop_in_mall">shop in a mall</mat-option> <mat-option value="shop_in_mall">shop in a mall</mat-option>
<mat-option value="standalone_shop">standalone shop</mat-option> <mat-option value="standalone_shop">standalone shop</mat-option>
<mat-option value="clinic">clinic</mat-option> <mat-option value="clinic">clinic</mat-option>
<mat-option value="factory">Factory</mat-option> <mat-option value="factory">Factory</mat-option>
<mat-option value="vacant_land">Vacant Land</mat-option> <mat-option value="vacant_land">Vacant Land</mat-option>
<mat-option value="others">Others</mat-option> <mat-option value="others">Others</mat-option>
</mat-select>--> </mat-select>-->
</mat-form-field> </mat-form-field>
<mat-form-field *ngIf="loanDetailsForm.controls['property_type'].value == 'others'"> <mat-form-field *ngIf="loanDetailsForm.controls['property_type'].value == 'others'">
<input matInput placeholder="Specify Type of Property" formControlName="ownershipOther"> <input matInput placeholder="Specify Type of Property" formControlName="ownershipOther">
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<mat-select multiple placeholder="Name of Owner" <mat-select multiple placeholder="Name of Owner"
formControlName="owner_name" (selectionChange)="ownerNameChange($event)" required> formControlName="owner_name" (selectionChange)="ownerNameChange($event)" required>
<mat-option value="{{owner.pd_co_applicant_id}}" *ngFor="let owner of applicants">{{owner.applicant_name}}</mat-option> <mat-option value="{{owner.pd_co_applicant_id}}" *ngFor="let owner of applicants">{{owner.applicant_name}}</mat-option>
<mat-option value="Others">Others</mat-option> <mat-option value="Others">Others</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<mat-select placeholder="Status of Construction" formControlName="construction_status" required> <mat-select placeholder="Status of Construction" formControlName="construction_status" required>
<mat-option *ngFor="let status of m_statusofCunstruction" [value]="status.id">{{ status.name }} {{status.id}}</mat-option> <mat-option *ngFor="let status of m_statusofCunstruction" [value]="status.id">{{ status.name }} {{status.id}}</mat-option>
@ -165,6 +166,10 @@
formControlName="value_per_agreement" (keypress)="keyPress($event)" required (keyup)="inWords($event,3)"> formControlName="value_per_agreement" (keypress)="keyPress($event)" required (keyup)="inWords($event,3)">
<mat-hint align="end" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"&#8377;"}} {{valAsPerAgmtInWords}} Only</mat-hint> <mat-hint align="end" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"&#8377;"}} {{valAsPerAgmtInWords}} Only</mat-hint>
</mat-form-field> --> </mat-form-field> -->
<mat-form-field>
<input matInput placeholder="Estimate Market Value as Per Customer"
formControlName="emv_per_customer" (keypress)="keyPress($event)" required>
</mat-form-field>
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>
</mat-card> </mat-card>

View File

@ -69,6 +69,7 @@ export class LoanDetailsComponent implements OnInit {
this.pdid= this.pd_all_details.pdmaster_details.pd_id; this.pdid= this.pd_all_details.pdmaster_details.pd_id;
this.notifier = notifier; this.notifier = notifier;
} }
ngOnInit() { ngOnInit() {
this.initloanDetailsForm(); this.initloanDetailsForm();
@ -184,7 +185,6 @@ getM_sourceofamount() {
// console.log('sadfdfads',this.productAbbr); // console.log('sadfdfads',this.productAbbr);
this.m_mortageTypeProperty = data.records.filter(data => data.isactive == 1); this.m_mortageTypeProperty = data.records.filter(data => data.isactive == 1);
this.m_mortageTypeProperty = data.records.filter(data => data.group_name == this.productAbbr); this.m_mortageTypeProperty = data.records.filter(data => data.group_name == this.productAbbr);
}, },
error => { error => {
// this.notifier.notify('warning', 'No Category Records Found.!'); // this.notifier.notify('warning', 'No Category Records Found.!');
@ -216,6 +216,7 @@ getM_sourceofamount() {
// ================== // ==================
public initloanDetailsForm(): void { public initloanDetailsForm(): void {
this.loanDetailsForm = this.fb.group({ this.loanDetailsForm = this.fb.group({
loan_amount: [this.exist_loan_amt, Validators.compose([Validators.required])], loan_amount: [this.exist_loan_amt, Validators.compose([Validators.required])],
end_use: ['', Validators.compose([Validators.required])], end_use: ['', Validators.compose([Validators.required])],
end_use_other: [''], end_use_other: [''],

View File

@ -288,14 +288,17 @@
<mat-form-field> <mat-form-field>
<mat-select placeholder="Source" <mat-select placeholder="Source"
formControlName="source" required> formControlName="source" required>
<mat-option value="rental_income">Rental Income</mat-option>
<mat-option value="{{src.id}}" *ngFor="let src of sourceData">{{src.name}}</mat-option>
<!-- <mat-option value="rental_income">Rental Income</mat-option>
<mat-option value="interest_income">Interest Income</mat-option> <mat-option value="interest_income">Interest Income</mat-option>
<mat-option value="agricultural_income">Agricultural Income</mat-option> <mat-option value="agricultural_income">Agricultural Income</mat-option>
<mat-option value="dividend_income">Dividend Income</mat-option> <mat-option value="dividend_income">Dividend Income</mat-option>
<mat-option value="others">Others</mat-option> <mat-option value="others">Others</mat-option> -->
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field *ngIf="details.get('source').value == 'others'"> <mat-form-field *ngIf="details.get('source').value == 5 ">
<input matInput placeholder="Specify Others Source" <input matInput placeholder="Specify Others Source"
formControlName="others_source"> formControlName="others_source">
</mat-form-field> </mat-form-field>

View File

@ -42,6 +42,7 @@ export class OtherIncomeComponent implements OnInit {
public otherIncomeForm: FormGroup; public otherIncomeForm: FormGroup;
private notifier: NotifierService; private notifier: NotifierService;
frequencyData: any = []; frequencyData: any = [];
sourceData : any = [];
constructor(notifier: NotifierService, constructor(notifier: NotifierService,
private fb: FormBuilder, private fb: FormBuilder,
@ -58,6 +59,7 @@ export class OtherIncomeComponent implements OnInit {
ngOnInit() { ngOnInit() {
console.clear(); console.clear();
this.getFrequency(); this.getFrequency();
this.getSourceOtherIncome();
this.initOtherincomeForm(); this.initOtherincomeForm();
let params: any = {}; let params: any = {};
params.pd_id = this.pdid; params.pd_id = this.pdid;
@ -126,6 +128,17 @@ export class OtherIncomeComponent implements OnInit {
}) })
}); });
} }
getSourceOtherIncome() {
let master_name = 'SOURCEOFOTHERINCOME';
this._pd.getAllMasterDatas(master_name).subscribe(data => {
console.log('data', data);
data.records.forEach(val => {
if (val.isactive == 1) {
this.sourceData.push(val);
}
})
});
}
addIncomeDetails() { addIncomeDetails() {
const control = <FormArray>this.otherIncomeForm.controls['income_details']; const control = <FormArray>this.otherIncomeForm.controls['income_details'];
control.push(this.createDetail()); control.push(this.createDetail());

View File

@ -265,6 +265,3 @@
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="submit" matTooltip="Save" matTooltipPosition="above"><mat-icon>save</mat-icon></button> <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="submit" matTooltip="Save" matTooltipPosition="above"><mat-icon>save</mat-icon></button>
</div> </div>
</mat-dialog-actions> </mat-dialog-actions>
</form>
<notifier-container></notifier-container>

View File

@ -11,6 +11,7 @@
mat-form-field { mat-form-field {
margin: 0 2%; margin: 0 2%;
} }
$base-card-box-shadow:1.5px 2.6px 24px 0 rgba(0, 35, 136, 0.08) !important; $base-card-box-shadow:1.5px 2.6px 24px 0 rgba(0, 35, 136, 0.08) !important;
$product-bg-color-hover: rgba(103, 58, 183, 0.7); $product-bg-color-hover: rgba(103, 58, 183, 0.7);
.p-list-main { .p-list-main {

View File

@ -51,6 +51,7 @@ export class PersonalInfoComponent implements OnInit {
public coApplicantDetails :any=[]; public coApplicantDetails :any=[];
errorMessage:any; errorMessage:any;
constructor(notifier: NotifierService,private _fb: FormBuilder,private _pd: PdTrigerService , @Inject(MAT_DIALOG_DATA) public pd_all_details: any) { constructor(notifier: NotifierService,private _fb: FormBuilder,private _pd: PdTrigerService , @Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
this.pdid = this.pd_all_details.pdmaster_details.pd_id; this.pdid = this.pd_all_details.pdmaster_details.pd_id;
this.notifier = notifier; this.notifier = notifier;

View File

@ -1,5 +1,4 @@
<form [formGroup]="stockForm" class="address"> <form [formGroup]="stockForm" class="address">
<h2 mat-dialog-title class="paragraph_change"> <h2 mat-dialog-title class="paragraph_change">
<div fxFlex="70" align="left"> <div fxFlex="70" align="left">
{{pageTitle}} {{pageTitle}}
@ -263,107 +262,6 @@
<form [formGroup]="stockForm" class="address"> --> <form [formGroup]="stockForm" class="address"> -->
<!-- {{uomData | json}} --> <!-- {{uomData | json}} -->
<!-- <mat-card> <!-- <mat-card>
<mat-card-header> =======
<p>Raw Materials<p> <!-- {{uomData | json}} -->
</mat-card-header>
<div formArrayName="raw_materials">
<div *ngFor="let details of stockForm.controls.raw_materials['controls']; let i=index"
[formGroupName]="i">
<mat-card-content class="matcard">
<mat-form-field>
<input matInput placeholder="Name" formControlName="raw_name" required>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="is the Stock is Observed ?"
formControlName="stock_observed" required>
<mat-option value="yes" >Yes</mat-option>
<mat-option value="no" >No</mat-option>
</mat-select>
</mat-form-field>
<div *ngIf="details.get('stock_observed').value == 'no'" >
<mat-form-field>
<input matInput placeholder="Estimated Quantity" formControlName="raw_quantity" required>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="Unit of Mearsurement"
formControlName="raw_uom" required>
<mat-option value="{{uom.uom_id}}" *ngFor="let uom of uomData">{{uom.name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="details.get('raw_uom').value == 61" >
<input matInput placeholder="Specify Other UOM" formControlName="other_uom" required>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Value" formControlName="raw_value" (keypress)="keyPress($event)" required>
</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>
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Is the stock of raw materials observed ?" formControlName="is_sufficiant_raw" required>
</mat-form-field>
</div>
<button type="button" mat-raised-button mat-icon-button (click)="addRawMaterials()"
matTooltip="Add More Raw Materials" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="i==0">
<mat-icon>add</mat-icon>
</button>
<button type="button" mat-raised-button mat-icon-button (click)="deleteRawMaterials(i)"
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="i>0">
<mat-icon>delete</mat-icon>
</button>
</mat-card-content>
</div>
</div>
</mat-card>
<mat-card> <mat-card>
<mat-card-header>
<p>Finished Goods<p>
</mat-card-header>
<div formArrayName="finished_goods">
<div *ngFor="let details of stockForm.controls.finished_goods['controls']; let i=index"
[formGroupName]="i">
<mat-card-content class="matcard">
<mat-form-field>
<input matInput placeholder="Name" formControlName="goods_name" required>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Estimated Quantity" formControlName="goods_quantity" required>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Value" formControlName="goods_value" (keypress)="keyPress($event)" required>
</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>
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput placeholder="Is the stock of finished goods observed ?" formControlName="is_sufficiant_goods" required>
</mat-form-field>
<button type="button" mat-raised-button mat-icon-button (click)="addGoods()"
matTooltip="Add More Finished Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="i==0">
<mat-icon>add</mat-icon>
</button>
<button type="button" mat-raised-button mat-icon-button (click)="deleteGoods(i)"
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="i>0">
<mat-icon>delete</mat-icon>
</button>
</mat-card-content>
</div>
</div>
</mat-card>
<div fxLayout="row">
<div fxFlex="60" class="pb-0 text-sm-left">
<mat-form-field appearance="outline" style="width: 100%">
<mat-label>Please comment on the stock level observed?</mat-label>
<textarea matInput placeholder="Remarks" formControlName="stock_remarks"></textarea>
</mat-form-field>
</div>
</div>
<div style="text-align: right;">
<button type="submit" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Submit" matTooltipPosition="above" (click)="submitDetails()"><mat-icon>save</mat-icon>
</button>
</div>
</form>
</mat-card> -->