This commit is contained in:
venbatechnologies@gmail.com 2019-06-24 19:12:00 +05:30
parent 873ab9da68
commit fb2eabd4f5
80 changed files with 2368 additions and 1445 deletions

View File

@ -4,9 +4,11 @@
<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><img src="assets/images/PD.jpeg" style="height: 50px;;"> <span> {{userDep}} </span>
</h2>
</div>
<div class="main-nav">
@ -102,7 +104,9 @@
<!--<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>
<!-- <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>

View File

@ -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);

View File

@ -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> -->

View File

@ -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);

View File

@ -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,12 +87,10 @@ 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;
this.progressPdListData =[];
this.dataSourceTab2 = null;
this.recordStatus=true;
}
},error => {
this.errorMessage.push(error);
@ -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.paginator['length'] = 0;
this.dataSourceTab2.paginator['pageIndex'] = 0;
this.dataSourceTab2.data = [];
this.dataSourceTab2.paginator = null;
}
},error => {
this.errorMessage.push(error);

View File

@ -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>

View File

@ -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;
@ -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;
}
}

View File

@ -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);

View File

@ -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%;">
<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;">
<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>

View File

@ -108,3 +108,9 @@ $product-bg-color-hover: rgba(103, 58, 183, 0.7);
// background: #62B013;
// color: white;
// }
.top .thumbnail .date {
position: absolute;
top: 4px;
right: -10px;
}

View File

@ -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();
}
});
}
@ -774,17 +779,22 @@ export class AddressComponent implements OnInit {
// 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);
});

View File

@ -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,6 +204,55 @@
</div>
</div>
</div>
</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>

View File

@ -172,4 +172,8 @@
// }
.top .thumbnail .date {
position: absolute;
top: 4px;
right: -10px;
}

View File

@ -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 = [];
}
});
}
}

View File

@ -434,10 +434,20 @@
<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-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%;">
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
<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>
@ -446,10 +456,13 @@
<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 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>
<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>

View File

@ -15,6 +15,12 @@
justify-content: center !important;
}
.top .thumbnail .date {
position: absolute;
top: 4px;
right: -10px;
}
mat-form-field {
margin: 0 2%;
}

View File

@ -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"}

View File

@ -224,10 +224,20 @@
<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-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%;">
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
<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>
@ -236,10 +246,13 @@
<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 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>
<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>

View File

@ -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;
}

View File

@ -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 = [];
}
});
}
}

View File

@ -463,12 +463,20 @@
<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-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>
</div>
</div>
</div>
@ -477,10 +485,12 @@
<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 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;"
<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> -->

View File

@ -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;

View File

@ -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 */
@ -1163,6 +1145,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 = {

View File

@ -148,16 +148,27 @@
</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-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%;">
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
<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>
@ -166,10 +177,13 @@
<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 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>
<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>

View File

@ -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;
}

View File

@ -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 = [];
}
});
}
}

View File

@ -1861,10 +1861,20 @@
<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-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%;">
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
<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>
@ -1873,10 +1883,13 @@
<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 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>
<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>

View File

@ -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%;

View File

@ -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 = [];
}
});
}
}

View File

@ -437,10 +437,20 @@
<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-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%;">
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
<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>
@ -449,10 +459,13 @@
<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 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>
<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>

View File

@ -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%;

View File

@ -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 = [];
}
});
}
}

View File

@ -199,10 +199,20 @@
<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-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%;">
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
<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>
@ -211,10 +221,13 @@
<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 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>
<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>

View File

@ -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);

View File

@ -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 =

View File

@ -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)="crop()">Preview</button>
<button mat-button color="accent" (click)="closeDialogue()">Cancel</button>
</div>
<br/>
<div style="text-align:center" *ngIf="cropflag">
<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>

View File

@ -284,10 +284,20 @@
<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-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%;">
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
<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>
@ -296,10 +306,13 @@
<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 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>
<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>

View File

@ -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;
}

View File

@ -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 = [];
}
});
}
}

View File

@ -275,10 +275,20 @@
<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-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%;">
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
<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>
@ -287,10 +297,13 @@
<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 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>
<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>

View File

@ -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;

View File

@ -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);

View File

@ -227,10 +227,20 @@
<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-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%;">
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
<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>
@ -239,10 +249,13 @@
<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 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>
<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>

View File

@ -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;

View File

@ -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 = [];
}
});
}
}

View File

@ -591,10 +591,20 @@
<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-main mb-2" *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 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>
@ -603,10 +613,13 @@
<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 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>
<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>

View File

@ -23,7 +23,11 @@
.toggle{
padding: 1.4rem;
}
.top .thumbnail .date {
position: absolute;
top: 4px;
right: -10px;
}
.underline input {
border: none;
}

View File

@ -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 = [];
}
});
}
}

View File

@ -69,12 +69,20 @@
<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-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>
</div>
</div>
</div>
@ -83,10 +91,12 @@
<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 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;"
<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> -->

