Fairoj : Sales PD Issue fixes

This commit is contained in:
venbatechnologies@gmail.com 2019-12-16 19:32:56 +05:30
parent aeff8405b5
commit 034a55c2c3
38 changed files with 240324 additions and 28 deletions

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.sineedge.pdglender" version="0.0.13" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="com.sineedge.pdglender" version="0.0.14" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>PD Genie</name>
<description>info@pdgenie.com</description>
<author email="info@pdgenie.com" href="https://pdgenie.com">PD Genie</author>

View File

@ -129,7 +129,9 @@ btnaccess:boolean = false;
}
getUsers(){
let userid = this.aws.getlocale();
// let userid = this.aws.getlocale();
let userid:any=localStorage.getItem("user_details")
userid=JSON.parse(userid).userid;
this.aws.getuserprofile(userid).subscribe(res=>
{
console.log('this.users',res);

View File

@ -719,14 +719,14 @@ console.log("rr",this.original_result_data.questions)
let return_val=[]
let send_val:boolean=true
// this.local_ques_JSON.onsubmit=[{
// "expression": "(function () {let sum_val=null;let ques_key=[];control.questions_group.forEach(ques_obj=>{ques_obj.questions.map(ques=>{if(ques.question_key == 'name_board_seen'){ques_key.push(ques)}})});if(ques_key.length >=3){return true}else{return false}return sum_val}())",
// "key_name": "name_board_seen",
// "msg": "Minimum 3 image required in name board seen"
// "expression": "(function () {let sum_val=null;let ques_key=[];control.questions_group.forEach(ques_obj=>{ques_obj.questions.map(ques=>{if(ques.question_key == submitProperty.key_name){ques_key.push(ques)}})});if(ques_key.length >=3){return true}else{return false}return sum_val}())",
// "key_name": "approach_to_pd_location",
// "msg": "Minimum 3 image required in approach"
// },{
// "expression": "(function () {let sum_val=null;let ques_key=[];control.questions_group.forEach(ques_obj=>{ques_obj.questions.map(ques=>{if(ques.question_key == 'approach_to_pd_location'){ques_key.push(ques)}})});console.log('dd',ques_key.length);if(ques_key.length >=3){return true}else{return false}return sum_val}())",
// "key_name": "approach_to_pd_location",
// "msg": "Minimum 3 image required in Approach to pd location"
// }]
// "expression": "(function () {let sum_val=null;let ques_key=[];if(control.question_key == submitProperty.key_name && control.answer_value == ''){return false}else{return true}return sum_val}())",
// "key_name": "selfie_with_person_met",
// "msg": "Selfie Person met pic is required"
// }]
// console.log(this.local_ques_JSON);
if(this.local_ques_JSON.hasOwnProperty('onsubmit') && this.local_ques_JSON.onsubmit != null){
for(let i=0; i<this.local_ques_JSON.onsubmit.length ; i++){
@ -736,12 +736,13 @@ console.log("rr",this.original_result_data.questions)
// this.local_ques_JSON.onsubmit.forEach(submitProperty=>{
let submitProperty=this.local_ques_JSON.onsubmit[i]
console.log(submitProperty,parent_ques,i);
// console.log(parent_ques.questions_group[0].questions.filter(val=>val.question_key == submitProperty.key_name).length > 0)
if(parent_ques.is_repeatable == '1' && parent_ques.questions_group[0].questions.filter(val=>val.question_key == submitProperty.key_name).length > 0){
if((parent_ques.is_repeatable == '1' && parent_ques.questions_group[0].questions.filter(val=>val.question_key == submitProperty.key_name).length > 0 ) || parent_ques.question_key == submitProperty.key_name){
console.log(submitProperty,parent_ques,i);
return_val.length = 0
let val=this.calculation(parent_ques,submitProperty.expression)
let val=this.calculation(parent_ques,submitProperty)
console.log("vv",val)
if(val != true && val != 100){
this.toastProvider.lenderappmessage(submitProperty.msg)
@ -775,7 +776,7 @@ console.log("rr",this.original_result_data.questions)
}
return send_val
}
calculation(control,expression){
calculation(control,submitProperty){
// console.log("control",control)
// let exp=`
// (function () {let sum_val=null
@ -818,7 +819,7 @@ console.log("rr",this.original_result_data.questions)
// return sum_val }());`
let val= eval(expression);
let val= eval(submitProperty.expression);
console.log(val)
return val
}

View File

@ -30,8 +30,8 @@
</content-loader>
</div>
</div>
<ion-list style="margin-top: 5px;" *ngIf="!loader_access">
<ion-item *ngFor="let val of sales_displayValue" (click)="presentActionSheet(val.sales_pd_id)">
<ion-list style="margin-top: 5px;" [virtualScroll]="sales_displayValue" approxItemHeight="320px">
<ion-item *virtualItem="let val" (click)="presentActionSheet(val.sales_pd_id)">
<!-- <p item-start class="lettericon">{{val.abbr}}</p> -->
<!-- <ion-icon style="font-size:90%" item-start="" class="lettericon" [style.background]="bgColor[i]" *ngIf="progess.applicat_details ===undefined || progess.applicat_details[0].applicant_name ==null">{{progess.pd_id}}</ion-icon> -->
<ion-row>

View File

@ -102,4 +102,5 @@ page-sales-p-dlist {
// overflow: hidden;
// text-overflow: ellipsis;
// }
}

View File

@ -3,6 +3,7 @@ import { IonicPage, NavController, NavParams, ActionSheetController } from 'ioni
import { SalesPdProvider } from '../../providers/sales-pd/sales-pd';
import { HomePage, Section1 } from '../home/home';
import { ToastProvider } from '../../../../providers/common-provider/toast';
import { LoadingProvider } from '../../../../providers/common-provider/loading';
/**
* Generated class for the SalesPDlistPage page.
@ -20,14 +21,17 @@ export class SalesPDlistPage {
sales_displayValue: any=[];
loader_access:any=true
constructor(public actionSheetCtrl: ActionSheetController,public navCtrl: NavController, public navParams: NavParams,private salesPDService:SalesPdProvider,private toastProvider:ToastProvider) {
constructor(public actionSheetCtrl: ActionSheetController,public navCtrl: NavController, public navParams: NavParams,private salesPDService:SalesPdProvider,private toastProvider:ToastProvider,private loaderProvider:LoadingProvider) {
}
ionViewDidLoad() {
console.log('ionViewDidLoad SalesPDlistPage');
this.getListofPD()
// this.salesPDService.clearLocalData();
}
ionViewDidEnter(){
this.getListofPD()
}
getListofPD(){
this.salesPDService.getSalesPDList().subscribe(res=>{
if(res['dataStatus']){
@ -57,6 +61,7 @@ export class SalesPDlistPage {
}
salesPDpdf(pdfdetail){
this.loaderProvider.pdloader("Processing..")
this.salesPDService.getSalesPdpdf(pdfdetail)
.subscribe(
data => {
@ -65,14 +70,16 @@ export class SalesPDlistPage {
// window.location.href=data.records;
window.open(data.records, '_blank');
}
this.loaderProvider.dismissLoader();
},err=>{
this.loaderProvider.dismissLoader()
}
);
}
alertDecision(){
let btns={button1:'New PD',button2:'Continue'}
let alert = this.toastProvider.setAlertWithButtons("<small>You have one incomplete PD<small>", "<strong>Do you wish to continue the same or start with a new discussion<br/><small>Note:Starting fresh PD will delete the existing one.</small></strong>",btns)
let alert = this.toastProvider.setAlertWithButtons("<small>You have one incomplete PD<small>", "<strong>Do you wish to continue the same or start with a new discussion<br/><small>Note:Starting New PD will delete the existing one.</small></strong>",btns)
alert.present();
alert.onDidDismiss((data) => {
if (data == false) {

View File

@ -55,8 +55,8 @@ export class CameraProvider {
const options = {
quality: 75,
destinationType: this.camera.DestinationType.DATA_URL,
targetWidth: 595,
targetHeight: 842,
targetWidth: 500,
targetHeight: 600,
correctOrientation: true,
encodingType: this.camera.EncodingType.PNG,
saveToPhotoAlbum:false,

View File

@ -32,7 +32,9 @@ current_section:any;
}
saveQuestions(params): Observable<Response>{
params.createdby=this.aws.getlocale();
let userid:any=localStorage.getItem("user_details")
userid=JSON.parse(userid).userid;
params.createdby=userid
let product_id=localStorage.getItem('product_id_salesPD')
let users:any=localStorage.getItem('user_details')
users=JSON.parse(users)

View File

@ -141,7 +141,10 @@ getLenderContactPersons(datas){
return this.http.get(this.apiurl+'getEntityPreferences/'+entity_id);
}
generatePDReportPDF(pdId: any): Observable<any> {
pdId.fk_createdby = this.aws.getlocale();
// pdId.fk_createdby = this.aws.getlocale();
let userid:any=localStorage.getItem("user_details")
userid=JSON.parse(userid).userid;
pdId.fk_createdby =userid
return this.http.post<any>(this.apiurl + "generatePDReportPDF", { "records": pdId });
}
checkExistPDDetails(datas,entity_id){

Binary file not shown.

View File

@ -0,0 +1,50 @@
// 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

After

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.

View File

@ -0,0 +1,34 @@
// 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.

View File

@ -0,0 +1,34 @@
// 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");
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
www/build/main.css.map Normal file
View File

@ -0,0 +1 @@
null

File diff suppressed because one or more lines are too long

1
www/build/main.js.map Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
www/build/vendor.js.map Normal file

File diff suppressed because one or more lines are too long