changes:ps

This commit is contained in:
venbatechnologies@gmail.com 2019-01-27 23:22:09 +05:30
parent a9efda9cc3
commit 48fe0d5b70
4 changed files with 15 additions and 6 deletions

Binary file not shown.

View File

@ -338,7 +338,7 @@
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="sup.get('residence_ownership').value == 4">
<mat-form-field *ngIf="sup.get('residence_ownership').value == 1">
<input matInput placeholder="Please specify" formControlName="ownershipOther">
</mat-form-field>
@ -389,6 +389,9 @@
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="item.get('earning_segment').value==1">
<input matInput placeholder="Specify Others" formControlName="earning_if_others_segment">
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Income Per Month" formControlName="earning_gross_income_per_month" required>
</mat-form-field>
@ -409,14 +412,14 @@
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="item.get('non_earning_occupation').value==1">
<input matInput placeholder="Specify Others" formControlName="non_earning_if_others" required>
<input matInput placeholder="Specify Others" formControlName="non_earning_if_others">
</mat-form-field>
<mat-form-field *ngIf="item.get('non_earning_occupation').value==2">
<input matInput placeholder="Specify School/College Name" formControlName="non_earning_if_schoolorcollege" required>
<input matInput placeholder="Specify School/College Name" formControlName="non_earning_if_schoolorcollege">
</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> -->
<input matInput placeholder="Retired From" formControlName="non_earning_if_retired_from" required>
<input matInput placeholder="Retired From" formControlName="non_earning_if_retired_from">
</mat-form-field>
</div>
<mat-card-actions>

View File

@ -441,6 +441,7 @@ export class FamilyDetailsComponent implements OnInit {
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([])],
earning_if_others_segment:[val.earning_if_others_segment],
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([])],
@ -599,6 +600,7 @@ export class FamilyDetailsComponent implements OnInit {
earning_gross_income_per_month: [vals.earning_gross_income_per_month || null, Validators.compose([])],
earning_name_of_the_employer_or_business: [vals.earning_name_of_the_employer_or_business || null, Validators.compose([])],
earning_number_of_years_in_employment_or_business: [vals.earning_number_of_years_in_employment_or_business || null, Validators.compose([])],
earning_if_others_segment:[vals.earning_if_others_segment || null],
non_earning_occupation: [vals.non_earning_occupation || null, Validators.compose([])],
non_earning_if_others: [vals.non_earning_if_others || null, Validators.compose([])],
non_earning_if_retired_from: [vals.non_earning_if_retired_from || null, Validators.compose([])],
@ -637,6 +639,7 @@ export class FamilyDetailsComponent implements OnInit {
'earning_gross_income_per_month': '',
'earning_name_of_the_employer_or_business': '',
'earning_number_of_years_in_employment_or_business': '',
'earning_if_others_segment':'',
'non_earning_occupation': '',
'non_earning_if_others': '',
'non_earning_if_retired_from': '',
@ -701,6 +704,7 @@ removeFamilyMembers(index) {
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([])],
earning_if_others_segment:[''],
non_earning_occupation: ['', Validators.compose([])],
non_earning_if_others: ['', Validators.compose([])],
non_earning_if_retired_from: ['', Validators.compose([])],

View File

@ -66,7 +66,7 @@ export class StockComponent implements OnInit {
private _pd: PdTrigerService,@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
this.form_id = 11;
this.company_id = this.pd_all_details.company_id
this.company_id = this.pd_all_details.company_id;
this.notifier = notifier;
}
@ -289,6 +289,7 @@ export class StockComponent implements OnInit {
this.stockForms = this.fb.group({
pdid: [this.pdid],
formid: [this.form_id],
company_id: [this.company_id],
stock_remarks: [''],
manufacturing_details: this.fb.array([this.manufacturingFormCreation(record)]),
retail_details : this.fb.array([this.retailFormCreation(record)]),
@ -929,7 +930,8 @@ tradingFormCreation(val) {
// return;
// } else {
var answerFormValues = this.stockForms.value;
console.log(answerFormValues);
// return;
//To Remove The "Null" With Key also
Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]);