sheet changes : ps
This commit is contained in:
parent
7fcc111147
commit
c94c53777c
@ -131,7 +131,7 @@
|
||||
<div formArrayName="addresses" *ngFor="let addresses of pdAddresses.controls; let i = index;">
|
||||
<mat-card-content [formGroupName]="i">
|
||||
<mat-form-field style="width: 96%">
|
||||
<textarea matInput autocomplete="off" placeholder="Address at which PD is to be done" formControlName="addressline" style="text-transform: uppercase"></textarea>
|
||||
<textarea matInput autocomplete="off" placeholder="Address at which PD is to be done" formControlName="addressline1" style="text-transform: uppercase"></textarea>
|
||||
<!-- oninput="this.value = this.value.toUpperCase()" -->
|
||||
<!-- <mat-error *ngIf="pdAddresses.addressline1.hasError('required')">Address1 required.</mat-error> -->
|
||||
</mat-form-field>
|
||||
|
||||
@ -268,7 +268,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
get pdAddresses() { return this._PDtriggerForm.get('addresses') as FormArray; }
|
||||
createAddresses(): FormGroup {
|
||||
return this._fb.group({
|
||||
addressline: [null],
|
||||
addressline1: [null],
|
||||
fk_city: [null],
|
||||
fk_state: [null],
|
||||
pincode: [null],/** ,Validators.compose([Validators.minLength(6),Validators.maxLength(6)]) */
|
||||
@ -477,7 +477,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
"fk_pd_type": formValue.fk_pd_type,
|
||||
"fk_customer_segment": formValue.fk_customer_segment,
|
||||
"loan_amount": formValue.loan_amount,
|
||||
"addressline1": formValue.addresses[0].addressline.toUpperCase(),
|
||||
"addressline1": formValue.addresses[0].addressline1.toUpperCase(),
|
||||
"fk_city": formValue.addresses[0].fk_city,
|
||||
"fk_state": formValue.addresses[0].fk_state,
|
||||
"pincode": formValue.addresses[0].pincode,
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Main Applicant</mat-card-title>
|
||||
<mat-card-title>Applicant 1</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<mat-form-field style="width: 15%">
|
||||
@ -51,9 +51,9 @@
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card formArrayName="coApplicantItems" *ngFor="let coDetails of pdCoApplicant.controls; let i = index;">
|
||||
<!-- <mat-card-header>
|
||||
<mat-card-title>Co Applicant</mat-card-title>
|
||||
</mat-card-header> -->
|
||||
<mat-card-header>
|
||||
<mat-card-title>Applicant {{i+2}}</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content [formGroupName]="i">
|
||||
<mat-form-field style="width: 15%">
|
||||
<mat-select placeholder="Title" formControlName="applicant_title_name">
|
||||
|
||||
@ -138,13 +138,13 @@
|
||||
<div formArrayName="addresses" *ngFor="let addresses of pdAddresses.controls; let i = index; let last = last">
|
||||
<mat-card [formGroupName]="i">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Address Details #{{i+1}} <span *ngIf="!addressesDeactivited[i]" style="color: red;" align="end"><i> Deactivited </i></span> </mat-card-title>
|
||||
<mat-card-title>Address Details #{{i+1}} <span *ngIf="!addressesDeactivited[i]" style="color: red;" align="end"><i> Deactivited </i></span> </mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
|
||||
<mat-form-field style="width: 96%">
|
||||
<textarea matInput autocomplete="off" placeholder="Address at which PD is to be done"
|
||||
formControlName="addressline" style="text-transform: uppercase"></textarea>
|
||||
formControlName="addressline1" style="text-transform: uppercase"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 32%">
|
||||
@ -186,11 +186,16 @@
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="end">
|
||||
|
||||
<button mat-raised-button mat-icon-button matTooltip="Delete"
|
||||
matTooltipPosition="above" (click)="removeAddresses(i)"
|
||||
type="button" *ngIf="pdAddresses.controls.length > 1 && addressesDeactivited[i]">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
<button mat-raised-button mat-icon-button matTooltip="Delete"
|
||||
matTooltipPosition="above" (click)="removeAddresses(i,'Deactivited')"
|
||||
type="button" *ngIf="pdAddresses.controls.length > 1 && addressesDeactivited[i]">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
<button type="button" mat-flat-button (click)="removeAddresses(i,'Activited')"
|
||||
matTooltipPosition="above" color="primary" *ngIf="!addressesDeactivited[i]">
|
||||
<strong>Deleted</strong>
|
||||
</button>
|
||||
|
||||
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="addAddresses()" *ngIf="last"
|
||||
matTooltip="Add More Additional Addresses" matTooltipPosition="above"
|
||||
|
||||
@ -196,15 +196,15 @@ export class EditPdMasterComponent implements OnInit {
|
||||
this.addressesDeactivited[index] = true;
|
||||
let obj = {
|
||||
pd_address_id:val.pd_address_id,
|
||||
addressline: val.addressline.toUpperCase(),
|
||||
addressline1: val.addressline1.toUpperCase(),
|
||||
fk_city: val.fk_city,
|
||||
fk_state: val.fk_state,
|
||||
pincode: val.pincode,
|
||||
pincode: val.pincode_id,
|
||||
other_pincode:val.other_pincode,
|
||||
isactive:1,
|
||||
}
|
||||
this.getCityList(val.fk_state,index);
|
||||
this.getPincode(val.pincode,index);
|
||||
this.getPincode(val.pincode_id,index);
|
||||
addressesArray.push(this.createAddresses(obj));
|
||||
});
|
||||
}
|
||||
@ -250,7 +250,7 @@ export class EditPdMasterComponent implements OnInit {
|
||||
return this._fb.group({
|
||||
fk_pd_id:[this.pdid],
|
||||
pd_address_id:[null],
|
||||
addressline: [null],
|
||||
addressline1: [null],
|
||||
fk_city: [null],
|
||||
fk_state: [null],
|
||||
pincode: [null],/** ,Validators.compose([Validators.minLength(6),Validators.maxLength(6)]) */
|
||||
@ -262,7 +262,7 @@ export class EditPdMasterComponent implements OnInit {
|
||||
return this._fb.group({
|
||||
fk_pd_id:[this.pdid],
|
||||
pd_address_id:[data.pd_address_id],
|
||||
addressline: [data.addressline.toUpperCase()],
|
||||
addressline1: [data.addressline1.toUpperCase()],
|
||||
fk_city: [data.fk_city],
|
||||
fk_state: [data.fk_state],
|
||||
pincode : [data.pincode],
|
||||
@ -276,10 +276,17 @@ export class EditPdMasterComponent implements OnInit {
|
||||
this.addresses.push(this.createAddresses(null));
|
||||
}
|
||||
|
||||
removeAddresses(index: number) {
|
||||
removeAddresses(index: number,strflag : any) {
|
||||
const address_control = <FormArray>this._EditPDtriggerForm.controls['addresses'];
|
||||
address_control.controls[index]['controls'].isactive.setValue(0);
|
||||
this.addressesDeactivited[index] = false;
|
||||
if(strflag == 'Deactivited'){
|
||||
address_control.controls[index]['controls'].isactive.setValue(0);
|
||||
this.addressesDeactivited[index] = false;
|
||||
}
|
||||
else if(strflag == 'Activited'){
|
||||
address_control.controls[index]['controls'].isactive.setValue(1);
|
||||
this.addressesDeactivited[index] = true;
|
||||
}
|
||||
|
||||
// console.log('address_control',address_control);
|
||||
// console.log('address_control.controls[index]',address_control.controls[index]);
|
||||
// console.log('address_control.controls[index][controls]',address_control.controls[index]['controls']);
|
||||
@ -432,7 +439,7 @@ export class EditPdMasterComponent implements OnInit {
|
||||
"fk_pd_type": my_array.fk_pd_type,
|
||||
"fk_customer_segment": my_array.fk_customer_segment,
|
||||
"loan_amount": my_array.loan_amount,
|
||||
"addressline1": filteredAddressesdata[0].addressline.toUpperCase(),
|
||||
"addressline1": filteredAddressesdata[0].addressline1.toUpperCase(),
|
||||
"fk_city": filteredAddressesdata[0].fk_city,
|
||||
"fk_state": filteredAddressesdata[0].fk_state,
|
||||
"pincode": filteredAddressesdata[0].pincode,
|
||||
|
||||
@ -79,7 +79,7 @@ export class AddressComponent implements OnInit {
|
||||
private _pd: PdTrigerService,
|
||||
private dialogRef: MatDialogRef<AddressComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
|
||||
|
||||
// console.log('pd_all_details',pd_all_details);
|
||||
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
|
||||
this.form_id = 5;
|
||||
|
||||
@ -216,16 +216,17 @@ export class AddressComponent implements OnInit {
|
||||
data => {
|
||||
if (data.status == 200) {
|
||||
this.addressesList = data.records.filter(item => item.isactive == 1);
|
||||
console.log('this.addressesList',this.addressesList);
|
||||
|
||||
if (this.addressesList.length > 0) {
|
||||
this.addressesList.forEach((val,index)=>{
|
||||
let obj = {
|
||||
'address': val.addressline,
|
||||
'address': val.addressline1,
|
||||
'address_type': '',
|
||||
'address_type_others': '',
|
||||
'state': val.fk_state,
|
||||
'city': val.fk_city,
|
||||
'pincode': val.pincode,
|
||||
'pincode': val.pincode_id,
|
||||
'pincode_others': val.other_pincode,
|
||||
'locality': '',
|
||||
'locality_others': '',
|
||||
@ -237,7 +238,7 @@ export class AddressComponent implements OnInit {
|
||||
'uom_others': ''
|
||||
}
|
||||
this.getCityAndPincodeDetails(val.fk_state,index);
|
||||
this.getOtherPincode(val.pincode,index);
|
||||
this.getOtherPincode(val.pincode_id,index);
|
||||
control.push(this.createAddresses(obj));
|
||||
});
|
||||
}
|
||||
|
||||
@ -51,6 +51,31 @@
|
||||
<input matInput placeholder="Specify Other Property Type" formControlName="other_property_type" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width:45%" *ngIf="detail.get('property_type').value != ''">
|
||||
<input matInput placeholder="Address of the Property" formControlName="address_of_the_property"
|
||||
autocomplete="off">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%" *ngIf="detail.get('property_type').value != ''">
|
||||
<input matInput placeholder="Description of the Property" formControlName="describe_of_the_property_asset"
|
||||
autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width:45%">
|
||||
<input matInput placeholder="Area Covered" formControlName="area_covered_by_this_property"
|
||||
autocomplete="off">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-select placeholder="Unit of Measurement" formControlName="uom_of_the_property" (selectionChange)="setRequiredValidation($event.value,detail,6)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let uom of m_uom_type" [value]="uom.uom_id">{{ uom.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="detail.get('uom_of_the_property').value == 1" style="width:45%">
|
||||
<input matInput placeholder="Specify Unit of Measurement" formControlName="other_uom" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -70,6 +70,8 @@ export class AssetsInfoComponent implements OnInit {
|
||||
public m_freqOfPurchase = [];
|
||||
|
||||
public m_vehicle_type = [];
|
||||
|
||||
public m_uom_type = [];
|
||||
|
||||
private notifier: NotifierService;
|
||||
existCompanyList: any =[];
|
||||
@ -149,6 +151,7 @@ export class AssetsInfoComponent implements OnInit {
|
||||
//this.getM_Relation();
|
||||
//this.getM_InsuranceType();
|
||||
this.getM_Vehicle_Type();
|
||||
this.getM_UOM_Type();
|
||||
}
|
||||
|
||||
// ======================
|
||||
@ -221,6 +224,15 @@ export class AssetsInfoComponent implements OnInit {
|
||||
})
|
||||
}
|
||||
|
||||
getM_UOM_Type() {
|
||||
this.pdTrigerService.getAllMasterDatas('UOM').subscribe(
|
||||
data => {
|
||||
this.m_uom_type = data.records.filter(data => data.isactive == 1 && data. is_land_uom == 1 || data. is_land_uom == 2);
|
||||
// console.log('this.m_uom_type',data.records,this.m_uom_type);
|
||||
//
|
||||
})
|
||||
}
|
||||
|
||||
// getM_InsuranceType() {
|
||||
// this.pdTrigerService.getAllMasterDatas('INSURANCETYPE').subscribe(
|
||||
// data => {
|
||||
@ -372,7 +384,12 @@ export class AssetsInfoComponent implements OnInit {
|
||||
loadProperty() {
|
||||
return this._formBuilder.group({
|
||||
property_type: [''],
|
||||
other_property_type: ['']
|
||||
other_property_type: [''],
|
||||
address_of_the_property :[''],
|
||||
describe_of_the_property_asset :[''],
|
||||
area_covered_by_this_property :[''],
|
||||
uom_of_the_property:[''],
|
||||
other_uom:['']
|
||||
});
|
||||
}
|
||||
|
||||
@ -452,7 +469,12 @@ export class AssetsInfoComponent implements OnInit {
|
||||
loadPropertyWithData(data) {
|
||||
return this._formBuilder.group({
|
||||
property_type: [data.property_type],
|
||||
other_property_type: [data.other_property_type]
|
||||
other_property_type: [data.other_property_type],
|
||||
address_of_the_property :[data.address_of_the_property],
|
||||
describe_of_the_property_asset :[data.describe_of_the_property_asset],
|
||||
area_covered_by_this_property :[data.area_covered_by_this_property],
|
||||
uom_of_the_property:[data.uom_of_the_property],
|
||||
other_uom : [data.other_uom]
|
||||
//property_type:['']
|
||||
});
|
||||
}
|
||||
@ -626,7 +648,10 @@ export class AssetsInfoComponent implements OnInit {
|
||||
case '2': {
|
||||
let array_data : any;
|
||||
data.forEach((datas,i) => {
|
||||
array_data = { 'property_type':datas.property_type,'other_property_type':datas.other_property_type };
|
||||
array_data = { 'property_type':datas.property_type,'other_property_type':datas.other_property_type,
|
||||
'address_of_the_property' :datas.address_of_the_property,'describe_of_the_property_asset' :datas.describe_of_the_property_asset,
|
||||
'uom_of_the_property':datas.uom_of_the_property,
|
||||
'area_covered_by_this_property' :datas.area_covered_by_this_property,'other_uom':datas.other_uom };
|
||||
});
|
||||
const control = (<FormArray>this._assetsQuesFrom.controls['assets_details']).at(val).get('details') as FormArray;
|
||||
control.push(this.loadPropertyWithData(array_data));
|
||||
@ -861,6 +886,12 @@ export class AssetsInfoComponent implements OnInit {
|
||||
: item.controls.other_vehicle_type.clearValidators();
|
||||
item.controls.other_vehicle_type.updateValueAndValidity();
|
||||
}
|
||||
if(flag == 6){
|
||||
value==1
|
||||
? item.controls.other_uom.setValidators([Validators.required])
|
||||
: item.controls.other_uom.clearValidators();
|
||||
item.controls.other_uom.updateValueAndValidity();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<mat-card-title>
|
||||
<p>Address Details {{itemrow.get('address_label').value | titlecase}}</p>
|
||||
<p>Address Details {{ " : " + itemrow.get('address_label').value | titlecase}}</p>
|
||||
</mat-card-title>
|
||||
</mat-card-header>
|
||||
|
||||
|
||||
@ -211,7 +211,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
let addressType = data.address_type != 1 ? selectedAddressType.address_type : data.address_type_others;
|
||||
|
||||
this.placeholderName[inx] = 'Was any business activity seen at the ' + addressType + ' during PD visit?';
|
||||
let addressLabel = " : " + address + ' / ' + addressType;
|
||||
let addressLabel = address + ' / ' + addressType;
|
||||
|
||||
let vals = {
|
||||
address_label:addressLabel,
|
||||
|
||||
@ -207,25 +207,14 @@ export class ClientInfoComponent implements OnInit {
|
||||
// let api_main_raw_materials = Object.keys(dataForm.main_raw_materials).map(function (key) {
|
||||
// return dataForm.main_raw_materials[key];
|
||||
// });
|
||||
// let api_main_raw_materials = dataForm.manufacturing_details[0].main_raw_materials;
|
||||
|
||||
// this.initManufacturingProductsDetails(api_main_raw_materials);
|
||||
// this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(dataForm.manufacturing_details[0].main_raw_materials_total_payments_percent_on_credit || null);
|
||||
if(dataForm.manufacturing_details[0] !== null){
|
||||
alert('not null manu');
|
||||
let api_main_raw_materials = Object.keys(dataForm.manufacturing_details).map(function (key) {
|
||||
return dataForm.manufacturing_details[key];
|
||||
});
|
||||
|
||||
this.initManufacturingProductsDetails(api_main_raw_materials[0]['main_raw_materials']);
|
||||
this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(api_main_raw_materials[0]['main_raw_materials_total_payments_percent_on_credit'] || null);
|
||||
|
||||
if(dataForm.manufacturing_details){
|
||||
let api_main_raw_materials = dataForm.manufacturing_details[0].main_raw_materials;
|
||||
this.initManufacturingProductsDetails(api_main_raw_materials);
|
||||
this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(dataForm.manufacturing_details[0].main_raw_materials_total_payments_percent_on_credit || null);
|
||||
}
|
||||
else{
|
||||
alert('null manu');
|
||||
this.initManufacturingProductsDetails(null);
|
||||
this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(null);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -235,26 +224,16 @@ export class ClientInfoComponent implements OnInit {
|
||||
// let api_trading_products = Object.keys(dataForm.trading_products).map(function (key) {
|
||||
// return dataForm.trading_products[key];
|
||||
// });
|
||||
// let api_trading_products = dataForm.trade_details[0].trading_products;
|
||||
|
||||
// this.initTradingProductsDetails(api_trading_products);
|
||||
// this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(dataForm.trade_details[0].trading_products_total_payments_percent_on_credit || null);
|
||||
if(dataForm.trade_details[0] !== null){
|
||||
// alert('not null manu');
|
||||
let api_trading_products = Object.keys(dataForm.trade_details).map(function (key) {
|
||||
return dataForm.trade_details[key];
|
||||
});
|
||||
|
||||
this.initTradingProductsDetails(api_trading_products[0]['trading_products']);
|
||||
this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(dataForm.trade_details[0]['trading_products_total_payments_percent_on_credit'] || null);
|
||||
|
||||
if(dataForm.trade_details){
|
||||
let api_trading_products = dataForm.trade_details[0].trading_products;
|
||||
this.initTradingProductsDetails(api_trading_products);
|
||||
this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(dataForm.trade_details[0].trading_products_total_payments_percent_on_credit || null);
|
||||
}
|
||||
else{
|
||||
// alert('null manu');
|
||||
this.initTradingProductsDetails(null);-
|
||||
this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(null);
|
||||
|
||||
this.initTradingProductsDetails(null);-
|
||||
this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Load form details for the service provider prduct details
|
||||
@ -266,24 +245,14 @@ export class ClientInfoComponent implements OnInit {
|
||||
// let api_service_provider_products = dataForm.service_provider_details[0].service_products;
|
||||
// this.initServiceProviderProductsDetails(api_service_provider_products);
|
||||
// this._supplierQuesFrom.controls['service_provider_details']['controls'][0].controls['service_products_total_payments_percent_on_credit'].setValue(dataForm.service_provider_details[0].service_products_total_payments_percent_on_credit || null);
|
||||
if(dataForm.service_provider_details[0] !== null){
|
||||
// alert('not null manu');
|
||||
let api_service_provider_products = Object.keys(dataForm.manufacturing_details).map(function (key) {
|
||||
return dataForm.manufacturing_details[key];
|
||||
});
|
||||
|
||||
this.initServiceProviderProductsDetails(api_service_provider_products[0]['service_products']);
|
||||
// this._supplierQuesFrom.controls['service_provider_details']['controls'][0].controls['service_products_total_payments_percent_on_credit'].setValue(dataForm.service_provider_details[0].service_products_total_payments_percent_on_credit || null);
|
||||
this._supplierQuesFrom.controls['service_provider_details']['controls'][0].controls['service_products_total_payments_percent_on_credit'].setValue(api_service_provider_products[0]['service_products_total_payments_percent_on_credit'] || null);
|
||||
|
||||
if(dataForm.service_provider_details){
|
||||
let api_service_provider_products = dataForm.service_provider_details[0].service_products;
|
||||
this.initServiceProviderProductsDetails(api_service_provider_products);
|
||||
this._supplierQuesFrom.controls['service_provider_details']['controls'][0].controls['service_products_total_payments_percent_on_credit'].setValue(dataForm.service_provider_details[0].service_products_total_payments_percent_on_credit || null);
|
||||
}
|
||||
else{
|
||||
// alert('null manu');
|
||||
|
||||
this.initServiceProviderProductsDetails(null);
|
||||
// this._supplierQuesFrom.controls['service_provider_details']['controls'][0].controls['service_products_total_payments_percent_on_credit'].setValue(dataForm.service_provider_details[0].service_products_total_payments_percent_on_credit || null);
|
||||
this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(null);
|
||||
|
||||
this._supplierQuesFrom.controls['service_provider_details']['controls'][0].controls['service_products_total_payments_percent_on_credit'].setValue(null);
|
||||
}
|
||||
}
|
||||
// Load form details for the retail trading details
|
||||
|
||||
@ -157,7 +157,7 @@ export class CurrentLoanComponent implements OnInit {
|
||||
//this.selectedLoanTakenBy(val.loan_taken_by,index);
|
||||
|
||||
let objs = {
|
||||
'label': val.loan_amount,
|
||||
'label': val.label,
|
||||
'loan_amount': val.loan_amount,
|
||||
'frequency':val.frequency,
|
||||
'other_frequency':val.other_frequency,
|
||||
@ -234,12 +234,12 @@ export class CurrentLoanComponent implements OnInit {
|
||||
let labelarray : any = [];
|
||||
|
||||
this.dataFromAssets.forEach((val,index) => {
|
||||
|
||||
if(val.mode == 0){
|
||||
let owner = val.owner_name.map((e => {
|
||||
return e.name.split(',')
|
||||
}));
|
||||
labelarray[index] = val.mode_name +' - '+owner ;
|
||||
// labelarray[index] = ' : '+owner +' - '+ val.mode_name.split("/")[0] + ' ( ' + val.mode_name.split("/")[1] + ' )';
|
||||
labelarray[index] = ' : '+owner +' - '+ val.mode_name;
|
||||
}
|
||||
|
||||
if(val.mode == 1){
|
||||
|
||||
@ -42,14 +42,17 @@
|
||||
<mat-option *ngFor="let list of m_recommendationList" [value]="list.pdofficer_recommendation_id">{{ list.pdofficer_recommendation }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%;" *ngIf="_finalRemarkForm.controls['pd_officers_recommendation'].value == 3">
|
||||
<input matInput autocomplete="off" placeholder="Specify Reason for Negative" formControlName="enter_reason_for_negative">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%;" *ngIf="_finalRemarkForm.controls['pd_officers_recommendation'].value == 1">
|
||||
<input matInput autocomplete="off" placeholder="Specify PD Officers Recommendation" formControlName="others_pd_officers_recommendation">
|
||||
<input matInput autocomplete="off" placeholder="Specify PD Officers Recommendation" formControlName="others_pd_officers_recommendation">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%;" *ngIf="_finalRemarkForm.controls['pd_officers_recommendation'].value == 2">
|
||||
<input matInput autocomplete="off" placeholder="Reasons for marking PD status as Positive" formControlName="reason_for_positive">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%;" *ngIf="_finalRemarkForm.controls['pd_officers_recommendation'].value == 3">
|
||||
<input matInput autocomplete="off" placeholder="Reasons for marking PD status as Negative" formControlName="reason_for_negative">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%;" *ngIf="_finalRemarkForm.controls['pd_officers_recommendation'].value == 4">
|
||||
<input matInput autocomplete="off" placeholder="Specify Reason for Refer to Credit" formControlName="enter_reason_for_refer_to_credit">
|
||||
<input matInput autocomplete="off" placeholder="Reasons for marking PD status as 'Refer to Credit" formControlName="reason_for_refer_to_credit">
|
||||
</mat-form-field>
|
||||
</mat-card>
|
||||
</mat-dialog-content>
|
||||
@ -57,7 +60,7 @@
|
||||
<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="final_form_remarks" required></textarea>
|
||||
<textarea matInput placeholder="Remarks" formControlName="final_form_remarks"></textarea>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="40" align="end">
|
||||
|
||||
@ -69,9 +69,10 @@ export class FinalRemarksComponent implements OnInit {
|
||||
is_service_provided: ['', Validators.required],
|
||||
pd_officers_recommendation:['', Validators.required],
|
||||
others_pd_officers_recommendation:[''],
|
||||
enter_reason_for_negative:[''],
|
||||
enter_reason_for_refer_to_credit:[''],
|
||||
final_form_remarks: ['',Validators.required]
|
||||
reason_for_positive:[''],
|
||||
reason_for_negative:[''],
|
||||
reason_for_refer_to_credit:[''],
|
||||
final_form_remarks: ['']
|
||||
});
|
||||
this.getM_Type();
|
||||
this.getM_Recommendation();
|
||||
@ -106,8 +107,9 @@ export class FinalRemarksComponent implements OnInit {
|
||||
this._finalRemarkForm.controls.final_other_customer_behaviour.setValue(data.records.final_other_customer_behaviour);
|
||||
this._finalRemarkForm.controls.pd_officers_recommendation.setValue(data.records.pd_officers_recommendation);
|
||||
this._finalRemarkForm.controls.others_pd_officers_recommendation.setValue(data.records.others_pd_officers_recommendation);
|
||||
this._finalRemarkForm.controls.enter_reason_for_negative.setValue(data.records.enter_reason_for_negative);
|
||||
this._finalRemarkForm.controls.enter_reason_for_refer_to_credit.setValue(data.records.enter_reason_for_refer_to_credit);
|
||||
this._finalRemarkForm.controls.reason_for_positive.setValue(data.records.reason_for_positive);
|
||||
this._finalRemarkForm.controls.reason_for_negative.setValue(data.records.reason_for_negative);
|
||||
this._finalRemarkForm.controls.reason_for_refer_to_credit.setValue(data.records.reason_for_refer_to_credit);
|
||||
this._finalRemarkForm.controls.is_service_provided.setValue(data.records.is_service_provided);
|
||||
this._finalRemarkForm.controls.final_form_remarks.setValue(data.records.final_form_remarks);
|
||||
|
||||
@ -215,61 +217,65 @@ export class FinalRemarksComponent implements OnInit {
|
||||
|
||||
if(e==1){
|
||||
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValidators([Validators.required]);
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValidators([Validators.required]);
|
||||
|
||||
this._finalRemarkForm.controls['enter_reason_for_negative'].clearValidators();
|
||||
this._finalRemarkForm.controls['enter_reason_for_negative'].updateValueAndValidity();
|
||||
this._finalRemarkForm.controls['enter_reason_for_negative'].setValue('');
|
||||
this._finalRemarkForm.controls['reason_for_refer_to_credit'].clearValidators();
|
||||
this._finalRemarkForm.controls['reason_for_refer_to_credit'].setValue('');
|
||||
|
||||
this._finalRemarkForm.controls['reason_for_positive'].clearValidators();
|
||||
this._finalRemarkForm.controls['reason_for_positive'].setValue('');
|
||||
|
||||
this._finalRemarkForm.controls['reason_for_negative'].clearValidators();
|
||||
this._finalRemarkForm.controls['reason_for_negative'].setValue('');
|
||||
|
||||
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].clearValidators();
|
||||
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].updateValueAndValidity();
|
||||
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].setValue('');
|
||||
}
|
||||
if(e==2){
|
||||
|
||||
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].clearValidators();
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValue('');
|
||||
|
||||
this._finalRemarkForm.controls['enter_reason_for_negative'].clearValidators();
|
||||
this._finalRemarkForm.controls['enter_reason_for_negative'].updateValueAndValidity();
|
||||
this._finalRemarkForm.controls['enter_reason_for_negative'].setValue('');
|
||||
|
||||
this._finalRemarkForm.controls['reason_for_refer_to_credit'].clearValidators();
|
||||
this._finalRemarkForm.controls['reason_for_refer_to_credit'].setValue('');
|
||||
|
||||
this._finalRemarkForm.controls['reason_for_positive'].setValidators([Validators.required]);
|
||||
|
||||
this._finalRemarkForm.controls['reason_for_negative'].clearValidators();
|
||||
this._finalRemarkForm.controls['reason_for_negative'].setValue('');
|
||||
|
||||
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].clearValidators();
|
||||
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].updateValueAndValidity();
|
||||
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].setValue('');
|
||||
|
||||
}
|
||||
if(e==3){
|
||||
|
||||
this._finalRemarkForm.controls['enter_reason_for_negative'].setValidators([Validators.required]);
|
||||
this._finalRemarkForm.controls['enter_reason_for_negative'].updateValueAndValidity();
|
||||
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValue('');
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].clearValidators();
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
|
||||
|
||||
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].setValue('');
|
||||
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].clearValidators();
|
||||
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].updateValueAndValidity();
|
||||
this._finalRemarkForm.controls['reason_for_refer_to_credit'].setValue('');
|
||||
this._finalRemarkForm.controls['reason_for_refer_to_credit'].clearValidators();
|
||||
|
||||
this._finalRemarkForm.controls['reason_for_positive'].clearValidators();
|
||||
this._finalRemarkForm.controls['reason_for_positive'].setValue('');
|
||||
|
||||
this._finalRemarkForm.controls['reason_for_negative'].setValidators([Validators.required]);
|
||||
|
||||
}
|
||||
if(e==4){
|
||||
|
||||
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].setValidators([Validators.required]);
|
||||
this._finalRemarkForm.controls['enter_reason_for_refer_to_credit'].updateValueAndValidity();
|
||||
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].setValue('');
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].clearValidators();
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
|
||||
|
||||
this._finalRemarkForm.controls['enter_reason_for_negative'].setValue('');
|
||||
this._finalRemarkForm.controls['enter_reason_for_negative'].clearValidators();
|
||||
this._finalRemarkForm.controls['enter_reason_for_negative'].updateValueAndValidity();
|
||||
this._finalRemarkForm.controls['reason_for_refer_to_credit'].setValidators([Validators.required]);
|
||||
|
||||
this._finalRemarkForm.controls['reason_for_positive'].clearValidators();
|
||||
this._finalRemarkForm.controls['reason_for_positive'].setValue('');
|
||||
|
||||
this._finalRemarkForm.controls['reason_for_negative'].setValue('');
|
||||
this._finalRemarkForm.controls['reason_for_negative'].clearValidators();
|
||||
|
||||
}
|
||||
this._finalRemarkForm.controls['others_pd_officers_recommendation'].updateValueAndValidity();
|
||||
this._finalRemarkForm.controls['reason_for_refer_to_credit'].updateValueAndValidity();
|
||||
this._finalRemarkForm.controls['reason_for_positive'].updateValueAndValidity();
|
||||
this._finalRemarkForm.controls['reason_for_negative'].updateValueAndValidity();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
<span *ngIf="i != 0">
|
||||
<mat-form-field style="width:60%">
|
||||
<input matInput autocomplete="off" placeholder="Sale Variation from Previous Year in %"
|
||||
formControlName="financial_annualsales_variation"
|
||||
formControlName="financial_annualsales_variation" [ngClass]="details.get('financial_annualsales_variation').value > 0 ? 'greenhighlight' : 'highlight'"
|
||||
(keypress)="keyPress($event)" readonly>
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('financial_annualsales_variation').value != '' ">
|
||||
<span *ngIf="details.get('financial_annualsales_variation').value == 0">
|
||||
@ -137,12 +137,11 @@
|
||||
</div>
|
||||
<span *ngIf="i != 0">
|
||||
<mat-form-field style="width:45%">
|
||||
<input matInput autocomplete="off" [ngClass]="{'highlight': (details.controls['financial_variation'].value > 40) || (details.controls['financial_variation'].value < -40)}"
|
||||
<input matInput autocomplete="off" [ngClass]="details.controls['financial_variation'].value > 0 ? 'greenhighlight' : 'highlight'"
|
||||
placeholder="Profit Variation from Previous Year in %"
|
||||
formControlName="financial_variation" (keypress)="keyPress($event)"
|
||||
readonly>
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="i != 0 && details.get('financial_variation').value != '' "
|
||||
[ngClass]="{'highlight': (details.controls['financial_variation'].value > 40) || (details.controls['financial_variation'].value < -40)}">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="i != 0 && details.get('financial_variation').value != '' ">
|
||||
<span *ngIf="details.get('financial_variation').value == 0">
|
||||
No difference in Profit in FY <i>
|
||||
{{details.get('financial_year').value}} </i> over
|
||||
@ -170,13 +169,13 @@
|
||||
</span>
|
||||
</mat-hint>
|
||||
<!-- “Increase in Sales in FY 2017-2018 over sales in FY 2016-2017 is 11.11%” -->
|
||||
<!-- [ngClass]="{'highlight': (details.controls['financial_profit_to_sale_variation'].value > 40) || (details.controls['financial_profit_to_sale_variation'].value < -40)}" -->
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%">
|
||||
<input matInput autocomplete="off" [ngClass]="{'highlight': (details.controls['financial_profit_to_sale_variation'].value > 40) || (details.controls['financial_profit_to_sale_variation'].value < -40)}"
|
||||
<input matInput autocomplete="off" [ngClass]="details.get('financial_profit_to_sale_variation').value > 0 ? 'greenhighlight' : 'highlight'"
|
||||
placeholder="Variation of Profit % over sales" formControlName="financial_profit_to_sale_variation"
|
||||
(keypress)="keyPress($event)" readonly>
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="i != 0 && details.get('financial_profit_to_sale_variation').value != '' "
|
||||
[ngClass]="{'highlight': (details.controls['financial_profit_to_sale_variation'].value > 40) || (details.controls['financial_profit_to_sale_variation'].value < -40)}">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="i != 0 && details.get('financial_profit_to_sale_variation').value != '' ">
|
||||
<span *ngIf="details.get('financial_profit_to_sale_variation').value == 0">
|
||||
No difference in Profit sales % in FY <i>
|
||||
{{details.get('financial_year').value}} </i> over
|
||||
|
||||
@ -164,12 +164,12 @@
|
||||
<!-- companies end -->
|
||||
|
||||
<!-- Person Relationship Starts Here -->
|
||||
<mat-card>
|
||||
<mat-card *ngIf="_generalForm.controls.persons_with_relationships['controls'].length>1">
|
||||
<mat-card-header>
|
||||
<mat-card-title> Relationship Between Individuals </mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<mat-table [dataSource]="relationSource" *ngIf="_generalForm.controls.persons_with_relationships['controls'].length>0"
|
||||
<mat-table [dataSource]="relationSource"
|
||||
formArrayName="persons_with_relationships">
|
||||
<ng-container matColumnDef="applicant_name">
|
||||
<mat-header-cell *matHeaderCellDef> Name </mat-header-cell>
|
||||
@ -377,7 +377,7 @@
|
||||
</div>
|
||||
<div fxFlex="40" align="end">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Save"
|
||||
matTooltipPosition="above" (click)="submitGeneralForm(_generalForm.value)">
|
||||
matTooltipPosition="above" [disabled]="disableAfterSubmit===true" (click)="submitGeneralForm(_generalForm.value)">
|
||||
<mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@ -34,6 +34,8 @@ export class GeneralInfoComponent implements OnInit {
|
||||
count: number = 1;
|
||||
errorMessage: any;
|
||||
maxDate: any;
|
||||
|
||||
disableAfterSubmit : boolean;
|
||||
|
||||
public pd_applicants_details: any;
|
||||
public _generalForm: FormGroup;
|
||||
@ -70,6 +72,7 @@ export class GeneralInfoComponent implements OnInit {
|
||||
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
|
||||
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
|
||||
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
|
||||
this.disableAfterSubmit = false;
|
||||
}
|
||||
/********************** Constructor Section Ends Here ****************/
|
||||
|
||||
@ -587,7 +590,7 @@ export class GeneralInfoComponent implements OnInit {
|
||||
// submit form details
|
||||
submitGeneralForm(formData: any) {
|
||||
if (this._generalForm.invalid) {
|
||||
|
||||
this.disableAfterSubmit = false;
|
||||
this.validateAllFormFields(this._generalForm);
|
||||
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
|
||||
return;
|
||||
@ -597,6 +600,7 @@ export class GeneralInfoComponent implements OnInit {
|
||||
// this.notifier.notify('warning', 'Please Choose Name of Person Met.!');
|
||||
// }
|
||||
else {
|
||||
this.disableAfterSubmit = true;
|
||||
let saveRecords: any = {}
|
||||
saveRecords.pdid = formData.pdid;
|
||||
saveRecords.formid = formData.formid;
|
||||
@ -613,8 +617,8 @@ export class GeneralInfoComponent implements OnInit {
|
||||
this.notifier.notify('success', 'Saved Successfully.');
|
||||
setTimeout(() => {
|
||||
this.dialogRef.close();
|
||||
this.disableAfterSubmit = false;
|
||||
}, 3000);
|
||||
|
||||
}
|
||||
else {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
|
||||
@ -65,9 +65,9 @@ export class SupplierInfoComponent implements OnInit {
|
||||
this.notifier = notifier;
|
||||
this.pageTitle = this.pd_all_details.company_name + ' - ' +this.pageTitle ;
|
||||
this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant;
|
||||
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
|
||||
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
|
||||
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
|
||||
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
|
||||
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
|
||||
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
|
||||
|
||||
}
|
||||
public viewerOptions: any = {
|
||||
@ -183,53 +183,33 @@ export class SupplierInfoComponent implements OnInit {
|
||||
// let api_main_raw_materials = Object.keys(dataForm.main_raw_materials).map(function (key) {
|
||||
// return dataForm.main_raw_materials[key];
|
||||
// });
|
||||
// let api_main_raw_materials = dataForm.manufacturing_details[0].main_raw_materials;
|
||||
|
||||
// this.initManufacturingProductsDetails(api_main_raw_materials);
|
||||
// this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(dataForm.manufacturing_details[0].main_raw_materials_total_payments_percent_on_credit || null);
|
||||
if(dataForm.manufacturing_details[0] !== null){
|
||||
// alert('not null manu');
|
||||
let api_main_raw_materials = Object.keys(dataForm.manufacturing_details).map(function (key) {
|
||||
return dataForm.manufacturing_details[key];
|
||||
});
|
||||
|
||||
this.initManufacturingProductsDetails(api_main_raw_materials[0]['main_raw_materials']);
|
||||
this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(api_main_raw_materials[0]['main_raw_materials_total_payments_percent_on_credit'] || null);
|
||||
|
||||
let api_main_raw_materials = dataForm.manufacturing_details[0].main_raw_materials;
|
||||
|
||||
this.initManufacturingProductsDetails(api_main_raw_materials);
|
||||
this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(dataForm.manufacturing_details[0].main_raw_materials_total_payments_percent_on_credit || null);
|
||||
}
|
||||
else{
|
||||
// alert('null manu');
|
||||
this.initManufacturingProductsDetails(null);
|
||||
this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(null);
|
||||
|
||||
this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(null);
|
||||
}
|
||||
}
|
||||
|
||||
let arr1 = record.filter(data => data.type_of_activity_id == 3 || data.type_of_activity_id ==4);
|
||||
|
||||
if(arr1.length > 0) {
|
||||
console.log('saas');
|
||||
if(dataForm.trade_details[0] !== null){
|
||||
// let api_trading_products = Object.keys(dataForm.trading_products).map(function (key) {
|
||||
// return dataForm.trading_products[key];
|
||||
// });
|
||||
// let api_trading_products = dataForm.trade_details[0].trading_products;
|
||||
// this.initTradingProductsDetails(api_trading_products);
|
||||
// this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(dataForm.trade_details[0].trading_products_total_payments_percent_on_credit || null);
|
||||
if(dataForm.trade_details[0] !== null){
|
||||
alert('not null trade');
|
||||
let api_trading_products = Object.keys(dataForm.trade_details).map(function (key) {
|
||||
return dataForm.trade_details[key];
|
||||
});
|
||||
console.log(api_trading_products[0]['trading_products']);
|
||||
this.initTradingProductsDetails(api_trading_products[0]['trading_products']);
|
||||
// this.initTradingProductsDetails(api_trading_products['trading_products']);
|
||||
this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(api_trading_products[0]['trading_products_total_payments_percent_on_credit'] || null);
|
||||
}
|
||||
else{
|
||||
alert('null trade');
|
||||
let api_trading_products = dataForm.trade_details[0].trading_products;
|
||||
this.initTradingProductsDetails(api_trading_products);
|
||||
this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(dataForm.trade_details[0].trading_products_total_payments_percent_on_credit || null);
|
||||
}
|
||||
else{
|
||||
this.initTradingProductsDetails(null);
|
||||
this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(null);
|
||||
|
||||
}
|
||||
}
|
||||
this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(null);
|
||||
}
|
||||
}
|
||||
this.noRecordsFound = true;
|
||||
} else {
|
||||
@ -247,7 +227,7 @@ export class SupplierInfoComponent implements OnInit {
|
||||
this.initManufacturingProductsDetails(null);
|
||||
this._supplierQuesFrom.controls['manufacturing_details']['controls'][0].controls['main_raw_materials_total_payments_percent_on_credit'].setValue(null);
|
||||
}
|
||||
let arr1 = record.filter(data => data.type_of_activity_id == 3 || data.type_of_activity_id == 4);
|
||||
let arr1 = record.filter(data => data.type_of_activity_id == 3 || 4);
|
||||
if(arr1.length > 0) {
|
||||
this.initTradingProductsDetails(null);
|
||||
this._supplierQuesFrom.controls['trade_details']['controls'][0].controls['trading_products_total_payments_percent_on_credit'].setValue(dataForm.trading_products_total_payments_percent_on_credit || null);
|
||||
|
||||
@ -112,7 +112,8 @@
|
||||
<span><i class="fa-1x fa fa-map-marker" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i></span>
|
||||
</div>
|
||||
<div fxFlex="90">
|
||||
<span *ngIf="addresses.state_name" class="hover-icon"> {{addresses.addressline}},<br> {{addresses.city_name}},<br>{{addresses.state_name}}-{{addresses.pincode == 1 ? addresses.other_pincode : addresses.pincode_display }} </span>
|
||||
<!-- <span *ngIf="addresses.state_name" class="hover-icon"> {{addresses.addressline}},<br> {{addresses.city_name}},<br>{{addresses.state_name}}-{{addresses.pincode == 1 ? addresses.other_pincode : addresses.pincode_display }} </span> -->
|
||||
<span *ngIf="addresses.state_name" class="hover-icon"> {{addresses.addressline1}},<br> {{addresses.city_name}},<br>{{addresses.state_name}}-{{addresses.pincode_id == 1 ? addresses.other_pincode : addresses.pincode }} </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -182,11 +182,11 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
// })
|
||||
// }
|
||||
|
||||
Maponclick(master: any) {
|
||||
let url = "https://www.google.com/maps/place/"
|
||||
let concat_url = url + master.addressline1 + '/' + master.city_name + ',' + master.pincode + ',' + master.state_name;
|
||||
window.open(concat_url, '_blank');
|
||||
}
|
||||
// Maponclick(master: any) {
|
||||
// let url = "https://www.google.com/maps/place/"
|
||||
// let concat_url = url + master.addressline1 + '/' + master.city_name + ',' + master.pincode + ',' + master.state_name;
|
||||
// window.open(concat_url, '_blank');
|
||||
// }
|
||||
|
||||
editPdMaster(masterData: any, flag) {
|
||||
let record = {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user