issuesfixes:ps
This commit is contained in:
parent
f26093d912
commit
2cf459a854
@ -24,7 +24,7 @@
|
||||
|
||||
<div fxFlex="33">
|
||||
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-form-field style="width: 85%;">
|
||||
<!-- <input matInput placeholder="Name" formControlName="name_ans" type="text" required> -->
|
||||
<input matInput placeholder="Address" formControlName="address" oninput="this.value = this.value.toUpperCase()" required autocomplete="off">
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
</div>
|
||||
|
||||
<div fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-form-field style="width: 85%;">
|
||||
<mat-select placeholder="Address Type" formControlName="address_type" required (selectionChange)="selectedAddressType($event.source.triggerValue)" >
|
||||
<mat-option value="{{m_addressType.address_type_id}}"
|
||||
*ngFor="let m_addressType of addressData">{{m_addressType.address_type}}
|
||||
@ -42,14 +42,14 @@
|
||||
</div>
|
||||
|
||||
<div *ngIf="addressForm.controls['address_type'].value == 1" fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-form-field style="width: 85%;">
|
||||
<input matInput placeholder="Specify Address Type *" formControlName="address_type_others" autocomplete="off" (change)="selectedAddressType($event.target.value)">
|
||||
<mat-error *ngIf="!addressForm.controls['address_type_others'].valid">Address Type Required</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div fxFlex="33">
|
||||
<mat-form-field style="width: 100%;">
|
||||
<mat-form-field style="width: 85%;">
|
||||
<mat-select placeholder="Locality" formControlName="locality" required>
|
||||
<mat-option value="{{m_locality.locality_id}}"
|
||||
*ngFor="let m_locality of localityData">{{m_locality.locality_name}}
|
||||
@ -59,14 +59,14 @@
|
||||
</div>
|
||||
|
||||
<div *ngIf="addressForm.controls.locality.value == 1" fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-form-field style="width: 85%;">
|
||||
<input matInput placeholder="Specify Locality *" formControlName="locality_others" autocomplete="off">
|
||||
<mat-error *ngIf="!addressForm.controls['locality_others'].valid">Locality Required</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div *ngIf="addressForm.controls.locality.value == 5" fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-form-field style="width: 85%;">
|
||||
<input matInput placeholder="Specify the MixUse *"
|
||||
formControlName="locality_mixuse" autocomplete="off">
|
||||
<mat-error *ngIf="!addressForm.controls['locality_mixuse'].valid">MixUse Required</mat-error>
|
||||
@ -74,7 +74,7 @@
|
||||
</div>
|
||||
|
||||
<div fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-form-field style="width: 85%;">
|
||||
<mat-select placeholder="Approach to PD Location" formControlName="pd_location" required>
|
||||
<mat-option value="{{data.pd_location_approach_id}}"
|
||||
*ngFor="let data of locationdata">{{data.description}}
|
||||
@ -84,7 +84,7 @@
|
||||
</div>
|
||||
|
||||
<div fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-form-field style="width: 85%;">
|
||||
<mat-select placeholder="Comment on Locality" formControlName="comment_locality" required>
|
||||
<mat-option value="{{data.comments_on_locality_id}}"
|
||||
*ngFor="let data of commentData">{{data.rating}}
|
||||
@ -94,14 +94,14 @@
|
||||
</div>
|
||||
|
||||
<!-- <div *ngIf="addressForm.controls['comment_locality'].value == 1 " fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-form-field style="width: 85%;">
|
||||
<input matInput placeholder="Specify Comment on Locality *" formControlName="other_comment_locality" autocomplete="off">
|
||||
<mat-error *ngIf="!addressForm.controls['other_comment_locality'].valid">Comment on Locality Required</mat-error>
|
||||
</mat-form-field>
|
||||
</div> -->
|
||||
|
||||
<!-- <div fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-form-field style="width: 85%;">
|
||||
<mat-select placeholder="Ownership" formControlName="address_ownership">
|
||||
<mat-option value="{{ownerShip.id}}"
|
||||
*ngFor="let ownerShip of ownerShipData">
|
||||
@ -112,13 +112,13 @@
|
||||
</div>
|
||||
|
||||
<div *ngIf="addressForm.controls['address_ownership'].value == 4 " fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-form-field style="width: 85%;">
|
||||
<input matInput placeholder="Specify Ownership" formControlName="other_ownership" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div *ngIf="addressForm.controls['address_ownership'].value == 3 " fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-form-field style="width: 85%;">
|
||||
<input matInput placeholder="What is the monthly rent paid?" formControlName="rent_amt" autocomplete="off" (keypress)="keyPress($event)" (keyup)="inWordsForRent($event)">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="addressForm.controls['rent_amt'].value != ''">{{"₹"}} {{rentAmtInwords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
@ -149,7 +149,7 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="32">
|
||||
<mat-form-field *ngIf="addressForm.controls['other_premises_bussiness_activity'].value != ''" style="width: 80%;">
|
||||
<mat-form-field *ngIf="addressForm.controls['other_premises_bussiness_activity'].value != ''" style="width: 85%;">
|
||||
<input matInput autocomplete="off" placeholder="Remark" formControlName="bussiness_activity_remark">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
@ -61,14 +61,14 @@
|
||||
|
||||
<mat-form-field *ngIf=" _businessAssetsQuesFrom.controls['business_is_pd_visited'].value != ''" style="width: 95%;">
|
||||
<input matInput autocomplete="off" placeholder="Remarks" formControlName="business_pd_visited_remark">
|
||||
<mat-error *ngIf="!_businessAssetsQuesFrom.controls['business_pd_visited_remark'].value.valid">Field Required</mat-error>
|
||||
<mat-error *ngIf="!_businessAssetsQuesFrom.controls['business_pd_visited_remark'].value.valid">Remarks Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
<div fxLayout="row wrap" fxLayoutGap="5px" fxLayoutAlign="start none" *ngIf=" _businessAssetsQuesFrom.controls['business_address_availability'].value == 'yes'">
|
||||
<!-- <div fxLayout="row wrap" fxLayoutGap="5px" fxLayoutAlign="start none" *ngIf=" _businessAssetsQuesFrom.controls['business_address_availability'].value == 'yes'">
|
||||
<mat-form-field style="width: 95%;">
|
||||
<!--placeholder="Was any business activity seen at the (Address Type) seen during PD visit?"-->
|
||||
<!--placeholder="Was any business activity seen at the (Address Type) seen during PD visit?"--
|
||||
<mat-select placeholder="Are there any other premises from which business activity is being run?" formControlName="business_activity" >
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
@ -76,10 +76,10 @@
|
||||
<mat-error *ngIf="!_businessAssetsQuesFrom.controls['business_activity'].value.valid">Field Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
|
||||
<mat-card *ngIf=" _businessAssetsQuesFrom.controls['business_activity'].value == 'yes'">
|
||||
<!----<mat-card *ngIf=" _businessAssetsQuesFrom.controls['business_activity'].value == 'yes'">
|
||||
|
||||
<div formArrayName="business_premises_additional_units">
|
||||
<div *ngFor="let item of _businessAssetsQuesFrom.controls.business_premises_additional_units['controls']; let i=index let last=last" >
|
||||
@ -130,7 +130,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</mat-card>
|
||||
</mat-card>-->
|
||||
|
||||
</mat-card>
|
||||
</div>
|
||||
@ -163,13 +163,13 @@
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-select placeholder="Property Type" formControlName="property_type" >
|
||||
<mat-select placeholder="Property Type" formControlName="property_type" (selectionChange)="setRequiredValidation($event.value,detail,6)">
|
||||
<mat-option *ngFor="let m_address_type of m_address_type" [value]="m_address_type.address_type_id"> {{m_address_type.address_type}} </mat-option>
|
||||
<!-- <mat-option *ngFor="let prop of m_propertyType" [value]="prop.id">{{ prop.name | titlecase }}</mat-option> -->
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%" *ngIf="detail.get('property_type').value == 1">
|
||||
<input matInput placeholder="Other Property Type" formControlName="other_property_type" autocomplete="off">
|
||||
<input matInput placeholder="Specify Other Property Type" formControlName="other_property_type" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
@ -185,8 +185,8 @@
|
||||
<input matInput placeholder="Description of the Vehicle" formControlName="manufacturer_model_vehicle" autocomplete="off">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-select placeholder="Type of Vehicle" formControlName="vehicle_type" >
|
||||
<mat-option *ngFor="let asset of m_vehicle_type" [value]="vehicle.vehicle_type_id">{{ vehicle.vehicle_type_name }}</mat-option>
|
||||
<mat-select placeholder="Type of Vehicle" formControlName="vehicle_type" (selectionChange)="setRequiredValidation($event.value,detail,5)">
|
||||
<mat-option *ngFor="let vehicle of m_vehicle_type" [value]="vehicle.vehicle_type_id">{{ vehicle.vehicle_type_name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%" *ngIf="detail.get('vehicle_type').value == 1">
|
||||
@ -352,7 +352,7 @@
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-select placeholder="Asset Owned by" formControlName="business_name_of_the_owner" [compareWith]="compareObjects">
|
||||
<mat-select placeholder="Asset Owned by" formControlName="business_name_of_the_owner" [compareWith]="compareObjects" (selectionChange)="setRequiredValidation($event.value,sup,4)">
|
||||
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
||||
<mat-option *ngFor="let val of group.groupValues" [value]="val">
|
||||
{{val.name}}
|
||||
|
||||
@ -266,18 +266,18 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
business_address_availability:[value.business_address_availability],
|
||||
business_is_pd_visited:[value.business_is_pd_visited],
|
||||
business_pd_visited_remark:[value.business_pd_visited_remark],
|
||||
business_activity:[value.business_activity],
|
||||
business_premises_additional_units: this._formBuilder.array([]),
|
||||
// business_activity:[value.business_activity],
|
||||
// business_premises_additional_units: this._formBuilder.array([]),
|
||||
business_assets_details : this._formBuilder.array([]),
|
||||
business_assets_form_remark:[value.business_assets_form_remark || null]
|
||||
});
|
||||
if(value.business_activity == 'yes'){
|
||||
this.addBusinessUnitsWithData(value.business_premises_additional_units);
|
||||
}
|
||||
else{
|
||||
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_premises_additional_units'];
|
||||
control.push(this.createUnits());
|
||||
}
|
||||
// if(value.business_activity == 'yes'){
|
||||
// this.addBusinessUnitsWithData(value.business_premises_additional_units);
|
||||
// }
|
||||
// else{
|
||||
// const control = <FormArray>this._businessAssetsQuesFrom.controls['business_premises_additional_units'];
|
||||
// control.push(this.createUnits());
|
||||
// }
|
||||
this.addBusinessAssetsDetailsWithData(value.business_assets_details);
|
||||
} else {
|
||||
this._businessAssetsQuesFrom = this._formBuilder.group({
|
||||
@ -290,12 +290,12 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
business_years:[''],
|
||||
business_month:[''],
|
||||
business_address_availability:[''],
|
||||
business_activity:[''],
|
||||
// business_activity:[''],
|
||||
business_is_pd_visited:[''],
|
||||
business_pd_visited_remark:[''],
|
||||
business_premises_additional_units: this._formBuilder.array([
|
||||
this.createUnits()
|
||||
]),
|
||||
// business_premises_additional_units: this._formBuilder.array([
|
||||
// this.createUnits()
|
||||
// ]),
|
||||
business_assets_form_remark:['']
|
||||
});
|
||||
}
|
||||
@ -573,30 +573,30 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
}
|
||||
|
||||
loadDetails: boolean;
|
||||
addBusinessUnitsWithData(data){
|
||||
// addBusinessUnitsWithData(data){
|
||||
|
||||
var result = Object.keys(data).map(function (key) {
|
||||
return data[key];
|
||||
});
|
||||
// var result = Object.keys(data).map(function (key) {
|
||||
// return data[key];
|
||||
// });
|
||||
|
||||
if (result.length > 0) {
|
||||
for (let val of result) {
|
||||
let vals = {
|
||||
no_of_additional_units: val.no_of_additional_units,
|
||||
premises_type: val.premises_type,
|
||||
premises_type_others: val.premises_type_others,
|
||||
premises_city: val.premises_city,
|
||||
premises_remarks: val.premises_remarks,
|
||||
};
|
||||
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_premises_additional_units'];
|
||||
control.push(this.createUnitswithData(vals));
|
||||
}
|
||||
}else{
|
||||
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_premises_additional_units'];
|
||||
control.push(this.createUnits());
|
||||
}
|
||||
// if (result.length > 0) {
|
||||
// for (let val of result) {
|
||||
// let vals = {
|
||||
// no_of_additional_units: val.no_of_additional_units,
|
||||
// premises_type: val.premises_type,
|
||||
// premises_type_others: val.premises_type_others,
|
||||
// premises_city: val.premises_city,
|
||||
// premises_remarks: val.premises_remarks,
|
||||
// };
|
||||
// const control = <FormArray>this._businessAssetsQuesFrom.controls['business_premises_additional_units'];
|
||||
// control.push(this.createUnitswithData(vals));
|
||||
// }
|
||||
// }else{
|
||||
// const control = <FormArray>this._businessAssetsQuesFrom.controls['business_premises_additional_units'];
|
||||
// control.push(this.createUnits());
|
||||
// }
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
addBusinessAssetsDetailsWithData(supp_data) {
|
||||
|
||||
@ -894,42 +894,42 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
console.log(item);
|
||||
console.log(value);
|
||||
console.log(flag);
|
||||
if(flag == 1){
|
||||
if(value == 'yes')
|
||||
{ this._businessAssetsQuesFrom.controls.business_years.setValidators([Validators.required]) ;
|
||||
this._businessAssetsQuesFrom.controls.business_month.setValidators([Validators.required]) ;
|
||||
this._businessAssetsQuesFrom.controls.business_address_availability.setValidators([Validators.required]) ;
|
||||
this._businessAssetsQuesFrom.controls.business_activity.setValidators([Validators.required]) ;
|
||||
this._businessAssetsQuesFrom.controls.business_is_pd_visited.setValidators([Validators.required]) ;
|
||||
this._businessAssetsQuesFrom.controls.business_pd_visited_remark.setValidators([Validators.required]) ;
|
||||
this._businessAssetsQuesFrom.controls.business_activity.setValidators([Validators.required]) ;
|
||||
}
|
||||
else{
|
||||
this._businessAssetsQuesFrom.controls.business_years.clearValidators();
|
||||
this._businessAssetsQuesFrom.controls.business_month.clearValidators();
|
||||
this._businessAssetsQuesFrom.controls.business_address_availability.clearValidators();
|
||||
this._businessAssetsQuesFrom.controls.business_activity.clearValidators();
|
||||
this._businessAssetsQuesFrom.controls.business_is_pd_visited.clearValidators();
|
||||
this._businessAssetsQuesFrom.controls.business_pd_visited_remark.clearValidators();
|
||||
this._businessAssetsQuesFrom.controls.business_activity.clearValidators();
|
||||
}
|
||||
this._businessAssetsQuesFrom.controls.business_years.updateValueAndValidity();
|
||||
this._businessAssetsQuesFrom.controls.business_month.updateValueAndValidity();
|
||||
this._businessAssetsQuesFrom.controls.business_address_availability.updateValueAndValidity();
|
||||
this._businessAssetsQuesFrom.controls.business_activity.updateValueAndValidity();
|
||||
this._businessAssetsQuesFrom.controls.business_is_pd_visited.updateValueAndValidity();
|
||||
this._businessAssetsQuesFrom.controls.business_pd_visited_remark.updateValueAndValidity();
|
||||
this._businessAssetsQuesFrom.controls.business_activity.updateValueAndValidity();
|
||||
|
||||
if(flag == 1){
|
||||
if(value == 'yes')
|
||||
{ this._businessAssetsQuesFrom.controls.business_years.setValidators([Validators.required]) ;
|
||||
this._businessAssetsQuesFrom.controls.business_month.setValidators([Validators.required]) ;
|
||||
this._businessAssetsQuesFrom.controls.business_address_availability.setValidators([Validators.required]) ;
|
||||
// this._businessAssetsQuesFrom.controls.business_activity.setValidators([Validators.required]) ;
|
||||
this._businessAssetsQuesFrom.controls.business_is_pd_visited.setValidators([Validators.required]) ;
|
||||
this._businessAssetsQuesFrom.controls.business_pd_visited_remark.setValidators([Validators.required]) ;
|
||||
// this._businessAssetsQuesFrom.controls.business_activity.setValidators([Validators.required]) ;
|
||||
}
|
||||
else{
|
||||
this._businessAssetsQuesFrom.controls.business_years.clearValidators();
|
||||
this._businessAssetsQuesFrom.controls.business_month.clearValidators();
|
||||
this._businessAssetsQuesFrom.controls.business_address_availability.clearValidators();
|
||||
// this._businessAssetsQuesFrom.controls.business_activity.clearValidators();
|
||||
this._businessAssetsQuesFrom.controls.business_is_pd_visited.clearValidators();
|
||||
this._businessAssetsQuesFrom.controls.business_pd_visited_remark.clearValidators();
|
||||
// this._businessAssetsQuesFrom.controls.business_activity.clearValidators();
|
||||
}
|
||||
this._businessAssetsQuesFrom.controls.business_years.updateValueAndValidity();
|
||||
this._businessAssetsQuesFrom.controls.business_month.updateValueAndValidity();
|
||||
this._businessAssetsQuesFrom.controls.business_address_availability.updateValueAndValidity();
|
||||
// this._businessAssetsQuesFrom.controls.business_activity.updateValueAndValidity();
|
||||
this._businessAssetsQuesFrom.controls.business_is_pd_visited.updateValueAndValidity();
|
||||
this._businessAssetsQuesFrom.controls.business_pd_visited_remark.updateValueAndValidity();
|
||||
// this._businessAssetsQuesFrom.controls.business_activity.updateValueAndValidity();
|
||||
|
||||
|
||||
}
|
||||
if(flag == 2){
|
||||
value==1
|
||||
? item.controls.premises_type_others.setValidators([Validators.required])
|
||||
: item.controls.premises_type_others.clearValidators();
|
||||
item.controls.premises_type_others.updateValueAndValidity();
|
||||
}
|
||||
if(flag == 3){
|
||||
}
|
||||
// if(flag == 2){
|
||||
// value==1
|
||||
// ? item.controls.premises_type_others.setValidators([Validators.required])
|
||||
// : item.controls.premises_type_others.clearValidators();
|
||||
// item.controls.premises_type_others.updateValueAndValidity();
|
||||
// }
|
||||
if(flag == 3){
|
||||
if(value == 'owned'){
|
||||
item.controls.business_monthly_rented_amt.clearValidators();
|
||||
item.controls.business_name_of_the_owner.setValidators([Validators.required]);
|
||||
@ -941,18 +941,36 @@ if(flag == 3){
|
||||
item.controls.business_monthly_rented_amt.updateValueAndValidity();
|
||||
item.controls.business_name_of_the_owner.updateValueAndValidity();
|
||||
}
|
||||
if(flag == 4){
|
||||
value==0
|
||||
? item.controls.business_name_of_the_other_owner.setValidators([Validators.required])
|
||||
: item.controls.business_name_of_the_other_owner.clearValidators();
|
||||
item.controls.business_name_of_the_other_owner.updateValueAndValidity();
|
||||
}
|
||||
if(flag == 5){
|
||||
value==1
|
||||
? item.controls.other_vehicle_type.setValidators([Validators.required])
|
||||
: item.controls.other_vehicle_type.clearValidators();
|
||||
item.controls.other_vehicle_type.updateValueAndValidity();
|
||||
}
|
||||
if(flag == 6){
|
||||
value==1
|
||||
? item.controls.other_property_type.setValidators([Validators.required])
|
||||
: item.controls.other_property_type.clearValidators();
|
||||
item.controls.other_property_type.updateValueAndValidity();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
addUnits() {
|
||||
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_premises_additional_units'];
|
||||
control.push(this.createUnits());
|
||||
}
|
||||
// addUnits() {
|
||||
// const control = <FormArray>this._businessAssetsQuesFrom.controls['business_premises_additional_units'];
|
||||
// control.push(this.createUnits());
|
||||
// }
|
||||
|
||||
removeUnits(index) {
|
||||
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_premises_additional_units'];
|
||||
control.removeAt(index);
|
||||
}
|
||||
// removeUnits(index) {
|
||||
// const control = <FormArray>this._businessAssetsQuesFrom.controls['business_premises_additional_units'];
|
||||
// control.removeAt(index);
|
||||
// }
|
||||
|
||||
selectedAddressType(e: any){
|
||||
this.placeholderName = 'Was any business activity seen at the '+e+' during PD visit?';
|
||||
|
||||
@ -135,7 +135,7 @@
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width: 45%">
|
||||
<mat-select placeholder="Trading Product Name" formControlName="trade_product_name">
|
||||
<mat-option *ngFor="let pm of m_tradingProducts[0]" [value]="pm.name">{{ pm.name }}</mat-option>
|
||||
<mat-option *ngFor="let pm of m_tradingProducts" [value]="pm.name">{{ pm.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<!--<mat-form-field style="width: 100%">
|
||||
|
||||
@ -58,13 +58,13 @@ export class ClientInfoComponent implements OnInit {
|
||||
}
|
||||
];
|
||||
public m_tradingProducts = [
|
||||
{
|
||||
id: 1,
|
||||
name: 'trading prd 1'
|
||||
}, {
|
||||
id: 2,
|
||||
name: 'trading prd 2'
|
||||
}
|
||||
// {
|
||||
// id: 1,
|
||||
// name: 'trading prd 1'
|
||||
// }, {
|
||||
// id: 2,
|
||||
// name: 'trading prd 2'
|
||||
// }
|
||||
];
|
||||
public m_suplierProducts = [
|
||||
{
|
||||
@ -139,9 +139,27 @@ export class ClientInfoComponent implements OnInit {
|
||||
// };
|
||||
let datas = data.records;
|
||||
this.m_manufacturingProducts = datas.type_of_activity.filter(data=>{if(data.type_of_activity_id == 2 ){return data}}).map(data=> [...data.prodcuts]);
|
||||
this.m_tradingProducts = datas.type_of_activity.filter(data=>{if(data.type_of_activity_id == 4 || data.type_of_activity_id == 3){return data}}).map(data=> [...data.prodcuts]);
|
||||
// this.m_tradingProducts = datas.type_of_activity.filter(data=>{if(data.type_of_activity_id == 3){return data}}).map(data=> [...data.prodcuts]);
|
||||
this.m_suplierProducts = datas.type_of_activity.filter(data=>{if(data.type_of_activity_id == 5 ){return data}}).map(data=> [...data.prodcuts]);
|
||||
// alert(JSON.stringify(this.m_manufacturingProducts[0]));
|
||||
let api = Object.keys(datas.type_of_activity).map(function (key) {
|
||||
return datas.type_of_activity[key];
|
||||
});
|
||||
if(api.length > 0){
|
||||
api.forEach(val => {
|
||||
if (val.type_of_activity_id == 3) {
|
||||
if(val.prodcuts){
|
||||
this.m_tradingProducts.push(val.prodcuts);
|
||||
}
|
||||
}
|
||||
|
||||
if (val.type_of_activity_id == 4) {
|
||||
if(val.prodcuts){
|
||||
this.m_tradingProducts.push(val.prodcuts);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
this.m_tradingProducts = [].concat.apply([], this.m_tradingProducts);
|
||||
this.initFormLoadDetails(datas.type_of_activity);
|
||||
}else {
|
||||
this.notifier.notify('warning', 'No Category Records Found.!');
|
||||
@ -152,7 +170,7 @@ export class ClientInfoComponent implements OnInit {
|
||||
this.notifier.notify('warning', 'No Category Records Found.!');
|
||||
this.noRecordsFound = false;
|
||||
this.errorMessage = 'No Records Found , Something went Wrong!';
|
||||
})
|
||||
});
|
||||
|
||||
// this.getM_FreqOfPurchase();
|
||||
this.getM_PaymentModeType();
|
||||
@ -584,7 +602,7 @@ export class ClientInfoComponent implements OnInit {
|
||||
var answerFormValues = this._supplierQuesFrom.value;
|
||||
|
||||
//To Remove The "Null" With Key also
|
||||
Object.keys(answerFormValues).forEach((key) => {if(answerFormValues[key] === null || answerFormValues[key] === undefined || answerFormValues[key] === ''){ delete answerFormValues[key]}; console.log("chec:" +answerFormValues[key])});
|
||||
Object.keys(answerFormValues).forEach((key) => {if(answerFormValues[key] === null || answerFormValues[key] === undefined || answerFormValues[key] === ''){ delete answerFormValues[key]}; });
|
||||
if(answerFormValues.manufacturing_details[0]==null){
|
||||
delete answerFormValues['manufacturing_details'];
|
||||
}
|
||||
@ -594,7 +612,7 @@ export class ClientInfoComponent implements OnInit {
|
||||
if(answerFormValues.service_provider_details[0]==null){
|
||||
delete answerFormValues['service_provider_details'];
|
||||
}
|
||||
// Add BRANCH data with help Service File
|
||||
// Add data with help of Service.
|
||||
this.pdTrigerService.savePDFormDetailsWithID(answerFormValues).subscribe(
|
||||
dataresult => {
|
||||
if (dataresult.status == 200) {
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
</mat-card>
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<mat-form-field style="width:40%;">{{m_recommendationList || json}}
|
||||
<mat-form-field style="width:40%;">
|
||||
<mat-select placeholder="PD Officers Recommendation:" formControlName="pd_officers_recommendation" required (selectionChange)="RecommendationChange($event.value)">
|
||||
<mat-option *ngFor="let list of m_recommendationList" [value]="list.pdofficer_recommendation_id">{{ list.pdofficer_recommendation }}</mat-option>
|
||||
<!-- pdofficer_recommendation_id: "2", pdofficer_recommendation: "Positive" -->
|
||||
|
||||
Loading…
Reference in New Issue
Block a user