Fairoj : Sales Pd template changes and old changes
This commit is contained in:
parent
928388c0ab
commit
1ea26c578a
@ -41,7 +41,8 @@ import {
|
||||
MatToolbarModule,
|
||||
MatTooltipModule,
|
||||
MatStepperModule,
|
||||
MatFormFieldModule
|
||||
MatFormFieldModule,
|
||||
MAT_DATE_LOCALE
|
||||
} from '@angular/material';
|
||||
import { AwsServiceProvider } from '../providers/aws-service/aws-service';
|
||||
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
||||
@ -214,7 +215,7 @@ export class HammerConfig extends HammerGestureConfig {
|
||||
IonicStorageProvider,
|
||||
OfflineManagerCreditProvider,
|
||||
ApiServiceProvider,
|
||||
|
||||
{ provide: MAT_DATE_LOCALE, useValue: 'en-GB' }
|
||||
],
|
||||
// exports:[HomePageModule]
|
||||
|
||||
|
||||
@ -63,13 +63,6 @@
|
||||
"validator":"Validators.required",
|
||||
"message":"Company Name Required",
|
||||
"value":null
|
||||
},
|
||||
{
|
||||
"name":"pattern",
|
||||
"isactive":"1",
|
||||
"validator":"[A-Za-z ]*",
|
||||
"message":"alphabets only ",
|
||||
"value":null
|
||||
}
|
||||
]
|
||||
},
|
||||
1778
src/assets/data/sales_pd_templates/22-2.json
Normal file
1778
src/assets/data/sales_pd_templates/22-2.json
Normal file
File diff suppressed because it is too large
Load Diff
1396
src/assets/data/sales_pd_templates/8-1.json
Normal file
1396
src/assets/data/sales_pd_templates/8-1.json
Normal file
File diff suppressed because it is too large
Load Diff
1539
src/assets/data/sales_pd_templates/8-2.json
Normal file
1539
src/assets/data/sales_pd_templates/8-2.json
Normal file
File diff suppressed because it is too large
Load Diff
1055
src/assets/data/sales_pd_templates/9-1.json
Normal file
1055
src/assets/data/sales_pd_templates/9-1.json
Normal file
File diff suppressed because it is too large
Load Diff
1197
src/assets/data/sales_pd_templates/9-2.json
Normal file
1197
src/assets/data/sales_pd_templates/9-2.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -22,6 +22,12 @@
|
||||
<ion-content padding>
|
||||
<mat-list class="m-gap p-gap" >
|
||||
<div [formGroup]="searchForm" fxLayout="row wrap" fxFlex="100%" fxLayoutGap="35px" fxLayoutAlign="flex-start stretch">
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select multiple formControlName="sales_pd_type" placeholder="PD Type">
|
||||
<mat-option *ngFor="let item of salesPdTypeList" [value]="item.id">{{item.pd_type_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select multiple formControlName="pd_status" placeholder="PD Status">
|
||||
<mat-option *ngFor="let status of pdStatus" [value]="status.pd_status_name">{{status.pd_status_name}}
|
||||
@ -32,13 +38,13 @@
|
||||
<input matInput [matDatepicker]="picker" [max]="todaydate"
|
||||
formControlName="pd_from_date" placeholder="Choose a From date">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker></mat-datepicker>
|
||||
<mat-datepicker touchUi #picker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:100%">
|
||||
<input matInput [matDatepicker]="picker1" [min]="searchForm.get('pd_from_date').value" [max]="todaydate"
|
||||
formControlName="pd_to_date" placeholder="Choose a To date">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||
<mat-datepicker #picker1></mat-datepicker>
|
||||
<mat-datepicker touchUi #picker1></mat-datepicker>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:100%">
|
||||
<mat-select multiple formControlName="pd_products" placeholder="Products">
|
||||
|
||||
@ -31,6 +31,16 @@ export class AdvanceFilterPage {
|
||||
xpandStatus:boolean=false;
|
||||
pipe=new DatePipe('en-US');
|
||||
is_sales_login: boolean = false;
|
||||
salesPdTypeList = [
|
||||
{
|
||||
id:'1',
|
||||
pd_type_name:"Physical PD"
|
||||
},
|
||||
{
|
||||
id:'2',
|
||||
pd_type_name:"Telephonic PD"
|
||||
}
|
||||
]
|
||||
constructor(private _fb:FormBuilder,public navCtrl: NavController, public navParams: NavParams,public actionSheetCtrl: ActionSheetController,private salesPDService:SalesPdProvider,private toastProvider:ToastProvider,private loaderProvider:LoadingProvider,private viewCtrl:ViewController ) {
|
||||
this.todaydate = new Date();
|
||||
this.getDropdown();
|
||||
@ -54,6 +64,7 @@ export class AdvanceFilterPage {
|
||||
pd_lender:[local.fk_entity_id],
|
||||
pd_applicant_name:[''],
|
||||
pd_officer:[''],
|
||||
sales_pd_type:[''],
|
||||
sales_pd_officer_id:[this.is_sales_login ? local.userid : '']
|
||||
})
|
||||
console.log(this.drop_down_datas)
|
||||
|
||||
@ -98,6 +98,7 @@ export class SalesPDlistPage {
|
||||
if(local_obj && local_obj.sales_pd_id && local_obj.sales_pd_id != null) {
|
||||
console.log(local_obj)
|
||||
let findListIndex = this.sales_displayValue.findIndex(val=>val.sales_pd_id == local_obj.sales_pd_id)
|
||||
if(this.sales_displayValue[findListIndex]) {
|
||||
this.sales_displayValue[findListIndex].is_pd_synced = local_obj.is_pd_synced
|
||||
this.sales_displayValue[findListIndex].is_all_section_synced = local_obj.is_all_section_synced
|
||||
this.sales_displayValue[findListIndex].is_pd_completed = local_obj.is_pd_completed
|
||||
@ -106,6 +107,7 @@ export class SalesPDlistPage {
|
||||
this.sales_displayValue[findListIndex].status = local_obj.status
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -42,9 +42,17 @@ current_section:any;
|
||||
if(this.networkProvider.getCurrentNetworkStatus() == ConnectionStatus.online) {
|
||||
console.log(this.platform.is('cordova'))
|
||||
let api_properties = {method:'post', api_name:this.apiUrl+'loadSalesPDTemplate',params : params}
|
||||
|
||||
// START OF GETTING LOCAL TEMPLATE ONLY ON BROWSER
|
||||
if(!this.platform.is('cordova')) {
|
||||
// api_properties = {method:'get', api_name:`assets/data/sales_pd_templates/${product_id}.json`,params : params}
|
||||
let fileName = product_id
|
||||
if(sales_pd_type) {
|
||||
fileName += '-'+sales_pd_type
|
||||
}
|
||||
// api_properties = {method:'get', api_name:`assets/data/sales_pd_templates/${fileName}.json`,params : params}
|
||||
}
|
||||
// END OF GETTIG LOCAL TEMPLATE
|
||||
|
||||
return this.http[api_properties.method](api_properties.api_name,api_properties.params).subscribe(result=>{
|
||||
if(!this.platform.is('cordova') && !result.hasOwnProperty('dataStatus')) {
|
||||
result = {dataStatus:true,status:200,records:{template:JSON.stringify(result)}}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user