pd officer link feacture

This commit is contained in:
sriram-at-840620226347 2020-10-17 18:35:34 +05:30
parent 54c9466a71
commit 20c9ad6b54
4 changed files with 47 additions and 41 deletions

View File

@ -623,20 +623,18 @@
</mat-card>
<br/>
<mat-label>{{getQuestionControl().at(1).value.address_type ? getAddressTypeNameById(getQuestionControl().at(1).value.address_type) :'Workplace'}} Photographs</mat-label>
<div fxLayout="row" fxLayoutAlign="space-evenly" formArrayName="office_photographs">
<div fxLayout="column" size="6" align="center" fxLayoutAlign="center center" *ngFor="let val of getBusinessInfoOfficePhotControls();let i=index" [formGroupName]="i">
<div fxLayout="row wrap" fxLayoutGap="10px" class="ion-align-items-center" formArrayName="office_photographs">
<div fxLayout="column" size="6" align="center" class="ion-align-self-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;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">
<div fxLayout="row" fxLayoutAlign="center center" style="margin-bottom:20%">
<mat-label style="font-size: 12px;text-align:left">Workplace Photograph {{i+1}}</mat-label>
</div>
</div>
<div *ngIf="getBusinessInfoOfficePhotControls().length == 0" style="text-align: center;margin-top: 15px;">
No Photographs Found</div>
<div fxLayout="column" align="center" fxLayoutAlign="center center">
</div>
<div fxLayout="column" align="center" class="ion-align-self-center">
<span (click)="captureControls('','',getBusinessInfoControls().at(0).value.form_id,'addMoreBusinessOfficeImage')">
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="capturePic($event,getBusinessInfoControls().at(0).value.form_id)"></app-capture-btn>
</span>
@ -690,21 +688,19 @@
</mat-form-field>
<br/>
<mat-label>Business Asset Sighted Photographs</mat-label>
<div fxLayout="row" fxLayoutAlign="space-evenly" formArrayName="business_sight_image" *ngIf="getBusinessInfoControls().at(1).value.business_asset_sight == 'yes'" style="margin-bottom: 20px;">
<div fxLayout="row wrap" fxLayoutGap="10px" class="ion-align-items-center" formArrayName="business_sight_image" *ngIf="getBusinessInfoControls().at(1).value.business_asset_sight == 'yes'" style="margin-bottom: 20px;">
<div fxLayout="column" size="6" align="center" fxLayoutAlign="center center" *ngFor="let val of getBusinessAssetSightImage();let i=index" [formGroupName]="i">
<div fxLayout="column" size="6" align="center" class="ion-align-self-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;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">
<div fxLayout="row" fxLayoutAlign="center center" style="margin-bottom:20%">
<mat-label style="font-size: 12px;text-align:left">Business Sight {{i+1}}</mat-label>
</div>
</div>
<div *ngIf="getBusinessAssetSightImage().length == 0" style="text-align: center;margin-top: 15px;">
No Photographs Found</div>
<div fxLayout="column" align="center" fxLayoutAlign="center center">
</div>
<div fxLayout="column" align="center" class="ion-align-self-center">
<span (click)="captureControls('','',getBusinessInfoControls().at(1).value.form_id,'addMoreBusinessAssetSightImage')">
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="capturePic($event,getBusinessInfoControls().at(1).value.form_id)"></app-capture-btn>
</span>
@ -742,20 +738,20 @@
</mat-select>
<mat-error align="end" style="font-size:12px" *ngIf="getBusinessInfoControls().at(2)['controls']['is_stock_photo'].errors?.required || getBusinessInfoControls().at(2)['controls']['is_stock_photo'].touched">Please choose the value</mat-error>
</mat-form-field>
<div fxLayout="row" fxLayoutAlign="space-evenly" formArrayName="images" *ngIf="getBusinessInfoControls().at(2).value.is_stock_photo == 'yes'">
<div fxLayout="column" size="6" align="center" fxLayoutAlign="center center" *ngFor="let val of getStockControl();let i=index" [formGroupName]="i">
<div fxLayout="row wrap" fxLayoutGap="10px" class="ion-align-items-center" formArrayName="images" *ngIf="getBusinessInfoControls().at(2).value.is_stock_photo == 'yes'">
<div fxLayout="column" size="6" align="center" class="ion-align-self-center" *ngFor="let val of getStockControl();let i=index" [formGroupName]="i">
<!-- {{val.value | json}} -->
<div fxLayout="row" fxLayoutAlign="center center">
<img ngxViewer text="PD Photos" title="Stock Photograph {{i+1}}" src="{{val.value.image}}" style="max-width: 80px;max-height: 80px"><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">
<div fxLayout="row" fxLayoutAlign="center center" style="margin-bottom:20%">
<mat-label style="font-size: 12px;text-align:left">Stock Photograph {{i+1}}</mat-label>
</div>
</div>
<div *ngIf="getStockControl().length == 0" style="text-align: center;margin-top: 15px;">
No Photographs Found</div>
<div fxLayout="column" align="center" fxLayoutAlign="center center">
<!-- <div *ngIf="getStockControl().length == 0" style="text-align: center;margin-top: 15px;">
No Photographs Found</div> -->
<div fxLayout="column" align="center" class="ion-align-self-center">
<span (click)="captureControls('','',getBusinessInfoControls().at(2).value.form_id,'addMoreStockImage')">
<app-capture-btn addMoreBtn="true" class="file-btn" (imageDataEmitter)="capturePic($event,getBusinessInfoControls().at(2).value.form_id)"></app-capture-btn>
</span>

