diff --git a/ng6-seed/Sparqsineedge(WEB 19-04-20121)Test.zip b/ng6-seed/Sparqsineedge(WEB 06-05-2021)Test.zip similarity index 93% rename from ng6-seed/Sparqsineedge(WEB 19-04-20121)Test.zip rename to ng6-seed/Sparqsineedge(WEB 06-05-2021)Test.zip index 045a22c5e..cf473252e 100644 Binary files a/ng6-seed/Sparqsineedge(WEB 19-04-20121)Test.zip and b/ng6-seed/Sparqsineedge(WEB 06-05-2021)Test.zip differ diff --git a/ng6-seed/Sparqsineedge(WEB 20-04-2021)Test.zip b/ng6-seed/Sparqsineedge(WEB 11-05-2021)Test.zip similarity index 93% rename from ng6-seed/Sparqsineedge(WEB 20-04-2021)Test.zip rename to ng6-seed/Sparqsineedge(WEB 11-05-2021)Test.zip index 216c9fcd2..b495cf094 100644 Binary files a/ng6-seed/Sparqsineedge(WEB 20-04-2021)Test.zip and b/ng6-seed/Sparqsineedge(WEB 11-05-2021)Test.zip differ diff --git a/ng6-seed/Sparqsineedge(WEB 13-03-2021)Test.zip b/ng6-seed/Sparqsineedge(WEB 13-03-2021)Test.zip deleted file mode 100644 index 6960cee5e..000000000 Binary files a/ng6-seed/Sparqsineedge(WEB 13-03-2021)Test.zip and /dev/null differ diff --git a/ng6-seed/Sparqsineedge(WEB 16-03-2021)Test.zip b/ng6-seed/Sparqsineedge(WEB 16-03-2021)Test.zip deleted file mode 100644 index 8b3277ef7..000000000 Binary files a/ng6-seed/Sparqsineedge(WEB 16-03-2021)Test.zip and /dev/null differ diff --git a/ng6-seed/Sparqsineedge(WEB 16-04-2021)Test.zip b/ng6-seed/Sparqsineedge(WEB 16-04-2021)Test.zip deleted file mode 100644 index 546326b1b..000000000 Binary files a/ng6-seed/Sparqsineedge(WEB 16-04-2021)Test.zip and /dev/null differ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html index d28d66c4b..9165ef1d2 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html @@ -1713,7 +1713,7 @@ January - February + February March April May diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts index 9fa50eae0..99cbee318 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts @@ -12,7 +12,7 @@ import { FormGroup, Validators, FormArray, FormControl, AbstractControl, -} from '@angular/forms'; +} from '@angular/forms'; import { NotifierService } from 'angular-notifier'; @@ -111,6 +111,8 @@ export class BusinessInfoComponent implements OnInit { public cityFilterCtrl:FormControl = new FormControl(); public filteredStateList:ReplaySubject=new ReplaySubject(1) public filteredCityList:ReplaySubject=new ReplaySubject(1) + imageDisplay: any[]; + formsaved: string; constructor(notifier: NotifierService, @@ -182,6 +184,7 @@ export class BusinessInfoComponent implements OnInit { this.getCompanyRelation(); this.getTitle(); this.getAllPersons(); + this.getPDImages(); this.getBank(); // const Desgn = this.businessForm.controls['designation']; // const Partnr = this.businessForm.controls['partners']; @@ -293,7 +296,8 @@ export class BusinessInfoComponent implements OnInit { businessVal.persons_with_relationships = []; } - } + } + else { businessVal.persons_with_relationships = []; @@ -682,6 +686,8 @@ export class BusinessInfoComponent implements OnInit { this.businessForm.patchValue(businessVal); // console.log('this.businessForm',this.businessForm); } else { + //alert('notsaved'); + this.formsaved='no'; //Desgn.push(this.createDesignation()); Partnr.push(this.createPartners()); otherDoc.push(this.createDocument()); @@ -849,11 +855,65 @@ export class BusinessInfoComponent implements OnInit { this.businessForm.removeControl('persons_with_relationships'); } } + /*IMAGE SECTION*/ + getPDImages() { + + //FOR RETRIEVING PICTURES + this.imageDisplay = [] + //let record_for_pic = { 'pd_id': this.pdDetails.pd_id, 'form_id': this.FormId, 'company_id': this.pdDetails.company_id } + this._pd.retriveFile(this.pdid,this.form_id,null).subscribe(val=>{ + if (val['dataStatus']) { + // console.log(val['records']) + if (val['records'] && val['records'].length > 0) { + val['records'].forEach(result => { + this.imageDisplay.push({isactive:result.isactive,image_key:result.image_key, 'image': result.doc_url, 'Name': result.pd_document_title, 'option': 'dummy' }) + }) + + + //if(!this.editData || this.editData == undefined || this.editData == null) { + this.checkAndHandleDocImageFetch() + //} + // debugger; + } + } + }) + console.log("imageBuck", this.imageDisplay); +} +checkAndHandleDocImageFetch() { + console.log(this.imageDisplay,this.businessForm.value) + let shop_eat_act_cert_pic = this.imageDisplay.filter(vv=>vv.image_key == 'shop_eat_act_cert_pic' && vv.isactive == '1') + + let gst_Regn_cert = this.imageDisplay.filter(vv=>vv.image_key == 'gst_Regn_cert_pic' && vv.isactive == '1') + + let pf_regn = this.imageDisplay.filter(vv=>vv.image_key == 'pf_regn_pic' && vv.isactive == '1') + + let esic_regn = this.imageDisplay.filter(vv=>vv.image_key == 'esic_regn_pic' && vv.isactive == '1') + + //let + if(shop_eat_act_cert_pic.length > 0) { + this.businessForm.controls['shop_eat_act_cert'].setValue('yes') +this.businessForm.addControl('shop_eat_act_cert_pic', new FormControl(shop_eat_act_cert_pic[0].image, Validators.compose([Validators.required]))) + } + if(gst_Regn_cert.length > 0) { + this.businessForm.controls['gst_Regn_cert'].setValue('yes') + this.businessForm.addControl('gst_Regn_cert_pic', new FormControl(gst_Regn_cert[0].image, Validators.compose([Validators.required]))) + } + if(pf_regn.length > 0) { + this.businessForm.controls['pf_regn'].setValue('yes') + this.businessForm.addControl('pf_regn_pic', new FormControl(pf_regn[0].image, Validators.compose([Validators.required]))) + } + if(esic_regn.length > 0) { + this.businessForm.controls['esic_regn'].setValue('yes') + this.businessForm.addControl('esic_regn_pic', new FormControl(esic_regn[0].image, Validators.compose([Validators.required]))) + } + // this.businessForm.addControl('shop_eat_act_cert_pic', new FormControl('', Validators.compose([Validators.required]))) +} // businees activity type change event changeBusinessActivity(event: any) { - console.log(event,this.vendor_data_answers,this.businessForm.value); + console.log(event.value.exist_status,event.value.type_of_activity_id); + // return if (event.value.exist_status == true && event.value.type_of_activity_id == 2) { this.ManufacturingUnChecked = event.value.exist_status; @@ -867,8 +927,15 @@ export class BusinessInfoComponent implements OnInit { this.ManufacturingUnChecked = event.value.exist_status; let manufacturingControl = this.businessForm.controls['manufacturing_activity_details']; manufacturingControl.push(this.createActivity()); - this.businessForm.addControl('eb_bill',new FormControl(this.vendor_data_answers.documents_info['eb_bill'] || '',Validators.compose([Validators.required]))) - + this.businessForm.addControl('eb_bill', new FormControl('', Validators.compose([Validators.required]))) + let eb_bill_pic = this.imageDisplay.filter(vv=>vv.image_key == 'eb_bill_pic' && vv.isactive == '1') + if(eb_bill_pic.length > 0) { + if(this.formsaved=='no') + { + this.businessForm.controls['eb_bill'].setValue('yes') + this.businessForm.addControl('eb_bill_pic', new FormControl(eb_bill_pic[0].image, Validators.compose([Validators.required]))) + } + } } if (event.value.exist_status == true && event.value.type_of_activity_id == 3) { @@ -921,9 +988,34 @@ export class BusinessInfoComponent implements OnInit { // othersControl.push(this.createOthersActivity()); // } // 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 || 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 || 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 || this.vendor_data_answers.documents_info['practice_cert'], Validators.required)) : this.businessForm.removeControl('practice_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, Validators.required)) : this.businessForm.removeControl('export_import_cert'); + let export_import_cert_pic = this.imageDisplay.filter(vv=>vv.image_key == 'export_import_cert_pic' && vv.isactive == '1') + if(export_import_cert_pic.length > 0) { + if(this.formsaved=='no') + { + this.businessForm.controls['export_import_cert'].setValue('yes') + this.businessForm.addControl('export_import_cert_pic', new FormControl(export_import_cert_pic[0].image, Validators.compose([Validators.required]))) + } + } + 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'); + let factory_cert_pic = this.imageDisplay.filter(vv=>vv.image_key == 'factory_cert_pic' && vv.isactive == '1') + if(factory_cert_pic.length > 0) { + if(this.formsaved=='no') + { + this.businessForm.controls['factory_cert'].setValue('yes') + this.businessForm.addControl('factory_cert_pic', new FormControl(factory_cert_pic[0].image, Validators.compose([Validators.required]))) + } + } + + 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'); + let practice_cert_pic = this.imageDisplay.filter(vv=>vv.image_key == 'practice_cert_pic' && vv.isactive == '1') + if(practice_cert_pic.length > 0) { + if(this.formsaved=='no') + { + this.businessForm.controls['practice_cert'].setValue('yes') + this.businessForm.addControl('practice_cert_pic', new FormControl(practice_cert_pic[0].image, Validators.compose([Validators.required]))) + } + } // 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')){ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html index 8bffdfb4f..183daba98 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html @@ -225,7 +225,7 @@ Specify Others Required -

Number of Years in Current Profession +

diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts index 21282b2f2..39210cfa7 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts @@ -505,7 +505,7 @@ export class GeneralInfoComponent implements OnInit { company_messrs_name: ['M/s'], is_company_applicant: [elementValue.is_company_applicant], business_entity_type: [elementValue.business_entity_type, Validators.required], - business_years: [elementValue.business_years, Validators.required], + business_years: [elementValue.business_years], business_month: [elementValue.business_month], business_date_object: [elementValue.business_date_object], is_active: [elementValue.is_active], @@ -953,45 +953,45 @@ export class GeneralInfoComponent implements OnInit { /**************************** submit form details Ends Here ***********************/ // convert month to year business has been running - ConvertMonthintoYearforBusiness(e, controlIndex, flag) { + // ConvertMonthintoYearforBusiness(e, controlIndex, flag) { - let converted_month: number = e % 12; - let converted_year: number = e / 12; + // let converted_month: number = e % 12; + // let converted_year: number = e / 12; - if (flag == 1) { - let control: any = this._generalForm.get('companies') as FormArray; - control = control.controls[controlIndex]; - let business_year = control.controls.business_years.value; - control.controls.business_years.setValue(+business_year + +Math.floor(converted_year)); - control.controls.business_month.setValue(Math.floor(converted_month)); - } + // if (flag == 1) { + // let control: any = this._generalForm.get('companies') as FormArray; + // control = control.controls[controlIndex]; + // let business_year = control.controls.business_years.value; + // control.controls.business_years.setValue(+business_year + +Math.floor(converted_year)); + // control.controls.business_month.setValue(Math.floor(converted_month)); + // } - if (flag == 2) { - let ri_year = this._generalForm.controls.rental_income_rcv_in_years.value; - this._generalForm.controls['rental_income_rcv_in_years'].setValue(+ri_year + +Math.floor(converted_year)); - this._generalForm.controls['rental_income_rcv_in_month'].setValue(Math.floor(converted_month)); - } + // if (flag == 2) { + // let ri_year = this._generalForm.controls.rental_income_rcv_in_years.value; + // this._generalForm.controls['rental_income_rcv_in_years'].setValue(+ri_year + +Math.floor(converted_year)); + // this._generalForm.controls['rental_income_rcv_in_month'].setValue(Math.floor(converted_month)); + // } - } + // } - getDateObjects(values: any, controlIndex) { - let control: any = this._generalForm.get('companies') as FormArray; - control = control.controls[controlIndex]; - let pd_initiation_date: string = this.pd_all_details.pdmaster_details.pd_date_of_initiation.split('/').reverse().join("/"); - let selected_date = this.pipe.transform(values, 'yyyy/MM/dd');; - let diffInMs: number = Date.parse(pd_initiation_date) - Date.parse(selected_date); - let diff: number = Math.floor(diffInMs / 1000); - diff /= (60 * 60 * 24 * 30); - diff = Math.abs(Math.round(diff)); - control.controls['business_years'].setValue(0); - control.controls['business_month'].setValue(0); + // getDateObjects(values: any, controlIndex) { + // let control: any = this._generalForm.get('companies') as FormArray; + // control = control.controls[controlIndex]; + // let pd_initiation_date: string = this.pd_all_details.pdmaster_details.pd_date_of_initiation.split('/').reverse().join("/"); + // let selected_date = this.pipe.transform(values, 'yyyy/MM/dd');; + // let diffInMs: number = Date.parse(pd_initiation_date) - Date.parse(selected_date); + // let diff: number = Math.floor(diffInMs / 1000); + // diff /= (60 * 60 * 24 * 30); + // diff = Math.abs(Math.round(diff)); + // control.controls['business_years'].setValue(0); + // control.controls['business_month'].setValue(0); - if (diff) { - control.controls['business_years'].setValue(Math.floor(diff / 12)); - control.controls['business_month'].setValue(Math.floor(diff % 12)); - } + // if (diff) { + // control.controls['business_years'].setValue(Math.floor(diff / 12)); + // control.controls['business_month'].setValue(Math.floor(diff % 12)); + // } - } + // } // check entity type and create other form control checkEntityType(value, controlIndex) { diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.html index 2122fc0c1..16baaf60a 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.html @@ -13,7 +13,7 @@
- +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.ts index 7ec203a2a..6590661a2 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/queries-docs/queries-docs.component.ts @@ -14,7 +14,7 @@ import { take } from 'rxjs/operators'; templateUrl: './queries-docs.component.html', styleUrls: ['./queries-docs.component.scss'] }) -export class QueriesDocsComponent implements OnInit { +export class QueriesDocsComponent implements OnInit { form_id: number; parent_pdid: any; pdid: any; @@ -32,7 +32,7 @@ export class QueriesDocsComponent implements OnInit { disableAfterSubmit: boolean; fk_pd_type: any; image_doc_params: { pdid: string; form_id: number; company_id: string; }; - + imageDisplay: any=[]; covid19QuesForm:FormGroup; // temlateQues:any // `{ @@ -76,8 +76,9 @@ export class QueriesDocsComponent implements OnInit { this.fk_pd_type = this.pd_all_details.pdmaster_details.fk_pd_type; this.image_doc_params={pdid:this.pdid,form_id:this.form_id,company_id:''} console.log('image_doc_params',this.image_doc_params) - + } + @ViewChild('autosize') autosize: CdkTextareaAutosize; ngOnInit() { @@ -90,7 +91,8 @@ export class QueriesDocsComponent implements OnInit { common_remarks:[''], addtional_requirements:this.fb.array([this.createview()]) }) - this.getFullPD(); + // this.getFullPD(); + this.getPDImages(); this.getCovidQuesTemplate() } @@ -117,6 +119,36 @@ export class QueriesDocsComponent implements OnInit { } } // }) + } + getPDImages(){ + + //FOR RETRIEVING PICTURES + this.imageDisplay=[] + + //let record_for_pic = {'pd_id':this.pdid,'form_id':this.form_id,'company_id':null} + + this._pd.retriveFile(this.pdid,"24",null).subscribe(val=>{ + if(!val['msg']){ + if(val['records'].length>0){ + val['records'].forEach(result=>{ + console.log('tyeetwqty'); + console.log(result) + this.imageDisplay.push({'image':result.doc_url,'Name':result.pd_document_title,'option':'dummy','is_show_report': result.is_show_report == null ? 0 : result.is_show_report }) + let img_title = (result.pd_document_title).split('('); + if(img_title[0] == 'Approach to PD Location '||img_title[0] == 'address_proof_visited'){ + // this.AppxPDLocationImgValid = true; + //this.imageDisplay = this.imageDisplay.filter (value=>value.is_show_report != 0 && value.name.split('(')[0] != 'Approach to PD Location ') + } + + }) + + } + + } + + }) + this.getFullPD() + } getFullPD(){ @@ -200,6 +232,24 @@ export class QueriesDocsComponent implements OnInit { this.docsCollectedForm.patchValue(retrieved_data) } + else + { + console.log(this.imageDisplay); + this.docsCollectedForm.controls.docs_to_be_sighted['controls'].forEach(item=> { + + let dataimage=this.imageDisplay.filter(val=>val.Name==item.value.placeholder) + + if(dataimage.length>0) + { + dataimage.reverse() + item.addControl('img',new FormControl('')) + item.addControl('is_new',new FormControl('1')) + item.controls.img.setValue(dataimage[0].image) + item.controls[item.value.control_name].setValue('yes') + } + }); + this.docsCollectedForm.value; + } if(this.pd_all_details.pdmaster_details.fk_pd_type == '2' && this.pd_all_details.pdmaster_details.curr_vendor_ans_fetch_status == '0') { console.log(this.pd_all_details.pdmaster_details.vendor_status); setTimeout(()=>{