View File

@ -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%;
}

View File

@ -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 = [];
}
});
}
}

View File

@ -13,6 +13,7 @@
</button>
</div>
</h2>
<mat-dialog-content style="border-bottom: 2px solid #e2412f8f;">
<mat-tab-group>
<mat-tab label="Questions">
@ -23,26 +24,30 @@
<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"
<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)">
<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-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>
<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>
@ -53,9 +58,10 @@
<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>
<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>
@ -64,25 +70,33 @@
<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 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-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'">
<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>
<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'">
<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>
@ -93,10 +107,14 @@
<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>
@ -120,15 +138,18 @@
<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>
<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)">
<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-->
@ -139,43 +160,60 @@
<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">
<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">
<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">
<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"
<mat-select placeholder="Business Entity Type"
formControlName="business_entity_type"
(selectionChange)="checkEntityType(com.value.business_entity_type,c)"
required>
<mat-error *ngIf="com.controls['business_entity_type_other'].invalid">Please Specify Others Required</mat-error>
<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 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)">
<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">
<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>
@ -183,8 +221,9 @@
<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-button (click)="removeCompanies(c)"
*ngIf="com.value.is_active==true" matTooltip="Remove Company/Firm"
matTooltipPosition="above">
<mat-icon>delete</mat-icon>
</button>
</div>
@ -194,8 +233,9 @@
</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>
<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>
@ -220,10 +260,11 @@
<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-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
<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>
@ -232,13 +273,17 @@
</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%;"
<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
*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>
@ -263,15 +308,18 @@
<mat-card-content>
<mat-table [dataSource]="CompanySource" *ngIf="_generalForm.controls.company_with_relationships['controls'].length>0"
<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">
<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>
@ -280,10 +328,11 @@
<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-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">
<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>
@ -295,18 +344,20 @@
<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%;"
<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">
<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">
<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>
@ -320,9 +371,10 @@
</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;">
<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>
@ -412,10 +464,23 @@
<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-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%;">
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
<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>
@ -424,10 +489,13 @@
<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 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>
<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>
@ -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>

View File

@ -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;

View File

@ -18,8 +18,29 @@ import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component'
styleUrls: ['./general-info.component.scss'],
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";
@ -115,26 +136,7 @@ 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 **********************************/
@ -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: '',
@ -684,8 +674,7 @@ 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();
@ -862,24 +851,42 @@ export class GeneralInfoComponent implements OnInit {
// });
// }
/** 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 = [];
}
});
}
}

View File

@ -68,10 +68,20 @@
<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-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%;">
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
<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>
@ -80,10 +90,13 @@
<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 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>
<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>

View File

@ -12,6 +12,11 @@
padding: 0px;
color: #e00201;
}
.top .thumbnail .date {
position: absolute;
top: 4px;
right: -10px;
}
// .notificard{
// width: 25%;
// margin-top: -66px;

View File

@ -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 = [];
}
});
}
}

View File

@ -256,10 +256,20 @@
<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-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%;">
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
<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>
@ -268,10 +278,13 @@
<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 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>
<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>

View File

@ -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%;

View File

@ -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 = [];
}
});
}
}

View File

@ -231,10 +231,20 @@
<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-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%;">
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
<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>
@ -243,10 +253,13 @@
<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 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>
<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>

View File

@ -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

View File

@ -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 = [];
}
});
}
}

View File

@ -159,10 +159,20 @@
<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-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%;">
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
<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>
@ -171,10 +181,13 @@
<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 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>
<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>

View File

@ -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;
}

View File

@ -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 = [];
}
});
}
}

View File

@ -702,10 +702,20 @@
<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-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%;">
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
<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>
@ -714,10 +724,13 @@
<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 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>
<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>

View File

@ -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%;
}

View File

@ -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 => {

View File

@ -393,10 +393,20 @@
<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-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%;">
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
<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>
@ -405,10 +415,13 @@
<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 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>
<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>

View File

@ -104,6 +104,10 @@ $product-bg-color-hover: rgba(103, 58, 183, 0.7);
}
}
}
.top .thumbnail .date {
position: absolute;
top: 4px;
right: -10px;
}
}

View File

@ -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 = [];
}
});
}
}

View File

@ -300,10 +300,20 @@
<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-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%;">
<label *ngIf="doc.document_title != ''" style="font-size: 0.85rem">{{doc.document_title}}</label></div>
<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>
@ -312,10 +322,13 @@
<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 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>
<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>

View File

@ -92,5 +92,9 @@
}
}
}
.top .thumbnail .date {
position: absolute;
top: 4px;
right: -10px;
}
}

View File

@ -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 = [];
}
});
}
}

View File

@ -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', [])))
}
}

View File

@ -17,10 +17,7 @@
<mat-tab>
<ng-template mat-tab-label><mat-icon>done_all</mat-icon>&nbsp;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>

View File

@ -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">

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB