image capture added in all form

This commit is contained in:
sriram-at-840620226347 2020-10-16 12:06:08 +05:30
parent 186cd67d24
commit 9de43da94c
21 changed files with 599 additions and 117 deletions

View File

@ -4048,6 +4048,11 @@
}
}
},
"exifr": {
"version": "4.3.5",
"resolved": "https://registry.npmjs.org/exifr/-/exifr-4.3.5.tgz",
"integrity": "sha512-ir36aoochREnTekiEOqY0yuUjmj4oPWMDE3NTKJoz9Yuz/m5V9nWu1p4UStOOuhJI4Wz+p0nRpuqZNKeAIkhQw=="
},
"exit": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz",
@ -5473,6 +5478,11 @@
}
}
},
"glur": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/glur/-/glur-1.1.2.tgz",
"integrity": "sha1-8g6jbbEDv8KSNDkh8fkeg8NGdok="
},
"graceful-fs": {
"version": "4.1.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
@ -7643,6 +7653,15 @@
"integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=",
"dev": true
},
"multimath": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/multimath/-/multimath-2.0.0.tgz",
"integrity": "sha512-toRx66cAMJ+Ccz7pMIg38xSIrtnbozk0dchXezwQDMgQmbGpfxjtv68H+L00iFL8hxDaVjrmwAFSb3I6bg8Q2g==",
"requires": {
"glur": "^1.1.2",
"object-assign": "^4.1.1"
}
},
"nan": {
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.11.0.tgz",
@ -7712,6 +7731,15 @@
"resolved": "https://registry.npmjs.org/ng2-file-upload/-/ng2-file-upload-1.2.1.tgz",
"integrity": "sha1-VWPF39b0P7++gVwgbjQ0ZKCmoZc="
},
"ng2-img-max": {
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/ng2-img-max/-/ng2-img-max-2.2.4.tgz",
"integrity": "sha512-pcbQJT3N6YEv3Zn4gfTwFEkPFLFuznc6IQAyddTjVSiJV0ilxF+QZ5CkyQEhaY7zw4gFALh54R8ZQjv97njlFw==",
"requires": {
"exifr": "^4.3.4",
"ng2-pica": "^1.3.1"
}
},
"ng2-pdf-viewer": {
"version": "5.2.4",
"resolved": "https://registry.npmjs.org/ng2-pdf-viewer/-/ng2-pdf-viewer-5.2.4.tgz",
@ -7721,6 +7749,15 @@
"pdfjs-dist": "2.0.943"
}
},
"ng2-pica": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/ng2-pica/-/ng2-pica-1.3.1.tgz",
"integrity": "sha512-NkvJJM8QAtgkwGYy+WNl3Pzzc0Gfs573tHLemCKmN8DmVQ7onXvhuxzAkTqs6rDYILOTULBI5m0KbCLJLfNiaQ==",
"requires": {
"exifr": "^4.3.4",
"pica": ">=4.0.1"
}
},
"ng2-toastr": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/ng2-toastr/-/ng2-toastr-4.1.2.tgz",
@ -8700,6 +8737,17 @@
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
},
"pica": {
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/pica/-/pica-6.1.1.tgz",
"integrity": "sha512-dmjQheDGFOl+30rQhN3NM3MyDNjeOZvco6IL3ZVYgyVDmhgvcSCGOAsydRCIaZ36mcXO7ci0XFeD+h6unEcBvA==",
"requires": {
"inherits": "^2.0.3",
"multimath": "^2.0.0",
"object-assign": "^4.1.1",
"webworkify": "^1.5.0"
}
},
"pify": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
@ -11583,6 +11631,11 @@
"neo-async": "^2.5.0"
}
},
"watermarkjs": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/watermarkjs/-/watermarkjs-2.1.1.tgz",
"integrity": "sha512-HDabpga8Fz5d61Z7gBkKO2cDsfViAU/mO5qIoWmDX92wJZLb7Dv4L+CwoHAqS4XkqWcYVGy/AF035BD1EN3v/g=="
},
"wbuf": {
"version": "1.7.3",
"resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz",
@ -12080,6 +12133,11 @@
"integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==",
"dev": true
},
"webworkify": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/webworkify/-/webworkify-1.5.0.tgz",
"integrity": "sha512-AMcUeyXAhbACL8S2hqqdqOLqvJ8ylmIbNwUIqQujRSouf4+eUFaXbG6F1Rbu+srlJMmxQWsiU7mOJi0nMBfM1g=="
},
"when": {
"version": "3.6.4",
"resolved": "https://registry.npmjs.org/when/-/when-3.6.4.tgz",

View File

@ -56,6 +56,7 @@
"ng2-ckeditor": "^1.2.2",
"ng2-dragula": "1.3.1",
"ng2-file-upload": "1.2.1",
"ng2-img-max": "^2.2.4",
"ng2-pdf-viewer": "^5.2.4",
"ng2-toastr": "^4.1.2",
"ng2-validation": "4.2.0",
@ -75,6 +76,7 @@
"sweetalert2": "^7.33.1",
"tether": "^1.4.6",
"viewerjs": "^1.3.3",
"watermarkjs": "^2.1.1",
"xlsx": "^0.14.2",
"zone.js": "^0.8.29"
},

View File

@ -0,0 +1,12 @@
import { TestBed } from '@angular/core/testing';
import { CameraService } from './camera.service';
describe('CameraService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: CameraService = TestBed.get(CameraService);
expect(service).toBeTruthy();
});
});

View File

@ -0,0 +1,111 @@
import { Injectable } from '@angular/core';
import { DatePipe } from '@angular/common';
import * as watermark from 'watermarkjs';
@Injectable({
providedIn: 'root'
})
export class CameraService {
pipe = new DatePipe('en-US')
constructor() {
setTimeout(()=>{
this.getPosition().then(res=>{
console.log("geolocation",res)
},err=>{
console.log("Error in geo",err);
})
},2000)
}
addWatermarks(base64Img,geoCords?) {
return new Promise((resolve, reject) => {
// this.constant.getGeoTag().then(geoCoordinates => {
// this.getPosition().then(geoCords=>{
// console.log(geoCords);
// this.geoCords = geoCoordinates
// });
// this.geoCords=localStorage.getItem('current_coordinates')
// console.log("corrds",this.geoCords)
let raw_img = base64Img
var today = new Date();
// let today_loc = today.toLocaleString('en-US', { timeZone: "Asia/Kolkata" })
let today_loc=this.pipe.transform(today, 'yyyy-MM-dd, h:mm a')
var date = today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate();
// var time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
var dateTime = 'Date : ' + today_loc;
console.log(date)
// fetch(raw_img)
// .then(res => res.blob())
// .then(blob => {
watermark([raw_img, 'assets/images/PD_watermark.png'])
.image(watermark.image.upperRight())
.then(img => {
raw_img = img.src;
let text = watermark.text
watermark([raw_img])
.image(text.upperLeft(dateTime, '19px sans-serif', '#ff0000', 1.0))
// .image(text.upperLeft(dateTime, '20px sans-serif', '#ff0000', 1.0))
.then(img => {
raw_img = img.src;
console.log("2d", raw_img)
// resolve(img.src)
console.log(geoCords)
// let geoCoordinates = geoCords ? geoCords : '-'
if(geoCords) {
let Location = `Location : ` + geoCords
watermark([raw_img])
.image(text.upperLeft(Location, '19px sans-serif', '#ff0000', 1.0, 40 ))
.then(img => {
raw_img = img.src
console.log("3rd", raw_img)
resolve(img.src)
// localStorage.removeItem('current_coordinates')
});
}
else {
resolve(img.src)
}
});
});
// },err=>{
// console.log("Error in geo",err);
// switch(err.code) {
// case 1:
// alert("Geolocation permission is denied. Please allow the permission to capture");
// break;
// case 2:
// alert("Do not get the geolocation of your place");
// break;
// case 2:
// alert("Something went wrong");
// break;
// }
// reject(err);
// })
})
// });
}
getPosition(): Promise<any>
{
return new Promise((resolve, reject) => {
navigator.geolocation.getCurrentPosition(resp => {
console.log("Geo",resp.coords);
let latLong:string = resp.coords.latitude+', '+resp.coords.longitude
// resolve({lng: resp.coords.longitude, lat: resp.coords.latitude});
resolve(latLong)
},
err => {
resolve('error');
});
});
}
}

View File

