img edit
This commit is contained in:
parent
873ab9da68
commit
fb2eabd4f5
@ -4,10 +4,12 @@
|
||||
<div class="opt-side relative ">
|
||||
<div class="sidebar-container ">
|
||||
<div class="branding text-center">
|
||||
<!-- <h2><i class="fa fa-superpowers" aria-hidden="true"></i> <span> OPTIMA</span>
|
||||
</h2> -->
|
||||
<!-- <h2><i class="fa fa-superpowers" aria-hidden="true"></i> <span> OPTIMAm</span>
|
||||
</h2>
|
||||
<h2><img [src]="'http://ssa.sineedge.com/sparqapi/logo/sine_edge_icon.png'" style="height: 50px;;"> <span> {{userDep}} </span>
|
||||
</h2>
|
||||
</h2> -->
|
||||
<h2><img src="assets/images/PD.jpeg" style="height: 50px;;"> <span> {{userDep}} </span>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="main-nav">
|
||||
<div class="user-pro-wrap">
|
||||
@ -101,9 +103,11 @@
|
||||
</h2> -->
|
||||
<!--<h2><i class="fa fa-superpowers" aria-hidden="true"></i> <span> {{userDep}}({{fullName}})</span>
|
||||
</h2>-->
|
||||
<a (click)="menunav('HOME')">
|
||||
<img [routerLink]="['/dashboard']" [src]="'http://ssa.sineedge.com/sparqapi/logo/sineedge_red.png'" style="height: 35px;;"> <span> {{userDep}} </span>
|
||||
</a>
|
||||
<a (click)="menunav('HOME')">
|
||||
<!-- <img [routerLink]="['/dashboard']" [src]="'http://ssa.sineedge.com/sparqapi/logo/sineedge_red.png'" style="height: 35px;;"> <span> {{userDep}} </span> -->
|
||||
<img [routerLink]="['/dashboard']" src="assets/images/PD.jpeg" style="height: 35px;;"> <span> {{userDep}} </span>
|
||||
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -194,12 +194,14 @@ export class AllPdComponent implements OnInit, OnChanges {
|
||||
if(res['dataStatus']==true)
|
||||
{
|
||||
this.dataSourceTab1.data = res['records'];
|
||||
// console.log('res[records]',res['records']);
|
||||
console.log('records',res['records']);
|
||||
this.dataSourceTab1.paginator = this.paginator;
|
||||
}else{
|
||||
this.notifier.notify('warning', 'No Records Found !');
|
||||
this.dataSourceTab1.paginator['length'] = 0;
|
||||
this.dataSourceTab1.paginator['pageIndex'] = 0;
|
||||
this.dataSourceTab1.data = [];
|
||||
this.dataSourceTab1.paginator = null;
|
||||
console.log('records-records',res['records']);
|
||||
}
|
||||
},error => {
|
||||
this.errorMessage.push(error);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<mat-card-content>
|
||||
|
||||
<mat-expansion-panel>
|
||||
<mat-expansion-panel [(expanded)]="xpandStatus">
|
||||
<mat-expansion-panel-header>
|
||||
<mat-panel-title class="text-xs-left">
|
||||
<!-- <h6 class="mt-0"><mat-icon>filter_list</mat-icon> Filter</h6> -->
|
||||
|
||||
@ -20,17 +20,14 @@ export class CompletedPdComponent implements OnInit, OnChanges {
|
||||
ENTITY: any[]=[];
|
||||
PDType: any[]=[];
|
||||
pdStatus: any[]=[];
|
||||
searchForm:FormGroup;
|
||||
pipe = new DatePipe('en-US');
|
||||
private notifier: NotifierService;
|
||||
recordStatus: boolean;
|
||||
errorMessage:any[]=[];
|
||||
tabStatus:string="COMPLETED";
|
||||
pipe = new DatePipe('en-US');
|
||||
todaydate:Date = new Date();
|
||||
private notifier: NotifierService;
|
||||
public dataLengthTab4: number;
|
||||
public dataSourceTab4 = new MatTableDataSource();
|
||||
tempStore = new MatTableDataSource();
|
||||
|
||||
searchForm:FormGroup;
|
||||
|
||||
displayedColumns = ['PDType','Name','Lenderid','Address','Status','Action'];
|
||||
|
||||
@ -48,6 +45,7 @@ export class CompletedPdComponent implements OnInit, OnChanges {
|
||||
pageIndex = 0;
|
||||
pageSize = 10;
|
||||
pageEvent: PageEvent;
|
||||
todaydate:Date = new Date();
|
||||
|
||||
constructor(private _pd: PdTrigerService,public _fb:FormBuilder,notifier: NotifierService,) {
|
||||
this.notifier = notifier;
|
||||
@ -76,8 +74,9 @@ export class CompletedPdComponent implements OnInit, OnChanges {
|
||||
|
||||
// get changes for filter from parent componnet filter
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
let filteredText = changes.bindFilterValue.currentValue;
|
||||
filteredText = filteredText ? filteredText.trim() : filteredText;
|
||||
// let filteredText = changes.bindFilterValue.currentValue;
|
||||
let filteredText = changes.bindFilterValue.currentValue ? changes.bindFilterValue.currentValue.trim() : changes.bindFilterValue.currentValue;
|
||||
// filteredText = filteredText ? filteredText.trim() : filteredText;
|
||||
filteredText = filteredText ? filteredText.toLowerCase() : filteredText;
|
||||
this.dataSourceTab4.filter = filteredText;
|
||||
}
|
||||
@ -92,7 +91,6 @@ export class CompletedPdComponent implements OnInit, OnChanges {
|
||||
this.completedPdListData = data.records;
|
||||
this.dataLengthTab4 = data.records.length;
|
||||
this.dataSourceTab4.data = this.completedPdListData;
|
||||
this.tempStore.data
|
||||
}
|
||||
else{
|
||||
this.completedPdListData=[];
|
||||
@ -103,6 +101,7 @@ export class CompletedPdComponent implements OnInit, OnChanges {
|
||||
// , error => this.errorMessage = <any> error);
|
||||
,error => {
|
||||
this.errorMessage.push(error);
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!' + '-' + error.error_text + ' occur');
|
||||
alert(error.html_format);
|
||||
});
|
||||
}
|
||||
@ -207,10 +206,13 @@ export class CompletedPdComponent implements OnInit, OnChanges {
|
||||
if(res['dataStatus']==true)
|
||||
{
|
||||
this.dataSourceTab4 = res['records'];
|
||||
this.dataSourceTab4.paginator = this.paginator;
|
||||
}else{
|
||||
this.notifier.notify('warning', 'No Records Found !');
|
||||
|
||||
this.dataSourceTab4.paginator['length'] = 0;
|
||||
this.dataSourceTab4.paginator['pageIndex'] = 0;
|
||||
this.dataSourceTab4.data = [];
|
||||
this.dataSourceTab4.paginator = null;
|
||||
}
|
||||
},error => {
|
||||
this.errorMessage.push(error);
|
||||
|
||||
@ -26,7 +26,7 @@ export class InprogressPdComponent implements OnInit, OnChanges {
|
||||
private notifier: NotifierService;
|
||||
public dataLengthTab2: number;
|
||||
public dataSourceTab2 = new MatTableDataSource();
|
||||
tempStore = new MatTableDataSource();
|
||||
|
||||
displayedColumns = ['PDType','Name','Lenderid','Address','Status','Action'];
|
||||
|
||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||
@ -70,8 +70,9 @@ export class InprogressPdComponent implements OnInit, OnChanges {
|
||||
|
||||
// get changes for filter from parent componnet filter
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
let filteredText = changes.bindFilterValue.currentValue;
|
||||
filteredText = filteredText ? filteredText.trim() : filteredText;
|
||||
// let filteredText = changes.bindFilterValue.currentValue;
|
||||
// filteredText = filteredText ? filteredText.trim() : filteredText;
|
||||
let filteredText = changes.bindFilterValue.currentValue ? changes.bindFilterValue.currentValue.trim() : changes.bindFilterValue.currentValue;
|
||||
filteredText = filteredText ? filteredText.toLowerCase() : filteredText;
|
||||
this.dataSourceTab2.filter = filteredText;
|
||||
}
|
||||
@ -86,13 +87,11 @@ export class InprogressPdComponent implements OnInit, OnChanges {
|
||||
this.progressPdListData = data.records;
|
||||
this.dataLengthTab2 = data.records.length;
|
||||
this.dataSourceTab2.data = this.progressPdListData;
|
||||
this.tempStore.data = this.progressPdListData;
|
||||
|
||||
}else{
|
||||
this.notifier.notify('warning', 'No Records Found !');
|
||||
this.dataSourceTab2.data = [];
|
||||
this.dataSourceTab2.paginator = null;
|
||||
}
|
||||
}else{
|
||||
this.progressPdListData =[];
|
||||
this.dataSourceTab2 = null;
|
||||
this.recordStatus=true;
|
||||
}
|
||||
},error => {
|
||||
this.errorMessage.push(error);
|
||||
this.notifier.notify('warning', 'Something Went Wrong Try Again.!' + '-' + error.error_text + ' occur');
|
||||
@ -200,8 +199,9 @@ export class InprogressPdComponent implements OnInit, OnChanges {
|
||||
this.dataSourceTab2.paginator = this.paginator;
|
||||
}else{
|
||||
this.notifier.notify('warning', 'No Records Found !');
|
||||
this.dataSourceTab2.data = [];
|
||||
this.dataSourceTab2.paginator = null;
|
||||
this.dataSourceTab2.paginator['length'] = 0;
|
||||
this.dataSourceTab2.paginator['pageIndex'] = 0;
|
||||
this.dataSourceTab2.data = [];
|
||||
}
|
||||
},error => {
|
||||
this.errorMessage.push(error);
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
</span>
|
||||
<span *ngIf="Loading">
|
||||
<div fxLayoutAlign="center">
|
||||
<mat-progress-spinner mode="indeterminate">Loading ... </mat-progress-spinner>
|
||||
<mat-progress-spinner mode="indeterminate"></mat-progress-spinner>
|
||||
</div>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
@ -27,7 +27,6 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
|
||||
todaydate:Date = new Date();
|
||||
public dataLengthTab5: number;
|
||||
public dataSourceTab5 = new MatTableDataSource();
|
||||
tempStore = new MatTableDataSource();
|
||||
searchForm: FormGroup;
|
||||
displayedColumns = ['PDType', 'Name', 'Lenderid', 'Address', 'Status', 'Action'];
|
||||
private notifier: NotifierService;
|
||||
@ -40,7 +39,7 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
|
||||
|
||||
// data source variable details
|
||||
qcCompletedPdListData: any[] = [];
|
||||
|
||||
|
||||
// pagination variable details
|
||||
length = 5;
|
||||
pageIndex = 0;
|
||||
@ -94,7 +93,6 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
|
||||
this.qcCompletedPdListData = data.records;
|
||||
this.dataLengthTab5 = data.records.length;
|
||||
this.dataSourceTab5.data = this.qcCompletedPdListData;
|
||||
this.tempStore.data = this.qcCompletedPdListData;
|
||||
}
|
||||
else {
|
||||
this.qcCompletedPdListData = [];
|
||||
@ -105,6 +103,7 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
|
||||
// , error => this.errorMessage = <any>error);
|
||||
,error => {
|
||||
this.errorMessage.push(error);
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!' + '-' + error.error_text + ' occur');
|
||||
alert(error.html_format);
|
||||
});
|
||||
}
|
||||
@ -189,8 +188,9 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
|
||||
this.dataSourceTab5.paginator = this.paginator;
|
||||
}else{
|
||||
this.notifier.notify('warning', 'No Records Found !');
|
||||
this.dataSourceTab5.paginator['length'] = 0;
|
||||
this.dataSourceTab5.paginator['pageIndex'] = 0;
|
||||
this.dataSourceTab5.data = [];
|
||||
this.dataSourceTab5.paginator = null;
|
||||
}
|
||||
},error => {
|
||||
this.errorMessage.push(error);
|
||||
@ -204,8 +204,4 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
|
||||
this.loadPDDetails();
|
||||
this.xpandStatus = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -28,7 +28,6 @@ export class ScheduledPdComponent implements OnInit, OnChanges {
|
||||
public dataSourceTab3 = new MatTableDataSource();
|
||||
private notifier: NotifierService;
|
||||
|
||||
tempStore = new MatTableDataSource();
|
||||
displayedColumns = ['PDType','Name','Lenderid','Address','Status','Action'];
|
||||
|
||||
@ViewChild(MatPaginator) paginator: MatPaginator;
|
||||
@ -76,8 +75,9 @@ export class ScheduledPdComponent implements OnInit, OnChanges {
|
||||
|
||||
// get changes for filter from parent componnet filter
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
let filteredText = changes.bindFilterValue.currentValue;
|
||||
filteredText = filteredText ? filteredText.trim() : filteredText;
|
||||
// let filteredText = changes.bindFilterValue.currentValue;
|
||||
// filteredText = filteredText ? filteredText.trim() : filteredText;
|
||||
let filteredText = changes.bindFilterValue.currentValue ? changes.bindFilterValue.currentValue.trim() : changes.bindFilterValue.currentValue;
|
||||
filteredText = filteredText ? filteredText.toLowerCase() : filteredText;
|
||||
this.dataSourceTab3.filter = filteredText;
|
||||
}
|
||||
@ -92,8 +92,6 @@ export class ScheduledPdComponent implements OnInit, OnChanges {
|
||||
this.scheduledPdListData = data.records;
|
||||
this.dataLengthTab3 = data.records.length;
|
||||
this.dataSourceTab3.data = this.scheduledPdListData;
|
||||
this.tempStore.data = this.scheduledPdListData
|
||||
|
||||
}
|
||||
else{
|
||||
this.scheduledPdListData=[];
|
||||
@ -206,8 +204,9 @@ export class ScheduledPdComponent implements OnInit, OnChanges {
|
||||
this.dataSourceTab3.paginator = this.paginator;
|
||||
}else{
|
||||
this.notifier.notify('warning', 'No Records Found !');
|
||||
this.dataSourceTab3.paginator['length'] = 0;
|
||||
this.dataSourceTab3.paginator['pageIndex'] = 0;
|
||||
this.dataSourceTab3.data = [];
|
||||
this.dataSourceTab3.paginator = null;
|
||||
}
|
||||
},error => {
|
||||
this.errorMessage.push(error);
|
||||
|
||||
@ -351,15 +351,18 @@
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="{{doc.document}}" alt="{{doc.document_name}}"
|
||||
style="width: 100%;height: 100%;">
|
||||
<div class="top">
|
||||
<!-- Thumbnail-->
|
||||
<div class="thumbnail">
|
||||
<button mat-raised-button mat-icon-button class="date mr-1 mb-1 hover-icon" type="button" matTooltip="edit" (click)="imageCrop(doc)"
|
||||
matTooltipPosition="right">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<img src="{{doc.document}}" alt="{{doc.document_name}}">
|
||||
</div>
|
||||
<label *ngIf="doc.document_title != ''"
|
||||
style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
<button mat-button color="accent" (click)="imageCrop(doc)"
|
||||
class="mr-1 mb-1 hover-icon" matTooltip="Edit"
|
||||
matTooltipPosition="above" style=" text-align: center;">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -107,4 +107,10 @@ $product-bg-color-hover: rgba(103, 58, 183, 0.7);
|
||||
// width: 10px;
|
||||
// background: #62B013;
|
||||
// color: white;
|
||||
// }
|
||||
// }
|
||||
|
||||
.top .thumbnail .date {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: -10px;
|
||||
}
|
||||
@ -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);
|
||||
});
|
||||
|
||||
@ -111,7 +111,7 @@
|
||||
</ng-template>
|
||||
</mat-tab>-->
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<!-- <ng-template matTabContent>
|
||||
<div ngxViewer>
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
@ -204,8 +204,57 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</ng-template> -->
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top">
|
||||
<!-- Thumbnail-->
|
||||
<div class="thumbnail">
|
||||
<button mat-raised-button mat-icon-button class="date mr-1 mb-1 hover-icon" type="button" matTooltip="edit" (click)="imageCrop(doc)"
|
||||
matTooltipPosition="right">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<img src="{{doc.document}}" alt="{{doc.document_name}}">
|
||||
</div>
|
||||
<label *ngIf="doc.document_title != ''"
|
||||
style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20"
|
||||
*ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon
|
||||
style="color: #e00201;font-size: 60px !important;width:inherit !important;"
|
||||
(click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #noFiles>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
<!-- end assessed income tabs control -->
|
||||
|
||||
|
||||
@ -172,4 +172,8 @@
|
||||
// }
|
||||
|
||||
|
||||
|
||||
.top .thumbnail .date {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: -10px;
|
||||
}
|
||||
@ -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 = [];
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -430,40 +430,53 @@
|
||||
</mat-tab>
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="{{doc.document}}" alt="{{doc.document_name}}" style="width: 100%;height: 100%;">
|
||||
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top">
|
||||
<!-- Thumbnail-->
|
||||
<div class="thumbnail">
|
||||
<button mat-raised-button mat-icon-button class="date mr-1 mb-1 hover-icon" type="button" matTooltip="edit" (click)="imageCrop(doc)"
|
||||
matTooltipPosition="right">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<img src="{{doc.document}}" alt="{{doc.document_name}}">
|
||||
</div>
|
||||
<label *ngIf="doc.document_title != ''"
|
||||
style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20"
|
||||
fxFlex.lg="20" fxFlex.xl="20" *ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;" (click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20"
|
||||
*ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon
|
||||
style="color: #e00201;font-size: 60px !important;width:inherit !important;"
|
||||
(click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #noFiles>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
|
||||
@ -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%;
|
||||
|
||||
@ -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<AssetsInfoComponent>,
|
||||
@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"}
|
||||
|
||||
@ -220,42 +220,55 @@
|
||||
</mat-tab>
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="{{doc.document}}" alt="{{doc.document_name}}"style="width: 100%;height: 100%;">
|
||||
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top">
|
||||
<!-- Thumbnail-->
|
||||
<div class="thumbnail">
|
||||
<button mat-raised-button mat-icon-button class="date mr-1 mb-1 hover-icon" type="button" matTooltip="edit" (click)="imageCrop(doc)"
|
||||
matTooltipPosition="right">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<img src="{{doc.document}}" alt="{{doc.document_name}}">
|
||||
</div>
|
||||
<label *ngIf="doc.document_title != ''"
|
||||
style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20"
|
||||
fxFlex.lg="20" fxFlex.xl="20" *ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;" (click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20"
|
||||
*ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon
|
||||
style="color: #e00201;font-size: 60px !important;width:inherit !important;"
|
||||
(click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #noFiles>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab>
|
||||
|
||||
</mat-tab-group>
|
||||
</mat-dialog-content>
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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<BankingDetailsComponent>,
|
||||
@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 = [];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -458,45 +458,55 @@
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="{{doc.document}}" alt="{{doc.document_name}}"
|
||||
style="width: 100%;height: 100%;">
|
||||
<label *ngIf="doc.document_title != ''"
|
||||
style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20"
|
||||
fxFlex.lg="20" fxFlex.xl="20" *ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;"
|
||||
(click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top">
|
||||
<!-- Thumbnail-->
|
||||
<div class="thumbnail">
|
||||
<button mat-raised-button mat-icon-button class="date mr-1 mb-1 hover-icon" type="button" matTooltip="edit" (click)="imageCrop(doc)"
|
||||
matTooltipPosition="right">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<img src="{{doc.document}}" alt="{{doc.document_name}}">
|
||||
</div>
|
||||
<label *ngIf="doc.document_title != ''"
|
||||
style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20"
|
||||
*ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon
|
||||
style="color: #e00201;font-size: 60px !important;width:inherit !important;"
|
||||
(click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #noFiles>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
<ng-template #noFiles>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
</mat-dialog-content>
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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<BusinessAssetsInfoComponent>,
|
||||
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,
|
||||
|
||||
@ -148,44 +148,58 @@
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</mat-tab>
|
||||
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="{{doc.document}}" alt="{{doc.document_name}}"style="width: 100%;height: 100%;">
|
||||
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top">
|
||||
<!-- Thumbnail-->
|
||||
<div class="thumbnail">
|
||||
<button mat-raised-button mat-icon-button class="date mr-1 mb-1 hover-icon" type="button" matTooltip="edit" (click)="imageCrop(doc)"
|
||||
matTooltipPosition="right">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<img src="{{doc.document}}" alt="{{doc.document_name}}">
|
||||
</div>
|
||||
<label *ngIf="doc.document_title != ''"
|
||||
style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20"
|
||||
fxFlex.lg="20" fxFlex.xl="20" *ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;" (click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20"
|
||||
*ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon
|
||||
style="color: #e00201;font-size: 60px !important;width:inherit !important;"
|
||||
(click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #noFiles>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab>
|
||||
|
||||
</mat-tab-group>
|
||||
</mat-dialog-content>
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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<BusinessBankingDetailsComponent>,
|
||||
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 = [];
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -1856,43 +1856,56 @@
|
||||
</mat-tab>
|
||||
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="{{doc.document}}" alt="{{doc.document_name}}" style="width: 100%;height: 100%;">
|
||||
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top">
|
||||
<!-- Thumbnail-->
|
||||
<div class="thumbnail">
|
||||
<button mat-raised-button mat-icon-button class="date mr-1 mb-1 hover-icon" type="button" matTooltip="edit" (click)="imageCrop(doc)"
|
||||
matTooltipPosition="right">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<img src="{{doc.document}}" alt="{{doc.document_name}}">
|
||||
</div>
|
||||
<label *ngIf="doc.document_title != ''"
|
||||
style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20"
|
||||
*ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon
|
||||
style="color: #e00201;font-size: 60px !important;width:inherit !important;"
|
||||
(click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20"
|
||||
fxFlex.lg="20" fxFlex.xl="20" *ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;" (click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #noFiles>
|
||||
<ng-template #noFiles>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
|
||||
</mat-tab-group>
|
||||
</mat-dialog-content>
|
||||
|
||||
@ -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%;
|
||||
|
||||
@ -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 = [];
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -433,42 +433,55 @@
|
||||
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="{{doc.document}}" alt="{{doc.document_name}}"style="width: 100%;height: 100%;">
|
||||
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top">
|
||||
<!-- Thumbnail-->
|
||||
<div class="thumbnail">
|
||||
<button mat-raised-button mat-icon-button class="date mr-1 mb-1 hover-icon" type="button" matTooltip="edit" (click)="imageCrop(doc)"
|
||||
matTooltipPosition="right">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<img src="{{doc.document}}" alt="{{doc.document_name}}">
|
||||
</div>
|
||||
<label *ngIf="doc.document_title != ''"
|
||||
style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20"
|
||||
fxFlex.lg="20" fxFlex.xl="20" *ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;" (click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20"
|
||||
*ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon
|
||||
style="color: #e00201;font-size: 60px !important;width:inherit !important;"
|
||||
(click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #noFiles>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab>
|
||||
|
||||
</mat-tab-group>
|
||||
|
||||
|
||||
@ -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%;
|
||||
|
||||
@ -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<ClientInfoComponent>) {
|
||||
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 = [];
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -195,42 +195,55 @@
|
||||
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="{{doc.document}}" alt="{{doc.document_name}}"style="width: 100%;height: 100%;">
|
||||
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top">
|
||||
<!-- Thumbnail-->
|
||||
<div class="thumbnail">
|
||||
<button mat-raised-button mat-icon-button class="date mr-1 mb-1 hover-icon" type="button" matTooltip="edit" (click)="imageCrop(doc)"
|
||||
matTooltipPosition="right">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<img src="{{doc.document}}" alt="{{doc.document_name}}">
|
||||
</div>
|
||||
<label *ngIf="doc.document_title != ''"
|
||||
style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20"
|
||||
fxFlex.lg="20" fxFlex.xl="20" *ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;" (click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20"
|
||||
*ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon
|
||||
style="color: #e00201;font-size: 60px !important;width:inherit !important;"
|
||||
(click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #noFiles>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab>
|
||||
|
||||
</mat-tab-group>
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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<CurrentLoanComponent>,
|
||||
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 =
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<mat-toolbar-row>
|
||||
<mat-icon>crop_original</mat-icon>
|
||||
<span class="empty-little-spacer"></span>
|
||||
<h2 mat-dialog-title >{{this.data.document_title}}</h2>
|
||||
<h2 mat-dialog-title >{{doc_data.document_title}}</h2>
|
||||
<span class="empty-spacer"></span>
|
||||
<!-- Buttons -->
|
||||
<!-- <button mat-button color="accent"><mat-icon>zoom_in</mat-icon></button>-->
|
||||
@ -18,21 +18,31 @@
|
||||
</mat-toolbar>
|
||||
<mat-dialog-content>
|
||||
<div class="card-container">
|
||||
<span *ngIf="isBase64Image; else loader">
|
||||
<div class="container">
|
||||
<img [src]="baseImage">
|
||||
<img [src]="transform()">
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div style="text-align:center" *ngIf="cropflag">
|
||||
<button mat-button color="accent" (click)="crop()">Save</button>
|
||||
<button mat-button color="accent" (click)="closeDialogue()">Cancel</button>
|
||||
</div>
|
||||
<br/>
|
||||
<div style="text-align:center" *ngIf="cropflag">
|
||||
<span>Preview - Cropped Image </span>
|
||||
<button mat-button color="accent" (click)="crop()">Preview</button>
|
||||
<button mat-button color="accent" (click)="closeDialogue()">Cancel</button>
|
||||
<br/>
|
||||
<img [src]="cropImage">
|
||||
</div>
|
||||
<div *ngIf="previewflag">
|
||||
<span>Preview - Cropped Image </span>
|
||||
<br/>
|
||||
<img [src]="cropImage">
|
||||
<br/>
|
||||
<button mat-button color="accent" (click)="onSubmit()">Save</button>
|
||||
<button mat-button color="accent" (click)="closeDialogue()">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #loader>
|
||||
<div fxLayoutAlign="center">
|
||||
<mat-progress-spinner mode="indeterminate"></mat-progress-spinner>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-dialog-content>
|
||||
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -280,42 +280,55 @@
|
||||
</mat-tab>
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="{{doc.document}}" alt="{{doc.document_name}}"style="width: 100%;height: 100%;">
|
||||
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top">
|
||||
<!-- Thumbnail-->
|
||||
<div class="thumbnail">
|
||||
<button mat-raised-button mat-icon-button class="date mr-1 mb-1 hover-icon" type="button" matTooltip="edit" (click)="imageCrop(doc)"
|
||||
matTooltipPosition="right">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<img src="{{doc.document}}" alt="{{doc.document_name}}">
|
||||
</div>
|
||||
<label *ngIf="doc.document_title != ''"
|
||||
style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20"
|
||||
fxFlex.lg="20" fxFlex.xl="20" *ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;" (click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20"
|
||||
*ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon
|
||||
style="color: #e00201;font-size: 60px !important;width:inherit !important;"
|
||||
(click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #noFiles>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions>
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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<EmploymentInfoComponent>,
|
||||
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 = [];
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -271,42 +271,55 @@
|
||||
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="{{doc.document}}" alt="{{doc.document_name}}"style="width: 100%;height: 100%;">
|
||||
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top">
|
||||
<!-- Thumbnail-->
|
||||
<div class="thumbnail">
|
||||
<button mat-raised-button mat-icon-button class="date mr-1 mb-1 hover-icon" type="button" matTooltip="edit" (click)="imageCrop(doc)"
|
||||
matTooltipPosition="right">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<img src="{{doc.document}}" alt="{{doc.document_name}}">
|
||||
</div>
|
||||
<label *ngIf="doc.document_title != ''"
|
||||
style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20"
|
||||
fxFlex.lg="20" fxFlex.xl="20" *ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;" (click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20"
|
||||
*ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon
|
||||
style="color: #e00201;font-size: 60px !important;width:inherit !important;"
|
||||
(click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #noFiles>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab>
|
||||
|
||||
</mat-tab-group>
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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<FamilyDetailsComponent>,
|
||||
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);
|
||||
|
||||
@ -221,44 +221,57 @@
|
||||
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="{{doc.document}}" alt="{{doc.document_name}}" style="width: 100%;height: 100%;">
|
||||
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top">
|
||||
<!-- Thumbnail-->
|
||||
<div class="thumbnail">
|
||||
<button mat-raised-button mat-icon-button class="date mr-1 mb-1 hover-icon" type="button" matTooltip="edit" (click)="imageCrop(doc)"
|
||||
matTooltipPosition="right">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<img src="{{doc.document}}" alt="{{doc.document_name}}">
|
||||
</div>
|
||||
<label *ngIf="doc.document_title != ''"
|
||||
style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20"
|
||||
*ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon
|
||||
style="color: #e00201;font-size: 60px !important;width:inherit !important;"
|
||||
(click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20"
|
||||
fxFlex.lg="20" fxFlex.xl="20" *ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;" (click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #noFiles>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
<ng-template #noFiles>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
|
||||
</mat-tab-group>
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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<FinalRemarksComponent>,
|
||||
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 = [];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -587,42 +587,55 @@
|
||||
</mat-tab>
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="{{doc.document}}" alt="{{doc.document_name}}">
|
||||
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top">
|
||||
<!-- Thumbnail-->
|
||||
<div class="thumbnail">
|
||||
<button mat-raised-button mat-icon-button class="date mr-1 mb-1 hover-icon" type="button" matTooltip="edit" (click)="imageCrop(doc)"
|
||||
matTooltipPosition="right">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<img src="{{doc.document}}" alt="{{doc.document_name}}">
|
||||
</div>
|
||||
<label *ngIf="doc.document_title != ''"
|
||||
style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20"
|
||||
fxFlex.lg="20" fxFlex.xl="20" *ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;" (click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20"
|
||||
*ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon
|
||||
style="color: #e00201;font-size: 60px !important;width:inherit !important;"
|
||||
(click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #noFiles>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions>
|
||||
|
||||
@ -23,7 +23,11 @@
|
||||
.toggle{
|
||||
padding: 1.4rem;
|
||||
}
|
||||
|
||||
.top .thumbnail .date {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: -10px;
|
||||
}
|
||||
.underline input {
|
||||
border: none;
|
||||
}
|
||||
|
||||
@ -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<FinancialInfoComponent>,
|
||||
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 = [];
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -64,45 +64,55 @@
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="{{doc.document}}" alt="{{doc.document_name}}"
|
||||
style="width: 100%;height: 100%;">
|
||||
<label *ngIf="doc.document_title != ''"
|
||||
style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20"
|
||||
fxFlex.lg="20" fxFlex.xl="20" *ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;"
|
||||
(click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top">
|
||||
<!-- Thumbnail-->
|
||||
<div class="thumbnail">
|
||||
<button mat-raised-button mat-icon-button class="date mr-1 mb-1 hover-icon" type="button" matTooltip="edit" (click)="imageCrop(doc)"
|
||||
matTooltipPosition="right">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<img src="{{doc.document}}" alt="{{doc.document_name}}">
|
||||
</div>
|
||||
<label *ngIf="doc.document_title != ''"
|
||||
style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20"
|
||||
*ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon
|
||||
style="color: #e00201;font-size: 60px !important;width:inherit !important;"
|
||||
(click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #noFiles>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
<ng-template #noFiles>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
|
||||
</mat-tab-group>
|
||||
|
||||
@ -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%;
|
||||
}
|
||||
@ -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<FuturePlansAndBusinessEnvironmentComponent>,
|
||||
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 = [];
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,325 +13,377 @@
|
||||
</button>
|
||||
</div>
|
||||
</h2>
|
||||
|
||||
<mat-dialog-content style="border-bottom: 2px solid #e2412f8f;">
|
||||
<mat-tab-group>
|
||||
<mat-tab label="Questions">
|
||||
<ng-template matTabContent>
|
||||
<!-- individuals details start-->
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Name of Person(s) Met and Individual Loan Applicant(s) </mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<mat-table [dataSource]="individualsSource" *ngIf="_generalForm.controls.individuals['controls'].length>0"
|
||||
formArrayName="individuals">
|
||||
<ng-container matColumnDef="applicant_name">
|
||||
<mat-header-cell *matHeaderCellDef> Name </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<input matInput placeholder="ApplicantName" formControlName="applicant_name" [value]="details.get('applicant_name').value | titlecase"
|
||||
autocomplete="off" (change)="ApplicantName($event,details.value.pd_co_applicant_id)">
|
||||
<!-- {{details.value.applicant_name | titlecase}} -->
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="is_person_met">
|
||||
<mat-header-cell *matHeaderCellDef> Is Person Met </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<mat-checkbox class="table-checkbox" color="primary" formControlName="is_person_met"></mat-checkbox>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="is_applicant">
|
||||
<mat-header-cell *matHeaderCellDef> Is Applicant </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<mat-checkbox class="table-checkbox" color="primary" formControlName="is_applicant"></mat-checkbox>
|
||||
<!-- <button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeIndividuals(i)"
|
||||
<mat-tab-group>
|
||||
<mat-tab label="Questions">
|
||||
<ng-template matTabContent>
|
||||
<!-- individuals details start-->
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<mat-card-title>Name of Person(s) Met and Individual Loan Applicant(s) </mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<mat-table [dataSource]="individualsSource"
|
||||
*ngIf="_generalForm.controls.individuals['controls'].length>0"
|
||||
formArrayName="individuals">
|
||||
<ng-container matColumnDef="applicant_name">
|
||||
<mat-header-cell *matHeaderCellDef> Name </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<input matInput placeholder="ApplicantName" formControlName="applicant_name"
|
||||
[value]="details.get('applicant_name').value | titlecase" autocomplete="off"
|
||||
(change)="ApplicantName($event,details.value.pd_co_applicant_id)">
|
||||
<!-- {{details.value.applicant_name | titlecase}} -->
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="is_person_met">
|
||||
<mat-header-cell *matHeaderCellDef> Is Person Met </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<mat-checkbox class="table-checkbox" color="primary"
|
||||
formControlName="is_person_met"></mat-checkbox>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="is_applicant">
|
||||
<mat-header-cell *matHeaderCellDef> Is Applicant </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<mat-checkbox class="table-checkbox" color="primary"
|
||||
formControlName="is_applicant"></mat-checkbox>
|
||||
<!-- <button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeIndividuals(i)"
|
||||
matTooltip="Remove Individuals" matTooltipPosition="below">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button> -->
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="age">
|
||||
<mat-header-cell *matHeaderCellDef> Age </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<div class="example-container">
|
||||
<input matInput placeholder="Age" formControlName="age" minlength="1" maxlength="3"
|
||||
OnlyNumber type="text" autocomplete="off">
|
||||
<mat-error style="font-size:65%" *ngIf="details.controls['age'].invalid">Age Required</mat-error>
|
||||
<!-- <mat-error style="font-size:65%" *ngIf="_generalForm.controls.individuals.value[i].qualificationdetails.controls['age'].invalid">Age Required</mat-error> -->
|
||||
<!-- <mat-error style="font-size:65%" *ngIf="details.controls['age'].hasError('required')">Age Required</mat-error> -->
|
||||
</div>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="qualification">
|
||||
<mat-header-cell *matHeaderCellDef> Qualification </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<mat-select placeholder="Qualification" formControlName="qualification" style="width: 75%;">
|
||||
<mat-option *ngFor="let qual of qualificationList" [value]="qual.qualification_id">{{qual.qualification_name}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error style="font-size:65%" *ngIf="details.controls['qualification'].invalid">Qualification Required</mat-error>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="course_name">
|
||||
<mat-header-cell *matHeaderCellDef> </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i" [style.visibility]="_generalForm.controls.individuals.value[i].qualification == '' || _generalForm.controls.individuals.value[i].qualification == '4' || _generalForm.controls.individuals.value[i].qualification == '6' ? 'hidden':'visible'">
|
||||
<span class="example-container">
|
||||
<input matInput placeholder="Qualification Details" formControlName="course_name"
|
||||
autocomplete="off">
|
||||
<mat-error style="font-size:65%" *ngIf="details.controls['course_name'].invalid">Qualification Details Required</mat-error>
|
||||
</span>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="actions">
|
||||
<mat-header-cell *matHeaderCellDef> </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i =index;" [style.visibility]="_generalForm.controls.individuals.value[i].is_main_applicant == true ? 'hidden':'visible'">
|
||||
<!-- <button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="editIndividuals(details)"
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="age">
|
||||
<mat-header-cell *matHeaderCellDef> Age </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<div class="example-container">
|
||||
<input matInput placeholder="Age" formControlName="age" minlength="1"
|
||||
maxlength="3" OnlyNumber type="text" autocomplete="off">
|
||||
<mat-error style="font-size:65%" *ngIf="details.controls['age'].invalid">Age
|
||||
Required</mat-error>
|
||||
<!-- <mat-error style="font-size:65%" *ngIf="_generalForm.controls.individuals.value[i].qualificationdetails.controls['age'].invalid">Age Required</mat-error> -->
|
||||
<!-- <mat-error style="font-size:65%" *ngIf="details.controls['age'].hasError('required')">Age Required</mat-error> -->
|
||||
</div>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="qualification">
|
||||
<mat-header-cell *matHeaderCellDef> Qualification </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<mat-select placeholder="Qualification" formControlName="qualification"
|
||||
style="width: 75%;">
|
||||
<mat-option *ngFor="let qual of qualificationList"
|
||||
[value]="qual.qualification_id">{{qual.qualification_name}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error style="font-size:65%"
|
||||
*ngIf="details.controls['qualification'].invalid">Qualification Required
|
||||
</mat-error>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="course_name">
|
||||
<mat-header-cell *matHeaderCellDef> </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i"
|
||||
[style.visibility]="_generalForm.controls.individuals.value[i].qualification == '' || _generalForm.controls.individuals.value[i].qualification == '4' || _generalForm.controls.individuals.value[i].qualification == '6' ? 'hidden':'visible'">
|
||||
<span class="example-container">
|
||||
<input matInput placeholder="Qualification Details"
|
||||
formControlName="course_name" autocomplete="off">
|
||||
<mat-error style="font-size:65%"
|
||||
*ngIf="details.controls['course_name'].invalid">Qualification Details
|
||||
Required</mat-error>
|
||||
</span>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="actions">
|
||||
<mat-header-cell *matHeaderCellDef> </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i =index;"
|
||||
[style.visibility]="_generalForm.controls.individuals.value[i].is_main_applicant == true ? 'hidden':'visible'">
|
||||
<!-- <button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="editIndividuals(details)"
|
||||
matTooltip="Edit " matTooltipPosition="below">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button> -->
|
||||
<button type="button" class="mr-1 hover-icon" mat-raised-button mat-icon-button
|
||||
(click)="removeIndividuals(i,details)" matTooltip="Remove Individuals"
|
||||
matTooltipPosition="below">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
<button type="button" class="mr-1 hover-icon" mat-raised-button mat-icon-button
|
||||
(click)="removeIndividuals(i,details)" matTooltip="Remove Individuals"
|
||||
matTooltipPosition="below">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
<div *ngIf="_generalForm.controls.individuals.value[i].is_person_met_pic ">
|
||||
<img mat-card-avatar src="{{_generalForm.controls.individuals.value[i].is_person_met_pic}}" class="ml-0 mt-0 mb-0 mr-2 " ngxViewer>
|
||||
<img mat-card-avatar
|
||||
src="{{_generalForm.controls.individuals.value[i].is_person_met_pic}}"
|
||||
class="ml-0 mt-0 mb-0 mr-2 " ngxViewer>
|
||||
</div>
|
||||
<div *ngIf="_generalForm.controls.individuals.value[i].is_person_met_id_proof ">
|
||||
<img mat-card-avatar src="{{_generalForm.controls.individuals.value[i].is_person_met_id_proof}}" class="ml-0 mt-0 mb-0 mr-2 " ngxViewer>
|
||||
<img mat-card-avatar
|
||||
src="{{_generalForm.controls.individuals.value[i].is_person_met_id_proof}}"
|
||||
class="ml-0 mt-0 mb-0 mr-2 " ngxViewer>
|
||||
</div>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns;">
|
||||
</mat-row>
|
||||
</mat-table>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns;">
|
||||
</mat-row>
|
||||
</mat-table>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="center">
|
||||
<button type="button" mat-flat-button (click)="addMoreIndividuals()" matTooltip="Add More"
|
||||
matTooltipPosition="left" color="primary">
|
||||
<strong>Add More Person(s) </strong>
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
<!-- end -->
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="center">
|
||||
<button type="button" mat-flat-button (click)="addMoreIndividuals()" matTooltip="Add More"
|
||||
matTooltipPosition="left" color="primary">
|
||||
<strong>Add More Person(s) </strong>
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
<!-- end -->
|
||||
|
||||
<!-- RI month and year start-->
|
||||
<mat-card *ngIf="customer_segment_abbr == 'SE-RI'">
|
||||
<mat-card-title>Number of Years for which rental income is being received</mat-card-title>
|
||||
<mat-form-field style="width: 20%;">
|
||||
<mat-label>Year</mat-label>
|
||||
<input matInput placeholder="No of years (Eg. 10)" formControlName="rental_income_rcv_in_years" autocomplete="off"
|
||||
OnlyNumber type="text" required>
|
||||
<mat-error *ngIf="_generalForm.controls['rental_income_rcv_in_years'].invalid">Please Enter Correct Year</mat-error>
|
||||
<!-- <mat-error>Please Enter Correct Year</mat-error> -->
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 20%;">
|
||||
<mat-label>Month</mat-label>
|
||||
<input matInput type="text" placeholder="No of months (Eg. 6)" formControlName="rental_income_rcv_in_month"
|
||||
autocomplete="off" OnlyNumber type="text" (change)="ConvertMonthintoYearforBusiness($event.target.value,'',2)">
|
||||
</mat-form-field>
|
||||
</mat-card>
|
||||
<!-- RI month and year ends-->
|
||||
<!-- RI month and year start-->
|
||||
<mat-card *ngIf="customer_segment_abbr == 'SE-RI'">
|
||||
<mat-card-title>Number of Years for which rental income is being received</mat-card-title>
|
||||
<mat-form-field style="width: 20%;">
|
||||
<mat-label>Year</mat-label>
|
||||
<input matInput placeholder="No of years (Eg. 10)"
|
||||
formControlName="rental_income_rcv_in_years" autocomplete="off" OnlyNumber type="text"
|
||||
required>
|
||||
<mat-error *ngIf="_generalForm.controls['rental_income_rcv_in_years'].invalid">Please Enter
|
||||
Correct Year</mat-error>
|
||||
<!-- <mat-error>Please Enter Correct Year</mat-error> -->
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 20%;">
|
||||
<mat-label>Month</mat-label>
|
||||
<input matInput type="text" placeholder="No of months (Eg. 6)"
|
||||
formControlName="rental_income_rcv_in_month" autocomplete="off" OnlyNumber type="text"
|
||||
(change)="ConvertMonthintoYearforBusiness($event.target.value,'',2)">
|
||||
</mat-form-field>
|
||||
</mat-card>
|
||||
<!-- RI month and year ends-->
|
||||
|
||||
<!-- companies start -->
|
||||
<mat-card *ngIf="customer_segment_abbr != 'SE-RI'">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Company/Firm</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content formArrayName="companies">
|
||||
<div *ngFor="let com of _generalForm.controls.companies['controls']; let c = index;" [formGroupName]="c">
|
||||
<mat-card *ngIf="com.value.is_active==true">
|
||||
<mat-card-content>
|
||||
<mat-form-field style="width: 50%">
|
||||
<input matInput placeholder="Company/Firm" formControlName="company_name" type="text">
|
||||
</mat-form-field>
|
||||
<mat-checkbox class="table-checkbox-com" color="primary" formControlName="is_company_applicant">
|
||||
Is Applicant</mat-checkbox>
|
||||
<!-- companies start -->
|
||||
<mat-card *ngIf="customer_segment_abbr != 'SE-RI'">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Company/Firm</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content formArrayName="companies">
|
||||
<div *ngFor="let com of _generalForm.controls.companies['controls']; let c = index;"
|
||||
[formGroupName]="c">
|
||||
<mat-card *ngIf="com.value.is_active==true">
|
||||
<mat-card-content>
|
||||
<mat-form-field style="width: 50%">
|
||||
<input matInput placeholder="Company/Firm" formControlName="company_name"
|
||||
type="text">
|
||||
</mat-form-field>
|
||||
<mat-checkbox class="table-checkbox-com" color="primary"
|
||||
formControlName="is_company_applicant">
|
||||
Is Applicant</mat-checkbox>
|
||||
|
||||
<mat-form-field style="width: 45%;">
|
||||
<mat-select placeholder="Business Entity Type" formControlName="business_entity_type"
|
||||
(selectionChange)="checkEntityType(com.value.business_entity_type,c)" required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option [value]="entity.business_entity_type_id" *ngFor="let entity of businessEntityTypeList">{{entity.business_entity_type_name}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="com.controls['business_entity_type'].invalid">Business Entity Type Required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%;" *ngIf="com.controls.business_entity_type_other">
|
||||
<input matInput placeholder="Please Specify Others" formControlName="business_entity_type_other"
|
||||
required>
|
||||
<mat-error *ngIf="com.controls['business_entity_type_other'].invalid">Please Specify Others Required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%;">
|
||||
<mat-select placeholder="Business Entity Type"
|
||||
formControlName="business_entity_type"
|
||||
(selectionChange)="checkEntityType(com.value.business_entity_type,c)"
|
||||
required>
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option [value]="entity.business_entity_type_id"
|
||||
*ngFor="let entity of businessEntityTypeList">
|
||||
{{entity.business_entity_type_name}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="com.controls['business_entity_type'].invalid">Business
|
||||
Entity Type Required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%;"
|
||||
*ngIf="com.controls.business_entity_type_other">
|
||||
<input matInput placeholder="Please Specify Others"
|
||||
formControlName="business_entity_type_other" required>
|
||||
<mat-error *ngIf="com.controls['business_entity_type_other'].invalid">Please
|
||||
Specify Others Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<p>Number of Years For Which The Business Has Been Running</p>
|
||||
<mat-form-field style="width: 20%;"><mat-label>Year</mat-label>
|
||||
<input matInput placeholder="No of years (Eg. 10)" formControlName="business_years" autocomplete="off"
|
||||
OnlyNumber type="text" required>
|
||||
<mat-error *ngIf="com.controls['business_years'].invalid">Please Enter Correct Year</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 20%;">
|
||||
<mat-label>Month</mat-label>
|
||||
<input matInput type="text" placeholder="No of months (Eg. 6)" formControlName="business_month"
|
||||
autocomplete="off" OnlyNumber type="text" (change)="ConvertMonthintoYearforBusiness($event.target.value,c,1)">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 40%;">
|
||||
<input matInput [max]="maxDate" [matDatepicker]="picker" formControlName="business_date_object"
|
||||
(dateChange)="getDateObjects($event.target.value,c)" placeholder="Enter Date of Formation, If Available">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<p>Number of Years For Which The Business Has Been Running</p>
|
||||
<mat-form-field style="width: 20%;">
|
||||
<mat-label>Year</mat-label>
|
||||
<input matInput placeholder="No of years (Eg. 10)"
|
||||
formControlName="business_years" autocomplete="off" OnlyNumber
|
||||
type="text" required>
|
||||
<mat-error *ngIf="com.controls['business_years'].invalid">Please Enter
|
||||
Correct Year</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 20%;">
|
||||
<mat-label>Month</mat-label>
|
||||
<input matInput type="text" placeholder="No of months (Eg. 6)"
|
||||
formControlName="business_month" autocomplete="off" OnlyNumber
|
||||
type="text"
|
||||
(change)="ConvertMonthintoYearforBusiness($event.target.value,c,1)">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 40%;">
|
||||
<input matInput [max]="maxDate" [matDatepicker]="picker"
|
||||
formControlName="business_date_object"
|
||||
(dateChange)="getDateObjects($event.target.value,c)"
|
||||
placeholder="Enter Date of Formation, If Available">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
|
||||
<div fxLayout="row nowrap" [style.display]="'block'">
|
||||
<div align="right">
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button
|
||||
mat-icon-button (click)="removeCompanies(c)" *ngIf="com.value.is_active==true"
|
||||
matTooltip="Remove Company/Firm" matTooltipPosition="above">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div fxLayout="row nowrap" [style.display]="'block'">
|
||||
<div align="right">
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button
|
||||
mat-icon-button (click)="removeCompanies(c)"
|
||||
*ngIf="com.value.is_active==true" matTooltip="Remove Company/Firm"
|
||||
matTooltipPosition="above">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="center">
|
||||
<button mat-flat-button type="button" matTooltip="Add More" matTooltipPosition="above"
|
||||
color="primary" (click)="addMoreCompanies()"><strong>Add More
|
||||
Company/Firm</strong></button>
|
||||
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="center">
|
||||
<button mat-flat-button type="button" matTooltip="Add More" matTooltipPosition="above" color="primary"
|
||||
(click)="addMoreCompanies()"><strong>Add More Company/Firm</strong></button>
|
||||
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
<!-- companies end -->
|
||||
|
||||
<!-- companies end -->
|
||||
|
||||
<!-- Person Relationship Starts Here -->
|
||||
<mat-card *ngIf="_generalForm.controls.persons_with_relationships['controls'].length > 1">
|
||||
<mat-card-header>
|
||||
<mat-card-title> Relationship Between Individuals </mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<mat-table [dataSource]="relationSource" formArrayName="persons_with_relationships">
|
||||
<ng-container matColumnDef="applicant_name">
|
||||
<mat-header-cell *matHeaderCellDef> Name </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<!-- {{details.value | json}} -->
|
||||
<!-- <input type="hidden" [value]="delivery_extry" /> -->
|
||||
{{details.value.applicant_name | titlecase}}
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="relation">
|
||||
<mat-header-cell *matHeaderCellDef> Relation </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<mat-select placeholder="Relation" formControlName="relationship" style="width: 75%;"
|
||||
(selectionChange)="updatePersonalRelation(i)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option [value]="member.relationship_id" *ngFor="let member of relationShipList">{{member.name
|
||||
<!-- Person Relationship Starts Here -->
|
||||
<mat-card *ngIf="_generalForm.controls.persons_with_relationships['controls'].length > 1">
|
||||
<mat-card-header>
|
||||
<mat-card-title> Relationship Between Individuals </mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<mat-table [dataSource]="relationSource" formArrayName="persons_with_relationships">
|
||||
<ng-container matColumnDef="applicant_name">
|
||||
<mat-header-cell *matHeaderCellDef> Name </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<!-- {{details.value | json}} -->
|
||||
<!-- <input type="hidden" [value]="delivery_extry" /> -->
|
||||
{{details.value.applicant_name | titlecase}}
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="relation">
|
||||
<mat-header-cell *matHeaderCellDef> Relation </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<mat-select placeholder="Relation" formControlName="relationship"
|
||||
style="width: 75%;" (selectionChange)="updatePersonalRelation(i)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option [value]="member.relationship_id"
|
||||
*ngFor="let member of relationShipList">{{member.name
|
||||
+ ' of' | titlecase}}</mat-option>
|
||||
<mat-option value="0"> Not Applicable </mat-option>
|
||||
</mat-select>
|
||||
<mat-option value="0"> Not Applicable </mat-option>
|
||||
</mat-select>
|
||||
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="relation_to">
|
||||
<mat-header-cell *matHeaderCellDef> Relationship To </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i" [style.visibility]="_generalForm.controls.persons_with_relationships.value[i].relationship==0 ? 'hidden':'visible'">
|
||||
<mat-select placeholder="Applicant" formControlName="relation_to" style="width: 75%;"
|
||||
[disabled]="_generalForm.controls.persons_with_relationships.value[i].relationship==0">
|
||||
<mat-option>Select</mat-option>
|
||||
<!-- getRelationRestrict(_generalForm.controls.persons_with_relationships.value[i].pd_co_applicant_id,_generalForm.controls.persons_with_relationships.value,individualsList)" -->
|
||||
<mat-option *ngFor="let appc of individualsList | searchRelation : { currentApplicantID:_generalForm.controls.persons_with_relationships.value[i].pd_co_applicant_id, existRelationList:_generalForm.controls.persons_with_relationships.value}"
|
||||
[value]="appc.pd_co_applicant_id">{{appc.applicant_name | titlecase}}</mat-option>
|
||||
<mat-option value="0"> Not Applicable </mat-option>
|
||||
</mat-select>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="relation_to">
|
||||
<mat-header-cell *matHeaderCellDef> Relationship To </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i"
|
||||
[style.visibility]="_generalForm.controls.persons_with_relationships.value[i].relationship==0 ? 'hidden':'visible'">
|
||||
<mat-select placeholder="Applicant" formControlName="relation_to"
|
||||
style="width: 75%;"
|
||||
[disabled]="_generalForm.controls.persons_with_relationships.value[i].relationship==0">
|
||||
<mat-option>Select</mat-option>
|
||||
<!-- getRelationRestrict(_generalForm.controls.persons_with_relationships.value[i].pd_co_applicant_id,_generalForm.controls.persons_with_relationships.value,individualsList)" -->
|
||||
<mat-option
|
||||
*ngFor="let appc of individualsList | searchRelation : { currentApplicantID:_generalForm.controls.persons_with_relationships.value[i].pd_co_applicant_id, existRelationList:_generalForm.controls.persons_with_relationships.value}"
|
||||
[value]="appc.pd_co_applicant_id">{{appc.applicant_name | titlecase}}
|
||||
</mat-option>
|
||||
<mat-option value="0"> Not Applicable </mat-option>
|
||||
</mat-select>
|
||||
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<mat-header-row *matHeaderRowDef="secondDisplayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: secondDisplayedColumns;"></mat-row>
|
||||
<mat-header-row *matHeaderRowDef="secondDisplayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: secondDisplayedColumns;"></mat-row>
|
||||
|
||||
</mat-table>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<!-- Person Relationship Ends Here -->
|
||||
</mat-table>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<!-- Person Relationship Ends Here -->
|
||||
|
||||
<!-- company Relationship Start Here -->
|
||||
<mat-card *ngIf="customer_segment_abbr != 'SE-RI'">
|
||||
<mat-card-header>
|
||||
<!-- company Relationship Start Here -->
|
||||
<mat-card *ngIf="customer_segment_abbr != 'SE-RI'">
|
||||
<mat-card-header>
|
||||
|
||||
<mat-card-title> Relationship of Individuals to Company / Firm </mat-card-title>
|
||||
<mat-card-title> Relationship of Individuals to Company / Firm </mat-card-title>
|
||||
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
|
||||
|
||||
<mat-table [dataSource]="CompanySource" *ngIf="_generalForm.controls.company_with_relationships['controls'].length>0"
|
||||
formArrayName="company_with_relationships">
|
||||
<mat-table [dataSource]="CompanySource"
|
||||
*ngIf="_generalForm.controls.company_with_relationships['controls'].length>0"
|
||||
formArrayName="company_with_relationships">
|
||||
|
||||
<ng-container matColumnDef="applicant_name">
|
||||
<mat-header-cell *matHeaderCellDef> Applicant </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<ng-container matColumnDef="applicant_name">
|
||||
<mat-header-cell *matHeaderCellDef> Applicant </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
|
||||
<mat-select placeholder="Applicant" formControlName="applicant_name" style="width: 75%;">
|
||||
<mat-option *ngFor="let bothC of individualsListBothCase" [value]="bothC.pd_co_applicant_id">{{bothC.applicant_name
|
||||
<mat-select placeholder="Applicant" formControlName="applicant_name"
|
||||
style="width: 75%;">
|
||||
<mat-option *ngFor="let bothC of individualsListBothCase"
|
||||
[value]="bothC.pd_co_applicant_id">{{bothC.applicant_name
|
||||
| titlecase}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-select>
|
||||
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="company_relationship">
|
||||
<mat-header-cell *matHeaderCellDef> Relation </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<mat-select placeholder="Relation" formControlName="company_relationship" style="width: 75%;"
|
||||
(selectionChange)="updateCompanyRelation(i)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">
|
||||
{{comrelShip.name | titlecase}}
|
||||
</mat-option>
|
||||
<mat-option value="0"> Not Applicable </mat-option>
|
||||
</mat-select>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="company_relationship">
|
||||
<mat-header-cell *matHeaderCellDef> Relation </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<mat-select placeholder="Relation" formControlName="company_relationship"
|
||||
style="width: 75%;" (selectionChange)="updateCompanyRelation(i)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let comrelShip of companyRelationShipList"
|
||||
[value]="comrelShip.company_relationship_id">
|
||||
{{comrelShip.name | titlecase}}
|
||||
</mat-option>
|
||||
<mat-option value="0"> Not Applicable </mat-option>
|
||||
</mat-select>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="relation_to_company">
|
||||
<mat-header-cell *matHeaderCellDef> Company </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<ng-container matColumnDef="relation_to_company">
|
||||
<mat-header-cell *matHeaderCellDef> Company </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
|
||||
<mat-select placeholder="Company / Firm" formControlName="relation_to_company" style="width: 75%;"
|
||||
[style.visibility]="_generalForm.controls.company_with_relationships.value[i].company_relationship==0 ? 'hidden':'visible'">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let comp of companyList" [value]="comp.company_order_id">
|
||||
{{comp.company_name}}
|
||||
</mat-option>
|
||||
<mat-option value="0"> Not Applicable </mat-option>
|
||||
</mat-select>
|
||||
<mat-select placeholder="Company / Firm" formControlName="relation_to_company"
|
||||
style="width: 75%;"
|
||||
[style.visibility]="_generalForm.controls.company_with_relationships.value[i].company_relationship==0 ? 'hidden':'visible'">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let comp of companyList"
|
||||
[value]="comp.company_order_id">
|
||||
{{comp.company_name}}
|
||||
</mat-option>
|
||||
<mat-option value="0"> Not Applicable </mat-option>
|
||||
</mat-select>
|
||||
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button
|
||||
(click)="removeCompanyRelationship(i)" matTooltip="Remove Company Relationship"
|
||||
matTooltipPosition="below">
|
||||
<mat-icon>delete</mat-icon>
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button
|
||||
mat-icon-button (click)="removeCompanyRelationship(i)"
|
||||
matTooltip="Remove Company Relationship" matTooltipPosition="below">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
||||
<mat-header-row *matHeaderRowDef="thridDisplayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: thridDisplayedColumns;">
|
||||
</mat-row>
|
||||
</mat-table>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="center">
|
||||
<button type="button" mat-flat-button (click)="addCompanyRelationshipDialogue()"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary">
|
||||
<span
|
||||
*ngIf="_generalForm.controls.company_with_relationships['controls'].length == 0;else another;">
|
||||
<strong>Add Company Relationship</strong>
|
||||
</span>
|
||||
<ng-template #another><strong>Add More Company Relationship</strong></ng-template>
|
||||
</button>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
<!-- Company RelationShip Ends Here -->
|
||||
|
||||
|
||||
<mat-header-row *matHeaderRowDef="thridDisplayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: thridDisplayedColumns;">
|
||||
</mat-row>
|
||||
</mat-table>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="center">
|
||||
<button type="button" mat-flat-button (click)="addCompanyRelationshipDialogue()" matTooltip="Add More"
|
||||
matTooltipPosition="left" color="primary">
|
||||
<span *ngIf="_generalForm.controls.company_with_relationships['controls'].length == 0;else another;">
|
||||
<strong>Add Company Relationship</strong>
|
||||
</span>
|
||||
<ng-template #another><strong>Add More Company Relationship</strong></ng-template>
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
<!-- Company RelationShip Ends Here -->
|
||||
|
||||
<!-- -- <div fxLayout="row wrap" formArrayName="applicant_relation">
|
||||
<!-- -- <div fxLayout="row wrap" formArrayName="applicant_relation">
|
||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" *ngFor="let relation of _generalForm.controls.applicant_relation['controls']; let r = index;" [formGroupName]="r">
|
||||
<mat-card >
|
||||
<mat-card-header>
|
||||
@ -371,7 +423,7 @@
|
||||
|
||||
</div>
|
||||
</div>-->
|
||||
<!-- -- <p>Company/Firm Relationship</p>
|
||||
<!-- -- <p>Company/Firm Relationship</p>
|
||||
<div formArrayName="multiple_company_relation">
|
||||
<div fxLayout="row nowrap" *ngFor="let comRel of relation.get('multiple_company_relation').controls; let c = index" [formGroupName]="c">
|
||||
<mat-form-field style="width: 40%">
|
||||
@ -405,46 +457,62 @@
|
||||
</div>
|
||||
</div> -->
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="{{doc.document}}" alt="{{doc.document_name}}" style="width: 100%;height: 100%;">
|
||||
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
</mat-tab>
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top">
|
||||
<!-- Thumbnail-->
|
||||
<div class="thumbnail">
|
||||
<button mat-raised-button mat-icon-button
|
||||
class="date mr-1 mb-1 hover-icon" type="button"
|
||||
matTooltip="edit" (click)="imageCrop(doc)"
|
||||
matTooltipPosition="right">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<img src="{{doc.document}}" alt="{{doc.document_name}}">
|
||||
</div>
|
||||
<label *ngIf="doc.document_title != ''"
|
||||
style="font-size: 0.85rem">{{doc.document_title}}</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20"
|
||||
fxFlex.lg="20" fxFlex.xl="20" *ngIf="doc.document_type == 'pdf';">
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20"
|
||||
*ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;" (click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<mat-icon
|
||||
style="color: #e00201;font-size: 60px !important;width:inherit !important;"
|
||||
(click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #noFiles>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #noFiles>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions>
|
||||
<div fxFlex="60" class="pb-0 text-sm-left" align="left">
|
||||
@ -455,7 +523,8 @@
|
||||
</div>
|
||||
<div fxFlex="40" align="end">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Save"
|
||||
matTooltipPosition="above" [disabled]="disableAfterSubmit===true" (click)="submitGeneralForm(_generalForm.value)">
|
||||
matTooltipPosition="above" [disabled]="disableAfterSubmit===true"
|
||||
(click)="submitGeneralForm(_generalForm.value)">
|
||||
<mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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<GeneralInfoComponent>,private titleCase:TitleCasePipe,private imageRef: MatDialogRef<ImageCropComponent>) {
|
||||
constructor(notifier: NotifierService, private _fb: FormBuilder, private _pd: PdTrigerService, private dialog: MatDialog, @Inject(MAT_DIALOG_DATA) public pd_all_details: any, private dialogRef: MatDialogRef<GeneralInfoComponent>, private titleCase: TitleCasePipe, private imageRef: MatDialogRef<ImageCropComponent>) {
|
||||
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 = <FormArray>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 = <FormArray>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 = [];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@ -64,42 +64,55 @@
|
||||
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="{{doc.document}}" alt="{{doc.document_name}}"style="width: 100%;height: 100%;">
|
||||
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top">
|
||||
<!-- Thumbnail-->
|
||||
<div class="thumbnail">
|
||||
<button mat-raised-button mat-icon-button class="date mr-1 mb-1 hover-icon" type="button" matTooltip="edit" (click)="imageCrop(doc)"
|
||||
matTooltipPosition="right">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<img src="{{doc.document}}" alt="{{doc.document_name}}">
|
||||
</div>
|
||||
<label *ngIf="doc.document_title != ''"
|
||||
style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20"
|
||||
fxFlex.lg="20" fxFlex.xl="20" *ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;" (click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20"
|
||||
*ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon
|
||||
style="color: #e00201;font-size: 60px !important;width:inherit !important;"
|
||||
(click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #noFiles>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
</mat-dialog-content>
|
||||
|
||||
|
||||
@ -12,6 +12,11 @@
|
||||
padding: 0px;
|
||||
color: #e00201;
|
||||
}
|
||||
.top .thumbnail .date {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: -10px;
|
||||
}
|
||||
// .notificard{
|
||||
// width: 25%;
|
||||
// margin-top: -66px;
|
||||
|
||||
@ -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<LenderRepresentativeComponent>,
|
||||
@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 = [];
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -252,42 +252,55 @@
|
||||
</mat-tab>
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="{{doc.document}}" alt="{{doc.document_name}}"style="width: 100%;height: 100%;">
|
||||
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top">
|
||||
<!-- Thumbnail-->
|
||||
<div class="thumbnail">
|
||||
<button mat-raised-button mat-icon-button class="date mr-1 mb-1 hover-icon" type="button" matTooltip="edit" (click)="imageCrop(doc)"
|
||||
matTooltipPosition="right">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<img src="{{doc.document}}" alt="{{doc.document_name}}">
|
||||
</div>
|
||||
<label *ngIf="doc.document_title != ''"
|
||||
style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20"
|
||||
fxFlex.lg="20" fxFlex.xl="20" *ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;" (click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20"
|
||||
*ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon
|
||||
style="color: #e00201;font-size: 60px !important;width:inherit !important;"
|
||||
(click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #noFiles>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions>
|
||||
|
||||
@ -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%;
|
||||
|
||||
@ -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<LoanDetailsComponent>,
|
||||
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 = [];
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -227,42 +227,55 @@
|
||||
</mat-tab>
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="{{doc.document}}" alt="{{doc.document_name}}"style="width: 100%;height: 100%;">
|
||||
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top">
|
||||
<!-- Thumbnail-->
|
||||
<div class="thumbnail">
|
||||
<button mat-raised-button mat-icon-button class="date mr-1 mb-1 hover-icon" type="button" matTooltip="edit" (click)="imageCrop(doc)"
|
||||
matTooltipPosition="right">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<img src="{{doc.document}}" alt="{{doc.document_name}}">
|
||||
</div>
|
||||
<label *ngIf="doc.document_title != ''"
|
||||
style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20"
|
||||
fxFlex.lg="20" fxFlex.xl="20" *ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;" (click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20"
|
||||
*ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon
|
||||
style="color: #e00201;font-size: 60px !important;width:inherit !important;"
|
||||
(click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #noFiles>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
|
||||
<!-- <mat-card>
|
||||
|
||||
@ -14,7 +14,11 @@
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.top .thumbnail .date {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: -10px;
|
||||
}
|
||||
.example-radio-button {
|
||||
margin: 0 4%;
|
||||
color: #000 !important
|
||||
|
||||
@ -4,6 +4,7 @@ import { MatDialog, MatDialogRef, MAT_DIALOG_DATA , DialogPosition} from '@angul
|
||||
import { NotifierService } from 'angular-notifier';
|
||||
import { PdTrigerService } from './../../../../../pd-service/pd-triger.service';
|
||||
import { parse } from 'url';
|
||||
import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-neighbour-hood',
|
||||
@ -42,7 +43,7 @@ export class NeighbourHoodComponent implements OnInit {
|
||||
// amtInwords : any = [];
|
||||
|
||||
// isOtherApplicant: any = [];
|
||||
constructor(notifier: NotifierService, private _pd: PdTrigerService ,private _fb: FormBuilder, @Inject(MAT_DIALOG_DATA) public data: any,private dialogRef: MatDialogRef<NeighbourHoodComponent>) {
|
||||
constructor(notifier: NotifierService, private _pd: PdTrigerService ,private _fb: FormBuilder, @Inject(MAT_DIALOG_DATA) public data: any,private dialogRef: MatDialogRef<NeighbourHoodComponent>,private dialog: MatDialog,) {
|
||||
this.parent_pdid = this.data.pdmaster_details.parent_pd_id;
|
||||
this.pdid = this.data.pdmaster_details.pd_id;
|
||||
this.notifier = notifier;
|
||||
@ -105,25 +106,7 @@ export class NeighbourHoodComponent implements OnInit {
|
||||
// }
|
||||
// });
|
||||
|
||||
this._pd.retriveFile(this.pdid,'19',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);
|
||||
@ -553,5 +536,41 @@ getOtherOrganisationOwner(value,i) {
|
||||
|
||||
ChdCtrls.controls.other_organisation_owner.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,'19',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 = [];
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -155,42 +155,55 @@
|
||||
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="{{doc.document}}" alt="{{doc.document_name}}"style="width: 100%;height: 100%;">
|
||||
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top">
|
||||
<!-- Thumbnail-->
|
||||
<div class="thumbnail">
|
||||
<button mat-raised-button mat-icon-button class="date mr-1 mb-1 hover-icon" type="button" matTooltip="edit" (click)="imageCrop(doc)"
|
||||
matTooltipPosition="right">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<img src="{{doc.document}}" alt="{{doc.document_name}}">
|
||||
</div>
|
||||
<label *ngIf="doc.document_title != ''"
|
||||
style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20"
|
||||
fxFlex.lg="20" fxFlex.xl="20" *ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;" (click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20"
|
||||
*ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon
|
||||
style="color: #e00201;font-size: 60px !important;width:inherit !important;"
|
||||
(click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #noFiles>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab>
|
||||
|
||||
</mat-tab-group>
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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 = [];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -698,40 +698,53 @@
|
||||
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="{{doc.document}}" alt="{{doc.document_name}}" style="width: 100%;height: 100%;">
|
||||
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top">
|
||||
<!-- Thumbnail-->
|
||||
<div class="thumbnail">
|
||||
<button mat-raised-button mat-icon-button class="date mr-1 mb-1 hover-icon" type="button" matTooltip="edit" (click)="imageCrop(doc)"
|
||||
matTooltipPosition="right">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<img src="{{doc.document}}" alt="{{doc.document_name}}">
|
||||
</div>
|
||||
<label *ngIf="doc.document_title != ''"
|
||||
style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20"
|
||||
fxFlex.lg="20" fxFlex.xl="20" *ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;" (click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20"
|
||||
*ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon
|
||||
style="color: #e00201;font-size: 60px !important;width:inherit !important;"
|
||||
(click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #noFiles>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
|
||||
|
||||
@ -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%;
|
||||
}
|
||||
|
||||
@ -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<ManageRentalVerificationComponent>) {
|
||||
constructor(notifier: NotifierService, private _pd: PdTrigerService ,private _fb: FormBuilder, @Inject(MAT_DIALOG_DATA) public data: any,private dialogRef: MatDialogRef<ManageRentalVerificationComponent>,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 => {
|
||||
|
||||
@ -389,42 +389,55 @@
|
||||
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="{{doc.document}}" alt="{{doc.document_name}}"style="width: 100%;height: 100%;">
|
||||
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top">
|
||||
<!-- Thumbnail-->
|
||||
<div class="thumbnail">
|
||||
<button mat-raised-button mat-icon-button class="date mr-1 mb-1 hover-icon" type="button" matTooltip="edit" (click)="imageCrop(doc)"
|
||||
matTooltipPosition="right">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<img src="{{doc.document}}" alt="{{doc.document_name}}">
|
||||
</div>
|
||||
<label *ngIf="doc.document_title != ''"
|
||||
style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20"
|
||||
fxFlex.lg="20" fxFlex.xl="20" *ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;" (click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20"
|
||||
*ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon
|
||||
style="color: #e00201;font-size: 60px !important;width:inherit !important;"
|
||||
(click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #noFiles>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab>
|
||||
|
||||
</mat-tab-group>
|
||||
</mat-dialog-content>
|
||||
|
||||
@ -104,6 +104,10 @@ $product-bg-color-hover: rgba(103, 58, 183, 0.7);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.top .thumbnail .date {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: -10px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<StockComponent>,
|
||||
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 = [];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@ -296,42 +296,55 @@
|
||||
|
||||
<mat-tab label="Docs">
|
||||
<ng-template matTabContent>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" style="width: 60%;height: auto;" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top"> <img src="{{doc.document}}" alt="{{doc.document_name}}"style="width: 100%;height: 100%;">
|
||||
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
<div ngxViewer *ngIf="documentsAndFilesList.length>0; else noFiles">
|
||||
<div fxLayout="row wrap" style="padding:20px;">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="20" class="m-gap p-gap" *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="p-list-main mb-2" *ngIf="doc.document_type != 'pdf'">
|
||||
<div class="p-list">
|
||||
<div class="top">
|
||||
<!-- Thumbnail-->
|
||||
<div class="thumbnail">
|
||||
<button mat-raised-button mat-icon-button class="date mr-1 mb-1 hover-icon" type="button" matTooltip="edit" (click)="imageCrop(doc)"
|
||||
matTooltipPosition="right">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<img src="{{doc.document}}" alt="{{doc.document_name}}">
|
||||
</div>
|
||||
<label *ngIf="doc.document_title != ''"
|
||||
style="font-size: 0.85rem">{{doc.document_title}}</label></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50" fxFlex.md="20"
|
||||
fxFlex.lg="20" fxFlex.xl="20" *ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon style="color: #e00201;font-size: 60px !important;width:inherit !important;" (click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
<div fxFlex="row">
|
||||
<div fxFlex="100" class="m-gap p-gap">
|
||||
<div fxLayout="row" fxLayoutWrap="wrap">
|
||||
<div *ngFor="let doc of documentsAndFilesList">
|
||||
<div class="text-center mb-2 hover-icon" fxFlex.xs="50" fxFlex.sm="50"
|
||||
fxFlex.md="20" fxFlex.lg="20" fxFlex.xl="20"
|
||||
*ngIf="doc.document_type == 'pdf';">
|
||||
<!-- <a href="http://www.google.com" target="_blank"> -->
|
||||
<mat-icon
|
||||
style="color: #e00201;font-size: 60px !important;width:inherit !important;"
|
||||
(click)="pdf(doc.document)">picture_as_pdf</mat-icon>
|
||||
<span class="d-block">{{doc.document_title}}</span>
|
||||
<!-- </a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #noFiles>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
<mat-card-content>
|
||||
<p style="margin: 20px;">No Files</p>
|
||||
</mat-card-content>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab>
|
||||
|
||||
</mat-tab-group>
|
||||
|
||||
|
||||
@ -92,5 +92,9 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.top .thumbnail .date {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: -10px;
|
||||
}
|
||||
}
|
||||
@ -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<SupplierInfoComponent>) {
|
||||
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 = [];
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -725,5 +725,15 @@ export class PdTrigerService {
|
||||
)
|
||||
}
|
||||
|
||||
getBase64ImageFromURL(url): Observable<any> {
|
||||
return this._http.post(this.apiUrl + 'convertBase64', { "img_url":url })
|
||||
.pipe(catchError(this.handleError('role', [])))
|
||||
}
|
||||
|
||||
updatePDPhoto(values): Observable<any> {
|
||||
values.fk_updatedby = this._aws.getlocale();
|
||||
return this._http.post(this.apiUrl + 'updatePDPhoto', { "records":values })
|
||||
.pipe(catchError(this.handleError('role', [])))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -12,15 +12,12 @@
|
||||
<mat-tab-group (selectedTabChange)="onTabClick($event)">
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label><mat-icon>done</mat-icon> Completed </ng-template>
|
||||
<app-completed-pd [bindFilterValue]="filterValue" (loadPdView)="viewPDDetails($event)"></app-completed-pd>
|
||||
<app-completed-pd [bindFilterValue]="filterValue" (loadPdView)="viewPDDetails($event)"></app-completed-pd>
|
||||
</mat-tab>
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label><mat-icon>done_all</mat-icon> QC Completed </ng-template>
|
||||
<app-qc-completed-pd [bindFilterValue]="filterValue" (loadPdView)="viewPDDetails($event)"></app-qc-completed-pd>
|
||||
|
||||
|
||||
</mat-tab>
|
||||
|
||||
</mat-tab-group>
|
||||
</mat-card>
|
||||
</mat-card-content>
|
||||
|
||||
@ -2,7 +2,8 @@
|
||||
<div class="form-bg">
|
||||
<div fxLayout="row" fxLayoutAlign="center" class="pt-2">
|
||||
<!-- <p>SINEEDGE Login Details</p> -->
|
||||
<h3 class="page-title"><img [src]="'http://ssa.sineedge.com/sparqapi/logo/sineedge_red.png'" style="height: 50px;;"> <span> SINEEDGE </span>
|
||||
<!-- [src]="'http://ssa.sineedge.com/sparqapi/logo/sineedge_red.png'" -->
|
||||
<h3 class="page-title"><img src="assets/images/PD.jpeg" style="height: 50px;;"> <span> PD Genie </span>
|
||||
</h3>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutAlign="center start" class="pt-2">
|
||||
|
||||
BIN
ng6-seed/src/assets/images/PD.jpeg
Normal file
BIN
ng6-seed/src/assets/images/PD.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
Loading…
Reference in New Issue
Block a user