Fairoj: Clix Changes, Status change in QC report and pd Report issues
This commit is contained in:
parent
36c3b73c76
commit
555f5b0cb1
@ -281,13 +281,14 @@
|
||||
</div>
|
||||
|
||||
<div fxFlex="100" fxLayout="nowrap">
|
||||
<mat-form-field style="width: 46%;">
|
||||
<mat-form-field style="width: 46%;" *ngIf="addressForm.controls['estimated_area']">
|
||||
<input matInput
|
||||
[placeholder]=" placeholderName != '' ? placeholderName : 'Estimated area of the (Address Type)'"
|
||||
formControlName="estimated_area" OnlyNumber type="text">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 46%;">
|
||||
|
||||
<mat-form-field style="width: 46%" *ngIf="addressForm.controls['uom']">
|
||||
<mat-select placeholder="Unit of Measurement" formControlName="uom"
|
||||
(selectionChange)="setOthers($event.value,'',5)">
|
||||
<mat-option>Select</mat-option>
|
||||
@ -296,14 +297,17 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 24%;"
|
||||
*ngIf="addressForm.controls['uom'].value == 1 ">
|
||||
<span *ngIf="addressForm.controls['uom']">
|
||||
<mat-form-field style="width: 24%"
|
||||
*ngIf="addressForm.controls['uom'].value == 1">
|
||||
<input matInput placeholder="Specify UOM" formControlName="uom_others"
|
||||
autocomplete="off" required>
|
||||
<mat-error
|
||||
*ngIf="addressForm.controls['uom_others'].hasError('required')">
|
||||
UOM Required</mat-error>
|
||||
</mat-form-field>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -61,6 +61,7 @@ export class AddressComponent implements OnInit {
|
||||
/**Declaration of FormField Variables */
|
||||
private notifier: NotifierService;
|
||||
public addressForm: FormGroup;
|
||||
lender_short_name: any;
|
||||
|
||||
/**Constructor of the class */
|
||||
constructor(private el: ElementRef, notifier: NotifierService,
|
||||
@ -80,6 +81,7 @@ export class AddressComponent implements OnInit {
|
||||
this.form_id = 5;
|
||||
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.lender_short_name=this.pd_all_details.pdmaster_details.lender_short_name
|
||||
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
|
||||
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
|
||||
|
||||
@ -168,8 +170,9 @@ export class AddressComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.addressForm.controls.estimated_area.setValue(datas.estimated_area ? datas.estimated_area : '');
|
||||
if(this.lender_short_name != 'CLIX') {
|
||||
this.addressForm.controls.estimated_area.setValue(datas.estimated_area ? datas.estimated_area : '')
|
||||
|
||||
this.addressForm.controls.uom.setValue(datas.uom);
|
||||
if (datas.uom) {
|
||||
this.setOthers(datas.uom, '', 5);
|
||||
@ -177,6 +180,7 @@ export class AddressComponent implements OnInit {
|
||||
this.addressForm.controls.uom_others.setValue(datas.uom_others);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
let initiated_address_check =data.records.hasOwnProperty('is_pd_done_on_initiated_address') ? data.records.is_pd_done_on_initiated_address : true ;
|
||||
@ -209,6 +213,10 @@ export class AddressComponent implements OnInit {
|
||||
// was_the_company_name_board_sighted:['', Validators.compose([Validators.required])],
|
||||
address_form_remark: ['']
|
||||
});
|
||||
if(this.lender_short_name == 'CLIX'){
|
||||
this.addressForm.removeControl('estimated_area');
|
||||
this.addressForm.removeControl('uom');
|
||||
}
|
||||
}
|
||||
|
||||
pdf(fileURL) {
|
||||
@ -499,14 +507,17 @@ export class AddressComponent implements OnInit {
|
||||
records.addresses[0].locality_mixuse = this.addressForm.controls.locality_mixuse.value;
|
||||
records.addresses[0].pd_location = this.addressForm.controls.pd_location.value;
|
||||
records.addresses[0].comment_locality = this.addressForm.controls.comment_locality.value;
|
||||
records.addresses[0].estimated_area = this.addressForm.controls.estimated_area.value;
|
||||
if(this.lender_short_name != 'CLIX') {
|
||||
records.addresses[0].estimated_area = this.addressForm.controls.estimated_area.value
|
||||
records.addresses[0].uom = this.addressForm.controls.uom.value;
|
||||
records.addresses[0].citySearch = '';
|
||||
records.addresses[0].pinSearch = '';
|
||||
records.addresses[0].stateSearch = '';
|
||||
if (this.addressForm.controls.uom.value == 1) {
|
||||
records.addresses[0].uom_others = this.addressForm.controls.uom_others.value;
|
||||
}
|
||||
}
|
||||
records.addresses[0].citySearch = '';
|
||||
records.addresses[0].pinSearch = '';
|
||||
records.addresses[0].stateSearch = '';
|
||||
|
||||
}
|
||||
else if (this.addressForm.controls.is_pd_done_on_initiated_address.value == false) {
|
||||
records.alternative_addresses = this.addressForm.controls.alternative_addresses.value;
|
||||
@ -521,14 +532,17 @@ export class AddressComponent implements OnInit {
|
||||
records.alternative_addresses[0].locality_mixuse = this.addressForm.controls.locality_mixuse.value;
|
||||
records.alternative_addresses[0].pd_location = this.addressForm.controls.pd_location.value;
|
||||
records.alternative_addresses[0].comment_locality = this.addressForm.controls.comment_locality.value;
|
||||
records.alternative_addresses[0].estimated_area = this.addressForm.controls.estimated_area.value;
|
||||
if(this.lender_short_name != 'CLIX') {
|
||||
records.alternative_addresses[0].estimated_area = this.addressForm.controls.estimated_area.value
|
||||
records.alternative_addresses[0].uom = this.addressForm.controls.uom.value;
|
||||
records.alternative_addresses[0].citySearch = '';
|
||||
records.alternative_addresses[0].pinSearch = '';
|
||||
records.alternative_addresses[0].stateSearch = '';
|
||||
if (this.addressForm.controls.uom.value == 1) {
|
||||
records.alternative_addresses[0].uom_others = this.addressForm.controls.uom_others.value;
|
||||
}
|
||||
}
|
||||
records.alternative_addresses[0].citySearch = '';
|
||||
records.alternative_addresses[0].pinSearch = '';
|
||||
records.alternative_addresses[0].stateSearch = '';
|
||||
|
||||
}
|
||||
// records.was_the_company_name_board_sighted = this.addressForm.controls.was_the_company_name_board_sighted.value;
|
||||
records.address_form_remark = this.addressForm.controls.address_form_remark.value;
|
||||
@ -696,14 +710,17 @@ export class AddressComponent implements OnInit {
|
||||
this.addressForm.controls.locality_others.setValue(datas.locality_others);
|
||||
}
|
||||
|
||||
this.addressForm.controls.estimated_area.setValue(datas.estimated_area ? datas.estimated_area : '');
|
||||
this.addressForm.controls.uom.setValue(datas.uom);
|
||||
|
||||
if(this.lender_short_name != 'CLIX'){
|
||||
this.addressForm.controls.estimated_area.setValue(datas.estimated_area ? datas.estimated_area : '')
|
||||
this.addressForm.controls.uom.setValue(datas.uom)
|
||||
this.setOthers(datas.uom, '', 5);
|
||||
if (datas.uom == 1) {
|
||||
this.addressForm.controls.uom_others.setValue(datas.uom_others);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -764,13 +781,14 @@ export class AddressComponent implements OnInit {
|
||||
this.addressForm.controls.locality_others.setValue(datas.locality_others);
|
||||
}
|
||||
|
||||
if(this.lender_short_name != 'CLIX'){
|
||||
this.addressForm.controls.estimated_area.setValue(datas.estimated_area);
|
||||
this.addressForm.controls.uom.setValue(datas.uom);
|
||||
this.setOthers(datas.uom, '', 5);
|
||||
if (datas.uom == 1) {
|
||||
this.addressForm.controls.uom_others.setValue(datas.uom_others);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -74,12 +74,13 @@
|
||||
<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 != ''">
|
||||
<mat-form-field style="width:45%" *ngIf="detail.get('property_type').value != '' && lender_short_name != 'CLIX'">
|
||||
<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">
|
||||
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="lender_short_name != 'CLIX'">
|
||||
<mat-form-field style="width:45%">
|
||||
<input matInput placeholder="Area Covered" formControlName="area_covered_by_this_property" OnlyNumber type="text"
|
||||
autocomplete="off">
|
||||
@ -357,7 +358,7 @@
|
||||
</mat-form-field> -->
|
||||
</div>
|
||||
|
||||
<span *ngIf="sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 3 || sup.get('assets_mode').value == 1">
|
||||
<span *ngIf="lender_short_name !== 'CLIX' && sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 3 || sup.get('assets_mode').value == 1 ">
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
|
||||
@ -377,7 +378,7 @@
|
||||
</mat-form-field>
|
||||
</span>
|
||||
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="lender_short_name != 'CLIX'">
|
||||
|
||||
<mat-form-field *ngIf="sup.get('assets_mode').value != ''" style="width:95%">
|
||||
<mat-select placeholder="Is There a Loan Existing Against This Asset?"
|
||||
|
||||
@ -70,6 +70,7 @@ export class AssetsInfoComponent implements OnInit {
|
||||
mergeCompanyApplicant: any = [];
|
||||
currentYear: any = new Date().getFullYear();
|
||||
documentsAndFilesList: any = [];
|
||||
lender_short_name: any;
|
||||
constructor(
|
||||
notifier: NotifierService,
|
||||
private _formBuilder: FormBuilder,
|
||||
@ -78,6 +79,7 @@ export class AssetsInfoComponent implements OnInit {
|
||||
private dialogRef: MatDialogRef<AssetsInfoComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
|
||||
this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id;
|
||||
this.lender_short_name=this.pd_all_details.pdmaster_details.lender_short_name
|
||||
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
|
||||
this.applicants = this.pd_all_details.pdapplicants_detials;
|
||||
this.applicants = this.applicants.filter(val => val.applicant_type == 0 || val.applicant_type == 1)
|
||||
|
||||
@ -156,7 +156,7 @@
|
||||
Owned by Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-form-field style="width:45%" *ngIf="lender_short_name != 'CLIX'">
|
||||
<mat-label>Age of Asset in Years</mat-label>
|
||||
<input matInput autocomplete="off" placeholder="eg.99" formControlName="business_vintage"
|
||||
minlength="1" maxlength="2" OnlyNumber type="text"
|
||||
@ -174,7 +174,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<span>
|
||||
<span *ngIf="lender_short_name != 'CLIX'">
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width:95%"
|
||||
*ngIf="(itemrow.get('business_ownership_type').value == 'owned')">
|
||||
@ -408,7 +408,7 @@
|
||||
Owned by is Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-form-field style="width:45%" *ngIf="lender_short_name != 'CLIX'">
|
||||
<mat-label>Age of Asset in Years</mat-label>
|
||||
<input matInput autocomplete="off" placeholder="eg.99"
|
||||
formControlName="business_vintage" minlength="1" maxlength="2" OnlyNumber
|
||||
@ -426,7 +426,7 @@
|
||||
</div>
|
||||
|
||||
<span
|
||||
*ngIf="(sup.get('business_assets_mode').value != '') && sup.get('business_ownership_type').value == 'owned'">
|
||||
*ngIf="(sup.get('business_assets_mode').value != '') && sup.get('business_ownership_type').value == 'owned' && lender_short_name != 'CLIX'">
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width:95%">
|
||||
<mat-select placeholder="Is There a Loan Existing Against This Asset?"
|
||||
|
||||
@ -65,6 +65,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
mergeCompanyApplicant: any = [];
|
||||
endUserList = [];
|
||||
address_type: any;
|
||||
lender_short_name: any;
|
||||
/**Constructor of the class */
|
||||
constructor(
|
||||
notifier: NotifierService,
|
||||
@ -75,6 +76,8 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
|
||||
this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id
|
||||
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
|
||||
this.lender_short_name=this.pd_all_details.pdmaster_details.lender_short_name
|
||||
|
||||
this.applicants = this.pd_all_details.pdapplicants_detials;
|
||||
this.applicants = this.applicants.filter(appt => appt.applicant_type != 2)
|
||||
this.applicants.push({ 'pd_co_applicant_id': '0', 'applicant_name': 'Others' });
|
||||
@ -95,6 +98,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
|
||||
console.clear();
|
||||
console.log("len",this.lender_short_name)
|
||||
|
||||
// this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid,'').subscribe(data => {
|
||||
// this.businessProfessionName = (data.status == 200) ? data.records.profession_name : '' ;
|
||||
|
||||
@ -124,7 +124,7 @@
|
||||
</mat-card-actions>
|
||||
|
||||
</mat-card>
|
||||
<mat-card>
|
||||
<mat-card *ngIf="businessForm.controls['persons_with_relationships']">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Add Other Family Members Involved In Business</mat-card-title>
|
||||
|
||||
@ -1557,9 +1557,9 @@
|
||||
type="number" formControlName="employees_permanent" required>
|
||||
<mat-error *ngIf="businessForm.controls['employees_permanent'].hasError('required')">Permanent Required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-form-field *ngIf="lender_short_name != 'CLIX'">
|
||||
<input matInput placeholder="Temporary" (change)="checkTotalEmployee(businessForm)"
|
||||
type="number" formControlName="employees_temporary" required>
|
||||
type="number" formControlName="employees_temporary" >
|
||||
<mat-error *ngIf="businessForm.controls['employees_temporary'].hasError('required')">Temporary Required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
|
||||
@ -172,7 +172,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
//const Desgn = <FormArray>this.businessForm.controls['designation'];
|
||||
const Partnr: any = <FormArray>this.businessForm.controls['partners'];
|
||||
const otherDoc = <FormArray>this.businessForm.controls['documents'];
|
||||
const personRel = <FormArray>this.businessForm.controls['persons_with_relationships'];
|
||||
const personRel = <FormArray>this.businessForm.controls['persons_with_relationships']
|
||||
const businessActivityControl = <FormArray>this.businessForm.controls['select_business_activity_type'];
|
||||
const manufacturingControl: any = <FormArray>this.businessForm.controls['manufacturing_activity_details'];
|
||||
const retailControl: any = <FormArray>this.businessForm.controls['retail_trading_activity_details'];
|
||||
@ -244,6 +244,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
//businessVal.designation = DesgnArray;
|
||||
businessVal.partners = PartnrArray;
|
||||
businessVal.documents = DocArray;
|
||||
if(this.lender_short_name != 'CLIX'){
|
||||
if (data.records.persons_with_relationships) {
|
||||
let selectedFamilyMember = Object.keys(data.records.persons_with_relationships).map(function (key) {
|
||||
return data.records.persons_with_relationships[key];
|
||||
@ -263,6 +264,11 @@ export class BusinessInfoComponent implements OnInit {
|
||||
businessVal.persons_with_relationships = [];
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
businessVal.persons_with_relationships = [];
|
||||
|
||||
}
|
||||
|
||||
// find exist and non-exist businees activity type list
|
||||
let activityData = this.activityData.map(item => ({ name: item.name, type_of_activity_id: item.type_of_activity_id }))
|
||||
@ -373,10 +379,12 @@ export class BusinessInfoComponent implements OnInit {
|
||||
});
|
||||
if (selectedRetail.length > 0) {
|
||||
selectedRetail.length > 0 ? this.businessForm.addControl('export_import_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('export_import_cert');
|
||||
if(this.lender_short_name != 'CLIX'){
|
||||
selectedRetail.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets');
|
||||
selectedRetail.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines');
|
||||
selectedRetail.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('no_of_pos_machines', new FormControl('')) : this.businessForm.removeControl('no_of_pos_machines');
|
||||
selectedRetail.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('pos_machines_details', this.fb.array([])) : this.businessForm.removeControl('pos_machines_details');
|
||||
}
|
||||
|
||||
selectedRetail.forEach((element, index) => {
|
||||
this.CheckExport(element.area_of_sale, 'RActivity', index);
|
||||
@ -438,10 +446,12 @@ export class BusinessInfoComponent implements OnInit {
|
||||
});
|
||||
if (selectedWholesale.length > 0) {
|
||||
selectedWholesale.length > 0 ? this.businessForm.addControl('export_import_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('export_import_cert');
|
||||
if(this.lender_short_name != 'CLIX'){
|
||||
selectedWholesale.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets');
|
||||
selectedWholesale.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines');
|
||||
selectedWholesale.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('no_of_pos_machines', new FormControl('')) : this.businessForm.removeControl('no_of_pos_machines');
|
||||
selectedWholesale.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('pos_machines_details', this.fb.array([])) : this.businessForm.removeControl('pos_machines_details');
|
||||
}
|
||||
|
||||
selectedWholesale.forEach((element, index) => {
|
||||
this.CheckExport(element.area_of_sale, 'WActivity', index);
|
||||
@ -505,10 +515,12 @@ export class BusinessInfoComponent implements OnInit {
|
||||
});
|
||||
if (selectedService.length > 0) {
|
||||
selectedService.length > 0 ? this.businessForm.addControl('practice_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('practice_cert');
|
||||
if(this.lender_short_name != 'CLIX'){
|
||||
selectedService.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets');
|
||||
selectedService.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines');
|
||||
selectedService.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('no_of_pos_machines', new FormControl('')) : this.businessForm.removeControl('no_of_pos_machines');
|
||||
selectedService.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('pos_machines_details', this.fb.array([])) : this.businessForm.removeControl('pos_machines_details');
|
||||
}
|
||||
|
||||
selectedService.forEach((element, index) => {
|
||||
this.CheckExport(element.area_of_sale, 'SPActivity', index);
|
||||
@ -629,11 +641,13 @@ export class BusinessInfoComponent implements OnInit {
|
||||
|
||||
this.product_abbr == 'LAEP' ? this.businessForm.addControl('fire_noc', new FormControl('', Validators.required)) : this.businessForm.removeControl('fire_noc');
|
||||
|
||||
if(this.lender_short_name != 'CLIX'){
|
||||
// change relation with businees update dat sorce table
|
||||
this.businessForm.controls['persons_with_relationships'].valueChanges.subscribe(val => {
|
||||
let relationControl = <FormArray>this.businessForm.controls['persons_with_relationships'];
|
||||
this.relationSource.data = relationControl.controls;
|
||||
});
|
||||
}
|
||||
|
||||
// change business sessional
|
||||
this.businessForm.controls['seasonality'].valueChanges.subscribe(val => {
|
||||
@ -659,7 +673,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
partners: this.fb.array([]),
|
||||
employees_total: [''],
|
||||
employees_permanent: ['', Validators.compose([Validators.required])],
|
||||
employees_temporary: ['', Validators.compose([Validators.required])],
|
||||
employees_temporary: [''],
|
||||
employees_appx_salary: ['', Validators.compose([Validators.required])],
|
||||
officer_total: ['' || null, Validators.compose([Validators.required])],
|
||||
was_the_company_name_board_sighted: ['', Validators.compose([Validators.required])],
|
||||
@ -689,6 +703,9 @@ export class BusinessInfoComponent implements OnInit {
|
||||
service_provider_activity_details: this.fb.array([]),
|
||||
// others_activity_details: this.fb.array([]),
|
||||
});
|
||||
if(this.lender_short_name == 'CLIX'){
|
||||
this.businessForm.removeControl('persons_with_relationships');
|
||||
}
|
||||
}
|
||||
|
||||
// businees activity type change event
|
||||
@ -766,6 +783,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
this.businessForm.value.service_provider_activity_details.length > 0 ? this.businessForm.addControl('practice_cert', new FormControl(this.businessForm.value.practice_cert, Validators.required)) : this.businessForm.removeControl('practice_cert');
|
||||
// check activity for extra question make dynamic
|
||||
|
||||
if(this.lender_short_name != 'CLIX'){
|
||||
this.businessForm.value.service_provider_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl(this.businessForm.value.applicant_use_mobile_wallets)) : this.businessForm.removeControl('applicant_use_mobile_wallets');
|
||||
this.businessForm.value.service_provider_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl(this.businessForm.value.applicant_use_pos_machines)) : this.businessForm.removeControl('applicant_use_pos_machines');
|
||||
if (this.businessForm.value.service_provider_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0) {
|
||||
@ -774,6 +792,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
}
|
||||
this.changePOSMachinesAvailablity(this.businessForm.value.applicant_use_pos_machines, 2);
|
||||
}
|
||||
}
|
||||
if (this.ManufacturingUnChecked || this.ManufacturingUnChecked == undefined && this.RetailedUnChecked || this.RetailedUnChecked == undefined && this.WholeSalesUnChecked || this.WholeSalesUnChecked == undefined && this.ServiceUnChecked || this.ServiceUnChecked == undefined) {
|
||||
this.ExportFlag = false;
|
||||
}
|
||||
@ -1491,6 +1510,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
}
|
||||
|
||||
if (!this.businessForm.valid) {
|
||||
console.log(this.businessForm.value);
|
||||
this.notifier.notify('warning', "Please Check All Manatory Fields..");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@
|
||||
<input matInput placeholder="Client Name" formControlName="manufacturing_client_name">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row nowrap">
|
||||
<div fxLayout="row nowrap" *ngIf="lender_short_name != 'CLIX'">
|
||||
<mat-form-field style="width: 15%">
|
||||
<mat-select placeholder="Title" formControlName="person_title_name">
|
||||
<mat-option>Select</mat-option>
|
||||
@ -103,7 +103,7 @@
|
||||
<mat-error>Enter Valid LandLine Number.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="lender_short_name != 'CLIX'">
|
||||
<mat-form-field style="width: 45%">
|
||||
<!-- <mat-select placeholder="Payment Type" formControlName="manufacturing_payment_type">
|
||||
<mat-option *ngFor="let pm of m_paymentModeType" [value]="pm.id">{{ pm.name }}</mat-option>
|
||||
@ -192,7 +192,7 @@
|
||||
<input matInput placeholder="Client Name" formControlName="trade_client_name">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="lender_short_name != 'CLIX'">
|
||||
<mat-form-field style="width: 15%">
|
||||
<mat-select placeholder="Title" formControlName="person_title_name">
|
||||
<mat-option>Select</mat-option>
|
||||
@ -238,7 +238,7 @@
|
||||
<mat-error>Enter Valid LandLine Number.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="lender_short_name != 'CLIX'">
|
||||
|
||||
<mat-form-field style="width: 45%">
|
||||
<!-- <mat-select placeholder="Payment Type" formControlName="trade_product_payment_type">
|
||||
@ -326,7 +326,7 @@
|
||||
<input matInput placeholder="Client Name" formControlName="service_provider_client_name">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="lender_short_name != 'CLIX'">
|
||||
<!--<mat-form-field style="width: 100%">
|
||||
<input matInput placeholder="Trade Product Name" formControlName="trade_product_name">
|
||||
</mat-form-field>-->
|
||||
@ -375,7 +375,7 @@
|
||||
<mat-error>Enter Valid LandLine Number.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="lender_short_name != 'CLIX'">
|
||||
<mat-form-field style="width: 45%">
|
||||
<!-- <mat-select placeholder="Payment Type" formControlName="service_provider_product_payment_type">
|
||||
<mat-option *ngFor="let pm of m_paymentModeType" [value]="pm.id">{{ pm.name }}</mat-option>
|
||||
|
||||
@ -78,6 +78,7 @@ export class ClientInfoComponent implements OnInit {
|
||||
name: 'service prd 2'
|
||||
}
|
||||
];
|
||||
lender_short_name: any;
|
||||
|
||||
constructor(
|
||||
notifier: NotifierService,
|
||||
@ -86,6 +87,7 @@ export class ClientInfoComponent implements OnInit {
|
||||
private dialog: MatDialog,
|
||||
@Inject(MAT_DIALOG_DATA) public pd_all_details: any, private dialogRef: MatDialogRef<ClientInfoComponent>) {
|
||||
this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id;
|
||||
this.lender_short_name=this.pd_all_details.pdmaster_details.lender_short_name;
|
||||
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
|
||||
this.form_id = 2;
|
||||
this.company_id = this.pd_all_details.company_id;
|
||||
|
||||
@ -122,7 +122,7 @@
|
||||
</mat-form-field>
|
||||
</div> -->
|
||||
|
||||
<div>
|
||||
<div *ngIf="lender_short_name !== 'CLIX'">
|
||||
<div formArrayName="family_members_details">
|
||||
<div *ngFor="let item of sup.controls.family_members_details['controls']; let i=index; let last=last "
|
||||
[formGroupName]="i">
|
||||
@ -261,6 +261,23 @@
|
||||
</mat-card-actions>
|
||||
</div>
|
||||
|
||||
<div *ngIf="lender_short_name === 'CLIX'">
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<mat-card-title>
|
||||
<h5>Family Details of {{FamilyMemberAsLabel[ix]}}</h5>
|
||||
</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput autocomplete="off" type="number" placeholder="No. of family members" formControlName="no_family_mem_clix">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput autocomplete="off" type="number" placeholder="No. of dependents " formControlName="no_dependents_clix">
|
||||
</mat-form-field>
|
||||
</mat-card>
|
||||
</div>
|
||||
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<span align="right">
|
||||
|
||||
@ -57,6 +57,7 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
earningStatus = [{ id: 1, type: 'Earning' },
|
||||
{ id: 2, type: 'Non Earning' }]
|
||||
documentsAndFilesList : any = [];
|
||||
lender_short_name: any;
|
||||
/** constructor Of the class */
|
||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
@ -69,6 +70,7 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
this.notifier = notifier;
|
||||
this.selectPerson = this.pd_all_details.pdapplicants_detials.filter(item => item.applicant_type != '2');
|
||||
this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id;
|
||||
this.lender_short_name=this.pd_all_details.pdmaster_details.lender_short_name;
|
||||
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
|
||||
this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant;
|
||||
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
|
||||
@ -298,6 +300,8 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
residence_ownership: ['', Validators.compose([])],
|
||||
ownershipOther: [''],
|
||||
rent: [''],
|
||||
no_family_mem_clix:[''],
|
||||
no_dependents_clix:[''],
|
||||
// total_number_of_family_members: ['', Validators.compose([Validators.min(1), Validators.max(20)])],
|
||||
family_members_details: this.fb.array([]),
|
||||
});
|
||||
@ -325,6 +329,8 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
residence_ownership: [val.residence_ownership, Validators.compose([])],
|
||||
ownershipOther: [val.ownershipOther || null],
|
||||
rent: [val.rent || null],
|
||||
no_family_mem_clix:[val.no_family_mem_clix || ''],
|
||||
no_dependents_clix:[val.no_dependents_clix || ''],
|
||||
// total_number_of_family_members: [val.total_number_of_family_members, Validators.compose([Validators.min(1), Validators.max(20)])],
|
||||
family_members_details: this.fb.array([]),
|
||||
});
|
||||
|
||||
@ -486,7 +486,7 @@
|
||||
</mat-card-content>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-left: 25px;" *ngIf="financialForm.value.is_financial_customer == 'no' && financialForm.controls['kuccha_records_shown'] && customer_segment_abbr == 'SE-DI'">
|
||||
<div style="margin-left: 25px;" *ngIf="financialForm.value.is_financial_customer == 'no' && financialForm.controls['kuccha_records_shown'] && customer_segment_abbr == 'SE-DI' && lender_short_name != 'CLIX'">
|
||||
<!-- <mat-form-field style="width: 100%"> -->
|
||||
<!-- <mat-select placeholder="Were the Kuccha records shown to the PD officer"-->
|
||||
<div style="width:auto">
|
||||
|
||||
@ -76,6 +76,7 @@
|
||||
</mat-form-field>
|
||||
</span>
|
||||
|
||||
<div *ngIf="lenderShortName != 'CLIX'">
|
||||
<mat-form-field style="width: 64%">
|
||||
<mat-select placeholder="Is there a balance transfer ? " (selectionChange)="selectedBalancesTransferChanges($event.value)"
|
||||
formControlName="is_transfer">
|
||||
@ -143,7 +144,7 @@
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['own_contribution'].value != ''">{{"₹"}} {{ loanDetailsForm.controls['own_contribution'].value | numberToWords }} Only</mat-hint>
|
||||
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
<mat-form-field style="width: 28%">
|
||||
<mat-select (selectionChange)="sourceChange($event.value)" placeholder="Source of Own Contribution"
|
||||
formControlName="source" multiple>
|
||||
@ -165,11 +166,13 @@
|
||||
</span>
|
||||
|
||||
|
||||
<mat-form-field style="width: 64%">
|
||||
<mat-form-field style="width: 64%" *ngIf="lenderShortName != 'CLIX'">
|
||||
<input matInput placeholder="EMI Amount Comfortable Paying" formControlName="emi_level"
|
||||
OnlyNumber type="text" autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['emi_level'].value != ''">{{"₹"}} {{ loanDetailsForm.controls['emi_level'].value | numberToWords }} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<!-- <div *ngIf="productAbbr === 'HL' || productAbbr === 'LL' || productAbbr === 'LAP' "> -->
|
||||
|
||||
@ -46,6 +46,7 @@
|
||||
<mat-error *ngIf="mrm.controls['stock_observed'].hasError('required')">Stock Required</mat-error>
|
||||
</mat-form-field>
|
||||
<span *ngIf="mrm.get('stock_observed').value == 'yes'">
|
||||
<div *ngIf="lender_short_name != 'CLIX'">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Quantity"
|
||||
formControlName="raw_quantity" OnlyNumber type="text">
|
||||
@ -63,6 +64,7 @@
|
||||
formControlName="other_uom">
|
||||
<mat-error *ngIf="mrm.controls['other_uom'].hasError('required')">UOM Required</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<mat-form-field style="width:90%">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed"
|
||||
formControlName="raw_value" OnlyNumber type="text">
|
||||
@ -139,6 +141,7 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<span *ngIf="mfg.get('goods_observed').value == 'yes'">
|
||||
<div *ngIf="lender_short_name != 'CLIX'">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Quantity"
|
||||
formControlName="goods_quantity" OnlyNumber
|
||||
@ -157,6 +160,7 @@
|
||||
formControlName="goods_other_uom">
|
||||
<mat-error *ngIf="mfg.controls['goods_other_uom'].hasError('required')">UOM Required</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<mat-form-field style="width:90%">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed"
|
||||
formControlName="goods_value" OnlyNumber type="text">
|
||||
@ -223,6 +227,7 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<span *ngIf="item.get('traded_goods_observed').value == 'yes'">
|
||||
<div *ngIf="lender_short_name != 'CLIX'">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Quantity"
|
||||
formControlName="traded_goods_quantity"
|
||||
@ -241,6 +246,7 @@
|
||||
formControlName="traded_goods_other_uom">
|
||||
<mat-error *ngIf="item.controls['traded_goods_other_uom'].hasError('required')">UOM Required</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<mat-form-field style="width:90%">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed"
|
||||
formControlName="estimated_traded_goods_value"
|
||||
@ -310,6 +316,7 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<span *ngIf="tradetg.get('traded_goods_observed').value == 'yes'">
|
||||
<div *ngIf="lender_short_name != 'CLIX'">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Quantity"
|
||||
formControlName="traded_goods_quantity"
|
||||
@ -328,6 +335,7 @@
|
||||
formControlName="traded_goods_other_uom">
|
||||
<mat-error *ngIf="tradetg.controls['traded_goods_other_uom'].hasError('required')">UOM Required</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<mat-form-field style="width:90%">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed"
|
||||
formControlName="estimated_traded_goods_value"
|
||||
@ -422,6 +430,7 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<span *ngIf="sp.get('service_provider_observed').value == 'yes'">
|
||||
<div *ngIf="lender_short_name != 'CLIX'">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Quantity"
|
||||
formControlName="service_provider_quantity"
|
||||
@ -440,6 +449,7 @@
|
||||
formControlName="service_provider_other_uom">
|
||||
<mat-error *ngIf="sp.controls['service_provider_other_uom'].hasError('required')">UOM Required</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<mat-form-field style="width:90%">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed"
|
||||
formControlName="estimated_service_provider_value"
|
||||
|
||||
@ -57,6 +57,7 @@ export class StockComponent implements OnInit {
|
||||
public RMsufficientList: any = [{value:"yes",isdisplayvalue:"Yes",disabled:false},{value:"no",isdisplayvalue:"No",disabled:false},{value:"not applicable",isdisplayvalue:"Stock not required to be maintained",disabled:false}];
|
||||
public TGsufficientList: any = [{value:"yes",isdisplayvalue:"Yes",isdisabled:false},{value:"no",isdisplayvalue:"No",isdisabled:false},{value:"not applicable",isdisplayvalue:"Stock not required to be maintained",isdisabled:false}];
|
||||
public SPsufficientList: any = [{value:"yes",isdisplayvalue:"Yes",isdisabled:false},{value:"no",isdisplayvalue:"No",isdisabled:false},{value:"not applicable",isdisplayvalue:"Stock not required to be maintained",isdisabled:false}];
|
||||
lender_short_name: any;
|
||||
|
||||
/** Constructor */
|
||||
constructor(notifier: NotifierService,
|
||||
@ -66,8 +67,11 @@ export class StockComponent implements OnInit {
|
||||
private dialogRef: MatDialogRef<StockComponent>,
|
||||
private dialog: MatDialog,
|
||||
private _pd: PdTrigerService, @Inject(MAT_DIALOG_DATA)
|
||||
public pd_all_details: any) {
|
||||
public pd_all_details: any)
|
||||
{
|
||||
|
||||
this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id
|
||||
this.lender_short_name=this.pd_all_details.pdmaster_details.lender_short_name
|
||||
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
|
||||
this.form_id = 11;
|
||||
this.company_id = this.pd_all_details.company_id;
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
formControlName="manufacturing_supplier_name">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row nowrap">
|
||||
<div fxLayout="row nowrap" *ngIf="lender_short_name != 'CLIX'">
|
||||
<mat-form-field style="width: 15%">
|
||||
<mat-select placeholder="Title"
|
||||
formControlName="person_title_name">
|
||||
@ -107,7 +107,7 @@
|
||||
<mat-error>Enter Valid LandLine Number.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="lender_short_name != 'CLIX'">
|
||||
<mat-form-field style="width: 45%">
|
||||
<!-- //(selectionChange)="selectedPM($event)" -->
|
||||
<!-- <mat-select placeholder="Payment Type" formControlName="manufacturing_payment_type">
|
||||
@ -217,7 +217,7 @@
|
||||
formControlName="trade_supplier_name">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row nowrap">
|
||||
<div fxLayout="row nowrap" *ngIf="lender_short_name != 'CLIX'">
|
||||
<mat-form-field style="width: 15%">
|
||||
<mat-select placeholder="Title"
|
||||
formControlName="person_title_name">
|
||||
@ -277,7 +277,7 @@
|
||||
<mat-error>Enter Valid LandLine Number.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="lender_short_name != 'CLIX'">
|
||||
<mat-form-field style="width: 45%">
|
||||
<!-- <mat-select (selectionChange)="selectedPM($event)" placeholder="Payment Type" formControlName="trade_product_payment_type">
|
||||
<mat-option *ngFor="let pm of m_paymentModeType" [value]="pm.id">{{ pm.name }}</mat-option>
|
||||
@ -392,7 +392,7 @@
|
||||
formControlName="service_provider_supplier_name">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row nowrap">
|
||||
<div fxLayout="row nowrap" *ngIf="lender_short_name != 'CLIX'">
|
||||
<mat-form-field style="width: 15%">
|
||||
<mat-select placeholder="Title"
|
||||
formControlName="person_title_name">
|
||||
@ -452,7 +452,7 @@
|
||||
<mat-error>Enter Valid LandLine Number.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none" *ngIf="lender_short_name != 'CLIX'">
|
||||
<mat-form-field style="width: 45%">
|
||||
|
||||
<mat-select placeholder="Payment Terms"
|
||||
|
||||
@ -42,6 +42,7 @@ export class SupplierInfoComponent implements OnInit {
|
||||
private notifier: NotifierService;
|
||||
titleList: any = [];
|
||||
companyRelationShipList: any = [];
|
||||
lender_short_name: any;
|
||||
|
||||
constructor(
|
||||
notifier: NotifierService,
|
||||
@ -50,6 +51,7 @@ export class SupplierInfoComponent implements OnInit {
|
||||
private dialog: MatDialog,
|
||||
@Inject(MAT_DIALOG_DATA) public pd_all_details: any, private dialogRef: MatDialogRef<SupplierInfoComponent>) {
|
||||
this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id
|
||||
this.lender_short_name=this.pd_all_details.pdmaster_details.lender_short_name
|
||||
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
|
||||
this.form_id = 1;
|
||||
this.company_id = this.pd_all_details.company_id
|
||||
|
||||
@ -130,6 +130,7 @@
|
||||
<span class="mr-1 ml-1">PD Report</span>
|
||||
<span class="empty-spacer"></span>
|
||||
<!-- <button mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Re-generate Report" matTooltipPosition="above" (click)="reGeneratePFReport()"><mat-icon>autorenew</mat-icon></button> -->
|
||||
<button mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Change PD Status to 'COMPLETED'" matTooltipPosition="above" (click)="reportReview('change_status_completed')"><mat-icon>settings_backup_restore</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Download PD Report" matTooltipPosition="above" (click)="downloadPDReport()"><mat-icon>get_app</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Download PD Pictures" matTooltipPosition="above" (click)="archivePDImages()"><mat-icon>save_alt</mat-icon></button>
|
||||
|
||||
|
||||
@ -90,9 +90,9 @@ export class QcPdReportComponent implements OnInit {
|
||||
getHTMLPDReport(){
|
||||
let encryptReportRandomString = atob(this.route.snapshot.params['string']);
|
||||
this.pdTrigerService.getPDReportHTML(encryptReportRandomString,this.startPD).subscribe(response=>{
|
||||
console.log("d",this.dataContainer)
|
||||
// console.log("d",this.dataContainer)
|
||||
this.dataContainer.nativeElement.innerHTML = response
|
||||
console.log("data",this.dataContainer)
|
||||
// console.log("data",this.dataContainer)
|
||||
this.loadComponent=true
|
||||
})
|
||||
}
|
||||
@ -104,9 +104,10 @@ export class QcPdReportComponent implements OnInit {
|
||||
|
||||
// })
|
||||
this.listPDComponent.showListView(false);
|
||||
this.generateBtn = true;
|
||||
this.getPdReportDetails();
|
||||
// this.getPdReportVersionList();
|
||||
this.generateBtn = true;
|
||||
|
||||
// start
|
||||
|
||||
// end
|
||||
@ -198,9 +199,10 @@ export class QcPdReportComponent implements OnInit {
|
||||
};
|
||||
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
|
||||
if (data.dataStatus) {
|
||||
console.log("Generate Report Called")
|
||||
// console.log(data.records);
|
||||
this.notifier.notify('success', 'Done Successfully..!');
|
||||
this.getPdReportVersionList();
|
||||
// this.getPdReportVersionList();
|
||||
this.ngOnInit();
|
||||
} else {
|
||||
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
|
||||
@ -282,6 +284,9 @@ export class QcPdReportComponent implements OnInit {
|
||||
this.generateBtn = data.records.is_original_report_created == 1 ? false : true;
|
||||
// console.log(this.generateBtn);
|
||||
this.reGenerateBtn = data.records.is_original_report_created == 1 ? true : false;
|
||||
if(this.reGenerateBtn){
|
||||
this.getHTMLPDReport()
|
||||
}
|
||||
// console.log(this.reGenerateBtn);
|
||||
}
|
||||
else{
|
||||
@ -289,7 +294,7 @@ export class QcPdReportComponent implements OnInit {
|
||||
// console.log('else',this.generateBtn);
|
||||
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
|
||||
}
|
||||
this.getHTMLPDReport()
|
||||
console.log("Final PD Report Details","generatebtn",this.generateBtn,"regenerateBtn",this.reGenerateBtn);
|
||||
}, err => {
|
||||
this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (err.error_type == 2 ? err.error_status + ' ( ' + err.error_text + ' ) ' : ' ( ' + err.error_text + ' ) ') +'\" Error Occur.!');
|
||||
// alert(err.html_format);
|
||||
@ -319,7 +324,7 @@ export class QcPdReportComponent implements OnInit {
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
if(dataresult.status==true){
|
||||
this.getPdReportVersionList();
|
||||
// this.getPdReportVersionList();
|
||||
}
|
||||
// this.getPdReportFinalTemplateDetails();
|
||||
// this.getQuestionsMasters();
|
||||
@ -341,7 +346,11 @@ export class QcPdReportComponent implements OnInit {
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
if(dataresult.status==true){
|
||||
this.getPdReportVersionList();
|
||||
// this.getPdReportVersionList();
|
||||
// console.log("rs",dataresult,status);
|
||||
if(status=='change_status_completed' || status == 'COMPLETE'){
|
||||
this.router.navigate(['../../../viewpd',this.startPD,atob(this.route.snapshot.params['string'])], { relativeTo: this.route });
|
||||
}
|
||||
}
|
||||
// this.getPdReportFinalTemplateDetails();
|
||||
// this.getQuestionsMasters();
|
||||
@ -389,7 +398,7 @@ export class QcPdReportComponent implements OnInit {
|
||||
this.pdTrigerService.swapOlderPDReportToLatest(data).subscribe(data => {
|
||||
if (data.status == 200) {
|
||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||
this.getPdReportVersionList();
|
||||
// this.getPdReportVersionList();
|
||||
} else {
|
||||
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
|
||||
}
|
||||
@ -470,6 +479,43 @@ export class QcPdReportComponent implements OnInit {
|
||||
}
|
||||
})
|
||||
}
|
||||
changePDStatus(){
|
||||
// const dialogRef = this.dialog.open(QcReviewComponent, {
|
||||
// data: { startId: this.startPD, data_status: status,random_string : atob(this.route.snapshot.params['string']) },
|
||||
// disableClose: true
|
||||
// });
|
||||
// dialogRef.afterClosed()
|
||||
// .subscribe(dataresult => {
|
||||
// if(dataresult.status==true){
|
||||
// this.getPdReportVersionList();
|
||||
// }
|
||||
// // this.getPdReportFinalTemplateDetails();
|
||||
// // this.getQuestionsMasters();
|
||||
// // this.getBranch();
|
||||
// // this.isPopupOpened = false;
|
||||
// });
|
||||
let encryptReportRandomString = atob(this.route.snapshot.params['string']);
|
||||
let update_status = {
|
||||
"pd_id":this.startPD,
|
||||
};
|
||||
this.pdTrigerService.editPdMasterDetails(update_status,'COMPLETED',encryptReportRandomString).subscribe(result=>{
|
||||
|
||||
if (result.status == 200) {
|
||||
|
||||
let getItem = localStorage.getItem('userEdits');
|
||||
localStorage.removeItem('userEdits');
|
||||
this.router.navigate(['../../../viewpd',this.startPD,atob(this.route.snapshot.params['string'])], { relativeTo: this.route });
|
||||
|
||||
}
|
||||
else {
|
||||
// this.dialogRef.close({update_status:false});
|
||||
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
|
||||
}
|
||||
}, error => {
|
||||
// this.dialogRef.close({update_status:false});
|
||||
this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!');
|
||||
});
|
||||
}
|
||||
// OnDestroy():void{
|
||||
// console.log("onDestroy called");
|
||||
// this.listPDComponent.showListView(true);
|
||||
|
||||
@ -66,4 +66,24 @@
|
||||
<button mat-button class="btn btn-primary" (click)="myClick()">Save</button>
|
||||
<button mat-button mat-dialog-close>Cancel</button>
|
||||
</mat-dialog-actions>
|
||||
</div>
|
||||
|
||||
<div *ngIf="showStatus == 'change_status_completed'">
|
||||
<h2 mat-dialog-title>Status Change</h2>
|
||||
<mat-dialog-content class="mat-typography">
|
||||
<div style="margin: 12px; width: 340px;">
|
||||
<form role="form" *ngIf="showForm" [formGroup]="ngForm" accept-charset="UTF-8" novalidate>
|
||||
<div>
|
||||
<mat-form-field appearance="outline" style="width: 100%">
|
||||
<mat-label>Remarks</mat-label>
|
||||
<textarea matInput placeholder="Remarks" formControlName="change_status_remark"></textarea>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-button class="btn btn-primary" (click)="statusChangeClick()">Save</button>
|
||||
<button mat-button mat-dialog-close>Cancel</button>
|
||||
</mat-dialog-actions>
|
||||
</div>
|
||||
@ -9,6 +9,7 @@ import {
|
||||
MatDialogRef,
|
||||
MAT_DIALOG_DATA
|
||||
} from '@angular/material';
|
||||
import { PdTrigerService } from 'app/personal-discussion/pd-service/pd-triger.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-qc-review',
|
||||
@ -29,6 +30,7 @@ export class QcReviewComponent implements OnInit {
|
||||
private notifier: NotifierService;
|
||||
constructor( private _formBuilder: FormBuilder,
|
||||
private pdTrigerService: QcService,
|
||||
private serviceFromPD:PdTrigerService,
|
||||
notifier: NotifierService ,
|
||||
private dialogRef: MatDialogRef<QcReviewComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: any) {
|
||||
@ -65,7 +67,7 @@ export class QcReviewComponent implements OnInit {
|
||||
this.recordData = data.records[0];
|
||||
this.ngForm = this._formBuilder.group({
|
||||
pd_qc_note: [this.recordData.pd_qc_note],
|
||||
pd_status: [this.recordData.pd_status]
|
||||
pd_status: [this.recordData.pd_status || "COMPLETED"]
|
||||
})
|
||||
this.showForm = true;
|
||||
}
|
||||
@ -89,7 +91,16 @@ export class QcReviewComponent implements OnInit {
|
||||
this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!');
|
||||
// alert(err.html_format);
|
||||
});
|
||||
} else {
|
||||
}
|
||||
else if(this.showStatus === 'change_status_completed') {
|
||||
|
||||
this.ngForm = this._formBuilder.group({
|
||||
change_status_remark: [''],
|
||||
// qc_rating: [Number(this.recordData.qc_rating)],
|
||||
pd_status: ["COMPLETED"],
|
||||
})
|
||||
this.showForm = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -103,7 +114,28 @@ export class QcReviewComponent implements OnInit {
|
||||
template.pd_id = this.data.startId;
|
||||
template.random_string = this.data.random_string;
|
||||
template.parent_pd_id=this.data.startId;
|
||||
|
||||
this.pdTrigerService.pdReviewStatusUpdate(template).subscribe(data=>{
|
||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||
this.dialogRef.close({
|
||||
status:true,
|
||||
dialog_close:true
|
||||
});
|
||||
}, error => {
|
||||
this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!');
|
||||
// alert(err.html_format);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
statusChangeClick(): void {
|
||||
let template = this.ngForm.value;
|
||||
let savePDRemark_values={'pd_id':this.data.startId,'remark':template.change_status_remark}
|
||||
this.serviceFromPD.savePDRemark(savePDRemark_values).subscribe(result=>{
|
||||
|
||||
let changeStatus_values={'pd_id':this.data.startId,random_string:this.data.random_string,parent_pd_id:this.data.startId,pd_status:template.pd_status}
|
||||
|
||||
this.pdTrigerService.pdReviewStatusUpdate(changeStatus_values).subscribe(data=>{
|
||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||
this.dialogRef.close({
|
||||
status:true
|
||||
@ -112,6 +144,7 @@ export class QcReviewComponent implements OnInit {
|
||||
this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!');
|
||||
// alert(err.html_format);
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user