@ -0,0 +1,30 @@
<h2 mat-dialog-title>{{data.title}}</h2>
<mat-dialog-content>
<div fxFlex="100">
<p align="center">
{{data.msg}}
</p>
<!-- <span *ngIf="!CompletenessCheck">
<span *ngIf="!Loading">
<p align="center" style="color: red !important;"> {{completeness_message}} </p>
<ul><li *ngFor="let forms of dialoge_subcontent" style="color: red !important;">
{{ forms }}
</li></ul>
</span>
<span *ngIf="Loading">
<div fxLayoutAlign="center">
<mat-progress-spinner mode="indeterminate"></mat-progress-spinner>
</div>
</span>
</span> -->
</div>
</mat-dialog-content>
<mat-dialog-actions align="end">
<!-- <button *ngIf="enableAddonPD===true" mat-raised-button color="primary" (click)="changeCompletePDStatus(addonStatus)"><strong> Yes / Allow Addon PD</strong></button> -->
<button mat-raised-button color="primary" (click)="changeCompletePDStatus()"><strong>Yes</strong></button>
<button mat-raised-button mat-dialog-close><strong> No </strong></button>
</mat-dialog-actions>
<!-- <mat-dialog-actions align="end" *ngIf="!CompletenessCheck">
<button mat-raised-button mat-dialog-close><strong> Ok </strong></button>
</mat-dialog-actions> -->

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PdCompleteStatusDialogueComponent } from './pd-complete-status-dialogue.component';
describe('PdCompleteStatusDialogueComponent', () => {
let component: PdCompleteStatusDialogueComponent;
let fixture: ComponentFixture<PdCompleteStatusDialogueComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PdCompleteStatusDialogueComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PdCompleteStatusDialogueComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,40 @@
import { Component, Inject, OnInit } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
import { NotifierService } from 'angular-notifier';
import { PdTrigerService } from 'app/personal-discussion/pd-service/pd-triger.service';
@Component({
selector: 'app-pd-complete-status-dialogue',
templateUrl: './pd-complete-status-dialogue.component.html',
styleUrls: ['./pd-complete-status-dialogue.component.scss']
})
export class PdCompleteStatusDialogueComponent implements OnInit {
conformation: Boolean = false;
private notifier: NotifierService;
dialoge_title_content: string;
dialoge_content: string;
dialoge_subcontent : any = [];
completeness_message: string;
enableAddonPD : boolean;
CompletenessCheck: boolean;
// addonStatus: string ="ADD_ON_PENDING";
public Loading: boolean;
constructor(notifier: NotifierService , private pd: PdTrigerService,private dialogRef: MatDialogRef<PdCompleteStatusDialogueComponent>,@Inject(MAT_DIALOG_DATA) public data: any)
{
// this.notifier = notifier;
// this.dialoge_title_content = this.data.vendor_status=='INPROGRESS' ? 'Start Discussion' : this.data.vendor_status=='COMPLETED' ? 'Complete Discussion' : 'Change Discussion';
// this.dialoge_content = this.data.vendor_status=='INPROGRESS' ? 'Are you starting the Discussion ?' : this.data.vendor_status=='COMPLETED' ? 'Please confirm you are completing the Discussion and forwarding for Quality Check ?' : 'Change Discussion';
// this.enableAddonPD = false;
// this.CompletenessCheck = this.data.vendor_status=='INPROGRESS' ? true : this.data.vendor_status=='COMPLETED' ? false : true;
// this.Loading = this.data.vendor_status=='INPROGRESS' ? false : this.data.vendor_status=='COMPLETED' ? true : false;
}
ngOnInit() {
}
changeCompletePDStatus(){
this.dialogRef.close('COMPLETED')
}
}

View File

@ -0,0 +1,6 @@
<button (click)="capture($event)" mat-button mat-raised-button>
<mat-icon name="camera" *ngIf="!addMoreBtn" style="color: #fff !important;font-size: 20px !important;">camera_alt</mat-icon>
<mat-icon name="camera" *ngIf="addMoreBtn" style="color: #fff !important;font-size: 20px !important;">add_a_photo</mat-icon>
</button>
<input type="file" (change)="capturedImage($event)" id="input-file" name="file" accept="image/*" capture="user" style="display: none">
<!-- document.querySelector('#input-file').click() -->

View File

@ -0,0 +1,10 @@
.mat-raised-button{
background-color: #e2412f !important;
padding: 0 !important;
min-width: 60px !important;
line-height: 27px !important;
}
.mat-icon{
height: 20px !important;
width: 20px !important;
}

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CaptureBtnComponent } from './capture-btn.component';
describe('CaptureBtnComponent', () => {
let component: CaptureBtnComponent;
let fixture: ComponentFixture<CaptureBtnComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CaptureBtnComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CaptureBtnComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,37 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { Ng2ImgMaxService } from 'ng2-img-max';
@Component({
selector: 'app-capture-btn',
templateUrl: './capture-btn.component.html',
styleUrls: ['./capture-btn.component.scss']
})
export class CaptureBtnComponent implements OnInit {
@Input() addMoreBtn;
@Output() imageDataEmitter = new EventEmitter
constructor(private ng2ImgMax:Ng2ImgMaxService) { }
ngOnInit(): void {
console.log(this.addMoreBtn)
}
capturedImage(event){
console.log(event);
let imageData= event.target.files[0]
this.ng2ImgMax.resizeImage(imageData, 450, 650).subscribe(
result => {
this.imageDataEmitter.emit(result)
},
error => {
console.log('😢 Oh no!', error);
}
);
}
capture(event){
event.preventDefault();
let element:HTMLElement = document.getElementById('input-file') as HTMLElement
element.click();
}
}

View File

@ -56,7 +56,9 @@
src="{{applicant.value.is_person_met_pic}}" style="max-width: 70px;max-height: 70px" >
</div>
<!-- </ion-thumbnail> -->
<span>
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="saveApplicantInfo($event,applicant,'is_person_met_pic')"></app-capture-btn>
</span>
<!-- <ion-button (click)="saveApplicantInfo(applicant,'is_person_met_pic')"
fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon></ion-button><br/> -->
<mat-label>Selfie of the Person Met</mat-label>
@ -66,6 +68,9 @@
<img ngxViewer text="PD Photos" title="ID Proof" class="ion-text-center" *ngIf="applicant.value.is_person_met_id_proof != ''"
src="{{applicant.value.is_person_met_id_proof}}" style="max-width: 70px;max-height: 70px" >
</div>
<span>
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="saveApplicantInfo($event,applicant,'is_person_met_id_proof')"></app-capture-btn>
</span>
<!-- <ion-button
(click)="saveApplicantInfo(applicant,'is_person_met_id_proof')"
fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon></ion-button><br/> -->
@ -81,29 +86,29 @@
</div>
<div *ngIf="remarksEnableFun()">
<!-- <div fxLayout="row">
<div fxLayout="column"> -->
<div fxLayout="row">
<div fxLayout="column">
<mat-form-field appearance="fill" style="margin-top: 1%;justify-content: center">
<mat-label>Name of Person Met</mat-label>
<input matInput type="text" formControlName="person_met_entered" />
<mat-error align="end" style="font-size:13px" *ngIf="getQuestionControl().at(0)['controls']['person_met_entered'].errors?.required || getQuestionControl().at(0)['controls']['person_met_entered'].touched">Person Name required</mat-error>
</mat-form-field>
<!-- </div> -->
<!-- <div fxLayout="column" size="3" align="center" *ngIf="getQuestionControl().at(0).value.person_met_entered != ''">
</div>
<div fxLayout="column" size="3" align="center" *ngIf="getQuestionControl().at(0).value.person_met_entered != ''">
<div fxLayout="row" fxLayoutAlign="center center">
<img ngxViewer text="PD Photos" title="Person Met Image" *ngIf="getQuestionControl().at(0).value.person_met_entered_pic != ''"
src="{{getQuestionControl().at(0).value.person_met_entered_pic}}" style="max-width: 80px;max-height: 80px">
</div>
<ion-button (click)="capturePic(getQuestionControl().at(0)['controls'].person_met_entered_pic, 'Person Met Pic',getQuestionControl().at(0).value.form_id)"
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="capturePic($event,getQuestionControl().at(0)['controls'].person_met_entered_pic, 'Person Met Pic',getQuestionControl().at(0).value.form_id)"></app-capture-btn>
<!-- <ion-button (click)="capturePic(getQuestionControl().at(0)['controls'].person_met_entered_pic, 'Person Met Pic',getQuestionControl().at(0).value.form_id)"
fill="clear" ><ion-icon style="font-size: 20px" name="camera"></ion-icon><span style="color: red;
font-size: 18px;
padding: 0px;
margin: 0px;">*</span></ion-button>
<mat-label *ngIf="getQuestionControl().at(0).value.person_met_entered_pic == ''" style="font-size: 11px">Capture the Image </mat-label>
margin: 0px;">*</span></ion-button> -->
<!-- <mat-label *ngIf="getQuestionControl().at(0).value.person_met_entered_pic == ''" style="font-size: 11px">Capture the Image </mat-label> -->
<mat-error align="end" style="font-size:12px" *ngIf="getQuestionControl().at(0)['controls']['person_met_entered_pic'].errors?.required || getQuestionControl().at(0)['controls']['person_met_entered_pic'].touched">Person Met pic is Required</mat-error>
</div> -->
<!-- </div> -->
</div>
</div>
<div *ngIf="getQuestionControl().at(0).value.person_met_entered != ''">
<div fxLayout="row" fxLayoutAlign="space-evenly">
<div fxLayout="column" align="center" fxLayoutAlign="center center">
@ -113,7 +118,9 @@
src="{{getQuestionControl().at(0).value.person_met_entered_pic}}" style="max-width: 70px;max-height: 70px" >
</div>
<!-- </ion-thumbnail> -->
<span>
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="capturePic($event,getQuestionControl().at(0)['controls'].person_met_entered_pic, 'Person Met Pic',getQuestionControl().at(0).value.form_id)"></app-capture-btn>
</span>
<!-- <ion-button (click)="capturePic(getQuestionControl().at(0)['controls'].person_met_entered_pic, 'Person Met Pic',getQuestionControl().at(0).value.form_id)"
fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon><span style="color: red;
font-size: 18px;
@ -127,6 +134,9 @@
<img ngxViewer text="PD Photos" title="ID Proof" class="ion-text-center" *ngIf="getQuestionControl().at(0).value.person_met_entered_id_proof != ''"
src="{{getQuestionControl().at(0).value.person_met_entered_id_proof}}" style="max-width: 70px;max-height: 70px" >
</div>
<span>
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="capturePic($event,getQuestionControl().at(0)['controls'].person_met_entered_id_proof, 'Id Proof Pic',getQuestionControl().at(0).value.form_id)"></app-capture-btn>
</span>
<!-- <ion-button
(click)="capturePic(getQuestionControl().at(0)['controls'].person_met_entered_id_proof, 'Id Proof Pic',getQuestionControl().at(0).value.form_id)"
fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon></ion-button><br/> -->
@ -397,9 +407,9 @@
<div fxLayout="column" align="center" *ngIf="getQuestionControl().at(1).value.pd_location != ''">
<div fxLayout="row" fxLayoutAlign="center center">
<img ngxViewer text="PD Photos" title="Approach to FI Location" *ngIf="getQuestionControl().at(1).value.pd_location_pic != ''"
src="{{getQuestionControl().at(1).value.pd_location_pic}}" style="max-width: 80px;max-height: 80px">
</div>
src="{{getQuestionControl().at(1).value.pd_location_pic}}" style="max-width: 80px;max-height: 80px;font-size: 13px !important;">
</div>
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="capturePic($event,getQuestionControl().at(1)['controls'].pd_location_pic, 'Approach to PD Location ( ' + currentDate + ' )',getQuestionControl().at(1).value.form_id)"></app-capture-btn>
<!-- <ion-button (click)="capturePic(getQuestionControl().at(1)['controls'].pd_location_pic, 'Approach to PD Location ( ' + currentDate + ' )',getQuestionControl().at(1).value.form_id)"
fill="clear" ><ion-icon style="font-size: 20px" name="camera"></ion-icon><span style="color: red;
font-size: 18px;
@ -459,8 +469,9 @@
<div fxLayout="column" align="center" *ngIf="getBusinessInfoControls().at(0).value.was_the_company_name_board_sighted == 'yes' || getBusinessInfoControls().at(0).value.was_the_company_name_board_sighted == 'no'">
<div fxLayout="row" fxLayoutAlign="center center">
<img ngxViewer text="PD Photos" title="Name Board" *ngIf="getBusinessInfoControls().at(0).value.name_board_sighted_pic != ''"
src="{{getBusinessInfoControls().at(0).value.name_board_sighted_pic}}" style="max-width: 80px;max-height: 80px">
src="{{getBusinessInfoControls().at(0).value.name_board_sighted_pic}}" style="max-width: 80px;max-height: 80px;font-size:13px !important;">
</div>
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="capturePic($event,getBusinessInfoControls().at(0)['controls'].name_board_sighted_pic,'Name Board Seen',getBusinessInfoControls().at(0).value.form_id)"></app-capture-btn>
<!-- <ion-button (click)="capturePic(getBusinessInfoControls().at(0)['controls'].name_board_sighted_pic,'Name Board Seen',getBusinessInfoControls().at(0).value.form_id)"
fill="clear" ><ion-icon name="camera"></ion-icon><span style="color: red;
font-size: 18px;
@ -501,8 +512,9 @@
<div fxLayout="column" size="3" align="center" *ngIf="documents.value.document_name != ''">
<div fxLayout="row" fxLayoutAlign="center center">
<img ngxViewer text="PD Photos" title="{{documents.value.document_name}}" *ngIf="documents.value.document_image != ''"
src = "{{documents.value.document_image}}" style="max-width: 80px;max-height: 80px">
src = "{{documents.value.document_image}}" style="max-width: 80px;max-height: 80px;font-size:13px !important;">
</div>
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="capturePic($event,documents['controls'].document_image,documents.value.document_name,getBusinessInfoControls().at(0).value.form_id)"></app-capture-btn>
<!-- <ion-button (click)="capturePic(documents['controls'].document_image,documents.value.document_name,getBusinessInfoControls().at(0).value.form_id)"
fill="clear" ><ion-icon name="camera"></ion-icon></ion-button><br/> -->
<!-- <mat-label *ngIf="documents.value.document_image == ''" style="font-size: 11px">Capture the Image</mat-label> -->
@ -560,8 +572,9 @@
<div fxLayout="column" size="3" align="center" *ngIf="documents.value.document != ''">
<div fxLayout="row" fxLayoutAlign="center center">
<img ngxViewer text="PD Photos" title="{{documents.value.document}}" *ngIf="documents.value.document_pic != ''"
src = "{{documents.value.document_pic}}" style="max-width: 80px;max-height: 80px">
src = "{{documents.value.document_pic}}" style="max-width: 80px;max-height: 80px;font-size:13px !important;">
</div>
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="capturePic($event,documents['controls'].document_pic,documents.value.document,getBusinessInfoControls().at(0).value.form_id)"></app-capture-btn>
<!-- <ion-button (click)="capturePic(documents['controls'].document_pic,documents.value.document,getBusinessInfoControls().at(0).value.form_id)"
fill="clear" ><ion-icon name="camera"></ion-icon></ion-button><br/>
<mat-label *ngIf="documents.value.document_pic == ''" style="font-size: 11px">Capture the Image</mat-label> -->
@ -602,7 +615,7 @@
<div fxLayout="column" size="6" align="center" fxLayoutAlign="center center" *ngFor="let val of getBusinessInfoOfficePhotControls();let i=index" [formGroupName]="i">
<!-- {{val.value | json}} -->
<div fxLayout="row" fxLayoutAlign="center center">
<img ngxViewer text="PD Photos" title="Workplace Photograph {{i+1}}" src="{{val.value.image}}" style="max-width: 80px;max-height: 80px"><br/>
<img ngxViewer text="PD Photos" title="Workplace Photograph {{i+1}}" src="{{val.value.image}}" style="max-width: 80px;max-height: 80px;font-size:13px !important;"><br/>
</div>
<!-- <ion-button fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon></ion-button><br/> -->
<div fxLayout="row" fxLayoutAlign="center center">
@ -611,6 +624,8 @@
</div>
<div *ngIf="getBusinessInfoOfficePhotControls().length == 0" style="text-align: center;margin-top: 15px;">
No Photographs Found</div>
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="addMoreBusinessOfficeImage($event,getBusinessInfoControls().at(0).value.form_id)"></app-capture-btn>
<mat-label>Add More</mat-label>
<!-- <div fxLayout="column" align="center" fxLayoutAlign="center center"> -->
<!-- <img src="https://lh3.googleusercontent.com/proxy/euOnni6JKoCJKwXq9Hq8c6fkRaxI5SYQVsHUwx_w_Wt_9zGXsABxnFsjRv7_E3Xer35VR1oalGBRKWdlwQPMo9SoDqOrmx9h7zqmAXMG37rcrpaU_jPXMXAdffKjB0M_zy3yQNJRpOKvqUlx2JmvB68r8cDCGbVUQvW8Zk2yoR4I23i4ZM7U" style="max-width: 80px;max-height: 80px"/><br/> -->
<!-- <ion-button (click)="addMoreBusinessOfficeImage(getBusinessInfoControls().at(0).value.form_id)"
@ -664,7 +679,7 @@
<div fxLayout="column" size="6" align="center" fxLayoutAlign="center center" *ngFor="let val of getBusinessAssetSightImage();let i=index" [formGroupName]="i">
<!-- {{val.value | json}} -->
<div fxLayout="row" fxLayoutAlign="center center">
<img ngxViewer text="PD Photos" title="Business Sight {{i+1}}" src="{{val.value.image}}" style="max-width: 80px;max-height: 80px"><br/>
<img ngxViewer text="PD Photos" title="Business Sight {{i+1}}" src="{{val.value.image}}" style="max-width: 80px;max-height: 80px;font-size:13px !important;"><br/>
</div>
<!-- <ion-button fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon></ion-button><br/> -->
<div fxLayout="row" fxLayoutAlign="center center">
@ -674,7 +689,9 @@
<div *ngIf="getBusinessAssetSightImage().length == 0" style="text-align: center;margin-top: 15px;">
No Photographs Found</div>
<div fxLayout="column" align="center" fxLayoutAlign="center center">
<!-- <img src="https://lh3.googleusercontent.com/proxy/euOnni6JKoCJKwXq9Hq8c6fkRaxI5SYQVsHUwx_w_Wt_9zGXsABxnFsjRv7_E3Xer35VR1oalGBRKWdlwQPMo9SoDqOrmx9h7zqmAXMG37rcrpaU_jPXMXAdffKjB0M_zy3yQNJRpOKvqUlx2JmvB68r8cDCGbVUQvW8Zk2yoR4I23i4ZM7U" style="max-width: 80px;max-height: 80px"/><br/> -->
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="addMoreBusinessAssetSightImage($event,getBusinessInfoControls().at(1).value.form_id)"></app-capture-btn>
<mat-label>Add More</mat-label>
<!-- <img src="https://lh3.googleusercontent.com/proxy/euOnni6JKoCJKwXq9Hq8c6fkRaxI5SYQVsHUwx_w_Wt_9zGXsABxnFsjRv7_E3Xer35VR1oalGBRKWdlwQPMo9SoDqOrmx9h7zqmAXMG37rcrpaU_jPXMXAdffKjB0M_zy3yQNJRpOKvqUlx2JmvB68r8cDCGbVUQvW8Zk2yoR4I23i4ZM7U" style="max-width: 80px;max-height: 80px"/><br/> -->
<!-- <ion-button (click)="addMoreBusinessAssetSightImage(getBusinessInfoControls().at(1).value.form_id)"
fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon></ion-button><br/>
<mat-label>Add More</mat-label> -->
@ -721,7 +738,9 @@
<div *ngIf="getStockControl().length == 0" style="text-align: center;margin-top: 15px;">
No Photographs Found</div>
<div fxLayout="column" align="center" fxLayoutAlign="center center">
<!-- <img src="https://lh3.googleusercontent.com/proxy/euOnni6JKoCJKwXq9Hq8c6fkRaxI5SYQVsHUwx_w_Wt_9zGXsABxnFsjRv7_E3Xer35VR1oalGBRKWdlwQPMo9SoDqOrmx9h7zqmAXMG37rcrpaU_jPXMXAdffKjB0M_zy3yQNJRpOKvqUlx2JmvB68r8cDCGbVUQvW8Zk2yoR4I23i4ZM7U" style="max-width: 80px;max-height: 80px"/><br/> -->
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="addMoreStockImage($event,getBusinessInfoControls().at(2).value.form_id)"></app-capture-btn>
<mat-label>Add More</mat-label>
<!-- <img src="https://lh3.googleusercontent.com/proxy/euOnni6JKoCJKwXq9Hq8c6fkRaxI5SYQVsHUwx_w_Wt_9zGXsABxnFsjRv7_E3Xer35VR1oalGBRKWdlwQPMo9SoDqOrmx9h7zqmAXMG37rcrpaU_jPXMXAdffKjB0M_zy3yQNJRpOKvqUlx2JmvB68r8cDCGbVUQvW8Zk2yoR4I23i4ZM7U" style="max-width: 80px;max-height: 80px"/><br/> -->
<!-- <ion-button (click)="addMoreStockImage(getBusinessInfoControls().at(2).value.form_id)"
fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon></ion-button><br/>
<mat-label>Add More</mat-label> -->
@ -984,4 +1003,4 @@
</form>
</div>
<notifier-container></notifier-container>
<!-- </mat-dialog-content> -->
<!-- </mat-dialog-content> -->

View File

@ -8,6 +8,7 @@ import { FormBuilder, FormControl, Validators, FormArray } from '@angular/forms'
import { ReplaySubject, Subject } from 'rxjs';
import { DatePipe } from '@angular/common';
import { takeUntil, filter, tap, take } from 'rxjs/operators';
import { CameraService } from 'app/personal-discussion/camera-service/camera.service';
@Component({
selector: 'app-common-ques',
@ -152,7 +153,7 @@ export class CommonQuesComponent implements OnInit {
public filteredcompanyRelationshipList:ReplaySubject<any> = new ReplaySubject<any>(1);
public filteredrelationshipList:ReplaySubject<any> = new ReplaySubject<any>(1);
constructor(private actRoute:ActivatedRoute,private quesService:PdTrigerService,private router:Router,
constructor(private actRoute:ActivatedRoute,private quesService:PdTrigerService,private cameraService:CameraService,private router:Router,
@Inject(MAT_DIALOG_DATA)public data,private _formBuilder:FormBuilder,
notifier:NotifierService,private _awsService:AwsService,private dialogRef:MatDialogRef<CommonQuesComponent>) {
this.notifier=notifier
@ -848,7 +849,7 @@ getQuestionControl() {
// END OF GETTING PARTICULAR FORM CONTROLS
//START OF ADD OR REMOVE MORE FORMS OR IMAGES
addMoreStockImage(form_id?) {
addMoreStockImage(event?,form_id?) {
let formArray = this.firstFormGroup.get('questions') as FormArray;
// console.log(formArray);
let business_group_ctrl = formArray.at(2).get('business_group') as FormArray
@ -857,7 +858,7 @@ addMoreStockImage(form_id?) {
// console.log("stock",stockCtrl);
// stockCtrl.push(this.addStockImageControl())
if(form_id) {
// this.capturePic(stockCtrl,'stock_image ',form_id)
this.capturePic(event,stockCtrl,'stock_image ',form_id)
}
else {
stockCtrl.push(this.addStockImageControl())
@ -865,7 +866,7 @@ addMoreStockImage(form_id?) {
}
// console.log(this.firstFormGroup.value);
}
addMoreBusinessOfficeImage(form_id?) {
addMoreBusinessOfficeImage(event?,form_id?) {
let formArray = this.firstFormGroup.get('questions') as FormArray;
// console.log(formArray);
let business_group_ctrl = formArray.at(2).get('business_group') as FormArray
@ -874,7 +875,7 @@ addMoreBusinessOfficeImage(form_id?) {
// console.log("stock",stockCtrl);
// stockCtrl.push(this.addStockImageControl())
if(form_id) {
// this.capturePic(officeControl,'office_photograph ',form_id)
this.capturePic(event,officeControl,'office_photograph ',form_id)
}
else {
officeControl.push(this.addStockImageControl())
@ -882,7 +883,7 @@ addMoreBusinessOfficeImage(form_id?) {
}
// console.log(this.firstFormGroup.value);
}
addMoreBusinessAssetSightImage(form_id?) {
addMoreBusinessAssetSightImage(event?,form_id?) {
let formArray = this.firstFormGroup.get('questions') as FormArray;
// console.log(formArray);
let business_group_ctrl = formArray.at(2).get('business_group') as FormArray
@ -891,7 +892,7 @@ addMoreBusinessAssetSightImage(form_id?) {
// console.log("stock",stockCtrl);
// stockCtrl.push(this.addStockImageControl())
if(form_id) {
// this.capturePic(stockCtrl,'business_sight_image ',form_id)
this.capturePic(event,stockCtrl,'business_sight_image ',form_id)
}
else {
stockCtrl.push(this.addStockImageControl())
@ -1027,60 +1028,73 @@ if(Avaliablity == 0){
ChdCtrls.controls.other_organisation_owner.updateValueAndValidity();
}
// capturePic(controls,img_name?:String,form_id?) {
// console.clear();
// console.log(controls)
// // return;
// // controls.setValue("pic");
capturePic(event,controls,img_name?:String,form_id?) {
console.clear();
console.log(controls)
// return;
// controls.setValue("pic");
// this.cameraProvider.getpicture().then(res => {
// this.cameraProvider.showImageDialog().then((res:any)=>{
// console.log("g",res)
var reader = new FileReader();
// let imagePath = event;
reader.readAsDataURL(event);
reader.onload = (_event) => {
// this.imageData = reader.result;
this.cameraService.getPosition().then(geoCords=>{
let geoCoordinates
if(geoCords != 'error') {
geoCoordinates = geoCords
}
else {
geoCoordinates = null;
}
console.log(geoCords);
this.cameraService.addWatermarks(reader.result,geoCoordinates).then(watermarkedImage=> {
console.log("image name",img_name,img_name === 'office_photograph ')
if(img_name == 'stock_image ' || img_name == 'office_photograph ' || img_name == 'business_sight_image ') {
console.log("Before")
controls.push(this.addStockImageControl())
console.log("after")
img_name = img_name+String(controls.length)
controls = controls.at(controls.length-1)['controls'].image
}
console.log("controls",controls);
controls.setValue(watermarkedImage)
let bucket: any = []
bucket.push({ 'image': watermarkedImage, 'Name': img_name, 'link': geoCoordinates });
let records: any = {
'pd_id': this.pdDetails.pd_id,
'formid': form_id,
'images': bucket,
'company_id': null,
}
// For Business Groups
if(form_id == '11' || form_id == '13' || form_id == '22') {
records.company_id = '1'
}
console.log("params savePDImage", records)
this.quesService.savePDImages(records).subscribe(result => {
if(result['dataStatus']) {
controls.setValue(result['uri'])
}
else {
console.log(result);
controls.setValue("")
this.notifier.notify("warning",'Something went wrong!!')
}
},err=>{
controls.setValue("")
console.log(err)
this.notifier.notify("error",'Network Error !!')
})
})
}
// })
)}
}
// // this.cameraProvider.getpicture().then(res => {
// this.cameraProvider.showImageDialog().then((res:any)=>{
// console.log("g",res)
// if (res != 'error') {
// let geoCoordinates = localStorage.getItem('current_coordinates')
// // this.cons.getGeoTag().then(geoCoordinates=>{
// this.cameraProvider.addWatermarks(res).then(watermarkedImage => {
// console.log("image name",img_name,img_name === 'office_photograph ')
// if(img_name == 'stock_image ' || img_name == 'office_photograph ' || img_name == 'business_sight_image ') {
// console.log("Before")
// controls.push(this.addStockImageControl())
// console.log("after")
// img_name = img_name+String(controls.length)
// controls = controls.at(controls.length-1)['controls'].image
// }
// console.log("controls",controls);
// controls.setValue(watermarkedImage)
// let bucket: any = []
// bucket.push({ 'image': watermarkedImage, 'Name': img_name, 'link': geoCoordinates });
// let records: any = {
// 'pd_id': this.pdDetails.pd_id,
// 'formid': form_id,
// 'images': bucket,
// 'company_id': null,
// }
// // For Business Groups
// if(form_id == '11' || form_id == '13' || form_id == '22') {
// records.company_id = '1'
// }
// console.log("params savePDImage", records)
// this.quesService.savePDImages(records).subscribe(result => {
// if(result['dataStatus']) {
// controls.setValue(result['uri'])
// }
// else {
// console.log(result);
// controls.setValue("")
// this.toastProvider.pdTriggerappmessage("Something went wrong!!",'warning');
// }
// },err=>{
// controls.setValue("")
// console.log(err)
// this.toastProvider.pdTriggerappmessage("Network Error","danger")
// })
// })
// }
// })
// }
compareObjects(o1: any, o2: any) {
if(o1.id == o2.id && o1.group_id == o2.group_id)
return true;

View File

@ -21,8 +21,8 @@
<div *ngIf="item.controls['img'] && item.value.img != ''">
<img [src]="item.value.img" ngxViewer style="width:85px; height: 85px;float:right">
</div>
<!-- <div style="width: 100%"> -->
<app-capture-btn addMoreBtn="true" *ngIf="camera_btn[i] == true" class="file-btn" (imageDataEmitter)="capture($event,i,item)"></app-capture-btn>
<!-- <div style="width: 100%"> -->
<!-- <ion-buttons slot="end"> -->
<!-- <ion-button style="color:#E00201" *ngIf="camera_btn[i] == true" slot="end" fill="clear" size="small" class="ion-float-right" (click)="capture(i,item)"><ion-icon style="font-size:30px;float:right;" name="camera"></ion-icon></ion-button> -->
<!-- </ion-buttons> -->

View File

@ -55,7 +55,7 @@
src="{{applicant.value.is_person_met_pic}}" style="max-width: 70px;max-height: 70px" >
</div>
<!-- </ion-thumbnail> -->
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="saveApplicantInfo($event,applicant,'is_person_met_pic')"></app-capture-btn>
<!-- <ion-button (click)="saveApplicantInfo(applicant,'is_person_met_pic')"
fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon></ion-button><br/> -->
<mat-label>Selfie of the Person Met</mat-label>
@ -65,6 +65,7 @@
<img ngxViewer text="PD Photos" title="ID Proof" class="ion-text-center" *ngIf="applicant.value.is_person_met_id_proof != ''"
src="{{applicant.value.is_person_met_id_proof}}" style="max-width: 70px;max-height: 70px" >
</div>
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="saveApplicantInfo($event,applicant,'is_person_met_id_proof')"></app-capture-btn>
<!-- <ion-button
(click)="saveApplicantInfo(applicant,'is_person_met_id_proof')"
fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon></ion-button><br/> -->
@ -120,7 +121,7 @@
src="{{getQuestionControl().at(0).value.person_met_entered_pic}}"
style="max-width: 80px;max-height: 80px">
</div>
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="capturePic($event,getQuestionControl().at(0)['controls'].person_met_entered_pic, 'Person Met Pic',getQuestionControl().at(0).value.form_id)"></app-capture-btn>
<!-- <ion-button
(click)="capturePic(getQuestionControl().at(0)['controls'].person_met_entered_pic, 'Person Met Pic',getQuestionControl().at(0).value.form_id)"
fill="clear">
@ -131,9 +132,9 @@
</ion-button> -->
<!-- <mat-label *ngIf="getQuestionControl().at(0).value.person_met_entered_pic == ''" style="font-size: 11px">
Capture the Image </mat-label> -->
<!-- <mat-error align="end" style="font-size:12px"
<mat-error align="end" style="font-size:12px"
*ngIf="getQuestionControl().at(0)['controls']['person_met_entered_pic'].errors?.required">
Person Met pic is Required</mat-error> -->
Person Met pic is Required</mat-error>
</div>
</div>
</div>
@ -178,7 +179,7 @@
src="{{getEmployer_details.value.person_met_pic}}" style="max-width: 70px;max-height: 70px">
</div>
<!-- </ion-thumbnail> -->
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="capturePic($event,getEmployer_details.controls['person_met_pic'], 'Person Met Pic',getQuestionControl().at(2).value.form_id)"></app-capture-btn>
<!-- <ion-button
(click)="capturePic(getEmployer_details.controls['person_met_pic'], 'Person Met Pic',getQuestionControl().at(2).value.form_id)"
fill="clear">
@ -188,8 +189,7 @@
margin: 0px;">*</span>
</ion-button><br /> -->
<mat-label>Selfie Photograph with Employer/Manager</mat-label>
<!-- <mat-error align="end" style="font-size:12px"
*ngIf="getEmployer_details.controls['person_met_pic'].errors?.required ">Required</mat-error> -->
<mat-error align="end" style="font-size:12px" *ngIf="getEmployer_details.controls['person_met_pic'].errors?.required ">Required</mat-error>
</div>
</div>
<div fxLayout="row">
@ -213,7 +213,7 @@
src="{{getEmployer_details.value.photo_id_card_pic}}" style="max-width: 80px;max-height: 80px">
</div>
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="capturePic($event,getEmployer_details.controls['photo_id_card_pic'], 'Photo ID Card',getQuestionControl().at(2).value.form_id)"></app-capture-btn>
<!-- <ion-button
(click)="capturePic(getEmployer_details.controls['photo_id_card_pic'], 'Photo ID Card',getQuestionControl().at(2).value.form_id)"
fill="clear">
@ -221,7 +221,7 @@
</ion-button> -->
<!-- <mat-label *ngIf="getEmployer_details.value.photo_id_card_pic == ''" style="font-size: 11px">Capture the
Image </mat-label> -->
<!-- <mat-error align="end" style="font-size:12px" *ngIf="getEmployer_details.controls['visiting_card_pic'].errors?.required || getEmployer_details.controls['visiting_card_pic'].touched">Person Met pic is Required</mat-error> -->
<mat-error align="end" style="font-size:12px" *ngIf="getEmployer_details.controls['visiting_card_pic'].errors?.required || getEmployer_details.controls['visiting_card_pic'].touched">Person Met pic is Required</mat-error>
</div>
</div>
@ -245,7 +245,7 @@
src="{{getEmployer_details.value.visiting_card_pic}}" style="max-width: 80px;max-height: 80px">
</div>
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="capturePic($event,getEmployer_details.controls['visiting_card_pic'], 'Visiting card pic',getQuestionControl().at(2).value.form_id)"></app-capture-btn>
<!-- <ion-button
(click)="capturePic(getEmployer_details.controls['visiting_card_pic'], 'Visiting card pic',getQuestionControl().at(2).value.form_id)"
fill="clear">
@ -256,7 +256,7 @@
</ion-button>
<mat-label *ngIf="getEmployer_details.value.visiting_card_pic == ''" style="font-size: 11px">Capture the
Image </mat-label> -->
<!-- <mat-error align="end" style="font-size:12px" *ngIf="getEmployer_details.controls['visiting_card_pic'].errors?.required || getEmployer_details.controls['visiting_card_pic'].touched">Person Met pic is Required</mat-error> -->
<mat-error align="end" style="font-size:12px" *ngIf="getEmployer_details.controls['visiting_card_pic'].errors?.required || getEmployer_details.controls['visiting_card_pic'].touched">Person Met pic is Required</mat-error>
</div>
</div>
<mat-form-field appearance="fill">
@ -415,7 +415,7 @@
src="{{getDocsSightedGroup['value'].sal_reg_seen_pic}}" style="max-width: 80px;max-height: 80px">
</div>
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="capturePic($event,getDocsSightedGroup['controls']['sal_reg_seen_pic'], 'Salary register pic',getQuestionControl().at(2).value.form_id)"></app-capture-btn>
<!-- <ion-button
(click)="capturePic(getDocsSightedGroup['controls']['sal_reg_seen_pic'], 'Salary register pic',getQuestionControl().at(2).value.form_id)"
fill="clear">
@ -423,7 +423,7 @@
</ion-button>
<mat-label *ngIf="getDocsSightedGroup['value'].sal_reg_seen_pic == ''" style="font-size: 11px">Capture the
Image </mat-label> -->
<!-- <mat-error align="end" style="font-size:12px" *ngIf="getEmployer_details.controls['visiting_card_pic'].errors?.required || getEmployer_details.controls['visiting_card_pic'].touched">Person Met pic is Required</mat-error> -->
<mat-error align="end" style="font-size:12px" *ngIf="getDocsSightedGroup.controls['sal_reg_seen_pic'].errors?.required || getDocsSightedGroup.controls['sal_reg_seen_pic'].touched">Required</mat-error>
</div>
</div>
@ -447,7 +447,7 @@
src="{{getDocsSightedGroup['value'].attendance_seen_pic}}" style="max-width: 80px;max-height: 80px">
</div>
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="capturePic($event,getDocsSightedGroup['controls']['attendance_seen_pic'], 'Attendance register pic',getQuestionControl().at(2).value.form_id)"></app-capture-btn>
<!-- <ion-button
(click)="capturePic(getDocsSightedGroup['controls']['attendance_seen_pic'], 'Attendance register pic',getQuestionControl().at(2).value.form_id)"
fill="clear">
@ -455,7 +455,7 @@ fill="clear">
</ion-button>
<mat-label *ngIf="getDocsSightedGroup['value'].attendance_seen_pic == ''" style="font-size: 11px">Capture the
Image </mat-label> -->
<!-- <mat-error align="end" style="font-size:12px" *ngIf="getEmployer_details.controls['visiting_card_pic'].errors?.required || getEmployer_details.controls['visiting_card_pic'].touched">Person Met pic is Required</mat-error> -->
<mat-error align="end" style="font-size:12px" *ngIf="getDocsSightedGroup.controls['attendance_seen_pic'].errors?.required || getDocsSightedGroup.controls['attendance_seen_pic'].touched">Required</mat-error>
</div>
</div>
@ -480,7 +480,7 @@ required>
src="{{getDocsSightedGroup['value'].cash_voucher_pic}}" style="max-width: 80px;max-height: 80px">
</div>
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="capturePic($event,getDocsSightedGroup['controls']['cash_voucher_pic'], 'Cash Voucher pic',getQuestionControl().at(2).value.form_id)"></app-capture-btn>
<!-- <ion-button
(click)="capturePic(getDocsSightedGroup['controls']['cash_voucher_pic'], 'Cash Voucher pic',getQuestionControl().at(2).value.form_id)"
fill="clear">
@ -488,7 +488,7 @@ fill="clear">
</ion-button>
<mat-label *ngIf="getDocsSightedGroup['value'].cash_voucher_pic == ''" style="font-size: 11px">Capture the
Image </mat-label> -->
<!-- <mat-error align="end" style="font-size:12px" *ngIf="getEmployer_details.controls['visiting_card_pic'].errors?.required || getEmployer_details.controls['visiting_card_pic'].touched">Person Met pic is Required</mat-error> -->
<mat-error align="end" style="font-size:12px" *ngIf="getDocsSightedGroup.controls['cash_voucher_pic'].errors?.required || getDocsSightedGroup.controls['cash_voucher_pic'].touched">Required</mat-error>
</div>
</div>
@ -513,7 +513,7 @@ required>
src="{{getDocsSightedGroup['value'].sal_certificate_pic}}" style="max-width: 80px;max-height: 80px">
</div>
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="capturePic($event,getDocsSightedGroup['controls']['sal_certificate_pic'], 'Salary Certificate pic',getQuestionControl().at(2).value.form_id)"></app-capture-btn>
<!-- <ion-button
(click)="capturePic(getDocsSightedGroup['controls']['sal_certificate_pic'], 'Salary Certificate pic',getQuestionControl().at(2).value.form_id)"
fill="clear">
@ -521,7 +521,7 @@ fill="clear">
</ion-button>
<mat-label *ngIf="getDocsSightedGroup['value'].sal_certificate_pic == ''" style="font-size: 11px">Capture the
Image </mat-label> -->
<!-- <mat-error align="end" style="font-size:12px" *ngIf="getEmployer_details.controls['visiting_card_pic'].errors?.required || getEmployer_details.controls['visiting_card_pic'].touched">Person Met pic is Required</mat-error> -->
<mat-error align="end" style="font-size:12px" *ngIf="getDocsSightedGroup.controls['sal_certificate_pic'].errors?.required || getDocsSightedGroup.controls['sal_certificate_pic'].touched">Required</mat-error>
</div>
</div>
@ -546,6 +546,7 @@ required>
src="{{getDocsSightedGroup['value'].sal_slip_pic}}" style="max-width: 80px;max-height: 80px">
</div>
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="capturePic($event,getDocsSightedGroup['controls']['sal_slip_pic'], 'Salary Slip pic',getQuestionControl().at(2).value.form_id)"></app-capture-btn>
<!--
<ion-button
(click)="capturePic(getDocsSightedGroup['controls']['sal_slip_pic'], 'Salary Slip pic',getQuestionControl().at(2).value.form_id)"
@ -554,7 +555,7 @@ fill="clear">
</ion-button>
<mat-label *ngIf="getDocsSightedGroup['value'].sal_slip_pic == ''" style="font-size: 11px">Capture the
Image </mat-label> -->
<!-- <mat-error align="end" style="font-size:12px" *ngIf="getEmployer_details.controls['visiting_card_pic'].errors?.required || getEmployer_details.controls['visiting_card_pic'].touched">Person Met pic is Required</mat-error> -->
<mat-error align="end" style="font-size:12px" *ngIf="getDocsSightedGroup.controls['sal_slip_pic'].errors?.required || getDocsSightedGroup.controls['sal_slip_pic'].touched">Required</mat-error>
</div>
</div>
<mat-form-field appearance="fill">
@ -584,7 +585,7 @@ required>
src="{{getDocsSightedGroup['value'].other_doc_pic}}" style="max-width: 80px;max-height: 80px">
</div>
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="capturePic($event,getDocsSightedGroup['controls']['other_doc_pic'], 'Other Doc Pic',getQuestionControl().at(2).value.form_id)"></app-capture-btn>
<!-- <ion-button
(click)="capturePic(getDocsSightedGroup['controls']['other_doc_pic'], 'Other Doc Pic',getQuestionControl().at(2).value.form_id)"
fill="clear">
@ -592,7 +593,7 @@ fill="clear">
</ion-button>
<mat-label *ngIf="getDocsSightedGroup['value'].other_doc_pic == ''" style="font-size: 11px">Capture the
Image </mat-label> -->
<!-- <mat-error align="end" style="font-size:12px" *ngIf="getEmployer_details.controls['visiting_card_pic'].errors?.required || getEmployer_details.controls['visiting_card_pic'].touched">Person Met pic is Required</mat-error> -->
<mat-error align="end" style="font-size:12px" *ngIf="getDocsSightedGroup.controls['other_doc_pic'].errors?.required || getEmployer_details.controls['other_doc_pic'].touched">Required</mat-error>
</div>
</div>
@ -639,6 +640,8 @@ Image </mat-label> -->
<div *ngIf="getPhotoControls('office_photographs',8).length == 0" style="text-align: center;margin-top: 15px;">
No Photographs Found</div>
<div fxLayout="column" align="center" class="ion-align-self-center">
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="addMoreImage($event,'office_photographs',getQuestionControl().at(2).value.form_id)"></app-capture-btn>
<mat-label>Add More</mat-label>
<!-- <img src="https://lh3.googleusercontent.com/proxy/euOnni6JKoCJKwXq9Hq8c6fkRaxI5SYQVsHUwx_w_Wt_9zGXsABxnFsjRv7_E3Xer35VR1oalGBRKWdlwQPMo9SoDqOrmx9h7zqmAXMG37rcrpaU_jPXMXAdffKjB0M_zy3yQNJRpOKvqUlx2JmvB68r8cDCGbVUQvW8Zk2yoR4I23i4ZM7U" style="max-width: 80px;max-height: 80px"/><br/> -->
<!-- <ion-button (click)="addMoreImage('office_photographs',getQuestionControl().at(2).value.form_id)"
fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon></ion-button><br/>
@ -664,7 +667,7 @@ Image </mat-label> -->
<div fxLayout="column" size="6" align="center" class="ion-align-self-center" *ngFor="let val of getPhotoControls('nameboard_photographs',9);let i=index" [formGroupName]="i">
<!-- {{val.value | json}} -->
<div fxLayout="row" fxLayoutAlign="center center">
<img ngxViewer text="PD Photos" title="Name Board Photograph {{i+1}}" src="{{val.value.image}}" style="max-width: 80px;max-height: 80px"><br/>
<img ngxViewer text="PD Photos" title="Name Board Photograph {{i+1}}" src="{{val.value.image}}" style="max-width: 80px;max-height: 80px;font-size:13px !important;"><br/>
</div>
<!-- <ion-button fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon></ion-button><br/> -->
<div fxLayout="row" fxLayoutAlign="center center">
@ -674,6 +677,8 @@ Image </mat-label> -->
<div *ngIf="getPhotoControls('nameboard_photographs',9).length == 0" style="text-align: center;margin-top: 15px;">
No Photographs Found</div>
<div fxLayout="column" align="center" class="ion-align-self-center">
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="addMoreImage($event,'nameboard_photographs',getQuestionControl().at(2).value.form_id)"></app-capture-btn>
<mat-label>Add More</mat-label>
<!-- <img src="https://lh3.googleusercontent.com/proxy/euOnni6JKoCJKwXq9Hq8c6fkRaxI5SYQVsHUwx_w_Wt_9zGXsABxnFsjRv7_E3Xer35VR1oalGBRKWdlwQPMo9SoDqOrmx9h7zqmAXMG37rcrpaU_jPXMXAdffKjB0M_zy3yQNJRpOKvqUlx2JmvB68r8cDCGbVUQvW8Zk2yoR4I23i4ZM7U" style="max-width: 80px;max-height: 80px"/><br/> -->
<!-- <ion-button (click)="addMoreImage('nameboard_photographs',getQuestionControl().at(2).value.form_id)"
fill="clear" ><ion-icon style="font-size: 30px" name="camera"></ion-icon></ion-button><br/>
@ -918,7 +923,7 @@ Image </mat-label> -->
<img ngxViewer text="PD Photos" title="Approach to FI Location" *ngIf="getQuestionControl().at(1).value.pd_location_pic != ''"
src="{{getQuestionControl().at(1).value.pd_location_pic}}" style="max-width: 80px;max-height: 80px">
</div>
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="capturePic($event,getQuestionControl().at(1)['controls'].pd_location_pic, 'Approach to PD Location ( ' + currentDate + ' )',getQuestionControl().at(1).value.form_id)"></app-capture-btn>
<!-- <ion-button (click)="capturePic(getQuestionControl().at(1)['controls'].pd_location_pic, 'Approach to PD Location ( ' + currentDate + ' )',getQuestionControl().at(1).value.form_id)"
fill="clear" ><ion-icon style="font-size: 20px" name="camera"></ion-icon><span style="color: red;
font-size: 18px;

View File

@ -5,12 +5,13 @@ import { PdQuestionsRoutingModule } from './pd-questions-routing.module';
import { CommonQuesComponent } from './common-ques/common-ques.component';
import { EmployerInfoComponent } from './employer-info/employer-info.component';
import { DynamicDocsFormComponent } from './dynamic-docs-form/dynamic-docs-form.component';
import { CaptureBtnComponent } from './capture-btn/capture-btn.component';
@NgModule({
imports: [
CommonModule,
PdQuestionsRoutingModule
],
declarations: []
declarations: [CaptureBtnComponent]
})
export class PdQuestionsModule { }

View File

@ -155,7 +155,7 @@
<!-- <span><button mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" [matTooltip]="master.fk_primary_address_id ? 'Initiate PD for this address' : 'Initiate Address for PD Process'" matTooltipPosition="above" (click)="initiateAddtionalPD(master,addresses,master.fk_primary_address_id ? true : false)"><mat-icon>where_to_vote</mat-icon></button></span> -->
<button *ngIf="VendorRoleID != 22" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master,addresses)"><mat-icon>verified_user</mat-icon></button>
<span><button mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master,addresses)"><mat-icon>schedule</mat-icon></button></span>
<span *ngIf="VendorRoleID != 22 && addresses.addtional_pd_data[0].is_qc_enabled == '1'"><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].vendor_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].vendor_status!=pdStatusCheck.TRIGGERED && addresses.addtional_pd_data[0].vendor_status!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(addresses,addresses.addtional_pd_data[0].vendor_status)"><mat-icon>question_answer</mat-icon></button></span>
<span *ngIf="addresses.addtional_pd_data[0].is_qc_enabled == '1'"><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].vendor_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].vendor_status!=pdStatusCheck.TRIGGERED && addresses.addtional_pd_data[0].vendor_status!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(addresses,addresses.addtional_pd_data[0].vendor_status)"><mat-icon>question_answer</mat-icon></button></span>
</div>
</div>
</div>
@ -196,7 +196,7 @@
<div fxFlex="60" align="right" *ngIf="addresses.addtional_pd_data[0].pd_status != 'ALLOCATED_TO_FIA' && addresses.addtional_pd_data[0].pd_status != 'FIA_REJECTED'">
<span><button *ngIf="VendorRoleID != 22" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master,addresses)"><mat-icon>verified_user</mat-icon></button></span>
<span><button mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master,addresses)"><mat-icon>schedule</mat-icon></button></span>
<span *ngIf="VendorRoleID != 22 && addresses.addtional_pd_data[0].is_qc_enabled == '1'"><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].vendor_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].vendor_status!=pdStatusCheck.TRIGGERED && addresses.addtional_pd_data[0].vendor_status!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(addresses,addresses.addtional_pd_data[0].vendor_status)"><mat-icon>question_answer</mat-icon></button></span>
<span *ngIf="addresses.addtional_pd_data[0].is_qc_enabled == '1'"><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].vendor_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].vendor_status!=pdStatusCheck.TRIGGERED && addresses.addtional_pd_data[0].vendor_status!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(addresses,addresses.addtional_pd_data[0].vendor_status)"><mat-icon>question_answer</mat-icon></button></span>
</div>
</div>
<div fxLayout="row nowrap">
@ -259,13 +259,14 @@
</div>
</div>
<div fxLayout="row" *ngIf="VendorRoleID != 22 && master.pd_status != 'FIA_REJECTED'">
<div fxLayout="row" *ngIf="master.pd_status != 'FIA_REJECTED'">
<div fxFlex="100">
<mat-card *ngIf="VendorRoleID != 22" fxFlex="100" class="p-2" style="box-shadow: 0 0 1px rgba(0,0,0,.18), 0 0 1px rgba(0,0,0,.15) !important">
<mat-card fxFlex="100" class="p-2" style="box-shadow: 0 0 1px rgba(0,0,0,.18), 0 0 1px rgba(0,0,0,.15) !important">
<div class="mat-button-div" style="text-align: right;">
<button *ngIf="VendorRoleID != 22 && master.pd_status == 'ALLOCATED_TO_FIA'" mat-raised-button style="background-color: #0f9c0f;color: white" class="mr-1 mb-1 hover-icon" type="button" matTooltip="Accept" matTooltipPosition="above" (click)="vendorApproval(master,'accept')"><mat-icon>check_circle</mat-icon><strong>Accept</strong></button>
<button *ngIf="VendorRoleID != 22 && master.vendor_status != 'INPROGRESS' && master.vendor_status != 'COMPLETED' && master.vendor_status != 'QC_COMPLETED'" mat-stroked-button color="primary" class="mr-1 mb-1 hover-icon" type="button" matTooltip="Reject" matTooltipPosition="above" (click)="vendorApproval(master,'reject')" ><mat-icon>cancel</mat-icon><strong>Reject</strong></button>
<button *ngIf="VendorRoleID != 22 && master.is_qc_enabled == '1' && master.pd_status != 'ALLOCATED_TO_FIA'" mat-raised-button color="primary" class="mr-1 mb-1 hover-icon" type="button" matTooltip="QC COMPLETE" matTooltipPosition="above" (click)="onClickQCCompleted(master)" [disabled]="master.vendor_status != 'COMPLETED'">QC COMPLETE</button>
<button *ngIf="VendorRoleID != 21 && master.vendor_status == 'INPROGRESS'" mat-raised-button color="primary" class="mr-1 mb-1 hover-icon" type="button" matTooltip="COMPLETE" matTooltipPosition="above" (click)="completePDAlert(master)">COMPLETE</button>
</div>
</mat-card>
</div>

View File

@ -21,6 +21,7 @@ import { SchedulePdComponent } from '../schedule-pd/schedule-pd.component';
import { CommonQuesComponent } from '../pd-questions/common-ques/common-ques.component';
import { EmployerInfoComponent } from '../pd-questions/employer-info/employer-info.component';
import { InputDialogComponent } from '../input-dialog/input-dialog.component';
import { PdCompleteStatusDialogueComponent } from '../pd-complete-status-dialogue/pd-complete-status-dialogue.component';
const currentdate = new Date().toJSON().slice(0,19);
@Component({
@ -525,6 +526,74 @@ export class ViewPdComponent implements OnInit, OnDestroy {
}
})
}
completePDAlert() {
const dialogRef = this.dialog.open(PdCompleteStatusDialogueComponent, {
data: {title:'Complete Discussion',msg:'Please confirm you are completing the Discussion?'},
disableClose: true,
minWidth: '30%',
maxWidth: '40%',
});
dialogRef.afterClosed()
.subscribe(dataresult => {
if(dataresult == 'COMPLETED'){
this.completePD('COMPLETED')
}
});
}
completePD(status:string)
{
// let params = {
// 'parent_pdid':this.master.parent_pd_id,
// 'pd_id':this.viewID,
// 'pd_form_id':"25"
// }
// this.quesService.retiverForm(params).subscribe(form_check=>{
// if(form_check && form_check['dataStatus'] == false) {
// this.toastProvider.setAlertwithOKButton("Unable to complete the PD","Please complete the form and try again !!");
// return;
// }
//alert.present();
// let users = localStorage.getItem('pd_user_details')
// users=JSON.parse(users).userid
// this.gpsService.getGeoTag().then(geoCords=>{
let data = {'pd_id':this.viewID,'vendor_status':status,'fk_updatedby':'','updatedon':currentdate,'random_string':this.masterRandomString.random_string,link:''};
this._pd.updateStatus(data).subscribe(res=>
{
let updateStatus:any = res;
if(updateStatus.dataStatus == true )
{
if(updateStatus.status == 200) {
this.notifier.notify("info","Completed Successfully !!!")
this.viewPdDetails(this.viewID)
// this.getNewpdupdate();
// setTimeout(()=>{
// this.navCtrl.pop()
// },3000)
}
else if(updateStatus.status == 304) {
let msg = updateStatus.hasOwnProperty('msg') && updateStatus.msg ? updateStatus.msg : "Form not filled yet. Please do this first !!"
Swal(msg);
}
}else
{
}
})
// },err=>{
// console.log("Problem while getting geo location.",err)
// alert("Problem getting geolocation. Make sure the location is turned on")
// })
// })
}
vendorApproval(pd_info,flag) {
// FIA_REJECTED

View File

@ -84,6 +84,9 @@ import { ModelEditPdReportComponent } from './list-pd/pd-report/model-edit-pd-re
import { NgxViewerModule } from 'ngx-viewer';
import { ResizableModule } from 'angular-resizable-element';
//img capture
import { Ng2ImgMaxModule } from 'ng2-img-max';
// import { FinalRemarksComponent } from './list-pd/start-pd/forms/final-remarks/final-remarks.component';
// import { BusinessOtherFamilyMemberComponent } from './list-pd/start-pd/forms/dialogue/business-other-family-member/business-other-family-member.component';
@ -127,6 +130,8 @@ import { CommonQuesComponent } from './list-pd/pd-questions/common-ques/common-q
import { EmployerInfoComponent } from './list-pd/pd-questions/employer-info/employer-info.component';
import { DynamicDocsFormComponent } from './list-pd/pd-questions/dynamic-docs-form/dynamic-docs-form.component';
import { InputDialogComponent } from './list-pd/input-dialog/input-dialog.component';
import { PdCompleteStatusDialogueComponent } from './list-pd/pd-complete-status-dialogue/pd-complete-status-dialogue.component';
import { CaptureBtnComponent } from './list-pd/pd-questions/capture-btn/capture-btn.component';
/**
* Custom angular notifier options
@ -173,8 +178,8 @@ const pdCustomNotifierOptions: NotifierOptions = {
};
@NgModule({
declarations: [SchedulePdComponent,PdAllocationComponent,TelePdAllocationComponent, ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, SmartPdAllocationComponent, EditPdApplicantComponent, EditPdMasterComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, PdReportComponent, PdRequirementComponent, ModelEditPdReportComponent, DialogChangeCurrentVenrsion, QcReviewComponent, SearchRelationPipe, RupeeCurrencyFormatPipe, NumberToWordsPipe, DeleteRecordsCountPipe, PdLocatedMapViewDirective, ViewLocationComponent, GetAnswerableFormsPipe,PdStatusChangeDialogueComponent,InitiateAdditionalPdComponent,
CommonQuesComponent,EmployerInfoComponent,DynamicDocsFormComponent, InputDialogComponent
declarations: [CaptureBtnComponent,PdCompleteStatusDialogueComponent,SchedulePdComponent,PdAllocationComponent,TelePdAllocationComponent, ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, SmartPdAllocationComponent, EditPdApplicantComponent, EditPdMasterComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, PdReportComponent, PdRequirementComponent, ModelEditPdReportComponent, DialogChangeCurrentVenrsion, QcReviewComponent, SearchRelationPipe, RupeeCurrencyFormatPipe, NumberToWordsPipe, DeleteRecordsCountPipe, PdLocatedMapViewDirective, ViewLocationComponent, GetAnswerableFormsPipe,PdStatusChangeDialogueComponent,InitiateAdditionalPdComponent,
CommonQuesComponent,EmployerInfoComponent,DynamicDocsFormComponent, InputDialogComponent, PdCompleteStatusDialogueComponent
],
imports: [
CommonModule,
@ -196,6 +201,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
MatToolbarModule,
FlexLayoutModule,
NgxDatatableModule,
Ng2ImgMaxModule,
MatChipsModule,MatProgressSpinnerModule,
FormsModule,MatSlideToggleModule,
MatSelectModule, MatListModule,MatGridListModule, MatTabsModule, MatBadgeModule, MatCheckboxModule,MatStepperModule,MatSidenavModule ,MatMenuModule, MatButtonToggleModule,
@ -215,7 +221,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
{provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]},
{provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}, PdLocatedMapViewDirective],
entryComponents: [SchedulePdComponent,PdAllocationComponent,SmartPdAllocationComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, PdRequirementComponent, ModelEditPdReportComponent, DialogChangeCurrentVenrsion, QcReviewComponent, ViewLocationComponent,PdStatusChangeDialogueComponent,InitiateAdditionalPdComponent,
entryComponents: [PdCompleteStatusDialogueComponent,SchedulePdComponent,PdAllocationComponent,SmartPdAllocationComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, PdRequirementComponent, ModelEditPdReportComponent, DialogChangeCurrentVenrsion, QcReviewComponent, ViewLocationComponent,PdStatusChangeDialogueComponent,InitiateAdditionalPdComponent,
CommonQuesComponent,EmployerInfoComponent,InputDialogComponent],
})
export class ManagePdModule {

View File

@ -308,6 +308,16 @@ export class PdTrigerService {
)
}
savePDImages(imagesDetails)
{
console.log('savepdimg',imagesDetails);
let record = {'records':imagesDetails};
return this._http.post(this.apiUrl+'savePDPhotos',record)
.pipe(
catchError(this.handleError('operation', []))
)
}
// load PD question answers
// getAnswersForPD(list: any): Observable<any> {
// let httpParams = new HttpParams();
@ -383,6 +393,7 @@ export class PdTrigerService {
)
}
// save pd answers
// savePDQuestions(saveData: any): Observable<any> {
// saveData.createdby = this._aws.getlocale();