Sales PD image validations introduced
This commit is contained in:
parent
3725eb6296
commit
df91eeef16
@ -99,4 +99,4 @@
|
||||
"android"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -81,7 +81,7 @@ import { SalesPDlistPage } from '../pages/sales_pd/pages/sales-p-dlist/sales-p-d
|
||||
import { LocationAccuracy } from '@ionic-native/location-accuracy';
|
||||
import { ReqTokenInterceptor } from '../providers/_guard/req-token.interceptor';
|
||||
import {ContentLoaderModule} from '@netbasal/content-loader'
|
||||
import { ScrollHideDirective } from '../directives/scroll-hide/scroll-hide';
|
||||
|
||||
|
||||
|
||||
@NgModule({
|
||||
@ -95,7 +95,7 @@ import { ScrollHideDirective } from '../directives/scroll-hide/scroll-hide';
|
||||
PdAllocationPage,
|
||||
InputPage,
|
||||
SalesPDlistPage,
|
||||
ScrollHideDirective
|
||||
|
||||
|
||||
],
|
||||
imports: [
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { ScrollHideDirective } from './scroll-hide/scroll-hide';
|
||||
@NgModule({
|
||||
declarations: [ScrollHideDirective],
|
||||
imports: [],
|
||||
exports: [ScrollHideDirective]
|
||||
})
|
||||
export class DirectivesModule {}
|
||||
@ -1,57 +0,0 @@
|
||||
import { Directive, Input, ElementRef, Renderer2, SimpleChanges } from '@angular/core';
|
||||
import { Content } from 'ionic-angular';
|
||||
|
||||
/**
|
||||
* Generated class for the ScrollHideDirective directive.
|
||||
*
|
||||
* See https://angular.io/api/core/Directive for more info on Angular
|
||||
* Directives.
|
||||
*/
|
||||
@Directive({
|
||||
selector: '[scrollHide]' // Attribute selector
|
||||
})
|
||||
export class ScrollHideDirective {
|
||||
@Input('scrollHide') config: ScrollHideConfig;
|
||||
@Input('scrollContent') scrollContent: Content;
|
||||
|
||||
contentHeight: number;
|
||||
scrollHeight: number;
|
||||
lastScrollPosition: number;
|
||||
lastValue: number = 0;
|
||||
constructor(private element: ElementRef, private renderer: Renderer2) {
|
||||
console.log('Hello ScrollHideDirective Directive');
|
||||
}
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
if (this.scrollContent && this.config) {
|
||||
this.scrollContent.ionScrollStart.subscribe((ev) => {
|
||||
this.contentHeight = this.scrollContent.getScrollElement().offsetHeight;
|
||||
this.scrollHeight = this.scrollContent.getScrollElement().scrollHeight;
|
||||
if (this.config.maxValue === undefined) {
|
||||
this.config.maxValue = this.element.nativeElement.offsetHeight;
|
||||
}
|
||||
this.lastScrollPosition = ev.scrollTop;
|
||||
});
|
||||
this.scrollContent.ionScroll.subscribe((ev) => this.adjustElementOnScroll(ev));
|
||||
this.scrollContent.ionScrollEnd.subscribe((ev) => this.adjustElementOnScroll(ev));
|
||||
}
|
||||
}
|
||||
|
||||
private adjustElementOnScroll(ev) {
|
||||
if (ev) {
|
||||
ev.domWrite(() => {
|
||||
let scrollTop: number = ev.scrollTop > 0 ? ev.scrollTop : 0;
|
||||
let scrolldiff: number = scrollTop - this.lastScrollPosition;
|
||||
this.lastScrollPosition = scrollTop;
|
||||
let newValue = this.lastValue + scrolldiff;
|
||||
newValue = Math.max(0, Math.min(newValue, this.config.maxValue));
|
||||
this.renderer.setStyle(this.element.nativeElement, this.config.cssProperty, `-${newValue}px`);
|
||||
this.lastValue = newValue;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
export interface ScrollHideConfig {
|
||||
cssProperty: string;
|
||||
maxValue: number;
|
||||
}
|
||||
@ -6,7 +6,7 @@ import { PdtriggerProvider } from '../../providers/pdtrigger/pdtrigger';
|
||||
import { CognitoServiceProvider } from '../../providers/aws-service/cognito.service';
|
||||
import { parseDate } from 'ionic-angular/util/datetime-util';
|
||||
import { PdAllocationPage } from '../pd-allocation/pd-allocation';
|
||||
import { ScrollHideConfig } from '../../directives/scroll-hide/scroll-hide';
|
||||
|
||||
|
||||
/**
|
||||
* Generated class for the PdListPage page.
|
||||
|
||||
@ -66,7 +66,7 @@
|
||||
<div *ngIf="parent_ques.get('type').value == '6'">
|
||||
<ion-grid >
|
||||
<ion-row>
|
||||
<ion-col col-6 no-padding>
|
||||
<ion-col col-6 no-padding align-self: center text-center >
|
||||
<div >
|
||||
<img *ngIf="parent_ques.get('answer_value').value != ''" [src]="parent_ques.get('answer_value').value" imageViewer class="doc-image-bucket"><br/>
|
||||
<label ><strong>{{parent_ques.get('question').value}}</strong></label>
|
||||
@ -76,12 +76,20 @@
|
||||
<div style="justify-content: center">
|
||||
<button ion-button clear color="optblue" (click)="captureImg(p_i,parent_ques)"><ion-icon style="font-size: 30px" name="md-camera"></ion-icon></button>
|
||||
</div>
|
||||
<!-- <ng-container ngProjectAs="mat-hint">
|
||||
<mat-error >Please capture the image</mat-error>
|
||||
</ng-container> -->
|
||||
</ion-col>
|
||||
<hr/>
|
||||
</ion-row>
|
||||
<hr/>
|
||||
<hr/>
|
||||
|
||||
</ion-grid>
|
||||
<ng-container *ngFor="let validation of parent_ques.get('validations').value;" ngProjectAs="mat-error">
|
||||
<mat-error align="end" *ngIf="parent_ques.get('answer_value').hasError(validation.name.toLowerCase())">{{validation.message}}</mat-error>
|
||||
</ng-container>
|
||||
<!-- <ng-container ngProjectAs="mat-hint">
|
||||
<mat-error align="end">Please capture the image</mat-error>
|
||||
</ng-container> -->
|
||||
</div>
|
||||
|
||||
<mat-form-field style="width: 100%" *ngIf="parent_ques.get('type').value == '7'">
|
||||
@ -282,14 +290,14 @@
|
||||
|
||||
<!-- <div *ngIf="single_ques.get('type').value == '10'"> -->
|
||||
|
||||
<ion-col align-self: center col-8 no-padding text-center *ngFor="let single_ques of group_ques.controls.questions['controls'];let s_i=index;let s_l=last"
|
||||
<ion-col align-self: center col-6 no-padding text-center *ngFor="let single_ques of group_ques.controls.questions['controls'];let s_i=index;let s_l=last"
|
||||
[formGroupName]="s_i">
|
||||
<div style="width: 100%;justify-content: center;text-align: center;align-content: center;" *ngIf="single_ques.get('answer_value').value != ''">
|
||||
<ion-row style="width: 100%">
|
||||
<img [src]="single_ques.get('answer_value').value" imageViewer class="doc-image-bucket" ><br/>
|
||||
</ion-row>
|
||||
<ion-row style="width: 100%;margin-top: 5px;" >
|
||||
<span style="font-size: 10px;white-space: pre-line">{{single_ques.get('question').value}} {{g_i+1}}</span>
|
||||
<ion-row style="width: 130px;margin-bottom: 5px;text-align: left">
|
||||
<span style="font-size: 11px;padding: 0px;margin: 0px;">{{single_ques.get('question').value}} {{g_i+1}}</span>
|
||||
<!-- <input *ngIf="image.Name =='' && image.option != 'dummy'" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeName($event.target.value,i,image.image)"> -->
|
||||
<!-- <button ion-button clear color="optblue" (click)="removeData(g_i,parent_ques)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button> -->
|
||||
</ion-row>
|
||||
@ -316,7 +324,9 @@
|
||||
</div>
|
||||
</span>
|
||||
</ion-row>
|
||||
|
||||
<!-- <ng-container *ngFor="let validation of single_ques.get('validations').value;" ngProjectAs="mat-error">
|
||||
<mat-error align="end" *ngIf="single_ques.get('answer_value').hasError(validation.name.toLowerCase())">{{validation.message}}</mat-error>
|
||||
</ng-container> -->
|
||||
</ion-grid>
|
||||
<hr class="hr">
|
||||
</div>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -55,8 +55,8 @@ export class CameraProvider {
|
||||
const options = {
|
||||
quality: 75,
|
||||
destinationType: this.camera.DestinationType.DATA_URL,
|
||||
targetWidth: 500,
|
||||
targetHeight: 600,
|
||||
targetWidth: 595,
|
||||
targetHeight: 842,
|
||||
correctOrientation: true,
|
||||
encodingType: this.camera.EncodingType.PNG,
|
||||
saveToPhotoAlbum:false,
|
||||
|
||||
@ -51,7 +51,7 @@ export class ConstantsProvider {
|
||||
lenUserPoolId: "ap-south-1_hFiGyr1Gw", // Username
|
||||
lenClientId: "38v9rpp1495v60e1gd14mj6rjr", // ClientName for Mobile
|
||||
}
|
||||
return production;
|
||||
return testing;
|
||||
|
||||
|
||||
}
|
||||
|
||||
Binary file not shown.
@ -1,50 +0,0 @@
|
||||
|
||||
// Ionicons Icon Font CSS
|
||||
// --------------------------
|
||||
// Ionicons CSS for Ionic's <ion-icon> element
|
||||
// ionicons-icons.scss has the icons and their unicode characters
|
||||
|
||||
$ionicons-font-path: $font-path !default;
|
||||
|
||||
@import "ionicons-icons";
|
||||
@import "ionicons-variables";
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: "Ionicons";
|
||||
src: url("#{$ionicons-font-path}/ionicons.woff2?v=#{$ionicons-version}") format("woff2"),
|
||||
url("#{$ionicons-font-path}/ionicons.woff?v=#{$ionicons-version}") format("woff"),
|
||||
url("#{$ionicons-font-path}/ionicons.ttf?v=#{$ionicons-version}") format("truetype");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
ion-icon {
|
||||
display: inline-block;
|
||||
|
||||
font-family: "Ionicons";
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
font-style: normal;
|
||||
font-variant: normal;
|
||||
font-weight: normal;
|
||||
line-height: 1;
|
||||
text-rendering: auto;
|
||||
text-transform: none;
|
||||
speak: none;
|
||||
|
||||
@include rtl() {
|
||||
&[aria-label^="arrow"]::before,
|
||||
&[flip-rtl]::before {
|
||||
transform: scaleX(-1);
|
||||
}
|
||||
|
||||
&[unflip-rtl]::before {
|
||||
transform: scaleX(1);
|
||||
}
|
||||
}
|
||||
|
||||
&::before {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
Before Width: | Height: | Size: 391 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,34 +0,0 @@
|
||||
// Noto Sans Font
|
||||
// Google
|
||||
// Apache License, version 2.0
|
||||
// http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
$noto-sans-font-path: $font-path !default;
|
||||
|
||||
@font-face {
|
||||
font-family: "Noto Sans";
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: local("Noto Sans"), local("Noto-Sans-Regular"), url("#{$noto-sans-font-path}/noto-sans-regular.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-regular.ttf") format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Noto Sans";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local("Noto Sans"), local("Noto-Sans-Regular"), url("#{$noto-sans-font-path}/noto-sans-regular.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-regular.ttf") format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Noto Sans";
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
src: local("Noto Sans Bold"), local("Noto-Sans-Bold"), url("#{$noto-sans-font-path}/noto-sans-bold.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-bold.ttf") format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Noto Sans";
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: local("Noto Sans Bold"), local("Noto-Sans-Bold"), url("#{$noto-sans-font-path}/noto-sans-bold.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-bold.ttf") format("truetype");
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,34 +0,0 @@
|
||||
// Roboto Font
|
||||
// Google
|
||||
// Apache License, version 2.0
|
||||
// http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
$roboto-font-path: $font-path !default;
|
||||
|
||||
@font-face {
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: local("Roboto Light"), local("Roboto-Light"), url("#{$roboto-font-path}/roboto-light.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-light.woff") format("woff"), url("#{$roboto-font-path}/roboto-light.ttf") format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local("Roboto"), local("Roboto-Regular"), url("#{$roboto-font-path}/roboto-regular.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-regular.woff") format("woff"), url("#{$roboto-font-path}/roboto-regular.ttf") format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
src: local("Roboto Medium"), local("Roboto-Medium"), url("#{$roboto-font-path}/roboto-medium.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-medium.woff") format("woff"), url("#{$roboto-font-path}/roboto-medium.ttf") format("truetype");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Roboto";
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: local("Roboto Bold"), local("Roboto-Bold"), url("#{$roboto-font-path}/roboto-bold.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-bold.woff") format("woff"), url("#{$roboto-font-path}/roboto-bold.ttf") format("truetype");
|
||||
}
|
||||
1
www/build/0.js
Normal file
1
www/build/0.js
Normal file
File diff suppressed because one or more lines are too long
28793
www/build/main.css
28793
www/build/main.css
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
null
|
||||
5890
www/build/main.js
5890
www/build/main.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
202858
www/build/vendor.js
202858
www/build/vendor.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user