Fairoj : SMART pd feedback changes
This commit is contained in:
parent
554ee7d6b0
commit
0d6abee45b
@ -347,13 +347,13 @@
|
|||||||
|
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<mat-card-title>Documents to be collected</mat-card-title>
|
<mat-card-title>Document to be photographed/scanned</mat-card-title>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content formArrayName="docs_to_be_collected" *ngFor="let Documentstobecollected of pdDocumentstobecollected.controls; let i = index;">
|
<mat-card-content formArrayName="docs_to_be_collected" *ngFor="let Documentstobecollected of pdDocumentstobecollected.controls; let i = index;">
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card-content [formGroupName]="i">
|
<mat-card-content [formGroupName]="i">
|
||||||
<mat-form-field style="width: 90%;">
|
<mat-form-field style="width: 90%;">
|
||||||
<input matInput autocomplete="off" placeholder="Documents to be collected" formControlName="doc_name">
|
<input matInput autocomplete="off" placeholder="Document to be photographed/scanned" formControlName="doc_name">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<button mat-raised-button mat-icon-button matTooltip="Delete" matTooltipPosition="above" (click)="removeDocumentstobecollected(i)" type="button"><mat-icon>delete</mat-icon></button>
|
<button mat-raised-button mat-icon-button matTooltip="Delete" matTooltipPosition="above" (click)="removeDocumentstobecollected(i)" type="button"><mat-icon>delete</mat-icon></button>
|
||||||
@ -363,7 +363,7 @@
|
|||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<mat-card-actions align="end">
|
<mat-card-actions align="end">
|
||||||
<button type="button" mat-raised-button mat-icon-button (click)="addDocumentstobecollected()"
|
<button type="button" mat-raised-button mat-icon-button (click)="addDocumentstobecollected()"
|
||||||
matTooltip="Add More Documents to be collected" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
matTooltip="Add More Document to be photographed/scanned" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||||
<mat-icon>add</mat-icon>
|
<mat-icon>add</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</mat-card-actions>
|
</mat-card-actions>
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
<mat-card formArrayName="docs_to_be_collected" *ngFor="let collecteddocs of pdCollectedDocs.controls; let i = index;">
|
<mat-card formArrayName="docs_to_be_collected" *ngFor="let collecteddocs of pdCollectedDocs.controls; let i = index;">
|
||||||
<mat-card-content [formGroupName]="i" *ngIf="collecteddocs.value.isactive != 0">
|
<mat-card-content [formGroupName]="i" *ngIf="collecteddocs.value.isactive != 0">
|
||||||
<mat-form-field style="width: 90%;">
|
<mat-form-field style="width: 90%;">
|
||||||
<input matInput placeholder="Documents to be collected" formControlName="doc_name">
|
<input matInput placeholder="Document to be photographed/scanned" formControlName="doc_name">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<button mat-raised-button mat-icon-button color="primary" matTooltip="Delete" matTooltipPosition="above" (click)="removeRequirements(i)" type="button"><mat-icon>delete</mat-icon></button>
|
<button mat-raised-button mat-icon-button color="primary" matTooltip="Delete" matTooltipPosition="above" (click)="removeRequirements(i)" type="button"><mat-icon>delete</mat-icon></button>
|
||||||
|
|||||||
@ -105,6 +105,7 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
@ViewChild('business_activity_type') business_activity_type_scroll : ElementRef
|
@ViewChild('business_activity_type') business_activity_type_scroll : ElementRef
|
||||||
prod_catagory: any;
|
prod_catagory: any;
|
||||||
fk_pd_type: any;
|
fk_pd_type: any;
|
||||||
|
vendor_data_answers: any = {documents_info:{}};
|
||||||
|
|
||||||
|
|
||||||
constructor(notifier: NotifierService,
|
constructor(notifier: NotifierService,
|
||||||
@ -697,6 +698,16 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
if(result) {
|
if(result) {
|
||||||
let individualsControl = <FormArray>this.businessForm.controls['individuals'];
|
let individualsControl = <FormArray>this.businessForm.controls['individuals'];
|
||||||
console.log("Vendor Datas",result.records)
|
console.log("Vendor Datas",result.records)
|
||||||
|
this.vendor_data_answers = result.records
|
||||||
|
this.vendor_data_answers = JSON.parse(JSON.stringify(this.vendor_data_answers))
|
||||||
|
|
||||||
|
var updated_result = {};
|
||||||
|
let docs_info = this.vendor_data_answers.documents_info
|
||||||
|
for (var i = 0; i < docs_info.length; i++) {
|
||||||
|
updated_result[docs_info[i].document_name] = 'yes';
|
||||||
|
}
|
||||||
|
this.vendor_data_answers.raw_documents_info = this.vendor_data_answers.documents_info
|
||||||
|
this.vendor_data_answers.documents_info = updated_result
|
||||||
// individualsControl.patchValue(result.records.individuals);
|
// individualsControl.patchValue(result.records.individuals);
|
||||||
result.records.documents_info.forEach(val=>{
|
result.records.documents_info.forEach(val=>{
|
||||||
if(val) {
|
if(val) {
|
||||||
@ -796,7 +807,7 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
// businees activity type change event
|
// businees activity type change event
|
||||||
changeBusinessActivity(event: any) {
|
changeBusinessActivity(event: any) {
|
||||||
|
|
||||||
console.log(event);
|
console.log(event,this.vendor_data_answers,this.businessForm.value);
|
||||||
if (event.value.exist_status == true && event.value.type_of_activity_id == 2) {
|
if (event.value.exist_status == true && event.value.type_of_activity_id == 2) {
|
||||||
|
|
||||||
this.ManufacturingUnChecked = event.value.exist_status;
|
this.ManufacturingUnChecked = event.value.exist_status;
|
||||||
@ -810,7 +821,7 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
this.ManufacturingUnChecked = event.value.exist_status;
|
this.ManufacturingUnChecked = event.value.exist_status;
|
||||||
let manufacturingControl = <FormArray>this.businessForm.controls['manufacturing_activity_details'];
|
let manufacturingControl = <FormArray>this.businessForm.controls['manufacturing_activity_details'];
|
||||||
manufacturingControl.push(this.createActivity());
|
manufacturingControl.push(this.createActivity());
|
||||||
this.businessForm.addControl('eb_bill',new FormControl('',Validators.compose([Validators.required])))
|
this.businessForm.addControl('eb_bill',new FormControl(this.vendor_data_answers.documents_info['eb_bill'] || '',Validators.compose([Validators.required])))
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -864,9 +875,9 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
// othersControl.push(this.createOthersActivity());
|
// othersControl.push(this.createOthersActivity());
|
||||||
// }
|
// }
|
||||||
// check activity type for make dosument sighted filed dynamically
|
// check activity type for make dosument sighted filed dynamically
|
||||||
this.businessForm.value.manufacturing_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('export_import_cert', new FormControl(this.businessForm.value.export_import_cert, Validators.required)) : this.businessForm.removeControl('export_import_cert');
|
this.businessForm.value.manufacturing_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('export_import_cert', new FormControl(this.businessForm.value.export_import_cert || this.vendor_data_answers.documents_info['export_import_cert'], Validators.required)) : this.businessForm.removeControl('export_import_cert');
|
||||||
this.businessForm.value.manufacturing_activity_details.length > 0 ? this.businessForm.addControl('factory_cert', new FormControl(this.businessForm.value.factory_cert, Validators.required)) : this.businessForm.removeControl('factory_cert');
|
this.businessForm.value.manufacturing_activity_details.length > 0 ? this.businessForm.addControl('factory_cert', new FormControl(this.businessForm.value.factory_cert || this.vendor_data_answers.documents_info['factory_cert'], Validators.required)) : this.businessForm.removeControl('factory_cert');
|
||||||
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');
|
this.businessForm.value.service_provider_activity_details.length > 0 ? this.businessForm.addControl('practice_cert', new FormControl(this.businessForm.value.practice_cert || this.vendor_data_answers.documents_info['practice_cert'], Validators.required)) : this.businessForm.removeControl('practice_cert');
|
||||||
// check activity for extra question make dynamic
|
// check activity for extra question make dynamic
|
||||||
|
|
||||||
if(!(this.lender_short_name == 'CLIX' && this.prod_catagory == 'BL') && !(this.lender_short_name == 'MWISE' && this.prod_catagory == 'BL')){
|
if(!(this.lender_short_name == 'CLIX' && this.prod_catagory == 'BL') && !(this.lender_short_name == 'MWISE' && this.prod_catagory == 'BL')){
|
||||||
|
|||||||
@ -298,6 +298,7 @@ export class FinalRemarksComponent implements OnInit {
|
|||||||
console.log(this.pd_all_details.pdmaster_details.vendor_status);
|
console.log(this.pd_all_details.pdmaster_details.vendor_status);
|
||||||
this.getDataFromVendor()
|
this.getDataFromVendor()
|
||||||
}
|
}
|
||||||
|
this.getVendorComments()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -323,6 +324,14 @@ export class FinalRemarksComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
// FOR GETTING THE COMMENTS API CALL
|
||||||
|
getVendorComments() {
|
||||||
|
this.pdTrigerService.getVendorDatas('COMMENTS',this.pdid).subscribe(result=>{
|
||||||
|
this._finalRemarkForm.controls.final_form_remarks.patchValue(result.records.final_comments);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
/************************* END OF VENDOR FORM DATAS *********************************/
|
/************************* END OF VENDOR FORM DATAS *********************************/
|
||||||
|
|
||||||
|
|||||||
@ -386,6 +386,9 @@ export class GeneralInfoComponent implements OnInit {
|
|||||||
let individualsControl = <FormArray>this._generalForm.controls['individuals'];
|
let individualsControl = <FormArray>this._generalForm.controls['individuals'];
|
||||||
console.log("Vendor Datas",result.records)
|
console.log("Vendor Datas",result.records)
|
||||||
individualsControl.patchValue(result.records.individuals);
|
individualsControl.patchValue(result.records.individuals);
|
||||||
|
if(result.records.general_remark) {
|
||||||
|
this._generalForm.controls.general_remark.patchValue(result.records.general_remark)
|
||||||
|
}
|
||||||
console.log(this._generalForm.value)
|
console.log(this._generalForm.value)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -63,8 +63,8 @@
|
|||||||
<mat-card *ngIf="docs_array_value.length !=0 ">
|
<mat-card *ngIf="docs_array_value.length !=0 ">
|
||||||
<mat-card-header [ngClass]="{'smartPd':fk_pd_type == '2'}">
|
<mat-card-header [ngClass]="{'smartPd':fk_pd_type == '2'}">
|
||||||
<mat-card-title>
|
<mat-card-title>
|
||||||
<h5 *ngIf="fk_pd_type != '3' && fk_pd_type != '2'">Documents to be collected</h5>
|
<h5 *ngIf="fk_pd_type != '3' && fk_pd_type != '2'">Document to be photographed/scanned</h5>
|
||||||
<h5 *ngIf="fk_pd_type == '3' || fk_pd_type == '2'">Docuements to be uploaded</h5>
|
<h5 *ngIf="fk_pd_type == '3' || fk_pd_type == '2'">Document to be photographed/scanned</h5>
|
||||||
</mat-card-title>
|
</mat-card-title>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content formArrayName="docs_to_be_sighted" [ngClass]="{'smartPd':fk_pd_type == '2'}">
|
<mat-card-content formArrayName="docs_to_be_sighted" [ngClass]="{'smartPd':fk_pd_type == '2'}">
|
||||||
|
|||||||
@ -416,10 +416,10 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
<mat-tab>
|
<mat-tab>
|
||||||
<ng-template mat-tab-label>Collected Documents</ng-template>
|
<ng-template mat-tab-label>Document to be photographed/scanned</ng-template>
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<div fxFlex="70" align="left" style="padding: 10px !important;">
|
<div fxFlex="70" align="left" style="padding: 10px !important;">
|
||||||
<mat-card-title>Documents to be collected</mat-card-title>
|
<mat-card-title>Document to be photographed/scanned</mat-card-title>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex="30" align="end" style="padding: 10px !important;" *ngIf="roleAccessDetails.trigger && currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED || currentPDStatus==pdStatusCheck.ALLOCATED_TO_PARTNER">
|
<div fxFlex="30" align="end" style="padding: 10px !important;" *ngIf="roleAccessDetails.trigger && currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED || currentPDStatus==pdStatusCheck.ALLOCATED_TO_PARTNER">
|
||||||
<span *ngIf="userRoleID == 10 || userRoleID == 3"><button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editCollectedDocument(pdCollectedDocument)"><mat-icon>edit</mat-icon></button></span>
|
<span *ngIf="userRoleID == 10 || userRoleID == 3"><button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editCollectedDocument(pdCollectedDocument)"><mat-icon>edit</mat-icon></button></span>
|
||||||
|
|||||||
@ -960,7 +960,8 @@ export class PdTrigerService {
|
|||||||
let formsDet = [{form_name:"general",form_id:"18"},{form_name:"address",form_id:"5"},{form_name:"business_info",form_id:"13"},
|
let formsDet = [{form_name:"general",form_id:"18"},{form_name:"address",form_id:"5"},{form_name:"business_info",form_id:"13"},
|
||||||
{form_name:"business_assets",form_id:"22"},{form_name:"neighbourhood_details",form_id:"19"},
|
{form_name:"business_assets",form_id:"22"},{form_name:"neighbourhood_details",form_id:"19"},
|
||||||
{form_name:"final_remarks",form_id:"20"},
|
{form_name:"final_remarks",form_id:"20"},
|
||||||
{form_name:"queries_form",form_id:"24"}
|
{form_name:"queries_form",form_id:"24"},
|
||||||
|
{form_name:"COMMENTS",form_id:"COMMENTS"}
|
||||||
]
|
]
|
||||||
|
|
||||||
// let records = {"records":data[form_name]}
|
// let records = {"records":data[form_name]}
|
||||||
|
|||||||
@ -366,10 +366,10 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
<mat-tab>
|
<mat-tab>
|
||||||
<ng-template mat-tab-label>Collected Documents</ng-template>
|
<ng-template mat-tab-label>Document to be photographed/scanned</ng-template>
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<div fxFlex="70" align="left" style="padding: 10px !important;">
|
<div fxFlex="70" align="left" style="padding: 10px !important;">
|
||||||
<mat-card-title>Documents to be collected</mat-card-title>
|
<mat-card-title>Document to be photographed/scanned</mat-card-title>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex="30" align="end" style="padding: 10px !important;" *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED || currentPDStatus==pdStatusCheck.COMPLETED">
|
<div fxFlex="30" align="end" style="padding: 10px !important;" *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED || currentPDStatus==pdStatusCheck.COMPLETED">
|
||||||
<span *ngIf="userRoleID == 10 || userRoleID == 3"><button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editCollectedDocument(pdCollectedDocument)"><mat-icon>edit</mat-icon></button></span>
|
<span *ngIf="userRoleID == 10 || userRoleID == 3"><button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editCollectedDocument(pdCollectedDocument)"><mat-icon>edit</mat-icon></button></span>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user