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 b662b2995..fff02c6d4 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
@@ -77,7 +77,7 @@ export class GeneralInfoComponent implements OnInit {
this.disableAfterSubmit = false;
}
/********************** Constructor Section Ends Here ****************/
-
+ documentsAndFilesList: any = [];
/** ng Oninit Section */
ngOnInit() {
let get_max_date = this.pd_all_details.pdmaster_details.pd_date_of_initiation ? this.pd_all_details.pdmaster_details.pd_date_of_initiation.split('/').reverse().join("/") : '';
@@ -114,7 +114,28 @@ export class GeneralInfoComponent implements OnInit {
this.CompanySource.data = ComapnyControl.controls;
});
- }
+ this._pd.retriveFile(this.pdid,'18',null).subscribe(data => {
+ console.log(data);
+ if (data.status == 200) {
+ if(data.records.length>0){
+ data.records.forEach((val, index) => {
+ let splitted = val.pd_document_name.split(".");
+ let DocumentsAndFiles = {
+ 'document_name': val.pd_document_name,
+ 'document_title': val.pd_document_title,
+ 'document': val.doc_url,
+ 'document_type' : splitted[1] == 'pdf'?'pdf':'image'
+ }
+ this.documentsAndFilesList.push(DocumentsAndFiles);
+ });
+ }
+ }
+ else{
+ this.documentsAndFilesList = [];
+ }
+ console.log('this.documentsAndFilesList',this.documentsAndFilesList);
+ });
+}
/***************************** ng Oninit Section Ends Here **********************************/
/** init form */
@@ -307,14 +328,14 @@ export class GeneralInfoComponent implements OnInit {
// create companies
if (element.company_name != '' && element.company_name != null) {
- let setCompanyValues: any = { company_order_id: companyControl.controls.length + 1, company_name: element.company_name, is_company_applicant: element.is_company_applicant, business_entity_type: element.business_entity_type, business_entity_type_other: element.business_entity_type_other, business_years: element.business_years, business_month: element.business_month, business_date_object: element.business_date_object, is_new: element.is_new, is_active: true }
+ let setCompanyValues: any = { company_order_id: companyControl.controls.length + 1, company_name: element.company_name, is_company_applicant: element.is_company_applicant, business_entity_type: element.business_entity_type, business_entity_type_other: element.business_entity_type_other, business_years: element.business_years, business_month: element.business_month, business_date_object: element.business_date_object, is_new: element.is_new, is_active: true, associate_pd_id:this.pdid }
companyControl.push(this.createCompanies(setCompanyValues))
}
});
companyWithRelationshipsControl.push(this.createCompaniesRelationship());
// check company if null update one row
if (companyControl.controls.length == 0) {
- let setCompanyValues: any = { company_order_id: companyControl.controls.length + 1, company_name: '', is_company_applicant: false, business_entity_type: '', business_entity_type_other: '', business_years: '', business_month: '', business_date_object: '', is_active: true, is_new: false }
+ let setCompanyValues: any = { company_order_id: companyControl.controls.length + 1, company_name: '', is_company_applicant: false, business_entity_type: '', business_entity_type_other: '', business_years: '', business_month: '', business_date_object: '', is_active: true, is_new: false, associate_pd_id:this.pdid}
companyControl.push(this.createCompanies(setCompanyValues))
}
@@ -367,7 +388,7 @@ export class GeneralInfoComponent implements OnInit {
business_date_object: [elementValue.business_date_object],
is_active: [elementValue.is_active],
is_new: [elementValue.is_new],
-
+ associate_pd_id:[this.pdid]
});
}
@@ -811,5 +832,27 @@ export class GeneralInfoComponent implements OnInit {
});
}
/******************* validate all form group and form array fields ENd Here ********/
-
+ pdf(fileURL){
+ window.open(fileURL);
+}
+/** For DOCS Tab */
+public viewerOptions: any = {
+ navbar: false,
+ toolbar: {
+ zoomIn: 4,
+ zoomOut: 4,
+ oneToOne: 4,
+ reset: 4,
+ prev: 4,
+ play: {
+ show: 4,
+ size: 'large',
+ },
+ next: 4,
+ rotateLeft: 4,
+ rotateRight: 4,
+ flipHorizontal: 4,
+ flipVertical: 4,
+ }
+};
}
\ No newline at end of file
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/lender-representative/lender-representative.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/lender-representative/lender-representative.component.html
index 97fbe3fa9..5f4977e9c 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/lender-representative/lender-representative.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/lender-representative/lender-representative.component.html
@@ -63,49 +63,13 @@
-
-
-
+
+ 0; else noFiles">
-
-
+
-
-
-
-
-
@@ -113,99 +77,27 @@
-
-
+
+
+ No Files
+
+
+
+
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/lender-representative/lender-representative.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/lender-representative/lender-representative.component.ts
index 830e70cdd..c4e153422 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/lender-representative/lender-representative.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/lender-representative/lender-representative.component.ts
@@ -59,6 +59,9 @@ export class LenderRepresentativeComponent implements OnInit {
// setAutohide = true;
// autoHide = 1000000;
// addExtraClass = false;
+ pdf(fileURL){
+ window.open(fileURL);
+ }
public viewerOptions: any = {
navbar: false,
toolbar: {
@@ -85,6 +88,7 @@ export class LenderRepresentativeComponent implements OnInit {
// config.panelClass = this.addExtraClass ? ['party'] : null;
// this.snackBar.open(this.message, this.action && this.actionButtonLabel, config);
// }
+ documentsAndFilesList: any = [];
ngOnInit() {
// this.message.main_applicant = this.main_applicant;
// this.message.lender_applicant_id = this.lender_applicant_id;
@@ -116,6 +120,25 @@ export class LenderRepresentativeComponent implements OnInit {
// control.push(this.createLRDetail());
// }
})
+ this._pd.retriveFile(this.pdid,this.form_id,'null').subscribe(data => {
+ if (data.status == 200) {
+ if(data.records.length>0){
+ data.records.forEach((val, index) => {
+ let splitted = val.pd_document_name.split(".");
+ let DocumentsAndFiles = {
+ 'document_name': val.pd_document_name,
+ 'document_title': val.pd_document_title,
+ 'document': val.doc_url,
+ 'document_type' : splitted[1] == 'pdf'?'pdf':'image'
+ }
+ this.documentsAndFilesList.push(DocumentsAndFiles);
+ });
+ }
+ }
+ else{
+ this.documentsAndFilesList = [];
+ }
+ });
}
public initRepresentative(): void {
this.representativeForm = this.fb.group({
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html
index df9040d81..b659840bb 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html
@@ -231,49 +231,13 @@
-
-
-
+
+ 0; else noFiles">
-
-
+
-
-
-
-
-
@@ -281,100 +245,27 @@
-
-
-
+
+
+ No Files
+
+
+
+
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts
index 69ef3c7ab..3f48ff128 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.ts
@@ -108,7 +108,7 @@ export class LoanDetailsComponent implements OnInit {
this.isContribution = true;
}
}
-
+ documentsAndFilesList: any = [];
/** init Fns */
ngOnInit() {
this.initloanDetailsForm();
@@ -310,6 +310,25 @@ export class LoanDetailsComponent implements OnInit {
this.loanDetailsForm.controls['owner_name'].updateValueAndValidity();
}
+ this._pd.retriveFile(this.pdid,this.form_id,'null').subscribe(data => {
+ if (data.status == 200) {
+ if(data.records.length>0){
+ data.records.forEach((val, index) => {
+ let splitted = val.pd_document_name.split(".");
+ let DocumentsAndFiles = {
+ 'document_name': val.pd_document_name,
+ 'document_title': val.pd_document_title,
+ 'document': val.doc_url,
+ 'document_type' : splitted[1] == 'pdf'?'pdf':'image'
+ }
+ this.documentsAndFilesList.push(DocumentsAndFiles);
+ });
+ }
+ }
+ else{
+ this.documentsAndFilesList = [];
+ }
+ });
}
getM_EndUseofLoad() {
@@ -865,7 +884,9 @@ export class LoanDetailsComponent implements OnInit {
})
}
-
+ pdf(fileURL){
+ window.open(fileURL);
+ }
/** For DOCS tab */
public viewerOptions: any = {
navbar: false,
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.html
index d16a60612..fd6b31111 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/neighbour-hood/neighbour-hood.component.html
@@ -220,6 +220,42 @@
+
+
+ 0; else noFiles">
+
+
+
+
+
+
+
+ picture_as_pdf
+ {{doc.document_title}}
+
+
+
+
+
+
+
+
+
+ No Files
+
+
+
+
+
+ picture_as_pdf
+ {{doc.document_title}}
+
-
-
-
-
-
-
-
-
-
-
+
+
+ No Files
+
+
+
+
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.ts
index 701f634e4..24246a164 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.ts
@@ -79,7 +79,9 @@ export class OtherIncomeComponent implements OnInit {
this.applicants = this.applicants.filter(val => val.applicant_type == 0 || val.applicant_type == 1);
this.applicants.push({ 'pd_co_applicant_id': '0', 'applicant_name': 'Others' });
}
-
+ pdf(fileURL){
+ window.open(fileURL);
+ }
public viewerOptions: any = {
navbar: false,
toolbar: {
@@ -99,6 +101,7 @@ export class OtherIncomeComponent implements OnInit {
flipVertical: 4,
}
};
+ documentsAndFilesList: any = [];
ngOnInit() {
this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data => {
if (data.dataStatus) {
@@ -167,6 +170,25 @@ export class OtherIncomeComponent implements OnInit {
//control.push(this.createDetail());
}
})
+ this._pd.retriveFile(this.pdid,this.form_id,'null').subscribe(data => {
+ if (data.status == 200) {
+ if(data.records.length>0){
+ data.records.forEach((val, index) => {
+ let splitted = val.pd_document_name.split(".");
+ let DocumentsAndFiles = {
+ 'document_name': val.pd_document_name,
+ 'document_title': val.pd_document_title,
+ 'document': val.doc_url,
+ 'document_type' : splitted[1] == 'pdf'?'pdf':'image'
+ }
+ this.documentsAndFilesList.push(DocumentsAndFiles);
+ });
+ }
+ }
+ else{
+ this.documentsAndFilesList = [];
+ }
+ });
}
public initOtherincomeForm(): void {
this.otherIncomeForm = this.fb.group({
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html
index dc2619111..457bdd21b 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html
@@ -385,55 +385,13 @@
-
-
-
+
+ 0; else noFiles">
-
-
+
-
-
-
-
-
@@ -441,99 +399,27 @@
-
-
+
+
+ No Files
+
+
+
+
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts
index 4a332126a..71cee6742 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.ts
@@ -73,7 +73,9 @@ export class StockComponent implements OnInit {
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
}
-
+ pdf(fileURL){
+ window.open(fileURL);
+}
/** CSS For Docs Testing */
public viewerOptions: any = {
navbar: false,
@@ -94,7 +96,7 @@ export class StockComponent implements OnInit {
flipVertical: 4,
}
};
-
+ documentsAndFilesList: any = [];
ngOnInit() {
this._pd.getProductsFromBusinessAndSupplier(this.pdid, this.company_id).subscribe(data => {
@@ -122,7 +124,26 @@ export class StockComponent implements OnInit {
this.getUOM();
- }
+ this._pd.retriveFile(this.pdid,this.form_id,this.company_id).subscribe(data => {
+ if (data.status == 200) {
+ if(data.records.length>0){
+ data.records.forEach((val, index) => {
+ let splitted = val.pd_document_name.split(".");
+ let DocumentsAndFiles = {
+ 'document_name': val.pd_document_name,
+ 'document_title': val.pd_document_title,
+ 'document': val.doc_url,
+ 'document_type' : splitted[1] == 'pdf'?'pdf':'image'
+ }
+ this.documentsAndFilesList.push(DocumentsAndFiles);
+ });
+ }
+ }
+ else{
+ this.documentsAndFilesList = [];
+ }
+ });
+}
public initstockForms(record) {
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html
index 5b3e0661e..c9a3a3f83 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html
@@ -13,6 +13,9 @@