Fairoj Loader is implemented in Discussion and banking ques added
This commit is contained in:
parent
6c5fb2195a
commit
75e600721b
@ -1 +1 @@
|
|||||||
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
|
{"version":3,"sources":["../../@angular/common/http (ignored)"],"names":[],"mappings":";;;;;AAAA,e","file":"0.js","sourcesContent":["/* (ignored) */\n\n\n//////////////////\n// WEBPACK FOOTER\n// @angular/common/http (ignored)\n// module id = 714\n// module chunks = 0"],"sourceRoot":""}
|
||||||
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
@ -12,7 +12,8 @@
|
|||||||
"build": "ionic build",
|
"build": "ionic build",
|
||||||
"serve": "ionic build",
|
"serve": "ionic build",
|
||||||
"start": "npm run serve",
|
"start": "npm run serve",
|
||||||
"prod_build": "ionic cordova build android --aot --minifyjs --minifycss --max-old-space-size=4096"
|
"prod_build": "ionic cordova build android --aot --minifyjs --minifycss --max-old-space-size=4096",
|
||||||
|
"ionic:build": "node --max-old-space-size=4096 ./node_modules/@ionic/app-scripts/bin/ionic-app-scripts.js build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "^5.1.1",
|
"@angular/animations": "^5.1.1",
|
||||||
|
|||||||
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.
Binary file not shown.
@ -7,7 +7,7 @@ import { MyApp } from './app.component';
|
|||||||
|
|
||||||
import { StatusBar } from '@ionic-native/status-bar';
|
import { StatusBar } from '@ionic-native/status-bar';
|
||||||
import { SplashScreen } from '@ionic-native/splash-screen';
|
import { SplashScreen } from '@ionic-native/splash-screen';
|
||||||
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
|
// import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
|
||||||
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
|
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
|
||||||
import { SQLite } from '@ionic-native/sqlite';
|
import { SQLite } from '@ionic-native/sqlite';
|
||||||
import { DatabaseProvider } from '../providers/database/database';
|
import { DatabaseProvider } from '../providers/database/database';
|
||||||
@ -137,6 +137,8 @@ import {ModalScaleUpEnterTransition} from '../app/modalanimations/enter'
|
|||||||
import {ModalScaleUpLeaveTransition} from '../app/modalanimations/leave'
|
import {ModalScaleUpLeaveTransition} from '../app/modalanimations/leave'
|
||||||
import {Push} from '@ionic-native/push'
|
import {Push} from '@ionic-native/push'
|
||||||
import {AppVersion} from '@ionic-native/app-version'
|
import {AppVersion} from '@ionic-native/app-version'
|
||||||
|
// import { OfficerNotesModalPageModule } from '../pages/officer-notes-modal/officer-notes-modal.module';
|
||||||
|
import { OfficerNotesModalPage } from '../pages/officer-notes-modal/officer-notes-modal';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
@ -194,7 +196,8 @@ import {AppVersion} from '@ionic-native/app-version'
|
|||||||
RupeeCurrencyFormatPipe,SearchRelationPipe,
|
RupeeCurrencyFormatPipe,SearchRelationPipe,
|
||||||
PdQuestionRentalDashPage,
|
PdQuestionRentalDashPage,
|
||||||
MapAddressPage,
|
MapAddressPage,
|
||||||
FormCompleteCheckModalPage
|
FormCompleteCheckModalPage,
|
||||||
|
OfficerNotesModalPage
|
||||||
// PipesModule
|
// PipesModule
|
||||||
|
|
||||||
],
|
],
|
||||||
@ -293,7 +296,8 @@ import {AppVersion} from '@ionic-native/app-version'
|
|||||||
PdQuestionAssessedImagesPage,
|
PdQuestionAssessedImagesPage,
|
||||||
PdQuestionRentalDashPage,
|
PdQuestionRentalDashPage,
|
||||||
MapAddressPage,
|
MapAddressPage,
|
||||||
FormCompleteCheckModalPage
|
FormCompleteCheckModalPage,
|
||||||
|
OfficerNotesModalPage
|
||||||
|
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|||||||
@ -364,4 +364,5 @@ ion-content {
|
|||||||
}
|
}
|
||||||
@import "theme/mapAddress";
|
@import "theme/mapAddress";
|
||||||
@import "theme/imgCompleteModal";
|
@import "theme/imgCompleteModal";
|
||||||
|
@import "theme/officer-notes-modal";
|
||||||
|
|
||||||
|
|||||||
@ -250,10 +250,12 @@
|
|||||||
<ion-row *ngIf="scheduleAccess">
|
<ion-row *ngIf="scheduleAccess">
|
||||||
|
|
||||||
|
|
||||||
<ion-col col-12 style="padding:0px !important;">
|
<ion-col col-8 text-center style="padding:0px !important;">
|
||||||
<button color="primary" ion-button full (click)="pdschedule(scheduleDate,applicatentDetails)">Schedule</button>
|
<button color="primary" ion-button full (click)="pdschedule(scheduleDate,applicatentDetails)">Schedule</button>
|
||||||
|
|
||||||
</ion-col>
|
</ion-col>
|
||||||
|
<ion-col col-4 text-center style="padding: 0px">
|
||||||
|
<button color="tertiary" style="height: 100%" ion-button full (click)="openRemarksModal()"><ion-icon name="clipboard" style="font-size:28px;text-align: center"></ion-icon></button> </ion-col>
|
||||||
</ion-row>
|
</ion-row>
|
||||||
|
|
||||||
<ion-row *ngIf="acceptedAccess">
|
<ion-row *ngIf="acceptedAccess">
|
||||||
|
|||||||
@ -140,4 +140,5 @@ page-input{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -35,6 +35,7 @@ import {BackgroundGeolocation,
|
|||||||
BackgroundGeolocationConfig,
|
BackgroundGeolocationConfig,
|
||||||
BackgroundGeolocationResponse,
|
BackgroundGeolocationResponse,
|
||||||
BackgroundGeolocationEvents} from '@ionic-native/background-geolocation'
|
BackgroundGeolocationEvents} from '@ionic-native/background-geolocation'
|
||||||
|
import { OfficerNotesModalPage } from '../officer-notes-modal/officer-notes-modal';
|
||||||
/**
|
/**
|
||||||
* Generated class for the InputPage page.
|
* Generated class for the InputPage page.
|
||||||
*
|
*
|
||||||
@ -95,6 +96,7 @@ checkOtpAccess:boolean = false;
|
|||||||
private loading:LoadingProvider,public storagedb:StorageProvider,private backgroundgeolocation:BackgroundGeolocation) {
|
private loading:LoadingProvider,public storagedb:StorageProvider,private backgroundgeolocation:BackgroundGeolocation) {
|
||||||
|
|
||||||
console.log("Hi Input")
|
console.log("Hi Input")
|
||||||
|
this.storagedb.clearItem('qc_notes')
|
||||||
|
|
||||||
this.maxdate = this.pipe.transform(new Date(),'yyyy-MM-ddTHH:mm').toString();
|
this.maxdate = this.pipe.transform(new Date(),'yyyy-MM-ddTHH:mm').toString();
|
||||||
// this.maxdate=new Date().toLocaleString();
|
// this.maxdate=new Date().toLocaleString();
|
||||||
@ -108,7 +110,7 @@ checkOtpAccess:boolean = false;
|
|||||||
|
|
||||||
this.statusBar.overlaysWebView(false);
|
this.statusBar.overlaysWebView(false);
|
||||||
this.statusBar.backgroundColorByHexString('#db4437');
|
this.statusBar.backgroundColorByHexString('#db4437');
|
||||||
let timeStart:string = this.pipe.transform(new Date(),'dd/MM/yyyy hh:mm a');
|
// let timeStart:string = this.pipe.transform(new Date(),'dd/MM/yyyy hh:mm a');
|
||||||
|
|
||||||
|
|
||||||
this.applicatentDetails = this.navParams.get('pdDetails');
|
this.applicatentDetails = this.navParams.get('pdDetails');
|
||||||
@ -144,6 +146,7 @@ checkOtpAccess:boolean = false;
|
|||||||
ionViewCanEnter(){
|
ionViewCanEnter(){
|
||||||
this.getFullPD();
|
this.getFullPD();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ionViewDidLoad() {
|
ionViewDidLoad() {
|
||||||
@ -183,6 +186,7 @@ checkOtpAccess:boolean = false;
|
|||||||
|
|
||||||
getFullPD()
|
getFullPD()
|
||||||
{
|
{
|
||||||
|
this.storagedb.setItem(this.applicatentDetails.pd_qc_note,'qc_notes')
|
||||||
let pdDetails_pdid=this.applicatentDetails.is_child != '1' ? this.applicatentDetails.pd_id :this.applicatentDetails.parent_pd_id
|
let pdDetails_pdid=this.applicatentDetails.is_child != '1' ? this.applicatentDetails.pd_id :this.applicatentDetails.parent_pd_id
|
||||||
let records = {'pdid':pdDetails_pdid,'random_string':this.applicatentDetails.random_string};
|
let records = {'pdid':pdDetails_pdid,'random_string':this.applicatentDetails.random_string};
|
||||||
this.pdDetails.getFullPDdetails(records).subscribe(res=>
|
this.pdDetails.getFullPDdetails(records).subscribe(res=>
|
||||||
@ -587,7 +591,7 @@ else{
|
|||||||
startPdDiscussion()
|
startPdDiscussion()
|
||||||
{
|
{
|
||||||
|
|
||||||
let data:any;
|
// let data:any;
|
||||||
let alert = this.alertCtrl.create({
|
let alert = this.alertCtrl.create({
|
||||||
title: 'Start Discussion',
|
title: 'Start Discussion',
|
||||||
message: 'Are you starting the Discussion',
|
message: 'Are you starting the Discussion',
|
||||||
@ -848,6 +852,15 @@ else{
|
|||||||
else{
|
else{
|
||||||
this.toast.pdTriggerappmessage('Fail');
|
this.toast.pdTriggerappmessage('Fail');
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
openRemarksModal(){
|
||||||
|
console.log("function")
|
||||||
|
let params={pd_id:this.applicatentDetails.pd_id,createdby:this.users}
|
||||||
|
this.scheduleAccess=false;
|
||||||
|
this.navCtrl.push(OfficerNotesModalPage,{param_data:params})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
46
src/pages/officer-notes-modal/officer-notes-modal.html
Normal file
46
src/pages/officer-notes-modal/officer-notes-modal.html
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<!--
|
||||||
|
Generated template for the OfficerNotesModalPage page.
|
||||||
|
|
||||||
|
See http://ionicframework.com/docs/components/#navigation for more info on
|
||||||
|
Ionic pages and navigation.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<mat-card *ngIf="!schedule_notes">
|
||||||
|
<mat-card-header>
|
||||||
|
<mat-card-title>
|
||||||
|
Notes for QC Officer
|
||||||
|
</mat-card-title>
|
||||||
|
</mat-card-header>
|
||||||
|
<mat-card-content>
|
||||||
|
<mat-form-field style="width: 100%;">
|
||||||
|
<textarea matInput rows=10 type="text" placeholder="QC Officer Notes" [(ngModel)]="qc_notes"></textarea>
|
||||||
|
</mat-form-field>
|
||||||
|
</mat-card-content>
|
||||||
|
<!-- <ion-item no-lines>
|
||||||
|
|
||||||
|
</ion-item> -->
|
||||||
|
<button float-right ion-button color="tertiary" round (click)="saveNotes()">Save</button>
|
||||||
|
<button float-right ion-button color="tertiary" round outline (click)="cancelModal()">Cancel</button>
|
||||||
|
</mat-card>
|
||||||
|
|
||||||
|
<ion-header *ngIf="schedule_notes">
|
||||||
|
<ion-navbar color="optblue">
|
||||||
|
<ion-title>Officer Notes</ion-title>
|
||||||
|
</ion-navbar>
|
||||||
|
</ion-header>
|
||||||
|
<ion-content *ngIf="schedule_notes" #content>
|
||||||
|
<div *ngFor="let data of display_new_notes;let even=even;let odd=odd">
|
||||||
|
<div [ngClass]={even:even,odd:odd}>
|
||||||
|
<p class="p_tag_remark">{{data.log_time}}<span> | <i>{{data.createdby | titlecase}}</i></span><br/>
|
||||||
|
<span class="remark_all">{{data.remark | titlecase}}</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ion-content>
|
||||||
|
<ion-footer *ngIf="schedule_notes" class="footer">
|
||||||
|
<mat-form-field appearence="outline" style="width: 75%">
|
||||||
|
<mat-label>Notes</mat-label>
|
||||||
|
<input matInput type="text" placeholder="Enter the Notes" [(ngModel)]="newNotes">
|
||||||
|
</mat-form-field>
|
||||||
|
<button ion-button clear (click)="saveRemarks()"><ion-icon name="send" style="font-size: 28px;color:#E00201"></ion-icon></button>
|
||||||
|
</ion-footer>
|
||||||
37
src/pages/officer-notes-modal/officer-notes-modal.scss
Normal file
37
src/pages/officer-notes-modal/officer-notes-modal.scss
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
page-officer-notes-modal {
|
||||||
|
.even{
|
||||||
|
background-color: aliceblue;
|
||||||
|
margin-top:6px;
|
||||||
|
border: 2px solid rgb(232, 242, 250);
|
||||||
|
border-radius: 8px;
|
||||||
|
padding:0.5px 2px 0.5px 10px;
|
||||||
|
// color:grey;
|
||||||
|
}
|
||||||
|
.odd{
|
||||||
|
// background-color: antiquewhite;
|
||||||
|
background-color: white;
|
||||||
|
border: 2px solid rgb(253, 253, 253);
|
||||||
|
border-radius: 8px;
|
||||||
|
padding:0.5px 2px 0.5px 10px;
|
||||||
|
// text-align: center;
|
||||||
|
margin-top:6px;
|
||||||
|
}
|
||||||
|
.p_tag_remark{
|
||||||
|
font-family: 'Times New Roman', Times, serif;
|
||||||
|
// color:gray;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.remark_all{
|
||||||
|
font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
|
||||||
|
font-size:16px;
|
||||||
|
}
|
||||||
|
.footer{
|
||||||
|
padding: 10px 0 0 20px;
|
||||||
|
background-color: #eee;
|
||||||
|
}
|
||||||
|
.scroll-content{
|
||||||
|
background-color: #eee;
|
||||||
|
padding:7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
107
src/pages/officer-notes-modal/officer-notes-modal.ts
Normal file
107
src/pages/officer-notes-modal/officer-notes-modal.ts
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
import { Component, ViewChild } from '@angular/core';
|
||||||
|
import { NavController, NavParams } from 'ionic-angular';
|
||||||
|
// import { QuestionCategoryProvider } from '../../providers/question-category/question-category';
|
||||||
|
import { PdtriggerProvider } from '../../providers/pdtrigger/pdtrigger';
|
||||||
|
import { ToastProvider } from '../../providers/common-provider/toast';
|
||||||
|
import { ViewController } from 'ionic-angular/navigation/view-controller';
|
||||||
|
import { StorageProvider } from '../../providers/storage/storage';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generated class for the OfficerNotesModalPage page.
|
||||||
|
*
|
||||||
|
* See https://ionicframework.com/docs/components/#navigation for more info on
|
||||||
|
* Ionic pages and navigation.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// @IonicPage()
|
||||||
|
@Component({
|
||||||
|
selector: 'page-officer-notes-modal',
|
||||||
|
templateUrl: 'officer-notes-modal.html',
|
||||||
|
})
|
||||||
|
export class OfficerNotesModalPage {
|
||||||
|
qc_notes:any;
|
||||||
|
param_data:any;
|
||||||
|
schedule_notes:boolean;
|
||||||
|
newNotes:any;
|
||||||
|
display_new_notes:any=[]
|
||||||
|
|
||||||
|
@ViewChild('content') content:any;
|
||||||
|
|
||||||
|
constructor(public navCtrl: NavController, public navParams: NavParams,
|
||||||
|
private pdTrigger:PdtriggerProvider,
|
||||||
|
private toastService:ToastProvider,private viewCtrl:ViewController,private storage:StorageProvider) {
|
||||||
|
if(this.navParams.get('values') != undefined){
|
||||||
|
this.param_data=this.navParams.get('values'); //FOR QC NOTES IN DISCUSSION
|
||||||
|
this.schedule_notes=false
|
||||||
|
}
|
||||||
|
else if(this.navParams.get('param_data') != undefined){
|
||||||
|
this.param_data=this.navParams.get('param_data'); //FOR OFFICER REMARKS IN SCHEDULE SCREEN
|
||||||
|
this.schedule_notes=true
|
||||||
|
}
|
||||||
|
console.log("param",this.param_data);
|
||||||
|
console.log(this.navParams.get('param_data'))
|
||||||
|
// this.qc_notes=this.param_data.hasOwnProperty('pd_qc_note') ? this.param_data.pd_qc_note : ''
|
||||||
|
this.storage.getItem('qc_notes').then(result=>{
|
||||||
|
console.log("Local",result)
|
||||||
|
if(result){
|
||||||
|
this.qc_notes=result
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.qc_notes=''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
ionViewDidLoad() {
|
||||||
|
console.log('ionViewDidLoad OfficerNotesModalPage');
|
||||||
|
this.getRemarks();
|
||||||
|
}
|
||||||
|
cancelModal(){
|
||||||
|
this.navCtrl.pop();
|
||||||
|
}
|
||||||
|
saveNotes(){
|
||||||
|
console.log(this.qc_notes);
|
||||||
|
let data:any;
|
||||||
|
data = {'pd_id':this.param_data.pd_id,'fk_updatedby':this.param_data.fk_updatedby,'random_string':this.param_data.random_string,pd_qc_note:this.qc_notes};
|
||||||
|
this.pdTrigger.updatepdStatus(data).subscribe(res=>{
|
||||||
|
if(res['dataStatus']){
|
||||||
|
this.storage.setItem(this.qc_notes,'qc_notes')
|
||||||
|
this.toastService.pdTriggerappmessage("Notes Saved Successfully");
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.viewCtrl.dismiss();
|
||||||
|
},1000)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
getRemarks(){
|
||||||
|
if(this.schedule_notes){
|
||||||
|
let params={pd_id:this.param_data.pd_id,flag:'ALL_REMARKS'}
|
||||||
|
this.pdTrigger.getQCLenderRemarks(params).subscribe(response=>{
|
||||||
|
if(response['dataStatus']){
|
||||||
|
this.display_new_notes=response['records']
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.toastService.pdTriggerappmessage("Something went wrong!!")
|
||||||
|
}
|
||||||
|
},err=>console.log("Network Error",err))
|
||||||
|
// this.content.scrollToBottom(2000)
|
||||||
|
let dimensions = this.content.getContentDimensions();
|
||||||
|
this.content.scrollTo(0, dimensions.scrollHeight+100, 100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
saveRemarks(){
|
||||||
|
console.log(this.newNotes)
|
||||||
|
let params=this.param_data
|
||||||
|
params.remark=this.newNotes
|
||||||
|
this.pdTrigger.savePDRemark(params).subscribe(response=>{
|
||||||
|
if(response['dataStatus']){
|
||||||
|
this.toastService.pdTriggerappmessage("Notes Saved Successfully");
|
||||||
|
this.newNotes='';
|
||||||
|
this.getRemarks();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -35,6 +35,7 @@ import {PdQuestionRentalDashPage} from '../pd-question/pd-question-rental-info/p
|
|||||||
import { PdQuestionFuturePlansAndBusinessEnvironmentPage } from '../pd-question/pd-question-business-group/pd-question-future-plans-and-business-environment/pd-question-future-plans-and-business-environment'
|
import { PdQuestionFuturePlansAndBusinessEnvironmentPage } from '../pd-question/pd-question-business-group/pd-question-future-plans-and-business-environment/pd-question-future-plans-and-business-environment'
|
||||||
import {FormCompleteCheckModalPage} from '../form-complete-check-modal/form-complete-check-modal'
|
import {FormCompleteCheckModalPage} from '../form-complete-check-modal/form-complete-check-modal'
|
||||||
import {ConstantsProvider} from '../../providers/constants/constants'
|
import {ConstantsProvider} from '../../providers/constants/constants'
|
||||||
|
import { StorageProvider } from '../../providers/storage/storage';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -76,7 +77,7 @@ searchitem:any;
|
|||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,public templateget:QuestionCategoryProvider,
|
constructor(public navCtrl: NavController, public navParams: NavParams,public templateget:QuestionCategoryProvider,
|
||||||
public aws:AwsServiceProvider, public shared:CognitoServiceProvider,public toast:ToastProvider,
|
public aws:AwsServiceProvider, public shared:CognitoServiceProvider,public toast:ToastProvider,
|
||||||
public pdstatusprovide:PdtriggerProvider, private modalCtrl:ModalController,private constantProvider:ConstantsProvider) {
|
public pdstatusprovide:PdtriggerProvider, private modalCtrl:ModalController,private constantProvider:ConstantsProvider,private storage:StorageProvider) {
|
||||||
this.pddetails = this.navParams.get('pdDetails');
|
this.pddetails = this.navParams.get('pdDetails');
|
||||||
this.pageTitle=this.pddetails.is_child != '1' ? this.pddetails.applicat_details[0].applicant_name : 'Add On for'+' '+this.pddetails.parent_pd_id
|
this.pageTitle=this.pddetails.is_child != '1' ? this.pddetails.applicat_details[0].applicant_name : 'Add On for'+' '+this.pddetails.parent_pd_id
|
||||||
|
|
||||||
@ -101,6 +102,9 @@ searchitem:any;
|
|||||||
{
|
{
|
||||||
this.getcategoryList();
|
this.getcategoryList();
|
||||||
}
|
}
|
||||||
|
ionViewCanLeave(){
|
||||||
|
// this.storage.clearItem('qc_notes')
|
||||||
|
}
|
||||||
// doughuntChart()
|
// doughuntChart()
|
||||||
// {
|
// {
|
||||||
// this.doughnutChart = new Chart(this.doughnutCanvas.nativeElement, {
|
// this.doughnutChart = new Chart(this.doughnutCanvas.nativeElement, {
|
||||||
|
|||||||
@ -12,9 +12,10 @@
|
|||||||
<!-- <span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span> -->
|
<!-- <span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span> -->
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
<a (click)="imageMandatoryCheck()" *ngIf="!complete_status">
|
<a (click)="imageMandatoryCheck()" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
<!-- <ion-fab float-end mini>
|
<!-- <ion-fab float-end mini>
|
||||||
<button mini style="margin-bottom: 10px ; background-color: #fff !important;" ion-fab slot="fixed" (click)="savePhoto()"><ion-icon name="md-camera" style="
|
<button mini style="margin-bottom: 10px ; background-color: #fff !important;" ion-fab slot="fixed" (click)="savePhoto()"><ion-icon name="md-camera" style="
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
@ -36,18 +37,22 @@
|
|||||||
<mat-icon>save</mat-icon>
|
<mat-icon>save</mat-icon>
|
||||||
</span> -->
|
</span> -->
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
<ion-segment [(ngModel)]="tab" color="optblue" (click)="tabChange()">
|
||||||
<ion-segment-button value="0">
|
<ion-segment-button value="0">
|
||||||
Form
|
Form
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
<ion-segment-button value="1">
|
<ion-segment-button value="1">
|
||||||
Pictures
|
Pictures
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value ="2">
|
||||||
|
Notes
|
||||||
|
</ion-segment-button>
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
<ion-content padding>
|
<ion-content padding>
|
||||||
<div [ngSwitch]="tab">
|
<div [ngSwitch]="tab">
|
||||||
|
|
||||||
<mat-card *ngSwitchCase="'1'" #picContent>
|
<mat-card *ngSwitchCase="'1'" #picContent>
|
||||||
|
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { NavController, NavParams, AlertController } from 'ionic-angular';
|
import { NavController, NavParams, AlertController, ModalController, ModalOptions } from 'ionic-angular';
|
||||||
import {FormBuilder,FormControl,FormArray, FormGroup,Validators} from '@angular/forms';
|
import {FormBuilder,FormControl,FormArray, FormGroup,Validators} from '@angular/forms';
|
||||||
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
||||||
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
||||||
@ -14,6 +14,7 @@ import{LoadingProvider} from '../../../providers/common-provider/loading'
|
|||||||
import {StorageProvider} from '../../../providers/storage/storage'
|
import {StorageProvider} from '../../../providers/storage/storage'
|
||||||
import 'rxjs/add/observable/interval';
|
import 'rxjs/add/observable/interval';
|
||||||
import { DatePipe } from '@angular/common';
|
import { DatePipe } from '@angular/common';
|
||||||
|
import { OfficerNotesModalPage } from '../../officer-notes-modal/officer-notes-modal';
|
||||||
// import{CacheService} from 'ionic-cache-observable'
|
// import{CacheService} from 'ionic-cache-observable'
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionAddressPage page.
|
* Generated class for the PdQuestionAddressPage page.
|
||||||
@ -74,6 +75,7 @@ export class PdQuestionAddressPage {
|
|||||||
complete_status : boolean = false;
|
complete_status : boolean = false;
|
||||||
pipe = new DatePipe('en-US');
|
pipe = new DatePipe('en-US');
|
||||||
AppxPDLocationImgValid : boolean = false;
|
AppxPDLocationImgValid : boolean = false;
|
||||||
|
spinner_access:boolean=false
|
||||||
// counts:number = 1;
|
// counts:number = 1;
|
||||||
private search:searchValue[]
|
private search:searchValue[]
|
||||||
protected _onDestroy = new Subject<void>();
|
protected _onDestroy = new Subject<void>();
|
||||||
@ -92,7 +94,7 @@ export class PdQuestionAddressPage {
|
|||||||
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,
|
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,
|
||||||
public qustCat:QuestionCategoryProvider,public aws:AwsServiceProvider,
|
public qustCat:QuestionCategoryProvider,public aws:AwsServiceProvider,
|
||||||
public toast:ToastProvider,public alerCtrl:AlertController,public constant:ConstantsProvider,
|
public toast:ToastProvider,public alerCtrl:AlertController,public constant:ConstantsProvider,
|
||||||
public camera:Camera,private loading:LoadingProvider,private storagedb:StorageProvider) {
|
public camera:Camera,private loading:LoadingProvider,private storagedb:StorageProvider,private modalCtrl:ModalController) {
|
||||||
|
|
||||||
this.questionDetails = this.navParams.get('questionDetails');
|
this.questionDetails = this.navParams.get('questionDetails');
|
||||||
|
|
||||||
@ -104,7 +106,7 @@ export class PdQuestionAddressPage {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
this.loading.dataLoader()
|
||||||
this.getdropdownlist();
|
this.getdropdownlist();
|
||||||
|
|
||||||
//const control=this.pdQuestionAddress.controls['addresses']
|
//const control=this.pdQuestionAddress.controls['addresses']
|
||||||
@ -166,6 +168,17 @@ export class PdQuestionAddressPage {
|
|||||||
this.getPDImages();
|
this.getPDImages();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
tabChange(){
|
||||||
|
if(this.tab == '2'){
|
||||||
|
const modalOption:ModalOptions={
|
||||||
|
cssClass:'officerNotesModal'
|
||||||
|
}
|
||||||
|
let records:any={pd_id:this.pdDetails.pd_id,pd_qc_note:this.pdDetails.pd_qc_note,fk_updatedby:this.pdDetails.fk_updatedby,random_string:this.pdDetails.random_string}
|
||||||
|
const modalCtrl=this.modalCtrl.create(OfficerNotesModalPage,{'values':records},modalOption)
|
||||||
|
modalCtrl.present();
|
||||||
|
this.tab='0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
searchFun(control:any,i:number,option,flag){
|
searchFun(control:any,i:number,option,flag){
|
||||||
@ -747,6 +760,7 @@ else{
|
|||||||
records.pdid = this.pdDetails.pd_id;
|
records.pdid = this.pdDetails.pd_id;
|
||||||
records.formid = this.FormId.form_id;
|
records.formid = this.FormId.form_id;
|
||||||
records.fk_createdby = this.users;
|
records.fk_createdby = this.users;
|
||||||
|
this.spinner_access=true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -759,14 +773,18 @@ else{
|
|||||||
// this.localInsert(false);
|
// this.localInsert(false);
|
||||||
this.toast.pdTriggerappmessage('Record Saved Successfully');
|
this.toast.pdTriggerappmessage('Record Saved Successfully');
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
this.spinner_access=false
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
},2000);
|
},2000);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
this.spinner_access=false
|
||||||
this.toast.pdTriggerappmessage( 'Something Wents Wrong Try Again.!');
|
this.toast.pdTriggerappmessage( 'Something Wents Wrong Try Again.!');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}, error => {
|
}, error => {
|
||||||
|
this.spinner_access=false
|
||||||
this.toast.pdTriggerappmessage( 'Something Wents Wrong Try Again.!' + '-' + error.error_text + ' occur');
|
this.toast.pdTriggerappmessage( 'Something Wents Wrong Try Again.!' + '-' + error.error_text + ' occur');
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -1014,6 +1032,10 @@ else{
|
|||||||
// else {
|
// else {
|
||||||
// control.push(this.createAddresses(null));
|
// control.push(this.createAddresses(null));
|
||||||
// }
|
// }
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
this.toast.pdTriggerappmessage("Something Went wrong Data not fetched");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
getaddressFormFromLocal(){
|
getaddressFormFromLocal(){
|
||||||
@ -1536,6 +1558,10 @@ else{
|
|||||||
else{
|
else{
|
||||||
this.toast.pdTriggerappmessage('Fail');
|
this.toast.pdTriggerappmessage('Fail');
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
|
this.loading.dismissLoader();
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,9 +9,10 @@
|
|||||||
<!-- <a (click)="savePhoto()">
|
<!-- <a (click)="savePhoto()">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a> -->
|
</a> -->
|
||||||
<a (click)="saveBusinessData(BuissnessForm.value)" *ngIf="!complete_status">
|
<a (click)="saveBusinessData(BuissnessForm.value)" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
|
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
import { NavController, NavParams } from 'ionic-angular';
|
||||||
import { FormGroup, FormBuilder, FormArray, Validators } from '@angular/forms';
|
import { FormGroup, FormBuilder, FormArray, Validators } from '@angular/forms';
|
||||||
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
||||||
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
||||||
@ -31,6 +31,7 @@ export class PdQuestionAssessedBusinessIncomePage {
|
|||||||
Value: any=[];
|
Value: any=[];
|
||||||
AnnualExpenses: any=[];
|
AnnualExpenses: any=[];
|
||||||
complete_status : boolean = false;
|
complete_status : boolean = false;
|
||||||
|
spinner_access: boolean=false;
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,public toast:ToastProvider,public cons:ConstantsProvider) {
|
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,public toast:ToastProvider,public cons:ConstantsProvider) {
|
||||||
this.pdDetails = this.navParams.get('pdDetails');
|
this.pdDetails = this.navParams.get('pdDetails');
|
||||||
this.expenseDetails = this.navParams.get('income');
|
this.expenseDetails = this.navParams.get('income');
|
||||||
@ -185,6 +186,7 @@ export class PdQuestionAssessedBusinessIncomePage {
|
|||||||
|
|
||||||
if(this.BuissnessForm.valid){
|
if(this.BuissnessForm.valid){
|
||||||
let records = {'records':answerData.busIncome};
|
let records = {'records':answerData.busIncome};
|
||||||
|
this.spinner_access=true
|
||||||
|
|
||||||
this.qustCat.saveassessedForms('saveOtherBusinessIncome',records).subscribe(res=>
|
this.qustCat.saveassessedForms('saveOtherBusinessIncome',records).subscribe(res=>
|
||||||
{
|
{
|
||||||
@ -193,9 +195,17 @@ export class PdQuestionAssessedBusinessIncomePage {
|
|||||||
|
|
||||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
this.spinner_access=false
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
},1500)
|
},1500)
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
this.spinner_access=false
|
||||||
|
this.toast.pdTriggerappmessage("Something went wrong");
|
||||||
|
}
|
||||||
|
},err=>{
|
||||||
|
this.spinner_access=false;
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
})
|
})
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -10,9 +10,10 @@
|
|||||||
<!-- <a (click)="savePhoto()">
|
<!-- <a (click)="savePhoto()">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a> -->
|
</a> -->
|
||||||
<a (click)="saveBusinessData(BuissnessForm.value)" *ngIf="!complete_status">
|
<a (click)="saveBusinessData(BuissnessForm.value)" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
|
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
|||||||
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
||||||
import { ToastProvider } from '../../../providers/common-provider/toast';
|
import { ToastProvider } from '../../../providers/common-provider/toast';
|
||||||
import { ConstantsProvider } from '../../../providers/constants/constants'
|
import { ConstantsProvider } from '../../../providers/constants/constants'
|
||||||
|
import { LoadingProvider } from '../../../providers/common-provider/loading';
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionAssessedBusinessPage page.
|
* Generated class for the PdQuestionAssessedBusinessPage page.
|
||||||
*
|
*
|
||||||
@ -32,7 +33,11 @@ export class PdQuestionAssessedBusinessPage {
|
|||||||
pdDetails: any;
|
pdDetails: any;
|
||||||
BuissnessForm:FormGroup;
|
BuissnessForm:FormGroup;
|
||||||
businessExpenses:any;
|
businessExpenses:any;
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,public toast:ToastProvider,public cons:ConstantsProvider) {
|
spinner_access:boolean=false
|
||||||
|
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,public toast:ToastProvider,
|
||||||
|
public cons:ConstantsProvider,private loadingProvider:LoadingProvider) {
|
||||||
|
|
||||||
|
|
||||||
this.pdDetails = this.navParams.get('pdDetails');
|
this.pdDetails = this.navParams.get('pdDetails');
|
||||||
this.expenseDetails = this.navParams.get('expense');
|
this.expenseDetails = this.navParams.get('expense');
|
||||||
this.users = this.aws.getlocale();
|
this.users = this.aws.getlocale();
|
||||||
@ -130,13 +135,18 @@ export class PdQuestionAssessedBusinessPage {
|
|||||||
}]
|
}]
|
||||||
|
|
||||||
let records:any={'records':deleteRecords}
|
let records:any={'records':deleteRecords}
|
||||||
|
|
||||||
this.qustCat.saveassessedForms('saveAssessedIncomeBusinessExpenses',records).subscribe(res=>{
|
this.qustCat.saveassessedForms('saveAssessedIncomeBusinessExpenses',records).subscribe(res=>{
|
||||||
if(res['dataStatus']==true){
|
if(res['dataStatus']==true){
|
||||||
this.toast.pdTriggerappmessage("Record Deleted Successfully");
|
this.toast.pdTriggerappmessage("Record Deleted Successfully");
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|
||||||
this.toast.pdTriggerappmessage("Something Went Wrong");
|
this.toast.pdTriggerappmessage("Something Went Wrong");
|
||||||
}
|
}
|
||||||
|
},err=>{
|
||||||
|
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -208,7 +218,7 @@ export class PdQuestionAssessedBusinessPage {
|
|||||||
|
|
||||||
if(this.BuissnessForm.valid){
|
if(this.BuissnessForm.valid){
|
||||||
let records = {'records':answerData.busExpense};
|
let records = {'records':answerData.busExpense};
|
||||||
|
this.spinner_access=true;
|
||||||
this.qustCat.saveassessedForms('saveAssessedIncomeBusinessExpenses',records).subscribe(res=>
|
this.qustCat.saveassessedForms('saveAssessedIncomeBusinessExpenses',records).subscribe(res=>
|
||||||
{
|
{
|
||||||
if(res['dataStatus']==true)
|
if(res['dataStatus']==true)
|
||||||
@ -216,9 +226,17 @@ export class PdQuestionAssessedBusinessPage {
|
|||||||
|
|
||||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
this.spinner_access=false;
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
},1500)
|
},1500)
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
this.spinner_access=false
|
||||||
|
this.toast.pdTriggerappmessage("Something went wrong");
|
||||||
|
}
|
||||||
|
},err=>{
|
||||||
|
this.spinner_access=false;
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
})
|
})
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -15,9 +15,10 @@
|
|||||||
<!-- <a (click)="savePhoto()">
|
<!-- <a (click)="savePhoto()">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a> -->
|
</a> -->
|
||||||
<a (click)="submitDetails(purchaseItemForm.value)" *ngIf="!complete_status">
|
<a (click)="submitDetails(purchaseItemForm.value)" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
|
|
||||||
|
|||||||
@ -33,6 +33,7 @@ export class PdQuestionAssessedDailyPurchasePage {
|
|||||||
purchaseAmtInWords: any=[];
|
purchaseAmtInWords: any=[];
|
||||||
maxDate:any;
|
maxDate:any;
|
||||||
complete_status: boolean = false;
|
complete_status: boolean = false;
|
||||||
|
spinner_access:boolean=false;
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,
|
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,
|
||||||
private fb:FormBuilder,private quesCat:QuestionCategoryProvider,private toast:ToastProvider,private cons:ConstantsProvider) {
|
private fb:FormBuilder,private quesCat:QuestionCategoryProvider,private toast:ToastProvider,private cons:ConstantsProvider) {
|
||||||
@ -294,17 +295,23 @@ submitDetails(records){
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
this.spinner_access=true;
|
||||||
let recordVal:any={'records':records.purchase_product}
|
let recordVal:any={'records':records.purchase_product}
|
||||||
this.quesCat.saveassessedForms('saveAssessedIncomePurchaseBillwise',recordVal).subscribe(res=>{
|
this.quesCat.saveassessedForms('saveAssessedIncomePurchaseBillwise',recordVal).subscribe(res=>{
|
||||||
if(res['dataStatus']== true){
|
if(res['dataStatus']== true){
|
||||||
this.toast.pdTriggerappmessage("Record Saved Successfully..!")
|
this.toast.pdTriggerappmessage("Record Saved Successfully..!")
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
this.spinner_access=false
|
||||||
this.navCtrl.pop()
|
this.navCtrl.pop()
|
||||||
},1500)
|
},1500)
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.toast.pdTriggerappmessage("Error");
|
this.spinner_access=false
|
||||||
|
this.toast.pdTriggerappmessage("Something went wrong");
|
||||||
}
|
}
|
||||||
|
},err=>{
|
||||||
|
this.spinner_access=false
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,9 +10,10 @@
|
|||||||
<!-- <a (click)="savePhoto()">
|
<!-- <a (click)="savePhoto()">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a> -->
|
</a> -->
|
||||||
<a (click)="saveData(salesDailyForm.value)" *ngIf="!complete_status">
|
<a (click)="saveData(salesDailyForm.value)" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
|
|
||||||
|
|||||||
@ -38,6 +38,7 @@ export class PdQuestionAssessedDailySalesPage {
|
|||||||
product_and_services: any=[];
|
product_and_services: any=[];
|
||||||
maxDate:any;
|
maxDate:any;
|
||||||
complete_status: boolean = false;
|
complete_status: boolean = false;
|
||||||
|
spinner_access:boolean=false;
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams, public aws: AwsServiceProvider, public qustCat: QuestionCategoryProvider, public toast: ToastProvider, public fb: FormBuilder,public constant:ConstantsProvider) {
|
constructor(public navCtrl: NavController, public navParams: NavParams, public aws: AwsServiceProvider, public qustCat: QuestionCategoryProvider, public toast: ToastProvider, public fb: FormBuilder,public constant:ConstantsProvider) {
|
||||||
// this.maxDate=new Date()
|
// this.maxDate=new Date()
|
||||||
var today=new Date
|
var today=new Date
|
||||||
@ -368,10 +369,15 @@ changeOptions(indexVal: any,event: any): void{
|
|||||||
this.qustCat.saveassessedForms('saveAssessedIncomeMonthwiseItems',records).subscribe(res=>{
|
this.qustCat.saveassessedForms('saveAssessedIncomeMonthwiseItems',records).subscribe(res=>{
|
||||||
if(res['dataStatus']==true){
|
if(res['dataStatus']==true){
|
||||||
this.toast.pdTriggerappmessage("Record Deleted Successfully");
|
this.toast.pdTriggerappmessage("Record Deleted Successfully");
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|
||||||
this.toast.pdTriggerappmessage("Something Went Wrong");
|
this.toast.pdTriggerappmessage("Something Went Wrong");
|
||||||
}
|
}
|
||||||
|
},err=>{
|
||||||
|
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -419,15 +425,23 @@ changeOptions(indexVal: any,event: any): void{
|
|||||||
if (this.salesDailyForm.valid) {
|
if (this.salesDailyForm.valid) {
|
||||||
let records = { 'records': answerData.sales_product };
|
let records = { 'records': answerData.sales_product };
|
||||||
console.log("answer Data",records)
|
console.log("answer Data",records)
|
||||||
|
this.spinner_access=true;
|
||||||
this.qustCat.saveassessedForms('saveAssessedIncomeMonthwiseItems', records).subscribe(res => {
|
this.qustCat.saveassessedForms('saveAssessedIncomeMonthwiseItems', records).subscribe(res => {
|
||||||
if (res['dataStatus'] == true) {
|
if (res['dataStatus'] == true) {
|
||||||
|
|
||||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
this.spinner_access=false
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
},1500)
|
},1500)
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
this.spinner_access=false;
|
||||||
|
this.toast.pdTriggerappmessage("Something went wrong");
|
||||||
|
}
|
||||||
|
},err=>{
|
||||||
|
this.spinner_access=false;
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|||||||
@ -155,6 +155,16 @@
|
|||||||
<h1 class="htag">IMAGES</h1>
|
<h1 class="htag">IMAGES</h1>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
|
<ion-col col-6 text-center >
|
||||||
|
<mat-card (click)="getViewPage(13)" style="height: 110px;">
|
||||||
|
<!-- <span class="ribbon cruzeiro">
|
||||||
|
<span>--</span>
|
||||||
|
</span> -->
|
||||||
|
|
||||||
|
<ion-icon class="ion-icon-custome" name="bookmarks"></ion-icon>
|
||||||
|
<h1 class="htag">Notes</h1>
|
||||||
|
</mat-card>
|
||||||
|
</ion-col>
|
||||||
</ion-row>
|
</ion-row>
|
||||||
|
|
||||||
<!-- <mat-card *ngIf="finalAccess" style="margin-bottom:10px;">
|
<!-- <mat-card *ngIf="finalAccess" style="margin-bottom:10px;">
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { IonicPage, NavController, NavParams ,AlertController} from 'ionic-angular';
|
import { IonicPage, NavController, NavParams ,AlertController, ModalOptions, ModalController} from 'ionic-angular';
|
||||||
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
||||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||||
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
||||||
@ -7,6 +7,8 @@ import { ToastProvider } from '../../../providers/common-provider/toast';
|
|||||||
import { PdQuestionAssessedInfoPage } from '../pd-question-assessed-info/pd-question-assessed-info';
|
import { PdQuestionAssessedInfoPage } from '../pd-question-assessed-info/pd-question-assessed-info';
|
||||||
import {PdQuestionAssessedSummaryPage} from '../pd-question-assessed-summary/pd-question-assessed-summary'
|
import {PdQuestionAssessedSummaryPage} from '../pd-question-assessed-summary/pd-question-assessed-summary'
|
||||||
import {PdQuestionAssessedImagesPage} from '../../pd-question/pd-question-assessed-images/pd-question-assessed-images'
|
import {PdQuestionAssessedImagesPage} from '../../pd-question/pd-question-assessed-images/pd-question-assessed-images'
|
||||||
|
import { OfficerNotesModalPage } from '../../officer-notes-modal/officer-notes-modal';
|
||||||
|
import { LoadingProvider } from '../../../providers/common-provider/loading';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionAssessedDashPage page.
|
* Generated class for the PdQuestionAssessedDashPage page.
|
||||||
@ -40,7 +42,12 @@ export class PdQuestionAssessedDashPage {
|
|||||||
pdDetails: any;
|
pdDetails: any;
|
||||||
assessedForm:FormGroup;
|
assessedForm:FormGroup;
|
||||||
alertShown: boolean;
|
alertShown: boolean;
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,public toast:ToastProvider,public alertCtrl:AlertController) {
|
constructor(public navCtrl: NavController, public navParams: NavParams,
|
||||||
|
public aws:AwsServiceProvider,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,
|
||||||
|
public toast:ToastProvider,public alertCtrl:AlertController,private modalCtrl:ModalController,private loadingProvider:LoadingProvider) {
|
||||||
|
|
||||||
|
this.loadingProvider.dataLoader();
|
||||||
|
|
||||||
this.pdDetails = this.navParams.get('pdDetails');
|
this.pdDetails = this.navParams.get('pdDetails');
|
||||||
this.FormId = this.navParams.get('formDetails');
|
this.FormId = this.navParams.get('formDetails');
|
||||||
this.users = this.aws.getlocale();
|
this.users = this.aws.getlocale();
|
||||||
@ -72,10 +79,22 @@ if(pageId == 11){//Summary
|
|||||||
else if(pageId == 12){//IMAGES
|
else if(pageId == 12){//IMAGES
|
||||||
this.navCtrl.push(PdQuestionAssessedImagesPage,{'pdDetails':this.pdDetails,'pageId':pageId,'formdetails':this.FormId})
|
this.navCtrl.push(PdQuestionAssessedImagesPage,{'pdDetails':this.pdDetails,'pageId':pageId,'formdetails':this.FormId})
|
||||||
}
|
}
|
||||||
|
else if(pageId == 13){// QC Notes Modal
|
||||||
|
this.tabChange();
|
||||||
|
}
|
||||||
else{
|
else{
|
||||||
this.navCtrl.push(PdQuestionAssessedInfoPage,{'pdDetails':this.pdDetails,'pageId':pageId});
|
this.navCtrl.push(PdQuestionAssessedInfoPage,{'pdDetails':this.pdDetails,'pageId':pageId});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
tabChange(){
|
||||||
|
const modalOption:ModalOptions={
|
||||||
|
cssClass:'officerNotesModal'
|
||||||
|
}
|
||||||
|
let records:any={pd_id:this.pdDetails.pd_id,pd_qc_note:this.pdDetails.pd_qc_note,fk_updatedby:this.pdDetails.fk_updatedby,random_string:this.pdDetails.random_string}
|
||||||
|
const modalCtrl=this.modalCtrl.create(OfficerNotesModalPage,{'values':records},modalOption)
|
||||||
|
modalCtrl.present();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
saveAssessedForm(answerData)
|
saveAssessedForm(answerData)
|
||||||
{
|
{
|
||||||
@ -195,6 +214,10 @@ else{
|
|||||||
{
|
{
|
||||||
this.assessedProcess = false;
|
this.assessedProcess = false;
|
||||||
}
|
}
|
||||||
|
this.loadingProvider.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.loadingProvider.dismissLoader();
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
completeAI(){
|
completeAI(){
|
||||||
|
|||||||
@ -9,9 +9,10 @@
|
|||||||
<!-- <a (click)="savePhoto()">
|
<!-- <a (click)="savePhoto()">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a> -->
|
</a> -->
|
||||||
<a (click)="saveHouseExpenseData(houseHoldForm.value)" *ngIf="!complete_status">
|
<a (click)="saveHouseExpenseData(houseHoldForm.value)" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
|
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
|
|||||||
@ -31,6 +31,7 @@ export class PdQuestionAssessedHouseholdPage {
|
|||||||
Value: any=[];
|
Value: any=[];
|
||||||
AnnualExpenses: any=[];
|
AnnualExpenses: any=[];
|
||||||
complete_status: boolean = false;
|
complete_status: boolean = false;
|
||||||
|
spinner_access:boolean=false;
|
||||||
// nn:Object[][]=[]
|
// nn:Object[][]=[]
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public aws:AwsServiceProvider,public toast:ToastProvider,public qustCat:QuestionCategoryProvider,public cons:ConstantsProvider) {
|
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public aws:AwsServiceProvider,public toast:ToastProvider,public qustCat:QuestionCategoryProvider,public cons:ConstantsProvider) {
|
||||||
this.pdDetails = this.navParams.get('pdDetails');
|
this.pdDetails = this.navParams.get('pdDetails');
|
||||||
@ -191,6 +192,7 @@ export class PdQuestionAssessedHouseholdPage {
|
|||||||
{
|
{
|
||||||
if(this.houseHoldForm.valid)
|
if(this.houseHoldForm.valid)
|
||||||
{
|
{
|
||||||
|
this.spinner_access=true;
|
||||||
let records = {'records':answerData.houseExpense};
|
let records = {'records':answerData.houseExpense};
|
||||||
this.qustCat.saveassessedForms('saveAssessedIncomeHouseholdExpenses',records).subscribe(res=>
|
this.qustCat.saveassessedForms('saveAssessedIncomeHouseholdExpenses',records).subscribe(res=>
|
||||||
{
|
{
|
||||||
@ -199,9 +201,16 @@ export class PdQuestionAssessedHouseholdPage {
|
|||||||
|
|
||||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
this.spinner_access=false;
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
},1500)
|
},1500)
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
this.spinner_access=false
|
||||||
|
this.toast.pdTriggerappmessage("Something went wrong")
|
||||||
|
}
|
||||||
|
},err=>{
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
})
|
})
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -25,6 +25,8 @@ export class PdQuestionAssessedImagesPage {
|
|||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,private cameraProvider:CameraProvider,
|
constructor(public navCtrl: NavController, public navParams: NavParams,private cameraProvider:CameraProvider,
|
||||||
private loading:LoadingProvider,private toast:ToastProvider,public qustCat:QuestionCategoryProvider,private constantProvider:ConstantsProvider ) {
|
private loading:LoadingProvider,private toast:ToastProvider,public qustCat:QuestionCategoryProvider,private constantProvider:ConstantsProvider ) {
|
||||||
|
|
||||||
|
this.loading.dataLoader();
|
||||||
this.pdDetails=this.navParams.get('pdDetails');
|
this.pdDetails=this.navParams.get('pdDetails');
|
||||||
this.FormId=this.navParams.get('formdetails')
|
this.FormId=this.navParams.get('formdetails')
|
||||||
console.log("pd",this.pdDetails,"form",this.FormId)
|
console.log("pd",this.pdDetails,"form",this.FormId)
|
||||||
@ -50,6 +52,10 @@ export class PdQuestionAssessedImagesPage {
|
|||||||
console.log("imageBuck",this.imageDisplay);
|
console.log("imageBuck",this.imageDisplay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,12 +119,14 @@ export class PdQuestionAssessedImagesPage {
|
|||||||
this.getPDImages();
|
this.getPDImages();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
console.log("Fail")
|
console.log("Something went wrong")
|
||||||
this.toast.pdTriggerappmessage('Fail');
|
this.toast.pdTriggerappmessage('Fail');
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
},ERR=>{
|
},ERR=>{
|
||||||
console.log(JSON.stringify(ERR));
|
console.log(JSON.stringify(ERR));
|
||||||
this.toast.pdTriggerappmessage(JSON.stringify(ERR));
|
this.loading.dismissLoader();
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,9 +10,10 @@
|
|||||||
<!-- <a (click)="savePhoto()">
|
<!-- <a (click)="savePhoto()">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a> -->
|
</a> -->
|
||||||
<a (click)="savepurchaseData(rawMaterialForm.value)" *ngIf="!complete_status">
|
<a (click)="savepurchaseData(rawMaterialForm.value)" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
|
|
||||||
|
|||||||
@ -35,6 +35,7 @@ export class PdQuestionAssessedPurchasePage {
|
|||||||
UOMData:any=[]
|
UOMData:any=[]
|
||||||
check_type:any=[{'type_id':"1",'type_name':'Quantity and Rate Information'},{'type_id':"2",'type_name':'Value Information'}]
|
check_type:any=[{'type_id':"1",'type_name':'Quantity and Rate Information'},{'type_id':"2",'type_name':'Value Information'}]
|
||||||
complete_status: boolean = false;
|
complete_status: boolean = false;
|
||||||
|
spinner_access:boolean=false;
|
||||||
|
|
||||||
protected _onDestroy = new Subject<void>();
|
protected _onDestroy = new Subject<void>();
|
||||||
|
|
||||||
@ -263,6 +264,7 @@ export class PdQuestionAssessedPurchasePage {
|
|||||||
answerData.purchase.forEach(parVal=>{
|
answerData.purchase.forEach(parVal=>{
|
||||||
delete parVal.uomSearch
|
delete parVal.uomSearch
|
||||||
})
|
})
|
||||||
|
this.spinner_access=true;
|
||||||
|
|
||||||
let records = {'records':answerData.purchase};
|
let records = {'records':answerData.purchase};
|
||||||
console.log('data',records);
|
console.log('data',records);
|
||||||
@ -273,11 +275,19 @@ export class PdQuestionAssessedPurchasePage {
|
|||||||
|
|
||||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
this.spinner_access=false
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
},1500)
|
},1500)
|
||||||
// this.getAssessedDetails();
|
// this.getAssessedDetails();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
this.spinner_access=false;
|
||||||
|
this.toast.pdTriggerappmessage("Something went wrong")
|
||||||
|
}
|
||||||
|
},err=>{
|
||||||
|
this.spinner_access=false;
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
})
|
})
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -10,9 +10,10 @@
|
|||||||
<!-- <a (click)="savePhoto()">
|
<!-- <a (click)="savePhoto()">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a> -->
|
</a> -->
|
||||||
<a (click)="saveData(assessedForm.value)" *ngIf="!complete_status">
|
<a (click)="saveData(assessedForm.value)" *ngIf="!complete_status && !spinner_accesss">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
|
|
||||||
|
|||||||
@ -41,6 +41,7 @@ export class PdQuestionAssessedSalesPage {
|
|||||||
product_and_services: any=[];
|
product_and_services: any=[];
|
||||||
complete_status: boolean = false;
|
complete_status: boolean = false;
|
||||||
UOMData:any=[]
|
UOMData:any=[]
|
||||||
|
spinner_access:boolean=false;
|
||||||
protected _onDestroy = new Subject<void>();
|
protected _onDestroy = new Subject<void>();
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,public toast:ToastProvider,public cons:ConstantsProvider) {
|
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,public toast:ToastProvider,public cons:ConstantsProvider) {
|
||||||
this.pdDetails = this.navParams.get('pdDetails');
|
this.pdDetails = this.navParams.get('pdDetails');
|
||||||
@ -412,7 +413,7 @@ export class PdQuestionAssessedSalesPage {
|
|||||||
answerData.salesCalItemwise.forEach(parVal=>{
|
answerData.salesCalItemwise.forEach(parVal=>{
|
||||||
delete parVal.uomSearch
|
delete parVal.uomSearch
|
||||||
});
|
});
|
||||||
|
this.spinner_access=true
|
||||||
let records = {'records':answerData.salesCalItemwise};
|
let records = {'records':answerData.salesCalItemwise};
|
||||||
console.log(records);
|
console.log(records);
|
||||||
this.qustCat.saveassessedForms('saveAssessedIncomeSalesCalculatedByItemwise',records).subscribe(res=>
|
this.qustCat.saveassessedForms('saveAssessedIncomeSalesCalculatedByItemwise',records).subscribe(res=>
|
||||||
@ -422,9 +423,17 @@ export class PdQuestionAssessedSalesPage {
|
|||||||
|
|
||||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
this.spinner_access=false
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
},1500)
|
},1500)
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
this.spinner_access=false;
|
||||||
|
this.toast.pdTriggerappmessage("Something Went wrong");
|
||||||
|
}
|
||||||
|
},err=>{
|
||||||
|
this.spinner_access=false;
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|||||||
@ -8,18 +8,22 @@
|
|||||||
<a (click)="savePhoto()">
|
<a (click)="savePhoto()">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
<a (click)="saveAssetDetails(AssetsDetailsForm.value)" *ngIf="!complete_status">
|
<a (click)="saveAssetDetails(AssetsDetailsForm.value)" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
<ion-segment [(ngModel)]="tab" color="optblue" (click)="tabChange()">
|
||||||
<ion-segment-button value="0">
|
<ion-segment-button value="0">
|
||||||
Form
|
Form
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
<ion-segment-button value="1">
|
<ion-segment-button value="1">
|
||||||
Pictures
|
Pictures
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value ="2">
|
||||||
|
Notes
|
||||||
|
</ion-segment-button>
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
<ion-content padding>
|
<ion-content padding>
|
||||||
|
|||||||
@ -1,11 +1,14 @@
|
|||||||
import { Component, ViewChild } from '@angular/core';
|
import { Component, ViewChild } from '@angular/core';
|
||||||
import { NavController, NavParams,AlertController, Content } from 'ionic-angular';
|
import { NavController, NavParams,AlertController, Content, ActionSheetController, ModalController, ModalOptions } from 'ionic-angular';
|
||||||
import { FormArray,FormGroup,FormBuilder,Validators} from '@angular/forms';
|
import { FormArray,FormGroup,FormBuilder,Validators} from '@angular/forms';
|
||||||
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
||||||
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
||||||
import {ConstantsProvider} from '../../../providers/constants/constants'
|
import {ConstantsProvider} from '../../../providers/constants/constants'
|
||||||
import { ToastProvider } from '../../../providers/common-provider/toast';
|
import { ToastProvider } from '../../../providers/common-provider/toast';
|
||||||
import {Camera} from '@ionic-native/camera'
|
import {Camera} from '@ionic-native/camera'
|
||||||
|
import { OfficerNotesModalPage } from '../../officer-notes-modal/officer-notes-modal';
|
||||||
|
import { LoadingProvider } from '../../../providers/common-provider/loading';
|
||||||
|
|
||||||
// import {CacheService} from 'ionic-cache-observable'
|
// import {CacheService} from 'ionic-cache-observable'
|
||||||
// import { Observable } from 'rxjs/Observable';
|
// import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
@ -61,8 +64,12 @@ export class PdQuestionAssestsPage {
|
|||||||
@ViewChild('focusName') inputFocus;
|
@ViewChild('focusName') inputFocus;
|
||||||
@ViewChild('picContent') content: Content
|
@ViewChild('picContent') content: Content
|
||||||
complete_status: boolean = false;
|
complete_status: boolean = false;
|
||||||
|
spinner_access:boolean=false
|
||||||
// data:Observable <any>;
|
// data:Observable <any>;
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,public toast:ToastProvider,public constprovider:ConstantsProvider,public camera:Camera,public alert: AlertController) {
|
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,
|
||||||
|
public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,public toast:ToastProvider,
|
||||||
|
public constprovider:ConstantsProvider,public camera:Camera,public alert: AlertController,
|
||||||
|
private actionSheetCtrl:ActionSheetController,private modalCtrl:ModalController,private loaderProvider:LoadingProvider) {
|
||||||
|
|
||||||
this.assestInfo = "busass";
|
this.assestInfo = "busass";
|
||||||
this.FormId = this.navParams.get('FormId');
|
this.FormId = this.navParams.get('FormId');
|
||||||
@ -80,7 +87,7 @@ export class PdQuestionAssestsPage {
|
|||||||
asset_info_available:[false]
|
asset_info_available:[false]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
this.loaderProvider.dataLoader();
|
||||||
this.getdropList();
|
this.getdropList();
|
||||||
this.loadDetails = true;
|
this.loadDetails = true;
|
||||||
|
|
||||||
@ -93,6 +100,37 @@ export class PdQuestionAssestsPage {
|
|||||||
this.getPDImages();
|
this.getPDImages();
|
||||||
this.getAssetDetails();
|
this.getAssetDetails();
|
||||||
}
|
}
|
||||||
|
// present_actionsheet(){
|
||||||
|
// // var self = this;
|
||||||
|
// // let options = [
|
||||||
|
// // "Option1",
|
||||||
|
// // "Option2",
|
||||||
|
// // "Option3"
|
||||||
|
// // ];
|
||||||
|
// // let actionSheet = this.actionSheetCtrl.create({
|
||||||
|
// // title: 'Categories',
|
||||||
|
// // });
|
||||||
|
// // options.forEach(option => {
|
||||||
|
// // actionSheet.addButton({
|
||||||
|
// // text: option,
|
||||||
|
// // handler: function() {
|
||||||
|
// // console.log(this.text);
|
||||||
|
// // self = this.text;
|
||||||
|
// // }
|
||||||
|
// // })
|
||||||
|
// // });
|
||||||
|
// // actionSheet.present();
|
||||||
|
// const modalOption:ModalOptions={
|
||||||
|
|
||||||
|
// // enterAnimation: 'modal-scale-up-enter',
|
||||||
|
// // leaveAnimation: 'modal-scale-up-leave',
|
||||||
|
// cssClass:'officerNotesModal'
|
||||||
|
// }
|
||||||
|
// const modalCtrl=this.modalCtrl.create(OfficerNotesModalPage,'',modalOption)
|
||||||
|
// modalCtrl.present();
|
||||||
|
// // modalCtrl.onDidDismiss()
|
||||||
|
// }
|
||||||
|
|
||||||
// ionViewWillLeave(){
|
// ionViewWillLeave(){
|
||||||
// console.log(this.AssetsDetailsForm.dirty);
|
// console.log(this.AssetsDetailsForm.dirty);
|
||||||
// if(this.AssetsDetailsForm.dirty){
|
// if(this.AssetsDetailsForm.dirty){
|
||||||
@ -165,6 +203,17 @@ export class PdQuestionAssestsPage {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tabChange(){
|
||||||
|
if(this.tab == '2'){
|
||||||
|
const modalOption:ModalOptions={
|
||||||
|
cssClass:'officerNotesModal'
|
||||||
|
}
|
||||||
|
let records:any={pd_id:this.pdDetails.pd_id,pd_qc_note:this.pdDetails.pd_qc_note,fk_updatedby:this.pdDetails.fk_updatedby,random_string:this.pdDetails.random_string}
|
||||||
|
const modalCtrl=this.modalCtrl.create(OfficerNotesModalPage,{'values':records},modalOption)
|
||||||
|
modalCtrl.present();
|
||||||
|
this.tab='0';
|
||||||
|
}
|
||||||
|
}
|
||||||
getdropList()
|
getdropList()
|
||||||
{
|
{
|
||||||
//GETTING Asset Type
|
//GETTING Asset Type
|
||||||
@ -536,10 +585,10 @@ export class PdQuestionAssestsPage {
|
|||||||
|
|
||||||
saveAssetDetails(answerData)
|
saveAssetDetails(answerData)
|
||||||
{
|
{
|
||||||
if(!this.AssetsDetailsForm.dirty){
|
// if(!this.AssetsDetailsForm.dirty){
|
||||||
this.toast.pdTriggerappmessage("Modified"+' '+this.AssetsDetailsForm.dirty);
|
// this.toast.pdTriggerappmessage("Modified"+' '+this.AssetsDetailsForm.dirty);
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
Object.keys(answerData).forEach((key) => (answerData[key] == null) && delete answerData[key]);
|
Object.keys(answerData).forEach((key) => (answerData[key] == null) && delete answerData[key]);
|
||||||
// answerData.assets_details.map(val => {
|
// answerData.assets_details.map(val => {
|
||||||
@ -554,6 +603,7 @@ export class PdQuestionAssestsPage {
|
|||||||
answerData.pdid = this.pdDetails.pd_id;
|
answerData.pdid = this.pdDetails.pd_id;
|
||||||
answerData.formid = this.FormId.form_id;
|
answerData.formid = this.FormId.form_id;
|
||||||
answerData.fk_createdby = this.users;
|
answerData.fk_createdby = this.users;
|
||||||
|
this.spinner_access=true;
|
||||||
|
|
||||||
this.qustCat.saveForm(answerData).subscribe(res=>
|
this.qustCat.saveForm(answerData).subscribe(res=>
|
||||||
{
|
{
|
||||||
@ -563,9 +613,14 @@ export class PdQuestionAssestsPage {
|
|||||||
this.AssetsDetailsForm.reset(this.AssetsDetailsForm.value);
|
this.AssetsDetailsForm.reset(this.AssetsDetailsForm.value);
|
||||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
this.spinner_access=false
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
},2000);
|
},2000);
|
||||||
}
|
}
|
||||||
|
},err=>{
|
||||||
|
this.spinner_access=false
|
||||||
|
this.toast.pdTriggerappmessage("Network Error")
|
||||||
|
console.log("Error",err);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -639,6 +694,7 @@ export class PdQuestionAssestsPage {
|
|||||||
// this.addAsset(1);
|
// this.addAsset(1);
|
||||||
// this.addAsset(2);
|
// this.addAsset(2);
|
||||||
}
|
}
|
||||||
|
this.loaderProvider.dismissLoader();
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -849,7 +905,7 @@ export class PdQuestionAssestsPage {
|
|||||||
savePhoto(){
|
savePhoto(){
|
||||||
let num_of_images=(this.imageBucket.length+1)+(this.imageDisplay.length+1)
|
let num_of_images=(this.imageBucket.length+1)+(this.imageDisplay.length+1)
|
||||||
console.log("num of images",num_of_images)
|
console.log("num of images",num_of_images)
|
||||||
if(num_of_images <=10){
|
// if(num_of_images <=10){
|
||||||
this.camera.getPicture({
|
this.camera.getPicture({
|
||||||
quality: 100,
|
quality: 100,
|
||||||
destinationType: this.camera.DestinationType.DATA_URL,
|
destinationType: this.camera.DestinationType.DATA_URL,
|
||||||
@ -865,17 +921,17 @@ export class PdQuestionAssestsPage {
|
|||||||
this. getImageName(this.imageBucket.length-1)
|
this. getImageName(this.imageBucket.length-1)
|
||||||
})
|
})
|
||||||
},(err)=>{
|
},(err)=>{
|
||||||
//alert("error");
|
console.log("error",err);
|
||||||
})
|
})
|
||||||
this.tab='1';
|
this.tab='1';
|
||||||
// this.content.scrollToBottom();
|
// this.content.scrollToBottom();
|
||||||
// let dimensions = this.content.getContentDimensions();
|
// let dimensions = this.content.getContentDimensions();
|
||||||
// this.content.scrollTo(0, dimensions.contentHeight+100, 100);
|
// this.content.scrollTo(0, dimensions.contentHeight+100, 100);
|
||||||
// this.inputFocus.setFocus();
|
// this.inputFocus.setFocus();
|
||||||
}
|
// }
|
||||||
else{
|
// else{
|
||||||
this.toast.pdTriggerappmessage("You are reached the image Limit. To Capture new one Delete the Previous image");
|
// this.toast.pdTriggerappmessage("You are reached the image Limit. To Capture new one Delete the Previous image");
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
getImageName(index){
|
getImageName(index){
|
||||||
console.log("index",index);
|
console.log("index",index);
|
||||||
@ -910,7 +966,7 @@ export class PdQuestionAssestsPage {
|
|||||||
// }
|
// }
|
||||||
sendImage(){
|
sendImage(){
|
||||||
console.log("ll",JSON.stringify(this.imageBucket));
|
console.log("ll",JSON.stringify(this.imageBucket));
|
||||||
|
this.loaderProvider.loaderForSendImage();
|
||||||
let records:any={
|
let records:any={
|
||||||
'pd_id':this.pdDetails.pd_id,
|
'pd_id':this.pdDetails.pd_id,
|
||||||
'formid':this.FormId.form_id,
|
'formid':this.FormId.form_id,
|
||||||
@ -929,6 +985,10 @@ export class PdQuestionAssestsPage {
|
|||||||
else{
|
else{
|
||||||
this.toast.pdTriggerappmessage('Fail');
|
this.toast.pdTriggerappmessage('Fail');
|
||||||
}
|
}
|
||||||
|
this.loaderProvider.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.toast.pdTriggerappmessage("Network Error")
|
||||||
|
this.loaderProvider.dismissLoader();
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -949,13 +1009,16 @@ export class PdQuestionAssestsPage {
|
|||||||
// console.log( this.AssetsDetailsForm.controls.assets_details)
|
// console.log( this.AssetsDetailsForm.controls.assets_details)
|
||||||
// console.log(this.assets_details);
|
// console.log(this.assets_details);
|
||||||
// this.assets_details=this.fb.array([])
|
// this.assets_details=this.fb.array([])
|
||||||
this.assetItem = this.AssetsDetailsForm.get('assets_details') as FormArray;
|
// this.assetItem = this.AssetsDetailsForm.get('assets_details') as FormArray;
|
||||||
this.AssetsDetailsForm.controls.assets_details.value.forEach((res,index)=>{
|
// this.AssetsDetailsForm.controls.assets_details.value.forEach((res,index)=>{
|
||||||
console.log(index);
|
// console.log(index);
|
||||||
this.assetItem.removeAt(index);
|
// this.assetItem.removeAt(index);
|
||||||
})
|
// })
|
||||||
|
// this.assetItem.removeAt(0);
|
||||||
|
while(this.assetItem.length !=0){
|
||||||
this.assetItem.removeAt(0);
|
this.assetItem.removeAt(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -10,18 +10,22 @@
|
|||||||
<a (click)="capture()">
|
<a (click)="capture()">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
<a (click)="savepdBank(bankDetails.value)" *ngIf="!complete_status">
|
<a (click)="savepdBank(bankDetails.value)" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
<ion-segment [(ngModel)]="tab" color="optblue" (click)="tabChange()">
|
||||||
<ion-segment-button value="0">
|
<ion-segment-button value="0">
|
||||||
Form
|
Form
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
<ion-segment-button value="1">
|
<ion-segment-button value="1">
|
||||||
Pictures
|
Pictures
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value ="2">
|
||||||
|
Notes
|
||||||
|
</ion-segment-button>
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
<ion-content padding>
|
<ion-content padding>
|
||||||
@ -73,6 +77,12 @@
|
|||||||
</button>
|
</button>
|
||||||
</ion-fab> -->
|
</ion-fab> -->
|
||||||
<form [formGroup]="bankDetails" *ngSwitchCase="'0'">
|
<form [formGroup]="bankDetails" *ngSwitchCase="'0'">
|
||||||
|
<mat-card>
|
||||||
|
<div>
|
||||||
|
<label class="toggle_label"> Is the Banking Infomation Available <strong>( {{bankDetails.controls['bank_info_available'].value===true ? 'Yes' : 'No'}} )</strong></label>
|
||||||
|
<mat-slide-toggle float-right color="primary" formControlName="bank_info_available" (change)="setAction($event.value)"></mat-slide-toggle>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
<div fxLayout="row" fxLayoutWrap="wrap" formArrayName="bankitems" *ngFor="let bankinfo of bankDetails.get('bankitems')['controls']; let i = index;let last = last;">
|
<div fxLayout="row" fxLayoutWrap="wrap" formArrayName="bankitems" *ngFor="let bankinfo of bankDetails.get('bankitems')['controls']; let i = index;let last = last;">
|
||||||
<div class="column" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
<div class="column" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { NavController, NavParams } from 'ionic-angular';
|
import { NavController, NavParams, ModalController, ModalOptions } from 'ionic-angular';
|
||||||
import { FormGroup, FormBuilder, FormArray } from '@angular/forms';
|
import { FormGroup, FormBuilder, FormArray } from '@angular/forms';
|
||||||
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
||||||
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
||||||
@ -10,6 +10,7 @@ import { Subject } from 'rxjs';
|
|||||||
import { takeUntil } from 'rxjs/operators';
|
import { takeUntil } from 'rxjs/operators';
|
||||||
import {CameraProvider} from '../../../providers/common-provider/camera'
|
import {CameraProvider} from '../../../providers/common-provider/camera'
|
||||||
import {LoadingProvider} from '../../../providers/common-provider/loading'
|
import {LoadingProvider} from '../../../providers/common-provider/loading'
|
||||||
|
import { OfficerNotesModalPage } from '../../officer-notes-modal/officer-notes-modal';
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionBankingPage page.
|
* Generated class for the PdQuestionBankingPage page.
|
||||||
*
|
*
|
||||||
@ -47,11 +48,12 @@ export class PdQuestionBankingPage {
|
|||||||
imageBucket: any=[];
|
imageBucket: any=[];
|
||||||
tab: any='0';
|
tab: any='0';
|
||||||
complete_status: boolean = false;
|
complete_status: boolean = false;
|
||||||
|
spinner_access:boolean=false;
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,
|
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,
|
||||||
public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,
|
public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,
|
||||||
public toast:ToastProvider,public cons: ConstantsProvider,private cameraProvider:CameraProvider,
|
public toast:ToastProvider,public cons: ConstantsProvider,private cameraProvider:CameraProvider,
|
||||||
private loading:LoadingProvider) {
|
private loading:LoadingProvider,private modalCtrl:ModalController) {
|
||||||
//this.applicants.pop();
|
//this.applicants.pop();
|
||||||
this.pdDetails = this.navParams.get('pdDetails');
|
this.pdDetails = this.navParams.get('pdDetails');
|
||||||
this.pdid=this.pdDetails.pd_id;
|
this.pdid=this.pdDetails.pd_id;
|
||||||
@ -67,13 +69,14 @@ export class PdQuestionBankingPage {
|
|||||||
{
|
{
|
||||||
bankitems:this.fb.array([]),
|
bankitems:this.fb.array([]),
|
||||||
banking_form_remark:[null],
|
banking_form_remark:[null],
|
||||||
|
bank_info_available:[false]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.salaryField = this.pdDetails.customer_segment_abbr.substring(0,2) == 'SE' ? false : true;
|
this.salaryField = this.pdDetails.customer_segment_abbr.substring(0,2) == 'SE' ? false : true;
|
||||||
|
|
||||||
|
this.loading.dataLoader();
|
||||||
this.getdropdown();
|
this.getdropdown();
|
||||||
this.retiveBankDetails();
|
this.retiveBankDetails();
|
||||||
// this.bankDetails.controls['bankitems'].valueChanges
|
// this.bankDetails.controls['bankitems'].valueChanges
|
||||||
@ -175,6 +178,17 @@ export class PdQuestionBankingPage {
|
|||||||
this.filterBank(control);
|
this.filterBank(control);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
tabChange(){
|
||||||
|
if(this.tab == '2'){
|
||||||
|
const modalOption:ModalOptions={
|
||||||
|
cssClass:'officerNotesModal'
|
||||||
|
}
|
||||||
|
let records:any={pd_id:this.pdDetails.pd_id,pd_qc_note:this.pdDetails.pd_qc_note,fk_updatedby:this.pdDetails.fk_updatedby,random_string:this.pdDetails.random_string}
|
||||||
|
const modalCtrl=this.modalCtrl.create(OfficerNotesModalPage,{'values':records},modalOption)
|
||||||
|
modalCtrl.present();
|
||||||
|
this.tab='0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
filterBank(event){
|
filterBank(event){
|
||||||
if(!this.m_btLenderListValue){
|
if(!this.m_btLenderListValue){
|
||||||
@ -341,6 +355,7 @@ inWords(e,i,flag){
|
|||||||
|
|
||||||
savepdBank(answerData)
|
savepdBank(answerData)
|
||||||
{
|
{
|
||||||
|
this.spinner_access=true
|
||||||
|
|
||||||
answerData.bankitems.forEach(element=>{
|
answerData.bankitems.forEach(element=>{
|
||||||
//console.log("items",element.filterCtrl);
|
//console.log("items",element.filterCtrl);
|
||||||
@ -357,12 +372,14 @@ inWords(e,i,flag){
|
|||||||
records.fk_createdby = this.users;
|
records.fk_createdby = this.users;
|
||||||
records.banking_details = answerData.bankitems;
|
records.banking_details = answerData.bankitems;
|
||||||
records.banking_form_remark = answerData.banking_form_remark;
|
records.banking_form_remark = answerData.banking_form_remark;
|
||||||
|
records.bank_info_available=answerData.bank_info_available;
|
||||||
|
|
||||||
this.qustCat.saveForm(records).subscribe(data => {
|
this.qustCat.saveForm(records).subscribe(data => {
|
||||||
|
|
||||||
if(data['dataStatus']==true)
|
if(data['dataStatus']==true)
|
||||||
{
|
{
|
||||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||||
|
|
||||||
// this.bankDetails.dirty=false;
|
// this.bankDetails.dirty=false;
|
||||||
// this.bankDetails.markAsDirty();
|
// this.bankDetails.markAsDirty();
|
||||||
// console.log("Dir",this.bankDetails.markAsDirty())
|
// console.log("Dir",this.bankDetails.markAsDirty())
|
||||||
@ -376,9 +393,13 @@ inWords(e,i,flag){
|
|||||||
// console.log("pristine",this.bankDetails.pristine)
|
// console.log("pristine",this.bankDetails.pristine)
|
||||||
this.bankDetails.reset(this.bankDetails.value)
|
this.bankDetails.reset(this.bankDetails.value)
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
this.spinner_access=false
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
},2000);
|
},2000);
|
||||||
}
|
}
|
||||||
|
},err=>{
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
|
this.spinner_access=false;
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -393,11 +414,14 @@ inWords(e,i,flag){
|
|||||||
return res['records'].banking_details[key];
|
return res['records'].banking_details[key];
|
||||||
});
|
});
|
||||||
this.bankDetails.controls.banking_form_remark.setValue(res['records'].banking_form_remark);
|
this.bankDetails.controls.banking_form_remark.setValue(res['records'].banking_form_remark);
|
||||||
|
let bank_info=res['records'].hasOwnProperty('bank_info_available') ? res['records'].bank_info_available : true;
|
||||||
|
console.log("info Bank",bank_info)
|
||||||
|
this.bankDetails.controls.bank_info_available.setValue(bank_info)
|
||||||
this.bankitems = this.bankDetails.get('bankitems') as FormArray;
|
this.bankitems = this.bankDetails.get('bankitems') as FormArray;
|
||||||
|
|
||||||
if(result.length ==0){
|
if(result.length ==0){
|
||||||
|
|
||||||
this.bankitems.push(this.createBankItem(''))
|
// this.bankitems.push(this.createBankItem(''))
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -421,8 +445,9 @@ inWords(e,i,flag){
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
|
|
||||||
this.addBankDetails();
|
// this.addBankDetails();
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -507,6 +532,10 @@ inWords(e,i,flag){
|
|||||||
else{
|
else{
|
||||||
this.toast.pdTriggerappmessage('Fail');
|
this.toast.pdTriggerappmessage('Fail');
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
|
this.loading.dismissLoader();
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -515,4 +544,16 @@ inWords(e,i,flag){
|
|||||||
let name=value.get('other_applicant').value
|
let name=value.get('other_applicant').value
|
||||||
value.get('other_applicant').setValue(this.cons.sentenceCase(name));
|
value.get('other_applicant').setValue(this.cons.sentenceCase(name));
|
||||||
}
|
}
|
||||||
|
setAction(dumm){
|
||||||
|
let value=this.bankDetails.value.bank_info_available
|
||||||
|
if(value == true){
|
||||||
|
// if(this.bankitems.length == 0)
|
||||||
|
this.addBankDetails()
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
while(this.bankitems.length != 0){
|
||||||
|
this.bankitems.removeAt(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,18 +15,22 @@
|
|||||||
<a (click)="capture()">
|
<a (click)="capture()">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
<a (click)="onSubmit()" *ngIf="!complete_status">
|
<a (click)="onSubmit()" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
<ion-segment [(ngModel)]="tab" color="optblue" (click)="tabChange()">
|
||||||
<ion-segment-button value="0">
|
<ion-segment-button value="0">
|
||||||
Form
|
Form
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
<ion-segment-button value="1">
|
<ion-segment-button value="1">
|
||||||
Pictures
|
Pictures
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value ="2">
|
||||||
|
Notes
|
||||||
|
</ion-segment-button>
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component, ViewChild, ElementRef } from '@angular/core';
|
import { Component, ViewChild, ElementRef } from '@angular/core';
|
||||||
import { NavController, NavParams } from 'ionic-angular';
|
import { NavController, NavParams, ModalOptions, ModalController } from 'ionic-angular';
|
||||||
import { AwsServiceProvider } from '../../../../providers/aws-service/aws-service'
|
import { AwsServiceProvider } from '../../../../providers/aws-service/aws-service'
|
||||||
import { FormGroup,FormBuilder,FormArray, Validators} from '@angular/forms';
|
import { FormGroup,FormBuilder,FormArray, Validators} from '@angular/forms';
|
||||||
import { QuestionCategoryProvider } from '../../../../providers/question-category/question-category'
|
import { QuestionCategoryProvider } from '../../../../providers/question-category/question-category'
|
||||||
@ -8,6 +8,7 @@ import { ToastProvider } from '../../../../providers/common-provider/toast'
|
|||||||
// import { controlNameBinding } from '@angular/forms/src/directives/reactive_directives/form_control_name';
|
// import { controlNameBinding } from '@angular/forms/src/directives/reactive_directives/form_control_name';
|
||||||
import {CameraProvider} from '../../../../providers/common-provider/camera'
|
import {CameraProvider} from '../../../../providers/common-provider/camera'
|
||||||
import {LoadingProvider} from '../../../../providers/common-provider/loading'
|
import {LoadingProvider} from '../../../../providers/common-provider/loading'
|
||||||
|
import { OfficerNotesModalPage } from '../../../officer-notes-modal/officer-notes-modal';
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionBusinessAssetsPage page.
|
* Generated class for the PdQuestionBusinessAssetsPage page.
|
||||||
*
|
*
|
||||||
@ -69,11 +70,12 @@ export class PdQuestionBusinessAssetsPage {
|
|||||||
tab: any='0';
|
tab: any='0';
|
||||||
complete_status: boolean = false;
|
complete_status: boolean = false;
|
||||||
addressList: any=[];
|
addressList: any=[];
|
||||||
|
spinner_access;boolean=false;
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,
|
constructor(public navCtrl: NavController, public navParams: NavParams,
|
||||||
public aws:AwsServiceProvider,public fb:FormBuilder,public qustcat:QuestionCategoryProvider,
|
public aws:AwsServiceProvider,public fb:FormBuilder,public qustcat:QuestionCategoryProvider,
|
||||||
public cons:ConstantsProvider,public toast:ToastProvider,private loading:LoadingProvider,
|
public cons:ConstantsProvider,public toast:ToastProvider,private loading:LoadingProvider,
|
||||||
private cameraProvider:CameraProvider) {
|
private cameraProvider:CameraProvider,private modalCtrl:ModalController) {
|
||||||
|
|
||||||
|
|
||||||
this.pdDetails=this.navParams.get('pdDetails');
|
this.pdDetails=this.navParams.get('pdDetails');
|
||||||
@ -90,6 +92,8 @@ export class PdQuestionBusinessAssetsPage {
|
|||||||
this.lender_applicant_id = this.pdDetails.lender_applicant_id;
|
this.lender_applicant_id = this.pdDetails.lender_applicant_id;
|
||||||
this.subproduct_abbr = this.pdDetails.subproduct_abbr;
|
this.subproduct_abbr = this.pdDetails.subproduct_abbr;
|
||||||
this.customer_segment_abbr = this.pdDetails.customer_segment_abbr;
|
this.customer_segment_abbr = this.pdDetails.customer_segment_abbr;
|
||||||
|
|
||||||
|
this.loading.dataLoader();
|
||||||
this.getDropDown()
|
this.getDropDown()
|
||||||
|
|
||||||
|
|
||||||
@ -106,6 +110,76 @@ export class PdQuestionBusinessAssetsPage {
|
|||||||
//this.getAddress()
|
//this.getAddress()
|
||||||
this.getPDImages();
|
this.getPDImages();
|
||||||
}
|
}
|
||||||
|
ionViewCanLeave(){
|
||||||
|
console.log("dirty",this._businessAssetsQuesFrom.dirty);
|
||||||
|
if(this._businessAssetsQuesFrom.dirty){
|
||||||
|
|
||||||
|
return new Promise((resolve,reject)=>{
|
||||||
|
let alert=this.toast.setAlert("Data will be Lost","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();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
tabChange(){
|
||||||
|
if(this.tab == '2'){
|
||||||
|
const modalOption:ModalOptions={
|
||||||
|
cssClass:'officerNotesModal'
|
||||||
|
}
|
||||||
|
let records:any={pd_id:this.pdDetails.pd_id,pd_qc_note:this.pdDetails.pd_qc_note,fk_updatedby:this.pdDetails.fk_updatedby,random_string:this.pdDetails.random_string}
|
||||||
|
const modalCtrl=this.modalCtrl.create(OfficerNotesModalPage,{'values':records},modalOption)
|
||||||
|
modalCtrl.present();
|
||||||
|
this.tab='0';
|
||||||
|
}
|
||||||
|
}
|
||||||
chooseAddress(){
|
chooseAddress(){
|
||||||
let params:any={};
|
let params:any={};
|
||||||
params.parent_pdid=this.pdDetails.parent_pd_id
|
params.parent_pdid=this.pdDetails.parent_pd_id
|
||||||
@ -389,7 +463,7 @@ removeOptionOnAutoComplete(index){
|
|||||||
}
|
}
|
||||||
this.apiLoadFinish=true
|
this.apiLoadFinish=true
|
||||||
|
|
||||||
|
this.loading.dismissLoader();
|
||||||
})
|
})
|
||||||
//this.formLoadData(null);
|
//this.formLoadData(null);
|
||||||
|
|
||||||
@ -407,7 +481,7 @@ removeOptionOnAutoComplete(index){
|
|||||||
business_assets_for_address: this.fb.array([]),
|
business_assets_for_address: this.fb.array([]),
|
||||||
//this.createBusinessAssetsForAddress(),
|
//this.createBusinessAssetsForAddress(),
|
||||||
business_assets_details : this.fb.array([
|
business_assets_details : this.fb.array([
|
||||||
// this.initBusinessDetails(),
|
this.initBusinessDetails(),
|
||||||
]),
|
]),
|
||||||
asset_info_available:[false],
|
asset_info_available:[false],
|
||||||
business_assets_form_remark:['']
|
business_assets_form_remark:['']
|
||||||
@ -827,20 +901,27 @@ createBusinessAssetsForAddress(): FormGroup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var answerData=this._businessAssetsQuesFrom.value;
|
var answerData=this._businessAssetsQuesFrom.value;
|
||||||
|
this.spinner_access=true;
|
||||||
|
|
||||||
//To Remove The "Null" With Key also
|
//To Remove The "Null" With Key also
|
||||||
Object.keys(answerData).forEach((key) => (answerData[key] == null) && delete answerData[key]);
|
Object.keys(answerData).forEach((key) => (answerData[key] == null) && delete answerData[key]);
|
||||||
|
|
||||||
this.qustcat.saveForm(answerData).subscribe(result=>{
|
this.qustcat.saveForm(answerData).subscribe(result=>{
|
||||||
if(result['dataStatus']==true){
|
if(result['dataStatus']==true){
|
||||||
|
this._businessAssetsQuesFrom.reset(this._businessAssetsQuesFrom.value);
|
||||||
this.toast.pdTriggerappmessage("Record Saved Successfully");
|
this.toast.pdTriggerappmessage("Record Saved Successfully");
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
this.spinner_access=false;
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
},2000);
|
},2000);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
this.spinner_access=false
|
||||||
this.toast.pdTriggerappmessage("Sorry!! something went Wrong ");
|
this.toast.pdTriggerappmessage("Sorry!! something went Wrong ");
|
||||||
}
|
}
|
||||||
|
},err=>{
|
||||||
|
this.spinner_access=false
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1179,7 +1260,11 @@ if(flag== 11){
|
|||||||
else{
|
else{
|
||||||
this.toast.pdTriggerappmessage('Fail');
|
this.toast.pdTriggerappmessage('Fail');
|
||||||
}
|
}
|
||||||
})
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
|
this.loading.dismissLoader();}
|
||||||
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
changeSentence(value){
|
changeSentence(value){
|
||||||
|
|||||||
@ -12,18 +12,22 @@
|
|||||||
<a (click)="capture()">
|
<a (click)="capture()">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
<a (click)="savepdBank(bankingForm.value)" *ngIf="!complete_status">
|
<a (click)="savepdBank(bankingForm.value)" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
<ion-segment [(ngModel)]="tab" color="optblue" (click)="tabChange()">
|
||||||
<ion-segment-button value="0">
|
<ion-segment-button value="0">
|
||||||
Form
|
Form
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
<ion-segment-button value="1">
|
<ion-segment-button value="1">
|
||||||
Pictures
|
Pictures
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value ="2">
|
||||||
|
Notes
|
||||||
|
</ion-segment-button>
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
@ -71,6 +75,12 @@
|
|||||||
<button secondary *ngIf="imageBucket.length >0" #focusName align="end" ion-button color="primary" (click)="sendImage()">save Images</button>
|
<button secondary *ngIf="imageBucket.length >0" #focusName align="end" ion-button color="primary" (click)="sendImage()">save Images</button>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
<form [formGroup]="bankingForm" *ngSwitchCase="'0'">
|
<form [formGroup]="bankingForm" *ngSwitchCase="'0'">
|
||||||
|
<mat-card>
|
||||||
|
<div>
|
||||||
|
<label class="toggle_label"> Is the Banking Infomation Available <strong>( {{bankingForm.controls['bank_info_available'].value===true ? 'Yes' : 'No'}} )</strong></label>
|
||||||
|
<mat-slide-toggle float-right color="primary" formControlName="bank_info_available" (change)="setAction($event.value)"></mat-slide-toggle>
|
||||||
|
</div>
|
||||||
|
</mat-card>
|
||||||
<div formArrayName="itemRows" class="accordion">
|
<div formArrayName="itemRows" class="accordion">
|
||||||
<mat-accordion *ngFor="let itemrow of bankingForm.controls.itemRows['controls']; let i=index;let last=last"
|
<mat-accordion *ngFor="let itemrow of bankingForm.controls.itemRows['controls']; let i=index;let last=last"
|
||||||
[formGroupName]="i">
|
[formGroupName]="i">
|
||||||
@ -129,7 +139,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<mat-form-field *ngIf="pd_cus_segment!='SAL'" style="width: 100%">
|
<mat-form-field *ngIf="pd_cus_segment!='SAL'" style="width: 100%">
|
||||||
<mat-select placeholder="Is this the main business account"
|
<mat-select placeholder="Is this the main business account"
|
||||||
formControlName="is_main" >
|
formControlName="is_main" (selectionChange)="setValidationForVintage($event.value,itemrow)">
|
||||||
<mat-option>Select</mat-option>
|
<mat-option>Select</mat-option>
|
||||||
<mat-option value="Yes">Yes</mat-option>
|
<mat-option value="Yes">Yes</mat-option>
|
||||||
<mat-option value="No">No</mat-option>
|
<mat-option value="No">No</mat-option>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { NavController, NavParams } from 'ionic-angular';
|
import { NavController, NavParams, ModalOptions, ModalController } from 'ionic-angular';
|
||||||
import { FormBuilder,FormGroup,FormArray,Validators} from '@angular/forms';
|
import { FormBuilder,FormGroup,FormArray,Validators} from '@angular/forms';
|
||||||
import {AwsServiceProvider} from '../../../../providers/aws-service/aws-service';
|
import {AwsServiceProvider} from '../../../../providers/aws-service/aws-service';
|
||||||
import { QuestionCategoryProvider } from '../../../../providers/question-category/question-category'
|
import { QuestionCategoryProvider } from '../../../../providers/question-category/question-category'
|
||||||
@ -9,6 +9,7 @@ import {ToastProvider} from '../../../../providers/common-provider/toast'
|
|||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
import {CameraProvider} from '../../../../providers/common-provider/camera'
|
import {CameraProvider} from '../../../../providers/common-provider/camera'
|
||||||
import {LoadingProvider} from '../../../../providers/common-provider/loading'
|
import {LoadingProvider} from '../../../../providers/common-provider/loading'
|
||||||
|
import { OfficerNotesModalPage } from '../../../officer-notes-modal/officer-notes-modal';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionBusinessBankingPage page.
|
* Generated class for the PdQuestionBusinessBankingPage page.
|
||||||
@ -54,10 +55,11 @@ step:number
|
|||||||
imageBucket: any=[];
|
imageBucket: any=[];
|
||||||
tab: string='0';
|
tab: string='0';
|
||||||
complete_status: boolean = false;
|
complete_status: boolean = false;
|
||||||
|
spinner_access:boolean=false
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,
|
constructor(public navCtrl: NavController, public navParams: NavParams,
|
||||||
public aws: AwsServiceProvider,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,
|
public aws: AwsServiceProvider,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,
|
||||||
public cons:ConstantsProvider,public toast:ToastProvider,private loading:LoadingProvider,
|
public cons:ConstantsProvider,public toast:ToastProvider,private loading:LoadingProvider,
|
||||||
private cameraProvider:CameraProvider) {
|
private cameraProvider:CameraProvider,private modalCtrl:ModalController) {
|
||||||
this.pdDetails=this.navParams.get('pdDetails')
|
this.pdDetails=this.navParams.get('pdDetails')
|
||||||
|
|
||||||
this.pd_cus_segment=this.pdDetails.customer_segment_abbr.toUpperCase();
|
this.pd_cus_segment=this.pdDetails.customer_segment_abbr.toUpperCase();
|
||||||
@ -80,13 +82,14 @@ step:number
|
|||||||
{
|
{
|
||||||
itemRows:this.fb.array([]),
|
itemRows:this.fb.array([]),
|
||||||
banking_form_remark:[''],
|
banking_form_remark:[''],
|
||||||
|
bank_info_available:[false]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.salaryField = this.pdDetails.customer_segment_abbr.substring(0,2) == 'SE' ? false : true;
|
this.salaryField = this.pdDetails.customer_segment_abbr.substring(0,2) == 'SE' ? false : true;
|
||||||
|
|
||||||
|
this.loading.dataLoader();
|
||||||
this.getdropdown();
|
this.getdropdown();
|
||||||
this.retiveBankDetails();
|
this.retiveBankDetails();
|
||||||
|
|
||||||
@ -98,6 +101,79 @@ step:number
|
|||||||
console.log('ionViewDidLoad PdQuestionBusinessBankingPage');
|
console.log('ionViewDidLoad PdQuestionBusinessBankingPage');
|
||||||
this.getPDImages();
|
this.getPDImages();
|
||||||
}
|
}
|
||||||
|
ionViewCanLeave(){
|
||||||
|
console.log("dirty",this.bankingForm.dirty);
|
||||||
|
if(this.bankingForm.dirty){
|
||||||
|
|
||||||
|
return new Promise((resolve,reject)=>{
|
||||||
|
let alert=this.toast.setAlert("Data will be Lost","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();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
tabChange(){
|
||||||
|
if(this.tab == '2'){
|
||||||
|
const modalOption:ModalOptions={
|
||||||
|
cssClass:'officerNotesModal'
|
||||||
|
}
|
||||||
|
let records:any={pd_id:this.pdDetails.pd_id,pd_qc_note:this.pdDetails.pd_qc_note,fk_updatedby:this.pdDetails.fk_updatedby,random_string:this.pdDetails.random_string}
|
||||||
|
const modalCtrl=this.modalCtrl.create(OfficerNotesModalPage,{'values':records},modalOption)
|
||||||
|
modalCtrl.present();
|
||||||
|
this.tab='0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
searchFun(control){
|
searchFun(control){
|
||||||
if(!this.m_btLenderListValue){
|
if(!this.m_btLenderListValue){
|
||||||
return
|
return
|
||||||
@ -273,11 +349,26 @@ console.log(this.generalExistBusinessYear)
|
|||||||
other_bank:[''],
|
other_bank:[''],
|
||||||
other_applicant:[''],
|
other_applicant:[''],
|
||||||
is_main: [''],
|
is_main: [''],
|
||||||
vintage_year: [''],
|
vintage_year: ['',Validators.required],
|
||||||
vintage_month: [''],
|
vintage_month: ['',Validators.required],
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
setValidationForVintage(value,control){
|
||||||
|
if(value == 'Yes'){
|
||||||
|
console.log(control);
|
||||||
|
// control.controls.vintage_year.reset;
|
||||||
|
control.controls.vintage_year.setValidators(Validators.required)
|
||||||
|
// control.controls.vintage_month.reset();
|
||||||
|
control.controls.vintage_month.setValidators(Validators.required)
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
control.controls.vintage_year.clearValidators();
|
||||||
|
control.controls.vintage_year.updateValueAndValidity();
|
||||||
|
control.controls.vintage_month.clearValidators();
|
||||||
|
control.controls.vintage_month.updateValueAndValidity();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
addBankDetails(index,event) {
|
addBankDetails(index,event) {
|
||||||
// if(this.pd.valid){
|
// if(this.pd.valid){
|
||||||
@ -332,11 +423,13 @@ console.log(this.generalExistBusinessYear)
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.bankingForm.controls.banking_form_remark.setValue(res['records'].banking_form_remark);
|
this.bankingForm.controls.banking_form_remark.setValue(res['records'].banking_form_remark);
|
||||||
|
let bank_info=res['records'].hasOwnProperty('bank_info_available') ? res['records'].bank_info_available : true
|
||||||
|
this.bankingForm.controls.bank_info_available.setValue(bank_info)
|
||||||
|
|
||||||
|
|
||||||
if(result.length == 0){
|
if(result.length == 0){
|
||||||
|
|
||||||
control.push(this.createBankItem(''))
|
// control.push(this.createBankItem(''))
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -349,7 +442,10 @@ console.log(this.generalExistBusinessYear)
|
|||||||
this.amtInwords[index] = this.cons.convertNumberToWords(+datas.limit);
|
this.amtInwords[index] = this.cons.convertNumberToWords(+datas.limit);
|
||||||
}
|
}
|
||||||
this. selectedAccTypeChanges(datas.account_type,index);
|
this. selectedAccTypeChanges(datas.account_type,index);
|
||||||
|
|
||||||
control.push(this.createBankItem(''));
|
control.push(this.createBankItem(''));
|
||||||
|
// console.log("bank controls",this.bankingForm.controls)
|
||||||
|
// this.setValidationForVintage(datas.salary,this.bankingForm.controls.itemRows['controls'][index])
|
||||||
})
|
})
|
||||||
|
|
||||||
this.bankingForm.controls['itemRows'].setValue(result);
|
this.bankingForm.controls['itemRows'].setValue(result);
|
||||||
@ -357,14 +453,19 @@ console.log(this.generalExistBusinessYear)
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
|
|
||||||
control.push(this.createBankItem(''));
|
// control.push(this.createBankItem(''));
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
savepdBank(answerData)
|
savepdBank(answerData)
|
||||||
{
|
{
|
||||||
|
if(!this.bankingForm.valid){
|
||||||
|
this.toast.pdTriggerappmessage("Approximate vintage of the account mandatory")
|
||||||
|
return;
|
||||||
|
}
|
||||||
answerData.itemRows.forEach(element=>{
|
answerData.itemRows.forEach(element=>{
|
||||||
delete element.filterCtrl
|
delete element.filterCtrl
|
||||||
})
|
})
|
||||||
@ -377,11 +478,14 @@ console.log(this.generalExistBusinessYear)
|
|||||||
records.company_id=this.company_id;
|
records.company_id=this.company_id;
|
||||||
records.banking_details = answerData.itemRows;
|
records.banking_details = answerData.itemRows;
|
||||||
records.banking_form_remark = answerData.banking_form_remark;
|
records.banking_form_remark = answerData.banking_form_remark;
|
||||||
|
records.bank_info_available=answerData.bank_info_available;
|
||||||
|
this.spinner_access=true
|
||||||
|
|
||||||
this.qustCat.saveForm(records).subscribe(data => {
|
this.qustCat.saveForm(records).subscribe(data => {
|
||||||
|
|
||||||
if(data['dataStatus']==true)
|
if(data['dataStatus']==true)
|
||||||
{
|
{
|
||||||
|
this.bankingForm.reset(this.bankingForm.value);
|
||||||
this.bankingForm.markAsUntouched();
|
this.bankingForm.markAsUntouched();
|
||||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
@ -390,7 +494,11 @@ console.log(this.generalExistBusinessYear)
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.toast.pdTriggerappmessage("Sorry!! Something Went Wrong");
|
this.toast.pdTriggerappmessage("Sorry!! Something Went Wrong");
|
||||||
|
this.spinner_access=false
|
||||||
}
|
}
|
||||||
|
},err=>{
|
||||||
|
this.toast.pdTriggerappmessage("Network Error")
|
||||||
|
this.spinner_access=false
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -474,6 +582,10 @@ capture(){
|
|||||||
else{
|
else{
|
||||||
this.toast.pdTriggerappmessage('Fail');
|
this.toast.pdTriggerappmessage('Fail');
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
|
this.loading.dismissLoader();
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -482,6 +594,19 @@ capture(){
|
|||||||
let name=value.get('other_applicant').value
|
let name=value.get('other_applicant').value
|
||||||
value.get('other_applicant').setValue(this.cons.sentenceCase(name));
|
value.get('other_applicant').setValue(this.cons.sentenceCase(name));
|
||||||
}
|
}
|
||||||
|
setAction(dumm){
|
||||||
|
let value=this.bankingForm.value.bank_info_available
|
||||||
|
const control = <FormArray>this.bankingForm.controls['itemRows'];
|
||||||
|
if(value == true){
|
||||||
|
// if(this.bankitems.length == 0)
|
||||||
|
control.push(this.createBankItem(''));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
while(control.length != 0){
|
||||||
|
control.removeAt(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,21 +11,25 @@
|
|||||||
<ion-icon name="md-camera"></ion-icon>
|
<ion-icon name="md-camera"></ion-icon>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<a (click)="submitDetails()" *ngIf="!complete_status">
|
<a (click)="submitDetails()" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;">
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;">
|
||||||
<ion-icon name="fn-save"></ion-icon>
|
<ion-icon name="fn-save"></ion-icon>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
|
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
<ion-segment [(ngModel)]="tab" color="optblue" (click)="tabChange()">
|
||||||
<ion-segment-button value="0">
|
<ion-segment-button value="0">
|
||||||
Form
|
Form
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
<ion-segment-button value="1">
|
<ion-segment-button value="1">
|
||||||
Pictures
|
Pictures
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value ="2">
|
||||||
|
Notes
|
||||||
|
</ion-segment-button>
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component, ViewChild, ElementRef } from '@angular/core';
|
import { Component, ViewChild, ElementRef } from '@angular/core';
|
||||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
import { IonicPage, NavController, NavParams, ModalOptions, ModalController } from 'ionic-angular';
|
||||||
import { AwsServiceProvider } from '../../../../providers/aws-service/aws-service';
|
import { AwsServiceProvider } from '../../../../providers/aws-service/aws-service';
|
||||||
import { ToastProvider } from '../../../../providers/common-provider/toast';
|
import { ToastProvider } from '../../../../providers/common-provider/toast';
|
||||||
import { QuestionCategoryProvider } from '../../../../providers/question-category/question-category';
|
import { QuestionCategoryProvider } from '../../../../providers/question-category/question-category';
|
||||||
@ -11,6 +11,7 @@ import { Subject, ReplaySubject } from 'rxjs';
|
|||||||
import { searchValue } from '../../search'
|
import { searchValue } from '../../search'
|
||||||
import { CameraProvider } from '../../../../providers/common-provider/camera'
|
import { CameraProvider } from '../../../../providers/common-provider/camera'
|
||||||
import { LoadingProvider } from '../../../../providers/common-provider/loading'
|
import { LoadingProvider } from '../../../../providers/common-provider/loading'
|
||||||
|
import { OfficerNotesModalPage } from '../../../officer-notes-modal/officer-notes-modal';
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionBusinessInfoPage page.
|
* Generated class for the PdQuestionBusinessInfoPage page.
|
||||||
*
|
*
|
||||||
@ -74,7 +75,7 @@ export class PdQuestionBusinessInfoPage {
|
|||||||
countryDataListValue: any = [];
|
countryDataListValue: any = [];
|
||||||
product_abbr: any;
|
product_abbr: any;
|
||||||
lender_short_name: any;
|
lender_short_name: any;
|
||||||
|
spinner_access:boolean=false;
|
||||||
@ViewChild('shareholding') share_focus: ElementRef
|
@ViewChild('shareholding') share_focus: ElementRef
|
||||||
private search: searchValue[]
|
private search: searchValue[]
|
||||||
protected _onDestroy = new Subject<void>();
|
protected _onDestroy = new Subject<void>();
|
||||||
@ -92,7 +93,7 @@ export class PdQuestionBusinessInfoPage {
|
|||||||
constructor(public navCtrl: NavController, public navParams: NavParams,
|
constructor(public navCtrl: NavController, public navParams: NavParams,
|
||||||
public aws: AwsServiceProvider, public toast: ToastProvider,
|
public aws: AwsServiceProvider, public toast: ToastProvider,
|
||||||
public qustCat: QuestionCategoryProvider, public fb: FormBuilder, public cons: ConstantsProvider,
|
public qustCat: QuestionCategoryProvider, public fb: FormBuilder, public cons: ConstantsProvider,
|
||||||
private loading: LoadingProvider, private cameraProvider: CameraProvider) {
|
private loading: LoadingProvider, private cameraProvider: CameraProvider,private modalCtrl:ModalController) {
|
||||||
this.getStateCityDet();
|
this.getStateCityDet();
|
||||||
// console.log(typeof this.filteredCity)
|
// console.log(typeof this.filteredCity)
|
||||||
this.pdDetails = this.navParams.get('pdDetails');
|
this.pdDetails = this.navParams.get('pdDetails');
|
||||||
@ -155,6 +156,7 @@ export class PdQuestionBusinessInfoPage {
|
|||||||
documents: this.fb.array([]),
|
documents: this.fb.array([]),
|
||||||
business_remarks: ['']
|
business_remarks: ['']
|
||||||
})
|
})
|
||||||
|
this.loading.dataLoader();
|
||||||
this.getdropdown();
|
this.getdropdown();
|
||||||
|
|
||||||
// this.initBusinessForm();
|
// this.initBusinessForm();
|
||||||
@ -167,9 +169,77 @@ export class PdQuestionBusinessInfoPage {
|
|||||||
ionViewDidLoad() {
|
ionViewDidLoad() {
|
||||||
console.log('ionViewDidLoad PdQuestionBusinessInfoPage');
|
console.log('ionViewDidLoad PdQuestionBusinessInfoPage');
|
||||||
this.getPDImages();
|
this.getPDImages();
|
||||||
|
}
|
||||||
|
ionViewCanLeave(){
|
||||||
|
console.log("dirty",this.businessForm.dirty);
|
||||||
|
if(this.businessForm.dirty){
|
||||||
|
|
||||||
|
return new Promise((resolve,reject)=>{
|
||||||
|
let alert=this.toast.setAlert("Data will be Lost","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();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
tabChange(){
|
||||||
|
if(this.tab == '2'){
|
||||||
|
const modalOption:ModalOptions={
|
||||||
|
cssClass:'officerNotesModal'
|
||||||
|
}
|
||||||
|
let records:any={pd_id:this.pdDetails.pd_id,pd_qc_note:this.pdDetails.pd_qc_note,fk_updatedby:this.pdDetails.fk_updatedby,random_string:this.pdDetails.random_string}
|
||||||
|
const modalCtrl=this.modalCtrl.create(OfficerNotesModalPage,{'values':records},modalOption)
|
||||||
|
modalCtrl.present();
|
||||||
|
this.tab='0';
|
||||||
|
}
|
||||||
|
}
|
||||||
getdropdown() {
|
getdropdown() {
|
||||||
|
|
||||||
this.qustCat.getcommondrop('RELATIONSHIPS').subscribe(data => {
|
this.qustCat.getcommondrop('RELATIONSHIPS').subscribe(data => {
|
||||||
@ -275,7 +345,7 @@ export class PdQuestionBusinessInfoPage {
|
|||||||
this.qustCat.retiverForm(params).subscribe(data => {
|
this.qustCat.retiverForm(params).subscribe(data => {
|
||||||
console.log('data[records]', data['records']);
|
console.log('data[records]', data['records']);
|
||||||
let businessVal = data['records']
|
let businessVal = data['records']
|
||||||
let constVal: any;
|
// let constVal: any;
|
||||||
|
|
||||||
|
|
||||||
const Partnr: any = <FormArray>this.businessForm.controls['partners'];
|
const Partnr: any = <FormArray>this.businessForm.controls['partners'];
|
||||||
@ -820,6 +890,7 @@ export class PdQuestionBusinessInfoPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
})
|
})
|
||||||
// change business sessional
|
// change business sessional
|
||||||
this.businessForm.controls['seasonality'].valueChanges.subscribe(val => {
|
this.businessForm.controls['seasonality'].valueChanges.subscribe(val => {
|
||||||
@ -2040,15 +2111,25 @@ export class PdQuestionBusinessInfoPage {
|
|||||||
if(!records.business_info_location){
|
if(!records.business_info_location){
|
||||||
records.business_info_location=geoCordinates
|
records.business_info_location=geoCordinates
|
||||||
}
|
}
|
||||||
|
this.spinner_access=true;
|
||||||
// console.log("records",records)
|
// console.log("records",records)
|
||||||
this.qustCat.saveForm(records).subscribe(data => {
|
this.qustCat.saveForm(records).subscribe(data => {
|
||||||
if (data['dataStatus'] == true) {
|
if (data['dataStatus'] == true) {
|
||||||
|
this.businessForm.reset(this.businessForm.value)
|
||||||
this.businessForm.markAsUntouched();
|
this.businessForm.markAsUntouched();
|
||||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
this.spinner_access=false
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
this.spinner_access=false;
|
||||||
|
this.toast.pdTriggerappmessage("Something Went Wrong");
|
||||||
|
}
|
||||||
|
},err=>{
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
|
this.spinner_access=false
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -2470,6 +2551,10 @@ export class PdQuestionBusinessInfoPage {
|
|||||||
else {
|
else {
|
||||||
this.toast.pdTriggerappmessage('Fail');
|
this.toast.pdTriggerappmessage('Fail');
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
|
this.loading.dismissLoader();
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,20 +8,24 @@
|
|||||||
<a (click)="capture()" *ngIf="camera_enable">
|
<a (click)="capture()" *ngIf="camera_enable">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
<a (click)="saveClientInfoWithImageCheck(clientInfoForm.value)" *ngIf="!complete_status">
|
<a (click)="saveClientInfoWithImageCheck(clientInfoForm.value)" *ngIf="!complete_status && !spinner_access">
|
||||||
<!-- <a (click)="mandatoryImageCheck(clientInfoForm.value)" *ngIf="!complete_status"> -->
|
<!-- <a (click)="mandatoryImageCheck(clientInfoForm.value)" *ngIf="!complete_status"> -->
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
<ion-segment [(ngModel)]="tab" color="optblue" (click)="tabChange()">
|
||||||
<ion-segment-button value="0">
|
<ion-segment-button value="0">
|
||||||
Form
|
Form
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
<ion-segment-button value="1">
|
<ion-segment-button value="1">
|
||||||
Pictures
|
Pictures
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value ="2">
|
||||||
|
Notes
|
||||||
|
</ion-segment-button>
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
<ion-content padding>
|
<ion-content padding>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { IonicPage, NavController, NavParams, Form } from 'ionic-angular';
|
import { IonicPage, NavController, NavParams, Form, ModalController, ModalOptions } from 'ionic-angular';
|
||||||
import { QuestionCategoryProvider } from '../../../../providers/question-category/question-category';
|
import { QuestionCategoryProvider } from '../../../../providers/question-category/question-category';
|
||||||
import { AwsServiceProvider } from '../../../../providers/aws-service/aws-service';
|
import { AwsServiceProvider } from '../../../../providers/aws-service/aws-service';
|
||||||
import { ToastProvider } from '../../../../providers/common-provider/toast';
|
import { ToastProvider } from '../../../../providers/common-provider/toast';
|
||||||
@ -7,6 +7,7 @@ import { FormGroup, FormBuilder, FormArray, Validators } from '@angular/forms';
|
|||||||
import {CameraProvider} from '../../../../providers/common-provider/camera'
|
import {CameraProvider} from '../../../../providers/common-provider/camera'
|
||||||
import {LoadingProvider} from '../../../../providers/common-provider/loading'
|
import {LoadingProvider} from '../../../../providers/common-provider/loading'
|
||||||
import {ConstantsProvider} from '../../../../providers/constants/constants'
|
import {ConstantsProvider} from '../../../../providers/constants/constants'
|
||||||
|
import { OfficerNotesModalPage } from '../../../officer-notes-modal/officer-notes-modal';
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionClientInfoPage page.
|
* Generated class for the PdQuestionClientInfoPage page.
|
||||||
*
|
*
|
||||||
@ -50,12 +51,15 @@ export class PdQuestionClientInfoPage {
|
|||||||
complete_status: boolean = false;
|
complete_status: boolean = false;
|
||||||
billing_available: boolean=false;
|
billing_available: boolean=false;
|
||||||
camera_enable: boolean;
|
camera_enable: boolean;
|
||||||
|
spinner_access:boolean=false
|
||||||
|
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,
|
constructor(public navCtrl: NavController, public navParams: NavParams,
|
||||||
public qustCat: QuestionCategoryProvider, public aws: AwsServiceProvider,
|
public qustCat: QuestionCategoryProvider, public aws: AwsServiceProvider,
|
||||||
public toast: ToastProvider, public fb: FormBuilder,private loading:LoadingProvider,private cameraProvider:CameraProvider,private constantProvider:ConstantsProvider)
|
public toast: ToastProvider, public fb: FormBuilder,private loading:LoadingProvider,
|
||||||
|
private cameraProvider:CameraProvider,private constantProvider:ConstantsProvider,private modalCtrl:ModalController)
|
||||||
{
|
{
|
||||||
|
this.loading.dataLoader();
|
||||||
this.pdDetails = this.navParams.get('pdDetails');
|
this.pdDetails = this.navParams.get('pdDetails');
|
||||||
this.formDetails = this.navParams.get('formDetails');
|
this.formDetails = this.navParams.get('formDetails');
|
||||||
this.users = this.aws.getlocale();
|
this.users = this.aws.getlocale();
|
||||||
@ -98,12 +102,15 @@ export class PdQuestionClientInfoPage {
|
|||||||
this.noRecordsFound = false;
|
this.noRecordsFound = false;
|
||||||
this.errorMessage = data.msg;
|
this.errorMessage = data.msg;
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader()
|
||||||
}, err => {
|
}, err => {
|
||||||
|
this.loading.dismissLoader()
|
||||||
this.toast.pdTriggerappmessage('No Category Records Found.!');
|
this.toast.pdTriggerappmessage('No Category Records Found.!');
|
||||||
this.noRecordsFound = false;
|
this.noRecordsFound = false;
|
||||||
this.errorMessage = 'No Records Found , Something went Wrong!';
|
this.errorMessage = 'No Records Found , Something went Wrong!';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
this.getdropList();
|
this.getdropList();
|
||||||
|
|
||||||
|
|
||||||
@ -117,6 +124,76 @@ console.log("form values",this.clientInfoForm);
|
|||||||
this.getPDImages();
|
this.getPDImages();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
ionViewCanLeave(){
|
||||||
|
// console.log("dirty",this.clientInfoForm.dirty);
|
||||||
|
if(this.clientInfoForm.dirty){
|
||||||
|
|
||||||
|
return new Promise((resolve,reject)=>{
|
||||||
|
let alert=this.toast.setAlert("Data will be Lost","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();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
tabChange(){
|
||||||
|
if(this.tab == '2'){
|
||||||
|
const modalOption:ModalOptions={
|
||||||
|
cssClass:'officerNotesModal'
|
||||||
|
}
|
||||||
|
let records:any={pd_id:this.pdDetails.pd_id,pd_qc_note:this.pdDetails.pd_qc_note,fk_updatedby:this.pdDetails.fk_updatedby,random_string:this.pdDetails.random_string}
|
||||||
|
const modalCtrl=this.modalCtrl.create(OfficerNotesModalPage,{'values':records},modalOption)
|
||||||
|
modalCtrl.present();
|
||||||
|
this.tab='0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
initFormLoadDetails(record) {
|
initFormLoadDetails(record) {
|
||||||
let params: any = {};
|
let params: any = {};
|
||||||
@ -645,19 +722,25 @@ console.log("form values",this.clientInfoForm);
|
|||||||
if (answerFormValues.service_provider_details[0] == null) {
|
if (answerFormValues.service_provider_details[0] == null) {
|
||||||
delete answerFormValues['service_provider_details'];
|
delete answerFormValues['service_provider_details'];
|
||||||
}
|
}
|
||||||
|
this.spinner_access=true
|
||||||
//To Remove The "Null" With Key also
|
//To Remove The "Null" With Key also
|
||||||
Object.keys(answerFormValues).forEach((key) => { if (answerFormValues[key] === null || answerFormValues[key] === undefined || answerFormValues[key] === '') { delete answerFormValues[key] }; });
|
Object.keys(answerFormValues).forEach((key) => { if (answerFormValues[key] === null || answerFormValues[key] === undefined || answerFormValues[key] === '') { delete answerFormValues[key] }; });
|
||||||
this.qustCat.saveForm(answerFormValues).subscribe(responsed => {
|
this.qustCat.saveForm(answerFormValues).subscribe(responsed => {
|
||||||
if (responsed['status'] == 200) {
|
if (responsed['status'] == 200) {
|
||||||
|
this.clientInfoForm.reset(this.clientInfoForm.value);
|
||||||
this.clientInfoForm.markAsUntouched();
|
this.clientInfoForm.markAsUntouched();
|
||||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
this.spinner_access=false
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
},2000);
|
},2000);
|
||||||
} else {
|
} else {
|
||||||
|
this.spinner_access=false
|
||||||
this.toast.pdTriggerappmessage('Something Wents Wrong Try Again.!');
|
this.toast.pdTriggerappmessage('Something Wents Wrong Try Again.!');
|
||||||
}
|
}
|
||||||
|
},err=>{
|
||||||
|
this.spinner_access=false
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@ -1023,8 +1106,12 @@ else{
|
|||||||
this.getPDImages();
|
this.getPDImages();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.toast.pdTriggerappmessage('Fail');
|
this.toast.pdTriggerappmessage('Something went wrong');
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
|
this.loading.dismissLoader()
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,18 +13,22 @@
|
|||||||
<a (click)="capture()">
|
<a (click)="capture()">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
<a (click)="submitDetails()" *ngIf="!complete_status">
|
<a (click)="submitDetails()" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
<ion-segment [(ngModel)]="tab" color="optblue" (click)="tabChange()">
|
||||||
<ion-segment-button value="0">
|
<ion-segment-button value="0">
|
||||||
Form
|
Form
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
<ion-segment-button value="1">
|
<ion-segment-button value="1">
|
||||||
Pictures
|
Pictures
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value ="2">
|
||||||
|
Notes
|
||||||
|
</ion-segment-button>
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component,ViewEncapsulation } from '@angular/core';
|
import { Component,ViewEncapsulation } from '@angular/core';
|
||||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
import { IonicPage, NavController, NavParams, ModalController, ModalOptions } from 'ionic-angular';
|
||||||
import {AwsServiceProvider} from '../../../../providers/aws-service/aws-service'
|
import {AwsServiceProvider} from '../../../../providers/aws-service/aws-service'
|
||||||
import {ToastProvider} from '../../../../providers/common-provider/toast'
|
import {ToastProvider} from '../../../../providers/common-provider/toast'
|
||||||
import {QuestionCategoryProvider} from '../../../../providers/question-category/question-category'
|
import {QuestionCategoryProvider} from '../../../../providers/question-category/question-category'
|
||||||
@ -7,6 +7,7 @@ import { FormGroup,Validators,FormBuilder, FormArray, FormControl } from '@angul
|
|||||||
import {ConstantsProvider} from '../../../../providers/constants/constants'
|
import {ConstantsProvider} from '../../../../providers/constants/constants'
|
||||||
import {CameraProvider} from '../../../../providers/common-provider/camera'
|
import {CameraProvider} from '../../../../providers/common-provider/camera'
|
||||||
import {LoadingProvider} from '../../../../providers/common-provider/loading'
|
import {LoadingProvider} from '../../../../providers/common-provider/loading'
|
||||||
|
import { OfficerNotesModalPage } from '../../../officer-notes-modal/officer-notes-modal';
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionFinancialInfoPage page.
|
* Generated class for the PdQuestionFinancialInfoPage page.
|
||||||
*
|
*
|
||||||
@ -65,11 +66,14 @@ export class PdQuestionFinancialInfoPage {
|
|||||||
imageBucket: any=[];
|
imageBucket: any=[];
|
||||||
tab: string='0';
|
tab: string='0';
|
||||||
complete_status: boolean = false;
|
complete_status: boolean = false;
|
||||||
|
spinner_access:boolean=false;
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,
|
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,
|
||||||
public toast:ToastProvider, public qustCat:QuestionCategoryProvider,
|
public toast:ToastProvider, public qustCat:QuestionCategoryProvider,
|
||||||
public fb:FormBuilder,public cons:ConstantsProvider,private cameraProvider:CameraProvider,
|
public fb:FormBuilder,public cons:ConstantsProvider,private cameraProvider:CameraProvider,
|
||||||
private loading:LoadingProvider) {
|
private loading:LoadingProvider,private modalCtrl:ModalController) {
|
||||||
|
this.loading.dataLoader();
|
||||||
|
|
||||||
this.pdDetails=this.navParams.get('pdDetails');
|
this.pdDetails=this.navParams.get('pdDetails');
|
||||||
this.formDetails=this.navParams.get('formDetails');
|
this.formDetails=this.navParams.get('formDetails');
|
||||||
this.FormId = this.formDetails.form_id;
|
this.FormId = this.formDetails.form_id;
|
||||||
@ -96,6 +100,7 @@ export class PdQuestionFinancialInfoPage {
|
|||||||
this.ServiceDataAvailability = false;
|
this.ServiceDataAvailability = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
})
|
})
|
||||||
// console.log("ld",this.financialForm.controls['estimated_value'])
|
// console.log("ld",this.financialForm.controls['estimated_value'])
|
||||||
// if(this.financialForm.controls['estimated_value']['controls'].length>0){
|
// if(this.financialForm.controls['estimated_value']['controls'].length>0){
|
||||||
@ -116,6 +121,76 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
this.getDetails()
|
this.getDetails()
|
||||||
this.getPDImages();
|
this.getPDImages();
|
||||||
}
|
}
|
||||||
|
ionViewCanLeave(){
|
||||||
|
console.log("dirty",this.financialForm.dirty);
|
||||||
|
if(this.financialForm.dirty){
|
||||||
|
|
||||||
|
return new Promise((resolve,reject)=>{
|
||||||
|
let alert=this.toast.setAlert("Data will be Lost","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();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
tabChange(){
|
||||||
|
if(this.tab == '2'){
|
||||||
|
const modalOption:ModalOptions={
|
||||||
|
cssClass:'officerNotesModal'
|
||||||
|
}
|
||||||
|
let records:any={pd_id:this.pdDetails.pd_id,pd_qc_note:this.pdDetails.pd_qc_note,fk_updatedby:this.pdDetails.fk_updatedby,random_string:this.pdDetails.random_string}
|
||||||
|
const modalCtrl=this.modalCtrl.create(OfficerNotesModalPage,{'values':records},modalOption)
|
||||||
|
modalCtrl.present();
|
||||||
|
this.tab='0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
AllCalculation(control,index){
|
AllCalculation(control,index){
|
||||||
console.log("all",control)
|
console.log("all",control)
|
||||||
@ -365,19 +440,24 @@ submitDetails(){
|
|||||||
if(records.other_reason_for_working_capital_facilities_availed) delete records.other_reason_for_working_capital_facilities_availed ;
|
if(records.other_reason_for_working_capital_facilities_availed) delete records.other_reason_for_working_capital_facilities_availed ;
|
||||||
if(records.reason_for_working_capital_facilities_availed) delete records.reason_for_working_capital_facilities_availed ;
|
if(records.reason_for_working_capital_facilities_availed) delete records.reason_for_working_capital_facilities_availed ;
|
||||||
}
|
}
|
||||||
|
this.spinner_access=true;
|
||||||
|
|
||||||
this.qustCat.saveForm(records).subscribe(res=>{
|
this.qustCat.saveForm(records).subscribe(res=>{
|
||||||
if(res['status']== 200){
|
if(res['status']== 200){
|
||||||
|
this.financialForm.reset(this.financialForm.value)
|
||||||
this.financialForm.markAsUntouched();
|
this.financialForm.markAsUntouched();
|
||||||
this.toast.pdTriggerappmessage("Record Saved Successfully");
|
this.toast.pdTriggerappmessage("Record Saved Successfully");
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
this.spinner_access=false
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
},2000);
|
},2000);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
this.spinner_access=false
|
||||||
this.toast.pdTriggerappmessage("Warning !! Something went Wrong");
|
this.toast.pdTriggerappmessage("Warning !! Something went Wrong");
|
||||||
}
|
}
|
||||||
},err=>{
|
},err=>{
|
||||||
|
this.spinner_access=false
|
||||||
this.toast.pdTriggerappmessage("Server is not Responding");
|
this.toast.pdTriggerappmessage("Server is not Responding");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -1553,8 +1633,12 @@ calculateLossAmount( i, details){
|
|||||||
this.getPDImages();
|
this.getPDImages();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.toast.pdTriggerappmessage('Fail');
|
this.toast.pdTriggerappmessage('Something Went Wrong');
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,20 +11,24 @@
|
|||||||
<ion-icon name="md-camera"></ion-icon>
|
<ion-icon name="md-camera"></ion-icon>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<a (click)="saveFuturePlan()" *ngIf="!complete_status">
|
<a (click)="saveFuturePlan()" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;">
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;">
|
||||||
<ion-icon name="fn-save"></ion-icon>
|
<ion-icon name="fn-save"></ion-icon>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
<ion-segment [(ngModel)]="tab" color="optblue" (click)="tabChange()">
|
||||||
<ion-segment-button value="0">
|
<ion-segment-button value="0">
|
||||||
Form
|
Form
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
<ion-segment-button value="1">
|
<ion-segment-button value="1">
|
||||||
Pictures
|
Pictures
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value ="2">
|
||||||
|
Notes
|
||||||
|
</ion-segment-button>
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
import { IonicPage, NavController, NavParams, ModalController, ModalOptions } from 'ionic-angular';
|
||||||
import { FormGroup, FormBuilder } from '@angular/forms';
|
import { FormGroup, FormBuilder } from '@angular/forms';
|
||||||
|
|
||||||
import {AwsServiceProvider} from '../../../../providers/aws-service/aws-service'
|
import {AwsServiceProvider} from '../../../../providers/aws-service/aws-service'
|
||||||
@ -8,6 +8,7 @@ import {QuestionCategoryProvider} from '../../../../providers/question-category/
|
|||||||
import {CameraProvider} from '../../../../providers/common-provider/camera'
|
import {CameraProvider} from '../../../../providers/common-provider/camera'
|
||||||
import {LoadingProvider} from '../../../../providers/common-provider/loading'
|
import {LoadingProvider} from '../../../../providers/common-provider/loading'
|
||||||
import {ConstantsProvider} from '../../../../providers/constants/constants'
|
import {ConstantsProvider} from '../../../../providers/constants/constants'
|
||||||
|
import { OfficerNotesModalPage } from '../../../officer-notes-modal/officer-notes-modal';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionFuturePlansAndBusinessEnvironmentPage page.
|
* Generated class for the PdQuestionFuturePlansAndBusinessEnvironmentPage page.
|
||||||
@ -36,13 +37,15 @@ export class PdQuestionFuturePlansAndBusinessEnvironmentPage {
|
|||||||
imageDisplay: any = [];
|
imageDisplay: any = [];
|
||||||
imageBucket: any = [];
|
imageBucket: any = [];
|
||||||
public _futurePlansForm: FormGroup;
|
public _futurePlansForm: FormGroup;
|
||||||
|
spinner_access:boolean=false
|
||||||
|
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams, public fb: FormBuilder,
|
constructor(public navCtrl: NavController, public navParams: NavParams, public fb: FormBuilder,
|
||||||
public qustcat: QuestionCategoryProvider, public aws: AwsServiceProvider,
|
public qustcat: QuestionCategoryProvider, public aws: AwsServiceProvider,
|
||||||
public toast: ToastProvider, private cameraProvider: CameraProvider, private loading: LoadingProvider,private constantProvider:ConstantsProvider) {
|
public toast: ToastProvider, private cameraProvider: CameraProvider,
|
||||||
|
private loading: LoadingProvider,private constantProvider:ConstantsProvider,private modalCtrl:ModalController) {
|
||||||
|
|
||||||
|
this.loading.dataLoader();
|
||||||
this.formDetails=this.navParams.get('formDetails');
|
this.formDetails=this.navParams.get('formDetails');
|
||||||
this.pdDetails = this.navParams.get('pdDetails');
|
this.pdDetails = this.navParams.get('pdDetails');
|
||||||
this.pdid = this.pdDetails.pd_id
|
this.pdid = this.pdDetails.pd_id
|
||||||
@ -135,12 +138,24 @@ export class PdQuestionFuturePlansAndBusinessEnvironmentPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
tabChange(){
|
||||||
|
if(this.tab == '2'){
|
||||||
|
const modalOption:ModalOptions={
|
||||||
|
cssClass:'officerNotesModal'
|
||||||
|
}
|
||||||
|
let records:any={pd_id:this.pdDetails.pd_id,pd_qc_note:this.pdDetails.pd_qc_note,fk_updatedby:this.pdDetails.fk_updatedby,random_string:this.pdDetails.random_string}
|
||||||
|
const modalCtrl=this.modalCtrl.create(OfficerNotesModalPage,{'values':records},modalOption)
|
||||||
|
modalCtrl.present();
|
||||||
|
this.tab='0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
getFuturePlans() {
|
getFuturePlans() {
|
||||||
let Records = { 'parent_pdid': this.pdDetails.parent_pd_id,
|
let Records = { 'parent_pdid': this.pdDetails.parent_pd_id,
|
||||||
'pd_id': this.pdid,
|
'pd_id': this.pdid,
|
||||||
'pd_form_id': this.FormId,
|
'pd_form_id': this.FormId,
|
||||||
'company_id': this.company_id}
|
'company_id': this.company_id}
|
||||||
|
|
||||||
this.qustcat.retiverForm(Records).subscribe(data => {
|
this.qustcat.retiverForm(Records).subscribe(data => {
|
||||||
if (data['dataStatus'] == true) {
|
if (data['dataStatus'] == true) {
|
||||||
this._futurePlansForm.controls.usp_of_the_business.setValue(data['records'].usp_of_the_business);
|
this._futurePlansForm.controls.usp_of_the_business.setValue(data['records'].usp_of_the_business);
|
||||||
@ -152,6 +167,10 @@ export class PdQuestionFuturePlansAndBusinessEnvironmentPage {
|
|||||||
this._futurePlansForm.controls.remarks.setValue(data['records'].remarks);
|
this._futurePlansForm.controls.remarks.setValue(data['records'].remarks);
|
||||||
}
|
}
|
||||||
else { };
|
else { };
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
|
this.loading.dismissLoader();
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -161,6 +180,7 @@ export class PdQuestionFuturePlansAndBusinessEnvironmentPage {
|
|||||||
this.toast.pdTriggerappmessage("Please Fill all the Fields marked with '*' ")
|
this.toast.pdTriggerappmessage("Please Fill all the Fields marked with '*' ")
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
this.spinner_access=true;
|
||||||
var answerData = this._futurePlansForm.value
|
var answerData = this._futurePlansForm.value
|
||||||
//To Remove The "Null" With Key also
|
//To Remove The "Null" With Key also
|
||||||
Object.keys(answerData).forEach((key) => (answerData[key] == null) && delete answerData[key]);
|
Object.keys(answerData).forEach((key) => (answerData[key] == null) && delete answerData[key]);
|
||||||
@ -170,12 +190,17 @@ export class PdQuestionFuturePlansAndBusinessEnvironmentPage {
|
|||||||
this._futurePlansForm.reset(this._futurePlansForm.value);
|
this._futurePlansForm.reset(this._futurePlansForm.value);
|
||||||
this.toast.pdTriggerappmessage("Record Saved Successfully");
|
this.toast.pdTriggerappmessage("Record Saved Successfully");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
this.spinner_access=false
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
this.spinner_access=false
|
||||||
this.toast.pdTriggerappmessage("Sorry!! Something Went Wrong");
|
this.toast.pdTriggerappmessage("Sorry!! Something Went Wrong");
|
||||||
}
|
}
|
||||||
|
},err=>{
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
|
this.spinner_access=false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -256,8 +281,12 @@ export class PdQuestionFuturePlansAndBusinessEnvironmentPage {
|
|||||||
this.getPDImages();
|
this.getPDImages();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.toast.pdTriggerappmessage('Fail');
|
this.toast.pdTriggerappmessage('Something went wrong');
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
|
this.loading.dismissLoader();
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,18 +8,22 @@
|
|||||||
<a (click)="capture()">
|
<a (click)="capture()">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
<a (click)="saveStockInfo(stockForm.value)" *ngIf="!complete_status">
|
<a (click)="saveStockInfo(stockForm.value)" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
<ion-segment [(ngModel)]="tab" color="optblue" (click)="tabChange()">
|
||||||
<ion-segment-button value="0">
|
<ion-segment-button value="0">
|
||||||
Form
|
Form
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
<ion-segment-button value="1">
|
<ion-segment-button value="1">
|
||||||
Pictures
|
Pictures
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value ="2">
|
||||||
|
Notes
|
||||||
|
</ion-segment-button>
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
<ion-content padding>
|
<ion-content padding>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
import { IonicPage, NavController, NavParams, ModalController, ModalOptions } from 'ionic-angular';
|
||||||
import { QuestionCategoryProvider } from '../../../../providers/question-category/question-category';
|
import { QuestionCategoryProvider } from '../../../../providers/question-category/question-category';
|
||||||
import { AwsServiceProvider } from '../../../../providers/aws-service/aws-service';
|
import { AwsServiceProvider } from '../../../../providers/aws-service/aws-service';
|
||||||
import { ToastProvider } from '../../../../providers/common-provider/toast';
|
import { ToastProvider } from '../../../../providers/common-provider/toast';
|
||||||
@ -9,6 +9,7 @@ import { takeUntil } from 'rxjs/operators';
|
|||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
import {CameraProvider} from '../../../../providers/common-provider/camera'
|
import {CameraProvider} from '../../../../providers/common-provider/camera'
|
||||||
import {LoadingProvider} from '../../../../providers/common-provider/loading'
|
import {LoadingProvider} from '../../../../providers/common-provider/loading'
|
||||||
|
import { OfficerNotesModalPage } from '../../../officer-notes-modal/officer-notes-modal';
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionStockInfoPage page.
|
* Generated class for the PdQuestionStockInfoPage page.
|
||||||
*
|
*
|
||||||
@ -64,11 +65,14 @@ export class PdQuestionStockInfoPage {
|
|||||||
imageBucket: any=[];
|
imageBucket: any=[];
|
||||||
tab: string='0';
|
tab: string='0';
|
||||||
complete_status: boolean = false;
|
complete_status: boolean = false;
|
||||||
|
spinner_access:boolean=false;
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams, public qustCat: QuestionCategoryProvider,
|
constructor(public navCtrl: NavController, public navParams: NavParams, public qustCat: QuestionCategoryProvider,
|
||||||
public aws: AwsServiceProvider, public toast: ToastProvider, public fb: FormBuilder,
|
public aws: AwsServiceProvider, public toast: ToastProvider, public fb: FormBuilder,
|
||||||
public constant: ConstantsProvider,private cameraProvider:CameraProvider,private loading:LoadingProvider)
|
public constant: ConstantsProvider,private cameraProvider:CameraProvider,
|
||||||
|
private loading:LoadingProvider,private modalCtrl:ModalController)
|
||||||
{
|
{
|
||||||
|
this.loading.dataLoader();
|
||||||
this.pdDetails = this.navParams.get('pdDetails');
|
this.pdDetails = this.navParams.get('pdDetails');
|
||||||
this.formDetails = this.navParams.get('formDetails');
|
this.formDetails = this.navParams.get('formDetails');
|
||||||
this.users = this.aws.getlocale();
|
this.users = this.aws.getlocale();
|
||||||
@ -90,7 +94,9 @@ export class PdQuestionStockInfoPage {
|
|||||||
this.errorMessage = 'Fill Business Form First! / No Company Found at this ID' + this.company_id + '! ....';
|
this.errorMessage = 'Fill Business Form First! / No Company Found at this ID' + this.company_id + '! ....';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
}, err => {
|
}, err => {
|
||||||
|
this.loading.dismissLoader();
|
||||||
this.toast.pdTriggerappmessage('Business Type Of Activity Not Available Please Check Business Information.!');
|
this.toast.pdTriggerappmessage('Business Type Of Activity Not Available Please Check Business Information.!');
|
||||||
this.noRecordsFound = false;
|
this.noRecordsFound = false;
|
||||||
this.errorMessage = 'No Records Found , Something went Wrong!';
|
this.errorMessage = 'No Records Found , Something went Wrong!';
|
||||||
@ -105,6 +111,76 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
console.log('ionViewDidLoad PdQuestionStockInfoPage');
|
console.log('ionViewDidLoad PdQuestionStockInfoPage');
|
||||||
this.getPDImages();
|
this.getPDImages();
|
||||||
}
|
}
|
||||||
|
ionViewCanLeave(){
|
||||||
|
console.log("dirty",this.stockForm.dirty);
|
||||||
|
if(this.stockForm.dirty){
|
||||||
|
|
||||||
|
return new Promise((resolve,reject)=>{
|
||||||
|
let alert=this.toast.setAlert("Data will be Lost","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();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
tabChange(){
|
||||||
|
if(this.tab == '2'){
|
||||||
|
const modalOption:ModalOptions={
|
||||||
|
cssClass:'officerNotesModal'
|
||||||
|
}
|
||||||
|
let records:any={pd_id:this.pdDetails.pd_id,pd_qc_note:this.pdDetails.pd_qc_note,fk_updatedby:this.pdDetails.fk_updatedby,random_string:this.pdDetails.random_string}
|
||||||
|
const modalCtrl=this.modalCtrl.create(OfficerNotesModalPage,{'values':records},modalOption)
|
||||||
|
modalCtrl.present();
|
||||||
|
this.tab='0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public initstockForm(record) {
|
public initstockForm(record) {
|
||||||
let api = Object.keys(record.from_business).map(function (key) {
|
let api = Object.keys(record.from_business).map(function (key) {
|
||||||
@ -967,17 +1043,24 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
|
this.spinner_access=true;
|
||||||
Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]);
|
Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]);
|
||||||
this.qustCat.saveForm(answerFormValues).subscribe(responsed => {
|
this.qustCat.saveForm(answerFormValues).subscribe(responsed => {
|
||||||
if (responsed['status'] == 200) {
|
if (responsed['status'] == 200) {
|
||||||
|
this.stockForm.reset(this.stockForm.value)
|
||||||
this.stockForm.markAsUntouched();
|
this.stockForm.markAsUntouched();
|
||||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
this.spinner_access=false
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
}, 2000);
|
}, 2000);
|
||||||
} else {
|
} else {
|
||||||
|
this.spinner_access=false
|
||||||
this.toast.pdTriggerappmessage('Something Wents Wrong Try Again.!');
|
this.toast.pdTriggerappmessage('Something Wents Wrong Try Again.!');
|
||||||
}
|
}
|
||||||
|
},err=>{
|
||||||
|
this.spinner_access=false
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1089,8 +1172,12 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
this.getPDImages();
|
this.getPDImages();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.toast.pdTriggerappmessage('Fail');
|
this.toast.pdTriggerappmessage('Something Went wrong');
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
this.toast.pdTriggerappmessage("Network Error")
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,18 +8,22 @@
|
|||||||
<a (click)="capture()" *ngIf="camera_enable">
|
<a (click)="capture()" *ngIf="camera_enable">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
<a (click)="saveSupplierInfoWithImageCheck(supplierInfoForm.value)" *ngIf="!complete_status">
|
<a (click)="saveSupplierInfoWithImageCheck(supplierInfoForm.value)" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
<ion-segment [(ngModel)]="tab" color="optblue" (click)="tabChange()">
|
||||||
<ion-segment-button value="0">
|
<ion-segment-button value="0">
|
||||||
Form
|
Form
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
<ion-segment-button value="1">
|
<ion-segment-button value="1">
|
||||||
Pictures
|
Pictures
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value ="2">
|
||||||
|
Notes
|
||||||
|
</ion-segment-button>
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
<ion-content padding>
|
<ion-content padding>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
import { IonicPage, NavController, NavParams, ModalOptions, ModalController } from 'ionic-angular';
|
||||||
import { FormBuilder, FormGroup, FormArray, Validators } from '@angular/forms';
|
import { FormBuilder, FormGroup, FormArray, Validators } from '@angular/forms';
|
||||||
import { AwsServiceProvider } from '../../../../providers/aws-service/aws-service';
|
import { AwsServiceProvider } from '../../../../providers/aws-service/aws-service';
|
||||||
import { QuestionCategoryProvider } from '../../../../providers/question-category/question-category';
|
import { QuestionCategoryProvider } from '../../../../providers/question-category/question-category';
|
||||||
@ -8,6 +8,7 @@ import { CameraProvider } from '../../../../providers/common-provider/camera'
|
|||||||
import { LoadingProvider } from '../../../../providers/common-provider/loading'
|
import { LoadingProvider } from '../../../../providers/common-provider/loading'
|
||||||
import { ConstantsProvider } from '../../../../providers/constants/constants'
|
import { ConstantsProvider } from '../../../../providers/constants/constants'
|
||||||
import { ThrowStmt } from '@angular/compiler';
|
import { ThrowStmt } from '@angular/compiler';
|
||||||
|
import { OfficerNotesModalPage } from '../../../officer-notes-modal/officer-notes-modal';
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionSupplsierInfoPage page.
|
* Generated class for the PdQuestionSupplsierInfoPage page.
|
||||||
*
|
*
|
||||||
@ -46,11 +47,13 @@ export class PdQuestionSupplierInfoPage {
|
|||||||
complete_status: boolean = false;
|
complete_status: boolean = false;
|
||||||
billing_available:boolean=false
|
billing_available:boolean=false
|
||||||
camera_enable: boolean;
|
camera_enable: boolean;
|
||||||
|
spinner_access:boolean=false
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams, public fb: FormBuilder,
|
constructor(public navCtrl: NavController, public navParams: NavParams, public fb: FormBuilder,
|
||||||
public aws: AwsServiceProvider, public qustCat: QuestionCategoryProvider,
|
public aws: AwsServiceProvider, public qustCat: QuestionCategoryProvider,
|
||||||
public toast: ToastProvider, private cameraProvider: CameraProvider, private loading: LoadingProvider,
|
public toast: ToastProvider, private cameraProvider: CameraProvider, private loading: LoadingProvider,
|
||||||
private constantProvider: ConstantsProvider) {
|
private constantProvider: ConstantsProvider,private modalCtrl:ModalController) {
|
||||||
|
this.loading.dataLoader();
|
||||||
this.pdDetails = this.navParams.get('pdDetails');
|
this.pdDetails = this.navParams.get('pdDetails');
|
||||||
this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
||||||
this.questionDetails = this.navParams.get('questionDetails');
|
this.questionDetails = this.navParams.get('questionDetails');
|
||||||
@ -88,7 +91,9 @@ export class PdQuestionSupplierInfoPage {
|
|||||||
this.business_tradingProducts.push(val.prodcuts);
|
this.business_tradingProducts.push(val.prodcuts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,6 +118,76 @@ export class PdQuestionSupplierInfoPage {
|
|||||||
console.log('ionViewDidLoad PdQuestionSupplierInfoPage');
|
console.log('ionViewDidLoad PdQuestionSupplierInfoPage');
|
||||||
this.getPDImages();
|
this.getPDImages();
|
||||||
}
|
}
|
||||||
|
ionViewCanLeave(){
|
||||||
|
console.log("dirty",this.supplierInfoForm.dirty);
|
||||||
|
if(this.supplierInfoForm.dirty){
|
||||||
|
|
||||||
|
return new Promise((resolve,reject)=>{
|
||||||
|
let alert=this.toast.setAlert("Data will be Lost","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();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
tabChange(){
|
||||||
|
if(this.tab == '2'){
|
||||||
|
const modalOption:ModalOptions={
|
||||||
|
cssClass:'officerNotesModal'
|
||||||
|
}
|
||||||
|
let records:any={pd_id:this.pdDetails.pd_id,pd_qc_note:this.pdDetails.pd_qc_note,fk_updatedby:this.pdDetails.fk_updatedby,random_string:this.pdDetails.random_string}
|
||||||
|
const modalCtrl=this.modalCtrl.create(OfficerNotesModalPage,{'values':records},modalOption)
|
||||||
|
modalCtrl.present();
|
||||||
|
this.tab='0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// serviceProviderForm: Boolean = false;
|
// serviceProviderForm: Boolean = false;
|
||||||
@ -667,17 +742,23 @@ export class PdQuestionSupplierInfoPage {
|
|||||||
var answerFormValues = FormValues;
|
var answerFormValues = FormValues;
|
||||||
|
|
||||||
Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]);
|
Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]);
|
||||||
|
this.spinner_access=true
|
||||||
this.qustCat.saveForm(answerFormValues).subscribe(responsed => {
|
this.qustCat.saveForm(answerFormValues).subscribe(responsed => {
|
||||||
if (responsed['status'] == 200) {
|
if (responsed['status'] == 200) {
|
||||||
|
this.supplierInfoForm.reset(this.supplierInfoForm.value);
|
||||||
this.supplierInfoForm.markAsUntouched();
|
this.supplierInfoForm.markAsUntouched();
|
||||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
this.spinner_access=false
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
}, 2000);
|
}, 2000);
|
||||||
} else {
|
} else {
|
||||||
|
this.spinner_access=false
|
||||||
this.toast.pdTriggerappmessage('Something Wents Wrong Try Again.!');
|
this.toast.pdTriggerappmessage('Something Wents Wrong Try Again.!');
|
||||||
}
|
}
|
||||||
|
},err=>{
|
||||||
|
this.spinner_access=false
|
||||||
|
this.toast.pdTriggerappmessage("Network Error")
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1002,8 +1083,11 @@ export class PdQuestionSupplierInfoPage {
|
|||||||
this.getPDImages();
|
this.getPDImages();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.toast.pdTriggerappmessage('Fail');
|
this.toast.pdTriggerappmessage('Something went wrong');
|
||||||
}
|
}
|
||||||
|
},err=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,9 +8,10 @@
|
|||||||
<a (click)="capture()">
|
<a (click)="capture()">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
<a (click)="submitCurrentloan(currentLoans.value)" *ngIf="!complete_status">
|
<a (click)="submitCurrentloan(currentLoans.value)" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
|
|
||||||
|
|
||||||
@ -22,13 +23,16 @@
|
|||||||
</a> -->
|
</a> -->
|
||||||
|
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
<ion-segment [(ngModel)]="tab" color="optblue" (click)="tabChange()">
|
||||||
<ion-segment-button value="0">
|
<ion-segment-button value="0">
|
||||||
Form
|
Form
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
<ion-segment-button value="1">
|
<ion-segment-button value="1">
|
||||||
Pictures
|
Pictures
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value ="2">
|
||||||
|
Notes
|
||||||
|
</ion-segment-button>
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component, ApplicationInitStatus, ViewChild, ElementRef } from '@angular/core';
|
import { Component, ApplicationInitStatus, ViewChild, ElementRef } from '@angular/core';
|
||||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
import { IonicPage, NavController, NavParams, ModalOptions, ModalController } from 'ionic-angular';
|
||||||
import { FormGroup,FormArray,FormBuilder,Validators } from '@angular/forms';
|
import { FormGroup,FormArray,FormBuilder,Validators } from '@angular/forms';
|
||||||
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
||||||
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
||||||
@ -9,6 +9,7 @@ import { Subject } from 'rxjs';
|
|||||||
import { takeUntil } from 'rxjs/operators';
|
import { takeUntil } from 'rxjs/operators';
|
||||||
import {CameraProvider} from '../../../providers/common-provider/camera'
|
import {CameraProvider} from '../../../providers/common-provider/camera'
|
||||||
import {LoadingProvider} from '../../../providers/common-provider/loading'
|
import {LoadingProvider} from '../../../providers/common-provider/loading'
|
||||||
|
import { OfficerNotesModalPage } from '../../officer-notes-modal/officer-notes-modal';
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionCurrentLoansPage page.
|
* Generated class for the PdQuestionCurrentLoansPage page.
|
||||||
*
|
*
|
||||||
@ -53,13 +54,14 @@ applicants: any;
|
|||||||
tab: any='0';
|
tab: any='0';
|
||||||
imageDisplay: any=[];
|
imageDisplay: any=[];
|
||||||
complete_status: boolean = false;
|
complete_status: boolean = false;
|
||||||
|
spinner_access:boolean=false;
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,
|
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,
|
||||||
public qustCat:QuestionCategoryProvider,public toast:ToastProvider,
|
public qustCat:QuestionCategoryProvider,public toast:ToastProvider,
|
||||||
public aws:AwsServiceProvider,public constant:ConstantsProvider,
|
public aws:AwsServiceProvider,public constant:ConstantsProvider,
|
||||||
public cameraProvider:CameraProvider,private loading:LoadingProvider) {
|
public cameraProvider:CameraProvider,private loading:LoadingProvider,private modalCtrl:ModalController) {
|
||||||
|
|
||||||
|
|
||||||
|
this.loading.dataLoader();
|
||||||
this.questionDetails = this.navParams.get('questionDetails');
|
this.questionDetails = this.navParams.get('questionDetails');
|
||||||
this.pdDetails = this.navParams.get('pdDetails');
|
this.pdDetails = this.navParams.get('pdDetails');
|
||||||
this.pdid=this.pdDetails.pd_id;
|
this.pdid=this.pdDetails.pd_id;
|
||||||
@ -144,6 +146,17 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
tabChange(){
|
||||||
|
if(this.tab == '2'){
|
||||||
|
const modalOption:ModalOptions={
|
||||||
|
cssClass:'officerNotesModal'
|
||||||
|
}
|
||||||
|
let records:any={pd_id:this.pdDetails.pd_id,pd_qc_note:this.pdDetails.pd_qc_note,fk_updatedby:this.pdDetails.fk_updatedby,random_string:this.pdDetails.random_string}
|
||||||
|
const modalCtrl=this.modalCtrl.create(OfficerNotesModalPage,{'values':records},modalOption)
|
||||||
|
modalCtrl.present();
|
||||||
|
this.tab='0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
getdropdown()
|
getdropdown()
|
||||||
{
|
{
|
||||||
@ -435,6 +448,7 @@ submitCurrentloan(answerData) {
|
|||||||
records.loan_details.forEach(val=>{
|
records.loan_details.forEach(val=>{
|
||||||
delete val.bankSearch
|
delete val.bankSearch
|
||||||
})
|
})
|
||||||
|
this.spinner_access=true;
|
||||||
console.log(' final records when save',records);
|
console.log(' final records when save',records);
|
||||||
this.qustCat.saveForm(records).subscribe(data => {
|
this.qustCat.saveForm(records).subscribe(data => {
|
||||||
|
|
||||||
@ -447,9 +461,17 @@ submitCurrentloan(answerData) {
|
|||||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||||
|
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
this.spinner_access=false
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
},2000);
|
},2000);
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
this.spinner_access=false
|
||||||
|
this.toast.pdTriggerappmessage("Something went wrong")
|
||||||
|
}
|
||||||
|
},err=>{
|
||||||
|
this.spinner_access=false
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
getcurrentLoans()
|
getcurrentLoans()
|
||||||
@ -729,6 +751,10 @@ submitCurrentloan(answerData) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
this.toast.pdTriggerappmessage("Network Error")
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@ -827,7 +853,9 @@ submitCurrentloan(answerData) {
|
|||||||
console.log("Fail")
|
console.log("Fail")
|
||||||
this.toast.pdTriggerappmessage('Fail');
|
this.toast.pdTriggerappmessage('Fail');
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
},ERR=>{
|
},ERR=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
console.log(JSON.stringify(ERR));
|
console.log(JSON.stringify(ERR));
|
||||||
this.toast.pdTriggerappmessage(JSON.stringify(ERR));
|
this.toast.pdTriggerappmessage(JSON.stringify(ERR));
|
||||||
})
|
})
|
||||||
|
|||||||
@ -8,18 +8,22 @@
|
|||||||
<a (click)="capture()">
|
<a (click)="capture()">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
<a (click)="saveEmpInfo()" *ngIf="!complete_status">
|
<a (click)="saveEmpInfo()" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
<ion-segment [(ngModel)]="tab" color="optblue" (click)="tabChange()">
|
||||||
<ion-segment-button value="0">
|
<ion-segment-button value="0">
|
||||||
Form
|
Form
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
<ion-segment-button value="1">
|
<ion-segment-button value="1">
|
||||||
Pictures
|
Pictures
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value ="2">
|
||||||
|
Notes
|
||||||
|
</ion-segment-button>
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component, ViewChild, ElementRef } from '@angular/core';
|
import { Component, ViewChild, ElementRef } from '@angular/core';
|
||||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
import { IonicPage, NavController, NavParams, ModalController, ModalOptions } from 'ionic-angular';
|
||||||
import {FormBuilder,FormControl,FormArray, FormGroup,Validators} from '@angular/forms';
|
import {FormBuilder,FormControl,FormArray, FormGroup,Validators} from '@angular/forms';
|
||||||
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
||||||
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
||||||
@ -8,6 +8,7 @@ import { ConstantsProvider } from '../../../providers/constants/constants';
|
|||||||
import { max } from 'rxjs/operators';
|
import { max } from 'rxjs/operators';
|
||||||
import {CameraProvider} from '../../../providers/common-provider/camera'
|
import {CameraProvider} from '../../../providers/common-provider/camera'
|
||||||
import {LoadingProvider} from '../../../providers/common-provider/loading'
|
import {LoadingProvider} from '../../../providers/common-provider/loading'
|
||||||
|
import { OfficerNotesModalPage } from '../../officer-notes-modal/officer-notes-modal';
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionEmpInfoPage page.
|
* Generated class for the PdQuestionEmpInfoPage page.
|
||||||
*
|
*
|
||||||
@ -57,11 +58,12 @@ export class PdQuestionEmpInfoPage {
|
|||||||
@ViewChild('cashPaidFocus') inputCashPaidFocus :ElementRef
|
@ViewChild('cashPaidFocus') inputCashPaidFocus :ElementRef
|
||||||
@ViewChild('yearFocus') inputYearFocus :ElementRef
|
@ViewChild('yearFocus') inputYearFocus :ElementRef
|
||||||
complete_status: boolean = false;
|
complete_status: boolean = false;
|
||||||
|
spinner_access:boolean=false;
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,
|
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,
|
||||||
public qustCat:QuestionCategoryProvider,public aws: AwsServiceProvider,
|
public qustCat:QuestionCategoryProvider,public aws: AwsServiceProvider,
|
||||||
public toast: ToastProvider,public constant:ConstantsProvider,
|
public toast: ToastProvider,public constant:ConstantsProvider,
|
||||||
private cameraProvider:CameraProvider,private loading:LoadingProvider) {
|
private cameraProvider:CameraProvider,private loading:LoadingProvider,private modalCtrl:ModalController) {
|
||||||
|
this.loading.dataLoader();
|
||||||
this.FormId = this.navParams.get('FormId');
|
this.FormId = this.navParams.get('FormId');
|
||||||
this.questionDetails = this.navParams.get('questionDetails');
|
this.questionDetails = this.navParams.get('questionDetails');
|
||||||
this.pdDetails = this.navParams.get('pdDetails');
|
this.pdDetails = this.navParams.get('pdDetails');
|
||||||
@ -185,7 +187,17 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
tabChange(){
|
||||||
|
if(this.tab == '2'){
|
||||||
|
const modalOption:ModalOptions={
|
||||||
|
cssClass:'officerNotesModal'
|
||||||
|
}
|
||||||
|
let records:any={pd_id:this.pdDetails.pd_id,pd_qc_note:this.pdDetails.pd_qc_note,fk_updatedby:this.pdDetails.fk_updatedby,random_string:this.pdDetails.random_string}
|
||||||
|
const modalCtrl=this.modalCtrl.create(OfficerNotesModalPage,{'values':records},modalOption)
|
||||||
|
modalCtrl.present();
|
||||||
|
this.tab='0';
|
||||||
|
}
|
||||||
|
}
|
||||||
getDropDownList()
|
getDropDownList()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -331,7 +343,7 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
records.bonus_type_other = this.employmentForm.controls['bonus_type_other'].value;
|
records.bonus_type_other = this.employmentForm.controls['bonus_type_other'].value;
|
||||||
|
|
||||||
records.employment_remarks = this.employmentForm.controls['employment_remarks'].value;
|
records.employment_remarks = this.employmentForm.controls['employment_remarks'].value;
|
||||||
|
this.spinner_access=true;
|
||||||
this.qustCat.saveForm(records).subscribe(data => {
|
this.qustCat.saveForm(records).subscribe(data => {
|
||||||
|
|
||||||
|
|
||||||
@ -341,12 +353,17 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
this.employmentForm.reset(this.employmentForm.value);
|
this.employmentForm.reset(this.employmentForm.value);
|
||||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
this.spinner_access=false;
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
},2000);
|
},2000);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
this.spinner_access=false
|
||||||
this.toast.pdTriggerappmessage('Something Wents Wrong Try Again.!');
|
this.toast.pdTriggerappmessage('Something Wents Wrong Try Again.!');
|
||||||
}
|
}
|
||||||
|
},err=>{
|
||||||
|
this.spinner_access=false;
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -537,6 +554,13 @@ inWords(val,flag:number){
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
this.toast.pdTriggerappmessage("Something went wrong")
|
||||||
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
this.toast.pdTriggerappmessage("Network Error!!")
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -616,8 +640,12 @@ inWords(val,flag:number){
|
|||||||
this.getPDImages();
|
this.getPDImages();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.toast.pdTriggerappmessage('Fail');
|
this.toast.pdTriggerappmessage('Something went wrong');
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
this.toast.pdTriggerappmessage("Network Error")
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,18 +9,22 @@
|
|||||||
<a (click)="capture()">
|
<a (click)="capture()">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
<a (click)="savepdfamily(familyForm.value)" *ngIf="!complete_status">
|
<a (click)="savepdfamily(familyForm.value)" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
<ion-segment [(ngModel)]="tab" color="optblue" (click)="tabChange()">
|
||||||
<ion-segment-button value="0">
|
<ion-segment-button value="0">
|
||||||
Form
|
Form
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
<ion-segment-button value="1">
|
<ion-segment-button value="1">
|
||||||
Pictures
|
Pictures
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value ="2">
|
||||||
|
Notes
|
||||||
|
</ion-segment-button>
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
<ion-content padding>
|
<ion-content padding>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
import { IonicPage, NavController, NavParams, ModalController, ModalOptions } from 'ionic-angular';
|
||||||
import { FormGroup, FormBuilder, FormArray, Validators } from '@angular/forms';
|
import { FormGroup, FormBuilder, FormArray, Validators } from '@angular/forms';
|
||||||
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
||||||
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
||||||
@ -10,6 +10,7 @@ import { takeUntil } from 'rxjs/operators';
|
|||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
import {CameraProvider} from '../../../providers/common-provider/camera'
|
import {CameraProvider} from '../../../providers/common-provider/camera'
|
||||||
import {LoadingProvider} from '../../../providers/common-provider/loading'
|
import {LoadingProvider} from '../../../providers/common-provider/loading'
|
||||||
|
import { OfficerNotesModalPage } from '../../officer-notes-modal/officer-notes-modal';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionFamilyPage page.
|
* Generated class for the PdQuestionFamilyPage page.
|
||||||
@ -71,11 +72,15 @@ data:any;
|
|||||||
tab: any='0';
|
tab: any='0';
|
||||||
titleList: any=[];
|
titleList: any=[];
|
||||||
complete_status: boolean = false;
|
complete_status: boolean = false;
|
||||||
|
spinner_access:boolean=false;
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,
|
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,
|
||||||
public qustCat:QuestionCategoryProvider,public aws:AwsServiceProvider,
|
public qustCat:QuestionCategoryProvider,public aws:AwsServiceProvider,
|
||||||
public toast:ToastProvider,public cons:ConstantsProvider,
|
public toast:ToastProvider,public cons:ConstantsProvider,
|
||||||
private cameraProvider:CameraProvider,private loading:LoadingProvider) {
|
private cameraProvider:CameraProvider,private loading:LoadingProvider,private modalCtrl:ModalController) {
|
||||||
|
|
||||||
|
this.loading.dataLoader();
|
||||||
|
|
||||||
this.FormId = this.navParams.get('FormId');
|
this.FormId = this.navParams.get('FormId');
|
||||||
this.pdDetails = this.navParams.get('pdDetails');
|
this.pdDetails = this.navParams.get('pdDetails');
|
||||||
this.selected_person=this.pdDetails.pdapplicants_details;
|
this.selected_person=this.pdDetails.pdapplicants_details;
|
||||||
@ -164,6 +169,17 @@ data:any;
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
tabChange(){
|
||||||
|
if(this.tab == '2'){
|
||||||
|
const modalOption:ModalOptions={
|
||||||
|
cssClass:'officerNotesModal'
|
||||||
|
}
|
||||||
|
let records:any={pd_id:this.pdDetails.pd_id,pd_qc_note:this.pdDetails.pd_qc_note,fk_updatedby:this.pdDetails.fk_updatedby,random_string:this.pdDetails.random_string}
|
||||||
|
const modalCtrl=this.modalCtrl.create(OfficerNotesModalPage,{'values':records},modalOption)
|
||||||
|
modalCtrl.present();
|
||||||
|
this.tab='0';
|
||||||
|
}
|
||||||
|
}
|
||||||
initFamilyDetails(records) : void
|
initFamilyDetails(records) : void
|
||||||
{
|
{
|
||||||
if (records === null) {
|
if (records === null) {
|
||||||
@ -618,15 +634,18 @@ savepdfamily(answerData)
|
|||||||
delete childVal.relationSearch
|
delete childVal.relationSearch
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
this.spinner_access=true;
|
||||||
this.qustCat.saveForm(records).subscribe(res=>{
|
this.qustCat.saveForm(records).subscribe(res=>{
|
||||||
//TO CHANGE THE FORM STATE
|
//TO CHANGE THE FORM STATE
|
||||||
this.familyForm.reset(this.familyForm.value);
|
this.familyForm.reset(this.familyForm.value);
|
||||||
this.toast.pdTriggerappmessage("Record Saved Successfully");
|
this.toast.pdTriggerappmessage("Record Saved Successfully");
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
this.spinner_access=false;
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
},2000);
|
},2000);
|
||||||
|
|
||||||
},err=>{
|
},err=>{
|
||||||
|
this.spinner_access=false
|
||||||
this.toast.pdTriggerappmessage("Some Fields value is Missing Please Fill It");
|
this.toast.pdTriggerappmessage("Some Fields value is Missing Please Fill It");
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -852,8 +871,9 @@ resValue:any;
|
|||||||
|
|
||||||
}
|
}
|
||||||
//this.generateFamilyMembersDetailsGetData(res['records'].family_members_details);
|
//this.generateFamilyMembersDetailsGetData(res['records'].family_members_details);
|
||||||
|
this.loading.dismissLoader();
|
||||||
},err=>{
|
},err=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
console.log("Error",err)
|
console.log("Error",err)
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -1119,8 +1139,12 @@ searchFun(control:any,i:number,option){
|
|||||||
this.getPDImages();
|
this.getPDImages();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.toast.pdTriggerappmessage('Fail');
|
this.toast.pdTriggerappmessage('Something went wrong');
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,18 +15,22 @@
|
|||||||
<a (click)="capture()">
|
<a (click)="capture()">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
<a (click)="saveFinalRemark()" *ngIf="!complete_status">
|
<a (click)="saveFinalRemark()" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
<ion-segment [(ngModel)]="tab" color="optblue" (click)="tabChange()">
|
||||||
<ion-segment-button value="0">
|
<ion-segment-button value="0">
|
||||||
Form
|
Form
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
<ion-segment-button value="1">
|
<ion-segment-button value="1">
|
||||||
Pictures
|
Pictures
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value ="2">
|
||||||
|
Notes
|
||||||
|
</ion-segment-button>
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
import { IonicPage, NavController, NavParams, ModalController, ModalOptions } from 'ionic-angular';
|
||||||
import { FormGroup, FormBuilder,FormArray,FormControl,Validators} from '@angular/forms';
|
import { FormGroup, FormBuilder,FormArray,FormControl,Validators} from '@angular/forms';
|
||||||
// import { t } from '@angular/core/src/render3';
|
// import { t } from '@angular/core/src/render3';
|
||||||
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
||||||
@ -8,6 +8,7 @@ import { ToastProvider } from '../../../providers/common-provider/toast';
|
|||||||
import { CameraProvider } from '../../../providers/common-provider/camera'
|
import { CameraProvider } from '../../../providers/common-provider/camera'
|
||||||
import {LoadingProvider} from '../../../providers/common-provider/loading'
|
import {LoadingProvider} from '../../../providers/common-provider/loading'
|
||||||
import {ConstantsProvider} from '../../../providers/constants/constants'
|
import {ConstantsProvider} from '../../../providers/constants/constants'
|
||||||
|
import { OfficerNotesModalPage } from '../../officer-notes-modal/officer-notes-modal';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionFinalRemarkPage page.
|
* Generated class for the PdQuestionFinalRemarkPage page.
|
||||||
@ -41,9 +42,13 @@ export class PdQuestionFinalRemarkPage {
|
|||||||
{'id':'public_transport','name':'Public Transport'},
|
{'id':'public_transport','name':'Public Transport'},
|
||||||
{'id':'others','name':'Others'}]
|
{'id':'others','name':'Others'}]
|
||||||
complete_status: boolean = false;
|
complete_status: boolean = false;
|
||||||
|
spinner_access:boolean=false
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams, public fb:FormBuilder,
|
constructor(public navCtrl: NavController, public navParams: NavParams, public fb:FormBuilder,
|
||||||
public qustcat:QuestionCategoryProvider,public aws:AwsServiceProvider,
|
public qustcat:QuestionCategoryProvider,public aws:AwsServiceProvider,
|
||||||
public toast:ToastProvider,private cameraProvider:CameraProvider,private loading:LoadingProvider,private constantProvider:ConstantsProvider) {
|
public toast:ToastProvider,private cameraProvider:CameraProvider,private loading:LoadingProvider,private constantProvider:ConstantsProvider,
|
||||||
|
private modalCtrl:ModalController) {
|
||||||
|
|
||||||
|
this.loading.dataLoader();
|
||||||
this.pdDetails=this.navParams.get('pdDetails');
|
this.pdDetails=this.navParams.get('pdDetails');
|
||||||
this.pdid=this.pdDetails.pd_id
|
this.pdid=this.pdDetails.pd_id
|
||||||
this.FormId=this.navParams.get('FormId');
|
this.FormId=this.navParams.get('FormId');
|
||||||
@ -88,10 +93,10 @@ export class PdQuestionFinalRemarkPage {
|
|||||||
this._finalRemarkForm.removeControl('sealing_activity');
|
this._finalRemarkForm.removeControl('sealing_activity');
|
||||||
this._finalRemarkForm.removeControl('demolition_activity');
|
this._finalRemarkForm.removeControl('demolition_activity');
|
||||||
}
|
}
|
||||||
this.product_abbr != 'LAEP' ?
|
// this.product_abbr != 'LAEP' ?
|
||||||
this._finalRemarkForm.controls['final_form_remarks'].setValidators(Validators.compose([Validators.required])) :
|
// this._finalRemarkForm.controls['final_form_remarks'].setValidators(Validators.compose([Validators.required])) :
|
||||||
this._finalRemarkForm.controls['final_form_remarks'].clearValidators()
|
// this._finalRemarkForm.controls['final_form_remarks'].clearValidators()
|
||||||
this._finalRemarkForm.controls['final_form_remarks'].updateValueAndValidity()
|
// this._finalRemarkForm.controls['final_form_remarks'].updateValueAndValidity()
|
||||||
|
|
||||||
this.getDropDown();
|
this.getDropDown();
|
||||||
|
|
||||||
@ -164,6 +169,18 @@ export class PdQuestionFinalRemarkPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tabChange(){
|
||||||
|
if(this.tab == '2'){
|
||||||
|
const modalOption:ModalOptions={
|
||||||
|
cssClass:'officerNotesModal'
|
||||||
|
}
|
||||||
|
let records:any={pd_id:this.pdDetails.pd_id,pd_qc_note:this.pdDetails.pd_qc_note,fk_updatedby:this.pdDetails.fk_updatedby,random_string:this.pdDetails.random_string}
|
||||||
|
const modalCtrl=this.modalCtrl.create(OfficerNotesModalPage,{'values':records},modalOption)
|
||||||
|
modalCtrl.present();
|
||||||
|
this.tab='0';
|
||||||
|
}
|
||||||
|
}
|
||||||
getDropDown(){
|
getDropDown(){
|
||||||
this.qustcat.getcommondrop('CUSTOMERBEHAVIOUR').subscribe(res=>{
|
this.qustcat.getcommondrop('CUSTOMERBEHAVIOUR').subscribe(res=>{
|
||||||
this.m_remarkTypeCustomerBehaviour=res['records'].filter(data=>data.isactive==1)
|
this.m_remarkTypeCustomerBehaviour=res['records'].filter(data=>data.isactive==1)
|
||||||
@ -473,6 +490,10 @@ RecommendationChange(e) {
|
|||||||
let recommendationReferToCredit: any = this._finalRemarkForm.get('recommendation_refer_to_credit') as FormArray;
|
let recommendationReferToCredit: any = this._finalRemarkForm.get('recommendation_refer_to_credit') as FormArray;
|
||||||
recommendationReferToCredit.push(this.createRecomendationCreditRefer(null));
|
recommendationReferToCredit.push(this.createRecomendationCreditRefer(null));
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -499,6 +520,7 @@ RecommendationChange(e) {
|
|||||||
this.toast.pdTriggerappmessage("Please Fill all the Fields marked with '*' ")
|
this.toast.pdTriggerappmessage("Please Fill all the Fields marked with '*' ")
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
this.spinner_access=true;
|
||||||
var answerData=this._finalRemarkForm.value
|
var answerData=this._finalRemarkForm.value
|
||||||
//To Remove The "Null" With Key also
|
//To Remove The "Null" With Key also
|
||||||
Object.keys(answerData).forEach((key) => (answerData[key] == null) && delete answerData[key]);
|
Object.keys(answerData).forEach((key) => (answerData[key] == null) && delete answerData[key]);
|
||||||
@ -508,12 +530,17 @@ RecommendationChange(e) {
|
|||||||
this._finalRemarkForm.reset(this._finalRemarkForm.value);
|
this._finalRemarkForm.reset(this._finalRemarkForm.value);
|
||||||
this.toast.pdTriggerappmessage("Record Saved Successfully");
|
this.toast.pdTriggerappmessage("Record Saved Successfully");
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
this.spinner_access=false
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
},2000);
|
},2000);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
this.spinner_access=false
|
||||||
this.toast.pdTriggerappmessage("Sorry!! Something Went Wrong");
|
this.toast.pdTriggerappmessage("Sorry!! Something Went Wrong");
|
||||||
}
|
}
|
||||||
|
},err=>{
|
||||||
|
this.spinner_access=false;
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -622,8 +649,11 @@ capture(){
|
|||||||
this.getPDImages();
|
this.getPDImages();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.toast.pdTriggerappmessage('Fail');
|
this.toast.pdTriggerappmessage('Something went wrong');
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,18 +9,22 @@
|
|||||||
<a (click)="capture()">
|
<a (click)="capture()">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
<a (click)="submitData(generalForm.value)" *ngIf="!complete_status">
|
<a (click)="submitData(generalForm.value)" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
<ion-segment [(ngModel)]="tab" color="optblue" (click)="tabChange()">
|
||||||
<ion-segment-button value="0">
|
<ion-segment-button value="0">
|
||||||
Form
|
Form
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
<ion-segment-button value="1">
|
<ion-segment-button value="1">
|
||||||
Pictures
|
Pictures
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value ="2">
|
||||||
|
Notes
|
||||||
|
</ion-segment-button>
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component,ViewChild,ElementRef } from '@angular/core';
|
import { Component,ViewChild,ElementRef } from '@angular/core';
|
||||||
import { IonicPage, NavController, NavParams, ModalController, CardTitle, Content } from 'ionic-angular';
|
import { IonicPage, NavController, NavParams, ModalController, CardTitle, Content, ModalOptions } from 'ionic-angular';
|
||||||
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
||||||
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
||||||
import { ToastProvider } from '../../../providers/common-provider/toast';
|
import { ToastProvider } from '../../../providers/common-provider/toast';
|
||||||
@ -13,6 +13,7 @@ import { MatSelect } from '@angular/material';
|
|||||||
import {CameraProvider} from '../../../providers/common-provider/camera'
|
import {CameraProvider} from '../../../providers/common-provider/camera'
|
||||||
import {LoadingProvider} from '../../../providers/common-provider/loading'
|
import {LoadingProvider} from '../../../providers/common-provider/loading'
|
||||||
import {ConstantsProvider} from '../../../providers/constants/constants'
|
import {ConstantsProvider} from '../../../providers/constants/constants'
|
||||||
|
import { OfficerNotesModalPage } from '../../officer-notes-modal/officer-notes-modal';
|
||||||
//import {} from 'moment'
|
//import {} from 'moment'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -75,6 +76,7 @@ export class PdQuestionGeneralInfoPage {
|
|||||||
updateIndex_comp: any;
|
updateIndex_comp: any;
|
||||||
|
|
||||||
complete_status : boolean = false;
|
complete_status : boolean = false;
|
||||||
|
spinner_access:boolean=false;
|
||||||
|
|
||||||
@ViewChild('remark') nameField: ElementRef;
|
@ViewChild('remark') nameField: ElementRef;
|
||||||
@ViewChild('focusBusiness') focus_business_entity : MatSelect
|
@ViewChild('focusBusiness') focus_business_entity : MatSelect
|
||||||
@ -86,7 +88,10 @@ export class PdQuestionGeneralInfoPage {
|
|||||||
constructor(public navCtrl: NavController, public navParams: NavParams,
|
constructor(public navCtrl: NavController, public navParams: NavParams,
|
||||||
public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,
|
public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,
|
||||||
public toast:ToastProvider,public fb:FormBuilder,public modal:ModalController,
|
public toast:ToastProvider,public fb:FormBuilder,public modal:ModalController,
|
||||||
private cameraProvider:CameraProvider,private loading:LoadingProvider,private cons:ConstantsProvider) {
|
private cameraProvider:CameraProvider,private loading:LoadingProvider,
|
||||||
|
private cons:ConstantsProvider,private modalCtrl:ModalController) {
|
||||||
|
|
||||||
|
this.loading.dataLoader();
|
||||||
this.maxDate = new Date();
|
this.maxDate = new Date();
|
||||||
this.pd_applicants_details = [];
|
this.pd_applicants_details = [];
|
||||||
this.pd_applicants_details.pop();
|
this.pd_applicants_details.pop();
|
||||||
@ -238,6 +243,17 @@ export class PdQuestionGeneralInfoPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
tabChange(){
|
||||||
|
if(this.tab == '2'){
|
||||||
|
const modalOption:ModalOptions={
|
||||||
|
cssClass:'officerNotesModal'
|
||||||
|
}
|
||||||
|
let records:any={pd_id:this.pdDetails.pd_id,pd_qc_note:this.pdDetails.pd_qc_note,fk_updatedby:this.pdDetails.fk_updatedby,random_string:this.pdDetails.random_string}
|
||||||
|
const modalCtrl=this.modalCtrl.create(OfficerNotesModalPage,{'values':records},modalOption)
|
||||||
|
modalCtrl.present();
|
||||||
|
this.tab='0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
initlistv(data,purpose) :void
|
initlistv(data,purpose) :void
|
||||||
{
|
{
|
||||||
@ -1118,6 +1134,7 @@ console.log('1)',this.temp);
|
|||||||
if(!saveRecords.general_info_location){
|
if(!saveRecords.general_info_location){
|
||||||
saveRecords.general_info_location=res
|
saveRecords.general_info_location=res
|
||||||
}
|
}
|
||||||
|
this.spinner_access=true;
|
||||||
// console.log("save records",saveRecords);
|
// console.log("save records",saveRecords);
|
||||||
this.qustCat.saveForm(saveRecords).subscribe(dataResult=>{
|
this.qustCat.saveForm(saveRecords).subscribe(dataResult=>{
|
||||||
if(dataResult['dataStatus']==true){
|
if(dataResult['dataStatus']==true){
|
||||||
@ -1125,14 +1142,17 @@ console.log('1)',this.temp);
|
|||||||
this.generalForm.reset(this.generalForm.value);
|
this.generalForm.reset(this.generalForm.value);
|
||||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
this.spinner_access=false;
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
},2000);
|
},2000);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.toast.pdTriggerappmessage('Error');
|
this.spinner_access=false
|
||||||
|
this.toast.pdTriggerappmessage('Something went wrong');
|
||||||
}
|
}
|
||||||
|
},err=>{
|
||||||
|
this.spinner_access=false;
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -1317,6 +1337,10 @@ console.log('1)',this.temp);
|
|||||||
this.initCompanyRelationShip('')
|
this.initCompanyRelationShip('')
|
||||||
|
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
this.toast.pdTriggerappmessage("Network Error")
|
||||||
})
|
})
|
||||||
/*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.form_id};
|
||||||
this.qustCat.retiverForm(records).subscribe(res=>
|
this.qustCat.retiverForm(records).subscribe(res=>
|
||||||
@ -1462,6 +1486,9 @@ console.log('1)',this.temp);
|
|||||||
else{
|
else{
|
||||||
this.toast.pdTriggerappmessage('Fail');
|
this.toast.pdTriggerappmessage('Fail');
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -5,23 +5,27 @@
|
|||||||
<ion-icon name="menu"></ion-icon>
|
<ion-icon name="menu"></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
<ion-title *ngIf="!viewchange">{{FormId.form_name}}</ion-title>
|
<ion-title *ngIf="!viewchange">{{FormId.form_name}}</ion-title>
|
||||||
<ion-buttons end>
|
<ion-buttons end>sz
|
||||||
<a (click)="capture()">
|
<a (click)="capture()">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
<a (click)="sumbitData(representativeForm.value)" *ngIf="!complete_status">
|
<a (click)="sumbitData(representativeForm.value)" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
|
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
<ion-segment [(ngModel)]="tab" color="optblue" (click)="tabChange()">
|
||||||
<ion-segment-button value="0">
|
<ion-segment-button value="0">
|
||||||
Form
|
Form
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
<ion-segment-button value="1">
|
<ion-segment-button value="1">
|
||||||
Pictures
|
Pictures
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value ="2">
|
||||||
|
Notes
|
||||||
|
</ion-segment-button>
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
import { IonicPage, NavController, NavParams, ModalController, ModalOptions } from 'ionic-angular';
|
||||||
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
||||||
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
||||||
import { ToastProvider } from '../../../providers/common-provider/toast';
|
import { ToastProvider } from '../../../providers/common-provider/toast';
|
||||||
@ -7,6 +7,7 @@ import { FormGroup, FormBuilder,FormArray, Validators } from '@angular/forms';
|
|||||||
import {CameraProvider} from '../../../providers/common-provider/camera'
|
import {CameraProvider} from '../../../providers/common-provider/camera'
|
||||||
import {LoadingProvider} from '../../../providers/common-provider/loading'
|
import {LoadingProvider} from '../../../providers/common-provider/loading'
|
||||||
import {ConstantsProvider} from '../../../providers/constants/constants'
|
import {ConstantsProvider} from '../../../providers/constants/constants'
|
||||||
|
import { OfficerNotesModalPage } from '../../officer-notes-modal/officer-notes-modal';
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionLenderRepresentativePage page.
|
* Generated class for the PdQuestionLenderRepresentativePage page.
|
||||||
*
|
*
|
||||||
@ -29,11 +30,14 @@ export class PdQuestionLenderRepresentativePage {
|
|||||||
imageBucket: any=[];
|
imageBucket: any=[];
|
||||||
tab: any='0';
|
tab: any='0';
|
||||||
complete_status: boolean = false;
|
complete_status: boolean = false;
|
||||||
|
spinner_access:boolean=false;
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,
|
constructor(public navCtrl: NavController, public navParams: NavParams,
|
||||||
public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,
|
public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,
|
||||||
public toast:ToastProvider,public fb:FormBuilder,private cameraProvider:CameraProvider,
|
public toast:ToastProvider,public fb:FormBuilder,private cameraProvider:CameraProvider,
|
||||||
private loading:LoadingProvider,private constantProvider:ConstantsProvider)
|
private loading:LoadingProvider,private constantProvider:ConstantsProvider,private modalCtrl:ModalController)
|
||||||
{
|
{
|
||||||
|
this.loading.dataLoader();
|
||||||
this.pdDetails = this.navParams.get('pdDetails');
|
this.pdDetails = this.navParams.get('pdDetails');
|
||||||
this.FormId = this.navParams.get('FormId');
|
this.FormId = this.navParams.get('FormId');
|
||||||
|
|
||||||
@ -117,6 +121,17 @@ export class PdQuestionLenderRepresentativePage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
tabChange(){
|
||||||
|
if(this.tab == '2'){
|
||||||
|
const modalOption:ModalOptions={
|
||||||
|
cssClass:'officerNotesModal'
|
||||||
|
}
|
||||||
|
let records:any={pd_id:this.pdDetails.pd_id,pd_qc_note:this.pdDetails.pd_qc_note,fk_updatedby:this.pdDetails.fk_updatedby,random_string:this.pdDetails.random_string}
|
||||||
|
const modalCtrl=this.modalCtrl.create(OfficerNotesModalPage,{'values':records},modalOption)
|
||||||
|
modalCtrl.present();
|
||||||
|
this.tab='0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
createlenReDetails()
|
createlenReDetails()
|
||||||
{
|
{
|
||||||
@ -141,7 +156,7 @@ export class PdQuestionLenderRepresentativePage {
|
|||||||
if(this.representativeForm.valid)
|
if(this.representativeForm.valid)
|
||||||
{
|
{
|
||||||
let records = this.representativeForm.value;
|
let records = this.representativeForm.value;
|
||||||
|
this.spinner_access=true;
|
||||||
this.qustCat.saveForm(records).subscribe(res=>
|
this.qustCat.saveForm(records).subscribe(res=>
|
||||||
{
|
{
|
||||||
if(res['dataStatus']==true)
|
if(res['dataStatus']==true)
|
||||||
@ -150,9 +165,17 @@ export class PdQuestionLenderRepresentativePage {
|
|||||||
this.representativeForm.reset(this.representativeForm.value);
|
this.representativeForm.reset(this.representativeForm.value);
|
||||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
this.spinner_access=false
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
},2000);
|
},2000);
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
this.spinner_access=false;
|
||||||
|
this.toast.pdTriggerappmessage("Something went wrong");
|
||||||
|
}
|
||||||
|
},err=>{
|
||||||
|
this.spinner_access=false;
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
@ -195,6 +218,10 @@ export class PdQuestionLenderRepresentativePage {
|
|||||||
this.representativeForm.controls['representative_remarks'].setValue(lenderReDetails.representative_remarks);
|
this.representativeForm.controls['representative_remarks'].setValue(lenderReDetails.representative_remarks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -278,8 +305,12 @@ export class PdQuestionLenderRepresentativePage {
|
|||||||
this.getPDImages();
|
this.getPDImages();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.toast.pdTriggerappmessage('Fail');
|
this.toast.pdTriggerappmessage('Something went wrong');
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
this.toast.pdTriggerappmessage("Network Error")
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,19 +9,23 @@
|
|||||||
<a (click)="capture()">
|
<a (click)="capture()">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
<a (click)="submitLoanDetails()" *ngIf="!complete_status">
|
<a (click)="submitLoanDetails()" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
|
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
<ion-segment [(ngModel)]="tab" color="optblue" (click)="tabChange()">
|
||||||
<ion-segment-button value="0">
|
<ion-segment-button value="0">
|
||||||
Form
|
Form
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
<ion-segment-button value="1">
|
<ion-segment-button value="1">
|
||||||
Pictures
|
Pictures
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value ="2">
|
||||||
|
Notes
|
||||||
|
</ion-segment-button>
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
@ -81,7 +85,7 @@
|
|||||||
<input matInput autocomplete="off" placeholder="No of Months" formControlName="loan_tenure" type="number">
|
<input matInput autocomplete="off" placeholder="No of Months" formControlName="loan_tenure" type="number">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:100%">
|
<mat-form-field style="width:100%">
|
||||||
<mat-select placeholder="Sub Product" formControlName="sub_product" (selectionChange)="onChangeSubProduct($event.value)">
|
<mat-select placeholder="Sub Product" formControlName="sub_product" (selectionChange)="onChangeSubProduct($event.value);ChangeProperty($event.value)">
|
||||||
<mat-option>Select</mat-option>
|
<mat-option>Select</mat-option>
|
||||||
<mat-option *ngFor="let sub of m_endUseofLoad" [value]="sub.subproduct_id">{{sub.name}} ( {{sub.abbr}} )</mat-option>
|
<mat-option *ngFor="let sub of m_endUseofLoad" [value]="sub.subproduct_id">{{sub.name}} ( {{sub.abbr}} )</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {NavController, NavParams } from 'ionic-angular';
|
import {NavController, NavParams, ModalController, ModalOptions } from 'ionic-angular';
|
||||||
import { FormGroup, FormBuilder, Validators, FormControl } from '@angular/forms';
|
import { FormGroup, FormBuilder, Validators, FormControl } from '@angular/forms';
|
||||||
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
||||||
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
||||||
@ -10,6 +10,7 @@ import { ReplaySubject, Subject } from 'rxjs';
|
|||||||
import {CameraProvider} from '../../../providers/common-provider/camera'
|
import {CameraProvider} from '../../../providers/common-provider/camera'
|
||||||
import {LoadingProvider} from '../../../providers/common-provider/loading'
|
import {LoadingProvider} from '../../../providers/common-provider/loading'
|
||||||
import {StorageProvider} from '../../../providers/storage/storage'
|
import {StorageProvider} from '../../../providers/storage/storage'
|
||||||
|
import { OfficerNotesModalPage } from '../../officer-notes-modal/officer-notes-modal';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionLoansPage page.
|
* Generated class for the PdQuestionLoansPage page.
|
||||||
@ -87,11 +88,15 @@ export class PdQuestionLoansPage {
|
|||||||
pincodeDataValue: any;
|
pincodeDataValue: any;
|
||||||
stateData: any;
|
stateData: any;
|
||||||
stateDataValue: any;
|
stateDataValue: any;
|
||||||
|
original_mortageTypeProperty: any=[];
|
||||||
|
spinner_access:boolean=false
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams, public fb: FormBuilder,
|
constructor(public navCtrl: NavController, public navParams: NavParams, public fb: FormBuilder,
|
||||||
public qustCat: QuestionCategoryProvider, public aws: AwsServiceProvider,
|
public qustCat: QuestionCategoryProvider, public aws: AwsServiceProvider,
|
||||||
public toast: ToastProvider,public constant:ConstantsProvider,private cameraProvider:CameraProvider,
|
public toast: ToastProvider,public constant:ConstantsProvider,private cameraProvider:CameraProvider,
|
||||||
private loading:LoadingProvider,public storagedb:StorageProvider) {
|
private loading:LoadingProvider,public storagedb:StorageProvider,private modalCtrl:ModalController) {
|
||||||
|
|
||||||
|
this.loading.dataLoader();
|
||||||
this.FormId = this.navParams.get('FormId');
|
this.FormId = this.navParams.get('FormId');
|
||||||
this.pdDetails = this.navParams.get('pdDetails');
|
this.pdDetails = this.navParams.get('pdDetails');
|
||||||
// console.log("pd",this.pdDetails);
|
// console.log("pd",this.pdDetails);
|
||||||
@ -247,6 +252,17 @@ export class PdQuestionLoansPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
tabChange(){
|
||||||
|
if(this.tab == '2'){
|
||||||
|
const modalOption:ModalOptions={
|
||||||
|
cssClass:'officerNotesModal'
|
||||||
|
}
|
||||||
|
let records:any={pd_id:this.pdDetails.pd_id,pd_qc_note:this.pdDetails.pd_qc_note,fk_updatedby:this.pdDetails.fk_updatedby,random_string:this.pdDetails.random_string}
|
||||||
|
const modalCtrl=this.modalCtrl.create(OfficerNotesModalPage,{'values':records},modalOption)
|
||||||
|
modalCtrl.present();
|
||||||
|
this.tab='0';
|
||||||
|
}
|
||||||
|
}
|
||||||
addControlAddress(value){
|
addControlAddress(value){
|
||||||
this.loanDetailsForm.addControl('property_seller',new FormControl(value != '' ? value.property_seller : ''))
|
this.loanDetailsForm.addControl('property_seller',new FormControl(value != '' ? value.property_seller : ''))
|
||||||
this.loanDetailsForm.addControl('address',new FormControl(value != '' ? value.address :''))
|
this.loanDetailsForm.addControl('address',new FormControl(value != '' ? value.address :''))
|
||||||
@ -369,6 +385,7 @@ export class PdQuestionLoansPage {
|
|||||||
this.qustCat.getcommondrop('MORTAGEPROPERTIES').subscribe(
|
this.qustCat.getcommondrop('MORTAGEPROPERTIES').subscribe(
|
||||||
data => {
|
data => {
|
||||||
if(data['dataStatus']==true){
|
if(data['dataStatus']==true){
|
||||||
|
this.original_mortageTypeProperty=data['records'];
|
||||||
console.log('data[records]',data['records']);
|
console.log('data[records]',data['records']);
|
||||||
let that = this;
|
let that = this;
|
||||||
this.m_mortageTypeProperty = data['records'].filter(
|
this.m_mortageTypeProperty = data['records'].filter(
|
||||||
@ -382,7 +399,7 @@ export class PdQuestionLoansPage {
|
|||||||
if (data.group_name == that.productAbbr && data.sub_group_name == that.subProductName && data.isactive == 1) {
|
if (data.group_name == that.productAbbr && data.sub_group_name == that.subProductName && data.isactive == 1) {
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
else if (data.group_name == that.pdDetails.product_abbr && data.sub_group_name == null && data.isactive == 1) {
|
else if (data.group_name == that.pdDetails.product_abbr && data.sub_group_name == null || data.sub_group_name == '' && data.isactive == 1) {
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -531,6 +548,31 @@ export class PdQuestionLoansPage {
|
|||||||
data => {
|
data => {
|
||||||
this.m_endUseForLoan = data['records'].filter(data => data.isactive == 1);
|
this.m_endUseForLoan = data['records'].filter(data => data.isactive == 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
ChangeProperty(subproduct_id){
|
||||||
|
if(subproduct_id){
|
||||||
|
let that = this;
|
||||||
|
console.log("su",this.m_endUseofLoad);
|
||||||
|
this.subProductName=this.m_endUseofLoad.filter(val=>val.subproduct_id == subproduct_id).map(res=>res.name)[0]
|
||||||
|
console.log("sub",this.subProductName);
|
||||||
|
this.m_mortageTypeProperty = this.original_mortageTypeProperty.filter(
|
||||||
|
function (data) {
|
||||||
|
if (that.pdDetails.product_abbr != "LAP") {
|
||||||
|
if (data.group_name == that.pdDetails.product_abbr && data.isactive == 1) {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (that.pdDetails.product_abbr == "LAP") {
|
||||||
|
if (data.group_name == that.productAbbr && data.sub_group_name == that.subProductName && data.isactive == 1) {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
else if (data.group_name == that.pdDetails.product_abbr && data.sub_group_name == null || data.sub_group_name == '' && data.isactive == 1) {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
endUserChange(event) {
|
endUserChange(event) {
|
||||||
@ -713,6 +755,7 @@ export class PdQuestionLoansPage {
|
|||||||
records.emv_per_customer = this.loanDetailsForm.controls['emv_per_customer'].value;
|
records.emv_per_customer = this.loanDetailsForm.controls['emv_per_customer'].value;
|
||||||
//records.value_per_agreement = this.loanDetailsForm.controls['value_per_agreement'].value;
|
//records.value_per_agreement = this.loanDetailsForm.controls['value_per_agreement'].value;
|
||||||
records.loandetails_remarks = this.loanDetailsForm.controls['loandetails_remarks'].value;
|
records.loandetails_remarks = this.loanDetailsForm.controls['loandetails_remarks'].value;
|
||||||
|
this.spinner_access=true
|
||||||
this.qustCat.saveForm(records).subscribe(data => {
|
this.qustCat.saveForm(records).subscribe(data => {
|
||||||
if(data['dataStatus']== true){
|
if(data['dataStatus']== true){
|
||||||
//TO CHANGE THE FORM STATE
|
//TO CHANGE THE FORM STATE
|
||||||
@ -720,13 +763,18 @@ export class PdQuestionLoansPage {
|
|||||||
this.loanDetailsForm.reset(this.loanDetailsForm.value);
|
this.loanDetailsForm.reset(this.loanDetailsForm.value);
|
||||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
this.spinner_access=false
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
},2000);
|
},2000);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.toast.pdTriggerappmessage('Error');
|
this.spinner_access=false;
|
||||||
|
this.toast.pdTriggerappmessage('Something went wrong');
|
||||||
}
|
}
|
||||||
// this.notifier.notify('success', 'Saved Successfully.');
|
// this.notifier.notify('success', 'Saved Successfully.');
|
||||||
|
},err=>{
|
||||||
|
this.spinner_access=false;
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
})
|
})
|
||||||
// }else
|
// }else
|
||||||
// {
|
// {
|
||||||
@ -889,6 +937,10 @@ export class PdQuestionLoansPage {
|
|||||||
// this.owner_name_placeholder='Name of the Proposed Owner'
|
// this.owner_name_placeholder='Name of the Proposed Owner'
|
||||||
|
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
})
|
})
|
||||||
if(this.productAbbr == 'BL' || this.productAbbr == 'PL' || this.productAbbr == 'LL' || this.productAbbr == 'LAEP'){
|
if(this.productAbbr == 'BL' || this.productAbbr == 'PL' || this.productAbbr == 'LL' || this.productAbbr == 'LAEP'){
|
||||||
this.mortageCardAccess = false;
|
this.mortageCardAccess = false;
|
||||||
@ -985,8 +1037,12 @@ export class PdQuestionLoansPage {
|
|||||||
this.getPDImages();
|
this.getPDImages();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.toast.pdTriggerappmessage('Fail');
|
this.toast.pdTriggerappmessage('Something went wrong');
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
this.toast.pdTriggerappmessage("Network Error")
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,18 +11,22 @@
|
|||||||
<a (click)="capture()">
|
<a (click)="capture()">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
<a (click)="submitData(neighbourhoodForm.value)" *ngIf="!complete_status">
|
<a (click)="submitData(neighbourhoodForm.value)" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
<ion-segment [(ngModel)]="tab" color="optblue" (click)="tabChange()">
|
||||||
<ion-segment-button value="0">
|
<ion-segment-button value="0">
|
||||||
Form
|
Form
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
<ion-segment-button value="1">
|
<ion-segment-button value="1">
|
||||||
Pictures
|
Pictures
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value ="2">
|
||||||
|
Notes
|
||||||
|
</ion-segment-button>
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
import { IonicPage, NavController, NavParams, ModalController, ModalOptions } from 'ionic-angular';
|
||||||
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
||||||
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
||||||
import { ToastProvider } from '../../../providers/common-provider/toast';
|
import { ToastProvider } from '../../../providers/common-provider/toast';
|
||||||
@ -7,6 +7,7 @@ import { FormGroup, FormBuilder,FormArray,Validators,FormControl} from '@angular
|
|||||||
import { ConstantsProvider } from '../../../providers/constants/constants'
|
import { ConstantsProvider } from '../../../providers/constants/constants'
|
||||||
import {CameraProvider} from '../../../providers/common-provider/camera'
|
import {CameraProvider} from '../../../providers/common-provider/camera'
|
||||||
import {LoadingProvider} from '../../../providers/common-provider/loading'
|
import {LoadingProvider} from '../../../providers/common-provider/loading'
|
||||||
|
import { OfficerNotesModalPage } from '../../officer-notes-modal/officer-notes-modal';
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionNeighbourHoodPage page.
|
* Generated class for the PdQuestionNeighbourHoodPage page.
|
||||||
*
|
*
|
||||||
@ -43,12 +44,15 @@ export class PdQuestionNeighbourHoodPage {
|
|||||||
imageBucket: any=[];
|
imageBucket: any=[];
|
||||||
tab: any='0';
|
tab: any='0';
|
||||||
complete_status: boolean = false;
|
complete_status: boolean = false;
|
||||||
|
spinner_access:boolean=false;
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,
|
constructor(public navCtrl: NavController, public navParams: NavParams,
|
||||||
public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,
|
public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,
|
||||||
public toast:ToastProvider,public fb:FormBuilder,
|
public toast:ToastProvider,public fb:FormBuilder,
|
||||||
public constant: ConstantsProvider,private cameraProvider:CameraProvider,private loading:LoadingProvider)
|
public constant: ConstantsProvider,private cameraProvider:CameraProvider,
|
||||||
|
private loading:LoadingProvider,private modalCtrl:ModalController)
|
||||||
{
|
{
|
||||||
|
this.loading.dataLoader();
|
||||||
this.pdDetails = this.navParams.get('pdDetails');
|
this.pdDetails = this.navParams.get('pdDetails');
|
||||||
this.FormId = this.navParams.get('FormId');
|
this.FormId = this.navParams.get('FormId');
|
||||||
this.applicants = this.pdDetails.applicat_details;
|
this.applicants = this.pdDetails.applicat_details;
|
||||||
@ -139,7 +143,17 @@ export class PdQuestionNeighbourHoodPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
tabChange(){
|
||||||
|
if(this.tab == '2'){
|
||||||
|
const modalOption:ModalOptions={
|
||||||
|
cssClass:'officerNotesModal'
|
||||||
|
}
|
||||||
|
let records:any={pd_id:this.pdDetails.pd_id,pd_qc_note:this.pdDetails.pd_qc_note,fk_updatedby:this.pdDetails.fk_updatedby,random_string:this.pdDetails.random_string}
|
||||||
|
const modalCtrl=this.modalCtrl.create(OfficerNotesModalPage,{'values':records},modalOption)
|
||||||
|
modalCtrl.present();
|
||||||
|
this.tab='0';
|
||||||
|
}
|
||||||
|
}
|
||||||
getdropdown()
|
getdropdown()
|
||||||
{
|
{
|
||||||
this.qustCat.getcommondrop('RELATIONWITHBUSINESS').subscribe(res=>
|
this.qustCat.getcommondrop('RELATIONWITHBUSINESS').subscribe(res=>
|
||||||
@ -463,7 +477,7 @@ ChdCtrls.controls.other_organisation_owner.updateValueAndValidity();
|
|||||||
saveRecords.fk_createdby = this.users;
|
saveRecords.fk_createdby = this.users;
|
||||||
saveRecords.neighbourhood_status=answerData.neighbourhood_status
|
saveRecords.neighbourhood_status=answerData.neighbourhood_status
|
||||||
saveRecords.neighbour_reference_remark=answerData.neighbour_reference_remark;
|
saveRecords.neighbour_reference_remark=answerData.neighbour_reference_remark;
|
||||||
|
this.spinner_access=true
|
||||||
this.qustCat.saveForm(saveRecords).subscribe(res=>
|
this.qustCat.saveForm(saveRecords).subscribe(res=>
|
||||||
{
|
{
|
||||||
if(res['dataStatus']==true)
|
if(res['dataStatus']==true)
|
||||||
@ -472,9 +486,17 @@ ChdCtrls.controls.other_organisation_owner.updateValueAndValidity();
|
|||||||
this.neighbourhoodForm.reset(this.neighbourhoodForm.value);
|
this.neighbourhoodForm.reset(this.neighbourhoodForm.value);
|
||||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
this.spinner_access=false
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
},2000);
|
},2000);
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
this.spinner_access=false;
|
||||||
|
this.toast.pdTriggerappmessage("Something went wrong");
|
||||||
|
}
|
||||||
|
},err=>{
|
||||||
|
this.spinner_access=false;
|
||||||
|
this.toast.pdTriggerappmessage("Network Error")
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -551,6 +573,10 @@ ChdCtrls.controls.other_organisation_owner.updateValueAndValidity();
|
|||||||
this.addneighbourhood();
|
this.addneighbourhood();
|
||||||
this.addreferance();
|
this.addreferance();
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
this.toast.pdTriggerappmessage("Something went wrong");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -634,8 +660,12 @@ ChdCtrls.controls.other_organisation_owner.updateValueAndValidity();
|
|||||||
this.getPDImages();
|
this.getPDImages();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.toast.pdTriggerappmessage('Fail');
|
this.loading.dismissLoader();
|
||||||
|
this.toast.pdTriggerappmessage('Something went wrong');
|
||||||
}
|
}
|
||||||
|
},err=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -9,19 +9,23 @@
|
|||||||
<a (click)="capture()">
|
<a (click)="capture()">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
<a (click)="submitOtherIncome(otherIncomeForm.value)" *ngIf="!complete_status">
|
<a (click)="submitOtherIncome(otherIncomeForm.value)" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
|
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
<ion-segment [(ngModel)]="tab" color="optblue" (click)="tabChange()">
|
||||||
<ion-segment-button value="0">
|
<ion-segment-button value="0">
|
||||||
Form
|
Form
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
<ion-segment-button value="1">
|
<ion-segment-button value="1">
|
||||||
Pictures
|
Pictures
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value ="2">
|
||||||
|
Notes
|
||||||
|
</ion-segment-button>
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import {CameraProvider} from '../../../providers/common-provider/camera'
|
|||||||
import {LoadingProvider} from '../../../providers/common-provider/loading'
|
import {LoadingProvider} from '../../../providers/common-provider/loading'
|
||||||
import { PdtriggerProvider } from '../../../providers/pdtrigger/pdtrigger';
|
import { PdtriggerProvider } from '../../../providers/pdtrigger/pdtrigger';
|
||||||
import {FormCompleteCheckModalPage} from '../../form-complete-check-modal/form-complete-check-modal'
|
import {FormCompleteCheckModalPage} from '../../form-complete-check-modal/form-complete-check-modal'
|
||||||
|
import { OfficerNotesModalPage } from '../../officer-notes-modal/officer-notes-modal';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionOtherIncomePage page.
|
* Generated class for the PdQuestionOtherIncomePage page.
|
||||||
@ -47,12 +48,15 @@ export class PdQuestionOtherIncomePage {
|
|||||||
imageBucket: any=[];
|
imageBucket: any=[];
|
||||||
tab: any='0';
|
tab: any='0';
|
||||||
complete_status: boolean = false;
|
complete_status: boolean = false;
|
||||||
|
spinner_access:boolean=false;
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,
|
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,
|
||||||
public qustCat:QuestionCategoryProvider,public aws:AwsServiceProvider,
|
public qustCat:QuestionCategoryProvider,public aws:AwsServiceProvider,
|
||||||
public toast:ToastProvider, public constant:ConstantsProvider,private cameraProvider:CameraProvider,
|
public toast:ToastProvider, public constant:ConstantsProvider,private cameraProvider:CameraProvider,
|
||||||
private loading:LoadingProvider,public alertCtrl:AlertController,private pdstatusprovide:PdtriggerProvider,private modalCtrl:ModalController)
|
private loading:LoadingProvider,public alertCtrl:AlertController,
|
||||||
|
private pdstatusprovide:PdtriggerProvider,private modalCtrl:ModalController)
|
||||||
{
|
{
|
||||||
|
this.loading.dataLoader();
|
||||||
this.pdDetails = this.navParams.get('pdDetails');
|
this.pdDetails = this.navParams.get('pdDetails');
|
||||||
this.pdid=this.pdDetails.pd_id;
|
this.pdid=this.pdDetails.pd_id;
|
||||||
this.FormId = this.navParams.get('FormId');
|
this.FormId = this.navParams.get('FormId');
|
||||||
@ -155,6 +159,17 @@ export class PdQuestionOtherIncomePage {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tabChange(){
|
||||||
|
if(this.tab == '2'){
|
||||||
|
const modalOption:ModalOptions={
|
||||||
|
cssClass:'officerNotesModal'
|
||||||
|
}
|
||||||
|
let records:any={pd_id:this.pdDetails.pd_id,pd_qc_note:this.pdDetails.pd_qc_note,fk_updatedby:this.pdDetails.fk_updatedby,random_string:this.pdDetails.random_string}
|
||||||
|
const modalCtrl=this.modalCtrl.create(OfficerNotesModalPage,{'values':records},modalOption)
|
||||||
|
modalCtrl.present();
|
||||||
|
this.tab='0';
|
||||||
|
}
|
||||||
|
}
|
||||||
createDetail():FormGroup {
|
createDetail():FormGroup {
|
||||||
return this.fb.group({
|
return this.fb.group({
|
||||||
source: [''],
|
source: [''],
|
||||||
@ -381,12 +396,13 @@ submitOtherIncome(answerData)
|
|||||||
}
|
}
|
||||||
|
|
||||||
callSaveApi(records){
|
callSaveApi(records){
|
||||||
|
this.spinner_access=true;
|
||||||
this.qustCat.saveForm(records).subscribe(data => {
|
this.qustCat.saveForm(records).subscribe(data => {
|
||||||
//TO CHANGE THE FORM STATE
|
//TO CHANGE THE FORM STATE
|
||||||
this.otherIncomeForm.reset(this.otherIncomeForm.value);
|
this.otherIncomeForm.reset(this.otherIncomeForm.value);
|
||||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
|
||||||
// this.navCtrl.pop();
|
// this.navCtrl.pop();
|
||||||
this.pdstatusprovide.pdFormsCompletenessCheck(this.pdDetails.pd_id).subscribe(res=>{
|
this.pdstatusprovide.pdFormsCompletenessCheck(this.pdDetails.pd_id).subscribe(res=>{
|
||||||
console.log(res['records']);
|
console.log(res['records']);
|
||||||
@ -408,10 +424,12 @@ callSaveApi(records){
|
|||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.spinner_access=false
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
},2000);
|
},2000);
|
||||||
}, error => {
|
}, error => {
|
||||||
|
this.spinner_access=false;
|
||||||
|
this.toast.pdTriggerappmessage("Network Error")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -461,6 +479,10 @@ getOtherIncome()
|
|||||||
else{
|
else{
|
||||||
// this.incomeDetails.push(this.createDetail())
|
// this.incomeDetails.push(this.createDetail())
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -544,8 +566,12 @@ this.tab='1';
|
|||||||
this.getPDImages();
|
this.getPDImages();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.toast.pdTriggerappmessage('Fail');
|
this.toast.pdTriggerappmessage('Something went wrong');
|
||||||
}
|
}
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
this.toast.pdTriggerappmessage("Network Error")
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
|||||||
import{QuestionCategoryProvider} from '../../../../providers/question-category/question-category'
|
import{QuestionCategoryProvider} from '../../../../providers/question-category/question-category'
|
||||||
import {RupeeCurrencyFormatPipe} from '../../../../pipes/rupee-currency-format/rupee-currency-format'
|
import {RupeeCurrencyFormatPipe} from '../../../../pipes/rupee-currency-format/rupee-currency-format'
|
||||||
import {PdQuestionRentalInfoPage} from '../pd-question-rental-info'
|
import {PdQuestionRentalInfoPage} from '../pd-question-rental-info'
|
||||||
|
import { LoadingProvider } from '../../../../providers/common-provider/loading';
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionRentalDashPage page.
|
* Generated class for the PdQuestionRentalDashPage page.
|
||||||
*
|
*
|
||||||
@ -22,7 +23,9 @@ export class PdQuestionRentalDashPage {
|
|||||||
pageTitle:any
|
pageTitle:any
|
||||||
existing_rental_count_id: number=0;
|
existing_rental_count_id: number=0;
|
||||||
existing_rental_list: any=[];
|
existing_rental_list: any=[];
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,private qustCat:QuestionCategoryProvider) {
|
constructor(public navCtrl: NavController, public navParams: NavParams,private qustCat:QuestionCategoryProvider,private loadingProvider:LoadingProvider) {
|
||||||
|
|
||||||
|
this.loadingProvider.dataLoader();
|
||||||
this.pdDetails=this.navParams.get('pdDetails');
|
this.pdDetails=this.navParams.get('pdDetails');
|
||||||
this.form_details=this.navParams.get('FormId');
|
this.form_details=this.navParams.get('FormId');
|
||||||
console.log(this.form_details);
|
console.log(this.form_details);
|
||||||
@ -96,8 +99,11 @@ export class PdQuestionRentalDashPage {
|
|||||||
this.existing_rental_count_id=0
|
this.existing_rental_count_id=0
|
||||||
// this.addMore();
|
// this.addMore();
|
||||||
}
|
}
|
||||||
|
this.loadingProvider.dismissLoader();
|
||||||
|
},err=>{
|
||||||
|
this.loadingProvider.dismissLoader();
|
||||||
})
|
})
|
||||||
console.log("ren",this.existing_rental_list);
|
|
||||||
}
|
}
|
||||||
editDet(values){
|
editDet(values){
|
||||||
let passValues: any = {
|
let passValues: any = {
|
||||||
|
|||||||
@ -8,18 +8,22 @@
|
|||||||
<!-- <a (click)="capture()">
|
<!-- <a (click)="capture()">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:25px;"><ion-icon name="md-camera"></ion-icon></span>
|
||||||
</a> -->
|
</a> -->
|
||||||
<a (click)="saveAlert(rentalForms.value)" *ngIf="!complete_status">
|
<a (click)="saveAlert(rentalForms.value)" *ngIf="!complete_status && !spinner_access">
|
||||||
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
<span style="padding: 0px;margin-right: 14px;color:white;font-size:20px;"><ion-icon name="fn-save"></ion-icon></span>
|
||||||
</a>
|
</a>
|
||||||
|
<ion-spinner color="light" name="circles" *ngIf="spinner_access"></ion-spinner>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
<ion-segment [(ngModel)]="tab" color="optblue">
|
<ion-segment [(ngModel)]="tab" color="optblue" (click)="tabChange()">
|
||||||
<ion-segment-button value="0">
|
<ion-segment-button value="0">
|
||||||
Form
|
Form
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
<ion-segment-button value="1">
|
<ion-segment-button value="1">
|
||||||
Pictures
|
Pictures
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value ="2">
|
||||||
|
Notes
|
||||||
|
</ion-segment-button>
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,17 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { IonicPage, NavController, NavParams ,AlertController} from 'ionic-angular';
|
import { NavController, NavParams ,AlertController, ModalController, ModalOptions} from 'ionic-angular';
|
||||||
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
|
||||||
import { ToastProvider } from '../../../providers/common-provider/toast';
|
import { ToastProvider } from '../../../providers/common-provider/toast';
|
||||||
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
|
||||||
import { FormGroup, FormBuilder, FormArray, Validators, FormControl } from '@angular/forms';
|
import { FormGroup, FormBuilder, FormArray, Validators, FormControl } from '@angular/forms';
|
||||||
import {ConstantsProvider} from '../../../providers/constants/constants';
|
import {ConstantsProvider} from '../../../providers/constants/constants';
|
||||||
import {DatePipe} from '@angular/common'
|
import {DatePipe} from '@angular/common'
|
||||||
import { Message } from '@angular/compiler/src/i18n/i18n_ast';
|
// import { Message } from '@angular/compiler/src/i18n/i18n_ast';
|
||||||
import {LoadingProvider} from '../../../providers/common-provider/loading'
|
import {LoadingProvider} from '../../../providers/common-provider/loading'
|
||||||
import {CameraProvider} from '../../../providers/common-provider/camera'
|
import {CameraProvider} from '../../../providers/common-provider/camera'
|
||||||
import { takeUntil } from 'rxjs/operators';
|
import { takeUntil } from 'rxjs/operators';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
|
import { OfficerNotesModalPage } from '../../officer-notes-modal/officer-notes-modal';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generated class for the PdQuestionRentalInfoPage page.
|
* Generated class for the PdQuestionRentalInfoPage page.
|
||||||
@ -74,13 +75,17 @@ export class PdQuestionRentalInfoPage {
|
|||||||
pageTitle: string;
|
pageTitle: string;
|
||||||
data:any;
|
data:any;
|
||||||
complete_status: boolean = false;
|
complete_status: boolean = false;
|
||||||
|
spinner_access:boolean=false;
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,
|
constructor(public navCtrl: NavController, public navParams: NavParams,
|
||||||
public aws:AwsServiceProvider,public toast:ToastProvider,
|
public aws:AwsServiceProvider,public toast:ToastProvider,
|
||||||
public qustCat:QuestionCategoryProvider,public fb:FormBuilder,
|
public qustCat:QuestionCategoryProvider,public fb:FormBuilder,
|
||||||
public constprovider:ConstantsProvider,public alertCtrl:AlertController,
|
public constprovider:ConstantsProvider,public alertCtrl:AlertController,
|
||||||
private loading:LoadingProvider,private cameraProvider:CameraProvider)
|
private loading:LoadingProvider,private cameraProvider:CameraProvider,private modalCtrl:ModalController)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
this.loading.dataLoader();
|
||||||
|
|
||||||
this.data=this.navParams.get('values'); // for get the data from dash page
|
this.data=this.navParams.get('values'); // for get the data from dash page
|
||||||
console.log("From Dashboard of Rental - values are ",this.data);
|
console.log("From Dashboard of Rental - values are ",this.data);
|
||||||
this.pageTitle = this.data.manage_status==1 ? 'Add RI Details' : 'Update RI Details';
|
this.pageTitle = this.data.manage_status==1 ? 'Add RI Details' : 'Update RI Details';
|
||||||
@ -274,6 +279,17 @@ this.complete_status = this.pdDetails.pd_status == 'COMPLETED' ? true : false;
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
tabChange(){
|
||||||
|
if(this.tab == '2'){
|
||||||
|
const modalOption:ModalOptions={
|
||||||
|
cssClass:'officerNotesModal'
|
||||||
|
}
|
||||||
|
let records:any={pd_id:this.pdDetails.pd_id,pd_qc_note:this.pdDetails.pd_qc_note,fk_updatedby:this.pdDetails.fk_updatedby,random_string:this.pdDetails.random_string}
|
||||||
|
const modalCtrl=this.modalCtrl.create(OfficerNotesModalPage,{'values':records},modalOption)
|
||||||
|
modalCtrl.present();
|
||||||
|
this.tab='0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
getdropList()
|
getdropList()
|
||||||
{
|
{
|
||||||
@ -1045,7 +1061,7 @@ compareSingleObjects(o1: any, o2: any) {
|
|||||||
answerData.fk_createdby = this.users;
|
answerData.fk_createdby = this.users;
|
||||||
|
|
||||||
console.log('answerData',answerData);
|
console.log('answerData',answerData);
|
||||||
|
this.spinner_access=true;
|
||||||
this.qustCat.saveForm(answerData).subscribe(res=>
|
this.qustCat.saveForm(answerData).subscribe(res=>
|
||||||
{
|
{
|
||||||
if(res['dataStatus']==true)
|
if(res['dataStatus']==true)
|
||||||
@ -1054,9 +1070,17 @@ compareSingleObjects(o1: any, o2: any) {
|
|||||||
this.rentalForms.reset(this.rentalForms.value);
|
this.rentalForms.reset(this.rentalForms.value);
|
||||||
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
this.toast.pdTriggerappmessage('Record Saved Successfully.!');
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
this.spinner_access=false
|
||||||
this.navCtrl.pop();
|
this.navCtrl.pop();
|
||||||
},2000);
|
},2000);
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
this.spinner_access=false;
|
||||||
|
this.toast.pdTriggerappmessage("Something went wrong");
|
||||||
|
}
|
||||||
|
},err=>{
|
||||||
|
this.spinner_access=false;
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1098,7 +1122,7 @@ compareSingleObjects(o1: any, o2: any) {
|
|||||||
getRentalDetails()
|
getRentalDetails()
|
||||||
{
|
{
|
||||||
|
|
||||||
let records = { 'parent_pdid':this.pdDetails.parent_pd_id,'pd_id': this.pdDetails.pd_id, 'pd_form_id': this.FormId.form_id };
|
// let records = { 'parent_pdid':this.pdDetails.parent_pd_id,'pd_id': this.pdDetails.pd_id, 'pd_form_id': this.FormId.form_id };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1301,6 +1325,7 @@ compareSingleObjects(o1: any, o2: any) {
|
|||||||
// // this.addTenantsDetails(0);
|
// // this.addTenantsDetails(0);
|
||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
|
this.loading.dismissLoader();
|
||||||
}
|
}
|
||||||
// createTenantsDetailswithData(index,data)
|
// createTenantsDetailswithData(index,data)
|
||||||
// {
|
// {
|
||||||
@ -1559,8 +1584,6 @@ this.tab='1';
|
|||||||
'images':this.imageBucket,
|
'images':this.imageBucket,
|
||||||
'company_id':'',
|
'company_id':'',
|
||||||
'rental_count_id':this.data.existing_rental_count_id,
|
'rental_count_id':this.data.existing_rental_count_id,
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
console.log("records",JSON.stringify(records))
|
console.log("records",JSON.stringify(records))
|
||||||
|
|
||||||
@ -1574,8 +1597,12 @@ this.tab='1';
|
|||||||
console.log("savepd",records)
|
console.log("savepd",records)
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.toast.pdTriggerappmessage('Fail');
|
this.loading.dismissLoader();
|
||||||
|
this.toast.pdTriggerappmessage('Something went wrong');
|
||||||
}
|
}
|
||||||
|
},err=>{
|
||||||
|
this.loading.dismissLoader();
|
||||||
|
this.toast.pdTriggerappmessage("Network Error");
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,22 +14,39 @@ export class LoadingProvider {
|
|||||||
loading: any;
|
loading: any;
|
||||||
constructor(public http: HttpClient,public loadingCtrl:LoadingController) {
|
constructor(public http: HttpClient,public loadingCtrl:LoadingController) {
|
||||||
console.log('Hello LoadingProvider Provider');
|
console.log('Hello LoadingProvider Provider');
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.dismissLoader()
|
||||||
|
},20000)
|
||||||
}
|
}
|
||||||
|
|
||||||
pdloader(content)
|
pdloader(content)
|
||||||
{
|
{
|
||||||
this.loading = this.loadingCtrl.create({
|
this.loading = this.loadingCtrl.create({
|
||||||
content: content
|
content: content,
|
||||||
|
enableBackdropDismiss:true
|
||||||
});
|
});
|
||||||
|
|
||||||
this.loading.present();
|
this.loading.present();
|
||||||
}
|
}
|
||||||
loaderForSendImage(){
|
loaderForSendImage(){
|
||||||
const loading=this.loadingCtrl.create({
|
this.loading=this.loadingCtrl.create({
|
||||||
content:'Sending...',
|
content:'Sending...',
|
||||||
duration:2000,
|
enableBackdropDismiss:true,
|
||||||
|
// duration:2000,
|
||||||
|
duration:20000
|
||||||
})
|
})
|
||||||
return loading.present();
|
return this.loading.present();
|
||||||
|
}
|
||||||
|
dataLoader(){
|
||||||
|
this.loading=this.loadingCtrl.create({
|
||||||
|
content:"Fetching Data...",
|
||||||
|
enableBackdropDismiss:true,
|
||||||
|
duration:20000
|
||||||
|
})
|
||||||
|
this.loading.present();
|
||||||
|
}
|
||||||
|
dismissLoader(){
|
||||||
|
this.loading.dismiss()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { Injectable } from '@angular/core';
|
|||||||
import {Geolocation} from '@ionic-native/geolocation'
|
import {Geolocation} from '@ionic-native/geolocation'
|
||||||
import { LocationAccuracy } from '@ionic-native/location-accuracy';
|
import { LocationAccuracy } from '@ionic-native/location-accuracy';
|
||||||
// import {C} from '../../constants'
|
// import {C} from '../../constants'
|
||||||
import {environment as ENV} from '../../environments/environment'
|
// import {environment as ENV} from '../../environments/environment'
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -21,10 +21,10 @@ public commonimage = "http://pdgenie.com/logo/avatar.jpg";
|
|||||||
|
|
||||||
apiurl()
|
apiurl()
|
||||||
{
|
{
|
||||||
let testapiurl = 'https://ssa.sineedge.com/sparqtest/api/';
|
// let testapiurl = 'https://ssa.sineedge.com/sparqtest/api/';
|
||||||
let testapiurl_beta='http://ssa.sineedge.com/sparqtest_beta/api/';
|
// let testapiurl_beta='http://ssa.sineedge.com/sparqtest_beta/api/';
|
||||||
let devapiurl_beta = 'http://ssa.sineedge.com/sparqapi_beta/api/';
|
// let devapiurl_beta = 'http://ssa.sineedge.com/sparqapi_beta/api/';
|
||||||
let devapiurl = 'https://ssa.sineedge.com/sparqapi/api/';
|
// let devapiurl = 'https://ssa.sineedge.com/sparqapi/api/';
|
||||||
let localapiurl = 'http://192.168.0.6:9999/AWSEC2/sparqapi/api/';
|
let localapiurl = 'http://192.168.0.6:9999/AWSEC2/sparqapi/api/';
|
||||||
let sparqprod= 'https://pdgenie.com/sparqprod/'
|
let sparqprod= 'https://pdgenie.com/sparqprod/'
|
||||||
let demo='https://demo.pdgenie.com/sparqtest/api/'
|
let demo='https://demo.pdgenie.com/sparqtest/api/'
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import {ConstantsProvider} from '../constants/constants';
|
import {ConstantsProvider} from '../constants/constants';
|
||||||
|
import { errorHandler } from '@angular/platform-browser/src/browser';
|
||||||
|
import { catchError } from 'rxjs/operators';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Generated class for the PdtriggerProvider provider.
|
Generated class for the PdtriggerProvider provider.
|
||||||
@ -49,7 +51,7 @@ export class PdtriggerProvider {
|
|||||||
|
|
||||||
saveCurrentLocation(data)
|
saveCurrentLocation(data)
|
||||||
{
|
{
|
||||||
let records = {'records':data};
|
// let records = {'records':data};
|
||||||
return this.http.post(this.apiurl+'savePDOfficerCurrentLocation',data);
|
return this.http.post(this.apiurl+'savePDOfficerCurrentLocation',data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,4 +71,10 @@ export class PdtriggerProvider {
|
|||||||
updateNotificationToken(value){
|
updateNotificationToken(value){
|
||||||
return this.http.post(this.apiurl+'updateNotificationToken',{'records':value})
|
return this.http.post(this.apiurl+'updateNotificationToken',{'records':value})
|
||||||
}
|
}
|
||||||
|
savePDRemark(values){
|
||||||
|
return this.http.post(this.apiurl+'savePDRemark',values);
|
||||||
|
}
|
||||||
|
getQCLenderRemarks(values){
|
||||||
|
return this.http.post(this.apiurl+'getQCLenderRemarks',{records:{'pd_id':values.pd_id,'flag':values.flag}})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,4 +74,26 @@ retrieveLocalStorage(data){
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
getItem(storage_key){
|
||||||
|
return this.storage.get(storage_key).then(res=>{
|
||||||
|
return res;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
setItem(data,storage_key){
|
||||||
|
// this.getItem(storage_key).then(old_data=>{
|
||||||
|
// let value
|
||||||
|
// if(old_data){
|
||||||
|
// value=old_data+data
|
||||||
|
// }
|
||||||
|
// else{
|
||||||
|
// value=data
|
||||||
|
// }
|
||||||
|
// this.storage.set(storage_key,value)
|
||||||
|
// })
|
||||||
|
this.storage.set(storage_key,data);
|
||||||
|
|
||||||
|
}
|
||||||
|
clearItem(storage_key){
|
||||||
|
this.storage.remove(storage_key)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
43
src/theme/officer-notes-modal.scss
Normal file
43
src/theme/officer-notes-modal.scss
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
.officerNotesModal{
|
||||||
|
padding: 4.5%;
|
||||||
|
// padding: 30px;
|
||||||
|
color:red;
|
||||||
|
// filter:blur(5px);
|
||||||
|
//color:lightcyan;
|
||||||
|
// background-color:gray;
|
||||||
|
.modal-wrapper {
|
||||||
|
// border-radius: 7px;
|
||||||
|
// background: rgba(0, 0, 0, 0.5);
|
||||||
|
// color: gray;
|
||||||
|
|
||||||
|
// height: 98% !important;
|
||||||
|
// width:10% !important;
|
||||||
|
// margin-top: 13.5%;
|
||||||
|
margin-top:29%;
|
||||||
|
|
||||||
|
mat-card{
|
||||||
|
// background-color:rgb(252, 252, 161);
|
||||||
|
background-color: lightcyan;
|
||||||
|
border-radius: 20px;
|
||||||
|
height: 68%;
|
||||||
|
}
|
||||||
|
mat-card-title{
|
||||||
|
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
ion-item{
|
||||||
|
// background-color:rgb(252, 252, 161);
|
||||||
|
background-color: lightcyan;
|
||||||
|
}
|
||||||
|
// margin-right: 15%;
|
||||||
|
|
||||||
|
button{
|
||||||
|
font-size: 35px;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,9 +1,6 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" dir="ltr">
|
<html lang="en" dir="ltr">
|
||||||
<head>
|
<head>
|
||||||
<script data-ionic="inject">
|
|
||||||
(function(w){var i=w.Ionic=w.Ionic||{};i.version='3.9.2';i.angular='^5.0.3';i.staticDir='build/';})(window);
|
|
||||||
</script>
|
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Ionic App</title>
|
<title>Ionic App</title>
|
||||||
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user