Fairoj: Camera Feature Enabled in all Forms
This commit is contained in:
parent
61428f0f38
commit
b0fc3b6a82
File diff suppressed because one or more lines are too long
@ -103,4 +103,4 @@
|
||||
"android"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
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.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
#Tue Apr 02 20:03:20 IST 2019
|
||||
#Thu Apr 11 13:00:27 IST 2019
|
||||
base.0=S\:\\pd_office\\pd_officer\\platforms\\android\\app\\build\\intermediates\\transforms\\dexMerger\\debug\\0
|
||||
path.0=classes.dex
|
||||
renamed.0=classes.dex
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#Internal package file, do not edit.
|
||||
#Tue Apr 02 20:03:21 IST 2019
|
||||
#Thu Apr 11 13:00:28 IST 2019
|
||||
60.set=ASSET
|
||||
52.set=ASSET
|
||||
53.base=S\:\\pd_office\\pd_officer\\platforms\\android\\app\\build\\intermediates\\assets\\debug
|
||||
|
||||
@ -1 +1 @@
|
||||
[{"name":":CordovaLib","index":0,"scopes":["SUB_PROJECTS"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"7ce5806ff30953ccbcdb2c9f572f42044dec879a","index":1,"scopes":["PROJECT"],"types":["CLASSES"],"format":"DIRECTORY","present":true},{"name":"android.local.jars:sqlite-connector.jar:9a16a924fa72b9fb127264a64dd09a7c2ff43fbc","index":2,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"android.local.jars:sqlite-native-driver.jar:0bb4244b79338092a1c2a9573543ef6da500a982","index":3,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.google.android.gms:play-services-location:15.0.1","index":4,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.google.android.gms:play-services-base:15.0.1","index":5,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.google.android.gms:play-services-places-placereport:15.0.1","index":6,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.google.android.gms:play-services-tasks:15.0.1","index":7,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.google.android.gms:play-services-basement:15.0.1","index":8,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-v4:26.1.0","index":9,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-media-compat:26.1.0","index":10,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-fragment:26.1.0","index":11,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-core-utils:26.1.0","index":12,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-core-ui:26.1.0","index":13,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-compat:26.1.0","index":14,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-annotations:27.1.1","index":15,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.squareup.okhttp3:okhttp:3.13.1","index":16,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":false},{"name":"com.squareup.okio:okio:1.17.2","index":17,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"android.arch.lifecycle:runtime:1.0.0","index":18,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"android.arch.lifecycle:common:1.0.0","index":19,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"android.arch.core:common:1.0.0","index":20,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.squareup.okhttp3:okhttp:3.14.0","index":21,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true}]
|
||||
[{"name":":CordovaLib","index":0,"scopes":["SUB_PROJECTS"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"7ce5806ff30953ccbcdb2c9f572f42044dec879a","index":1,"scopes":["PROJECT"],"types":["CLASSES"],"format":"DIRECTORY","present":true},{"name":"android.local.jars:sqlite-connector.jar:9a16a924fa72b9fb127264a64dd09a7c2ff43fbc","index":2,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"android.local.jars:sqlite-native-driver.jar:0bb4244b79338092a1c2a9573543ef6da500a982","index":3,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.google.android.gms:play-services-location:15.0.1","index":4,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.google.android.gms:play-services-base:15.0.1","index":5,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.google.android.gms:play-services-places-placereport:15.0.1","index":6,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.google.android.gms:play-services-tasks:15.0.1","index":7,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.google.android.gms:play-services-basement:15.0.1","index":8,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-v4:26.1.0","index":9,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-media-compat:26.1.0","index":10,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-fragment:26.1.0","index":11,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-core-utils:26.1.0","index":12,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-core-ui:26.1.0","index":13,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-compat:26.1.0","index":14,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-annotations:27.1.1","index":15,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.squareup.okio:okio:1.17.2","index":17,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"android.arch.lifecycle:runtime:1.0.0","index":18,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"android.arch.lifecycle:common:1.0.0","index":19,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"android.arch.core:common:1.0.0","index":20,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.squareup.okhttp3:okhttp:3.14.0","index":21,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":false},{"name":"com.squareup.okhttp3:okhttp:3.14.1","index":22,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true}]
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -1 +1 @@
|
||||
[{"name":"main","index":0,"scopes":["SUB_PROJECTS","PROJECT","EXTERNAL_LIBRARIES"],"types":["DEX"],"format":"DIRECTORY","present":true}]
|
||||
[{"name":"main","index":0,"scopes":["EXTERNAL_LIBRARIES","PROJECT","SUB_PROJECTS"],"types":["DEX"],"format":"DIRECTORY","present":true}]
|
||||
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
[{"name":"resources","index":0,"scopes":["SUB_PROJECTS","PROJECT","EXTERNAL_LIBRARIES"],"types":["RESOURCES"],"format":"JAR","present":true}]
|
||||
[{"name":"resources","index":0,"scopes":["EXTERNAL_LIBRARIES","PROJECT","SUB_PROJECTS"],"types":["RESOURCES"],"format":"JAR","present":true}]
|
||||
@ -1 +1 @@
|
||||
[{"name":"resources","index":0,"scopes":["SUB_PROJECTS","PROJECT","EXTERNAL_LIBRARIES"],"types":["NATIVE_LIBS"],"format":"DIRECTORY","present":true}]
|
||||
[{"name":"resources","index":0,"scopes":["EXTERNAL_LIBRARIES","PROJECT","SUB_PROJECTS"],"types":["NATIVE_LIBS"],"format":"DIRECTORY","present":true}]
|
||||
@ -1 +1 @@
|
||||
[{"name":"android.local.jars:sqlite-connector.jar:9a16a924fa72b9fb127264a64dd09a7c2ff43fbc","index":0,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"android.local.jars:sqlite-native-driver.jar:0bb4244b79338092a1c2a9573543ef6da500a982","index":1,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.google.android.gms:play-services-location:15.0.1","index":2,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.google.android.gms:play-services-base:15.0.1","index":3,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.google.android.gms:play-services-places-placereport:15.0.1","index":4,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.google.android.gms:play-services-tasks:15.0.1","index":5,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.google.android.gms:play-services-basement:15.0.1","index":6,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-v4:26.1.0","index":7,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-media-compat:26.1.0","index":8,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-fragment:26.1.0","index":9,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-core-utils:26.1.0","index":10,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-core-ui:26.1.0","index":11,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-compat:26.1.0","index":12,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-annotations:27.1.1","index":13,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.squareup.okhttp3:okhttp:3.13.1","index":14,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":false},{"name":"com.squareup.okio:okio:1.17.2","index":15,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"android.arch.lifecycle:runtime:1.0.0","index":16,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"android.arch.lifecycle:common:1.0.0","index":17,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"android.arch.core:common:1.0.0","index":18,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.squareup.okhttp3:okhttp:3.14.0","index":19,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true}]
|
||||
[{"name":"android.local.jars:sqlite-connector.jar:9a16a924fa72b9fb127264a64dd09a7c2ff43fbc","index":0,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"android.local.jars:sqlite-native-driver.jar:0bb4244b79338092a1c2a9573543ef6da500a982","index":1,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.google.android.gms:play-services-location:15.0.1","index":2,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.google.android.gms:play-services-base:15.0.1","index":3,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.google.android.gms:play-services-places-placereport:15.0.1","index":4,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.google.android.gms:play-services-tasks:15.0.1","index":5,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.google.android.gms:play-services-basement:15.0.1","index":6,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-v4:26.1.0","index":7,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-media-compat:26.1.0","index":8,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-fragment:26.1.0","index":9,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-core-utils:26.1.0","index":10,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-core-ui:26.1.0","index":11,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-compat:26.1.0","index":12,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.android.support:support-annotations:27.1.1","index":13,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.squareup.okio:okio:1.17.2","index":15,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"android.arch.lifecycle:runtime:1.0.0","index":16,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"android.arch.lifecycle:common:1.0.0","index":17,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"android.arch.core:common:1.0.0","index":18,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true},{"name":"com.squareup.okhttp3:okhttp:3.14.0","index":19,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":false},{"name":"com.squareup.okhttp3:okhttp:3.14.1","index":20,"scopes":["EXTERNAL_LIBRARIES"],"types":["CLASSES"],"format":"JAR","present":true}]
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -121,6 +121,7 @@ import { NgxMatSelectSearchModule} from 'ngx-mat-select-search'
|
||||
import { ContentLoaderModule } from '@netbasal/content-loader';
|
||||
import {PdQuestionAssessedDailyPurchasePage} from '../pages/pd-question/pd-question-assessed-daily-purchase/pd-question-assessed-daily-purchase'
|
||||
import {RupeeCurrencyFormatPipe} from '../pipes/rupee-currency-format/rupee-currency-format'
|
||||
import {PdQuestionAssessedImagesPage} from '../pages/pd-question/pd-question-assessed-images/pd-question-assessed-images'
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
@ -173,6 +174,7 @@ import {RupeeCurrencyFormatPipe} from '../pipes/rupee-currency-format/rupee-curr
|
||||
PdQuestionSalaryInfoPage,
|
||||
PdQuestionAssessedSummaryPage,
|
||||
PdQuestionAssessedDailyPurchasePage,
|
||||
PdQuestionAssessedImagesPage,
|
||||
RupeeCurrencyFormatPipe
|
||||
],
|
||||
imports: [
|
||||
@ -263,7 +265,8 @@ import {RupeeCurrencyFormatPipe} from '../pipes/rupee-currency-format/rupee-curr
|
||||
PdGeneralImagesPage,
|
||||
PdQuestionSalaryInfoPage,
|
||||
PdQuestionAssessedSummaryPage,
|
||||
PdQuestionAssessedDailyPurchasePage
|
||||
PdQuestionAssessedDailyPurchasePage,
|
||||
PdQuestionAssessedImagesPage
|
||||
|
||||
],
|
||||
providers: [
|
||||
|
||||
@ -145,6 +145,8 @@ export class PdQuestionAddressPage {
|
||||
this.getPDImages();
|
||||
|
||||
}
|
||||
|
||||
|
||||
searchFun(control:any,i:number,option){
|
||||
// console.log(control,i)
|
||||
if (option == 'city') {
|
||||
@ -296,19 +298,57 @@ countRowsForTextarea(text){
|
||||
// });
|
||||
// alert.present()
|
||||
// })
|
||||
return new Promise((resolve,reject)=>{
|
||||
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data)=>{
|
||||
console.log("d",data);
|
||||
if(data== false){
|
||||
reject();
|
||||
return new Promise((resolve,reject)=>{
|
||||
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data)=>{
|
||||
console.log("d",data);
|
||||
if(data== false){
|
||||
reject();
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
//AFTER FORM DIRTY CHECK
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve1, reject1) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the Save Image button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
//reject1();
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve1();
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
else{
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
//REGULAR CHECK FOR IMAGE IS CAPTURED
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the 'Save Image' button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -648,6 +688,8 @@ countRowsForTextarea(text){
|
||||
// this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||
// },5000)
|
||||
if(data['dataStatus']==true){
|
||||
//TO CHANGE THE FORM STATE
|
||||
this.pdQuestionAddress.reset(this.pdQuestionAddress.value);
|
||||
this.toast.pdTriggerappmessage('Record Saved Successfully');
|
||||
setTimeout(()=>{
|
||||
this.navCtrl.pop();
|
||||
@ -864,7 +906,7 @@ countRowsForTextarea(text){
|
||||
getPDImages(){
|
||||
//FOR RETRIEVING PICTURES
|
||||
this.imageDisplay=[]
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id,'company_id':null}
|
||||
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
|
||||
if(!val['msg']){
|
||||
console.log(val['records'])
|
||||
|
||||
@ -131,6 +131,16 @@
|
||||
<h1 class="htag">SUMMARY</h1>
|
||||
</mat-card>
|
||||
</ion-col>
|
||||
<ion-col col-6 text-center >
|
||||
<mat-card (click)="getViewPage(12)" style="height: 110px;">
|
||||
<!-- <span class="ribbon cruzeiro">
|
||||
<span>--</span>
|
||||
</span> -->
|
||||
|
||||
<ion-icon class="ion-icon-custome" name="md-camera"></ion-icon>
|
||||
<h1 class="htag">IMAGES</h1>
|
||||
</mat-card>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<!-- <mat-card *ngIf="finalAccess" style="margin-bottom:10px;">
|
||||
|
||||
@ -6,6 +6,7 @@ import { QuestionCategoryProvider } from '../../../providers/question-category/q
|
||||
import { ToastProvider } from '../../../providers/common-provider/toast';
|
||||
import { PdQuestionAssessedInfoPage } from '../pd-question-assessed-info/pd-question-assessed-info';
|
||||
import {PdQuestionAssessedSummaryPage} from '../pd-question-assessed-summary/pd-question-assessed-summary'
|
||||
import {PdQuestionAssessedImagesPage} from '../../pd-question/pd-question-assessed-images/pd-question-assessed-images'
|
||||
|
||||
/**
|
||||
* Generated class for the PdQuestionAssessedDashPage page.
|
||||
@ -67,6 +68,9 @@ export class PdQuestionAssessedDashPage {
|
||||
if(pageId == 11){//Summary
|
||||
this.navCtrl.push(PdQuestionAssessedSummaryPage,{'pdDetails':this.pdDetails,'pageId':pageId})
|
||||
}
|
||||
else if(pageId == 12){//IMAGES
|
||||
this.navCtrl.push(PdQuestionAssessedImagesPage,{'pdDetails':this.pdDetails,'pageId':pageId,'formdetails':this.FormId})
|
||||
}
|
||||
else{
|
||||
this.navCtrl.push(PdQuestionAssessedInfoPage,{'pdDetails':this.pdDetails,'pageId':pageId});
|
||||
}
|
||||
|
||||
@ -0,0 +1,58 @@
|
||||
<!--
|
||||
Generated template for the PdQuestionAssessedImagesPage page.
|
||||
|
||||
See http://ionicframework.com/docs/components/#navigation for more info on
|
||||
Ionic pages and navigation.
|
||||
-->
|
||||
<ion-header>
|
||||
|
||||
<ion-navbar color="optblue">
|
||||
<ion-title>Images For Assessed Income</ion-title>
|
||||
</ion-navbar>
|
||||
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-content padding>
|
||||
<mat-card #picContent>
|
||||
|
||||
<mat-card-content>
|
||||
<mat-label *ngIf="imageDisplay.length ==0 && imageBucket.length ==0 "><strong>No Documents Found</strong></mat-label>
|
||||
|
||||
<ion-grid *ngIf="imageDisplay.length >0 ">
|
||||
<ion-row>
|
||||
<ion-col col-6 *ngFor="let image of imageDisplay; let i=index" no-padding>
|
||||
<img src="{{image.image}}" imageViewer>
|
||||
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
|
||||
|
||||
<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 *ngIf="image.option != 'dummy'" ion-button clear color="optblue" (click)="removeImg(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
|
||||
</ion-col>
|
||||
<hr/>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
<hr/>
|
||||
<hr/>
|
||||
|
||||
<ion-grid *ngIf="imageBucket.length >0 ">
|
||||
<label style="font-size:14px;color:gray">Newly Captured Pics</label><br/>
|
||||
<ion-row>
|
||||
<ion-col col-6 *ngFor="let image of imageBucket; let i=index" no-padding>
|
||||
<img src="{{image.image}}" imageViewer>
|
||||
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
|
||||
|
||||
<input #focusName *ngIf="image.Name ==''" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeNameForBucket($event.target.value,i,image.image)">
|
||||
<button float-right ion-button clear color="optblue" (click)="removeImgForBucket(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
|
||||
</ion-col>
|
||||
<hr/>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
</mat-card-content>
|
||||
<br/>
|
||||
|
||||
<button secondary *ngIf="imageBucket.length >0" #focusName align="end" ion-button color="primary" (click)="sendImage()">save Images</button>
|
||||
</mat-card>
|
||||
<ion-fab bottom right mini>
|
||||
<button mini style="margin-bottom: 10px" ion-fab color="optblue" slot="fixed" (click)="capture()"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button></ion-fab>
|
||||
</ion-content>
|
||||
@ -0,0 +1,34 @@
|
||||
page-pd-question-assessed-images {
|
||||
.scroll-content {
|
||||
padding: 16px;
|
||||
}
|
||||
.scroll-content{
|
||||
background-color: #eee;
|
||||
}
|
||||
.mat-card{
|
||||
margin-bottom: 15px;
|
||||
border-radius: 10px !important;
|
||||
box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.56), 0 4px 25px 0 rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2) !important;
|
||||
}
|
||||
.mat-card-content{
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
|
||||
img{
|
||||
padding:0 5px 0 0;
|
||||
height: 180px;
|
||||
//width:130px;
|
||||
//border:3px solid black;
|
||||
//border-radius: 20px;
|
||||
//background-color: gray;
|
||||
}
|
||||
input{
|
||||
width: 100px;
|
||||
border-radius: 4px;
|
||||
border-color: gray;
|
||||
font-size: 12px;
|
||||
height: 28px;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,120 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
||||
import {CameraProvider} from '../../../providers/common-provider/camera'
|
||||
import {LoadingProvider} from '../../../providers/common-provider/loading'
|
||||
import {ToastProvider} from '../../../providers/common-provider/toast'
|
||||
import {QuestionCategoryProvider} from '../../../providers/question-category/question-category'
|
||||
import { QueueScheduler } from 'rxjs/internal/scheduler/QueueScheduler';
|
||||
/**
|
||||
* Generated class for the PdQuestionAssessedImagesPage page.
|
||||
*
|
||||
* See https://ionicframework.com/docs/components/#navigation for more info on
|
||||
* Ionic pages and navigation.
|
||||
*/
|
||||
|
||||
@Component({
|
||||
selector: 'page-pd-question-assessed-images',
|
||||
templateUrl: 'pd-question-assessed-images.html',
|
||||
})
|
||||
export class PdQuestionAssessedImagesPage {
|
||||
imageDisplay: any=[];
|
||||
imageBucket: any=[];
|
||||
pdDetails:any;
|
||||
FormId:any;
|
||||
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,private cameraProvider:CameraProvider,
|
||||
private loading:LoadingProvider,private toast:ToastProvider,public qustCat:QuestionCategoryProvider ) {
|
||||
this.pdDetails=this.navParams.get('pdDetails');
|
||||
this.FormId=this.navParams.get('formdetails')
|
||||
console.log("pd",this.pdDetails,"form",this.FormId)
|
||||
}
|
||||
|
||||
ionViewDidLoad() {
|
||||
console.log('ionViewDidLoad PdQuestionAssessedImagesPage');
|
||||
this.getPDImages();
|
||||
}
|
||||
|
||||
/*IMAGE SECTION*/
|
||||
getPDImages(){
|
||||
//FOR RETRIEVING PICTURES
|
||||
this.imageDisplay=[]
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id,'company_id':this.pdDetails.company_id}
|
||||
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
|
||||
if(!val['msg']){
|
||||
console.log(val['records'])
|
||||
if(val['records'].length>0){
|
||||
val['records'].forEach(result=>{
|
||||
this.imageDisplay.push({'image':result.doc_url,'Name':result.pd_document_title,'option':'dummy'})
|
||||
})
|
||||
console.log("imageBuck",this.imageDisplay);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
changeName(value,index,img){
|
||||
console.log(value);
|
||||
this.imageDisplay[index]={'image':img,'Name':value}
|
||||
|
||||
}
|
||||
changeNameForBucket(value,index,img){
|
||||
this.imageBucket[index]={'image':img,'Name':value}
|
||||
}
|
||||
removeImg(index){
|
||||
this.imageDisplay.splice(index,1);
|
||||
}
|
||||
removeImgForBucket(index){
|
||||
this.imageBucket.splice(index,1)
|
||||
}
|
||||
capture(){
|
||||
//FOR CAPTURING PICS
|
||||
this.cameraProvider.getpicture().then(res=>{
|
||||
console.log("Value",res)
|
||||
if(res != 'error'){
|
||||
this.imageBucket.push({'image':res,'Name':''});
|
||||
//FOR GETTING THE DOC NAME FROM ALERT
|
||||
let alert =this.toast.setAlertForDocName()
|
||||
alert.present()
|
||||
alert.onDidDismiss(value=>{
|
||||
console.log("alert value",value);
|
||||
if(value){
|
||||
this.imageBucket[this.imageBucket.length-1].Name=value.Name
|
||||
}
|
||||
})
|
||||
}
|
||||
},error=>{
|
||||
console.log("Camera Error ",JSON.stringify(error));
|
||||
})
|
||||
|
||||
|
||||
|
||||
}
|
||||
sendImage(){
|
||||
this.loading.loaderForSendImage()
|
||||
console.log("ll",JSON.stringify(this.imageBucket));
|
||||
let records:any={
|
||||
'pd_id':this.pdDetails.pd_id,
|
||||
'formid':this.FormId.form_id,
|
||||
'images':this.imageBucket,
|
||||
'company_id':this.pdDetails.company_id
|
||||
}
|
||||
console.log("records",JSON.stringify(records))
|
||||
|
||||
this.qustCat.savePDImages(records).subscribe(res=>{
|
||||
console.log("res",res);
|
||||
if(res['dataStatus']== true){
|
||||
this.toast.pdTriggerappmessage("Image Saved Successfully")
|
||||
this.imageBucket=[]
|
||||
this.getPDImages();
|
||||
}
|
||||
else{
|
||||
console.log("Fail")
|
||||
this.toast.pdTriggerappmessage('Fail');
|
||||
}
|
||||
},ERR=>{
|
||||
console.log(JSON.stringify(ERR));
|
||||
this.toast.pdTriggerappmessage(JSON.stringify(ERR));
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
@ -100,30 +100,58 @@ export class PdQuestionAssestsPage {
|
||||
// if(val==1){
|
||||
|
||||
// }
|
||||
// if(val.__zone_symbol__state)
|
||||
return new Promise((resolve, reject) => {
|
||||
let alert=this.alert.create({
|
||||
title:'Form is Modified',
|
||||
message:'Are you sure want to Go Back',
|
||||
cssClass:'buttoncss',
|
||||
buttons:[{
|
||||
text:'Yes',
|
||||
cssClass:'btnYes',
|
||||
handler:()=>{
|
||||
return new Promise((resolve,reject)=>{
|
||||
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data)=>{
|
||||
console.log("d",data);
|
||||
if(data== false){
|
||||
reject();
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
//AFTER FORM DIRTY CHECK
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve1, reject1) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the Save Image button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
//reject1();
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve1();
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
resolve();
|
||||
}
|
||||
},
|
||||
{
|
||||
text:'No',
|
||||
cssClass:'btnNo',
|
||||
handler:()=>{
|
||||
reject();
|
||||
}
|
||||
}]
|
||||
});
|
||||
alert.present()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
//REGULAR CHECK FOR IMAGE IS CAPTURED
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the 'Save Image' button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -519,6 +547,8 @@ export class PdQuestionAssestsPage {
|
||||
{
|
||||
if(res['dataStatus']==true)
|
||||
{
|
||||
//TO CHANGE THE FORM STATE
|
||||
this.AssetsDetailsForm.reset(this.AssetsDetailsForm.value);
|
||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||
setTimeout(()=>{
|
||||
this.navCtrl.pop();
|
||||
@ -777,7 +807,7 @@ export class PdQuestionAssestsPage {
|
||||
getPDImages(){
|
||||
//FOR RETRIEVING PICTURES
|
||||
this.imageDisplay=[]
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id,'company_id':null}
|
||||
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
|
||||
if(!val['msg']){
|
||||
console.log(val['records'])
|
||||
|
||||
@ -98,15 +98,71 @@ export class PdQuestionBankingPage {
|
||||
console.log("d",data);
|
||||
if(data== false){
|
||||
reject();
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve1, reject1) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the Save Image button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
//reject1();
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve1();
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
else{
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the 'Save Image' button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
checkImage(){
|
||||
let value
|
||||
if(this.imageDisplay.length>0){
|
||||
// return new Promise((resolve,reject)=>{
|
||||
let alert=this.toast.setAlert("<small>Captured Images are not Saved<small>","<strong><small>Note:To Save the image press the Save Image button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data)=>{
|
||||
console.log("d",data);
|
||||
if(data== false){
|
||||
// reject();
|
||||
value=false;
|
||||
}
|
||||
else{
|
||||
// resolve();
|
||||
value=true;
|
||||
}
|
||||
})
|
||||
// })
|
||||
}
|
||||
return value
|
||||
}
|
||||
searchFun(control){
|
||||
control.controls['filterCtrl'].valueChanges
|
||||
@ -302,6 +358,18 @@ inWords(e,i,flag){
|
||||
if(data['dataStatus']==true)
|
||||
{
|
||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||
// this.bankDetails.dirty=false;
|
||||
// this.bankDetails.markAsDirty();
|
||||
// console.log("Dir",this.bankDetails.markAsDirty())
|
||||
// console.log("pristine",this.bankDetails.markAsPristine());
|
||||
// console.log("Touched",this.bankDetails.markAsTouched());
|
||||
|
||||
//TO CHANGE THE FORM STATE
|
||||
// this.bankDetails.markAsUntouched();
|
||||
// console.log("touched",this.bankDetails.touched)
|
||||
// console.log("untouched",this.bankDetails.untouched)
|
||||
// console.log("pristine",this.bankDetails.pristine)
|
||||
this.bankDetails.reset(this.bankDetails.value)
|
||||
setTimeout(()=>{
|
||||
this.navCtrl.pop();
|
||||
},2000);
|
||||
@ -359,7 +427,7 @@ inWords(e,i,flag){
|
||||
getPDImages(){
|
||||
//FOR RETRIEVING PICTURES
|
||||
this.imageDisplay=[]
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id,'company_id':null}
|
||||
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
|
||||
if(!val['msg']){
|
||||
console.log(val['records'])
|
||||
|
||||
@ -12,12 +12,62 @@
|
||||
</button>
|
||||
<ion-title *ngIf="!viewchange">{{formDetails.form_name}}</ion-title>
|
||||
</ion-navbar>
|
||||
|
||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
||||
<ion-segment-button value="0">
|
||||
Form
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="1">
|
||||
Pictures
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-content padding>
|
||||
|
||||
<div [ngSwitch]="tab">
|
||||
<mat-card *ngSwitchCase="'1'" #picContent>
|
||||
|
||||
<mat-card-content>
|
||||
<mat-label *ngIf="imageDisplay.length ==0 && imageBucket.length ==0 "><strong>No Documents Found. Press the camera button below to capture</strong></mat-label>
|
||||
|
||||
<ion-grid *ngIf="imageDisplay.length >0 ">
|
||||
<ion-row>
|
||||
<ion-col col-6 *ngFor="let image of imageDisplay; let i=index" no-padding>
|
||||
<img src="{{image.image}}" imageViewer>
|
||||
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
|
||||
|
||||
<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 *ngIf="image.option != 'dummy'" ion-button clear color="optblue" (click)="removeImg(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
|
||||
</ion-col>
|
||||
<hr/>
|
||||
</ion-row>
|
||||
<hr/>
|
||||
<hr/>
|
||||
</ion-grid>
|
||||
|
||||
|
||||
|
||||
<ion-grid *ngIf="imageBucket.length >0 ">
|
||||
<label style="font-size:14px;color:gray">Newly Captured Pics</label><br/>
|
||||
<ion-row>
|
||||
<ion-col col-6 *ngFor="let image of imageBucket; let i=index" no-padding>
|
||||
<img src="{{image.image}}" imageViewer>
|
||||
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
|
||||
|
||||
<input #focusName *ngIf="image.Name ==''" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeNameForBucket($event.target.value,i,image.image)">
|
||||
<button float-right ion-button clear color="optblue" (click)="removeImgForBucket(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
|
||||
</ion-col>
|
||||
<hr/>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
</mat-card-content>
|
||||
<br/>
|
||||
|
||||
<button secondary *ngIf="imageBucket.length >0" #focusName align="end" ion-button color="primary" (click)="sendImage()">save Images</button>
|
||||
</mat-card>
|
||||
|
||||
<div *ngSwitchCase="'0'">
|
||||
<form *ngIf="apiLoadFinish && loadDetails" [formGroup]="_businessAssetsQuesFrom">
|
||||
<div formArrayName="business_assets_for_address">
|
||||
<div
|
||||
@ -371,7 +421,12 @@
|
||||
</mat-card>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<!--END OF FORM SEGMENT-->
|
||||
</div>
|
||||
<!--END OF SWITCHCASES-->
|
||||
<ion-fab bottom right mini>
|
||||
<button mini style="margin-bottom: 10px" ion-fab color="optblue" slot="fixed" (click)="capture()"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button></ion-fab>
|
||||
</ion-content>
|
||||
<ion-footer>
|
||||
<button ion-button full color="optblue" (click)="onSubmit()"> Save</button>
|
||||
|
||||
@ -23,5 +23,21 @@ page-pd-question-business-assets {
|
||||
mat-select{
|
||||
margin-top:7px;
|
||||
}
|
||||
img{
|
||||
padding:0 5px 0 0;
|
||||
height: 180px;
|
||||
//width:130px;
|
||||
//border:3px solid black;
|
||||
//border-radius: 20px;
|
||||
//background-color: gray;
|
||||
}
|
||||
input{
|
||||
width: 100px;
|
||||
border-radius: 4px;
|
||||
border-color: gray;
|
||||
font-size: 12px;
|
||||
height: 28px;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -6,7 +6,8 @@ import { QuestionCategoryProvider } from '../../../../providers/question-categor
|
||||
import { ConstantsProvider } from '../../../../providers/constants/constants'
|
||||
import { ToastProvider } from '../../../../providers/common-provider/toast'
|
||||
import { controlNameBinding } from '@angular/forms/src/directives/reactive_directives/form_control_name';
|
||||
|
||||
import {CameraProvider} from '../../../../providers/common-provider/camera'
|
||||
import {LoadingProvider} from '../../../../providers/common-provider/loading'
|
||||
/**
|
||||
* Generated class for the PdQuestionBusinessAssetsPage page.
|
||||
*
|
||||
@ -62,8 +63,14 @@ export class PdQuestionBusinessAssetsPage {
|
||||
pinArr: any=[];
|
||||
m_state_for_address: any=[];
|
||||
@ViewChild('remarksFocus') focusRemark:ElementRef
|
||||
imageDisplay: any[];
|
||||
imageBucket: any=[];
|
||||
tab: any='0';
|
||||
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public fb:FormBuilder,public qustcat:QuestionCategoryProvider,public cons:ConstantsProvider,public toast:ToastProvider) {
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,
|
||||
public aws:AwsServiceProvider,public fb:FormBuilder,public qustcat:QuestionCategoryProvider,
|
||||
public cons:ConstantsProvider,public toast:ToastProvider,private loading:LoadingProvider,
|
||||
private cameraProvider:CameraProvider) {
|
||||
|
||||
|
||||
this.pdDetails=this.navParams.get('pdDetails');
|
||||
@ -93,6 +100,7 @@ export class PdQuestionBusinessAssetsPage {
|
||||
console.log('ionViewDidLoad PdQuestionBusinessAssetsPage');
|
||||
this.getDetails()
|
||||
//this.getAddress()
|
||||
this.getPDImages();
|
||||
}
|
||||
getAddress(){
|
||||
let params:any={};
|
||||
@ -939,4 +947,81 @@ if(flag== 11){
|
||||
|
||||
}
|
||||
}
|
||||
/*IMAGE SECTION*/
|
||||
getPDImages(){
|
||||
//FOR RETRIEVING PICTURES
|
||||
this.imageDisplay=[]
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.formDetails.form_id,'company_id':this.pdDetails.company_id}
|
||||
this.qustcat.getPDImages(record_for_pic).subscribe(val=>{
|
||||
if(!val['msg']){
|
||||
console.log(val['records'])
|
||||
if(val['records'].length>0){
|
||||
val['records'].forEach(result=>{
|
||||
this.imageDisplay.push({'image':result.doc_url,'Name':result.pd_document_title,'option':'dummy'})
|
||||
})
|
||||
console.log("imageBuck",this.imageDisplay);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
changeName(value,index,img){
|
||||
console.log(value);
|
||||
this.imageDisplay[index]={'image':img,'Name':value}
|
||||
|
||||
}
|
||||
changeNameForBucket(value,index,img){
|
||||
this.imageBucket[index]={'image':img,'Name':value}
|
||||
}
|
||||
removeImg(index){
|
||||
this.imageDisplay.splice(index,1);
|
||||
}
|
||||
removeImgForBucket(index){
|
||||
this.imageBucket.splice(index,1)
|
||||
}
|
||||
capture(){
|
||||
//FOR CAPTURING PICS
|
||||
this.cameraProvider.getpicture().then(res=>{
|
||||
console.log("Value",res)
|
||||
if(res != 'error'){
|
||||
this.imageBucket.push({'image':res,'Name':''});
|
||||
//FOR GETTING THE DOC NAME FROM ALERT
|
||||
let alert =this.toast.setAlertForDocName()
|
||||
alert.present()
|
||||
alert.onDidDismiss(value=>{
|
||||
console.log("alert value",value);
|
||||
if(value){
|
||||
this.imageBucket[this.imageBucket.length-1].Name=value.Name
|
||||
}
|
||||
})
|
||||
}
|
||||
},error=>{
|
||||
console.log("Camera Error ",JSON.stringify(error));
|
||||
})
|
||||
this.tab='1';
|
||||
|
||||
|
||||
}
|
||||
sendImage(){
|
||||
this.loading.loaderForSendImage()
|
||||
console.log("ll",JSON.stringify(this.imageBucket));
|
||||
let records:any={
|
||||
'pd_id':this.pdDetails.pd_id,
|
||||
'formid':this.formDetails.form_id,
|
||||
'images':this.imageBucket,
|
||||
'company_id':this.pdDetails.company_id
|
||||
}
|
||||
console.log("records",JSON.stringify(records))
|
||||
|
||||
this.qustcat.savePDImages(records).subscribe(res=>{
|
||||
if(res['dataStatus']== true){
|
||||
this.toast.pdTriggerappmessage("Image Saved Successfully")
|
||||
this.imageBucket=[]
|
||||
this.getPDImages();
|
||||
}
|
||||
else{
|
||||
this.toast.pdTriggerappmessage('Fail');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -9,12 +9,60 @@
|
||||
<ion-navbar color="optblue">
|
||||
<ion-title>{{formDetails.form_name}}</ion-title>
|
||||
</ion-navbar>
|
||||
|
||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
||||
<ion-segment-button value="0">
|
||||
Form
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="1">
|
||||
Pictures
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-content padding>
|
||||
<form [formGroup]="bankingForm">
|
||||
<div [ngSwitch]="tab">
|
||||
<mat-card *ngSwitchCase="'1'" #picContent>
|
||||
|
||||
<mat-card-content>
|
||||
<mat-label *ngIf="imageDisplay.length ==0 && imageBucket.length ==0 "><strong>No Documents Found. Press the camera button below to capture</strong></mat-label>
|
||||
|
||||
<ion-grid *ngIf="imageDisplay.length >0 ">
|
||||
<ion-row>
|
||||
<ion-col col-6 *ngFor="let image of imageDisplay; let i=index" no-padding>
|
||||
<img src="{{image.image}}" imageViewer>
|
||||
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
|
||||
|
||||
<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 *ngIf="image.option != 'dummy'" ion-button clear color="optblue" (click)="removeImg(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
|
||||
</ion-col>
|
||||
<hr/>
|
||||
</ion-row>
|
||||
<hr/>
|
||||
<hr/>
|
||||
</ion-grid>
|
||||
|
||||
|
||||
|
||||
<ion-grid *ngIf="imageBucket.length >0 ">
|
||||
<label style="font-size:14px;color:gray">Newly Captured Pics</label><br/>
|
||||
<ion-row>
|
||||
<ion-col col-6 *ngFor="let image of imageBucket; let i=index" no-padding>
|
||||
<img src="{{image.image}}" imageViewer>
|
||||
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
|
||||
|
||||
<input #focusName *ngIf="image.Name ==''" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeNameForBucket($event.target.value,i,image.image)">
|
||||
<button float-right ion-button clear color="optblue" (click)="removeImgForBucket(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
|
||||
</ion-col>
|
||||
<hr/>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
</mat-card-content>
|
||||
<br/>
|
||||
|
||||
<button secondary *ngIf="imageBucket.length >0" #focusName align="end" ion-button color="primary" (click)="sendImage()">save Images</button>
|
||||
</mat-card>
|
||||
<form [formGroup]="bankingForm" *ngSwitchCase="'0'">
|
||||
<div formArrayName="itemRows" class="accordion">
|
||||
<mat-accordion *ngFor="let itemrow of bankingForm.controls.itemRows['controls']; let i=index;let last=last"
|
||||
[formGroupName]="i">
|
||||
@ -152,6 +200,10 @@
|
||||
|
||||
</ion-row>
|
||||
</form>
|
||||
</div>
|
||||
<!--END OF SWITCHCASES-->
|
||||
<ion-fab bottom right mini>
|
||||
<button mini style="margin-bottom: 10px" ion-fab color="optblue" slot="fixed" (click)="capture()"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button></ion-fab>
|
||||
</ion-content>
|
||||
<ion-footer>
|
||||
<button ion-button full color="optblue" (click)="savepdBank(bankingForm.value)"> Save</button>
|
||||
|
||||
@ -15,4 +15,20 @@ page-pd-question-business-banking {
|
||||
.scroll-content{
|
||||
background-color: #eee;
|
||||
}
|
||||
img{
|
||||
padding:0 5px 0 0;
|
||||
height: 180px;
|
||||
//width:130px;
|
||||
//border:3px solid black;
|
||||
//border-radius: 20px;
|
||||
//background-color: gray;
|
||||
}
|
||||
input{
|
||||
width: 100px;
|
||||
border-radius: 4px;
|
||||
border-color: gray;
|
||||
font-size: 12px;
|
||||
height: 28px;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,7 +7,8 @@ import { QuestionCategoryProvider } from '../../../../providers/question-categor
|
||||
import {ConstantsProvider} from '../../../../providers/constants/constants'
|
||||
import {ToastProvider} from '../../../../providers/common-provider/toast'
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
import {CameraProvider} from '../../../../providers/common-provider/camera'
|
||||
import {LoadingProvider} from '../../../../providers/common-provider/loading'
|
||||
|
||||
/**
|
||||
* Generated class for the PdQuestionBusinessBankingPage page.
|
||||
@ -49,7 +50,13 @@ step:number
|
||||
monthErrorMessage: any=[];
|
||||
m_btLenderListValue:any=[]
|
||||
protected _onDestroy = new Subject<void>();
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,public aws: AwsServiceProvider,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,public cons:ConstantsProvider,public toast:ToastProvider) {
|
||||
imageDisplay: any[];
|
||||
imageBucket: any=[];
|
||||
tab: string='0';
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,
|
||||
public aws: AwsServiceProvider,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,
|
||||
public cons:ConstantsProvider,public toast:ToastProvider,private loading:LoadingProvider,
|
||||
private cameraProvider:CameraProvider) {
|
||||
this.pdDetails=this.navParams.get('pdDetails')
|
||||
|
||||
this.pd_cus_segment=this.pdDetails.customer_segment_abbr.toUpperCase();
|
||||
@ -85,6 +92,7 @@ step:number
|
||||
|
||||
ionViewDidLoad() {
|
||||
console.log('ionViewDidLoad PdQuestionBusinessBankingPage');
|
||||
this.getPDImages();
|
||||
}
|
||||
searchFun(control){
|
||||
if(!this.m_btLenderListValue){
|
||||
@ -369,6 +377,7 @@ console.log(this.generalExistBusinessYear)
|
||||
|
||||
if(data['dataStatus']==true)
|
||||
{
|
||||
this.bankingForm.markAsUntouched();
|
||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||
setTimeout(()=>{
|
||||
this.navCtrl.pop();
|
||||
@ -381,6 +390,82 @@ console.log(this.generalExistBusinessYear)
|
||||
|
||||
}
|
||||
|
||||
/*IMAGE SECTION*/
|
||||
getPDImages(){
|
||||
//FOR RETRIEVING PICTURES
|
||||
this.imageDisplay=[]
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.formDetails.form_id,'company_id':this.pdDetails.company_id}
|
||||
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
|
||||
if(!val['msg']){
|
||||
console.log(val['records'])
|
||||
if(val['records'].length>0){
|
||||
val['records'].forEach(result=>{
|
||||
this.imageDisplay.push({'image':result.doc_url,'Name':result.pd_document_title,'option':'dummy'})
|
||||
})
|
||||
console.log("imageBuck",this.imageDisplay);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
changeName(value,index,img){
|
||||
console.log(value);
|
||||
this.imageDisplay[index]={'image':img,'Name':value}
|
||||
|
||||
}
|
||||
changeNameForBucket(value,index,img){
|
||||
this.imageBucket[index]={'image':img,'Name':value}
|
||||
}
|
||||
removeImg(index){
|
||||
this.imageDisplay.splice(index,1);
|
||||
}
|
||||
removeImgForBucket(index){
|
||||
this.imageBucket.splice(index,1)
|
||||
}
|
||||
capture(){
|
||||
//FOR CAPTURING PICS
|
||||
this.cameraProvider.getpicture().then(res=>{
|
||||
console.log("Value",res)
|
||||
if(res != 'error'){
|
||||
this.imageBucket.push({'image':res,'Name':''});
|
||||
//FOR GETTING THE DOC NAME FROM ALERT
|
||||
let alert =this.toast.setAlertForDocName()
|
||||
alert.present()
|
||||
alert.onDidDismiss(value=>{
|
||||
console.log("alert value",value);
|
||||
if(value){
|
||||
this.imageBucket[this.imageBucket.length-1].Name=value.Name
|
||||
}
|
||||
})
|
||||
}
|
||||
},error=>{
|
||||
console.log("Camera Error ",JSON.stringify(error));
|
||||
})
|
||||
this.tab='1';
|
||||
|
||||
|
||||
}
|
||||
sendImage(){
|
||||
this.loading.loaderForSendImage()
|
||||
console.log("ll",JSON.stringify(this.imageBucket));
|
||||
let records:any={
|
||||
'pd_id':this.pdDetails.pd_id,
|
||||
'formid':this.formDetails.form_id,
|
||||
'images':this.imageBucket,
|
||||
'company_id':this.pdDetails.company_id
|
||||
}
|
||||
console.log("records",JSON.stringify(records))
|
||||
|
||||
this.qustCat.savePDImages(records).subscribe(res=>{
|
||||
if(res['dataStatus']== true){
|
||||
this.toast.pdTriggerappmessage("Image Saved Successfully")
|
||||
this.imageBucket=[]
|
||||
this.getPDImages();
|
||||
}
|
||||
else{
|
||||
this.toast.pdTriggerappmessage('Fail');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -8,11 +8,60 @@
|
||||
|
||||
|
||||
</ion-navbar>
|
||||
|
||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
||||
<ion-segment-button value="0">
|
||||
Form
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="1">
|
||||
Pictures
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-header>
|
||||
|
||||
<ion-content padding>
|
||||
<form [formGroup]="businessForm" class="address">
|
||||
<div [ngSwitch]="tab">
|
||||
<mat-card *ngSwitchCase="'1'" #picContent>
|
||||
|
||||
<mat-card-content>
|
||||
<mat-label *ngIf="imageDisplay.length ==0 && imageBucket.length ==0 "><strong>No Documents Found. Press the camera button below to capture</strong></mat-label>
|
||||
|
||||
<ion-grid *ngIf="imageDisplay.length >0 ">
|
||||
<ion-row>
|
||||
<ion-col col-6 *ngFor="let image of imageDisplay; let i=index" no-padding>
|
||||
<img src="{{image.image}}" imageViewer>
|
||||
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
|
||||
|
||||
<input class="docName" *ngIf="image.Name =='' && image.option != 'dummy'" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeName($event.target.value,i,image.image)">
|
||||
<button *ngIf="image.option != 'dummy'" ion-button clear color="optblue" (click)="removeImg(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
|
||||
</ion-col>
|
||||
<hr/>
|
||||
</ion-row>
|
||||
<hr/>
|
||||
<hr/>
|
||||
</ion-grid>
|
||||
|
||||
|
||||
|
||||
<ion-grid *ngIf="imageBucket.length >0 ">
|
||||
<label style="font-size:14px;color:gray">Newly Captured Pics</label><br/>
|
||||
<ion-row>
|
||||
<ion-col col-6 *ngFor="let image of imageBucket; let i=index" no-padding>
|
||||
<img src="{{image.image}}" imageViewer>
|
||||
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
|
||||
|
||||
<input class="docName" #focusName *ngIf="image.Name ==''" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeNameForBucket($event.target.value,i,image.image)">
|
||||
<button float-right ion-button clear color="optblue" (click)="removeImgForBucket(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
|
||||
</ion-col>
|
||||
<hr/>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
</mat-card-content>
|
||||
<br/>
|
||||
|
||||
<button secondary *ngIf="imageBucket.length >0" #focusName align="end" ion-button color="primary" (click)="sendImage()">save Images</button>
|
||||
</mat-card>
|
||||
|
||||
<form [formGroup]="businessForm" class="address" *ngSwitchCase="'0'">
|
||||
<div formArrayName="partners">
|
||||
|
||||
<mat-accordion *ngFor="let member of businessForm.controls.partners['controls']; let i=index ; let l=last"
|
||||
@ -1608,6 +1657,10 @@
|
||||
</ion-row>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<!--END OF SWITCHCASES-->
|
||||
<ion-fab bottom right mini>
|
||||
<button mini style="margin-bottom: 10px" ion-fab color="optblue" slot="fixed" (click)="capture()"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button></ion-fab>
|
||||
</ion-content>
|
||||
<ion-footer>
|
||||
<button ion-button full color="optblue" (click)="submitDetails()">Save</button>
|
||||
|
||||
@ -59,4 +59,21 @@ page-pd-question-business-info {
|
||||
.checkbo{
|
||||
margin:15px;
|
||||
}
|
||||
|
||||
img{
|
||||
padding:0 5px 0 0;
|
||||
height: 180px;
|
||||
//width:130px;
|
||||
//border:3px solid black;
|
||||
//border-radius: 20px;
|
||||
//background-color: gray;
|
||||
}
|
||||
.docName{
|
||||
width: 100px;
|
||||
border-radius: 4px;
|
||||
border-color: gray;
|
||||
font-size: 12px;
|
||||
height: 28px;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,7 +9,8 @@ import { elementAt, takeUntil } from 'rxjs/operators';
|
||||
import { ConstantsProvider } from '../../../../providers/constants/constants'
|
||||
import { Subject, ReplaySubject } from 'rxjs';
|
||||
import {searchValue} from '../../search'
|
||||
|
||||
import { CameraProvider } from '../../../../providers/common-provider/camera'
|
||||
import { LoadingProvider } from '../../../../providers/common-provider/loading'
|
||||
/**
|
||||
* Generated class for the PdQuestionBusinessInfoPage page.
|
||||
*
|
||||
@ -78,8 +79,14 @@ export class PdQuestionBusinessInfoPage {
|
||||
public filteredState:ReplaySubject<searchValue[]>=new ReplaySubject<searchValue[]>(1)
|
||||
cityData:any=[]
|
||||
cityDataValue:any=[]
|
||||
imageDisplay: any[];
|
||||
imageBucket: any=[];
|
||||
tab: string='0';
|
||||
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public toast:ToastProvider,public qustCat:QuestionCategoryProvider,public fb:FormBuilder,public cons:ConstantsProvider) {
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,
|
||||
public aws:AwsServiceProvider,public toast:ToastProvider,
|
||||
public qustCat:QuestionCategoryProvider,public fb:FormBuilder,public cons:ConstantsProvider,
|
||||
private loading:LoadingProvider,private cameraProvider:CameraProvider) {
|
||||
this.getStateCityDet();
|
||||
// console.log(typeof this.filteredCity)
|
||||
this.pdDetails = this.navParams.get('pdDetails');
|
||||
@ -150,7 +157,7 @@ export class PdQuestionBusinessInfoPage {
|
||||
|
||||
ionViewDidLoad() {
|
||||
console.log('ionViewDidLoad PdQuestionBusinessInfoPage');
|
||||
|
||||
this.getPDImages();
|
||||
|
||||
|
||||
}
|
||||
@ -1583,7 +1590,7 @@ createPOSMachinesDetails(data){
|
||||
public initBusinessForm(): void {
|
||||
this.businessForm = this.fb.group({
|
||||
pdid: this.pdDetails.pd_id,
|
||||
formid: this.FormId.form_id,
|
||||
formid: this.FormId,
|
||||
fk_createdby: this.users,
|
||||
profession_name: ['', Validators.compose([Validators.required])],
|
||||
business_years: ['', Validators.compose([Validators.required])],
|
||||
@ -1820,6 +1827,7 @@ if(records.pos_machines_details){
|
||||
this.qustCat.saveForm(records).subscribe(data => {
|
||||
if(data['dataStatus']==true)
|
||||
{
|
||||
this.businessForm.markAsUntouched();
|
||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||
setTimeout(()=>{
|
||||
this.navCtrl.pop();
|
||||
@ -1829,7 +1837,7 @@ if(records.pos_machines_details){
|
||||
}
|
||||
getBuisnessDetails()
|
||||
{
|
||||
let records = {'pd_id':this.pdDetails.pd_id,'pd_form_id':this.FormId.form_id};
|
||||
let records = {'pd_id':this.pdDetails.pd_id,'pd_form_id':this.FormId};
|
||||
this.qustCat.retiverForm(records).subscribe(data => {
|
||||
let businessVal = data['records'];
|
||||
|
||||
@ -1891,7 +1899,7 @@ if(records.pos_machines_details){
|
||||
}
|
||||
businessVal.family_members_involved = enduse;
|
||||
businessVal.pdid = this.pdDetails.pd_id;
|
||||
businessVal.formid = this.FormId.form_id;
|
||||
businessVal.formid = this.FormId;
|
||||
businessVal.fk_createdby = this.users;
|
||||
businessVal.designation = DesgnArray;
|
||||
businessVal.partners = PartnrArray;
|
||||
@ -2111,6 +2119,82 @@ toGetPOSMachinesDetails(e,flag){
|
||||
)
|
||||
}
|
||||
|
||||
/*IMAGE SECTION*/
|
||||
getPDImages(){
|
||||
//FOR RETRIEVING PICTURES
|
||||
this.imageDisplay=[]
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId,'company_id':this.pdDetails.company_id}
|
||||
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
|
||||
if(!val['msg']){
|
||||
console.log(val['records'])
|
||||
if(val['records'].length>0){
|
||||
val['records'].forEach(result=>{
|
||||
this.imageDisplay.push({'image':result.doc_url,'Name':result.pd_document_title,'option':'dummy'})
|
||||
})
|
||||
console.log("imageBuck",this.imageDisplay);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
changeName(value,index,img){
|
||||
console.log(value);
|
||||
this.imageDisplay[index]={'image':img,'Name':value}
|
||||
|
||||
}
|
||||
changeNameForBucket(value,index,img){
|
||||
this.imageBucket[index]={'image':img,'Name':value}
|
||||
}
|
||||
removeImg(index){
|
||||
this.imageDisplay.splice(index,1);
|
||||
}
|
||||
removeImgForBucket(index){
|
||||
this.imageBucket.splice(index,1)
|
||||
}
|
||||
capture(){
|
||||
//FOR CAPTURING PICS
|
||||
this.cameraProvider.getpicture().then(res=>{
|
||||
console.log("Value",res)
|
||||
if(res != 'error'){
|
||||
this.imageBucket.push({'image':res,'Name':''});
|
||||
//FOR GETTING THE DOC NAME FROM ALERT
|
||||
let alert =this.toast.setAlertForDocName()
|
||||
alert.present()
|
||||
alert.onDidDismiss(value=>{
|
||||
console.log("alert value",value);
|
||||
if(value){
|
||||
this.imageBucket[this.imageBucket.length-1].Name=value.Name
|
||||
}
|
||||
})
|
||||
}
|
||||
},error=>{
|
||||
console.log("Camera Error ",JSON.stringify(error));
|
||||
})
|
||||
this.tab='1';
|
||||
|
||||
|
||||
}
|
||||
sendImage(){
|
||||
this.loading.loaderForSendImage()
|
||||
console.log("ll",JSON.stringify(this.imageBucket));
|
||||
let records:any={
|
||||
'pd_id':this.pdDetails.pd_id,
|
||||
'formid':this.FormId,
|
||||
'images':this.imageBucket,
|
||||
'company_id':this.pdDetails.company_id
|
||||
}
|
||||
console.log("records",JSON.stringify(records))
|
||||
|
||||
this.qustCat.savePDImages(records).subscribe(res=>{
|
||||
if(res['dataStatus']== true){
|
||||
this.toast.pdTriggerappmessage("Image Saved Successfully")
|
||||
this.imageBucket=[]
|
||||
this.getPDImages();
|
||||
}
|
||||
else{
|
||||
this.toast.pdTriggerappmessage('Fail');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -6,8 +6,59 @@
|
||||
<ion-title *ngIf="!viewchange">{{formDetails.form_name}}</ion-title>
|
||||
</ion-navbar>
|
||||
<!-- -->
|
||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
||||
<ion-segment-button value="0">
|
||||
Form
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="1">
|
||||
Pictures
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-header>
|
||||
<ion-content padding>
|
||||
<div [ngSwitch]="tab">
|
||||
<mat-card *ngSwitchCase="'1'" #picContent>
|
||||
|
||||
<mat-card-content>
|
||||
<mat-label *ngIf="imageDisplay.length ==0 && imageBucket.length ==0 "><strong>No Documents Found. Press the camera button below to capture</strong></mat-label>
|
||||
|
||||
<ion-grid *ngIf="imageDisplay.length >0 ">
|
||||
<ion-row>
|
||||
<ion-col col-6 *ngFor="let image of imageDisplay; let i=index" no-padding>
|
||||
<img src="{{image.image}}" imageViewer>
|
||||
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
|
||||
|
||||
<input class="docName" *ngIf="image.Name =='' && image.option != 'dummy'" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeName($event.target.value,i,image.image)">
|
||||
<button *ngIf="image.option != 'dummy'" ion-button clear color="optblue" (click)="removeImg(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
|
||||
</ion-col>
|
||||
<hr/>
|
||||
</ion-row>
|
||||
<hr/>
|
||||
<hr/>
|
||||
</ion-grid>
|
||||
|
||||
|
||||
|
||||
<ion-grid *ngIf="imageBucket.length >0 ">
|
||||
<label style="font-size:14px;color:gray">Newly Captured Pics</label><br/>
|
||||
<ion-row>
|
||||
<ion-col col-6 *ngFor="let image of imageBucket; let i=index" no-padding>
|
||||
<img src="{{image.image}}" imageViewer>
|
||||
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
|
||||
|
||||
<input class="docName" #focusName *ngIf="image.Name ==''" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeNameForBucket($event.target.value,i,image.image)">
|
||||
<button float-right ion-button clear color="optblue" (click)="removeImgForBucket(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
|
||||
</ion-col>
|
||||
<hr/>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
</mat-card-content>
|
||||
<br/>
|
||||
|
||||
<button secondary *ngIf="imageBucket.length >0" #focusName align="end" ion-button color="primary" (click)="sendImage()">save Images</button>
|
||||
</mat-card>
|
||||
|
||||
<div *ngSwitchCase="'0'">
|
||||
<div *ngIf="noRecordsFound">
|
||||
<form [formGroup]="clientInfoForm">
|
||||
<div fxLayout="row" fxLayoutAlign="start none">
|
||||
@ -391,6 +442,12 @@
|
||||
</div>
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
<!--END OF FORM SEGMENT-->
|
||||
</div>
|
||||
<!--END OF SWITCHCASES-->
|
||||
<ion-fab bottom right mini>
|
||||
<button mini style="margin-bottom: 10px" ion-fab color="optblue" slot="fixed" (click)="capture()"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button></ion-fab>
|
||||
</ion-content>
|
||||
<ion-footer>
|
||||
<button ion-button full color="optblue" (click)="saveClientInfo(clientInfoForm.value)"> Save</button>
|
||||
|
||||
@ -13,4 +13,22 @@ page-pd-question-client-info {
|
||||
.mat-card-content{
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
|
||||
img{
|
||||
padding:0 5px 0 0;
|
||||
height: 180px;
|
||||
//width:130px;
|
||||
//border:3px solid black;
|
||||
//border-radius: 20px;
|
||||
//background-color: gray;
|
||||
}
|
||||
.docName{
|
||||
width: 100px;
|
||||
border-radius: 4px;
|
||||
border-color: gray;
|
||||
font-size: 12px;
|
||||
height: 28px;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -4,7 +4,8 @@ import { QuestionCategoryProvider } from '../../../../providers/question-categor
|
||||
import { AwsServiceProvider } from '../../../../providers/aws-service/aws-service';
|
||||
import { ToastProvider } from '../../../../providers/common-provider/toast';
|
||||
import { FormGroup, FormBuilder, FormArray } from '@angular/forms';
|
||||
|
||||
import {CameraProvider} from '../../../../providers/common-provider/camera'
|
||||
import {LoadingProvider} from '../../../../providers/common-provider/loading'
|
||||
/**
|
||||
* Generated class for the PdQuestionClientInfoPage page.
|
||||
*
|
||||
@ -42,9 +43,15 @@ export class PdQuestionClientInfoPage {
|
||||
m_manufacturingProducts: any = [];
|
||||
m_tradingProducts: any = [];
|
||||
m_suplierProducts: any = [];
|
||||
imageDisplay: any[];
|
||||
imageBucket: any=[];
|
||||
tab: string='0';
|
||||
|
||||
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams, public qustCat: QuestionCategoryProvider, public aws: AwsServiceProvider, public toast: ToastProvider, public fb: FormBuilder) {
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,
|
||||
public qustCat: QuestionCategoryProvider, public aws: AwsServiceProvider,
|
||||
public toast: ToastProvider, public fb: FormBuilder,private loading:LoadingProvider,private cameraProvider:CameraProvider)
|
||||
{
|
||||
this.pdDetails = this.navParams.get('pdDetails');
|
||||
this.formDetails = this.navParams.get('formDetails');
|
||||
this.users = this.aws.getlocale();
|
||||
@ -97,6 +104,7 @@ export class PdQuestionClientInfoPage {
|
||||
|
||||
ionViewDidLoad() {
|
||||
console.log('ionViewDidLoad PdQuestionClientInfoPage');
|
||||
this.getPDImages();
|
||||
}
|
||||
|
||||
initFormLoadDetails(record) {
|
||||
@ -557,7 +565,7 @@ export class PdQuestionClientInfoPage {
|
||||
Object.keys(answerFormValues).forEach((key) => { if (answerFormValues[key] === null || answerFormValues[key] === undefined || answerFormValues[key] === '') { delete answerFormValues[key] }; });
|
||||
this.qustCat.saveForm(answerFormValues).subscribe(responsed => {
|
||||
if (responsed['status'] == 200) {
|
||||
|
||||
this.clientInfoForm.markAsUntouched();
|
||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||
setTimeout(()=>{
|
||||
this.navCtrl.pop();
|
||||
@ -624,4 +632,82 @@ export class PdQuestionClientInfoPage {
|
||||
|
||||
}
|
||||
|
||||
/*IMAGE SECTION*/
|
||||
getPDImages(){
|
||||
//FOR RETRIEVING PICTURES
|
||||
this.imageDisplay=[]
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.formDetails.form_id,'company_id':this.pdDetails.company_id}
|
||||
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
|
||||
if(!val['msg']){
|
||||
console.log(val['records'])
|
||||
if(val['records'].length>0){
|
||||
val['records'].forEach(result=>{
|
||||
this.imageDisplay.push({'image':result.doc_url,'Name':result.pd_document_title,'option':'dummy'})
|
||||
})
|
||||
console.log("imageBuck",this.imageDisplay);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
changeName(value,index,img){
|
||||
console.log(value);
|
||||
this.imageDisplay[index]={'image':img,'Name':value}
|
||||
|
||||
}
|
||||
changeNameForBucket(value,index,img){
|
||||
this.imageBucket[index]={'image':img,'Name':value}
|
||||
}
|
||||
removeImg(index){
|
||||
this.imageDisplay.splice(index,1);
|
||||
}
|
||||
removeImgForBucket(index){
|
||||
this.imageBucket.splice(index,1)
|
||||
}
|
||||
capture(){
|
||||
//FOR CAPTURING PICS
|
||||
this.cameraProvider.getpicture().then(res=>{
|
||||
console.log("Value",res)
|
||||
if(res != 'error'){
|
||||
this.imageBucket.push({'image':res,'Name':''});
|
||||
//FOR GETTING THE DOC NAME FROM ALERT
|
||||
let alert =this.toast.setAlertForDocName()
|
||||
alert.present()
|
||||
alert.onDidDismiss(value=>{
|
||||
console.log("alert value",value);
|
||||
if(value){
|
||||
this.imageBucket[this.imageBucket.length-1].Name=value.Name
|
||||
}
|
||||
})
|
||||
}
|
||||
},error=>{
|
||||
console.log("Camera Error ",JSON.stringify(error));
|
||||
})
|
||||
this.tab='1';
|
||||
|
||||
|
||||
}
|
||||
sendImage(){
|
||||
this.loading.loaderForSendImage()
|
||||
console.log("ll",JSON.stringify(this.imageBucket));
|
||||
let records:any={
|
||||
'pd_id':this.pdDetails.pd_id,
|
||||
'formid':this.formDetails.form_id,
|
||||
'images':this.imageBucket,
|
||||
'company_id':this.pdDetails.company_id
|
||||
}
|
||||
console.log("records",JSON.stringify(records))
|
||||
|
||||
this.qustCat.savePDImages(records).subscribe(res=>{
|
||||
if(res['dataStatus']== true){
|
||||
this.toast.pdTriggerappmessage("Image Saved Successfully")
|
||||
this.imageBucket=[]
|
||||
this.getPDImages();
|
||||
}
|
||||
else{
|
||||
this.toast.pdTriggerappmessage('Fail');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -10,12 +10,61 @@
|
||||
<!-- <ion-title>Financial Information</ion-title> -->
|
||||
<ion-title>{{formDetails.form_name}}</ion-title>
|
||||
</ion-navbar>
|
||||
|
||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
||||
<ion-segment-button value="0">
|
||||
Form
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="1">
|
||||
Pictures
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-content padding>
|
||||
<form [formGroup]="financialForm">
|
||||
<div [ngSwitch]="tab">
|
||||
<mat-card *ngSwitchCase="'1'" #picContent>
|
||||
|
||||
<mat-card-content>
|
||||
<mat-label *ngIf="imageDisplay.length ==0 && imageBucket.length ==0 "><strong>No Documents Found. Press the camera button below to capture</strong></mat-label>
|
||||
|
||||
<ion-grid *ngIf="imageDisplay.length >0 ">
|
||||
<ion-row>
|
||||
<ion-col col-6 *ngFor="let image of imageDisplay; let i=index" no-padding>
|
||||
<img src="{{image.image}}" imageViewer>
|
||||
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
|
||||
|
||||
<input class="docName" *ngIf="image.Name =='' && image.option != 'dummy'" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeName($event.target.value,i,image.image)">
|
||||
<button *ngIf="image.option != 'dummy'" ion-button clear color="optblue" (click)="removeImg(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
|
||||
</ion-col>
|
||||
<hr/>
|
||||
</ion-row>
|
||||
<hr/>
|
||||
<hr/>
|
||||
</ion-grid>
|
||||
|
||||
|
||||
|
||||
<ion-grid *ngIf="imageBucket.length >0 ">
|
||||
<label style="font-size:14px;color:gray">Newly Captured Pics</label><br/>
|
||||
<ion-row>
|
||||
<ion-col col-6 *ngFor="let image of imageBucket; let i=index" no-padding>
|
||||
<img src="{{image.image}}" imageViewer>
|
||||
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
|
||||
|
||||
<input class="docName" #focusName *ngIf="image.Name ==''" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeNameForBucket($event.target.value,i,image.image)">
|
||||
<button float-right ion-button clear color="optblue" (click)="removeImgForBucket(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
|
||||
</ion-col>
|
||||
<hr/>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
</mat-card-content>
|
||||
<br/>
|
||||
|
||||
<button secondary *ngIf="imageBucket.length >0" #focusName align="end" ion-button color="primary" (click)="sendImage()">save Images</button>
|
||||
</mat-card>
|
||||
|
||||
<form [formGroup]="financialForm" *ngSwitchCase="'0'">
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<mat-card-title>
|
||||
@ -338,6 +387,10 @@
|
||||
|
||||
</ion-row>
|
||||
</form>
|
||||
</div>
|
||||
<!--END OF SWITCHCASES-->
|
||||
<ion-fab bottom right mini>
|
||||
<button mini style="margin-bottom: 10px" ion-fab color="optblue" slot="fixed" (click)="capture()"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button></ion-fab>
|
||||
</ion-content>
|
||||
<ion-footer>
|
||||
<button ion-button full color="optblue" (click)="submitDetails()"> Save</button>
|
||||
|
||||
@ -49,6 +49,21 @@ page-pd-question-financial-info {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
|
||||
img{
|
||||
padding:0 5px 0 0;
|
||||
height: 180px;
|
||||
//width:130px;
|
||||
//border:3px solid black;
|
||||
//border-radius: 20px;
|
||||
//background-color: gray;
|
||||
}
|
||||
.docName{
|
||||
width: 100px;
|
||||
border-radius: 4px;
|
||||
border-color: gray;
|
||||
font-size: 12px;
|
||||
height: 28px;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -5,7 +5,8 @@ import {ToastProvider} from '../../../../providers/common-provider/toast'
|
||||
import {QuestionCategoryProvider} from '../../../../providers/question-category/question-category'
|
||||
import { FormGroup,Validators,FormBuilder, FormArray } from '@angular/forms'
|
||||
import {ConstantsProvider} from '../../../../providers/constants/constants'
|
||||
|
||||
import {CameraProvider} from '../../../../providers/common-provider/camera'
|
||||
import {LoadingProvider} from '../../../../providers/common-provider/loading'
|
||||
/**
|
||||
* Generated class for the PdQuestionFinancialInfoPage page.
|
||||
*
|
||||
@ -54,9 +55,14 @@ export class PdQuestionFinancialInfoPage {
|
||||
{id:4, name:'Factoring'},
|
||||
{id:5, name:'Forfaiting'},
|
||||
{id:1, name:'Others'}]
|
||||
imageDisplay: any[];
|
||||
imageBucket: any=[];
|
||||
tab: string='0';
|
||||
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,
|
||||
public toast:ToastProvider, public qustCat:QuestionCategoryProvider,public fb:FormBuilder,public cons:ConstantsProvider) {
|
||||
public toast:ToastProvider, public qustCat:QuestionCategoryProvider,
|
||||
public fb:FormBuilder,public cons:ConstantsProvider,private cameraProvider:CameraProvider,
|
||||
private loading:LoadingProvider) {
|
||||
this.pdDetails=this.navParams.get('pdDetails');
|
||||
this.formDetails=this.navParams.get('formDetails');
|
||||
this.FormId = this.formDetails.form_id;
|
||||
@ -81,6 +87,7 @@ export class PdQuestionFinancialInfoPage {
|
||||
ionViewDidLoad() {
|
||||
console.log('ionViewDidLoad PdQuestionFinancialInfoPage');
|
||||
this.getDetails()
|
||||
this.getPDImages();
|
||||
}
|
||||
|
||||
AllCalculation(control,index){
|
||||
@ -310,6 +317,7 @@ submitDetails(){
|
||||
let records=this.financialForm.value;
|
||||
this.qustCat.saveForm(records).subscribe(res=>{
|
||||
if(res['status']== 200){
|
||||
this.financialForm.markAsUntouched();
|
||||
this.toast.pdTriggerappmessage("Record Saved Successfully");
|
||||
setTimeout(()=>{
|
||||
this.navCtrl.pop();
|
||||
@ -1239,4 +1247,82 @@ calculateLossAmount( i, details){
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*IMAGE SECTION*/
|
||||
getPDImages(){
|
||||
//FOR RETRIEVING PICTURES
|
||||
this.imageDisplay=[]
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.formDetails.form_id,'company_id':this.pdDetails.company_id}
|
||||
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
|
||||
if(!val['msg']){
|
||||
console.log(val['records'])
|
||||
if(val['records'].length>0){
|
||||
val['records'].forEach(result=>{
|
||||
this.imageDisplay.push({'image':result.doc_url,'Name':result.pd_document_title,'option':'dummy'})
|
||||
})
|
||||
console.log("imageBuck",this.imageDisplay);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
changeName(value,index,img){
|
||||
console.log(value);
|
||||
this.imageDisplay[index]={'image':img,'Name':value}
|
||||
|
||||
}
|
||||
changeNameForBucket(value,index,img){
|
||||
this.imageBucket[index]={'image':img,'Name':value}
|
||||
}
|
||||
removeImg(index){
|
||||
this.imageDisplay.splice(index,1);
|
||||
}
|
||||
removeImgForBucket(index){
|
||||
this.imageBucket.splice(index,1)
|
||||
}
|
||||
capture(){
|
||||
//FOR CAPTURING PICS
|
||||
this.cameraProvider.getpicture().then(res=>{
|
||||
console.log("Value",res)
|
||||
if(res != 'error'){
|
||||
this.imageBucket.push({'image':res,'Name':''});
|
||||
//FOR GETTING THE DOC NAME FROM ALERT
|
||||
let alert =this.toast.setAlertForDocName()
|
||||
alert.present()
|
||||
alert.onDidDismiss(value=>{
|
||||
console.log("alert value",value);
|
||||
if(value){
|
||||
this.imageBucket[this.imageBucket.length-1].Name=value.Name
|
||||
}
|
||||
})
|
||||
}
|
||||
},error=>{
|
||||
console.log("Camera Error ",JSON.stringify(error));
|
||||
})
|
||||
this.tab='1';
|
||||
|
||||
|
||||
}
|
||||
sendImage(){
|
||||
this.loading.loaderForSendImage()
|
||||
console.log("ll",JSON.stringify(this.imageBucket));
|
||||
let records:any={
|
||||
'pd_id':this.pdDetails.pd_id,
|
||||
'formid':this.formDetails.form_id,
|
||||
'images':this.imageBucket,
|
||||
'company_id':this.pdDetails.company_id
|
||||
}
|
||||
console.log("records",JSON.stringify(records))
|
||||
|
||||
this.qustCat.savePDImages(records).subscribe(res=>{
|
||||
if(res['dataStatus']== true){
|
||||
this.toast.pdTriggerappmessage("Image Saved Successfully")
|
||||
this.imageBucket=[]
|
||||
this.getPDImages();
|
||||
}
|
||||
else{
|
||||
this.toast.pdTriggerappmessage('Fail');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -5,8 +5,59 @@
|
||||
</button>
|
||||
<ion-title>{{formDetails.form_name}}</ion-title>
|
||||
</ion-navbar>
|
||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
||||
<ion-segment-button value="0">
|
||||
Form
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="1">
|
||||
Pictures
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-header>
|
||||
<ion-content padding>
|
||||
<div [ngSwitch]="tab">
|
||||
<mat-card *ngSwitchCase="'1'" #picContent>
|
||||
|
||||
<mat-card-content>
|
||||
<mat-label *ngIf="imageDisplay.length ==0 && imageBucket.length ==0 "><strong>No Documents Found. Press the camera button below to capture</strong></mat-label>
|
||||
|
||||
<ion-grid *ngIf="imageDisplay.length >0 ">
|
||||
<ion-row>
|
||||
<ion-col col-6 *ngFor="let image of imageDisplay; let i=index" no-padding>
|
||||
<img src="{{image.image}}" imageViewer>
|
||||
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
|
||||
|
||||
<input class="docName" *ngIf="image.Name =='' && image.option != 'dummy'" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeName($event.target.value,i,image.image)">
|
||||
<button *ngIf="image.option != 'dummy'" ion-button clear color="optblue" (click)="removeImg(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
|
||||
</ion-col>
|
||||
<hr/>
|
||||
</ion-row>
|
||||
<hr/>
|
||||
<hr/>
|
||||
</ion-grid>
|
||||
|
||||
|
||||
|
||||
<ion-grid *ngIf="imageBucket.length >0 ">
|
||||
<label style="font-size:14px;color:gray">Newly Captured Pics</label><br/>
|
||||
<ion-row>
|
||||
<ion-col col-6 *ngFor="let image of imageBucket; let i=index" no-padding>
|
||||
<img src="{{image.image}}" imageViewer>
|
||||
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
|
||||
|
||||
<input class="docName" #focusName *ngIf="image.Name ==''" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeNameForBucket($event.target.value,i,image.image)">
|
||||
<button float-right ion-button clear color="optblue" (click)="removeImgForBucket(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
|
||||
</ion-col>
|
||||
<hr/>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
</mat-card-content>
|
||||
<br/>
|
||||
|
||||
<button secondary *ngIf="imageBucket.length >0" #focusName align="end" ion-button color="primary" (click)="sendImage()">save Images</button>
|
||||
</mat-card>
|
||||
|
||||
<div *ngSwitchCase="'0'">
|
||||
<div *ngIf="noRecordsFound">
|
||||
<form [formGroup]="stockForm">
|
||||
<div fxLayout="row" fxLayoutAlign="start none">
|
||||
@ -388,6 +439,12 @@
|
||||
</div>
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
<!--END OF FORM SEGMENT-->
|
||||
</div>
|
||||
<!--END OF SWITCHCASES-->
|
||||
<ion-fab bottom right mini>
|
||||
<button mini style="margin-bottom: 10px" ion-fab color="optblue" slot="fixed" (click)="capture()"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button></ion-fab>
|
||||
</ion-content>
|
||||
<ion-footer>
|
||||
<button ion-button full color="optblue" (click)="saveStockInfo(stockForm.value)"> Save</button>
|
||||
|
||||
@ -28,5 +28,22 @@ page-pd-question-stock-info {
|
||||
mat-select{
|
||||
margin:5px 0;
|
||||
}
|
||||
|
||||
img{
|
||||
padding:0 5px 0 0;
|
||||
height: 180px;
|
||||
//width:130px;
|
||||
//border:3px solid black;
|
||||
//border-radius: 20px;
|
||||
//background-color: gray;
|
||||
}
|
||||
.docName{
|
||||
width: 100px;
|
||||
border-radius: 4px;
|
||||
border-color: gray;
|
||||
font-size: 12px;
|
||||
height: 28px;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -7,7 +7,8 @@ import { FormArray, FormGroup, FormBuilder } from '@angular/forms';
|
||||
import { ConstantsProvider } from '../../../../providers/constants/constants';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
import {CameraProvider} from '../../../../providers/common-provider/camera'
|
||||
import {LoadingProvider} from '../../../../providers/common-provider/loading'
|
||||
/**
|
||||
* Generated class for the PdQuestionStockInfoPage page.
|
||||
*
|
||||
@ -53,8 +54,14 @@ export class PdQuestionStockInfoPage {
|
||||
TGCommentCard: boolean = false
|
||||
public RMsufficientList: any = [{value:"yes",isdisplayvalue:"Yes",disabled:false},{value:"no",isdisplayvalue:"No",disabled:false},{value:"not applicable",isdisplayvalue:"Stock not required to be maintained",disabled:false}];
|
||||
public TGsufficientList: any = [{value:"yes",isdisplayvalue:"Yes",isdisabled:false},{value:"no",isdisplayvalue:"No",isdisabled:false},{value:"not applicable",isdisplayvalue:"Stock not required to be maintained",isdisabled:false}];
|
||||
imageDisplay: any[];
|
||||
imageBucket: any=[];
|
||||
tab: string='0';
|
||||
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams, public qustCat: QuestionCategoryProvider, public aws: AwsServiceProvider, public toast: ToastProvider, public fb: FormBuilder, public constant: ConstantsProvider) {
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams, public qustCat: QuestionCategoryProvider,
|
||||
public aws: AwsServiceProvider, public toast: ToastProvider, public fb: FormBuilder,
|
||||
public constant: ConstantsProvider,private cameraProvider:CameraProvider,private loading:LoadingProvider)
|
||||
{
|
||||
this.pdDetails = this.navParams.get('pdDetails');
|
||||
this.formDetails = this.navParams.get('formDetails');
|
||||
this.users = this.aws.getlocale();
|
||||
@ -84,6 +91,11 @@ export class PdQuestionStockInfoPage {
|
||||
this.getdropdown();
|
||||
}
|
||||
|
||||
ionViewDidLoad() {
|
||||
console.log('ionViewDidLoad PdQuestionStockInfoPage');
|
||||
this.getPDImages();
|
||||
}
|
||||
|
||||
public initstockForm(record) {
|
||||
let api = Object.keys(record.from_business).map(function (key) {
|
||||
return record.from_business[key];
|
||||
@ -287,9 +299,7 @@ export class PdQuestionStockInfoPage {
|
||||
}
|
||||
}
|
||||
|
||||
ionViewDidLoad() {
|
||||
console.log('ionViewDidLoad PdQuestionStockInfoPage');
|
||||
}
|
||||
|
||||
|
||||
|
||||
getdropdown() {
|
||||
@ -773,10 +783,24 @@ export class PdQuestionStockInfoPage {
|
||||
/** To Save/Edited Popup Data */
|
||||
saveStockInfo(answerFormValues) {
|
||||
//To Remove The "Null" With Key also
|
||||
// if(answerFormValues.manufacturing_details){
|
||||
// answerFormValues.manufacturing_details.forEach(parent=>{
|
||||
// if(parent.manufacturing_finished_goods){
|
||||
// parent.manufacturing_finished_goods.forEach(finish_goods=>{
|
||||
// delete finish_goods.uomSearch
|
||||
// })
|
||||
// }
|
||||
// if(parent.manufacturing_raw_materials){
|
||||
// parent.manufacturing_raw_materials.forEach(raw_mat=>{
|
||||
// delete raw_mat.uomSearch
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]);
|
||||
this.qustCat.saveForm(answerFormValues).subscribe(responsed => {
|
||||
if (responsed['status'] == 200) {
|
||||
|
||||
this.stockForm.markAsUntouched();
|
||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||
setTimeout(() => {
|
||||
this.navCtrl.pop();
|
||||
@ -814,4 +838,81 @@ export class PdQuestionStockInfoPage {
|
||||
})
|
||||
|
||||
}
|
||||
/*IMAGE SECTION*/
|
||||
getPDImages(){
|
||||
//FOR RETRIEVING PICTURES
|
||||
this.imageDisplay=[]
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.formDetails.form_id,'company_id':this.pdDetails.company_id}
|
||||
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
|
||||
if(!val['msg']){
|
||||
console.log(val['records'])
|
||||
if(val['records'].length>0){
|
||||
val['records'].forEach(result=>{
|
||||
this.imageDisplay.push({'image':result.doc_url,'Name':result.pd_document_title,'option':'dummy'})
|
||||
})
|
||||
console.log("imageBuck",this.imageDisplay);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
changeName(value,index,img){
|
||||
console.log(value);
|
||||
this.imageDisplay[index]={'image':img,'Name':value}
|
||||
|
||||
}
|
||||
changeNameForBucket(value,index,img){
|
||||
this.imageBucket[index]={'image':img,'Name':value}
|
||||
}
|
||||
removeImg(index){
|
||||
this.imageDisplay.splice(index,1);
|
||||
}
|
||||
removeImgForBucket(index){
|
||||
this.imageBucket.splice(index,1)
|
||||
}
|
||||
capture(){
|
||||
//FOR CAPTURING PICS
|
||||
this.cameraProvider.getpicture().then(res=>{
|
||||
console.log("Value",res)
|
||||
if(res != 'error'){
|
||||
this.imageBucket.push({'image':res,'Name':''});
|
||||
//FOR GETTING THE DOC NAME FROM ALERT
|
||||
let alert =this.toast.setAlertForDocName()
|
||||
alert.present()
|
||||
alert.onDidDismiss(value=>{
|
||||
console.log("alert value",value);
|
||||
if(value){
|
||||
this.imageBucket[this.imageBucket.length-1].Name=value.Name
|
||||
}
|
||||
})
|
||||
}
|
||||
},error=>{
|
||||
console.log("Camera Error ",JSON.stringify(error));
|
||||
})
|
||||
this.tab='1';
|
||||
|
||||
|
||||
}
|
||||
sendImage(){
|
||||
this.loading.loaderForSendImage()
|
||||
console.log("ll",JSON.stringify(this.imageBucket));
|
||||
let records:any={
|
||||
'pd_id':this.pdDetails.pd_id,
|
||||
'formid':this.formDetails.form_id,
|
||||
'images':this.imageBucket,
|
||||
'company_id':this.pdDetails.company_id
|
||||
}
|
||||
console.log("records",JSON.stringify(records))
|
||||
|
||||
this.qustCat.savePDImages(records).subscribe(res=>{
|
||||
if(res['dataStatus']== true){
|
||||
this.toast.pdTriggerappmessage("Image Saved Successfully")
|
||||
this.imageBucket=[]
|
||||
this.getPDImages();
|
||||
}
|
||||
else{
|
||||
this.toast.pdTriggerappmessage('Fail');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -5,8 +5,59 @@
|
||||
</button>
|
||||
<ion-title>{{formDetails.form_name}}</ion-title>
|
||||
</ion-navbar>
|
||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
||||
<ion-segment-button value="0">
|
||||
Form
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="1">
|
||||
Pictures
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-header>
|
||||
<ion-content padding>
|
||||
<div [ngSwitch]="tab">
|
||||
<mat-card *ngSwitchCase="'1'" #picContent>
|
||||
|
||||
<mat-card-content>
|
||||
<mat-label *ngIf="imageDisplay.length ==0 && imageBucket.length ==0 "><strong>No Documents Found. Press the camera button below to capture</strong></mat-label>
|
||||
|
||||
<ion-grid *ngIf="imageDisplay.length >0 ">
|
||||
<ion-row>
|
||||
<ion-col col-6 *ngFor="let image of imageDisplay; let i=index" no-padding>
|
||||
<img src="{{image.image}}" imageViewer>
|
||||
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
|
||||
|
||||
<input class="docName" *ngIf="image.Name =='' && image.option != 'dummy'" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeName($event.target.value,i,image.image)">
|
||||
<button *ngIf="image.option != 'dummy'" ion-button clear color="optblue" (click)="removeImg(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
|
||||
</ion-col>
|
||||
<hr/>
|
||||
</ion-row>
|
||||
<hr/>
|
||||
<hr/>
|
||||
</ion-grid>
|
||||
|
||||
|
||||
|
||||
<ion-grid *ngIf="imageBucket.length >0 ">
|
||||
<label style="font-size:14px;color:gray">Newly Captured Pics</label><br/>
|
||||
<ion-row>
|
||||
<ion-col col-6 *ngFor="let image of imageBucket; let i=index" no-padding>
|
||||
<img src="{{image.image}}" imageViewer>
|
||||
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
|
||||
|
||||
<input class="docName" #focusName *ngIf="image.Name ==''" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeNameForBucket($event.target.value,i,image.image)">
|
||||
<button float-right ion-button clear color="optblue" (click)="removeImgForBucket(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
|
||||
</ion-col>
|
||||
<hr/>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
</mat-card-content>
|
||||
<br/>
|
||||
|
||||
<button secondary *ngIf="imageBucket.length >0" #focusName align="end" ion-button color="primary" (click)="sendImage()">save Images</button>
|
||||
</mat-card>
|
||||
|
||||
<div *ngSwitchCase="'0'">
|
||||
<div *ngIf="noRecordsFound">
|
||||
<form [formGroup]="supplierInfoForm">
|
||||
<div fxLayout="row" fxLayoutAlign="start none">
|
||||
@ -251,6 +302,12 @@
|
||||
</div>
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
<!--END OF FORM SEGMENT-->
|
||||
</div>
|
||||
<!--END OF SWITCHCASES-->
|
||||
<ion-fab bottom right mini>
|
||||
<button mini style="margin-bottom: 10px" ion-fab color="optblue" slot="fixed" (click)="capture()"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button></ion-fab>
|
||||
</ion-content>
|
||||
<ion-footer>
|
||||
<button ion-button full color="optblue" (click)="saveSupplierInfo(supplierInfoForm.value)"> Save</button>
|
||||
|
||||
@ -13,4 +13,20 @@ page-pd-question-supplier-info {
|
||||
.mat-card-content{
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
img{
|
||||
padding:0 5px 0 0;
|
||||
height: 180px;
|
||||
//width:130px;
|
||||
//border:3px solid black;
|
||||
//border-radius: 20px;
|
||||
//background-color: gray;
|
||||
}
|
||||
.docName{
|
||||
width: 100px;
|
||||
border-radius: 4px;
|
||||
border-color: gray;
|
||||
font-size: 12px;
|
||||
height: 28px;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,8 @@ import { FormBuilder, FormGroup, FormArray } from '@angular/forms';
|
||||
import { AwsServiceProvider } from '../../../../providers/aws-service/aws-service';
|
||||
import { QuestionCategoryProvider } from '../../../../providers/question-category/question-category';
|
||||
import { ToastProvider } from '../../../../providers/common-provider/toast';
|
||||
|
||||
import {CameraProvider} from '../../../../providers/common-provider/camera'
|
||||
import {LoadingProvider} from '../../../../providers/common-provider/loading'
|
||||
/**
|
||||
* Generated class for the PdQuestionSupplsierInfoPage page.
|
||||
*
|
||||
@ -35,8 +36,14 @@ export class PdQuestionSupplierInfoPage {
|
||||
noRecordsFound: Boolean = false;
|
||||
public submitted = false;
|
||||
errorMessage: any = '';
|
||||
imageDisplay: any[];
|
||||
imageBucket: any=[];
|
||||
tab: string='0';
|
||||
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams, public fb: FormBuilder, public aws: AwsServiceProvider, public qustCat: QuestionCategoryProvider, public toast: ToastProvider) {
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams, public fb: FormBuilder,
|
||||
public aws: AwsServiceProvider, public qustCat: QuestionCategoryProvider,
|
||||
public toast: ToastProvider,private cameraProvider:CameraProvider,private loading:LoadingProvider)
|
||||
{
|
||||
|
||||
this.questionDetails = this.navParams.get('questionDetails');
|
||||
this.pdDetails = this.navParams.get('pdDetails');
|
||||
@ -93,6 +100,7 @@ export class PdQuestionSupplierInfoPage {
|
||||
|
||||
ionViewDidLoad() {
|
||||
console.log('ionViewDidLoad PdQuestionSupplierInfoPage');
|
||||
this.getPDImages();
|
||||
}
|
||||
|
||||
|
||||
@ -411,7 +419,7 @@ export class PdQuestionSupplierInfoPage {
|
||||
|
||||
this.qustCat.saveForm(answerFormValues).subscribe(responsed => {
|
||||
if (responsed['status'] == 200) {
|
||||
|
||||
this.supplierInfoForm.markAsUntouched();
|
||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||
setTimeout(() => {
|
||||
this.navCtrl.pop();
|
||||
@ -491,4 +499,82 @@ export class PdQuestionSupplierInfoPage {
|
||||
items.controls['manufacturing_credit_days_to'].updateValueAndValidity();
|
||||
}
|
||||
}
|
||||
|
||||
/*IMAGE SECTION*/
|
||||
getPDImages(){
|
||||
//FOR RETRIEVING PICTURES
|
||||
this.imageDisplay=[]
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.formDetails.form_id,'company_id':this.pdDetails.company_id}
|
||||
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
|
||||
if(!val['msg']){
|
||||
console.log(val['records'])
|
||||
if(val['records'].length>0){
|
||||
val['records'].forEach(result=>{
|
||||
this.imageDisplay.push({'image':result.doc_url,'Name':result.pd_document_title,'option':'dummy'})
|
||||
})
|
||||
console.log("imageBuck",this.imageDisplay);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
changeName(value,index,img){
|
||||
console.log(value);
|
||||
this.imageDisplay[index]={'image':img,'Name':value}
|
||||
|
||||
}
|
||||
changeNameForBucket(value,index,img){
|
||||
this.imageBucket[index]={'image':img,'Name':value}
|
||||
}
|
||||
removeImg(index){
|
||||
this.imageDisplay.splice(index,1);
|
||||
}
|
||||
removeImgForBucket(index){
|
||||
this.imageBucket.splice(index,1)
|
||||
}
|
||||
capture(){
|
||||
//FOR CAPTURING PICS
|
||||
this.cameraProvider.getpicture().then(res=>{
|
||||
console.log("Value",res)
|
||||
if(res != 'error'){
|
||||
this.imageBucket.push({'image':res,'Name':''});
|
||||
//FOR GETTING THE DOC NAME FROM ALERT
|
||||
let alert =this.toast.setAlertForDocName()
|
||||
alert.present()
|
||||
alert.onDidDismiss(value=>{
|
||||
console.log("alert value",value);
|
||||
if(value){
|
||||
this.imageBucket[this.imageBucket.length-1].Name=value.Name
|
||||
}
|
||||
})
|
||||
}
|
||||
},error=>{
|
||||
console.log("Camera Error ",JSON.stringify(error));
|
||||
})
|
||||
this.tab='1';
|
||||
|
||||
|
||||
}
|
||||
sendImage(){
|
||||
this.loading.loaderForSendImage()
|
||||
console.log("ll",JSON.stringify(this.imageBucket));
|
||||
let records:any={
|
||||
'pd_id':this.pdDetails.pd_id,
|
||||
'formid':this.formDetails.form_id,
|
||||
'images':this.imageBucket,
|
||||
'company_id':this.pdDetails.company_id
|
||||
}
|
||||
console.log("records",JSON.stringify(records))
|
||||
|
||||
this.qustCat.savePDImages(records).subscribe(res=>{
|
||||
if(res['dataStatus']== true){
|
||||
this.toast.pdTriggerappmessage("Image Saved Successfully")
|
||||
this.imageBucket=[]
|
||||
this.getPDImages();
|
||||
}
|
||||
else{
|
||||
this.toast.pdTriggerappmessage('Fail');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
@ -97,16 +97,50 @@ applicants: any;
|
||||
console.log("d",data);
|
||||
if(data== false){
|
||||
reject();
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve1, reject1) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the Save Image button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
//reject1();
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve1();
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the 'Save Image' button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getdropdown()
|
||||
{
|
||||
@ -358,7 +392,12 @@ submitCurrentloan(answerData) {
|
||||
|
||||
if(data['dataStatus']==true)
|
||||
{
|
||||
//TO CHANGE THE FORM STATE
|
||||
// this.currentLoans.markAsUntouched();
|
||||
this.currentLoans.reset(this.currentLoans.value);
|
||||
|
||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||
|
||||
setTimeout(()=>{
|
||||
this.navCtrl.pop();
|
||||
},2000);
|
||||
@ -660,7 +699,7 @@ submitCurrentloan(answerData) {
|
||||
getPDImages(){
|
||||
//FOR RETRIEVING PICTURES
|
||||
this.imageDisplay=[]
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id,'company_id':null}
|
||||
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
|
||||
if(!val['msg']){
|
||||
console.log(val['records'])
|
||||
@ -722,14 +761,19 @@ submitCurrentloan(answerData) {
|
||||
console.log("records",JSON.stringify(records))
|
||||
|
||||
this.qustCat.savePDImages(records).subscribe(res=>{
|
||||
console.log("res",res);
|
||||
if(res['dataStatus']== true){
|
||||
this.toast.pdTriggerappmessage("Image Saved Successfully")
|
||||
this.imageBucket=[]
|
||||
this.getPDImages();
|
||||
}
|
||||
else{
|
||||
console.log("Fail")
|
||||
this.toast.pdTriggerappmessage('Fail');
|
||||
}
|
||||
},ERR=>{
|
||||
console.log(JSON.stringify(ERR));
|
||||
this.toast.pdTriggerappmessage(JSON.stringify(ERR));
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -126,19 +126,57 @@ export class PdQuestionEmpInfoPage {
|
||||
console.log("dirty",this.employmentForm.dirty);
|
||||
if(this.employmentForm.dirty){
|
||||
|
||||
return new Promise((resolve,reject)=>{
|
||||
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data)=>{
|
||||
console.log("d",data);
|
||||
if(data== false){
|
||||
reject();
|
||||
}
|
||||
else{
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
return new Promise((resolve,reject)=>{
|
||||
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data)=>{
|
||||
console.log("d",data);
|
||||
if(data== false){
|
||||
reject();
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
//AFTER FORM DIRTY CHECK
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve1, reject1) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the Save Image button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
//reject1();
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve1();
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
else{
|
||||
//REGULAR CHECK FOR IMAGE IS CAPTURED
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the 'Save Image' button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -287,6 +325,9 @@ export class PdQuestionEmpInfoPage {
|
||||
|
||||
|
||||
if(data['dataStatus']== true){
|
||||
//TO CHANGE THE FORM STATE
|
||||
// this.employmentForm.markAsUntouched();
|
||||
this.employmentForm.reset(this.employmentForm.value);
|
||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||
setTimeout(()=>{
|
||||
this.navCtrl.pop();
|
||||
@ -490,7 +531,7 @@ inWords(val,flag:number){
|
||||
getPDImages(){
|
||||
//FOR RETRIEVING PICTURES
|
||||
this.imageDisplay=[]
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id,'company_id':null}
|
||||
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
|
||||
if(!val['msg']){
|
||||
console.log(val['records'])
|
||||
|
||||
@ -106,21 +106,59 @@ data:any;
|
||||
console.log("dirty",this.familyForm.dirty);
|
||||
if(this.familyForm.dirty){
|
||||
|
||||
return new Promise((resolve,reject)=>{
|
||||
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data)=>{
|
||||
console.log("d",data);
|
||||
if(data== false){
|
||||
reject();
|
||||
}
|
||||
else{
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
return new Promise((resolve,reject)=>{
|
||||
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data)=>{
|
||||
console.log("d",data);
|
||||
if(data== false){
|
||||
reject();
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
//AFTER FORM DIRTY CHECK
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve1, reject1) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the Save Image button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
//reject1();
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve1();
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
else{
|
||||
//REGULAR CHECK FOR IMAGE IS CAPTURED
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the 'Save Image' button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
initFamilyDetails(records) : void
|
||||
@ -571,7 +609,8 @@ savepdfamily(answerData)
|
||||
})
|
||||
})
|
||||
this.qustCat.saveForm(records).subscribe(res=>{
|
||||
|
||||
//TO CHANGE THE FORM STATE
|
||||
this.familyForm.reset(this.familyForm.value);
|
||||
this.toast.pdTriggerappmessage("Record Saved Successfully");
|
||||
setTimeout(()=>{
|
||||
this.navCtrl.pop();
|
||||
@ -989,7 +1028,7 @@ searchFun(control:any,i:number,option){
|
||||
getPDImages(){
|
||||
//FOR RETRIEVING PICTURES
|
||||
this.imageDisplay=[]
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id,'company_id':null}
|
||||
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
|
||||
if(!val['msg']){
|
||||
console.log(val['records'])
|
||||
|
||||
@ -72,19 +72,57 @@ export class PdQuestionFinalRemarkPage {
|
||||
console.log("dirty",this._finalRemarkForm.dirty);
|
||||
if(this._finalRemarkForm.dirty){
|
||||
|
||||
return new Promise((resolve,reject)=>{
|
||||
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data)=>{
|
||||
console.log("d",data);
|
||||
if(data== false){
|
||||
reject();
|
||||
}
|
||||
else{
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
return new Promise((resolve,reject)=>{
|
||||
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data)=>{
|
||||
console.log("d",data);
|
||||
if(data== false){
|
||||
reject();
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
//AFTER FORM DIRTY CHECK
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve1, reject1) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the Save Image button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
//reject1();
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve1();
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
else{
|
||||
//REGULAR CHECK FOR IMAGE IS CAPTURED
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the 'Save Image' button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -385,6 +423,8 @@ RecommendationChange(e) {
|
||||
Object.keys(answerData).forEach((key) => (answerData[key] == null) && delete answerData[key]);
|
||||
this.qustcat.saveForm(answerData).subscribe(res=>{
|
||||
if(res['dataStatus']==true){
|
||||
//TO CHANGE THE FORM STATE
|
||||
this._finalRemarkForm.reset(this._finalRemarkForm.value);
|
||||
this.toast.pdTriggerappmessage("Record Saved Successfully");
|
||||
setTimeout(()=>{
|
||||
this.navCtrl.pop();
|
||||
@ -400,7 +440,7 @@ RecommendationChange(e) {
|
||||
getPDImages(){
|
||||
//FOR RETRIEVING PICTURES
|
||||
this.imageDisplay=[]
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id,'company_id':null}
|
||||
this.qustcat.getPDImages(record_for_pic).subscribe(val=>{
|
||||
if(!val['msg']){
|
||||
console.log(val['records'])
|
||||
|
||||
@ -169,19 +169,57 @@ export class PdQuestionGeneralInfoPage {
|
||||
console.log("dirty",this.generalForm.dirty);
|
||||
if(this.generalForm.dirty){
|
||||
|
||||
return new Promise((resolve,reject)=>{
|
||||
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data)=>{
|
||||
console.log("d",data);
|
||||
if(data== false){
|
||||
reject();
|
||||
}
|
||||
else{
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
return new Promise((resolve,reject)=>{
|
||||
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data)=>{
|
||||
console.log("d",data);
|
||||
if(data== false){
|
||||
reject();
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
//AFTER FORM DIRTY CHECK
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve1, reject1) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the Save Image button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
//reject1();
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve1();
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
else{
|
||||
//REGULAR CHECK FOR IMAGE IS CAPTURED
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the 'Save Image' button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1031,6 +1069,8 @@ console.log('1)',this.temp);
|
||||
|
||||
this.qustCat.saveForm(saveRecords).subscribe(dataResult=>{
|
||||
if(dataResult['dataStatus']==true){
|
||||
//TO CHANGE THE FORM STATE
|
||||
this.generalForm.reset(this.generalForm.value);
|
||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||
setTimeout(()=>{
|
||||
this.navCtrl.pop();
|
||||
@ -1286,7 +1326,7 @@ console.log('1)',this.temp);
|
||||
getPDImages(){
|
||||
//FOR RETRIEVING PICTURES
|
||||
this.imageDisplay=[]
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id,'company_id':null}
|
||||
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
|
||||
if(!val['msg']){
|
||||
console.log(val['records'])
|
||||
|
||||
@ -56,19 +56,57 @@ export class PdQuestionLenderRepresentativePage {
|
||||
console.log("dirty",this.representativeForm.dirty);
|
||||
if(this.representativeForm.dirty){
|
||||
|
||||
return new Promise((resolve,reject)=>{
|
||||
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data)=>{
|
||||
console.log("d",data);
|
||||
if(data== false){
|
||||
reject();
|
||||
}
|
||||
else{
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
return new Promise((resolve,reject)=>{
|
||||
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data)=>{
|
||||
console.log("d",data);
|
||||
if(data== false){
|
||||
reject();
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
//AFTER FORM DIRTY CHECK
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve1, reject1) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the Save Image button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
//reject1();
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve1();
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
else{
|
||||
//REGULAR CHECK FOR IMAGE IS CAPTURED
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the 'Save Image' button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -102,7 +140,8 @@ export class PdQuestionLenderRepresentativePage {
|
||||
{
|
||||
if(res['dataStatus']==true)
|
||||
{
|
||||
|
||||
//TO CHANGE THE FORM STATE
|
||||
this.representativeForm.reset(this.representativeForm.value);
|
||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||
setTimeout(()=>{
|
||||
this.navCtrl.pop();
|
||||
@ -157,7 +196,7 @@ export class PdQuestionLenderRepresentativePage {
|
||||
getPDImages(){
|
||||
//FOR RETRIEVING PICTURES
|
||||
this.imageDisplay=[]
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id,'company_id':null}
|
||||
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
|
||||
if(!val['msg']){
|
||||
console.log(val['records'])
|
||||
|
||||
@ -169,20 +169,57 @@ export class PdQuestionLoansPage {
|
||||
console.log("dirty",this.loanDetailsForm.dirty);
|
||||
if(this.loanDetailsForm.dirty){
|
||||
|
||||
return new Promise((resolve,reject)=>{
|
||||
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data)=>{
|
||||
console.log("d",data);
|
||||
if(data== false){
|
||||
reject();
|
||||
}
|
||||
else{
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
return new Promise((resolve,reject)=>{
|
||||
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data)=>{
|
||||
console.log("d",data);
|
||||
if(data== false){
|
||||
reject();
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
//AFTER FORM DIRTY CHECK
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve1, reject1) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the Save Image button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
//reject1();
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve1();
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
else{
|
||||
//REGULAR CHECK FOR IMAGE IS CAPTURED
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the 'Save Image' button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -595,6 +632,9 @@ export class PdQuestionLoansPage {
|
||||
records.loandetails_remarks = this.loanDetailsForm.controls['loandetails_remarks'].value;
|
||||
this.qustCat.saveForm(records).subscribe(data => {
|
||||
if(data['dataStatus']== true){
|
||||
//TO CHANGE THE FORM STATE
|
||||
// this.loanDetailsForm.markAsUntouched();
|
||||
this.loanDetailsForm.reset(this.loanDetailsForm.value);
|
||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||
setTimeout(()=>{
|
||||
this.navCtrl.pop();
|
||||
@ -760,7 +800,7 @@ export class PdQuestionLoansPage {
|
||||
getPDImages(){
|
||||
//FOR RETRIEVING PICTURES
|
||||
this.imageDisplay=[]
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id,'company_id':null}
|
||||
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
|
||||
if(!val['msg']){
|
||||
console.log(val['records'])
|
||||
|
||||
@ -78,19 +78,57 @@ export class PdQuestionNeighbourHoodPage {
|
||||
console.log("dirty",this.neighbourhoodForm.dirty);
|
||||
if(this.neighbourhoodForm.dirty){
|
||||
|
||||
return new Promise((resolve,reject)=>{
|
||||
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data)=>{
|
||||
console.log("d",data);
|
||||
if(data== false){
|
||||
reject();
|
||||
}
|
||||
else{
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
return new Promise((resolve,reject)=>{
|
||||
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data)=>{
|
||||
console.log("d",data);
|
||||
if(data== false){
|
||||
reject();
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
//AFTER FORM DIRTY CHECK
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve1, reject1) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the Save Image button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
//reject1();
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve1();
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
else{
|
||||
//REGULAR CHECK FOR IMAGE IS CAPTURED
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the 'Save Image' button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -414,7 +452,8 @@ ChdCtrls.controls.other_organisation_owner.updateValueAndValidity();
|
||||
{
|
||||
if(res['dataStatus']==true)
|
||||
{
|
||||
|
||||
//TO CHANGE THE FORM STATE
|
||||
this.neighbourhoodForm.reset(this.neighbourhoodForm.value);
|
||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||
setTimeout(()=>{
|
||||
this.navCtrl.pop();
|
||||
@ -503,7 +542,7 @@ ChdCtrls.controls.other_organisation_owner.updateValueAndValidity();
|
||||
getPDImages(){
|
||||
//FOR RETRIEVING PICTURES
|
||||
this.imageDisplay=[]
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id,'company_id':null}
|
||||
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
|
||||
if(!val['msg']){
|
||||
console.log(val['records'])
|
||||
|
||||
@ -93,19 +93,57 @@ export class PdQuestionOtherIncomePage {
|
||||
console.log("dirty",this.otherIncomeForm.dirty);
|
||||
if(this.otherIncomeForm.dirty){
|
||||
|
||||
return new Promise((resolve,reject)=>{
|
||||
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data)=>{
|
||||
console.log("d",data);
|
||||
if(data== false){
|
||||
reject();
|
||||
}
|
||||
else{
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
return new Promise((resolve,reject)=>{
|
||||
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data)=>{
|
||||
console.log("d",data);
|
||||
if(data== false){
|
||||
reject();
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
//AFTER FORM DIRTY CHECK
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve1, reject1) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the Save Image button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
//reject1();
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve1();
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
else{
|
||||
//REGULAR CHECK FOR IMAGE IS CAPTURED
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the 'Save Image' button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -274,7 +312,8 @@ submitOtherIncome(answerData)
|
||||
records.income_details = answerData.income_details;
|
||||
records.otherincome_remarks = answerData.otherincome_remarks;
|
||||
this.qustCat.saveForm(records).subscribe(data => {
|
||||
|
||||
//TO CHANGE THE FORM STATE
|
||||
this.otherIncomeForm.reset(this.otherIncomeDetails.value);
|
||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||
setTimeout(()=>{
|
||||
this.navCtrl.pop();
|
||||
@ -337,7 +376,7 @@ getOtherIncome()
|
||||
getPDImages(){
|
||||
//FOR RETRIEVING PICTURES
|
||||
this.imageDisplay=[]
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id,'company_id':null}
|
||||
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
|
||||
if(!val['msg']){
|
||||
console.log(val['records'])
|
||||
|
||||
@ -206,19 +206,57 @@ export class PdQuestionRentalInfoPage {
|
||||
console.log("dirty",this.rentalForms.dirty);
|
||||
if(this.rentalForms.dirty){
|
||||
|
||||
return new Promise((resolve,reject)=>{
|
||||
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data)=>{
|
||||
console.log("d",data);
|
||||
if(data== false){
|
||||
reject();
|
||||
}
|
||||
else{
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
return new Promise((resolve,reject)=>{
|
||||
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data)=>{
|
||||
console.log("d",data);
|
||||
if(data== false){
|
||||
reject();
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
//AFTER FORM DIRTY CHECK
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve1, reject1) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the Save Image button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
//reject1();
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve1();
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
else{
|
||||
//REGULAR CHECK FOR IMAGE IS CAPTURED
|
||||
if (this.imageBucket.length > 0) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let alert = this.toast.setAlert("<small>Captured Images are not Saved<small>", "<strong><small>Note:To Save the image press the 'Save Image' button</small></strong><br> Are you sure want to Go Back?")
|
||||
alert.present();
|
||||
alert.onDidDismiss((data) => {
|
||||
console.log("d", data);
|
||||
if (data == false) {
|
||||
reject();
|
||||
}
|
||||
else {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -999,6 +1037,8 @@ compareSingleObjects(o1: any, o2: any) {
|
||||
{
|
||||
if(res['dataStatus']==true)
|
||||
{
|
||||
//TO CHANGE THE FORM STATE
|
||||
this.rentalForms.reset(this.rentalForms.value);
|
||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||
setTimeout(()=>{
|
||||
this.navCtrl.pop();
|
||||
@ -1424,7 +1464,7 @@ forSearchableDropdown(val:any,Flag:any){
|
||||
getPDImages(){
|
||||
//FOR RETRIEVING PICTURES
|
||||
this.imageDisplay=[]
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
|
||||
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id,'company_id':null}
|
||||
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
|
||||
if(!val['msg']){
|
||||
console.log(val['records'])
|
||||
|
||||
@ -17,9 +17,10 @@ public commonimage = "http://ssa.sineedge.com/sparqapi/logo/avatar.jpg";
|
||||
apiurl()
|
||||
{
|
||||
let testapiurl = 'http://ssa.sineedge.com/sparqtest/api/';
|
||||
let devapiurl_beta = 'http://ssa.sineedge.com/sparqapi_beta/api/';
|
||||
let devapiurl = 'http://ssa.sineedge.com/sparqapi/api/';
|
||||
let localapiurl = 'http://192.168.0.9/sparqapi/api/';
|
||||
return devapiurl;
|
||||
return devapiurl_beta;
|
||||
}
|
||||
|
||||
getcurrentDate()
|
||||
|
||||
@ -29300,6 +29300,38 @@ page-pd-question-assessed-household .mat-card-content {
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
|
||||
page-pd-question-assessed-images .scroll-content {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
page-pd-question-assessed-images .scroll-content {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
page-pd-question-assessed-images .mat-card {
|
||||
margin-bottom: 15px;
|
||||
border-radius: 10px !important;
|
||||
-webkit-box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.56), 0 4px 25px 0 rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2) !important;
|
||||
box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.56), 0 4px 25px 0 rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2) !important;
|
||||
}
|
||||
|
||||
page-pd-question-assessed-images .mat-card-content {
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
|
||||
page-pd-question-assessed-images img {
|
||||
padding: 0 5px 0 0;
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
page-pd-question-assessed-images input {
|
||||
width: 100px;
|
||||
border-radius: 4px;
|
||||
border-color: gray;
|
||||
font-size: 12px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
page-pd-question-assessed-info ion-scroll.scroll-y .scroll-content {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
@ -29599,6 +29631,19 @@ page-pd-question-business-assets mat-select {
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
page-pd-question-business-assets img {
|
||||
padding: 0 5px 0 0;
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
page-pd-question-business-assets input {
|
||||
width: 100px;
|
||||
border-radius: 4px;
|
||||
border-color: gray;
|
||||
font-size: 12px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
page-pd-question-business-banking .mat-card {
|
||||
margin-bottom: 15px;
|
||||
border-radius: 10px !important;
|
||||
@ -29621,6 +29666,19 @@ page-pd-question-business-banking .scroll-content {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
page-pd-question-business-banking img {
|
||||
padding: 0 5px 0 0;
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
page-pd-question-business-banking input {
|
||||
width: 100px;
|
||||
border-radius: 4px;
|
||||
border-color: gray;
|
||||
font-size: 12px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
page-pd-question-business-info mat-card-title {
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
@ -29687,6 +29745,19 @@ page-pd-question-business-info .checkbo {
|
||||
margin: 15px;
|
||||
}
|
||||
|
||||
page-pd-question-business-info img {
|
||||
padding: 0 5px 0 0;
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
page-pd-question-business-info .docName {
|
||||
width: 100px;
|
||||
border-radius: 4px;
|
||||
border-color: gray;
|
||||
font-size: 12px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
page-pd-question-client-info mat-hint {
|
||||
font-size: 12px;
|
||||
}
|
||||
@ -29706,6 +29777,19 @@ page-pd-question-client-info .mat-card-content {
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
|
||||
page-pd-question-client-info img {
|
||||
padding: 0 5px 0 0;
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
page-pd-question-client-info .docName {
|
||||
width: 100px;
|
||||
border-radius: 4px;
|
||||
border-color: gray;
|
||||
font-size: 12px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
page-pd-question-financial-info mat-form-field {
|
||||
width: 100%;
|
||||
}
|
||||
@ -29762,6 +29846,19 @@ page-pd-question-financial-info .mat-input-placeholder {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
page-pd-question-financial-info img {
|
||||
padding: 0 5px 0 0;
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
page-pd-question-financial-info .docName {
|
||||
width: 100px;
|
||||
border-radius: 4px;
|
||||
border-color: gray;
|
||||
font-size: 12px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
page-pd-question-stock-info mat-hint {
|
||||
font-size: 12px;
|
||||
}
|
||||
@ -29798,6 +29895,19 @@ page-pd-question-stock-info mat-select {
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
page-pd-question-stock-info img {
|
||||
padding: 0 5px 0 0;
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
page-pd-question-stock-info .docName {
|
||||
width: 100px;
|
||||
border-radius: 4px;
|
||||
border-color: gray;
|
||||
font-size: 12px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
page-pd-question-supplier-info mat-hint {
|
||||
font-size: 12px;
|
||||
}
|
||||
@ -29817,6 +29927,19 @@ page-pd-question-supplier-info .mat-card-content {
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
|
||||
page-pd-question-supplier-info img {
|
||||
padding: 0 5px 0 0;
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
page-pd-question-supplier-info .docName {
|
||||
width: 100px;
|
||||
border-radius: 4px;
|
||||
border-color: gray;
|
||||
font-size: 12px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
page-pd-question-current-loans mat-form-field {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user