Fairoj: Camera Features enabled

This commit is contained in:
saravanakumarkandasami 2019-04-10 19:20:58 +05:30
parent 167307bf28
commit 61428f0f38
69 changed files with 2654 additions and 230 deletions

File diff suppressed because one or more lines are too long

View File

@ -59,7 +59,7 @@ questionList:any;
questionCate:any;
questionCateAccess:boolean = null;
questionfinishedList:any =[];
pddetails:any;
pddetails:any=[];
overallqustioncountAccess:boolean = true;
doughnutChart: any;
completedAccess:any;
@ -180,6 +180,7 @@ searchitem:any;
}
}
})
}
random_ng_past()
{
@ -215,7 +216,13 @@ searchitem:any;
tempQustionTag(categroyId)
{
//FOR UPDATING THE PD APPLICANT LIST
this.pdinfo = this.pddetails;
let newData= this.questionCate.pdapplicants_detials
console.log("new Data",newData);
this.pdinfo.applicat_details=newData
console.log(this.pdinfo);
let formName = this.questionCate.template_forms.filter(temp=>temp.form_id==categroyId)[0];
if(categroyId ==5)
{

View File

@ -22,7 +22,7 @@
<mat-card *ngSwitchCase="'1'" #picContent>
<mat-card-content>
<mat-label *ngIf="imageDisplay.length ==0 && imageBucket.length ==0 "><strong>No Documents Found</strong></mat-label>
<mat-label *ngIf="imageDisplay.length ==0 && imageBucket.length ==0 "><strong>No Documents Found. Press the camera button below to capture</strong></mat-label>
<ion-grid *ngIf="imageDisplay.length >0 ">
<ion-row>

View File

@ -14,8 +14,9 @@ page-pd-question-address {
textarea {
resize: none;
}
//FOR IMAGE AND INPUT FIELD
img{
padding:0 5px 5px 5px;
padding:0 5px 0 0;
height: 180px;
//width:130px;
//border:3px solid black;

View File

@ -10,6 +10,7 @@ import {Camera} from '@ionic-native/camera'
import {searchValue} from '../search'
import { takeUntil } from 'rxjs/operators';
import{LoadingProvider} from '../../../providers/common-provider/loading'
/**
* Generated class for the PdQuestionAddressPage page.
*
@ -77,7 +78,10 @@ export class PdQuestionAddressPage {
tab:string='0';
imageDisplay: any=[];
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,public aws:AwsServiceProvider,public toast:ToastProvider,public alerCtrl:AlertController,public constant:ConstantsProvider,public camera:Camera) {
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,
public qustCat:QuestionCategoryProvider,public aws:AwsServiceProvider,
public toast:ToastProvider,public alerCtrl:AlertController,public constant:ConstantsProvider,
public camera:Camera,private loading:LoadingProvider) {
this.questionDetails = this.navParams.get('questionDetails');
@ -138,6 +142,7 @@ export class PdQuestionAddressPage {
//this.addUnits();
console.log("ionViewDidLoad PdQuestionAddressPage")
this.getaddressForm();
this.getPDImages();
}
searchFun(control:any,i:number,option){
@ -269,28 +274,42 @@ countRowsForTextarea(text){
// }
// if(val.__zone_symbol__state)
return new Promise((resolve, reject) => {
let alert=this.alerCtrl.create({
title:'Form is Modified',
message:'Are you sure want to Go Back',
cssClass:'buttoncss',
buttons:[{
text:'Yes',
cssClass:'btnYes',
handler:()=>{
resolve();
}
},
{
text:'No',
cssClass:'btnNo',
handler:()=>{
reject();
}
}]
});
alert.present()
})
// return new Promise((resolve, reject) => {
// let alert=this.alerCtrl.create({
// title:'Form is Modified',
// message:'Are you sure want to Go Back',
// cssClass:'buttoncss',
// buttons:[{
// text:'Yes',
// cssClass:'btnYes',
// handler:()=>{
// resolve();
// }
// },
// {
// text:'No',
// cssClass:'btnNo',
// handler:()=>{
// reject();
// }
// }]
// });
// alert.present()
// })
return new Promise((resolve,reject)=>{
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
alert.present();
alert.onDidDismiss((data)=>{
console.log("d",data);
if(data== false){
reject();
}
else{
resolve();
}
})
})
}
}
@ -800,19 +819,7 @@ countRowsForTextarea(text){
else
this.loadPD();
});
/*FOR RETRIEVING PHOTOS*/
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
if(!val['msg']){
console.log(val['records'])
if(val['records'].length>0){
val['records'].forEach(result=>{
this.imageDisplay.push({'image':result.doc_url,'Name':result.pd_document_title,'option':'dummy'})
})
console.log("imageBuck",this.imageDisplay);
}
}
})
}
loadPD(){
const control=<FormArray>this.pdQuestionAddress.controls['addresses']
@ -854,6 +861,22 @@ countRowsForTextarea(text){
}
})
}
getPDImages(){
//FOR RETRIEVING PICTURES
this.imageDisplay=[]
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
if(!val['msg']){
console.log(val['records'])
if(val['records'].length>0){
val['records'].forEach(result=>{
this.imageDisplay.push({'image':result.doc_url,'Name':result.pd_document_title,'option':'dummy'})
})
console.log("imageBuck",this.imageDisplay);
}
}
})
}
changeName(value,index,img){
console.log(value);
this.imageDisplay[index]={'image':img,'Name':value}
@ -892,29 +915,38 @@ countRowsForTextarea(text){
}
getImageName(index){
console.log("index",index);
let alert=this.alerCtrl.create({
title:'Document Name',
message: 'Please Enter the Document Name',
cssClass:'prompt_alert',
inputs:[
{
name:'Name',
//value:this.imageBucket[index].Name
placeholder:'Document Name'
}
],
buttons:[
{
text:'Submit',
handler:data=>{
console.log(data.Name)
this.imageBucket[index].Name=data.Name
alert.dismiss
}
}
]
let alert =this.toast.setAlertForDocName()
alert.present()
alert.onDidDismiss(value=>{
console.log(value.Name)
this.imageBucket[index].Name=value.Name
})
alert.present();
// let alert=this.alerCtrl.create({
// title:'Document Name',
// message: 'Please Enter the Document Name',
// cssClass:'prompt_alert',
// inputs:[
// {
// name:'Name',
// //value:this.imageBucket[index].Name
// placeholder:'Document Name'
// }
// ],
// buttons:[
// {
// text:'Submit',
// handler:data=>{
// console.log(data.Name)
// this.imageBucket[index].Name=data.Name
// alert.dismiss
// }
// }
// ]
// })
// alert.present();
//this.inputFocus.setFocus();
}
@ -922,6 +954,7 @@ countRowsForTextarea(text){
// this.toast.pdTriggerappmessage("touched");
// }
sendImage(){
this.loading.loaderForSendImage()
console.log("ll",JSON.stringify(this.imageBucket));
let records:any={
'pd_id':this.pdDetails.pd_id,
@ -934,6 +967,8 @@ countRowsForTextarea(text){
this.qustCat.savePDImages(records).subscribe(res=>{
if(res['dataStatus']== true){
this.toast.pdTriggerappmessage("Image Saved Successfully")
this.imageBucket=[]
this.getPDImages();
}
else{
this.toast.pdTriggerappmessage('Fail');

View File

@ -1,3 +1,16 @@
page-pd-question-assessed-business {
.scroll-content {
padding: 16px;
}
.scroll-content{
background-color: #eee;
}
.mat-card{
margin-bottom: 15px;
border-radius: 10px !important;
box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.56), 0 4px 25px 0 rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2) !important;
}
.mat-card-content{
margin-bottom: 0px !important;
}
}

View File

@ -92,7 +92,7 @@ export class PdQuestionAssessedBusinessPage {
let control:any = <FormArray>this.BuissnessForm.controls['busExpense'];
if(values.expense_value!='' && values.fk_frequency_id!='' && values.expense_value!=null && values.fk_frequency_id!=null) {
let filterFrequencyValue: any = this.m_freqOfPurchase.filter(val =>val.frequency_id==values.fk_frequency_id);
control.controls[indexVal].controls['annual_expenses_value'].setValue(parseInt(values.expense_value) * parseInt(filterFrequencyValue[0].mutiple_factor));
control.controls[indexVal].controls['annual_expenses_value'].setValue((parseFloat(values.expense_value) * parseFloat(filterFrequencyValue[0].mutiple_factor)).toFixed(2));
this.inWords(parseInt(values.expense_value) * parseInt(filterFrequencyValue[0].mutiple_factor),indexVal,2)
}

View File

@ -10,7 +10,7 @@
<button ion-button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<ion-title *ngIf="!viewchange">Add Daily Purchase Item</ion-title>
<ion-title *ngIf="!viewchange">Purchase Calculation as per Kutcha Records / Bills</ion-title>
</ion-navbar>
</ion-header>
@ -44,7 +44,7 @@
<mat-form-field>
<input matInput type="number" autocomplete="off" placeholder="Bill Value" formControlName="purchase_value" (keyup)="purchaseCalculation(s,purchase.value);inWords(childItem.value.purchase_value,c)">
</mat-form-field>
<mat-label align="end" style="color:gray;font-size:12px" *ngIf="childItem.value.purchase_value!= ''">{{"&#8377;"}} {{purchaseAmtInWords[c]}} Only</mat-label>
<mat-label float-right style="color:gray;font-size:12px" *ngIf="childItem.value.purchase_value!= ''">{{"&#8377;"}} {{purchaseAmtInWords[c]}} Only</mat-label>
<ion-buttons end>
<ion-col col-3 offset-3 *ngIf="purchase.value.child.length>1">
<button ion-button clear color="optblue" (click)="removeChild(s,c,childItem.value)">

View File

@ -37,7 +37,9 @@ export class PdQuestionAssessedDailyPurchasePage {
private fb:FormBuilder,private quesCat:QuestionCategoryProvider,private toast:ToastProvider,private cons:ConstantsProvider) {
var today=new Date
console.log("today",today)
this.maxDate = today.getFullYear() + '-' + ("0" + (today.getMonth() + 1)) + '-' + ("0" + (today.getDate() ));
let date=today.getDate()< 10 ? ("0"+(today.getDate())) : today.getDate()
let month=today.getMonth() < 10 ? ("0"+(today.getMonth()+1)) : (today.getMonth()+1)
this.maxDate = today.getFullYear() + '-' + month + '-' + date;
console.log("max",this.maxDate)
this.pdDetails=this.navParams.get('pdDetails')
console.log("pd",this.pdDetails)
@ -174,6 +176,7 @@ purchaseCalculation(indexVal: number,values: any): void {
let TotalAnnualValue = transformData.map(val=>val.purchase_value)
.reduce((sum, curr) => parseInt(sum) + parseInt(curr));
// let months:number=12/values.child.length;
control.controls[indexVal].controls['annual_purchase_value'].setValue(TotalAnnualValue);
}
else{
@ -241,8 +244,8 @@ getDailyPurchase(records){
// console.log("calculateItems",calculateItems)
// listItems.push({items:expnadElement, itemsTotal:calculateItems})
const innercontrol=control.at(index).get('child') as FormArray
purchaseChildControlarr[index].forEach(chilVal=>{
chilVal.forEach((val,index)=>{
purchaseChildControlarr[index].forEach((chilVal,childIndex)=>{
chilVal.forEach((val,innerIndex)=>{
if(val.purchase_date ){
let saleDate = new Date(val.purchase_date);
console.log(saleDate.getDay())
@ -256,7 +259,7 @@ getDailyPurchase(records){
console.log( val.purchase_date)
}
if(val.purchase_value != ''){
this.inWords(val.purchase_value,index)
this.inWords(val.purchase_value,childIndex)
}
console.log("child",val)
innercontrol.push(this.createDailyPurchaseWithData(val,element))

View File

@ -4,7 +4,7 @@
<button ion-button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<ion-title *ngIf="!viewchange">Add Daily Sales Item</ion-title>
<ion-title *ngIf="!viewchange"> Sales Calculation as per Kutcha Records / Bills</ion-title>
</ion-navbar>
@ -106,7 +106,7 @@
<mat-card-content>
<div *ngIf="margin_calculation_status">
<mat-form-field style="width: 100%">
<input matInput type="number" placeholder="Magin Percetage %" formControlName="margin_per" name="margin_per" (keyup)="salesCalculation(sale_i,item.value)">
<input matInput type="number" placeholder="Gross Magin %" formControlName="margin_per" name="margin_per" (keyup)="salesCalculation(sale_i,item.value)">
</mat-form-field>
<mat-form-field style="width: 100%">
<input matInput type="number" placeholder="Margin Value" formControlName="margin_value" name="margin_value" readonly>

View File

@ -41,7 +41,9 @@ export class PdQuestionAssessedDailySalesPage {
// this.maxDate=new Date()
var today=new Date
console.log("today",today)
this.maxDate = today.getFullYear() + '-' + ("0" + (today.getMonth() + 1)) + '-' + ("0" + (today.getDate() ));
let date=today.getDate()< 10 ? ("0"+(today.getDate())) : today.getDate()
let month=today.getMonth() < 10 ? ("0"+(today.getMonth()+1)) : (today.getMonth()+1)
this.maxDate = today.getFullYear() + '-' + month + '-' + date;
console.log("max",this.maxDate)
this.pdDetails = this.navParams.get('pdDetails');
this.FormId = this.navParams.get('FormId');
@ -261,10 +263,10 @@ changeOptions(indexVal: any,event: any): void{
return fIndex === fArray.indexOf(fVal);
});
let getTotalValueCounts = transformData.map(val=>val.sales_value)
.reduce((sum, curr) => parseInt(sum) + parseInt(curr));
console.log("value",parseInt(getTotalValueCounts) * (parseInt(values.margin_per)/100) * (12 / parseInt(getUniqueMonthCounts.length)))
.reduce((sum, curr) => parseFloat(sum) + parseFloat(curr));
console.log("value",(parseFloat(getTotalValueCounts) * (parseFloat(values.margin_per)/100) * (12 / parseFloat(getUniqueMonthCounts.length))).toFixed(2))
console.log(control.controls[indexVal])
control.controls[indexVal].controls['margin_value'].setValue(parseInt(getTotalValueCounts) * (parseInt(values.margin_per)/100) * (12 / parseInt(getUniqueMonthCounts.length)));
control.controls[indexVal].controls['margin_value'].setValue((parseFloat(getTotalValueCounts) * (parseFloat(values.margin_per)/100) * (12 / parseFloat(getUniqueMonthCounts.length))).toFixed(2));
this.inWords(parseInt(getTotalValueCounts) * (parseInt(values.margin_per)/100) * (12 / parseInt(getUniqueMonthCounts.length)),indexVal,2)
}
else{
@ -286,11 +288,11 @@ changeOptions(indexVal: any,event: any): void{
if(values.child[values.child.length-1].fk_frequency_id!='' && values.child[values.child.length-1].frequency_value!='' && values.child[values.child.length-1].fk_frequency_id!=null && values.child[values.child.length-1].frequency_value!=null){
let filterFrequencyValue: any = this.frequencyData.filter(val =>val.frequency_id==values.child[values.child.length-1].fk_frequency_id);
innercontrol.controls[innercontrol.value.length-1].controls['sales_value'].setValue(parseInt(filterFrequencyValue[0].mutiple_factor) * parseInt(values.child[values.child.length-1].frequency_value));
innercontrol.controls[innercontrol.value.length-1].controls['sales_value'].setValue((parseFloat(filterFrequencyValue[0].mutiple_factor) * parseFloat(values.child[values.child.length-1].frequency_value)).toFixed(2));
this.inWords(parseInt(filterFrequencyValue[0].mutiple_factor) * parseInt(values.child[values.child.length-1].frequency_value),innercontrol.value.length-1,1)
let getTotalValueCounts =parseInt(filterFrequencyValue[0].mutiple_factor) * parseInt(values.child[values.child.length-1].frequency_value)
values.margin_per!='' ? control.controls[indexVal].controls['margin_value'].setValue( getTotalValueCounts * (parseInt(values.margin_per)/100)) : '';
let getTotalValueCounts =parseFloat(filterFrequencyValue[0].mutiple_factor) * parseFloat(values.child[values.child.length-1].frequency_value)
values.margin_per!='' ? control.controls[indexVal].controls['margin_value'].setValue( (getTotalValueCounts * (parseFloat(values.margin_per)/100)).toFixed(2)) : '';
values.margin_per!='' ? this.inWords(getTotalValueCounts * (parseInt(values.margin_per)/100),indexVal,2) : ''
}
else {
@ -305,7 +307,7 @@ changeOptions(indexVal: any,event: any): void{
if(values.child[values.child.length-1].fk_frequency_id!='' && values.child[values.child.length-1].frequency_value!='' && values.child[values.child.length-1].fk_frequency_id!=null && values.child[values.child.length-1].frequency_value!=null){
let filterFrequencyValue: any = this.frequencyData.filter(val =>val.frequency_id==values.child[values.child.length-1].fk_frequency_id);
innercontrol.controls[innercontrol.value.length-1].controls['sales_value'].setValue(parseInt(filterFrequencyValue[0].mutiple_factor) * parseInt(values.child[values.child.length-1].frequency_value));
innercontrol.controls[innercontrol.value.length-1].controls['sales_value'].setValue((parseFloat(filterFrequencyValue[0].mutiple_factor) * parseFloat(values.child[values.child.length-1].frequency_value)).toFixed(2));
this.inWords(parseInt(filterFrequencyValue[0].mutiple_factor) * parseInt(values.child[values.child.length-1].frequency_value),innercontrol.value.length-1,1)
}
else {
@ -449,12 +451,15 @@ changeOptions(indexVal: any,event: any): void{
salesChildControlarr[index].forEach((vals, i) => {
vals.forEach((item, key) => {
console.log("item",item,'key',key)
if(val.sales_type != 2){
let saleDate = new Date(item.sales_date);
let date=saleDate.getDate()< 10 ? ("0"+(saleDate.getDate())) : saleDate.getDate()
let month=saleDate.getMonth() < 10 ? ("0"+(saleDate.getMonth()+1)) : (saleDate.getMonth()+1)
// item.sales_date = saleDate.getFullYear() + '-' + ("0" + (saleDate.getMonth() + 1)).slice(-2) + '-' + ("0" + (saleDate.getDay()+1 )).slice(-2);
console.log("sale Day",saleDate.getDay())
item.sales_date = saleDate.getFullYear() + '-' + ("0" + (saleDate.getMonth() + 1))+ '-' + ("0" + (saleDate.getDate() ));
item.sales_date = saleDate.getFullYear() + '-' + month+ '-' + date;
}
//console.log("sale data",new Date(this.pipe.transform(item.sales_date, 'dd-MM-yyyy')))
@ -462,7 +467,7 @@ changeOptions(indexVal: any,event: any): void{
console.log("sale",item.sales_date)
salesChildControl.push(this.dailySalesChildWithData(item, val.sim_id,val.sales_type));
if(item.sales_value !=null){
this.Value[key]=this.constant.convertNumberToWords(item.sales_value)
this.Value[i]=this.constant.convertNumberToWords(item.sales_value)
}
})
@ -503,8 +508,8 @@ changeOptions(indexVal: any,event: any): void{
company_id:[this.pdDetails.company_id],
fk_createdby: [this.users],
isactive: [true],
margin_per: [data.margin_per],
margin_value: [data.margin_value],
margin_per: [data.margin_per == null ? '' : (data.margin_per).toFixed(2)],
margin_value: [data.margin_value == null ? '' :(data.margin_value).toFixed(2)],
comments:[data.comments]
})
}

View File

@ -45,7 +45,7 @@
</mat-expansion-panel>
</mat-accordion>
<br/>
<div *ngIf="assessedProcess">
<div *ngIf="assessedProcess && grossAccess">
<ion-row>
<ion-col col-6 text-center>
<mat-card (click)="getViewPage(1)" class="item-ribbon" style="height: 110px;">

View File

@ -101,7 +101,10 @@ else{
this.assessedForm.controls['fk_createdby'].setValue(this.users);
}
console.log(this.assessedForm.value);
let records = {'records':this.assessedForm.value};
let tempRec=this.assessedForm.value
tempRec.company_id=this.pdDetails.company_id;
console.log("tempRec",tempRec)
let records = {'records':tempRec};
// delete records.records.radio_for_mode
// console.log("after",records);
@ -113,6 +116,9 @@ else{
if(res['dataStatus']==true)
{
this.toast.pdTriggerappmessage("Saved Successfully..!")
setTimeout(()=>{
this.getassessedIncome();
})
}else
{
@ -121,9 +127,7 @@ else{
})
}
setTimeout(()=>{
this.getassessedIncome();
})
}
getassessedIncome()
@ -163,7 +167,7 @@ else{
this.finalExpense = this.finalData.expense;
}
if(this.grossprofit !==undefined)
if(this.grossprofit !==undefined && this.grossprofit.length !=0)
{
this.grossAccess = true;
this.assessedForm.controls['mode'].setValue(this.grossprofit.mode);
@ -177,6 +181,7 @@ else{
this.assessedForm.controls['calc_type_id'].setValue(this.grossprofit.calc_type_id);
this.assessedForm.controls['fk_createdby'].setValue(this.grossprofit.fk_createdby);
}
}else
{

View File

@ -1,3 +1,16 @@
page-pd-question-assessed-household {
.scroll-content {
padding: 16px;
}
.scroll-content{
background-color: #eee;
}
.mat-card{
margin-bottom: 15px;
border-radius: 10px !important;
box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.56), 0 4px 25px 0 rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2) !important;
}
.mat-card-content{
margin-bottom: 0px !important;
}
}

View File

@ -126,7 +126,7 @@ export class PdQuestionAssessedHouseholdPage {
let control:any = <FormArray>this.houseHoldForm.controls['houseExpense'];
if(values.expense_value!='' && values.fk_frequency_id!='' && values.expense_value!=null && values.fk_frequency_id!=null) {
let filterFrequencyValue: any = this.m_freqOfPurchase.filter(val =>val.frequency_id==values.fk_frequency_id);
control.controls[indexVal].controls['annual_expense_value'].setValue(parseInt(values.expense_value) * parseInt(filterFrequencyValue[0].mutiple_factor));
control.controls[indexVal].controls['annual_expense_value'].setValue((parseFloat(values.expense_value) * parseFloat(filterFrequencyValue[0].mutiple_factor)).toFixed(2));
this.inWords(parseInt(values.expense_value) * parseInt(filterFrequencyValue[0].mutiple_factor),indexVal,2)
}

View File

@ -156,7 +156,7 @@
</a>
</ion-col>
</ion-row>
<div *ngFor="let monthwise of sales_month_wise_data">
<div *ngFor="let monthwise of sales_month_wise_data;let i=index">
<div (click)="editAssessedDailyForm(monthwise.simId)">
<h3 text-center>{{monthwise.salesItem | titlecase}}<span *ngIf="monthwise.salesItem == 'Others'">({{monthwise.otherSaleItem | titlecase}})</span></h3>
@ -193,11 +193,15 @@
<!-- <ion-row >
Annual Sale : {{monthwise.footerMessage[0].month_value}}
</ion-row> -->
<ion-row>
<ion-row *ngIf="sales_type[i] == '2'">
<b>Annual Sale : </b> {{ monthwise.footerMessage[0].month_value}}
</ion-row>
<ion-row *ngIf="sales_type[i] != '2'">
{{monthwise.footerMessage[0].month_message}}<br/>
{{monthwise.footerMessage[0].year_message}}
</ion-row>
</ion-row>
@ -256,7 +260,7 @@
</form> -->
<mat-card *ngIf="purchase_type == '1'">
<mat-card-header><h4>Purchase Item</h4></mat-card-header>
<mat-card-header><h4>Item-wise Purchase Calculation</h4></mat-card-header>
<ion-row>
<ion-col col-3 *ngIf="purchse_details !=''"><a (click)="editPurchaseAllDetails(purchse_details)"><h2>{{"&#9998;"}}</h2></a></ion-col>
<ion-col offset-9 col-3 text-right>
@ -289,7 +293,7 @@
</mat-card>
<mat-card *ngIf="purchase_type == '2'">
<mat-card-header><h4>Purchase Calculate Daily Wise</h4></mat-card-header>
<mat-card-header><h4>Purchase Calculation as per Kutcha Records / Bills</h4></mat-card-header>
<ion-row>
<ion-col col-3 *ngIf="purchase_bill_wise !=''">
<a (click)="alleditPurchaseBillWise(purchase_bill_wise)">

View File

@ -69,6 +69,7 @@ export class PdQuestionAssessedInfoPage {
totalAnnualpurchase_Item_wise: any;
totalAnnualBusiness_details: any;
totalAnnual_House_hold_details: any;
sales_type: any=[];
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,public toast:ToastProvider,public fb:FormBuilder,public cons:ConstantsProvider) {
this.pdDetails = this.navParams.get('pdDetails');
this.pageId = this.navParams.get('pageId');
@ -187,7 +188,8 @@ export class PdQuestionAssessedInfoPage {
saveData(answerData)
{
let records:any = {};
answerData.company_id=this.pdDetails.company_id
records ={'records':answerData};
console.log(records);
this.qustCat.saveassessedForms('saveAssessedIncomeSalesDeclaredByCustomer',records).subscribe(res=>
@ -208,7 +210,7 @@ export class PdQuestionAssessedInfoPage {
if(values.margin_per !='' && values.sales_declared_by_customer !='')
{
this.assessedForm.controls['margin_value'].setValue(values.sales_declared_by_customer * (values.margin_per/100));
this.assessedForm.controls['margin_value'].setValue((values.sales_declared_by_customer * (values.margin_per/100)).toFixed(2));
this.marginAmtInwords = this.cons.convertNumberToWords(values.sales_declared_by_customer * (values.margin_per/100));
}
}
@ -274,6 +276,7 @@ export class PdQuestionAssessedInfoPage {
this.sales_item_month_value.forEach((itemElement, itemIndex) => {
this.sales_type[itemIndex]=itemElement.sales_type
let expandBodyContent= Object.keys(itemElement.items).map(key => ({ header:key, value: itemElement.items[key] }));
let listItems: any=[];
expandBodyContent.forEach((expnadElement, expnadIndex) => {

View File

@ -4,13 +4,28 @@
<button ion-button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<ion-title *ngIf="!viewchange">Purchase</ion-title>
<ion-title *ngIf="!viewchange">Item-wise Purchase Calculation</ion-title>
</ion-navbar>
</ion-header>
<style>
.scroll-content {
padding: 16px;
}
.scroll-content{
background-color: #eee;
}
.mat-card{
margin-bottom: 15px;
border-radius: 10px !important;
box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.56), 0 4px 25px 0 rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2) !important;
}
.mat-card-content{
margin-bottom: 0px !important;
}
</style>
<ion-content padding>
<form [formGroup]="rawMaterialForm">
@ -88,7 +103,7 @@
</mat-select>
</mat-form-field>
<mat-form-field style="width: 100%">
<input type="number" matInput [placeholder]="item.value.fk_frequency_id=='1' ? 'Other Sale' : item.value.fk_frequency_id=='2' ? 'Yearly Sale' : item.value.fk_frequency_id=='3' ? 'Half Yearly Sale' : item.value.fk_frequency_id=='4' ? 'Fortnightly Sale' : item.value.fk_frequency_id=='5' ? 'Daily Sale' : item.value.fk_frequency_id=='6' ? 'Quarterly Sale' : item.value.fk_frequency_id=='7' ? 'Monthly Sale' : ''" formControlName="rate_per_unit" (keyup)="purchaseCalculation(i,item.value)" required>
<input type="number" matInput [placeholder]="item.value.fk_frequency_id=='1' ? 'Other purchase' : item.value.fk_frequency_id=='2' ? 'Yearly purchase' : item.value.fk_frequency_id=='3' ? 'Half Yearly purchase' : item.value.fk_frequency_id=='4' ? 'Fortnightly purchase' : item.value.fk_frequency_id=='5' ? 'Daily purchase' : item.value.fk_frequency_id=='6' ? 'Quarterly purchase' : item.value.fk_frequency_id=='7' ? 'Monthly purchase' : ''" formControlName="rate_per_unit" (keyup)="purchaseCalculation(i,item.value)" required>
<mat-hint align="end" style="font-size:12px" *ngIf="item.get('rate_per_unit').value != null"> {{"&#8377;"}} {{RateOfPurchase[i]}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width: 100%">

View File

@ -175,13 +175,13 @@ console.log("value",values);
let control:any = <FormArray>this.rawMaterialForm.controls['purchase'];
if(values.purchase_type == "1" && values.purchase_qty!='' && values.rate_per_unit!='' && values.fk_frequency_id!='' && values.purchase_qty!=null && values.rate_per_unit!=null && values.fk_frequency_id!=null) {
let filterFrequencyValue: any = this.m_freqOfPurchase.filter(val =>val.frequency_id==values.fk_frequency_id);
control.controls[indexVal].controls['annual_purchase_value'].setValue(parseInt(values.purchase_qty) * parseInt(values.rate_per_unit) * parseInt(filterFrequencyValue[0].mutiple_factor));
control.controls[indexVal].controls['annual_purchase_value'].setValue((parseFloat(values.purchase_qty) * parseFloat(values.rate_per_unit) * parseFloat(filterFrequencyValue[0].mutiple_factor)).toFixed(2));
this.inWords(parseInt(values.purchase_qty) * parseInt(values.rate_per_unit) * parseInt(filterFrequencyValue[0].mutiple_factor),indexVal,2)
}
else if(values.purchase_type=="2" && values.rate_per_unit !='' && values.rate_per_unit !=null && values.fk_frequency_id != '' && values.fk_frequency_id != null ){
let filterFrequencyValue: any = this.m_freqOfPurchase.filter(val =>val.frequency_id==values.fk_frequency_id);
control.controls[indexVal].controls['annual_purchase_value'].setValue(parseInt(values.rate_per_unit) * parseInt(filterFrequencyValue[0].mutiple_factor));
control.controls[indexVal].controls['annual_purchase_value'].setValue((parseFloat(values.rate_per_unit) * parseFloat(filterFrequencyValue[0].mutiple_factor)).toFixed(2));
this.inWords(parseInt(values.rate_per_unit) * parseInt(filterFrequencyValue[0].mutiple_factor),indexVal,2)
}
else {

View File

@ -4,7 +4,7 @@
<button ion-button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<ion-title *ngIf="!viewchange">Add Sales Item </ion-title>
<ion-title *ngIf="!viewchange"> Item-Wise Sales Calculation </ion-title>
</ion-navbar>
@ -90,15 +90,15 @@
</div>
<div *ngIf="margin_calculation_status===true">
<mat-form-field style="width: 100%">
<input matInput type="number" placeholder="Margin percentage %" (keyup)="salesMarginPerCalculation(i,item.value)" formControlName="margin_per" name="margin_per" >
<input matInput type="number" placeholder="Gross Margin %" (keyup)="salesMarginPerCalculation(i,item.value)" formControlName="margin_per" name="margin_per" >
</mat-form-field>
<mat-form-field style="width: 100%" *ngIf="item.value.sales_type=='1'">
<input matInput type="number" placeholder="Margin Per Unit" (keyup)="salesMarginAmtCalculation(i,item.value)" formControlName="margin_per_uom" name="margin_per_uom">
<mat-hint align="end" style="font-size: 12px" *ngIf="item.get('rate_per_unit').value != null">{{"&#8377;"}} {{marginAmtInwords[i]}} Only</mat-hint>
<mat-hint align="end" style="font-size: 12px" *ngIf="item.get('rate_per_unit').value != '' && item.get('rate_per_unit').value != null">{{"&#8377;"}} {{marginAmtInwords[i]}} Only</mat-hint>
</mat-form-field>
<mat-form-field style="width: 100%">
<input matInput type="number" placeholder="Considered Margin Amount" formControlName="margin_final_value" name="margin_final_value" readonly>
<mat-hint align="end" style="font-size: 12px" *ngIf="item.get('rate_per_unit').value != null">{{"&#8377;"}} {{marginFinalAmtInwords[i]}} Only</mat-hint>
<mat-hint align="end" style="font-size: 12px" *ngIf="item.get('rate_per_unit').value != '' && item.get('rate_per_unit').value != null">{{"&#8377;"}} {{marginFinalAmtInwords[i]}} Only</mat-hint>
</mat-form-field>
</div>

View File

@ -281,12 +281,12 @@ export class PdQuestionAssessedSalesPage {
let control:any = <FormArray>this.assessedForm.controls['salesCalItemwise'];
if(values.sales_type=="1" && values.sales_qty!='' && values.rate_per_unit!='' && values.fk_frequency_id!='' && values.fk_frequency_id != null) {
let filterFrequencyValue: any = this.m_freqOfPurchase.filter(val =>val.frequency_id==values.fk_frequency_id);
control.controls[indexVal].controls['annual_sale_value'].setValue(parseInt(values.sales_qty) * parseInt(values.rate_per_unit) * parseInt(filterFrequencyValue[0].mutiple_factor));
control.controls[indexVal].controls['annual_sale_value'].setValue((parseFloat(values.sales_qty) * parseFloat(values.rate_per_unit) * parseFloat(filterFrequencyValue[0].mutiple_factor)).toFixed(2));
this.inWords(parseInt(values.sales_qty) * parseInt(values.rate_per_unit) * parseInt(filterFrequencyValue[0].mutiple_factor),indexVal,1)
}
else if(values.sales_type=="2" && values.rate_per_unit!='' && values.fk_frequency_id!='' && values.fk_frequency_id != null) {
let filterFrequencyValue: any = this.m_freqOfPurchase.filter(val =>val.frequency_id==values.fk_frequency_id);
control.controls[indexVal].controls['annual_sale_value'].setValue(parseInt(values.rate_per_unit) * parseInt(filterFrequencyValue[0].mutiple_factor));
control.controls[indexVal].controls['annual_sale_value'].setValue((parseFloat(values.rate_per_unit) * parseFloat(filterFrequencyValue[0].mutiple_factor)).toFixed(2));
this.inWords(parseInt(values.rate_per_unit) * parseInt(filterFrequencyValue[0].mutiple_factor),indexVal,1)
}
else {
@ -301,7 +301,7 @@ export class PdQuestionAssessedSalesPage {
let control:any = <FormArray>this.assessedForm.controls['salesCalItemwise'];
control.controls[indexVal].controls['margin_per_uom'].setValue('');
if(values.margin_per!='' && values.annual_sale_value!='' && values.margin_per!=null && values.annual_sale_value!=null) {
control.controls[indexVal].controls['margin_final_value'].setValue(parseInt(values.annual_sale_value) * (parseInt(values.margin_per)/100));
control.controls[indexVal].controls['margin_final_value'].setValue((parseFloat(values.annual_sale_value) * (parseFloat(values.margin_per)/100)).toFixed(2));
this.inWords(parseInt(values.annual_sale_value) * (parseInt(values.margin_per)/100),indexVal,3)
}
else {
@ -316,14 +316,15 @@ export class PdQuestionAssessedSalesPage {
}
if(values.margin_per_uom!='' && values.sales_qty!='' && values.margin_per_uom!=null && values.sales_qty!=null) {
let MarginFinalValue = parseInt(values.sales_qty) * parseInt(values.margin_per_uom);
control.controls[indexVal].controls['margin_final_value'].setValue(parseInt(values.sales_qty) * parseInt(values.margin_per_uom));
this.inWords(MarginFinalValue,indexVal,3)
let MarginFinalValue = parseFloat(values.sales_qty) * parseFloat(values.margin_per_uom);
control.controls[indexVal].controls['margin_final_value'].setValue(MarginFinalValue.toFixed(2));
this.inWords(MarginFinalValue.toFixed(0),indexVal,3)
}
else {
control.controls[indexVal].controls['margin_final_value'].setValue('');
}
}
/*OLD NOT USED CALCULATION*/
getSalesCalc(indexVal,values)
{
// // console.log(details);

View File

@ -29,7 +29,7 @@
{{salesCustomer.sales_revenue | rupeeCurrencyFormat}}
</ion-col>
</ion-row>
<ion-row>
<ion-row *ngIf="salesCustomer.purchases">
<ion-col class="label">
b. Purchases
</ion-col>
@ -37,6 +37,14 @@
{{salesCustomer.purchases | rupeeCurrencyFormat}}
</ion-col>
</ion-row>
<ion-row *ngIf="salesCustomer.cost_of_goods_sold">
<ion-col class="label">
b. Cost of Goods Sold
</ion-col>
<ion-col text-right class="val">
{{salesCustomer.cost_of_goods_sold | rupeeCurrencyFormat}}
</ion-col>
</ion-row>
<ion-row>
<ion-col class="label">
c. Gross Profit / Loss(a-b)
@ -103,7 +111,7 @@
{{salesItemWise.sales_revenue | rupeeCurrencyFormat}}
</ion-col>
</ion-row>
<ion-row>
<ion-row *ngIf="salesItemWise.purchases">
<ion-col class="label">
b. Purchases
</ion-col>
@ -111,6 +119,14 @@
{{salesItemWise.purchases | rupeeCurrencyFormat}}
</ion-col>
</ion-row>
<ion-row *ngIf="salesItemWise.cost_of_goods_sold">
<ion-col class="label">
b. Cost of Goods Sold
</ion-col>
<ion-col text-right class="val">
{{salesItemWise.cost_of_goods_sold | rupeeCurrencyFormat}}
</ion-col>
</ion-row>
<ion-row>
<ion-col class="label">
c. Gross Profit / Loss(a-b)
@ -179,7 +195,7 @@
{{salesMonthWise.sales_revenue | rupeeCurrencyFormat}}
</ion-col>
</ion-row>
<ion-row>
<ion-row *ngIf="salesMonthWise.purchases">
<ion-col class="label">
b. Purchases
</ion-col>
@ -187,6 +203,14 @@
{{salesMonthWise.purchases | rupeeCurrencyFormat}}
</ion-col>
</ion-row>
<ion-row *ngIf="salesMonthWise.cost_of_goods_sold">
<ion-col class="label">
b. Cost of Goods Sold
</ion-col>
<ion-col text-right class="val">
{{salesMonthWise.cost_of_goods_sold | rupeeCurrencyFormat}}
</ion-col>
</ion-row>
<ion-row>
<ion-col class="label">
c. Gross Profit / Loss(a-b)

View File

@ -14,7 +14,7 @@ page-pd-question-assests {
margin-bottom: 0px !important;
}
img{
padding:0 5px 5px 5px;
padding:0 5px 0 0;
height: 180px;
//width:130px;
//border:3px solid black;

View File

@ -81,6 +81,7 @@ export class PdQuestionAssestsPage {
ionViewDidLoad() {
console.log('ionViewDidLoad PdQuestionAssestsPage');
console.log("Form",this.AssetsDetailsForm)
this.getPDImages();
}
// ionViewWillLeave(){
// console.log(this.AssetsDetailsForm.dirty);
@ -583,19 +584,7 @@ export class PdQuestionAssestsPage {
// this.addAsset(2);
}
})
/*FOR RETRIEVING PHOTOS*/
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
if(!val['msg']){
console.log(val['records'])
if(val['records'].length>0){
val['records'].forEach(result=>{
this.imageDisplay.push({'image':result.doc_url,'Name':result.pd_document_title,'option':'dummy'})
})
console.log("imageBuck",this.imageDisplay);
}
}
})
}
changeName(value,index,img){
@ -785,6 +774,22 @@ export class PdQuestionAssestsPage {
}
}
getPDImages(){
//FOR RETRIEVING PICTURES
this.imageDisplay=[]
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
if(!val['msg']){
console.log(val['records'])
if(val['records'].length>0){
val['records'].forEach(result=>{
this.imageDisplay.push({'image':result.doc_url,'Name':result.pd_document_title,'option':'dummy'})
})
console.log("imageBuck",this.imageDisplay);
}
}
})
}
savePhoto(){
let num_of_images=(this.imageBucket.length+1)+(this.imageDisplay.length+1)
console.log("num of images",num_of_images)
@ -858,6 +863,8 @@ export class PdQuestionAssestsPage {
this.qustCat.savePDImages(records).subscribe(res=>{
if(res['dataStatus']== true){
this.toast.pdTriggerappmessage("Image Saved Successfully")
this.imageBucket=[]
this.getPDImages();
}
else{
this.toast.pdTriggerappmessage('Fail');

View File

@ -7,14 +7,64 @@
<!-- <ion-title *ngIf="!viewchange">{{FormId.form_name}}</ion-title> -->
<ion-title *ngIf="!viewchange">Personal Banking</ion-title>
</ion-navbar>
<ion-segment [(ngModel)]="tab" color="optblue">
<ion-segment-button value="0">
Form
</ion-segment-button>
<ion-segment-button value="1">
Pictures
</ion-segment-button>
</ion-segment>
</ion-header>
<ion-content padding>
<div [ngSwitch]="tab">
<mat-card *ngSwitchCase="'1'" #picContent>
<mat-card-content>
<mat-label *ngIf="imageDisplay.length ==0 && imageBucket.length ==0 "><strong>No Documents Found. Press the camera button below to capture</strong></mat-label>
<ion-grid *ngIf="imageDisplay.length >0 ">
<ion-row>
<ion-col col-6 *ngFor="let image of imageDisplay; let i=index" no-padding>
<img src="{{image.image}}" imageViewer>
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
<input *ngIf="image.Name =='' && image.option != 'dummy'" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeName($event.target.value,i,image.image)">
<button *ngIf="image.option != 'dummy'" ion-button clear color="optblue" (click)="removeImg(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
</ion-col>
<hr/>
</ion-row>
<hr/>
<hr/>
</ion-grid>
<ion-grid *ngIf="imageBucket.length >0 ">
<label style="font-size:14px;color:gray">Newly Captured Pics</label><br/>
<ion-row>
<ion-col col-6 *ngFor="let image of imageBucket; let i=index" no-padding>
<img src="{{image.image}}" imageViewer>
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
<input #focusName *ngIf="image.Name ==''" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeNameForBucket($event.target.value,i,image.image)">
<button float-right ion-button clear color="optblue" (click)="removeImgForBucket(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
</ion-col>
<hr/>
</ion-row>
</ion-grid>
</mat-card-content>
<br/>
<button secondary *ngIf="imageBucket.length >0" #focusName align="end" ion-button color="primary" (click)="sendImage()">save Images</button>
</mat-card>
<!-- <ion-fab middle right>
<button ion-fab color="optblue" (click)="addBankDetails()">
<ion-icon name="md-add"></ion-icon>
</button>
</ion-fab> -->
<form [formGroup]="bankDetails">
<form [formGroup]="bankDetails" *ngSwitchCase="'0'">
<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">
@ -145,6 +195,9 @@
</ion-row>
</form>
</div>
<ion-fab bottom right mini>
<button mini style="margin-bottom: 10px" ion-fab color="optblue" slot="fixed" (click)="capture()"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button></ion-fab>
</ion-content>
<ion-footer>
<button ion-button full color="optblue" (click)="savepdBank(bankDetails.value)"> Save</button>

View File

@ -10,4 +10,20 @@ page-pd-question-banking {
.scroll-content{
background-color: #eee;
}
img{
padding:0 5px 0 0;
height: 180px;
//width:130px;
//border:3px solid black;
//border-radius: 20px;
//background-color: gray;
}
input{
width: 100px;
border-radius: 4px;
border-color: gray;
font-size: 12px;
height: 28px;
}
}

View File

@ -8,7 +8,8 @@ import { controlNameBinding } from '@angular/forms/src/directives/reactive_direc
import { ConstantsProvider } from '../../../providers/constants/constants'
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import {CameraProvider} from '../../../providers/common-provider/camera'
import {LoadingProvider} from '../../../providers/common-provider/loading'
/**
* Generated class for the PdQuestionBankingPage page.
*
@ -42,8 +43,14 @@ export class PdQuestionBankingPage {
protected _onDestroy = new Subject<void>();
m_btLenderListValue: any=[];
imageDisplay: any[];
imageBucket: any=[];
tab: any='0';
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,private cameraProvider:CameraProvider,
private loading:LoadingProvider) {
//this.applicants.pop();
this.pdDetails = this.navParams.get('pdDetails');
this.pdid=this.pdDetails.pd_id;
@ -78,6 +85,28 @@ export class PdQuestionBankingPage {
ionViewDidLoad() {
console.log('ionViewDidLoad PdQuestionBankingPage');
this.getPDImages();
}
ionViewCanLeave(){
console.log("dirty",this.bankDetails.dirty);
if(this.bankDetails.dirty){
return new Promise((resolve,reject)=>{
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
alert.present();
alert.onDidDismiss((data)=>{
console.log("d",data);
if(data== false){
reject();
}
else{
resolve();
}
})
})
}
}
searchFun(control){
control.controls['filterCtrl'].valueChanges
@ -324,4 +353,82 @@ inWords(e,i,flag){
});
}
/*IMAGE SECTION*/
getPDImages(){
//FOR RETRIEVING PICTURES
this.imageDisplay=[]
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
if(!val['msg']){
console.log(val['records'])
if(val['records'].length>0){
val['records'].forEach(result=>{
this.imageDisplay.push({'image':result.doc_url,'Name':result.pd_document_title,'option':'dummy'})
})
console.log("imageBuck",this.imageDisplay);
}
}
})
}
changeName(value,index,img){
console.log(value);
this.imageDisplay[index]={'image':img,'Name':value}
}
changeNameForBucket(value,index,img){
this.imageBucket[index]={'image':img,'Name':value}
}
removeImg(index){
this.imageDisplay.splice(index,1);
}
removeImgForBucket(index){
this.imageBucket.splice(index,1)
}
capture(){
//FOR CAPTURING PICS
this.cameraProvider.getpicture().then(res=>{
console.log("Value",res)
if(res != 'error'){
this.imageBucket.push({'image':res,'Name':''});
//FOR GETTING THE DOC NAME FROM ALERT
let alert =this.toast.setAlertForDocName()
alert.present()
alert.onDidDismiss(value=>{
console.log("alert value",value);
if(value){
this.imageBucket[this.imageBucket.length-1].Name=value.Name
}
})
}
},error=>{
console.log("Camera Error ",JSON.stringify(error));
})
this.tab='1';
}
sendImage(){
this.loading.loaderForSendImage()
console.log("ll",JSON.stringify(this.imageBucket));
let records:any={
'pd_id':this.pdDetails.pd_id,
'formid':this.FormId.form_id,
'images':this.imageBucket,
'company_id':''
}
console.log("records",JSON.stringify(records))
this.qustCat.savePDImages(records).subscribe(res=>{
if(res['dataStatus']== true){
this.toast.pdTriggerappmessage("Image Saved Successfully")
this.imageBucket=[]
this.getPDImages();
}
else{
this.toast.pdTriggerappmessage('Fail');
}
})
}
}

View File

@ -1353,8 +1353,15 @@
</mat-card-subtitle>
<mat-form-field style="width:100%;">
<mat-select formControlName="pos_machines_financial_institution_name" placeholder="Name of the Financial Institution whose POS machines are installed">
<mat-option> Select</mat-option>
<mat-option *ngFor="let b of bankList" [value]="b.bt_lender_list_id">{{b.lender_name}}</mat-option>
<mat-option>
<ngx-mat-select-search formControlName="bankSearch"
[placeholderLabel]="'search Lender'"
[noEntriesFoundLabel]="'No Records Found'" (keyup)="searchFun(pos,i,'bank')" >
<ion-icon name="md-close" ngxMatSelectSearchClear></ion-icon></ngx-mat-select-search>
</mat-option>
<mat-option>Select</mat-option>
<mat-option *ngFor="let b of bankListValue" [value]="b.bt_lender_list_id">{{b.lender_name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field style="width:100%;">

View File

@ -61,6 +61,7 @@ export class PdQuestionBusinessInfoPage {
ServiceChecked: boolean;
ExportFlag: boolean=false;
bankList: any=[];
bankListValue:any=[];
temp_additiondetailofposmachine:any=[]
isreadonlyyear: any=[];
isreadonlymonth: any=[];
@ -220,6 +221,7 @@ export class PdQuestionBusinessInfoPage {
})
this.qustCat.getcommondrop('BTLENDERLIST').subscribe(data=>{
this.bankList=data['records'].filter(val=>val.isactive ==1 && val.lender_type == 1);
this.bankListValue=this.bankList.slice();
})
}
@ -715,9 +717,15 @@ changeOfStartedBusiness(members,i,e){
// this.businessForm.controls['manufacturing_activity_details'].setValue(businessVal.manufacturing_activity_details)
if(businessVal.applicant_use_pos_machines == 'yes'){
//For Adding the bank search in data
businessVal.pos_machines_details.forEach(value=>{
value.bankSearch=''
})
//-----------------------
this.businessForm.controls.no_of_pos_machines.setValue(businessVal.no_of_pos_machines);
const posControl: any = <FormArray>this.businessForm.controls['pos_machines_details'];
for(let i = 1; i<= businessVal.no_of_pos_machines; i++ ){
posControl.push(this.createPOSMachinesDetails(businessVal.pos_machines_details));
}
}
@ -1559,12 +1567,14 @@ createPOSMachinesDetails(data){
if(data==null){
return this.fb.group({
pos_machines_financial_institution_name: [''],
bankSearch:[''],
tid_no_of_pos_machine: [''],
})
}
else{
return this.fb.group({
pos_machines_financial_institution_name: [data.pos_machines_financial_institution_name],
bankSearch:[''],
tid_no_of_pos_machine: [data.tid_no_of_pos_machine],
})
}
@ -1777,6 +1787,11 @@ if(count>=101){
}
records.select_business_activity_type = records.select_business_activity_type.filter(value=>value.exist_status==1);
if(records.pos_machines_details){
records.pos_machines_details.forEach(value=>{
delete value.bankSearch
})
}
// if(records.manufacturing_activity_details.length > 0){
// records.manufacturing_activity_details.forEach((val,index) => {
@ -2042,6 +2057,16 @@ toGetPOSMachinesDetails(e,flag){
.pipe(takeUntil(this._onDestroy))
.subscribe(()=>{
this.searchState(control.controls['stateSearch'].value)
})
}
//For Pos bank search using constant provider
if(option == 'bank'){
console.log("bank", control.controls['bankSearch'].value)
control.controls['bankSearch'].valueChanges
.pipe(takeUntil(this._onDestroy))
.subscribe(()=>{
this.bankListValue=this.cons.searchData(this.bankList,control.controls['bankSearch'].value,option)
})
}
}
@ -2086,6 +2111,8 @@ toGetPOSMachinesDetails(e,flag){
)
}

View File

@ -5,11 +5,62 @@
</button>
<ion-title *ngIf="!viewchange">{{FormId.form_name}}</ion-title>
</ion-navbar>
<ion-segment [(ngModel)]="tab" color="optblue">
<ion-segment-button value="0">
Form
</ion-segment-button>
<ion-segment-button value="1">
Pictures
</ion-segment-button>
</ion-segment>
</ion-header>
<ion-content padding>
<form [formGroup]="currentLoans">
<div [ngSwitch]="tab">
<mat-card *ngSwitchCase="'1'" #picContent>
<mat-card-content>
<mat-label *ngIf="imageDisplay.length ==0 && imageBucket.length ==0 "><strong>No Documents Found. Press the camera button below to capture</strong></mat-label>
<ion-grid *ngIf="imageDisplay.length >0 ">
<ion-row>
<ion-col col-6 *ngFor="let image of imageDisplay; let i=index" no-padding>
<img src="{{image.image}}" imageViewer>
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
<input *ngIf="image.Name =='' && image.option != 'dummy'" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeName($event.target.value,i,image.image)">
<button *ngIf="image.option != 'dummy'" ion-button clear color="optblue" (click)="removeImg(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
</ion-col>
<hr/>
</ion-row>
<hr/>
<hr/>
</ion-grid>
<ion-grid *ngIf="imageBucket.length >0 ">
<label style="font-size:14px;color:gray">Newly Captured Pics</label><br/>
<ion-row>
<ion-col col-6 *ngFor="let image of imageBucket; let i=index" no-padding>
<img src="{{image.image}}" imageViewer>
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
<input #focusName *ngIf="image.Name ==''" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeNameForBucket($event.target.value,i,image.image)">
<button float-right ion-button clear color="optblue" (click)="removeImgForBucket(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
</ion-col>
<hr/>
</ion-row>
</ion-grid>
</mat-card-content>
<br/>
<button secondary *ngIf="imageBucket.length >0" #focusName align="end" ion-button color="primary" (click)="sendImage()">save Images</button>
</mat-card>
<form [formGroup]="currentLoans" *ngSwitchCase="'0'">
<mat-card>
<mat-form-field style="width: 100%">
<mat-label>Do you have any other Existing Loans</mat-label>
@ -131,6 +182,9 @@
<!-- </ion-buttons> -->
</ion-row>
</form>
</div>
<ion-fab bottom right mini>
<button mini style="margin-bottom: 10px" ion-fab color="optblue" slot="fixed" (click)="capture()"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button></ion-fab>
</ion-content>
<ion-footer>
<button ion-button full color="optblue" (click)="submitCurrentloan(currentLoans.value)" > Save</button>

View File

@ -16,5 +16,21 @@ page-pd-question-current-loans {
.mat-card-content{
margin-bottom: 0px !important;
}
img{
padding:0 5px 0 0;
height: 180px;
//width:130px;
//border:3px solid black;
//border-radius: 20px;
//background-color: gray;
}
input{
width: 100px;
border-radius: 4px;
border-color: gray;
font-size: 12px;
height: 28px;
}
}

View File

@ -7,6 +7,8 @@ import { ToastProvider } from '../../../providers/common-provider/toast';
import {ConstantsProvider} from '../../../providers/constants/constants'
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import {CameraProvider} from '../../../providers/common-provider/camera'
import {LoadingProvider} from '../../../providers/common-provider/loading'
/**
* Generated class for the PdQuestionCurrentLoansPage page.
*
@ -45,8 +47,15 @@ applicants: any;
@ViewChild('balanceTenure') TenureFocus : ElementRef
lenderDataValue: any;
protected _onDestroy = new Subject<void>();
base64: any;
imageBucket: any=[];
tab: any='0';
imageDisplay: any=[];
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,public toast:ToastProvider, public aws:AwsServiceProvider,public constant:ConstantsProvider) {
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,
public qustCat:QuestionCategoryProvider,public toast:ToastProvider,
public aws:AwsServiceProvider,public constant:ConstantsProvider,
public cameraProvider:CameraProvider,private loading:LoadingProvider) {
this.questionDetails = this.navParams.get('questionDetails');
@ -75,6 +84,28 @@ applicants: any;
console.log('ionViewDidLoad PdQuestionCurrentLoansPage');
console.log('{{FormId.form_name}}',this.FormId.form_name,this.FormId);
this.getcurrentLoans()
this.getPDImages();
}
ionViewCanLeave(){
console.log("dirty",this.currentLoans.dirty);
if(this.currentLoans.dirty){
return new Promise((resolve,reject)=>{
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
alert.present();
alert.onDidDismiss((data)=>{
console.log("d",data);
if(data== false){
reject();
}
else{
resolve();
}
})
})
}
}
getdropdown()
@ -613,6 +644,7 @@ submitCurrentloan(answerData) {
}
})
}
searchFun(control){
console.log(control)
@ -624,4 +656,80 @@ submitCurrentloan(answerData) {
})
}
/*IMAGE SECTION*/
getPDImages(){
//FOR RETRIEVING PICTURES
this.imageDisplay=[]
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
if(!val['msg']){
console.log(val['records'])
if(val['records'].length>0){
val['records'].forEach(result=>{
this.imageDisplay.push({'image':result.doc_url,'Name':result.pd_document_title,'option':'dummy'})
})
console.log("imageBuck",this.imageDisplay);
}
}
})
}
changeName(value,index,img){
console.log(value);
this.imageDisplay[index]={'image':img,'Name':value}
}
changeNameForBucket(value,index,img){
this.imageBucket[index]={'image':img,'Name':value}
}
removeImg(index){
this.imageDisplay.splice(index,1);
}
removeImgForBucket(index){
this.imageBucket.splice(index,1)
}
capture(){
//FOR CAPTURING PICS
this.cameraProvider.getpicture().then(res=>{
console.log("Value",res)
if(res != 'error'){
this.imageBucket.push({'image':res,'Name':''});
//FOR GETTING THE DOC NAME FROM ALERT
let alert =this.toast.setAlertForDocName()
alert.present()
alert.onDidDismiss(value=>{
console.log("alert value",value);
if(value){
this.imageBucket[this.imageBucket.length-1].Name=value.Name
}
})
}
},error=>{
console.log("Camera Error ",JSON.stringify(error));
})
this.tab='1';
}
sendImage(){
this.loading.loaderForSendImage()
console.log("ll",JSON.stringify(this.imageBucket));
let records:any={
'pd_id':this.pdDetails.pd_id,
'formid':this.FormId.form_id,
'images':this.imageBucket,
'company_id':''
}
console.log("records",JSON.stringify(records))
this.qustCat.savePDImages(records).subscribe(res=>{
if(res['dataStatus']== true){
this.toast.pdTriggerappmessage("Image Saved Successfully")
this.imageBucket=[]
this.getPDImages();
}
else{
this.toast.pdTriggerappmessage('Fail');
}
})
}
}

View File

@ -5,10 +5,60 @@
</button>
<ion-title *ngIf="!viewchange">{{FormId.form_name}}</ion-title>
</ion-navbar>
<ion-segment [(ngModel)]="tab" color="optblue">
<ion-segment-button value="0">
Form
</ion-segment-button>
<ion-segment-button value="1">
Pictures
</ion-segment-button>
</ion-segment>
</ion-header>
<ion-content padding>
<form [formGroup]="employmentForm">
<div [ngSwitch]="tab">
<mat-card *ngSwitchCase="'1'" #picContent>
<mat-card-content>
<mat-label *ngIf="imageDisplay.length ==0 && imageBucket.length ==0 "><strong>No Documents Found. Press the camera button below to capture</strong></mat-label>
<ion-grid *ngIf="imageDisplay.length >0 ">
<ion-row>
<ion-col col-6 *ngFor="let image of imageDisplay; let i=index" no-padding>
<img src="{{image.image}}" imageViewer>
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
<input *ngIf="image.Name =='' && image.option != 'dummy'" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeName($event.target.value,i,image.image)">
<button *ngIf="image.option != 'dummy'" ion-button clear color="optblue" (click)="removeImg(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
</ion-col>
<hr/>
</ion-row>
<hr/>
<hr/>
</ion-grid>
<ion-grid *ngIf="imageBucket.length >0 ">
<label style="font-size:14px;color:gray">Newly Captured Pics</label><br/>
<ion-row>
<ion-col col-6 *ngFor="let image of imageBucket; let i=index" no-padding>
<img src="{{image.image}}" imageViewer>
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
<input #focusName *ngIf="image.Name ==''" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeNameForBucket($event.target.value,i,image.image)">
<button float-right ion-button clear color="optblue" (click)="removeImgForBucket(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
</ion-col>
<hr/>
</ion-row>
</ion-grid>
</mat-card-content>
<br/>
<button secondary *ngIf="imageBucket.length >0" #focusName align="end" ion-button color="primary" (click)="sendImage()">save Images</button>
</mat-card>
<form [formGroup]="employmentForm" *ngSwitchCase="'0'">
<mat-card>
<div fxLayout="column" fxLayoutAlign="start stretch">
@ -275,6 +325,9 @@
</ion-row>
</form>
</div>
<ion-fab bottom right mini>
<button mini style="margin-bottom: 10px" ion-fab color="optblue" slot="fixed" (click)="capture()"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button></ion-fab>
</ion-content>
<ion-footer>
<button ion-button full color="optblue" (click)="saveEmpInfo()"> Save</button>

View File

@ -16,4 +16,22 @@ page-pd-question-emp-info {
.scroll-content{
background-color: #eee;
}
/*FOR IMAGES*/
img{
padding:0 5px 0 0;
height: 180px;
//width:130px;
//border:3px solid black;
//border-radius: 20px;
//background-color: gray;
}
input{
width: 100px;
border-radius: 4px;
border-color: gray;
font-size: 12px;
height: 28px;
}
}

View File

@ -6,6 +6,8 @@ import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
import { ToastProvider } from '../../../providers/common-provider/toast';
import { ConstantsProvider } from '../../../providers/constants/constants';
import { max } from 'rxjs/operators';
import {CameraProvider} from '../../../providers/common-provider/camera'
import {LoadingProvider} from '../../../providers/common-provider/loading'
/**
* Generated class for the PdQuestionEmpInfoPage page.
*
@ -45,13 +47,20 @@ export class PdQuestionEmpInfoPage {
workExperienceErrorFlag:boolean = false;
generalExistBusinessYear:any;
generalExistBusinessMonth:any;
tab:any='0'
imageBucket:any=[]
imageDisplay:any=[]
public dateonly: any = [{date:1,isdisabled:false},{date:2,isdisabled:false},{date:3,isdisabled:false},{date:4,isdisabled:false},{date:5,isdisabled:false},{date:6,isdisabled:false},{date:7,isdisabled:false},{date:8,isdisabled:false},{date:9,isdisabled:false},{date:10,isdisabled:false},{date:11,isdisabled:false},{date:12,isdisabled:false},{date:13,isdisabled:false},{date:14,isdisabled:false},{date:15,isdisabled:false},{date:16,isdisabled:false},{date:17,isdisabled:false},{date:18,isdisabled:false},{date:19,isdisabled:false},{date:20,isdisabled:false},{date:21,isdisabled:false},{date:22,isdisabled:false},{date:23,isdisabled:false},{date:24,isdisabled:false},{date:25,isdisabled:false},{date:26,isdisabled:false},{date:27,isdisabled:false},{date:28,isdisabled:false},{date:29,isdisabled:false},{date:30,isdisabled:false},{date:31,isdisabled:false}];
public todate: any[] = this.dateonly;
@ViewChild('workExp') expFocus: ElementRef
@ViewChild('cashPaidFocus') inputCashPaidFocus :ElementRef
@ViewChild('yearFocus') inputYearFocus :ElementRef
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,public aws: AwsServiceProvider, public toast: ToastProvider,public constant:ConstantsProvider) {
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,
public qustCat:QuestionCategoryProvider,public aws: AwsServiceProvider,
public toast: ToastProvider,public constant:ConstantsProvider,
private cameraProvider:CameraProvider,private loading:LoadingProvider) {
this.FormId = this.navParams.get('FormId');
this.questionDetails = this.navParams.get('questionDetails');
this.pdDetails = this.navParams.get('pdDetails');
@ -111,6 +120,28 @@ export class PdQuestionEmpInfoPage {
ionViewDidLoad() {
console.log('ionViewDidLoad PdQuestionEmpInfoPage');
this.getPDImages();
}
ionViewCanLeave(){
console.log("dirty",this.employmentForm.dirty);
if(this.employmentForm.dirty){
return new Promise((resolve,reject)=>{
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
alert.present();
alert.onDidDismiss((data)=>{
console.log("d",data);
if(data== false){
reject();
}
else{
resolve();
}
})
})
}
}
getDropDownList()
@ -454,5 +485,81 @@ inWords(val,flag:number){
}
})
}
getPDImages(){
//FOR RETRIEVING PICTURES
this.imageDisplay=[]
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
if(!val['msg']){
console.log(val['records'])
if(val['records'].length>0){
val['records'].forEach(result=>{
this.imageDisplay.push({'image':result.doc_url,'Name':result.pd_document_title,'option':'dummy'})
})
console.log("imageBuck",this.imageDisplay);
}
}
})
}
changeName(value,index,img){
console.log(value);
this.imageDisplay[index]={'image':img,'Name':value}
}
changeNameForBucket(value,index,img){
this.imageBucket[index]={'image':img,'Name':value}
}
removeImg(index){
this.imageDisplay.splice(index,1);
}
removeImgForBucket(index){
this.imageBucket.splice(index,1)
}
capture(){
//FOR CAPTURING PICS
this.cameraProvider.getpicture().then(res=>{
console.log("Value",res)
if(res != 'error'){
this.imageBucket.push({'image':res,'Name':''});
//FOR GETTING THE DOC NAME FROM ALERT
let alert =this.toast.setAlertForDocName()
alert.present()
alert.onDidDismiss(value=>{
console.log("alert value",value);
if(value){
this.imageBucket[this.imageBucket.length-1].Name=value.Name
}
})
}
},error=>{
console.log("Camera Error ",JSON.stringify(error));
})
this.tab='1';
}
sendImage(){
this.loading.loaderForSendImage()
console.log("ll",JSON.stringify(this.imageBucket));
let records:any={
'pd_id':this.pdDetails.pd_id,
'formid':this.FormId.form_id,
'images':this.imageBucket,
'company_id':''
}
console.log("records",JSON.stringify(records))
this.qustCat.savePDImages(records).subscribe(res=>{
if(res['dataStatus']== true){
this.toast.pdTriggerappmessage("Image Saved Successfully")
this.imageBucket=[]
this.getPDImages();
}
else{
this.toast.pdTriggerappmessage('Fail');
}
})
}
}

View File

@ -6,9 +6,59 @@
</button>
<ion-title *ngIf="!viewchange">{{FormId.form_name}}</ion-title>
</ion-navbar>
<ion-segment [(ngModel)]="tab" color="optblue">
<ion-segment-button value="0">
Form
</ion-segment-button>
<ion-segment-button value="1">
Pictures
</ion-segment-button>
</ion-segment>
</ion-header>
<ion-content padding>
<form class="address" [formGroup]="familyForm">
<div [ngSwitch]="tab">
<mat-card *ngSwitchCase="'1'" #picContent>
<mat-card-content>
<mat-label *ngIf="imageDisplay.length ==0 && imageBucket.length ==0 "><strong>No Documents Found. Press the camera button below to capture</strong></mat-label>
<ion-grid *ngIf="imageDisplay.length >0 ">
<ion-row>
<ion-col col-6 *ngFor="let image of imageDisplay; let i=index" no-padding>
<img src="{{image.image}}" imageViewer>
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
<input *ngIf="image.Name =='' && image.option != 'dummy'" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeName($event.target.value,i,image.image)">
<button *ngIf="image.option != 'dummy'" ion-button clear color="optblue" (click)="removeImg(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
</ion-col>
<hr/>
</ion-row>
<hr/>
<hr/>
</ion-grid>
<ion-grid *ngIf="imageBucket.length >0 ">
<label style="font-size:14px;color:gray">Newly Captured Pics</label><br/>
<ion-row>
<ion-col col-6 *ngFor="let image of imageBucket; let i=index" no-padding>
<img src="{{image.image}}" imageViewer>
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
<input #focusName *ngIf="image.Name ==''" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeNameForBucket($event.target.value,i,image.image)">
<button float-right ion-button clear color="optblue" (click)="removeImgForBucket(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
</ion-col>
<hr/>
</ion-row>
</ion-grid>
</mat-card-content>
<br/>
<button secondary *ngIf="imageBucket.length >0" #focusName align="end" ion-button color="primary" (click)="sendImage()">save Images</button>
</mat-card>
<form class="address" [formGroup]="familyForm" *ngSwitchCase="'0'">
<div formArrayName="family_details">
<section
[formGroupName]="i"
@ -409,7 +459,9 @@
</ion-row>
</form>
</div>
<ion-fab bottom right mini>
<button mini style="margin-bottom: 10px" ion-fab color="optblue" slot="fixed" (click)="capture()"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button></ion-fab>
<!-- <ion-fab right bottom mini>
<button mini ion-fab color="optblue" (click)="add()"><ion-icon name="add" style="font-size: 24px"></ion-icon></button></ion-fab> -->

View File

@ -16,4 +16,22 @@ page-pd-question-family {
h4{
font-size: 120%;
}
/*FOR IMAGES*/
img{
padding:0 5px 0 0;
height: 180px;
//width:130px;
//border:3px solid black;
//border-radius: 20px;
//background-color: gray;
}
input{
width: 100px;
border-radius: 4px;
border-color: gray;
font-size: 12px;
height: 28px;
}
}

View File

@ -8,6 +8,8 @@ import { controlNameBinding } from '@angular/forms/src/directives/reactive_direc
import { ConstantsProvider } from '../../../providers/constants/constants'
import { takeUntil } from 'rxjs/operators';
import { Subject } from 'rxjs';
import {CameraProvider} from '../../../providers/common-provider/camera'
import {LoadingProvider} from '../../../providers/common-provider/loading'
/**
* Generated class for the PdQuestionFamilyPage page.
@ -64,9 +66,14 @@ data:any;
protected _onDestroy = new Subject<void>();
pincodeDataValue: any=[];
relationDataValue: any=[];
imageDisplay: any=[];
imageBucket: any=[];
tab: any='0';
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,
public qustCat:QuestionCategoryProvider,public aws:AwsServiceProvider,public toast:ToastProvider,public cons:ConstantsProvider) {
public qustCat:QuestionCategoryProvider,public aws:AwsServiceProvider,
public toast:ToastProvider,public cons:ConstantsProvider,
private cameraProvider:CameraProvider,private loading:LoadingProvider) {
this.FormId = this.navParams.get('FormId');
this.pdDetails = this.navParams.get('pdDetails');
this.selected_person=this.pdDetails.pdapplicants_details;
@ -93,6 +100,28 @@ data:any;
ionViewDidLoad() {
console.log("ionViewDidLoad PdQuestionFamilyPage")
this.getFamilyData();
this.getPDImages();
}
ionViewCanLeave(){
console.log("dirty",this.familyForm.dirty);
if(this.familyForm.dirty){
return new Promise((resolve,reject)=>{
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
alert.present();
alert.onDidDismiss((data)=>{
console.log("d",data);
if(data== false){
reject();
}
else{
resolve();
}
})
})
}
}
initFamilyDetails(records) : void
{
@ -772,6 +801,10 @@ resValue:any;
},err=>{
console.log("Error",err)
})
/*let earning:any = [];
let non_earning:any = [];
let records = {'pd_id':this.pdDetails.pd_id,'pd_form_id':this.FormId.form_id}
@ -953,4 +986,81 @@ searchFun(control:any,i:number,option){
})
}
getPDImages(){
//FOR RETRIEVING PICTURES
this.imageDisplay=[]
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
if(!val['msg']){
console.log(val['records'])
if(val['records'].length>0){
val['records'].forEach(result=>{
this.imageDisplay.push({'image':result.doc_url,'Name':result.pd_document_title,'option':'dummy'})
})
console.log("imageBuck",this.imageDisplay);
}
}
})
}
changeName(value,index,img){
console.log(value);
this.imageDisplay[index]={'image':img,'Name':value}
}
changeNameForBucket(value,index,img){
this.imageBucket[index]={'image':img,'Name':value}
}
removeImg(index){
this.imageDisplay.splice(index,1);
}
removeImgForBucket(index){
this.imageBucket.splice(index,1)
}
capture(){
//FOR CAPTURING PICS
this.cameraProvider.getpicture().then(res=>{
console.log("Value",res)
if(res != 'error'){
this.imageBucket.push({'image':res,'Name':''});
//FOR GETTING THE DOC NAME FROM ALERT
let alert =this.toast.setAlertForDocName()
alert.present()
alert.onDidDismiss(value=>{
console.log("alert value",value);
if(value){
this.imageBucket[this.imageBucket.length-1].Name=value.Name
}
})
}
},error=>{
console.log("Camera Error ",JSON.stringify(error));
})
this.tab='1';
}
sendImage(){
this.loading.loaderForSendImage()
console.log("ll",JSON.stringify(this.imageBucket));
let records:any={
'pd_id':this.pdDetails.pd_id,
'formid':this.FormId.form_id,
'images':this.imageBucket,
'company_id':''
}
console.log("records",JSON.stringify(records))
this.qustCat.savePDImages(records).subscribe(res=>{
if(res['dataStatus']== true){
this.toast.pdTriggerappmessage("Image Saved Successfully")
this.imageBucket=[]
this.getPDImages();
}
else{
this.toast.pdTriggerappmessage('Fail');
}
})
}
}

View File

@ -12,12 +12,62 @@
</button>
<ion-title *ngIf="!viewchange">{{FormId.form_name}}</ion-title>
</ion-navbar>
<ion-segment [(ngModel)]="tab" color="optblue">
<ion-segment-button value="0">
Form
</ion-segment-button>
<ion-segment-button value="1">
Pictures
</ion-segment-button>
</ion-segment>
</ion-header>
<ion-content padding>
<form [formGroup]="_finalRemarkForm" novalidate>
<div [ngSwitch]="tab">
<mat-card *ngSwitchCase="'1'" #picContent>
<mat-card-content>
<mat-label *ngIf="imageDisplay.length ==0 && imageBucket.length ==0 "><strong>No Documents Found. Press the camera button below to capture</strong></mat-label>
<ion-grid *ngIf="imageDisplay.length >0 ">
<ion-row>
<ion-col col-6 *ngFor="let image of imageDisplay; let i=index" no-padding>
<img src="{{image.image}}" imageViewer>
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
<input *ngIf="image.Name =='' && image.option != 'dummy'" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeName($event.target.value,i,image.image)">
<button *ngIf="image.option != 'dummy'" ion-button clear color="optblue" (click)="removeImg(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
</ion-col>
<hr/>
</ion-row>
<hr/>
<hr/>
</ion-grid>
<ion-grid *ngIf="imageBucket.length >0 ">
<label style="font-size:14px;color:gray">Newly Captured Pics</label><br/>
<ion-row>
<ion-col col-6 *ngFor="let image of imageBucket; let i=index" no-padding>
<img src="{{image.image}}" imageViewer>
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
<input #focusName *ngIf="image.Name ==''" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeNameForBucket($event.target.value,i,image.image)">
<button float-right ion-button clear color="optblue" (click)="removeImgForBucket(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
</ion-col>
<hr/>
</ion-row>
</ion-grid>
</mat-card-content>
<br/>
<button secondary *ngIf="imageBucket.length >0" #focusName align="end" ion-button color="primary" (click)="sendImage()">save Images</button>
</mat-card>
<form [formGroup]="_finalRemarkForm" novalidate *ngSwitchCase="'0'">
<mat-card>
<mat-card-content>
<mat-form-field>
@ -137,6 +187,9 @@
</ion-row>
</form>
</div>
<ion-fab bottom right mini>
<button mini style="margin-bottom: 10px" ion-fab color="optblue" slot="fixed" (click)="capture()"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button></ion-fab>
</ion-content>
<ion-footer>
<button ion-button full color="optblue" type="submit" (click)="saveFinalRemark()"> Save</button>

View File

@ -34,6 +34,22 @@ page-pd-question-final-remark {
margin : 5px 0;
}
/*FOR IMAGES*/
img{
padding:0 5px 0 0;
height: 180px;
//width:130px;
//border:3px solid black;
//border-radius: 20px;
//background-color: gray;
}
input{
width: 100px;
border-radius: 4px;
border-color: gray;
font-size: 12px;
height: 28px;
}
}

View File

@ -5,6 +5,9 @@ import { FormGroup, FormBuilder,Validators,FormArray} from '@angular/forms';
import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
import { ToastProvider } from '../../../providers/common-provider/toast';
import { CameraProvider } from '../../../providers/common-provider/camera'
import {LoadingProvider} from '../../../providers/common-provider/loading'
/**
* Generated class for the PdQuestionFinalRemarkPage page.
*
@ -27,7 +30,12 @@ export class PdQuestionFinalRemarkPage {
FormId:any;
_finalRemarkForm:FormGroup;
m_recommendationList: any=[];
constructor(public navCtrl: NavController, public navParams: NavParams, public fb:FormBuilder, public qustcat:QuestionCategoryProvider,public aws:AwsServiceProvider,public toast:ToastProvider) {
imageDisplay: any=[];
imageBucket: any=[];
tab: any='0';
constructor(public navCtrl: NavController, public navParams: NavParams, public fb:FormBuilder,
public qustcat:QuestionCategoryProvider,public aws:AwsServiceProvider,
public toast:ToastProvider,private cameraProvider:CameraProvider,private loading:LoadingProvider) {
this.pdDetails=this.navParams.get('pdDetails');
this.pdid=this.pdDetails.pd_id
this.FormId=this.navParams.get('FormId');
@ -57,6 +65,28 @@ export class PdQuestionFinalRemarkPage {
ionViewDidLoad() {
console.log('ionViewDidLoad PdQuestionFinalRemarkPage');
this.getFinalRemark();
this.getPDImages();
}
ionViewCanLeave(){
console.log("dirty",this._finalRemarkForm.dirty);
if(this._finalRemarkForm.dirty){
return new Promise((resolve,reject)=>{
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
alert.present();
alert.onDidDismiss((data)=>{
console.log("d",data);
if(data== false){
reject();
}
else{
resolve();
}
})
})
}
}
getDropDown(){
@ -343,6 +373,7 @@ RecommendationChange(e) {
recommendationReferToCredit.push(this.createRecomendationCreditRefer(null));
}
})
}
saveFinalRemark(){
if(this._finalRemarkForm.invalid){
@ -366,4 +397,81 @@ RecommendationChange(e) {
}
}
getPDImages(){
//FOR RETRIEVING PICTURES
this.imageDisplay=[]
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
this.qustcat.getPDImages(record_for_pic).subscribe(val=>{
if(!val['msg']){
console.log(val['records'])
if(val['records'].length>0){
val['records'].forEach(result=>{
this.imageDisplay.push({'image':result.doc_url,'Name':result.pd_document_title,'option':'dummy'})
})
console.log("imageBuck",this.imageDisplay);
}
}
})
}
changeName(value,index,img){
console.log(value);
this.imageDisplay[index]={'image':img,'Name':value}
}
changeNameForBucket(value,index,img){
this.imageBucket[index]={'image':img,'Name':value}
}
removeImg(index){
this.imageDisplay.splice(index,1);
}
removeImgForBucket(index){
this.imageBucket.splice(index,1)
}
capture(){
//FOR CAPTURING PICS
this.cameraProvider.getpicture().then(res=>{
console.log("Value",res)
if(res != 'error'){
this.imageBucket.push({'image':res,'Name':''});
//FOR GETTING THE DOC NAME FROM ALERT
let alert =this.toast.setAlertForDocName()
alert.present()
alert.onDidDismiss(value=>{
console.log("alert value",value);
if(value){
this.imageBucket[this.imageBucket.length-1].Name=value.Name
}
})
}
},error=>{
console.log("Camera Error ",JSON.stringify(error));
})
this.tab='1';
}
sendImage(){
this.loading.loaderForSendImage()
console.log("ll",JSON.stringify(this.imageBucket));
let records:any={
'pd_id':this.pdDetails.pd_id,
'formid':this.FormId.form_id,
'images':this.imageBucket,
'company_id':''
}
console.log("records",JSON.stringify(records))
this.qustcat.savePDImages(records).subscribe(res=>{
if(res['dataStatus']== true){
this.toast.pdTriggerappmessage("Image Saved Successfully")
this.imageBucket=[]
this.getPDImages();
}
else{
this.toast.pdTriggerappmessage('Fail');
}
})
}
}

View File

@ -7,11 +7,60 @@
<ion-title *ngIf="!viewchange">{{FormId.form_name}}</ion-title>
</ion-navbar>
<ion-segment [(ngModel)]="tab" color="optblue">
<ion-segment-button value="0">
Form
</ion-segment-button>
<ion-segment-button value="1">
Pictures
</ion-segment-button>
</ion-segment>
</ion-header>
<ion-content padding>
<form [formGroup]="generalForm">
<div [ngSwitch]="tab">
<mat-card *ngSwitchCase="'1'" #picContent>
<mat-card-content>
<mat-label *ngIf="imageDisplay.length ==0 && imageBucket.length ==0 "><strong>No Documents Found. Press the camera button below to capture</strong></mat-label>
<ion-grid *ngIf="imageDisplay.length >0 ">
<ion-row>
<ion-col col-6 *ngFor="let image of imageDisplay; let i=index" no-padding>
<img src="{{image.image}}" imageViewer>
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
<input *ngIf="image.Name =='' && image.option != 'dummy'" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeName($event.target.value,i,image.image)">
<button *ngIf="image.option != 'dummy'" ion-button clear color="optblue" (click)="removeImg(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
</ion-col>
<hr/>
</ion-row>
<hr/>
<hr/>
</ion-grid>
<ion-grid *ngIf="imageBucket.length >0 ">
<label style="font-size:14px;color:gray">Newly Captured Pics</label><br/>
<ion-row>
<ion-col col-6 *ngFor="let image of imageBucket; let i=index" no-padding>
<img src="{{image.image}}" imageViewer>
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
<input #focusName *ngIf="image.Name ==''" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeNameForBucket($event.target.value,i,image.image)">
<button float-right ion-button clear color="optblue" (click)="removeImgForBucket(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
</ion-col>
<hr/>
</ion-row>
</ion-grid>
</mat-card-content>
<br/>
<button secondary *ngIf="imageBucket.length >0" #focusName align="end" ion-button color="primary" (click)="sendImage()">save Images</button>
</mat-card>
<form [formGroup]="generalForm" *ngSwitchCase="'0'">
<mat-card style="padding: 0px 10px !important;">
<h6 padding>Name of Person(s) Met and Individual Loan Applicant(s)</h6>
<ion-list formArrayName="list_value">
@ -418,7 +467,9 @@
</div>
</div>
</mat-card>-->
</div>
<ion-fab bottom right mini>
<button mini style="margin-bottom: 10px" ion-fab color="optblue" slot="fixed" (click)="capture()"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button></ion-fab>
</ion-content>
<ion-footer>
<button ion-button full color="optblue" (click)="submitData(generalForm.value)"> Save</button>

View File

@ -21,6 +21,23 @@ page-pd-question-general-info {
ion-toggle{
zoom: 0.8;
}
/*FOR IMAGES*/
img{
padding:0 5px 0 0;
height: 180px;
//width:130px;
//border:3px solid black;
//border-radius: 20px;
//background-color: gray;
}
input{
width: 100px;
border-radius: 4px;
border-color: gray;
font-size: 12px;
height: 28px;
}
}

View File

@ -10,6 +10,8 @@ import {PdPipe} from './../../../pipes/pd/pd';
import { removeSummaryDuplicates } from '@angular/compiler';
import { DataSource } from '@angular/cdk/table';
import { MatSelect } from '@angular/material';
import {CameraProvider} from '../../../providers/common-provider/camera'
import {LoadingProvider} from '../../../providers/common-provider/loading'
//import {} from 'moment'
/**
@ -73,8 +75,14 @@ export class PdQuestionGeneralInfoPage {
@ViewChild('remark') nameField: ElementRef;
@ViewChild('focusBusiness') focus_business_entity : MatSelect
customer_segment_abbr: any;
imageDisplay: any[];
imageBucket: any=[];
tab: any='0';
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,public toast:ToastProvider,public fb:FormBuilder,public modal:ModalController) {
constructor(public navCtrl: NavController, public navParams: NavParams,
public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,
public toast:ToastProvider,public fb:FormBuilder,public modal:ModalController,
private cameraProvider:CameraProvider,private loading:LoadingProvider) {
this.maxDate = new Date();
this.pd_applicants_details = [];
this.pd_applicants_details.pop();
@ -147,6 +155,7 @@ export class PdQuestionGeneralInfoPage {
// this.pd_applicants_details.pop();
console.log('ionViewDidLoad PdQuestionGeneralInfoPage');
this.getGeneralForm()
this.getPDImages();
}
ionViewLoaded() {
@ -156,6 +165,28 @@ export class PdQuestionGeneralInfoPage {
// },150);
}
ionViewCanLeave(){
console.log("dirty",this.generalForm.dirty);
if(this.generalForm.dirty){
return new Promise((resolve,reject)=>{
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
alert.present();
alert.onDidDismiss((data)=>{
console.log("d",data);
if(data== false){
reject();
}
else{
resolve();
}
})
})
}
}
initlistv(data,purpose) :void
{
const control=<FormArray>this.generalForm.controls['list_value'];
@ -1250,6 +1281,87 @@ console.log('1)',this.temp);
});
}
/*IMAGE SECTION*/
getPDImages(){
//FOR RETRIEVING PICTURES
this.imageDisplay=[]
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
if(!val['msg']){
console.log(val['records'])
if(val['records'].length>0){
val['records'].forEach(result=>{
this.imageDisplay.push({'image':result.doc_url,'Name':result.pd_document_title,'option':'dummy'})
})
console.log("imageBuck",this.imageDisplay);
}
}
})
}
changeName(value,index,img){
console.log(value);
this.imageDisplay[index]={'image':img,'Name':value}
}
changeNameForBucket(value,index,img){
this.imageBucket[index]={'image':img,'Name':value}
}
removeImg(index){
this.imageDisplay.splice(index,1);
}
removeImgForBucket(index){
this.imageBucket.splice(index,1)
}
capture(){
//FOR CAPTURING PICS
this.cameraProvider.getpicture().then(res=>{
console.log("Value",res)
if(res != 'error'){
this.imageBucket.push({'image':res,'Name':''});
//FOR GETTING THE DOC NAME FROM ALERT
let alert =this.toast.setAlertForDocName()
alert.present()
alert.onDidDismiss(value=>{
console.log("alert value",value);
if(value){
this.imageBucket[this.imageBucket.length-1].Name=value.Name
}
})
}
},error=>{
console.log("Camera Error ",JSON.stringify(error));
})
this.tab='1';
}
sendImage(){
this.loading.loaderForSendImage()
console.log("ll",JSON.stringify(this.imageBucket));
let records:any={
'pd_id':this.pdDetails.pd_id,
'formid':this.FormId.form_id,
'images':this.imageBucket,
'company_id':''
}
console.log("records",JSON.stringify(records))
this.qustCat.savePDImages(records).subscribe(res=>{
if(res['dataStatus']== true){
this.toast.pdTriggerappmessage("Image Saved Successfully")
// this.imageDisplay.push(this.imageBucket)
// console.log("length",this.imageDisplay.length)
this.imageBucket=[]
this.getPDImages();
}
else{
this.toast.pdTriggerappmessage('Fail');
}
})
}
}

View File

@ -8,14 +8,62 @@
</ion-navbar>
<ion-segment [(ngModel)]="tab" color="optblue">
<ion-segment-button value="0">
Form
</ion-segment-button>
<ion-segment-button value="1">
Pictures
</ion-segment-button>
</ion-segment>
</ion-header>
<ion-content padding>
<div [ngSwitch]="tab">
<mat-card *ngSwitchCase="'1'" #picContent>
<mat-card-content>
<mat-label *ngIf="imageDisplay.length ==0 && imageBucket.length ==0 "><strong>No Documents Found. Press the camera button below to capture</strong></mat-label>
<ion-grid *ngIf="imageDisplay.length >0 ">
<ion-row>
<ion-col col-6 *ngFor="let image of imageDisplay; let i=index" no-padding>
<img src="{{image.image}}" imageViewer>
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
<input *ngIf="image.Name =='' && image.option != 'dummy'" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeName($event.target.value,i,image.image)">
<button *ngIf="image.option != 'dummy'" ion-button clear color="optblue" (click)="removeImg(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
</ion-col>
<hr/>
</ion-row>
<hr/>
<hr/>
</ion-grid>
<ion-grid *ngIf="imageBucket.length >0 ">
<label style="font-size:14px;color:gray">Newly Captured Pics</label><br/>
<ion-row>
<ion-col col-6 *ngFor="let image of imageBucket; let i=index" no-padding>
<img src="{{image.image}}" imageViewer>
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
<input #focusName *ngIf="image.Name ==''" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeNameForBucket($event.target.value,i,image.image)">
<button float-right ion-button clear color="optblue" (click)="removeImgForBucket(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
</ion-col>
<hr/>
</ion-row>
</ion-grid>
</mat-card-content>
<br/>
<button secondary *ngIf="imageBucket.length >0" #focusName align="end" ion-button color="primary" (click)="sendImage()">save Images</button>
</mat-card>
<form [formGroup]="representativeForm">
<form [formGroup]="representativeForm" *ngSwitchCase="'0'">
<mat-card>
<mat-form-field style="width: 100%">
<mat-select (selectionChange)="selectedLoanChanges($event)" placeholder="Did the lender representative accompany the PD officer for PD?"
@ -52,10 +100,16 @@
<!-- <ion-buttons >
<ion-button color="optblue" full[disabled]="!pdforms.valid" mat-raised-button style="width:100%" (click)="savepdDetails(pdforms.value)">Save <ion-icon name="md-disc"></ion-icon></ion-button> -->
<button ion-button full color="optblue" (click)="sumbitData(representativeForm.value)"> Save</button>
<!-- </ion-buttons> -->
</ion-row>
</form>
</div>
<ion-fab bottom right mini>
<button mini style="margin-bottom: 10px" ion-fab color="optblue" slot="fixed" (click)="capture()"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button></ion-fab>
</ion-content>
<ion-footer>
<button ion-button full color="optblue" (click)="sumbitData(representativeForm.value)"> Save</button>
</ion-footer>

View File

@ -7,5 +7,23 @@ page-pd-question-lender-representative {
.scroll-content{
background-color: #eee;
}
/*FOR IMAGES*/
img{
padding:0 5px 0 0;
height: 180px;
//width:130px;
//border:3px solid black;
//border-radius: 20px;
//background-color: gray;
}
input{
width: 100px;
border-radius: 4px;
border-color: gray;
font-size: 12px;
height: 28px;
}
}

View File

@ -4,7 +4,8 @@ import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
import { QuestionCategoryProvider } from '../../../providers/question-category/question-category';
import { ToastProvider } from '../../../providers/common-provider/toast';
import { FormGroup, FormBuilder,FormArray, Validators } from '@angular/forms';
import {CameraProvider} from '../../../providers/common-provider/camera'
import {LoadingProvider} from '../../../providers/common-provider/loading'
/**
* Generated class for the PdQuestionLenderRepresentativePage page.
*
@ -23,7 +24,14 @@ export class PdQuestionLenderRepresentativePage {
FormId: any;
pdDetails: any;
representativeForm:FormGroup;
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,public toast:ToastProvider,public fb:FormBuilder) {
imageDisplay: any[];
imageBucket: any=[];
tab: any='0';
constructor(public navCtrl: NavController, public navParams: NavParams,
public aws:AwsServiceProvider,public qustCat:QuestionCategoryProvider,
public toast:ToastProvider,public fb:FormBuilder,private cameraProvider:CameraProvider,
private loading:LoadingProvider)
{
this.pdDetails = this.navParams.get('pdDetails');
this.FormId = this.navParams.get('FormId');
@ -41,6 +49,29 @@ export class PdQuestionLenderRepresentativePage {
ionViewDidLoad() {
console.log('ionViewDidLoad PdQuestionLenderRepresentativePage');
this.getPDImages();
}
ionViewCanLeave(){
console.log("dirty",this.representativeForm.dirty);
if(this.representativeForm.dirty){
return new Promise((resolve,reject)=>{
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
alert.present();
alert.onDidDismiss((data)=>{
console.log("d",data);
if(data== false){
reject();
}
else{
resolve();
}
})
})
}
}
createlenReDetails()
@ -121,4 +152,86 @@ export class PdQuestionLenderRepresentativePage {
}
})
}
/*IMAGE SECTION*/
getPDImages(){
//FOR RETRIEVING PICTURES
this.imageDisplay=[]
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
if(!val['msg']){
console.log(val['records'])
if(val['records'].length>0){
val['records'].forEach(result=>{
this.imageDisplay.push({'image':result.doc_url,'Name':result.pd_document_title,'option':'dummy'})
})
console.log("imageBuck",this.imageDisplay);
}
}
})
}
changeName(value,index,img){
console.log(value);
this.imageDisplay[index]={'image':img,'Name':value}
}
changeNameForBucket(value,index,img){
this.imageBucket[index]={'image':img,'Name':value}
}
removeImg(index){
this.imageDisplay.splice(index,1);
}
removeImgForBucket(index){
this.imageBucket.splice(index,1)
}
capture(){
//FOR CAPTURING PICS
this.cameraProvider.getpicture().then(res=>{
console.log("Value",res)
if(res != 'error'){
this.imageBucket.push({'image':res,'Name':''});
//FOR GETTING THE DOC NAME FROM ALERT
let alert =this.toast.setAlertForDocName()
alert.present()
alert.onDidDismiss(value=>{
console.log("alert value",value);
if(value){
this.imageBucket[this.imageBucket.length-1].Name=value.Name
}
})
}
},error=>{
console.log("Camera Error ",JSON.stringify(error));
})
this.tab='1';
}
sendImage(){
this.loading.loaderForSendImage()
console.log("ll",JSON.stringify(this.imageBucket));
let records:any={
'pd_id':this.pdDetails.pd_id,
'formid':this.FormId.form_id,
'images':this.imageBucket,
'company_id':''
}
console.log("records",JSON.stringify(records))
this.qustCat.savePDImages(records).subscribe(res=>{
if(res['dataStatus']== true){
this.toast.pdTriggerappmessage("Image Saved Successfully")
// this.imageDisplay.push(this.imageBucket)
// console.log("length",this.imageDisplay.length)
this.imageBucket=[]
this.getPDImages();
}
else{
this.toast.pdTriggerappmessage('Fail');
}
})
}
}

View File

@ -8,14 +8,61 @@
</ion-navbar>
<ion-segment [(ngModel)]="tab" color="optblue">
<ion-segment-button value="0">
Form
</ion-segment-button>
<ion-segment-button value="1">
Pictures
</ion-segment-button>
</ion-segment>
</ion-header>
<ion-content padding>
<div [ngSwitch]="tab">
<mat-card *ngSwitchCase="'1'" #picContent>
<mat-card-content>
<mat-label *ngIf="imageDisplay.length ==0 && imageBucket.length ==0 "><strong>No Documents Found. Press the camera button below to capture</strong></mat-label>
<ion-grid *ngIf="imageDisplay.length >0 ">
<ion-row>
<ion-col col-6 *ngFor="let image of imageDisplay; let i=index" no-padding>
<img src="{{image.image}}" imageViewer>
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
<input *ngIf="image.Name =='' && image.option != 'dummy'" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeName($event.target.value,i,image.image)">
<button *ngIf="image.option != 'dummy'" ion-button clear color="optblue" (click)="removeImg(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
</ion-col>
<hr/>
</ion-row>
<hr/>
<hr/>
</ion-grid>
<ion-grid *ngIf="imageBucket.length >0 ">
<label style="font-size:14px;color:gray">Newly Captured Pics</label><br/>
<ion-row>
<ion-col col-6 *ngFor="let image of imageBucket; let i=index" no-padding>
<img src="{{image.image}}" imageViewer>
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
<input #focusName *ngIf="image.Name ==''" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeNameForBucket($event.target.value,i,image.image)">
<button float-right ion-button clear color="optblue" (click)="removeImgForBucket(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
</ion-col>
<hr/>
</ion-row>
</ion-grid>
</mat-card-content>
<br/>
<button secondary *ngIf="imageBucket.length >0" #focusName align="end" ion-button color="primary" (click)="sendImage()">save Images</button>
</mat-card>
<form [formGroup]="loanDetailsForm" class="address">
<form [formGroup]="loanDetailsForm" class="address" *ngSwitchCase="'0'">
<mat-card style="padding: 12px;">
<mat-form-field style="width: 100%">
@ -211,6 +258,9 @@
<!-- </ion-buttons> -->
</ion-row>
</form>
</div>
<ion-fab bottom right mini>
<button mini style="margin-bottom: 10px" ion-fab color="optblue" slot="fixed" (click)="capture()"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button></ion-fab>
</ion-content>
<ion-footer>
<button ion-button full color="optblue" (click)="submitLoanDetails()"> Save</button>

View File

@ -15,4 +15,21 @@ page-pd-question-loans {
margin-bottom: 0px !important;
}
/*FOR IMAGES*/
img{
padding:0 5px 0 0;
height: 180px;
//width:130px;
//border:3px solid black;
//border-radius: 20px;
//background-color: gray;
}
input{
width: 100px;
border-radius: 4px;
border-color: gray;
font-size: 12px;
height: 28px;
}
}

View File

@ -7,6 +7,8 @@ import { ToastProvider } from '../../../providers/common-provider/toast';
import { ConstantsProvider } from '../../../providers/constants/constants';
import { takeUntil } from 'rxjs/operators';
import { ReplaySubject, Subject } from 'rxjs';
import {CameraProvider} from '../../../providers/common-provider/camera'
import {LoadingProvider} from '../../../providers/common-provider/loading'
/**
* Generated class for the PdQuestionLoansPage page.
@ -72,12 +74,19 @@ export class PdQuestionLoansPage {
/** Subject that emits when the component has been destroyed. */
protected _onDestroy = new Subject<void>();
public filteredBanks: ReplaySubject<Dbmaster[]> = new ReplaySubject<Dbmaster[]>(1);
imageDisplay: any=[];
imageBucket: any=[];
tab: any='0';
constructor(public navCtrl: NavController, public navParams: NavParams, public fb: FormBuilder, public qustCat: QuestionCategoryProvider, public aws: AwsServiceProvider, public toast: ToastProvider,public constant:ConstantsProvider) {
constructor(public navCtrl: NavController, public navParams: NavParams, public fb: FormBuilder,
public qustCat: QuestionCategoryProvider, public aws: AwsServiceProvider,
public toast: ToastProvider,public constant:ConstantsProvider,private cameraProvider:CameraProvider,
private loading:LoadingProvider) {
this.FormId = this.navParams.get('FormId');
this.pdDetails = this.navParams.get('pdDetails');
console.log("pd",this.pdDetails);
this.applicants = this.pdDetails.applicat_details
this.applicants = this.applicants/*.filter(appt => appt.applicant_type != 2);*/
this.applicants = this.applicants.filter(appt => appt.applicant_type != 2);
this.productAbbr = this.pdDetails.product_abbr;
this.subProductName = this.pdDetails.subproduct_name;
this.users = this.aws.getlocale();
@ -144,6 +153,38 @@ export class PdQuestionLoansPage {
this.filterBank();
})
}
ionViewDidLoad() {
console .log('ionViewDidLoad PdQuestionLoansPage');
this.getLoanDetails();
this.getPDImages();
}
ngOnDestroy() {
this._onDestroy.next();
this._onDestroy.complete();
}
ionViewCanLeave(){
console.log("dirty",this.loanDetailsForm.dirty);
if(this.loanDetailsForm.dirty){
return new Promise((resolve,reject)=>{
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
alert.present();
alert.onDidDismiss((data)=>{
console.log("d",data);
if(data== false){
reject();
}
else{
resolve();
}
})
})
}
}
protected filterBank(){
if(!this.dbmasters){
@ -188,15 +229,7 @@ export class PdQuestionLoansPage {
}
ionViewDidLoad() {
console .log('ionViewDidLoad PdQuestionLoansPage');
this.getLoanDetails();
}
ngOnDestroy() {
this._onDestroy.next();
this._onDestroy.complete();
}
getDropdown() {
@ -720,6 +753,88 @@ export class PdQuestionLoansPage {
this.loanDetailsForm.controls['owner_name'].updateValueAndValidity();
}
}
/*IMAGE SECTION*/
getPDImages(){
//FOR RETRIEVING PICTURES
this.imageDisplay=[]
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
if(!val['msg']){
console.log(val['records'])
if(val['records'].length>0){
val['records'].forEach(result=>{
this.imageDisplay.push({'image':result.doc_url,'Name':result.pd_document_title,'option':'dummy'})
})
console.log("imageBuck",this.imageDisplay);
}
}
})
}
changeName(value,index,img){
console.log(value);
this.imageDisplay[index]={'image':img,'Name':value}
}
changeNameForBucket(value,index,img){
this.imageBucket[index]={'image':img,'Name':value}
}
removeImg(index){
this.imageDisplay.splice(index,1);
}
removeImgForBucket(index){
this.imageBucket.splice(index,1)
}
capture(){
//FOR CAPTURING PICS
this.cameraProvider.getpicture().then(res=>{
console.log("Value",res)
if(res != 'error'){
this.imageBucket.push({'image':res,'Name':''});
//FOR GETTING THE DOC NAME FROM ALERT
let alert =this.toast.setAlertForDocName()
alert.present()
alert.onDidDismiss(value=>{
console.log("alert value",value);
if(value){
this.imageBucket[this.imageBucket.length-1].Name=value.Name
}
})
}
},error=>{
console.log("Camera Error ",JSON.stringify(error));
})
this.tab='1';
}
sendImage(){
this.loading.loaderForSendImage()
console.log("ll",JSON.stringify(this.imageBucket));
let records:any={
'pd_id':this.pdDetails.pd_id,
'formid':this.FormId.form_id,
'images':this.imageBucket,
'company_id':''
}
console.log("records",JSON.stringify(records))
this.qustCat.savePDImages(records).subscribe(res=>{
if(res['dataStatus']== true){
this.toast.pdTriggerappmessage("Image Saved Successfully")
// this.imageDisplay.push(this.imageBucket)
// console.log("length",this.imageDisplay.length)
this.imageBucket=[]
this.getPDImages();
}
else{
this.toast.pdTriggerappmessage('Fail');
}
})
}
}

View File

@ -9,11 +9,59 @@
</ion-navbar>
<ion-segment [(ngModel)]="tab" color="optblue">
<ion-segment-button value="0">
Form
</ion-segment-button>
<ion-segment-button value="1">
Pictures
</ion-segment-button>
</ion-segment>
</ion-header>
<ion-content padding>
<form [formGroup]="neighbourhoodForm">
<div [ngSwitch]="tab">
<mat-card *ngSwitchCase="'1'" #picContent>
<mat-card-content>
<mat-label *ngIf="imageDisplay.length ==0 && imageBucket.length ==0 "><strong>No Documents Found. Press the camera button below to capture</strong></mat-label>
<ion-grid *ngIf="imageDisplay.length >0 ">
<ion-row>
<ion-col col-6 *ngFor="let image of imageDisplay; let i=index" no-padding>
<img src="{{image.image}}" imageViewer>
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
<input *ngIf="image.Name =='' && image.option != 'dummy'" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeName($event.target.value,i,image.image)">
<button *ngIf="image.option != 'dummy'" ion-button clear color="optblue" (click)="removeImg(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
</ion-col>
<hr/>
</ion-row>
<hr/>
<hr/>
</ion-grid>
<ion-grid *ngIf="imageBucket.length >0 ">
<label style="font-size:14px;color:gray">Newly Captured Pics</label><br/>
<ion-row>
<ion-col col-6 *ngFor="let image of imageBucket; let i=index" no-padding>
<img src="{{image.image}}" imageViewer>
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
<input #focusName *ngIf="image.Name ==''" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeNameForBucket($event.target.value,i,image.image)">
<button float-right ion-button clear color="optblue" (click)="removeImgForBucket(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
</ion-col>
<hr/>
</ion-row>
</ion-grid>
</mat-card-content>
<br/>
<button secondary *ngIf="imageBucket.length >0" #focusName align="end" ion-button color="primary" (click)="sendImage()">save Images</button>
</mat-card>
<form [formGroup]="neighbourhoodForm" *ngSwitchCase="'0'">
<!-- <mat-card>
<mat-label>Please Select the type</mat-label><br/>
<mat-radio-group formControlName="check_type" class="example-radio-group" style="width: 100%;">
@ -209,6 +257,10 @@
<!-- </ion-buttons> -->
</ion-row>
</form>
</div>
<ion-fab bottom right mini>
<button mini style="margin-bottom: 10px" ion-fab color="optblue" slot="fixed" (click)="capture()"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button></ion-fab>
</ion-content>
<ion-footer>
<button ion-button full color="optblue" (click)="submitData(neighbourhoodForm.value)"> Save</button>

View File

@ -28,6 +28,24 @@ page-pd-question-neighbour-hood {
mat-select{
margin:5px 0;
}
/*FOR IMAGES*/
img{
padding:0 5px 0 0;
height: 180px;
//width:130px;
//border:3px solid black;
//border-radius: 20px;
//background-color: gray;
}
input{
width: 100px;
border-radius: 4px;
border-color: gray;
font-size: 12px;
height: 28px;
}
}

View File

@ -5,7 +5,8 @@ import { QuestionCategoryProvider } from '../../../providers/question-category/q
import { ToastProvider } from '../../../providers/common-provider/toast';
import { FormGroup, FormBuilder,FormArray,Validators,FormControl} from '@angular/forms';
import { ConstantsProvider } from '../../../providers/constants/constants'
import {CameraProvider} from '../../../providers/common-provider/camera'
import {LoadingProvider} from '../../../providers/common-provider/loading'
/**
* Generated class for the PdQuestionNeighbourHoodPage page.
*
@ -38,8 +39,15 @@ export class PdQuestionNeighbourHoodPage {
existCompanyList: any=[];
mergeCompanyApplicant: any=[];
isOrganisationOwner: any=[];
imageDisplay: any=[];
imageBucket: any=[];
tab: any='0';
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,private cameraProvider:CameraProvider,private loading:LoadingProvider)
{
this.pdDetails = this.navParams.get('pdDetails');
this.FormId = this.navParams.get('FormId');
this.applicants = this.pdDetails.applicat_details;
@ -64,6 +72,28 @@ export class PdQuestionNeighbourHoodPage {
ionViewDidLoad() {
console.log('ionViewDidLoad PdQuestionNeighbourHoodPage');
this.getneighbourhood();
this.getPDImages();
}
ionViewCanLeave(){
console.log("dirty",this.neighbourhoodForm.dirty);
if(this.neighbourhoodForm.dirty){
return new Promise((resolve,reject)=>{
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
alert.present();
alert.onDidDismiss((data)=>{
console.log("d",data);
if(data== false){
reject();
}
else{
resolve();
}
})
})
}
}
getdropdown()
@ -469,6 +499,88 @@ ChdCtrls.controls.other_organisation_owner.updateValueAndValidity();
})
}
/*Image SECTION*/
getPDImages(){
//FOR RETRIEVING PICTURES
this.imageDisplay=[]
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
if(!val['msg']){
console.log(val['records'])
if(val['records'].length>0){
val['records'].forEach(result=>{
this.imageDisplay.push({'image':result.doc_url,'Name':result.pd_document_title,'option':'dummy'})
})
console.log("imageBuck",this.imageDisplay);
}
}
})
}
changeName(value,index,img){
console.log(value);
this.imageDisplay[index]={'image':img,'Name':value}
}
changeNameForBucket(value,index,img){
this.imageBucket[index]={'image':img,'Name':value}
}
removeImg(index){
this.imageDisplay.splice(index,1);
}
removeImgForBucket(index){
this.imageBucket.splice(index,1)
}
capture(){
//FOR CAPTURING PICS
this.cameraProvider.getpicture().then(res=>{
console.log("Value",res)
if(res != 'error'){
this.imageBucket.push({'image':res,'Name':''});
//FOR GETTING THE DOC NAME FROM ALERT
let alert =this.toast.setAlertForDocName()
alert.present()
alert.onDidDismiss(value=>{
console.log("alert value",value);
if(value){
this.imageBucket[this.imageBucket.length-1].Name=value.Name
}
})
}
},error=>{
console.log("Camera Error ",JSON.stringify(error));
})
this.tab='1';
}
sendImage(){
this.loading.loaderForSendImage()
console.log("ll",JSON.stringify(this.imageBucket));
let records:any={
'pd_id':this.pdDetails.pd_id,
'formid':this.FormId.form_id,
'images':this.imageBucket,
'company_id':''
}
console.log("records",JSON.stringify(records))
this.qustCat.savePDImages(records).subscribe(res=>{
if(res['dataStatus']== true){
this.toast.pdTriggerappmessage("Image Saved Successfully")
// this.imageDisplay.push(this.imageBucket)
// console.log("length",this.imageDisplay.length)
this.imageBucket=[]
this.getPDImages();
}
else{
this.toast.pdTriggerappmessage('Fail');
}
})
}
}

View File

@ -8,12 +8,60 @@
</ion-navbar>
<ion-segment [(ngModel)]="tab" color="optblue">
<ion-segment-button value="0">
Form
</ion-segment-button>
<ion-segment-button value="1">
Pictures
</ion-segment-button>
</ion-segment>
</ion-header>
<ion-content padding>
<form [formGroup]="otherIncomeForm" class="address">
<div [ngSwitch]="tab">
<mat-card *ngSwitchCase="'1'" #picContent>
<mat-card-content>
<mat-label *ngIf="imageDisplay.length ==0 && imageBucket.length ==0 "><strong>No Documents Found. Press the camera button below to capture</strong></mat-label>
<ion-grid *ngIf="imageDisplay.length >0 ">
<ion-row>
<ion-col col-6 *ngFor="let image of imageDisplay; let i=index" no-padding>
<img src="{{image.image}}" imageViewer>
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
<input *ngIf="image.Name =='' && image.option != 'dummy'" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeName($event.target.value,i,image.image)">
<button *ngIf="image.option != 'dummy'" ion-button clear color="optblue" (click)="removeImg(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
</ion-col>
<hr/>
</ion-row>
<hr/>
<hr/>
</ion-grid>
<ion-grid *ngIf="imageBucket.length >0 ">
<label style="font-size:14px;color:gray">Newly Captured Pics</label><br/>
<ion-row>
<ion-col col-6 *ngFor="let image of imageBucket; let i=index" no-padding>
<img src="{{image.image}}" imageViewer>
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
<input #focusName *ngIf="image.Name ==''" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeNameForBucket($event.target.value,i,image.image)">
<button float-right ion-button clear color="optblue" (click)="removeImgForBucket(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
</ion-col>
<hr/>
</ion-row>
</ion-grid>
</mat-card-content>
<br/>
<button secondary *ngIf="imageBucket.length >0" #focusName align="end" ion-button color="primary" (click)="sendImage()">save Images</button>
</mat-card>
<form [formGroup]="otherIncomeForm" class="address" *ngSwitchCase="'0'">
<!-- <mat-form-field style="width: 100%" >
<mat-select placeholder="Other Income"
formControlName="other_income" >
@ -110,6 +158,9 @@
<!-- </ion-buttons> -->
</ion-row>
</form>
</div>
<ion-fab bottom right mini>
<button mini style="margin-bottom: 10px" ion-fab color="optblue" slot="fixed" (click)="capture()"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button></ion-fab>
</ion-content>
<ion-footer>
<button ion-button full color="optblue" (click)="submitOtherIncome(otherIncomeForm.value)" > Save</button>

View File

@ -16,5 +16,22 @@ page-pd-question-other-income {
.scroll-content{
background-color: #eee;
}
/*FOR IMAGES*/
img{
padding:0 5px 0 0;
height: 180px;
//width:130px;
//border:3px solid black;
//border-radius: 20px;
//background-color: gray;
}
input{
width: 100px;
border-radius: 4px;
border-color: gray;
font-size: 12px;
height: 28px;
}
}

View File

@ -6,6 +6,8 @@ import { AwsServiceProvider } from '../../../providers/aws-service/aws-service';
import { ToastProvider } from '../../../providers/common-provider/toast';
import { ConstantsProvider } from '../../../providers/constants/constants'
import { PdQuestionRentalInfoPage } from '../pd-question-rental-info/pd-question-rental-info';
import {CameraProvider} from '../../../providers/common-provider/camera'
import {LoadingProvider} from '../../../providers/common-provider/loading'
/**
* Generated class for the PdQuestionOtherIncomePage page.
@ -39,8 +41,15 @@ export class PdQuestionOtherIncomePage {
applicants: any=[];
isOrganisationOwner: any=[];
customer_segment_abbr: any;
imageDisplay: any=[];
imageBucket: any=[];
tab: any='0';
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,public qustCat:QuestionCategoryProvider,public aws:AwsServiceProvider,public toast:ToastProvider, public constant:ConstantsProvider) {
constructor(public navCtrl: NavController, public navParams: NavParams,public fb:FormBuilder,
public qustCat:QuestionCategoryProvider,public aws:AwsServiceProvider,
public toast:ToastProvider, public constant:ConstantsProvider,private cameraProvider:CameraProvider,
private loading:LoadingProvider)
{
this.pdDetails = this.navParams.get('pdDetails');
this.pdid=this.pdDetails.pd_id;
this.FormId = this.navParams.get('FormId');
@ -78,6 +87,28 @@ export class PdQuestionOtherIncomePage {
ionViewDidLoad() {
console.log('ionViewDidLoad PdQuestionOtherIncomePage');
this.getOtherIncome();
this.getPDImages();
}
ionViewCanLeave(){
console.log("dirty",this.otherIncomeForm.dirty);
if(this.otherIncomeForm.dirty){
return new Promise((resolve,reject)=>{
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
alert.present();
alert.onDidDismiss((data)=>{
console.log("d",data);
if(data== false){
reject();
}
else{
resolve();
}
})
})
}
}
createDetail():FormGroup {
@ -301,4 +332,86 @@ getOtherIncome()
}
})
}
/*IMAGE SECTION*/
getPDImages(){
//FOR RETRIEVING PICTURES
this.imageDisplay=[]
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
if(!val['msg']){
console.log(val['records'])
if(val['records'].length>0){
val['records'].forEach(result=>{
this.imageDisplay.push({'image':result.doc_url,'Name':result.pd_document_title,'option':'dummy'})
})
console.log("imageBuck",this.imageDisplay);
}
}
})
}
changeName(value,index,img){
console.log(value);
this.imageDisplay[index]={'image':img,'Name':value}
}
changeNameForBucket(value,index,img){
this.imageBucket[index]={'image':img,'Name':value}
}
removeImg(index){
this.imageDisplay.splice(index,1);
}
removeImgForBucket(index){
this.imageBucket.splice(index,1)
}
capture(){
//FOR CAPTURING PICS
this.cameraProvider.getpicture().then(res=>{
console.log("Value",res)
if(res != 'error'){
this.imageBucket.push({'image':res,'Name':''});
//FOR GETTING THE DOC NAME FROM ALERT
let alert =this.toast.setAlertForDocName()
alert.present()
alert.onDidDismiss(value=>{
console.log("alert value",value);
if(value){
this.imageBucket[this.imageBucket.length-1].Name=value.Name
}
})
}
},error=>{
console.log("Camera Error ",JSON.stringify(error));
})
this.tab='1';
}
sendImage(){
this.loading.loaderForSendImage()
console.log("ll",JSON.stringify(this.imageBucket));
let records:any={
'pd_id':this.pdDetails.pd_id,
'formid':this.FormId.form_id,
'images':this.imageBucket,
'company_id':''
}
console.log("records",JSON.stringify(records))
this.qustCat.savePDImages(records).subscribe(res=>{
if(res['dataStatus']== true){
this.toast.pdTriggerappmessage("Image Saved Successfully")
// this.imageDisplay.push(this.imageBucket)
// console.log("length",this.imageDisplay.length)
this.imageBucket=[]
this.getPDImages();
}
else{
this.toast.pdTriggerappmessage('Fail');
}
})
}
}

View File

@ -5,10 +5,61 @@
</button>
<ion-title *ngIf="!viewchange">{{FormId.form_name}}</ion-title>
</ion-navbar>
<ion-segment [(ngModel)]="tab" color="optblue">
<ion-segment-button value="0">
Form
</ion-segment-button>
<ion-segment-button value="1">
Pictures
</ion-segment-button>
</ion-segment>
</ion-header>
<ion-content padding>
<form [formGroup]="rentalForms">
<div [ngSwitch]="tab">
<mat-card *ngSwitchCase="'1'" #picContent>
<mat-card-content>
<mat-label *ngIf="imageDisplay.length ==0 && imageBucket.length ==0 "><strong>No Documents Found. Press the camera button below to capture</strong></mat-label>
<ion-grid *ngIf="imageDisplay.length >0 ">
<ion-row>
<ion-col col-6 *ngFor="let image of imageDisplay; let i=index" no-padding>
<img src="{{image.image}}" imageViewer>
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
<input class="docName" *ngIf="image.Name =='' && image.option != 'dummy'" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeName($event.target.value,i,image.image)">
<button *ngIf="image.option != 'dummy'" ion-button clear color="optblue" (click)="removeImg(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
</ion-col>
<hr/>
</ion-row>
<hr/>
<hr/>
</ion-grid>
<ion-grid *ngIf="imageBucket.length >0 ">
<label style="font-size:14px;color:gray">Newly Captured Pics</label><br/>
<ion-row>
<ion-col col-6 *ngFor="let image of imageBucket; let i=index" no-padding>
<img src="{{image.image}}" imageViewer>
<label *ngIf="image.Name != ''"><strong>{{image.Name}}</strong></label>
<input class="docName" #focusName *ngIf="image.Name ==''" width="20px" ion-input type="text" placeholder="Document Name" (blur)="changeNameForBucket($event.target.value,i,image.image)">
<button float-right ion-button clear color="optblue" (click)="removeImgForBucket(i)"><ion-icon style="font-size:22px" name="md-trash"></ion-icon></button>
</ion-col>
<hr/>
</ion-row>
</ion-grid>
</mat-card-content>
<br/>
<button secondary *ngIf="imageBucket.length >0" #focusName align="end" ion-button color="primary" (click)="sendImage()">save Images</button>
</mat-card>
<form [formGroup]="rentalForms" *ngSwitchCase="'0'">
<mat-card>
<mat-card-title><strong>Property Details</strong></mat-card-title>
@ -26,31 +77,32 @@
<!--start name of the who showing property to officer -->
<mat-form-field style="width:100%">
<mat-select placeholder="State" formControlName="state" required>
<!-- <mat-select placeholder="State" formControlName="state" required>
<mat-option *ngFor="let stVal of stateList" [value]="stVal.state_id">
{{stVal.name}}
</mat-option>
</mat-select>
<!-- <mat-select placeholder="State" formControlName="state" required>
</mat-select> -->
<mat-select placeholder="State" formControlName="state" required>
<mat-option>
<ngx-mat-select-search formControlName="stateSearch" [placeholderLabel]="'Search State'"
[noEntriesFoundLabel]="'No Records Found'" (keyup)="forSearchableDropdown(rentalForms,'state')">
<ion-icon name="md-close" ngxMatSelectSearchClear></ion-icon>
</ngx-mat-select-search>
</mat-option>
<mat-option>Select</mat-option>
<mat-option *ngFor="let stVal of stateList" [value]="stVal.state_id">{{stVal.name}}
</mat-option>
</mat-select> -->
</mat-select>
</mat-form-field>
<mat-form-field style="width:100%">
<mat-label>City</mat-label>
<!-- <mat-label>City</mat-label>
<mat-select placeholder="City" formControlName="city" required>
<mat-option *ngFor="let ctVal of cityList" [value]="ctVal.city_id">
{{ctVal.city_name}}
</mat-option>
</mat-select>
<!-- <mat-select placeholder="City" formControlName="city" required>
</mat-select> -->
<mat-select placeholder="City" formControlName="city" required>
<mat-option>
<ngx-mat-select-search formControlName="citySearch" [placeholderLabel]="'Search City'"
[noEntriesFoundLabel]="'No Records Found'" (keyup)="forSearchableDropdown(rentalForms,'city')">
@ -61,27 +113,28 @@
<mat-option *ngFor="let ctVal of cityList" [value]="ctVal.city_id">
{{ctVal.city_name}}
</mat-option>
</mat-select> -->
</mat-select>
</mat-form-field>
<mat-form-field style="width:100%">
<mat-label>Pincode</mat-label>
<!-- <mat-label>Pincode</mat-label>
<mat-select placeholder="" formControlName="pincode" required>
<mat-option *ngFor="let pinVal of pincodeList" [value]="pinVal.pincode_id">
{{pinVal.pincode}}
</mat-option>
</mat-select>
<!-- <mat-select placeholder="" formControlName="pincode" required>
</mat-select> -->
<mat-select placeholder="Pincode" formControlName="pincode" required>
<mat-option>
<ngx-mat-select-search formControlName="pincodeSearch" [placeholderLabel]="'Search Pincode'"
[noEntriesFoundLabel]="'No Records Found'" (keyup)="forSearchableDropdown(rentalForms,'pin')">
<ion-icon name="md-close" ngxMatSelectSearchClear></ion-icon>
</ngx-mat-select-search>
</mat-option>
<mat-option>Select</mat-option>
<mat-option *ngFor="let pinVal of pincodeList" [value]="pinVal.pincode_id">
{{pinVal.pincode}}
</mat-option>
</mat-select> -->
</mat-select>
</mat-form-field>
<div align="left" style="margin-left: 0%;">
@ -773,9 +826,15 @@
<!-- <ion-buttons >
<ion-button color="optblue" full[disabled]="!pdforms.valid" mat-raised-button style="width:100%" (click)="savepdDetails(pdforms.value)">Save <ion-icon name="md-disc"></ion-icon></ion-button> -->
<button ion-button full color="optblue" (click)="saveAlert(rentalForms.value)"> Save</button>
<!-- </ion-buttons> -->
</ion-row>
</form>
</ion-content>
</div>
<ion-fab bottom right mini>
<button mini style="margin-bottom: 10px" ion-fab color="optblue" slot="fixed" (click)="capture()"><ion-icon name="md-camera" style="font-size: 24px"></ion-icon></button></ion-fab>
</ion-content>
<ion-footer>
<button ion-button full color="optblue" (click)="saveAlert(rentalForms.value)"> Save</button>
</ion-footer>

View File

@ -30,4 +30,21 @@ page-pd-question-rental-info {
input{
height: 32px;
}
/*FOR IMAGES*/
img{
padding:0 5px 0 0;
height: 180px;
//width:130px;
//border:3px solid black;
//border-radius: 20px;
//background-color: gray;
}
.docName{
width: 100px;
border-radius: 4px;
border-color: gray;
font-size: 12px;
height: 28px;
}
}

View File

@ -7,7 +7,8 @@ import { FormGroup, FormBuilder, FormArray, Validators, FormControl } from '@ang
import {ConstantsProvider} from '../../../providers/constants/constants';
import {DatePipe} from '@angular/common'
import { Message } from '@angular/compiler/src/i18n/i18n_ast';
import {LoadingProvider} from '../../../providers/common-provider/loading'
import {CameraProvider} from '../../../providers/common-provider/camera'
import { takeUntil } from 'rxjs/operators';
import { Subject } from 'rxjs';
@ -40,12 +41,13 @@ export class PdQuestionRentalInfoPage {
paymentPaidOptions: any=[{id:1,name:"Paid in Cash"},{id:2,name:"Paid through Banking Channel"},{id:3,name:"Combination of Cash & Bank"}];
propertyNature: any=[{id:2,name:"Residential Property"},{id:3,name:"Commercial Property"},{id:4,name:"Industrial Property"},{id:1,name:"Others (Please Specify)"}];
unitTypeList: any=[];
stateList:any=[];
cityList:any=[];
pincodeList:any=[];
stateData:any=[];
cityData:any=[];
pincodeData:any=[];
stateList:any=[];
cityList:any=[];
pincodeList:any=[];
documentList: any=[{id:2,name:"Property Title Document"},{id:3,name:"Electricity Bill with name of owner mentioned therein"},{id:4,name:"Property tax Receipts"},{id:1,name:"Others (Please Specify)"}];
//floorList: any=[{id:1,name:"Ground Floor"},{id:1,name:"First Floor"},{id:1,name:"Second Floor"},{id:1,name:"Third Floor"}]
//unitMeasurementList: any=[{id:2,name:"Square Feet"},{id:3,name:"Square Yards"},{id:4,name:"Square Meters"},{id:5,name:"Acres"},{id:6,name:"Hectares"},{id:1,name:"Others (Please Specify)"}];
@ -66,8 +68,16 @@ export class PdQuestionRentalInfoPage {
amount_received_cash_per_met_Inwords: any=[];
amount_received_bank_per_met_Inwords: any=[];
protected _onDestroy = new Subject<void>();
imageBucket: any=[];
tab: any='0';
imageDisplay: any=[];
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,public toast:ToastProvider,public qustCat:QuestionCategoryProvider,public fb:FormBuilder,public constprovider:ConstantsProvider,public alertCtrl:AlertController) {
constructor(public navCtrl: NavController, public navParams: NavParams,
public aws:AwsServiceProvider,public toast:ToastProvider,
public qustCat:QuestionCategoryProvider,public fb:FormBuilder,
public constprovider:ConstantsProvider,public alertCtrl:AlertController,
private loading:LoadingProvider,private cameraProvider:CameraProvider)
{
this.FormId = this.navParams.get('FormId');
this.pdDetails = this.navParams.get('pdDetails');
this.users = this.aws.getlocale();
@ -162,9 +172,9 @@ export class PdQuestionRentalInfoPage {
this.qustCat.getStateWiseCities(val).subscribe(data => {
if (data.status == 200) {
this.cityData = data.records.cities;
this.cityList = data.records.cities;
this.cityList = this.cityData.slice();
this.pincodeData = data.records.pincode;
this.pincodeList = data.records.cities;
this.pincodeList = this.pincodeData.slice();
}
});
});
@ -190,6 +200,28 @@ export class PdQuestionRentalInfoPage {
ionViewDidLoad() {
console.log('ionViewDidLoad PdQuestionRentalInfoPage');
this.getPDImages();
}
ionViewCanLeave(){
console.log("dirty",this.rentalForms.dirty);
if(this.rentalForms.dirty){
return new Promise((resolve,reject)=>{
let alert=this.toast.setAlert("Form is Modified","Are you sure want to Go Back")
alert.present();
alert.onDidDismiss((data)=>{
console.log("d",data);
if(data== false){
reject();
}
else{
resolve();
}
})
})
}
}
getdropList()
@ -1361,31 +1393,113 @@ ValidatedRentAmount(value:any,index:number,type: number){
}
}
// forSearchableDropdown(val:any,Flag:any){
// // val=val.controls['relationSearch'].value
// console.log("val",val,'Flag',Flag);
// switch(Flag){
// case 'state' :
// console.log("val",val.controls['state'].value,'Flag',Flag,'1');
// val.controls['stateSearch'].valueChanges
// .pipe(takeUntil(this._onDestroy))
// .subscribe(()=>{
// }); break;
// case 'city' :
// console.log("val",val.controls['city'].value,'Flag',Flag,'2');
// val.controls['citySearch'].valueChanges
// .pipe(takeUntil(this._onDestroy))
// .subscribe(()=>{
// this.cityList =this.constprovider.searchData(this.cityData,val.controls['city'].value,Flag)
// }); break;
// case 'pin' :
// console.log("val",val.controls['pincode'].value,'Flag',Flag,'3');
// val.controls['pincodeSearch'].valueChanges
// .pipe(takeUntil(this._onDestroy))
// .subscribe(()=>{
// this.pincodeList =this.constprovider.searchData(this.pincodeData,val.controls['pincode'].value,Flag)
// }); break;
// }
// }
forSearchableDropdown(val:any,Flag:any){
// val=val.controls['relationSearch'].value
console.log("val",val,'Flag',Flag);
switch(Flag){
case 'state' :
console.log("val",val.controls['stateSearch'].value,'Flag',Flag,'1');
val.controls['stateSearch'].valueChanges
.pipe(takeUntil(this._onDestroy))
.subscribe(()=>{
this.stateList=this.constprovider.searchData(this.stateData,val.controls['stateSearch'].value,Flag)
}); break;
case 'city' :
console.log("val",val.controls['citySearch'].value,'Flag',Flag,'2');
val.controls['citySearch'].valueChanges
.pipe(takeUntil(this._onDestroy))
.subscribe(()=>{
this.cityList =this.constprovider.searchData(this.cityData,val.controls['citySearch'].value,Flag)
}); break;
case 'pin' :
console.log("val",val.controls['pincodeSearch'].value,'Flag',Flag,'3');
val.controls['pincodeSearch'].valueChanges
.pipe(takeUntil(this._onDestroy))
.subscribe(()=>{
this.pincodeList =this.constprovider.searchData(this.pincodeData,val.controls['pincodeSearch'].value,Flag)
}); break;
}
}
/*IMAGE SECTION*/
getPDImages(){
//FOR RETRIEVING PICTURES
this.imageDisplay=[]
let record_for_pic = {'pd_id':this.pdDetails.pd_id,'form_id':this.FormId.form_id}
this.qustCat.getPDImages(record_for_pic).subscribe(val=>{
if(!val['msg']){
console.log(val['records'])
if(val['records'].length>0){
val['records'].forEach(result=>{
this.imageDisplay.push({'image':result.doc_url,'Name':result.pd_document_title,'option':'dummy'})
})
console.log("imageBuck",this.imageDisplay);
}
}
})
}
changeName(value,index,img){
console.log(value);
this.imageDisplay[index]={'image':img,'Name':value}
}
changeNameForBucket(value,index,img){
this.imageBucket[index]={'image':img,'Name':value}
}
removeImg(index){
this.imageDisplay.splice(index,1);
}
removeImgForBucket(index){
this.imageBucket.splice(index,1)
}
capture(){
//FOR CAPTURING PICS
this.cameraProvider.getpicture().then(res=>{
console.log("Value",res)
if(res != 'error'){
this.imageBucket.push({'image':res,'Name':''});
//FOR GETTING THE DOC NAME FROM ALERT
let alert =this.toast.setAlertForDocName()
alert.present()
alert.onDidDismiss(value=>{
console.log("alert value",value);
if(value){
this.imageBucket[this.imageBucket.length-1].Name=value.Name
}
})
}
},error=>{
console.log("Camera Error ",JSON.stringify(error));
})
this.tab='1';
}
sendImage(){
this.loading.loaderForSendImage()
console.log("ll",JSON.stringify(this.imageBucket));
let records:any={
'pd_id':this.pdDetails.pd_id,
'formid':this.FormId.form_id,
'images':this.imageBucket,
'company_id':''
}
console.log("records",JSON.stringify(records))
this.qustCat.savePDImages(records).subscribe(res=>{
if(res['dataStatus']== true){
this.toast.pdTriggerappmessage("Image Saved Successfully")
// this.imageDisplay.push(this.imageBucket)
// console.log("length",this.imageDisplay.length)
this.imageBucket=[]
this.getPDImages();
}
else{
this.toast.pdTriggerappmessage('Fail');
}
})
}
}

View File

@ -28,7 +28,7 @@ export class RupeeCurrencyFormatPipe implements PipeTransform {
output += "." + result[1];
}
return currencySymbol + output;
return currencySymbol +' '+ output;
}
// return value.toLowerCase();
}

View File

@ -26,12 +26,13 @@ export class CameraProvider {
// If set to crop, restricts the image to a square of 600 by 600
return this.camera.getPicture(options).then(imageData => {
return this.camera.getPicture(options).then(imageData => {
const base64Image = 'data:image/png;base64,' + imageData;
// console.log(base64Image);
console.log("base 64",base64Image);
return base64Image;
}, error => {
console.log('CAMERA ERROR -> ' + JSON.stringify(error));
return "error"
});
}

View File

@ -1,6 +1,7 @@
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { LoadingController } from 'ionic-angular';
import { async } from 'rxjs/internal/scheduler/async';
/*
Generated class for the LoadingProvider provider.
@ -23,5 +24,12 @@ export class LoadingProvider {
this.loading.present();
}
loaderForSendImage(){
const loading=this.loadingCtrl.create({
content:'Sending...',
duration:2000,
})
return loading.present();
}
}

View File

@ -35,7 +35,7 @@ let alert=this.alertCtrl.create({
text:'Yes',
cssClass:'btnYes',
handler:()=>{
alert.dismiss(true)
alert.dismiss('s')
return false
}
},
@ -49,6 +49,35 @@ let alert=this.alertCtrl.create({
}]
});
//alert.present()
return alert
}
setAlertForDocName(){
let alert=this.alertCtrl.create({
title:'Document Name',
message: 'Please Enter the Document Name',
cssClass:'prompt_alert',
inputs:[
{
name:'Name',
//value:this.imageBucket[index].Name
placeholder:'Document Name'
}
],
buttons:[
{
text:'Submit',
handler:data=>{
console.log(data.Name)
alert.dismiss(data.Name)
}
}
]
})
//alert.present();
//this.inputFocus.setFocus();
return alert
}
}

View File

@ -200,7 +200,17 @@ searchData(data,val: any,option) {
DataValue=data.filter(res => res.lender_name.toLowerCase().indexOf(searchVal) > -1)
return DataValue
}
else if(option == "city"){
console.log("city",data)
DataValue=data.filter(res=>res.city_name.toLowerCase().indexOf(searchVal) > -1)
return DataValue
}
else if(option == "pin"){
DataValue=data.filter(res=>res.pincode.toLowerCase().indexOf(searchVal) > -1)
return DataValue
}
else{
//This is suitable for state
DataValue=data.filter(res => res.name.toLowerCase().indexOf(searchVal) > -1)
return DataValue
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -29089,7 +29089,7 @@ page-pd-question-address textarea {
}
page-pd-question-address img {
padding: 0 5px 5px 5px;
padding: 0 5px 0 0;
height: 180px;
}
@ -29101,6 +29101,25 @@ page-pd-question-address input {
height: 28px;
}
page-pd-question-assessed-business .scroll-content {
padding: 16px;
}
page-pd-question-assessed-business .scroll-content {
background-color: #eee;
}
page-pd-question-assessed-business .mat-card {
margin-bottom: 15px;
border-radius: 10px !important;
-webkit-box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.56), 0 4px 25px 0 rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2) !important;
box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.56), 0 4px 25px 0 rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2) !important;
}
page-pd-question-assessed-business .mat-card-content {
margin-bottom: 0px !important;
}
page-pd-question-assessed-daily-purchase mat-form-field {
width: 100%;
}
@ -29262,6 +29281,25 @@ page-pd-question-assessed-dash .radio {
font-size: 24px;
}
page-pd-question-assessed-household .scroll-content {
padding: 16px;
}
page-pd-question-assessed-household .scroll-content {
background-color: #eee;
}
page-pd-question-assessed-household .mat-card {
margin-bottom: 15px;
border-radius: 10px !important;
-webkit-box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.56), 0 4px 25px 0 rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2) !important;
box-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.56), 0 4px 25px 0 rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.2) !important;
}
page-pd-question-assessed-household .mat-card-content {
margin-bottom: 0px !important;
}
page-pd-question-assessed-info ion-scroll.scroll-y .scroll-content {
width: 100%;
height: 200px;
@ -29366,7 +29404,7 @@ page-pd-question-assests .mat-card-content {
}
page-pd-question-assests img {
padding: 0 5px 5px 5px;
padding: 0 5px 0 0;
height: 180px;
}
@ -29393,6 +29431,19 @@ page-pd-question-banking .scroll-content {
background-color: #eee;
}
page-pd-question-banking img {
padding: 0 5px 0 0;
height: 180px;
}
page-pd-question-banking input {
width: 100px;
border-radius: 4px;
border-color: gray;
font-size: 12px;
height: 28px;
}
page-pd-question-business-group .mat-expansion-panel {
margin-bottom: 10px !important;
background-color: #e14533 !important;
@ -29789,6 +29840,23 @@ page-pd-question-current-loans .mat-card-content {
margin-bottom: 0px !important;
}
page-pd-question-current-loans img {
padding: 0 5px 0 0;
height: 180px;
}
page-pd-question-current-loans input {
width: 100px;
border-radius: 4px;
border-color: gray;
font-size: 12px;
height: 28px;
}
page-pd-question-emp-info {
/*FOR IMAGES*/
}
page-pd-question-emp-info mat-hint {
font-size: 11px;
}
@ -29812,6 +29880,23 @@ page-pd-question-emp-info .scroll-content {
background-color: #eee;
}
page-pd-question-emp-info img {
padding: 0 5px 0 0;
height: 180px;
}
page-pd-question-emp-info input {
width: 100px;
border-radius: 4px;
border-color: gray;
font-size: 12px;
height: 28px;
}
page-pd-question-family {
/*FOR IMAGES*/
}
page-pd-question-family mat-form-field {
width: 100%;
}
@ -29835,6 +29920,23 @@ page-pd-question-family h4 {
font-size: 120%;
}
page-pd-question-family img {
padding: 0 5px 0 0;
height: 180px;
}
page-pd-question-family input {
width: 100px;
border-radius: 4px;
border-color: gray;
font-size: 12px;
height: 28px;
}
page-pd-question-final-remark {
/*FOR IMAGES*/
}
page-pd-question-final-remark mat-card {
margin-bottom: 15px;
border-radius: 10px !important;
@ -29875,6 +29977,23 @@ page-pd-question-final-remark mat-select {
margin: 5px 0;
}
page-pd-question-final-remark img {
padding: 0 5px 0 0;
height: 180px;
}
page-pd-question-final-remark input {
width: 100px;
border-radius: 4px;
border-color: gray;
font-size: 12px;
height: 28px;
}
page-pd-question-general-info {
/*FOR IMAGES*/
}
page-pd-question-general-info .item-md {
padding-left: 0px !important;
}
@ -29904,6 +30023,23 @@ page-pd-question-general-info ion-toggle {
zoom: 0.8;
}
page-pd-question-general-info img {
padding: 0 5px 0 0;
height: 180px;
}
page-pd-question-general-info input {
width: 100px;
border-radius: 4px;
border-color: gray;
font-size: 12px;
height: 28px;
}
page-pd-question-lender-representative {
/*FOR IMAGES*/
}
page-pd-question-lender-representative mat-card {
margin-bottom: 15px;
border-radius: 10px !important;
@ -29915,6 +30051,23 @@ page-pd-question-lender-representative .scroll-content {
background-color: #eee;
}
page-pd-question-lender-representative img {
padding: 0 5px 0 0;
height: 180px;
}
page-pd-question-lender-representative input {
width: 100px;
border-radius: 4px;
border-color: gray;
font-size: 12px;
height: 28px;
}
page-pd-question-loans {
/*FOR IMAGES*/
}
page-pd-question-loans mat-hint {
font-size: 12px;
}
@ -29934,6 +30087,23 @@ page-pd-question-loans .mat-card-content {
margin-bottom: 0px !important;
}
page-pd-question-loans img {
padding: 0 5px 0 0;
height: 180px;
}
page-pd-question-loans input {
width: 100px;
border-radius: 4px;
border-color: gray;
font-size: 12px;
height: 28px;
}
page-pd-question-neighbour-hood {
/*FOR IMAGES*/
}
page-pd-question-neighbour-hood mat-form-field {
width: 100%;
}
@ -29970,6 +30140,23 @@ page-pd-question-neighbour-hood mat-select {
margin: 5px 0;
}
page-pd-question-neighbour-hood img {
padding: 0 5px 0 0;
height: 180px;
}
page-pd-question-neighbour-hood input {
width: 100px;
border-radius: 4px;
border-color: gray;
font-size: 12px;
height: 28px;
}
page-pd-question-other-income {
/*FOR IMAGES*/
}
page-pd-question-other-income mat-form-field {
width: 100%;
}
@ -29993,6 +30180,23 @@ page-pd-question-other-income .scroll-content {
background-color: #eee;
}
page-pd-question-other-income img {
padding: 0 5px 0 0;
height: 180px;
}
page-pd-question-other-income input {
width: 100px;
border-radius: 4px;
border-color: gray;
font-size: 12px;
height: 28px;
}
page-pd-question-rental-info {
/*FOR IMAGES*/
}
page-pd-question-rental-info mat-hint {
font-size: 11px;
}
@ -30028,3 +30232,16 @@ page-pd-question-rental-info textarea.mat-input-element {
page-pd-question-rental-info input {
height: 32px;
}
page-pd-question-rental-info img {
padding: 0 5px 0 0;
height: 180px;
}
page-pd-question-rental-info .docName {
width: 100px;
border-radius: 4px;
border-color: gray;
font-size: 12px;
height: 28px;
}