View File

@ -2,8 +2,11 @@
color: #fff !important;
background-color: #e00201 !important;
}
::ng-deep .mat-dialog-container{
@media (max-width: 768px) {
padding: 0px !important;
}
}
.mat-button, .mat-raised-button{
background-color: #e24533;

View File

@ -47,7 +47,9 @@
width: 100%;
}
::ng-deep .mat-dialog-container{
@media (max-width: 768px) {
padding: 0px !important;
}
}
.whole_form {

View File

@ -1445,27 +1445,32 @@ export class EmployerInfoComponent implements OnInit {
let records= this.employerForm.getRawValue()
// FOR VERFYING THE IMAGE ARE CAPTURED
if(flag != 'go_back') {
let photCheck=records.questions[2]
let index = this.stepperInfo.findIndex(vv=>vv.form_id == photCheck.form_id);
console.log("Index",index);
if(photCheck.hasOwnProperty('nameboard_photographs') && photCheck.nameboard_photographs.length <1) {
if(index != -1) {
this.myStepper.selectedIndex = this.stepperInfo[index].stepper_index
}
console.log("asdf");
this.notifier.notify("info","Minimum 1 photo required on Name Board")
return
}
if(photCheck.hasOwnProperty('office_photographs') && photCheck.office_photographs.length <3) {
if(index != -1) {
this.myStepper.selectedIndex = this.stepperInfo[index].stepper_index
}
this.notifier.notify("info","Minimum 3 photos required on Office Setup")
return
}
}
if(flag != 'go_back') {
let photCheck=records.questions[8]
if(photCheck.hasOwnProperty('office_photographs') && photCheck.office_photographs.length <3) {
this.checkingStepperIndex()
let index = this.stepperInfo.findIndex(vv=>vv.form_id == photCheck.form_id);
if(index != -1) {
this.myStepper.selectedIndex = this.stepperInfo[index].stepper_index
}
this.notifier.notify("info","Minimum 3 photos required on Office Setup")
return
}
photCheck=records.questions[9]
if(photCheck.hasOwnProperty('nameboard_photographs') && photCheck.nameboard_photographs.length <1) {
this.checkingStepperIndex()
let index = this.stepperInfo.findIndex(vv=>vv.form_id == photCheck.form_id);
if(index != -1) {
this.myStepper.selectedIndex = this.stepperInfo[index].stepper_index
}
console.log("asdf");
this.notifier.notify("info","Minimum 1 photo required on Name Board")
return
}
}
// FOR MERGING EMPLOYMENT SECTION,DOCS SIGHTED,OFFICE AND NAME BOARD PHOTOGRAPH INTO SINGLE OBJ
if(this.getQuestionControl().at(7).get('docs_sighted')) {