-
+
+
+
+
+ edit
+
+
+
{{doc.document_title}}
-
- edit
-
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.scss
index f4b60c55c..e3b05bc75 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.scss
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.scss
@@ -107,4 +107,10 @@ $product-bg-color-hover: rgba(103, 58, 183, 0.7);
// width: 10px;
// background: #62B013;
// color: white;
-// }
\ No newline at end of file
+// }
+
+.top .thumbnail .date {
+ position: absolute;
+ top: 4px;
+ right: -10px;
+}
\ No newline at end of file
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts
index 95369ac7e..85f6d15a9 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts
@@ -106,6 +106,7 @@ export class AddressComponent implements OnInit {
params.pd_id = this.pdid;
params.pd_form_id = '5';
this.setAddressFromDatas(params);
+ this.retriveFile();
}
loadPDAddressesDetails() {
@@ -603,12 +604,16 @@ export class AddressComponent implements OnInit {
imageCrop(pic) {
// let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
+ pic.pdid = this.pdid;
const imageRef = this.dialog.open(ImageCropComponent, {
data: pic,
});
imageRef.afterClosed()
.subscribe(dataresult => {
- console.log(dataresult);
+ if(dataresult == 1){
+ this.documentsAndFilesList = [];
+ this.retriveFile();
+ }
});
}
@@ -773,18 +778,23 @@ export class AddressComponent implements OnInit {
// else {
// control.push(this.createAddresses(null));
// }
- });
+ });
+ }
+ retriveFile(){
this._pd.retriveFile(this.pdid, '5', 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_id':val.pd_document_id,
'document_name': val.pd_document_name,
'document_title': val.pd_document_title,
'document': val.doc_url,
- 'document_type': splitted[1] == 'pdf' ? 'pdf' : 'image'
+ 'document_type': splitted[1] == 'pdf' ? 'pdf' : 'image',
+ 'is_show_report':val.is_show_report
}
this.documentsAndFilesList.push(DocumentsAndFiles);
});
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.html
index 73d1418f8..a426a5610 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.html
@@ -111,7 +111,7 @@
-->
-
+
+
+ 0; else noFiles">
+
+
+
+
+
+
+
+
+
+ edit
+
+
+
+
{{doc.document_title}}
+
+
+
+
+
+
+
+
+
+
+
+ picture_as_pdf
+ {{doc.document_title}}
+
+
+
+
+
+
+
+
+
+
+ No Files
+
+
+
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.scss
index 331460801..1ed1b32e2 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.scss
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.scss
@@ -172,4 +172,8 @@
// }
-
\ No newline at end of file
+ .top .thumbnail .date {
+ position: absolute;
+ top: 4px;
+ right: -10px;
+}
\ No newline at end of file
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.ts
index 69b552d4c..1f3c8ca3f 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assessed-income/assessed-income.component.ts
@@ -6,6 +6,7 @@ import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
import { ActivatedRoute, Router } from "@angular/router";
import { ConfirmAiDetailsComponent } from "./confirm-ai-details/confirm-ai-details.component";
import { RupeeCurrencyFormatPipe } from './../../../../../pd-pipes/rupee-currency-format.pipe';
+import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component';
@Component({
selector: 'app-assessed-income',
@@ -57,6 +58,7 @@ public salesDeclaredCustomer: any=[];
public getCustomValues:any = { UOMList: this.UOMList,frequencyList: this.frequencyList,businessExpenseList: this.businessExpenseList,businessIncomeList:this.businessIncomeList,pdid:'',company_id:'',grossProfitTypeList:this.grossProfitTypeList,salesDeclaredCustomer:this.salesDeclaredCustomer};
DailyPurchaseComponent:boolean;
PurchaseComponent:boolean;
+ documentsAndFilesList: any;
//public finalData: any;
constructor(notifier: NotifierService, private route: ActivatedRoute,
private router: Router,
@@ -382,4 +384,45 @@ public viewerOptions: any = {
});
}
+
+ imageCrop(pic) {
+ // let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
+ pic.pdid = this.pdid;
+ const imageRef = this.dialog.open(ImageCropComponent, {
+ data: pic,
+ });
+ imageRef.afterClosed()
+ .subscribe(dataresult => {
+ if(dataresult == 1){
+ this.documentsAndFilesList = [];
+ this.retriveFile();
+ }
+ });
+ }
+
+ retriveFile(){
+
+ this._pd.retriveFile(this.pdid, '16', 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_id':val.pd_document_id,
+ 'document_name': val.pd_document_name,
+ 'document_title': val.pd_document_title,
+ 'document': val.doc_url,
+ 'document_type': splitted[1] == 'pdf' ? 'pdf' : 'image',
+ 'is_show_report':val.is_show_report
+ }
+ this.documentsAndFilesList.push(DocumentsAndFiles);
+ });
+ }
+ }
+ else {
+ this.documentsAndFilesList = [];
+ }
+ });
+}
}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html
index b7aeee00b..e93e236df 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.html
@@ -430,40 +430,53 @@
- 0; else noFiles">
-
-
-
-
-
-
-
{{doc.document_title}}
+
0; else noFiles">
+
+
+
+
+
+
+
+
+
+ edit
+
+
+
+
{{doc.document_title}}
+
+
-
-
-
-
-
-
-
- picture_as_pdf
- {{doc.document_title}}
-
-
+
+
+
+
+
+
+ picture_as_pdf
+ {{doc.document_title}}
+
+
+
-
-
- No Files
-
-
+
+ No Files
+
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.scss
index 0f22c49b9..f7000adb6 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.scss
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.scss
@@ -14,6 +14,12 @@
::ng-deep .cdk-global-overlay-wrapper{
justify-content: center !important;
}
+
+.top .thumbnail .date {
+ position: absolute;
+ top: 4px;
+ right: -10px;
+}
mat-form-field {
margin: 0 2%;
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts
index 5156b9bc4..fcc3a03a6 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/assets-info/assets-info.component.ts
@@ -24,6 +24,7 @@ import {
/** Service */
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
import { element } from '@angular/core/src/render3/instructions';
+import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component';
@Component({
selector: 'app-assets-info',
templateUrl: './assets-info.component.html',
@@ -73,6 +74,7 @@ export class AssetsInfoComponent implements OnInit {
notifier: NotifierService,
private _formBuilder: FormBuilder,
private pdTrigerService: PdTrigerService,
+ private dialog: MatDialog,
private dialogRef: MatDialogRef
,
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id;
@@ -147,26 +149,7 @@ export class AssetsInfoComponent implements OnInit {
this.getM_Vehicle_Type();
this.getM_UOM_Type();
- this.pdTrigerService.retriveFile(this.pdid,'4',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 = [];
- }
- });
-
+ this.retriveFile();
}
pdf(fileURL){
window.open(fileURL);
@@ -988,11 +971,50 @@ export class AssetsInfoComponent implements OnInit {
}
});
}
+ imageCrop(pic) {
+ // let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
+ pic.pdid = this.pdid;
+ const imageRef = this.dialog.open(ImageCropComponent, {
+ data: pic,
+ });
+ imageRef.afterClosed()
+ .subscribe(dataresult => {
+ if(dataresult == 1){
+ this.documentsAndFilesList = [];
+ this.retriveFile();
+ }
+ });
+}
+retriveFile(){
+ this.pdTrigerService.retriveFile(this.pdid,'4',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_id':val.pd_document_id,
+ 'document_name': val.pd_document_name,
+ 'document_title': val.pd_document_title,
+ 'document': val.doc_url,
+ 'document_type': splitted[1] == 'pdf' ? 'pdf' : 'image',
+ 'is_show_report':val.is_show_report
+ }
+ this.documentsAndFilesList.push(DocumentsAndFiles);
+ });
+ }
+ }
+ else {
+ this.documentsAndFilesList = [];
+ }
+ });
+}
}
+
+
// {id: "4", name: "Equipments and machinaries", isactive: "1", flag: "1", is_others: "0"}
// {id: "7", name: "Investments", isactive: "1", flag: "0", is_others: "0"}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html
index 4ec73f682..1a8e552a8 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.html
@@ -220,42 +220,55 @@
- 0; else noFiles">
-
-
-
-
-
-
-
{{doc.document_title}}
+
0; else noFiles">
+
+
+
+
+
+
+
+
+
+ edit
+
+
+
+
{{doc.document_title}}
+
+
-
-
-
-
-
-
-
- picture_as_pdf
- {{doc.document_title}}
-
-
+
+
+
+
+
+
+ picture_as_pdf
+ {{doc.document_title}}
+
+
+
-
-
- No Files
-
-
+
+ No Files
+
+
-
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.scss
index 5570024d9..7b44ae4b0 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.scss
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.scss
@@ -11,7 +11,11 @@
.mat-form-field-appearance-legacy .mat-hint{
color:rgba(0, 0, 0, 0.8) !important;
}
-
+.top .thumbnail .date {
+ position: absolute;
+ top: 4px;
+ right: -10px;
+}
::ng-deep .cdk-global-overlay-wrapper{
justify-content: center !important;
}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts
index b10703a30..935535f15 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/banking-details/banking-details.component.ts
@@ -22,6 +22,7 @@ import {
/** Service */
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
import { ActivatedRoute, Router } from "@angular/router";
+import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component';
@Component({
selector: 'app-banking-details',
templateUrl: './banking-details.component.html',
@@ -53,6 +54,7 @@ export class BankingDetailsComponent implements OnInit {
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
private router: Router,
private _pd: PdTrigerService,
+ private dialog: MatDialog,
private dialogRef: MatDialogRef
,
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id;
@@ -162,25 +164,7 @@ export class BankingDetailsComponent implements OnInit {
}
});
- this._pd.retriveFile(this.pdid,'7',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 = [];
- }
- });
+ this.retriveFile();
}
@@ -400,4 +384,42 @@ export class BankingDetailsComponent implements OnInit {
window.open(fileURL);
}
+ imageCrop(pic) {
+ // let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
+ pic.pdid = this.pdid;
+ const imageRef = this.dialog.open(ImageCropComponent, {
+ data: pic,
+ });
+ imageRef.afterClosed()
+ .subscribe(dataresult => {
+ if(dataresult == 1){
+ this.documentsAndFilesList = [];
+ this.retriveFile();
+ }
+ });
+ }
+ retriveFile(){
+ this._pd.retriveFile(this.pdid,'7',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_id':val.pd_document_id,
+ 'document_name': val.pd_document_name,
+ 'document_title': val.pd_document_title,
+ 'document': val.doc_url,
+ 'document_type': splitted[1] == 'pdf' ? 'pdf' : 'image',
+ 'is_show_report':val.is_show_report
+ }
+ this.documentsAndFilesList.push(DocumentsAndFiles);
+ });
+ }
+ }
+ else {
+ this.documentsAndFilesList = [];
+ }
+ });
+ }
+
}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.html
index 83dee25eb..f7f6f4162 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.html
@@ -458,45 +458,55 @@
-
- 0; else noFiles">
-
-
-
-
-
-
-
{{doc.document_title}}
-
-
-
-
-
-
-
-
-
-
-
picture_as_pdf
-
{{doc.document_title}}
-
+
+ 0; else noFiles">
+
+
+
+
+
+
+
+
+
+ edit
+
+
+
+
{{doc.document_title}}
+
+
+
+
+
+
+
+
+
+
+
+ picture_as_pdf
+ {{doc.document_title}}
+
+
+
+
+
-
-
-
-
-
-
- No Files
-
+
+
+ No Files
+
+
-
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.scss
index 1387488cf..8f15fc429 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.scss
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.scss
@@ -14,7 +14,11 @@
::ng-deep .cdk-global-overlay-wrapper{
justify-content: center !important;
}
-
+.top .thumbnail .date {
+ position: absolute;
+ top: 4px;
+ right: -10px;
+}
.matcard mat-form-field {
margin: 0 2%;
height: 105px !important;
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.ts
index 0d605734c..900b5e65c 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.ts
@@ -8,6 +8,7 @@ import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
/** Service */
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
+import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component';
@Component({
selector: 'app-business-assets-info',
@@ -70,6 +71,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
private _formBuilder: FormBuilder,
private pdTrigerService: PdTrigerService,
private dialogRef: MatDialogRef
,
+ private dialog: MatDialog,
@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;
@@ -124,27 +126,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
this.getM_Address_Type();
this.getM_Vehicle_Type();
this.getM_Address_Type();
-
- this.pdTrigerService.retriveFile(this.pdid, '22', 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 = [];
- }
- });
-
+ this.retriveFile();
}
/** init Function Ends Here */
@@ -1164,6 +1146,43 @@ export class BusinessAssetsInfoComponent implements OnInit {
pdf(fileURL) {
window.open(fileURL);
}
+ imageCrop(pic) {
+ // let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
+ pic.pdid = this.pdid;
+ const imageRef = this.dialog.open(ImageCropComponent, {
+ data: pic,
+ });
+ imageRef.afterClosed()
+ .subscribe(dataresult => {
+ if(dataresult == 1){
+ this.documentsAndFilesList = [];
+ this.retriveFile();
+ }
+ });
+}
+retriveFile(){
+ this.pdTrigerService.retriveFile(this.pdid, '22', 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_id':val.pd_document_id,
+ 'document_name': val.pd_document_name,
+ 'document_title': val.pd_document_title,
+ 'document': val.doc_url,
+ 'document_type': splitted[1] == 'pdf' ? 'pdf' : 'image',
+ 'is_show_report':val.is_show_report
+ }
+ this.documentsAndFilesList.push(DocumentsAndFiles);
+ });
+ }
+ }
+ else {
+ this.documentsAndFilesList = [];
+ }
+ });
+}
/** For Docs Tab */
public viewerOptions: any = {
navbar: false,
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.html
index 9f4a99856..1960956d0 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.html
@@ -148,44 +148,58 @@
+
- 0; else noFiles">
-
-
-
-
-
-
-
{{doc.document_title}}
+
0; else noFiles">
+
+
+
+
+
+
+
+
+
+ edit
+
+
+
+
{{doc.document_title}}
+
+
-
-
-
-
-
-
-
- picture_as_pdf
- {{doc.document_title}}
-
-
+
+
+
+
+
+
+ picture_as_pdf
+ {{doc.document_title}}
+
+
+
-
-
- No Files
-
-
+
+ No Files
+
+
-
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.scss
index edb0c1f7a..4433ec98b 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.scss
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.scss
@@ -11,7 +11,11 @@
.mat-form-field-appearance-legacy .mat-hint{
color:rgba(0, 0, 0, 0.8) !important;
}
-
+ .top .thumbnail .date {
+ position: absolute;
+ top: 4px;
+ right: -10px;
+}
::ng-deep .cdk-global-overlay-wrapper{
justify-content: center !important;
}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.ts
index b45d0f232..e3e89ae6a 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-banking-details/business-banking-details.component.ts
@@ -22,6 +22,7 @@ import {
/** Service */
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
import { ActivatedRoute, Router } from "@angular/router";
+import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component';
@Component({
selector: 'app-business-banking-details',
@@ -60,6 +61,7 @@ export class BusinessBankingDetailsComponent implements OnInit {
private router: Router,
private _pd: PdTrigerService,
private dialogRef: MatDialogRef
,
+ private dialog: MatDialog,
@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;
@@ -161,25 +163,7 @@ export class BusinessBankingDetailsComponent implements OnInit {
control.push(this.createBankarray());
}
});
- this._pd.retriveFile(this.pdid,'21',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 = [];
- }
- });
+ this.retriveFile();
}
// ======================
@@ -441,5 +425,41 @@ export class BusinessBankingDetailsComponent implements OnInit {
}
-
+ imageCrop(pic) {
+ // let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
+ pic.pdid = this.pdid;
+ const imageRef = this.dialog.open(ImageCropComponent, {
+ data: pic,
+ });
+ imageRef.afterClosed()
+ .subscribe(dataresult => {
+ if(dataresult == 1){
+ this.documentsAndFilesList = [];
+ this.retriveFile();
+ }
+ });
+ }
+ retriveFile(){
+ this._pd.retriveFile(this.pdid,'21',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_id':val.pd_document_id,
+ 'document_name': val.pd_document_name,
+ 'document_title': val.pd_document_title,
+ 'document': val.doc_url,
+ 'document_type': splitted[1] == 'pdf' ? 'pdf' : 'image',
+ 'is_show_report':val.is_show_report
+ }
+ this.documentsAndFilesList.push(DocumentsAndFiles);
+ });
+ }
+ }
+ else {
+ this.documentsAndFilesList = [];
+ }
+ });
+ }
}
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 9e0093c6e..cb63fd4e5 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
@@ -1856,43 +1856,56 @@
-
- 0; else noFiles">
-
-
-
-
-
-
-
{{doc.document_title}}
+
+ 0; else noFiles">
+
+
+
+
+
+
+
+
+
+ edit
+
+
+
+
{{doc.document_title}}
+
+
+
+
+
+
+
+
+
+
+
+ picture_as_pdf
+ {{doc.document_title}}
+
+
+
+
-
-
-
-
-
-
- picture_as_pdf
- {{doc.document_title}}
-
-
-
-
-
-
-
-
-
+
- No Files
+ No Files
-
-
-
+
+
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.scss
index 3be5ad67b..7d2c3e20e 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.scss
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.scss
@@ -14,6 +14,11 @@
margin: 0 2%;
width: 40%;
}
+.top .thumbnail .date {
+ position: absolute;
+ top: 4px;
+ right: -10px;
+}
.matcard mat-form-field {
margin: 0 2%;
width: 40%;
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 282ca9355..3783a5ee2 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
@@ -25,6 +25,7 @@ import { ActivatedRoute, Router } from "@angular/router";
import { DatePipe } from '@angular/common';
/**sweet alert */
import Swal from 'sweetalert2';
+import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component';
@Component({
selector: 'app-business-info',
templateUrl: './business-info.component.html',
@@ -640,27 +641,7 @@ export class BusinessInfoComponent implements OnInit {
val.toUpperCase() == 'YES' ? this.businessForm.addControl('month_of_business_run', new FormControl('', Validators.required)) : this.businessForm.removeControl('month_of_business_run');
});
-
- 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 = [];
- }
- });
-
+ this.retriveFile();
}
public initBusinessForm(): void {
this.businessForm = this.fb.group({
@@ -1986,5 +1967,41 @@ export class BusinessInfoComponent implements OnInit {
if(Flag == 8) {event.value =='yes' ? this.businessForm.addControl('fire_noc_pic', new FormControl('')) : this.businessForm.removeControl('fire_noc_pic');}
}
-
+ imageCrop(pic) {
+ // let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
+ pic.pdid = this.pdid;
+ const imageRef = this.dialog.open(ImageCropComponent, {
+ data: pic,
+ });
+ imageRef.afterClosed()
+ .subscribe(dataresult => {
+ if(dataresult == 1){
+ this.documentsAndFilesList = [];
+ this.retriveFile();
+ }
+ });
+ }
+ retriveFile(){
+ 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_id':val.pd_document_id,
+ 'document_name': val.pd_document_name,
+ 'document_title': val.pd_document_title,
+ 'document': val.doc_url,
+ 'document_type': splitted[1] == 'pdf' ? 'pdf' : 'image',
+ 'is_show_report':val.is_show_report
+ }
+ this.documentsAndFilesList.push(DocumentsAndFiles);
+ });
+ }
+ }
+ else {
+ this.documentsAndFilesList = [];
+ }
+ });
+ }
}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html
index a9af371d7..501e32090 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html
@@ -433,42 +433,55 @@
- 0; else noFiles">
-
-
-
-
-
-
-
{{doc.document_title}}
+
0; else noFiles">
+
+
+
+
+
+
+
+
+
+ edit
+
+
+
+
{{doc.document_title}}
+
+
-
-
-
-
-
-
-
- picture_as_pdf
- {{doc.document_title}}
-
-
+
+
+
+
+
+
+ picture_as_pdf
+ {{doc.document_title}}
+
+
+
-
-
- No Files
-
-
+
+ No Files
+
+
-
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.scss
index c76eb4f93..92315ddd2 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.scss
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.scss
@@ -11,6 +11,11 @@
::ng-deep .cdk-global-overlay-wrapper{
justify-content: center !important;
}
+.top .thumbnail .date {
+ position: absolute;
+ top: 4px;
+ right: -10px;
+}
mat-form-field {
margin: 0 2%;
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts
index 89b7e278f..b563a688b 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.ts
@@ -24,6 +24,7 @@ import {
} from '@angular/material';
/** Service */
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
+import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component';
@Component({
selector: 'app-client-info',
templateUrl: './client-info.component.html',
@@ -82,6 +83,7 @@ export class ClientInfoComponent implements OnInit {
notifier: NotifierService,
private _formBuilder: FormBuilder,
private pdTrigerService: PdTrigerService,
+ private dialog: MatDialog,
@Inject(MAT_DIALOG_DATA) public pd_all_details: any, private dialogRef: MatDialogRef
) {
this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id;
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
@@ -184,26 +186,7 @@ export class ClientInfoComponent implements OnInit {
// this.getPdSupplierFormDetails();
this.getMasterDetails('COMPANYRELATIONSHIPS', 1);
this.getMasterDetails('TITLES', 2);
-
- this.pdTrigerService.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 = [];
- }
- });
+ this.retriveFile();
}
// retaildTradingForm: Boolean = false;
@@ -785,4 +768,41 @@ export class ClientInfoComponent implements OnInit {
}
});
}
+imageCrop(pic) {
+ // let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
+ pic.pdid = this.pdid;
+ const imageRef = this.dialog.open(ImageCropComponent, {
+ data: pic,
+ });
+ imageRef.afterClosed()
+ .subscribe(dataresult => {
+ if(dataresult == 1){
+ this.documentsAndFilesList = [];
+ this.retriveFile();
+ }
+ });
+}
+retriveFile(){
+ this.pdTrigerService.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_id':val.pd_document_id,
+ 'document_name': val.pd_document_name,
+ 'document_title': val.pd_document_title,
+ 'document': val.doc_url,
+ 'document_type': splitted[1] == 'pdf' ? 'pdf' : 'image',
+ 'is_show_report':val.is_show_report
+ }
+ this.documentsAndFilesList.push(DocumentsAndFiles);
+ });
+ }
+ }
+ else {
+ this.documentsAndFilesList = [];
+ }
+});
+}
}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html
index 0d0c7c008..c3df769b0 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.html
@@ -195,42 +195,55 @@
- 0; else noFiles">
-
-
-
-
-
-
-
{{doc.document_title}}
+
0; else noFiles">
+
+
+
+
+
+
+
+
+
+ edit
+
+
+
+
{{doc.document_title}}
+
+
-
-
-
-
-
-
-
- picture_as_pdf
- {{doc.document_title}}
-
-
+
+
+
+
+
+
+ picture_as_pdf
+ {{doc.document_title}}
+
+
+
-
-
- No Files
-
-
+
+ No Files
+
+
-
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.scss
index 720a1c506..24c30c736 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.scss
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.scss
@@ -24,6 +24,11 @@
color: #fff !important;
background-color: #e00201 !important;
}
+.top .thumbnail .date {
+ position: absolute;
+ top: 4px;
+ right: -10px;
+}
.my-mat-hint {
line-height: 1.2em;
transform: translateY(10px);
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.ts
index 57c83a18b..6406415ea 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/current-loan/current-loan.component.ts
@@ -10,6 +10,7 @@ import { MatDialog,MatDialogRef,MAT_DIALOG_DATA } from '@angular/material';
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
import { ActivatedRoute, Router } from "@angular/router";
+import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component';
@Component({
selector: 'app-current-loan',
@@ -48,6 +49,7 @@ export class CurrentLoanComponent implements OnInit {
private router: Router,
private _pd: PdTrigerService,
private dialogRef: MatDialogRef
,
+ private dialog: MatDialog,
@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;
@@ -378,26 +380,7 @@ export class CurrentLoanComponent implements OnInit {
});
}
})
-
- 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 = [];
- }
- });
+this.retriveFile();
}
checkTenure(details) {
let originalTenure = details.value.original_tenure;
@@ -677,7 +660,43 @@ export class CurrentLoanComponent implements OnInit {
}
}
-
+ imageCrop(pic) {
+ // let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
+ pic.pdid = this.pdid;
+ const imageRef = this.dialog.open(ImageCropComponent, {
+ data: pic,
+ });
+ imageRef.afterClosed()
+ .subscribe(dataresult => {
+ if(dataresult == 1){
+ this.documentsAndFilesList = [];
+ this.retriveFile();
+ }
+ });
+ }
+ retriveFile(){
+ 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_id':val.pd_document_id,
+ 'document_name': val.pd_document_name,
+ 'document_title': val.pd_document_title,
+ 'document': val.doc_url,
+ 'document_type': splitted[1] == 'pdf' ? 'pdf' : 'image',
+ 'is_show_report':val.is_show_report
+ }
+ this.documentsAndFilesList.push(DocumentsAndFiles);
+ });
+ }
+ }
+ else {
+ this.documentsAndFilesList = [];
+ }
+ });
+ }
titleCaseWord(word:string) {
const unicodeWordMatch =
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/image-crop/image-crop.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/image-crop/image-crop.component.html
index 5f3579ee9..9a2e68abe 100644
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/image-crop/image-crop.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/image-crop/image-crop.component.html
@@ -2,7 +2,7 @@
crop_original
- {{this.data.document_title}}
+ {{doc_data.document_title}}
@@ -18,21 +18,31 @@
+
-
+
+
- Save
- Cancel
-
-
-
-
Preview - Cropped Image
+
Preview
+
Cancel
-
-
+
+
Preview - Cropped Image
+
+
+
+
Save
+
Cancel
+
+
+
+
+
+
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/image-crop/image-crop.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/image-crop/image-crop.component.ts
index b19a744cc..03d0ef664 100644
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/image-crop/image-crop.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dialogue/image-crop/image-crop.component.ts
@@ -8,7 +8,6 @@ import { Observable, Observer } from 'rxjs';
import { DomSanitizer, SafeResourceUrl, SafeUrl } from '@angular/platform-browser';
-
declare var $: any;
@Component({
@@ -23,65 +22,37 @@ export class ImageCropComponent implements OnInit, OnDestroy {
baseImage: any;
imagePath:any;
cropflag:boolean = false;
+ isBase64Image:boolean = false;
+ previewflag = false;
constructor( notifier: NotifierService,
private dialogRef: MatDialogRef
,
private sanitizer: DomSanitizer,
- private _pd: PdTrigerService,@Inject(MAT_DIALOG_DATA) public data: any) {
- this.notifier = notifier;
- }
-
- ngOnInit() {
-
- // let imageUrl = 'https://www.google.com/photos/about/static/images/google.svg';
-
-
- // this.imagePath = this.sanitizer.bypassSecurityTrustResourceUrl(this.data.document);
- this.imagePath = this.data.document;
-
- this.getBase64ImageFromURL(this.imagePath).subscribe(base64data => {
-
- this.base64Image = 'data:image/png;base64,' + base64data;
- });
-
- this.baseImage = this.base64Image;
- // this.baseImage = this.data.document;
+ private _pd: PdTrigerService,@Inject(MAT_DIALOG_DATA) public doc_data: any) {
+ console.log(this.doc_data);
+ this.notifier = notifier;
+ this._pd.getBase64ImageFromURL(this.doc_data.document).subscribe(base64 => {
+ if (base64.dataStatus) {
+ console.log(base64);
+ console.log('data:image/png;base64,'+base64.records);
+ this.baseImage = 'data:image/png;base64,'+base64.records;
+ this.isBase64Image = true;
+ }
+ });
}
- getBase64ImageFromURL(url: string) {
- return Observable.create((observer: Observer) => {
- let img = new Image();
- img.crossOrigin = 'Anonymous';
- img.src = url;
- if (!img.complete) {
- img.onload = () => {
- observer.next(this.getBase64Image(img));
- observer.complete();
- };
- img.onerror = (err) => {
- observer.error(err);
- };
- } else {
- observer.next(this.getBase64Image(img));
- observer.complete();
- }
- });
+ transform(){
+ return this.sanitizer.bypassSecurityTrustResourceUrl(this.baseImage);
}
- getBase64Image(img: HTMLImageElement) {
- var canvas = document.createElement("canvas");
- canvas.width = img.width;
- canvas.height = img.height;
- var ctx = canvas.getContext("2d");
- ctx.drawImage(img, 0, 0);
- var dataURL = canvas.toDataURL("image/png");
- console.log(dataURL);
- return dataURL.replace(/^data:image\/(png|jpg);base64,/, "");
+ ngOnInit() {
+ // this.baseImage = this.data.document;
}
- //baseImage
- Image = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMEAAAEFCAMAAABtknO4AAABhlBMVEX////oTD3m5uZMS01PTU8AAADy8vIgICA4OzYPM0egoI7/zMnoSzza29o2Nzb6+vpGRUdBQEIwMDGFhYbIycmxsbLp6enoRzfi4uLv7+/nQzLnRTT0//+bmYnV1dXxTj6oqJjAwMAXFxfJQTTnPiyzs7P98vGzOi+9uq7/0s/mIwvW8/T73tw6OjovLS/ZRzndzMl4d3hZWFrmNCIvMy31sKqWlZb/UDsREREAL0dkZGQAITvX5+b84+HbRznNzcOko6TpXVDraF0AFjTle3H0r6k2Pkrwj4b2u7Z/f3/RursAACSsPTPunZftdmspNjbgpJ4jJyHwlIzEYlnRf3lvbG4AITCmt7fhnJbrYVXoGgDszszeeGuSkourqKAVGxGGhntGNzjNTkMMMzajQjqOPzxsQ0ZcNTNpTU06SVSkTEaARUFMRU7etrHV/P1fZHApMkWSgYc0HTFXOURGOkq9lZXFqqlYb3q71NX7rKZQFRYAFS1kdoGBkJkAAB52O0MqVWNlhJCmctyFAAAgAElEQVR4nNVdi3/a2JVGICAZS0jiISHhEYMtSI0BG5hgm4BXEBzwJDAZdtnG4223nc60TdvspN1tp9mZNLv/+d6Hrl4IELIce0/m57FB3Hu+ex73nHMfRCJh0eT8aBpaY3dB1wzDKO/umoub0FShKEbauWs2ghM3kigAQenfNSOBCSOgCuO7ZiQwceMCRMBQ/3/16LFCYSFwd81JUNphGCQEqXbXnGxPXKVSiURqA4SAUuZ3zc/WdDCfXc0uKhFsyhRTuGuGNlH/3Xh+cVAx/35MKRIjKcP+BBsCpd1zWz6oKoWCommzSR+ZbGWAh16ZRSSsRtIIKNb1dWVTS3dFM8wwJSmD8Q7gkpsVjKGfvsNCYK5qkYmmzC7umtUVRBBAhWcG037kmjJeUaZXhi0/jgwlAPGemvREo0wCoZw27l8besRcjYgaVQoMjDAmd82sJ3Ezja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FrzQDFo2DRdBpJSm0/oa3sGYd5pwn3wa7SwW8O7nRUZXg9/KHC6CiApCTDczHNxvXoLrpkBdkg0B7igGzLe6zUxHL6k3vR4+ZATcJV/XbbyrpTJQF7TPL4XUBfCepsGgl7Oqx4Xb9wBBJBvj0x01qpZyOlD0GNRzrC50q9VdgEEvs/A0QBis3xKCSK4ea6Tr6QYgbKMCvbjs6LmsesM71FdR6Agi5ZihLfU6380ARWfFRLhfs+Sk8BFEEnpz0QSss2F+M9FqugUEgG5zzN10Owg+Jm2DgJwCCRqD3Q7ZEGwIB0qWDC5v8q0AoRLHXn7+wKT1C1lc17bNmG+q90GR5PLiKxuA1FdrE8SM7dEHDz7/ii7dOYZs93MHUw8e/PuarzXLt5zPPvj882aY34K2PSX0By7+AVNrKiVZ98Pg8Qfryuy3TVzzKw+W1iBg6eXnH3yufzSG3cRlPAA8iK+LXJpLIoMQwvkGrgCkewFoLBJ59p8Q/cxO6JV8KemFIGC9+cbEZTwGNB375JNPP/3Emz795LNfJVPLH2rdkUPiOssI0vVffLaCfUyf/arRWJJB0PrWjUldYqXe/Ww9AADhF6200wGn63c3Oas2VkD22uh+shEAgPDZp4s6PCOB2U+eBt6XFQbJnRYPZqXPQepdbzU/3cw+AfGLLjrXnhJazdLHSQBWUkIt64h+CcZ2pQm7CDz32We//GWunL3597eFRhy8aSz/AjkAAAAcSURBVCAK3ejPABZIn7oIv4rcKgsvG7itpPH/APV4xrQzYxA1AAAAAElFTkSuQmCC';
+
+
+
cropper: any;
cropImage: any;
// cropper: Cropper;
@@ -91,23 +62,6 @@ export class ImageCropComponent implements OnInit, OnDestroy {
ngAfterViewInit() {}
ngOnDestroy(): void {}
- // imageLoaded() {
- // this.cropper = new Cropper(this.input.nativeElement, {
- // viewMode: 3,
- // aspectRatio: 1 / 1,
- // dragMode: 'move',
- // modal: true,
- // guides: false,
- // highlight: true,
- // background: true,
- // autoCrop: true,
- // autoCropArea: 0.9,
- // responsive: true,
- // crop: (e:any) => {
- // console.log(e);
- // }
- // });
- // }
clickToCrop()
{
@@ -121,8 +75,7 @@ export class ImageCropComponent implements OnInit, OnDestroy {
crop:function(data)
{
// data.move(1, -1).rotate(45).scale(1, -1);
- that.cropper = data;
-
+ that.cropper = data;
},
getCroppedCanvas(datas)
{
@@ -136,10 +89,40 @@ export class ImageCropComponent implements OnInit, OnDestroy {
{
var cropcanvas = $('.container > img').cropper('getCroppedCanvas');
var croppng = cropcanvas.toDataURL("image/png") ;
+ console.log('croppedpng',croppng);
+ this.previewflag = true;
this.cropImage = croppng;
-
}
+
+ onSubmit(){
+ // // "fk_updatedby":"25",
+ let records: any = {
+ "pd_document_id": this.doc_data.document_id,
+ "pd_document_title": this.doc_data.document_title,
+ "pd_document_name": this.doc_data.document_name,
+ "is_show_report":this.doc_data.is_show_report,
+ "image": this.cropImage,
+ "fk_pd_id":this.doc_data.pdid
+ };
+
+ this._pd.updatePDPhoto(records).subscribe(
+ dataresult=>{
+ if (dataresult.dataStatus == true){
+ this.notifier.notify('success', 'Saved Successfully.');
+ this.dialogRef.close('1');
+ }
+ else{
+ this.notifier.notify('warning', 'SomeThing Wents Wrong Try Again !');
+ //alert("SomeThing Wents Wrong Try Again !");
+ }
+
+ }, error => {
+ this.notifier.notify('warning', 'Something Wents Wrong Try Again.!' + '-' + error.error_text + ' occur');
+ });
+ }
+
+
rotate(flag)
{
switch(flag){
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html
index 9931f393a..747e56b40 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.html
@@ -280,42 +280,55 @@
- 0; else noFiles">
-
-
-
-
-
-
-
{{doc.document_title}}
+
0; else noFiles">
+
+
+
+
+
+
+
+
+
+ edit
+
+
+
+
{{doc.document_title}}
+
+
-
-
-
-
-
-
-
- picture_as_pdf
- {{doc.document_title}}
-
-
+
+
+
+
+
+
+ picture_as_pdf
+ {{doc.document_title}}
+
+
+
-
-
- No Files
-
-
+
+ No Files
+
+
-
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.scss
index 9ce3b1694..ab2076e37 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.scss
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.scss
@@ -26,6 +26,11 @@
color: #fff !important;
background-color: #e00201 !important;
}
+.top .thumbnail .date {
+ position: absolute;
+ top: 4px;
+ right: -10px;
+}
.mat-card-content {
background-color: white;
}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.ts
index 038df3362..b2d9aab11 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/employment-info/employment-info.component.ts
@@ -22,6 +22,7 @@ import {
/** Service */
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
import { ActivatedRoute, Router } from '@angular/router';
+import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component';
@Component({
selector: 'app-employment-info',
@@ -61,6 +62,7 @@ export class EmploymentInfoComponent implements OnInit {
private router: Router,
private _pd: PdTrigerService,
private dialogRef: MatDialogRef,
+ private dialog: MatDialog,
@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;
@@ -183,25 +185,7 @@ export class EmploymentInfoComponent implements OnInit {
this.company_relationship_list.push({ 'company_relationship_id': 0, 'name': 'Not Applicable' });
}
});
- 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 = [];
- }
- });
+ this.retriveFile();
}
public initemploymentForm(): void {
@@ -595,4 +579,42 @@ export class EmploymentInfoComponent implements OnInit {
}
}
+
+ imageCrop(pic) {
+ // let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
+ pic.pdid = this.pdid;
+ const imageRef = this.dialog.open(ImageCropComponent, {
+ data: pic,
+ });
+ imageRef.afterClosed()
+ .subscribe(dataresult => {
+ if(dataresult == 1){
+ this.documentsAndFilesList = [];
+ this.retriveFile();
+ }
+ });
+ }
+ retriveFile(){
+ 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_id':val.pd_document_id,
+ 'document_name': val.pd_document_name,
+ 'document_title': val.pd_document_title,
+ 'document': val.doc_url,
+ 'document_type': splitted[1] == 'pdf' ? 'pdf' : 'image',
+ 'is_show_report':val.is_show_report
+ }
+ this.documentsAndFilesList.push(DocumentsAndFiles);
+ });
+ }
+ }
+ else {
+ this.documentsAndFilesList = [];
+ }
+ });
+ }
}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html
index 1221ed375..1b696d025 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.html
@@ -271,42 +271,55 @@
- 0; else noFiles">
-
-
-
-
-
-
-
{{doc.document_title}}
+
0; else noFiles">
+
+
+
+
+
+
+
+
+
+ edit
+
+
+
+
{{doc.document_title}}
+
+
-
-
-
-
-
-
-
- picture_as_pdf
- {{doc.document_title}}
-
-
+
+
+
+
+
+
+ picture_as_pdf
+ {{doc.document_title}}
+
+
+
-
-
- No Files
-
-
+
+ No Files
+
+
-
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.scss
index e18c2c8f9..e71c57db0 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.scss
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.scss
@@ -24,7 +24,11 @@
::ng-deep .cdk-global-overlay-wrapper{
justify-content: center !important;
}
-
+.top .thumbnail .date {
+ position: absolute;
+ top: 4px;
+ right: -10px;
+}
.paragraph_change {
color: #fff !important;
background-color: #e00201 !important;
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts
index b90b6f70b..4b475b7e9 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts
@@ -10,6 +10,7 @@ import { ActivatedRoute, Router } from "@angular/router";
/** Service */
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
+import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component';
@Component({
@@ -61,6 +62,7 @@ export class FamilyDetailsComponent implements OnInit {
private router: Router,
private _pd: PdTrigerService,
private dialogRef: MatDialogRef
,
+ private dialog: MatDialog,
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
this.form_id = 6;
@@ -163,25 +165,7 @@ export class FamilyDetailsComponent implements OnInit {
}
});
- this._pd.retriveFile(this.pdid,'6',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 = [];
- }
- });
+ this.retriveFile();
}
pdf(fileURL){
window.open(fileURL);
@@ -694,6 +678,44 @@ export class FamilyDetailsComponent implements OnInit {
});
}
+ imageCrop(pic) {
+ // let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
+ pic.pdid = this.pdid;
+ const imageRef = this.dialog.open(ImageCropComponent, {
+ data: pic,
+ });
+ imageRef.afterClosed()
+ .subscribe(dataresult => {
+ if(dataresult == 1){
+ this.documentsAndFilesList = [];
+ this.retriveFile();
+ }
+ });
+ }
+ retriveFile(){
+ this._pd.retriveFile(this.pdid,'6',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_id':val.pd_document_id,
+ 'document_name': val.pd_document_name,
+ 'document_title': val.pd_document_title,
+ 'document': val.doc_url,
+ 'document_type': splitted[1] == 'pdf' ? 'pdf' : 'image',
+ 'is_show_report':val.is_show_report
+ }
+ this.documentsAndFilesList.push(DocumentsAndFiles);
+ });
+ }
+ }
+ else {
+ this.documentsAndFilesList = [];
+ }
+ });
+ }
+
// validateAllFormFields(formGroup: FormGroup) {
// Object.keys(formGroup.controls).forEach(field => {
// const control = formGroup.get(field);
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.html
index e17876ac0..cccef65e0 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.html
@@ -221,44 +221,57 @@
-
-
- 0; else noFiles">
-
-
-
-
-
-
-
{{doc.document_title}}
+
+
+ 0; else noFiles">
+
+
+
+
+
+
+
+
+
+ edit
+
+
+
+
{{doc.document_title}}
+
+
+
+
+
+
+
+
+
+
+
+ picture_as_pdf
+ {{doc.document_title}}
+
+
+
+
+
+
-
-
-
-
-
-
-
-
- picture_as_pdf
- {{doc.document_title}}
-
-
-
-
-
-
-
-
-
-
- No Files
-
-
-
-
+
+
+ No Files
+
+
+
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.scss
index 4a0a50800..57876227a 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.scss
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.scss
@@ -11,6 +11,11 @@
::ng-deep .cdk-global-overlay-wrapper{
justify-content: center !important;
}
+.top .thumbnail .date {
+ position: absolute;
+ top: 4px;
+ right: -10px;
+}
// ::ng-deep .cdk-overlay-pane{
// max-width: 100vw !important;
// width: 100% !important;
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.ts
index 6f0857abb..f3a3dfd85 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/final-remarks/final-remarks.component.ts
@@ -23,6 +23,7 @@ import {
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
import { ActivatedRoute, Router } from '@angular/router';
import { analyzeAndValidateNgModules } from '@angular/compiler';
+import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component';
@Component({
selector: 'app-final-remarks',
@@ -57,6 +58,7 @@ export class FinalRemarksComponent implements OnInit {
private _formBuilder: FormBuilder,
private pdTrigerService: PdTrigerService,
private dialogRef: MatDialogRef
,
+ private dialog: MatDialog,
@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;
@@ -254,26 +256,7 @@ export class FinalRemarksComponent implements OnInit {
}, err => {
})
-
- this.pdTrigerService.retriveFile(this.pdid,params.pd_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 = [];
- }
- });
+ this.retriveFile();
}
getM_Recommendation() {
@@ -659,4 +642,43 @@ export class FinalRemarksComponent implements OnInit {
}
});
}
+
+ imageCrop(pic) {
+ // let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
+ pic.pdid = this.pdid;
+ const imageRef = this.dialog.open(ImageCropComponent, {
+ data: pic,
+ });
+ imageRef.afterClosed()
+ .subscribe(dataresult => {
+ if(dataresult == 1){
+ this.documentsAndFilesList = [];
+ this.retriveFile();
+ }
+ });
+}
+retriveFile(){
+ this.pdTrigerService.retriveFile(this.pdid,'20',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_id':val.pd_document_id,
+ 'document_name': val.pd_document_name,
+ 'document_title': val.pd_document_title,
+ 'document': val.doc_url,
+ 'document_type': splitted[1] == 'pdf' ? 'pdf' : 'image',
+ 'is_show_report':val.is_show_report
+ }
+ this.documentsAndFilesList.push(DocumentsAndFiles);
+ });
+ }
+ }
+ else {
+ this.documentsAndFilesList = [];
+ }
+ });
+}
+
}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html
index 8d9cbc3b7..b559b7fd6 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html
@@ -587,42 +587,55 @@
- 0; else noFiles">
-
-
-
-
-
-
-
{{doc.document_title}}
+
0; else noFiles">
+
+
+
+
+
+
+
+
+
+ edit
+
+
+
+
{{doc.document_title}}
+
+
-
-
-
-
-
-
-
- picture_as_pdf
- {{doc.document_title}}
-
-
+
+
+
+
+
+
+ picture_as_pdf
+ {{doc.document_title}}
+
+
+
-
-
- No Files
-
-
+
+ No Files
+
+
-
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.scss
index e1a42d584..07fd5b7ba 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.scss
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.scss
@@ -23,7 +23,11 @@
.toggle{
padding: 1.4rem;
}
-
+.top .thumbnail .date {
+ position: absolute;
+ top: 4px;
+ right: -10px;
+}
.underline input {
border: none;
}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts
index 5acadd20b..fc4560a46 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts
@@ -22,6 +22,7 @@ import {
/** Service */
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
import {ActivatedRoute, Router} from '@angular/router';
+import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component';
//import { Alert } from 'selenium-webdriver';
@Component({
@@ -87,6 +88,7 @@ export class FinancialInfoComponent implements OnInit {
private router: Router,
private _pd: PdTrigerService,
private dialogRef: MatDialogRef,
+ private dialog: MatDialog,
@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;
@@ -309,25 +311,7 @@ export class FinancialInfoComponent implements OnInit {
}
})
- 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 = [];
- }
- });
+ this.retriveFile();
}
@@ -1982,4 +1966,42 @@ export class FinancialInfoComponent implements OnInit {
}
});
}
+
+ imageCrop(pic) {
+ // let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
+ pic.pdid = this.pdid;
+ const imageRef = this.dialog.open(ImageCropComponent, {
+ data: pic,
+ });
+ imageRef.afterClosed()
+ .subscribe(dataresult => {
+ if(dataresult == 1){
+ this.documentsAndFilesList = [];
+ this.retriveFile();
+ }
+ });
+ }
+ retriveFile(){
+ 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_id':val.pd_document_id,
+ 'document_name': val.pd_document_name,
+ 'document_title': val.pd_document_title,
+ 'document': val.doc_url,
+ 'document_type': splitted[1] == 'pdf' ? 'pdf' : 'image',
+ 'is_show_report':val.is_show_report
+ }
+ this.documentsAndFilesList.push(DocumentsAndFiles);
+ });
+ }
+ }
+ else {
+ this.documentsAndFilesList = [];
+ }
+ });
+ }
}
\ No newline at end of file
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component.html
index 7e2d5efc4..46b821bb8 100644
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component.html
@@ -64,45 +64,55 @@
-
- 0; else noFiles">
-
-
-
-
-
-
-
{{doc.document_title}}
-
-
-
-
-
-
-
-
-
-
-
picture_as_pdf
-
{{doc.document_title}}
-
+
+ 0; else noFiles">
+
+
+
+
+
+
+
+
+
+ edit
+
+
+
+
{{doc.document_title}}
+
+
+
+
+
+
+
+
+
+
+
+ picture_as_pdf
+ {{doc.document_title}}
+
+
+
+
+
-
-
-
-
-
-
- No Files
-
+
+
+ No Files
+
+
-
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component.scss
index b60245ae3..c80a4d765 100644
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component.scss
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component.scss
@@ -10,7 +10,11 @@
.mat-card-actions {
background-color: white;
}
-
+.top .thumbnail .date {
+ position: absolute;
+ top: 4px;
+ right: -10px;
+ }
mat-form-field {
margin: 0 2%;
}
\ No newline at end of file
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component.ts
index 55f0aaf25..3a747e542 100644
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component.ts
@@ -23,6 +23,7 @@ import {
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
import { ActivatedRoute, Router } from '@angular/router';
import { analyzeAndValidateNgModules } from '@angular/compiler';
+import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component';
@Component({
@@ -58,6 +59,7 @@ export class FuturePlansAndBusinessEnvironmentComponent implements OnInit {
private _formBuilder: FormBuilder,
private pdTrigerService: PdTrigerService,
private dialogRef: MatDialogRef
,
+ private dialog: MatDialog,
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id;
@@ -139,25 +141,7 @@ export class FuturePlansAndBusinessEnvironmentComponent implements OnInit {
})
- this.pdTrigerService.retriveFile(this.pdid,params.pd_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 = [];
- }
- });
+ this.retriveFile();
}
/** To Save/Edited Popup Data */
@@ -211,5 +195,42 @@ export class FuturePlansAndBusinessEnvironmentComponent implements OnInit {
}
});
}
+ imageCrop(pic) {
+ // let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
+ pic.pdid = this.pdid;
+ const imageRef = this.dialog.open(ImageCropComponent, {
+ data: pic,
+ });
+ imageRef.afterClosed()
+ .subscribe(dataresult => {
+ if(dataresult == 1){
+ this.documentsAndFilesList = [];
+ this.retriveFile();
+ }
+ });
+ }
+ retriveFile(){
+ this.pdTrigerService.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_id':val.pd_document_id,
+ 'document_name': val.pd_document_name,
+ 'document_title': val.pd_document_title,
+ 'document': val.doc_url,
+ 'document_type': splitted[1] == 'pdf' ? 'pdf' : 'image',
+ 'is_show_report':val.is_show_report
+ }
+ this.documentsAndFilesList.push(DocumentsAndFiles);
+ });
+ }
+ }
+ else {
+ this.documentsAndFilesList = [];
+ }
+ });
+ }
}
\ No newline at end of file
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 db47f7897..a9c12196b 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
@@ -13,325 +13,377 @@
+
-
-
-
-
-
-
- Name of Person(s) Met and Individual Loan Applicant(s)
-
-
- 0"
- formArrayName="individuals">
-
- Name
-
-
-
-
-
-
- Is Person Met
-
-
-
-
-
- Is Applicant
-
-
-
+
+
+ Name of Person(s) Met and Individual Loan Applicant(s)
+
+
+ 0"
+ formArrayName="individuals">
+
+ Name
+
+
+
+
+
+
+ Is Person Met
+
+
+
+
+
+ Is Applicant
+
+
+
-
-
-
- Age
-
-
-
- Age Required
-
-
-
-
-
-
- Qualification
-
-
- {{qual.qualification_name}}
-
- Qualification Required
-
-
-
-
-
-
-
- Qualification Details Required
-
-
-
-
-
-
-
+
+
+
+
+
+ Qualification
+
+
+ {{qual.qualification_name}}
+
+ Qualification Required
+
+
+
+
+
+
+
+
+ Qualification Details
+ Required
+
+
+
+
+
+
+
-
- delete
-
+
+ delete
+
-
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
- Add More Person(s)
-
-
-
-
+
+
+
+ Add More Person(s)
+
+
+
+
-
-
- Number of Years for which rental income is being received
-
- Year
-
- Please Enter Correct Year
-
-
-
- Month
-
-
-
-
+
+
+ Number of Years for which rental income is being received
+
+ Year
+
+ Please Enter
+ Correct Year
+
+
+
+ Month
+
+
+
+
-
-
-
- Company/Firm
-
-
-
-
-
-
-
-
-
- Is Applicant
+
+
+
+ Company/Firm
+
+
+
-
-
- Add More Company/Firm
-
-
+
-
-
-
- 1">
-
- Relationship Between Individuals
-
-
-
-
- Name
-
-
-
- {{details.value.applicant_name | titlecase}}
-
-
-
- Relation
-
-
- Select
- {{member.name
+
+ 1">
+
+ Relationship Between Individuals
+
+
+
+
+ Name
+
+
+
+ {{details.value.applicant_name | titlecase}}
+
+
+
+ Relation
+
+
+ Select
+ {{member.name
+ ' of' | titlecase}}
- Not Applicable
-
+ Not Applicable
+
-
-
-
- Relationship To
-
-
- Select
-
- {{appc.applicant_name | titlecase}}
- Not Applicable
-
+
+
+
+ Relationship To
+
+
+ Select
+
+ {{appc.applicant_name | titlecase}}
+
+ Not Applicable
+
-
-
+
+
-
-
+
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
- Relationship of Individuals to Company / Firm
+ Relationship of Individuals to Company / Firm
-
-
+
+
- 0"
- formArrayName="company_with_relationships">
+ 0"
+ formArrayName="company_with_relationships">
-
- Applicant
-
+
+ Applicant
+
-
- {{bothC.applicant_name
+
+ {{bothC.applicant_name
| titlecase}}
-
+
-
-
-
- Relation
-
-
- Select
-
- {{comrelShip.name | titlecase}}
-
- Not Applicable
-
-
-
+
+
+
+ Relation
+
+
+ Select
+
+ {{comrelShip.name | titlecase}}
+
+ Not Applicable
+
+
+
-
- Company
-
+
+ Company
+
-
- Select
-
- {{comp.company_name}}
-
- Not Applicable
-
+
+ Select
+
+ {{comp.company_name}}
+
+ Not Applicable
+
-
- delete
+
+ delete
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Add Company Relationship
+
+ Add More Company Relationship
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
- Add Company Relationship
-
- Add More Company Relationship
-
-
-
-
-
-
-
-
-
-
- 0; else noFiles">
-
-
-
-
-
-
-
{{doc.document_title}}
+
+
+
+ 0; else noFiles">
+
+
+
+
+
+
+
+
+
+ edit
+
+
+
+
{{doc.document_title}}
+
-
-
-
-
-
+
+
+
+
+
+
- picture_as_pdf
- {{doc.document_title}}
+ picture_as_pdf
+ {{doc.document_title}}
-
-
-
-
- No Files
-
-
-
-
-
+
+
+
+
+ No Files
+
+
+
+
+
@@ -455,7 +523,8 @@
+ matTooltipPosition="above" [disabled]="disableAfterSubmit===true"
+ (click)="submitGeneralForm(_generalForm.value)">
save
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.scss
index e018e750d..1ebaa5c54 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.scss
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.scss
@@ -12,7 +12,11 @@
mat-form-field {
margin: 0 2%;
}
-
+ .top .thumbnail .date {
+ position: absolute;
+ top: 4px;
+ right: -10px;
+}
.example-container {
// display: flex;
flex-direction: column;
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 11e29a363..3e956a938 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
@@ -6,7 +6,7 @@ import { PdTrigerService } from './../../../../../pd-service/pd-triger.service';
import { OtherApplicantDetailsComponent } from './../dialogue/other-applicant-details/other-applicant-details.component';
import { element } from '@angular/core/src/render3/instructions';
import { ELEMENT_PROBE_PROVIDERS } from '@angular/platform-browser/src/dom/debug/ng_probe';
-import { DatePipe,TitleCasePipe } from '@angular/common';
+import { DatePipe, TitleCasePipe } from '@angular/common';
import { SearchRelationPipe } from './../../../../../pd-pipes/search-relation.pipe';
import { Options } from 'selenium-webdriver/edge';
import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component';
@@ -16,10 +16,31 @@ import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component'
selector: 'app-general-info',
templateUrl: './general-info.component.html',
styleUrls: ['./general-info.component.scss'],
- providers: [SearchRelationPipe,TitleCasePipe],
+ providers: [SearchRelationPipe, TitleCasePipe],
})
+
export class GeneralInfoComponent implements OnInit {
+ 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,
+ }
+ };
+
/* Declaration for Header Variables */
pageTitle: string = "General Information";
@@ -30,7 +51,7 @@ export class GeneralInfoComponent implements OnInit {
/* Declaration for Common Variables */
pipe = new DatePipe('en-US');
-
+
parent_pdid: string;
pdid: string;
form_id: number;
@@ -65,7 +86,7 @@ export class GeneralInfoComponent implements OnInit {
/********************** Declaration Section Ends Here *****************/
/** Constructor Section */
- constructor(notifier: NotifierService, private _fb: FormBuilder, private _pd: PdTrigerService, private dialog: MatDialog, @Inject(MAT_DIALOG_DATA) public pd_all_details: any, private dialogRef: MatDialogRef,private titleCase:TitleCasePipe,private imageRef: MatDialogRef) {
+ constructor(notifier: NotifierService, private _fb: FormBuilder, private _pd: PdTrigerService, private dialog: MatDialog, @Inject(MAT_DIALOG_DATA) public pd_all_details: any, private dialogRef: MatDialogRef, private titleCase: TitleCasePipe, private imageRef: MatDialogRef) {
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id;
this.notifier = notifier;
@@ -82,7 +103,7 @@ export class GeneralInfoComponent implements OnInit {
/** 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("/") : '';
- this.maxDate = get_max_date ? new Date(get_max_date) : new Date();
+ this.maxDate = get_max_date ? new Date(get_max_date) : new Date();
this.initFormDetails();
this.getMasterDetails('RELATIONSHIPS', 1);
this.getMasterDetails('COMPANYRELATIONSHIPS', 2);
@@ -115,27 +136,8 @@ export class GeneralInfoComponent implements OnInit {
this.CompanySource.data = ComapnyControl.controls;
});
- this._pd.retriveFile(this.pdid,'18',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 = [];
- }
- });
-}
+ this.retriveFile();
+ }
/***************************** ng Oninit Section Ends Here **********************************/
/** init form */
@@ -231,7 +233,7 @@ export class GeneralInfoComponent implements OnInit {
if (exist_personsWithRelationships.length > 0) {
exist_personsWithRelationships.forEach((element, index) => {
//individualsControl.push(this.createIndividulas(element))
- personsWithRelationshipsControl.push(this.createPersonsWithRelationships(element,index));
+ personsWithRelationshipsControl.push(this.createPersonsWithRelationships(element, index));
});
}
if (this.customer_segment_abbr != 'SE-RI') {
@@ -241,7 +243,7 @@ export class GeneralInfoComponent implements OnInit {
if (exist_companyWithRelationships.length > 0) {
exist_companyWithRelationships.forEach(element => {
//individualsControl.push(this.createIndividulas(element))
- console.log('elementValue.applicant_name',element);
+ console.log('elementValue.applicant_name', element);
companyWithRelationshipsControl.push(this.createCompaniesRelationshipWithData(element));
});
}
@@ -317,7 +319,7 @@ export class GeneralInfoComponent implements OnInit {
element.qualification = '',
element.course_name = '',
individualsControl.push(this.createIndividulas(element));
- personsWithRelationshipsControl.push(this.createPersonsWithRelationships(element,key));
+ personsWithRelationshipsControl.push(this.createPersonsWithRelationships(element, key));
//let relationControl = this._generalForm.controls['applicant_relation'];
// let applicant_details: any= {'pd_co_applicant_id':element.pd_co_applicant_id,'applicant_name':element.applicant_name, 'individula_order_id':relationControl.controls.length+1};
@@ -329,14 +331,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, associate_pd_id:this.pdid }
+ 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, associate_pd_id:this.pdid}
+ 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))
}
@@ -355,8 +357,8 @@ export class GeneralInfoComponent implements OnInit {
applicant_name: [this.titleCase.transform(elementValue.applicant_name)],
is_applicant: [elementValue.is_applicant],
is_person_met: [elementValue.is_person_met],
- is_person_met_pic :[elementValue.is_person_met_pic],
- is_person_met_id_proof : [elementValue.is_person_met_id_proof],
+ is_person_met_pic: [elementValue.is_person_met_pic],
+ is_person_met_id_proof: [elementValue.is_person_met_id_proof],
is_new: [elementValue.is_new],
is_main_applicant: [elementValue.is_main_applicant],
is_active: [elementValue.is_active],
@@ -367,8 +369,8 @@ export class GeneralInfoComponent implements OnInit {
});
}
- createPersonsWithRelationships(elementValue: any,indexVal:number) {
- console.log('elementValue.applicant_name',elementValue.applicant_name);
+ createPersonsWithRelationships(elementValue: any, indexVal: number) {
+ console.log('elementValue.applicant_name', elementValue.applicant_name);
return this._fb.group({
pd_co_applicant_id: [elementValue.pd_co_applicant_id],
applicant_name: [this.titleCase.transform(elementValue.applicant_name)],
@@ -392,7 +394,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:[elementValue.associate_pd_id]
+ associate_pd_id: [elementValue.associate_pd_id]
});
}
@@ -439,7 +441,7 @@ export class GeneralInfoComponent implements OnInit {
// add more companies
addMoreCompanies() {
let control: any = this._generalForm.get('companies') as FormArray;
- let setValues: any = { company_order_id: control.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: true, associate_pd_id:this.pdid}
+ let setValues: any = { company_order_id: control.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: true, associate_pd_id: this.pdid }
control.push(this.createCompanies(setValues))
}
@@ -524,18 +526,6 @@ export class GeneralInfoComponent implements OnInit {
control.removeAt(cindex);
}
- // add more individuals details
- imageCrop(pic,pic_name){
- let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
- const imageRef = this.dialog.open(ImageCropComponent, {
- data: arr,
- });
- imageRef.afterClosed()
- .subscribe(dataresult => {
- console.log(dataresult);
- });
- }
-
addMoreIndividuals() {
const dialogRef = this.dialog.open(OtherApplicantDetailsComponent, {
data: '',
@@ -557,7 +547,7 @@ export class GeneralInfoComponent implements OnInit {
individualsControl.push(this.createIndividulas(element));
let relationControl = this._generalForm.controls['persons_with_relationships'];
let applicant_details: any = { 'pd_co_applicant_id': element.pd_co_applicant_id, 'applicant_name': this.titleCase.transform(element.applicant_name), 'relationship': '', 'relation_to': '', 'individuals_order_id': element.individuals_order_id, 'is_active': element.is_active };
- relationControl.push(this.createPersonsWithRelationships(applicant_details,individualsControl.controls.length-1));
+ relationControl.push(this.createPersonsWithRelationships(applicant_details, individualsControl.controls.length - 1));
});
}
@@ -637,7 +627,7 @@ export class GeneralInfoComponent implements OnInit {
// submit form details
temp: number = 0;
submitGeneralForm(formData: any) {
-
+
// console.log('formData',formData);
if (formData.individuals.length > 0) {
formData.individuals.forEach((val, index) => {
@@ -653,20 +643,20 @@ export class GeneralInfoComponent implements OnInit {
this.temp = 0;
return;
}
- else if(this.temp <= formData.individuals.length){
+ else if (this.temp <= formData.individuals.length) {
this.temp = 0;
}
let individualCtrl: any = this._generalForm.get('individuals') as FormArray;
let individualCtrlLength: any = individualCtrl.controls.length;
-
+
if (individualCtrlLength > 0) {
let icnt = 0;
while (icnt < individualCtrlLength) {
let individualChildCtrl: any = individualCtrl.controls[icnt];
-
+
individualChildCtrl.controls.age.clearValidators();
individualChildCtrl.controls.qualification.clearValidators();
@@ -684,13 +674,12 @@ export class GeneralInfoComponent implements OnInit {
individualChildCtrl.controls.qualification.setValidators(Validators.compose([Validators.required]));
}
- if(individualChildCtrl.controls.qualification.value == '' || individualChildCtrl.controls.qualification.value == '4' || individualChildCtrl.controls.qualification.value == '6')
- {individualChildCtrl.controls.course_name.setValue(''); individualChildCtrl.controls.course_name.clearValidators();}else{ individualChildCtrl.controls.course_name.setValidators(Validators.compose([Validators.required]));}
+ if (individualChildCtrl.controls.qualification.value == '' || individualChildCtrl.controls.qualification.value == '4' || individualChildCtrl.controls.qualification.value == '6') { individualChildCtrl.controls.course_name.setValue(''); individualChildCtrl.controls.course_name.clearValidators(); } else { individualChildCtrl.controls.course_name.setValidators(Validators.compose([Validators.required])); }
individualChildCtrl.controls.age.updateValueAndValidity();
individualChildCtrl.controls.qualification.updateValueAndValidity();
individualChildCtrl.controls.course_name.updateValueAndValidity();
-
+
icnt++;
}
}
@@ -846,10 +835,10 @@ export class GeneralInfoComponent implements OnInit {
});
}
/******************* validate all form group and form array fields ENd Here ********/
- pdf(fileURL){
+ pdf(fileURL) {
window.open(fileURL);
}
-
+
// imageCrop(pic,pic_name){
// console.log(pic,pic_name);
// let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
@@ -861,25 +850,43 @@ export class GeneralInfoComponent implements OnInit {
// console.log(dataresult);
// });
// }
-
-/** 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,
+
+ imageCrop(pic) {
+ // let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
+ pic.pdid = this.pdid;
+ const imageRef = this.dialog.open(ImageCropComponent, {
+ data: pic,
+ });
+ imageRef.afterClosed()
+ .subscribe(dataresult => {
+ if (dataresult == 1) {
+ this.documentsAndFilesList = [];
+ this.retriveFile();
+ }
+ });
}
-};
+ retriveFile() {
+ this._pd.retriveFile(this.pdid, '18', 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_id': val.pd_document_id,
+ 'document_name': val.pd_document_name,
+ 'document_title': val.pd_document_title,
+ 'document': val.doc_url,
+ 'document_type': splitted[1] == 'pdf' ? 'pdf' : 'image',
+ 'is_show_report': val.is_show_report
+ }
+ this.documentsAndFilesList.push(DocumentsAndFiles);
+ });
+ }
+ }
+ else {
+ this.documentsAndFilesList = [];
+ }
+ });
+ }
+
}
\ 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 fe8f0d973..388754e33 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
@@ -64,42 +64,55 @@
- 0; else noFiles">
-
-
-
-
-
-
-
{{doc.document_title}}
+
0; else noFiles">
+
+
+
+
+
+
+
+
+
+ edit
+
+
+
+
{{doc.document_title}}
+
+
-
-
-
-
-
-
-
- picture_as_pdf
- {{doc.document_title}}
-
-
+
+
+
+
+
+
+ picture_as_pdf
+ {{doc.document_title}}
+
+
+
-
-
- No Files
-
-
+
+ No Files
+
+
-
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/lender-representative/lender-representative.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/lender-representative/lender-representative.component.scss
index cc247bddb..ae9dc3e94 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/lender-representative/lender-representative.component.scss
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/lender-representative/lender-representative.component.scss
@@ -12,6 +12,11 @@
padding: 0px;
color: #e00201;
}
+.top .thumbnail .date {
+ position: absolute;
+ top: 4px;
+ right: -10px;
+}
// .notificard{
// width: 25%;
// margin-top: -66px;
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 4309bd085..2d023f6b5 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
@@ -11,6 +11,7 @@ import {
/** Service */
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
import { ActivatedRoute, Router } from "@angular/router";
+import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component';
@Component({
selector: 'app-lender-representative',
@@ -41,6 +42,7 @@ export class LenderRepresentativeComponent implements OnInit {
private router: Router,
// private snackBar: MatSnackBar,
private _pd: PdTrigerService,
+ private dialog: MatDialog,
private dialogRef: MatDialogRef
,
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id;
@@ -120,25 +122,7 @@ 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 = [];
- }
- });
+ this.retriveFile();
}
public initRepresentative(): void {
this.representativeForm = this.fb.group({
@@ -211,5 +195,42 @@ export class LenderRepresentativeComponent implements OnInit {
}
});
}
+ imageCrop(pic) {
+ // let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
+ pic.pdid = this.pdid;
+ const imageRef = this.dialog.open(ImageCropComponent, {
+ data: pic,
+ });
+ imageRef.afterClosed()
+ .subscribe(dataresult => {
+ if(dataresult == 1){
+ this.documentsAndFilesList = [];
+ this.retriveFile();
+ }
+ });
+ }
+ retriveFile(){
+ 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_id':val.pd_document_id,
+ 'document_name': val.pd_document_name,
+ 'document_title': val.pd_document_title,
+ 'document': val.doc_url,
+ 'document_type': splitted[1] == 'pdf' ? 'pdf' : 'image',
+ 'is_show_report':val.is_show_report
+ }
+ this.documentsAndFilesList.push(DocumentsAndFiles);
+ });
+ }
+ }
+ else {
+ this.documentsAndFilesList = [];
+ }
+ });
+ }
}
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 d33677e2a..f03c3a9ed 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
@@ -252,42 +252,55 @@
- 0; else noFiles">
-
-
-
-
-
-
-
{{doc.document_title}}
+
0; else noFiles">
+
+
+
+
+
+
+
+
+
+ edit
+
+
+
+
{{doc.document_title}}
+
+
-
-
-
-
-
-
-
- picture_as_pdf
- {{doc.document_title}}
-
-
+
+
+
+
+
+
+ picture_as_pdf
+ {{doc.document_title}}
+
+
+
-
-
- No Files
-
-
+
+ No Files
+
+
-
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.scss
index 3bb315cf9..3d14ee8da 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.scss
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.scss
@@ -13,7 +13,11 @@
.mat-form-field-appearance-legacy .mat-hint{
color:rgba(0, 0, 0, 0.8) !important;
}
-
+.top .thumbnail .date {
+ position: absolute;
+ top: 4px;
+ right: -10px;
+}
.matcard mat-form-field {
margin: 0 2%;
width:26%;
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 b623d86ad..0016ccb30 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
@@ -15,6 +15,7 @@ import { ActivatedRoute, Router } from '@angular/router';
/** Service */
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
+import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component';
@Component({
@@ -85,6 +86,7 @@ export class LoanDetailsComponent implements OnInit {
private router: Router,
private _pd: PdTrigerService,
private dialogRef: MatDialogRef,
+ private dialog: MatDialog,
@Inject(MAT_DIALOG_DATA) public pd_all_details: any) {
this.applicants = this.pd_all_details.pdapplicants_detials;
@@ -317,25 +319,7 @@ 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 = [];
- }
- });
+ this.retriveFile();
}
getM_EndUseofLoad() {
@@ -918,4 +902,42 @@ export class LoanDetailsComponent implements OnInit {
flipVertical: 4,
}
};
+
+ imageCrop(pic) {
+ // let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
+ pic.pdid = this.pdid;
+ const imageRef = this.dialog.open(ImageCropComponent, {
+ data: pic,
+ });
+ imageRef.afterClosed()
+ .subscribe(dataresult => {
+ if(dataresult == 1){
+ this.documentsAndFilesList = [];
+ this.retriveFile();
+ }
+ });
+ }
+ retriveFile(){
+ 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_id':val.pd_document_id,
+ 'document_name': val.pd_document_name,
+ 'document_title': val.pd_document_title,
+ 'document': val.doc_url,
+ 'document_type': splitted[1] == 'pdf' ? 'pdf' : 'image',
+ 'is_show_report':val.is_show_report
+ }
+ this.documentsAndFilesList.push(DocumentsAndFiles);
+ });
+ }
+ }
+ else {
+ this.documentsAndFilesList = [];
+ }
+ });
+ }
}
\ No newline at end of file
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 2d08f685b..cc6ef4316 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
@@ -227,42 +227,55 @@
- 0; else noFiles">
-
-
-
-
-
-
-
{{doc.document_title}}
+
0; else noFiles">
+
+
+
+
+
+
+
+
+
+ edit
+
+
+
+
{{doc.document_title}}
+
+
-
-
-
-
-
-
-
- picture_as_pdf
- {{doc.document_title}}
-
-
+
+
+
+
+
+
+ picture_as_pdf
+ {{doc.document_title}}
+
+
+
-
-
- No Files
-
-
+
+ No Files
+
+
-
+
+
+
+ edit
+
+
+
+
{{doc.document_title}}
+
+
-
-
-
-
-
-
-
- picture_as_pdf
- {{doc.document_title}}
-
-
+
+
+
+
+
+
+ picture_as_pdf
+ {{doc.document_title}}
+
+
+
-
-
- No Files
-
-
+
+ No Files
+
+
-
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.scss
index 5e2912012..3449777f2 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.scss
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/other-income/other-income.component.scss
@@ -16,6 +16,11 @@
// background: #62B013;
// color: white;
// }
+.top .thumbnail .date {
+ position: absolute;
+ top: 4px;
+ right: -10px;
+}
::ng-deep .cdk-global-overlay-wrapper{
justify-content: center !important;
}
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 2404c6f6e..57a9e182d 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
@@ -28,6 +28,7 @@ import { RentalVerificationComponent } from './../rental-verification/rental-ver
/**sweet alert */
import Swal from 'sweetalert2';
+import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component';
@Component({
selector: 'app-other-income',
@@ -173,25 +174,7 @@ 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 = [];
- }
- });
+ this.retriveFile();
}
public initOtherincomeForm(): void {
this.otherIncomeForm = this.fb.group({
@@ -463,4 +446,43 @@ export class OtherIncomeComponent implements OnInit {
}
ChdCtrls.controls.others_income_earned_by.updateValueAndValidity();
}
+
+ imageCrop(pic) {
+ // let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
+ pic.pdid = this.pdid;
+ const imageRef = this.dialog.open(ImageCropComponent, {
+ data: pic,
+ });
+ imageRef.afterClosed()
+ .subscribe(dataresult => {
+ if(dataresult == 1){
+ this.documentsAndFilesList = [];
+ this.retriveFile();
+ }
+ });
+ }
+ retriveFile(){
+ 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_id':val.pd_document_id,
+ 'document_name': val.pd_document_name,
+ 'document_title': val.pd_document_title,
+ 'document': val.doc_url,
+ 'document_type': splitted[1] == 'pdf' ? 'pdf' : 'image',
+ 'is_show_report':val.is_show_report
+ }
+ this.documentsAndFilesList.push(DocumentsAndFiles);
+ });
+ }
+ }
+ else {
+ this.documentsAndFilesList = [];
+ }
+ });
+ }
+
}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/manage-rental-verification/manage-rental-verification.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/manage-rental-verification/manage-rental-verification.component.html
index 5bb3cfa30..03c6fc08f 100644
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/manage-rental-verification/manage-rental-verification.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/manage-rental-verification/manage-rental-verification.component.html
@@ -698,40 +698,53 @@
- 0; else noFiles">
-
-
-
-
-
-
-
{{doc.document_title}}
+
0; else noFiles">
+
+
+
+
+
+
+
+
+
+ edit
+
+
+
+
{{doc.document_title}}
+
+
-
-
-
-
-
-
-
- picture_as_pdf
- {{doc.document_title}}
-
-
+
+
+
+
+
+
+ picture_as_pdf
+ {{doc.document_title}}
+
+
+
-
-
- No Files
-
-
+
+ No Files
+
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/manage-rental-verification/manage-rental-verification.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/manage-rental-verification/manage-rental-verification.component.scss
index 13b8a16c4..b4d3fd5f3 100644
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/manage-rental-verification/manage-rental-verification.component.scss
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/manage-rental-verification/manage-rental-verification.component.scss
@@ -16,6 +16,11 @@
margin-left: 2%;
margin-top: 1%;
}
+.top .thumbnail .date {
+ position: absolute;
+ top: 4px;
+ right: -10px;
+}
.total-rent-amt{
margin-left: 1%;
}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/manage-rental-verification/manage-rental-verification.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/manage-rental-verification/manage-rental-verification.component.ts
index f305e7e04..21f228a8b 100644
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/manage-rental-verification/manage-rental-verification.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/rental-verification/manage-rental-verification/manage-rental-verification.component.ts
@@ -7,6 +7,7 @@ import { NotifierService } from 'angular-notifier';
import { PdTrigerService } from './../../../../../../pd-service/pd-triger.service';
/**sweet alert */
import Swal from 'sweetalert2';
+import { ImageCropComponent } from '../../dialogue/image-crop/image-crop.component';
@Component({
selector: 'app-manage-rental-verification',
@@ -68,7 +69,7 @@ export class ManageRentalVerificationComponent implements OnInit {
SwalButtonText: string;
SwalMessage: string;
- constructor(notifier: NotifierService, private _pd: PdTrigerService ,private _fb: FormBuilder, @Inject(MAT_DIALOG_DATA) public data: any,private dialogRef: MatDialogRef
) {
+ constructor(notifier: NotifierService, private _pd: PdTrigerService ,private _fb: FormBuilder, @Inject(MAT_DIALOG_DATA) public data: any,private dialogRef: MatDialogRef,private dialog: MatDialog) {
this.pageTitle = this.data.manage_status==1 ? 'Add RI Details' : 'Update RI Details';
this.parent_pdid = this.data.parentData.pdmaster_details.parent_pd_id;
@@ -183,25 +184,7 @@ export class ManageRentalVerificationComponent implements OnInit {
});
this.loadFormData(this.data.editData);
- this._pd.retriveFile(this.pdid,'17',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 = [];
- }
- });
+ this.retriveFile();
}
@@ -1053,6 +1036,44 @@ export class ManageRentalVerificationComponent implements OnInit {
}
}
+ imageCrop(pic) {
+ // let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
+ pic.pdid = this.pdid;
+ const imageRef = this.dialog.open(ImageCropComponent, {
+ data: pic,
+ });
+ imageRef.afterClosed()
+ .subscribe(dataresult => {
+ if(dataresult == 1){
+ this.documentsAndFilesList = [];
+ this.retriveFile();
+ }
+ });
+}
+retriveFile(){
+ this._pd.retriveFile(this.pdid,'17',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_id':val.pd_document_id,
+ 'document_name': val.pd_document_name,
+ 'document_title': val.pd_document_title,
+ 'document': val.doc_url,
+ 'document_type': splitted[1] == 'pdf' ? 'pdf' : 'image',
+ 'is_show_report':val.is_show_report
+ }
+ this.documentsAndFilesList.push(DocumentsAndFiles);
+ });
+ }
+ }
+ else {
+ this.documentsAndFilesList = [];
+ }
+ });
+}
+
// validate all form group and form array fields
validateAllFormFields(formGroup: any) {
Object.keys(formGroup.controls).forEach(field => {
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 8d3026592..124f7de79 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
@@ -389,42 +389,55 @@
- 0; else noFiles">
-
-
-
-
-
-
-
{{doc.document_title}}
+
0; else noFiles">
+
+
+
+
+
+
+
+
+
+ edit
+
+
+
+
{{doc.document_title}}
+
+
-
-
-
-
-
-
-
- picture_as_pdf
- {{doc.document_title}}
-
-
+
+
+
+
+
+
+ picture_as_pdf
+ {{doc.document_title}}
+
+
+
-
-
- No Files
-
-
+
+ No Files
+
+
-
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.scss
index f7e0b7e79..ec7c21807 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.scss
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.scss
@@ -104,6 +104,10 @@ $product-bg-color-hover: rgba(103, 58, 183, 0.7);
}
}
}
-
+ .top .thumbnail .date {
+ position: absolute;
+ top: 4px;
+ right: -10px;
+ }
}
\ No newline at end of file
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 698661228..23ddc5058 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
@@ -10,6 +10,7 @@ import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
import { ActivatedRoute, Router } from '@angular/router';
import { analyzeAndValidateNgModules } from '@angular/compiler';
+import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component';
@Component({
selector: 'app-stock',
@@ -60,6 +61,7 @@ export class StockComponent implements OnInit {
private route: ActivatedRoute,
private router: Router,
private dialogRef: MatDialogRef
,
+ private dialog: MatDialog,
private _pd: PdTrigerService, @Inject(MAT_DIALOG_DATA)
public pd_all_details: any) {
this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id
@@ -124,25 +126,7 @@ 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 = [];
- }
- });
+ this.retriveFile();
}
public initstockForms(record) {
@@ -899,4 +883,43 @@ export class StockComponent implements OnInit {
// this.wtrdCommentFlag[index] = false;
// }
// }
+
+ imageCrop(pic) {
+ // let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
+ pic.pdid = this.pdid;
+ const imageRef = this.dialog.open(ImageCropComponent, {
+ data: pic,
+ });
+ imageRef.afterClosed()
+ .subscribe(dataresult => {
+ if(dataresult == 1){
+ this.documentsAndFilesList = [];
+ this.retriveFile();
+ }
+ });
+}
+retriveFile(){
+ 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_id':val.pd_document_id,
+ 'document_name': val.pd_document_name,
+ 'document_title': val.pd_document_title,
+ 'document': val.doc_url,
+ 'document_type': splitted[1] == 'pdf' ? 'pdf' : 'image',
+ 'is_show_report':val.is_show_report
+ }
+ this.documentsAndFilesList.push(DocumentsAndFiles);
+ });
+ }
+ }
+ else {
+ this.documentsAndFilesList = [];
+ }
+ });
+}
+
}
\ No newline at end of file
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 5edc21461..e3553efcb 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
@@ -296,42 +296,55 @@
- 0; else noFiles">
-
-
-
-
-
-
-
{{doc.document_title}}
+
0; else noFiles">
+
+
+
+
+
+
+
+
+
+ edit
+
+
+
+
{{doc.document_title}}
+
+
-
-
-
-
-
-
-
- picture_as_pdf
- {{doc.document_title}}
-
-
+
+
+
+
+
+
+ picture_as_pdf
+ {{doc.document_title}}
+
+
+
-
-
- No Files
-
-
+
+ No Files
+
+
-
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.scss
index 411bc5979..cb75a2354 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.scss
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.scss
@@ -92,5 +92,9 @@
}
}
}
-
+ .top .thumbnail .date {
+ position: absolute;
+ top: 4px;
+ right: -10px;
+ }
}
\ No newline at end of file
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.ts
index bd8878a13..8772a7163 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.ts
@@ -9,6 +9,7 @@ import { MatDialog,MatDialogRef,MAT_DIALOG_DATA } from '@angular/material';
/** Service */
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
+import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component';
@Component({
selector: 'app-supplier-info',
@@ -45,6 +46,7 @@ export class SupplierInfoComponent implements OnInit {
notifier: NotifierService,
private _formBuilder: FormBuilder,
private pdTrigerService: PdTrigerService,
+ private dialog: MatDialog,
@Inject(MAT_DIALOG_DATA) public pd_all_details: any, private dialogRef: MatDialogRef
) {
this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
@@ -146,25 +148,7 @@ export class SupplierInfoComponent implements OnInit {
// this.getPdSupplierFormDetails();
this.getMasterDetails('COMPANYRELATIONSHIPS', 1);
this.getMasterDetails('TITLES', 2);
- this.pdTrigerService.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 = [];
- }
- });
+ this.retriveFile();
}
@@ -611,5 +595,41 @@ export class SupplierInfoComponent implements OnInit {
// }
// ]
// }
-
+ imageCrop(pic) {
+ // let arr = { 'pic_name':pic_name,'pic':pic,'from_id':this.form_id}
+ pic.pdid = this.pdid;
+ const imageRef = this.dialog.open(ImageCropComponent, {
+ data: pic,
+ });
+ imageRef.afterClosed()
+ .subscribe(dataresult => {
+ if(dataresult == 1){
+ this.documentsAndFilesList = [];
+ this.retriveFile();
+ }
+ });
+}
+retriveFile(){
+ this.pdTrigerService.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_id':val.pd_document_id,
+ 'document_name': val.pd_document_name,
+ 'document_title': val.pd_document_title,
+ 'document': val.doc_url,
+ 'document_type': splitted[1] == 'pdf' ? 'pdf' : 'image',
+ 'is_show_report':val.is_show_report
+ }
+ this.documentsAndFilesList.push(DocumentsAndFiles);
+ });
+ }
+ }
+ else {
+ this.documentsAndFilesList = [];
+ }
+ });
+}
}
\ No newline at end of file
diff --git a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts
index 4c26b2495..7a3840ae4 100755
--- a/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts
+++ b/ng6-seed/src/app/personal-discussion/pd-service/pd-triger.service.ts
@@ -725,5 +725,15 @@ export class PdTrigerService {
)
}
+ getBase64ImageFromURL(url): Observable {
+ return this._http.post(this.apiUrl + 'convertBase64', { "img_url":url })
+ .pipe(catchError(this.handleError('role', [])))
+ }
+
+ updatePDPhoto(values): Observable {
+ values.fk_updatedby = this._aws.getlocale();
+ return this._http.post(this.apiUrl + 'updatePDPhoto', { "records":values })
+ .pipe(catchError(this.handleError('role', [])))
+ }
}
diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-list.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-list.component.html
index bbe37f0d7..166772fde 100755
--- a/ng6-seed/src/app/quality-check/qc-list/qc-list.component.html
+++ b/ng6-seed/src/app/quality-check/qc-list/qc-list.component.html
@@ -12,15 +12,12 @@
done Completed
-
+
done_all QC Completed
-
-
-
diff --git a/ng6-seed/src/app/session/login/login-component.html b/ng6-seed/src/app/session/login/login-component.html
index 41ee7e92e..291756fcc 100755
--- a/ng6-seed/src/app/session/login/login-component.html
+++ b/ng6-seed/src/app/session/login/login-component.html
@@ -2,7 +2,8 @@