Fairoj : Sales PD Dynamic product listing
This commit is contained in:
parent
eacd43281f
commit
3481447e6e
@ -1,5 +1,5 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<widget id="com.sineedge.pdglender" version="0.0.22" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
<widget id="com.sineedge.pdglender" version="0.0.23" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||||
<name>PD Genie</name>
|
<name>PD Genie</name>
|
||||||
<description>info@pdgenie.com</description>
|
<description>info@pdgenie.com</description>
|
||||||
<author email="info@pdgenie.com" href="https://pdgenie.com">PD Genie</author>
|
<author email="info@pdgenie.com" href="https://pdgenie.com">PD Genie</author>
|
||||||
|
|||||||
@ -77,18 +77,79 @@
|
|||||||
"question":"Constitution",
|
"question":"Constitution",
|
||||||
"question_key":"constitution",
|
"question_key":"constitution",
|
||||||
"type":"8",
|
"type":"8",
|
||||||
"answers":null,
|
"answers":[
|
||||||
"api_properties":{
|
{
|
||||||
"api":"getListOfMaster",
|
"answer_id":"6",
|
||||||
"api_method":"POST",
|
"answer":"Cooperative",
|
||||||
"params":{
|
"subfield_key":"",
|
||||||
"master_name":"BUSINESSENTITYTYPE"
|
"subfield_caption":"",
|
||||||
|
"subfield_type":""
|
||||||
},
|
},
|
||||||
"fields":[
|
{
|
||||||
"business_entity_type_id",
|
"answer_id":"4",
|
||||||
"business_entity_type_name"
|
"answer":"HUF (Hindu Undivided Family)",
|
||||||
]
|
"subfield_key":"",
|
||||||
|
"subfield_caption":"",
|
||||||
|
"subfield_type":""
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"answer_id":"7",
|
||||||
|
"answer":"Limited Liability Partnership(LLP)",
|
||||||
|
"subfield_key":"",
|
||||||
|
"subfield_caption":"",
|
||||||
|
"subfield_type":""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"answer_id":"5",
|
||||||
|
"answer":"Partnership",
|
||||||
|
"subfield_key":"",
|
||||||
|
"subfield_caption":"",
|
||||||
|
"subfield_type":""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"answer_id":"11",
|
||||||
|
"answer":"Private Limited Company",
|
||||||
|
"subfield_key":"",
|
||||||
|
"subfield_caption":"",
|
||||||
|
"subfield_type":""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"answer_id":"2",
|
||||||
|
"answer":"Public Ltd Company",
|
||||||
|
"subfield_key":"",
|
||||||
|
"subfield_caption":"",
|
||||||
|
"subfield_type":""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"answer_id":"12",
|
||||||
|
"answer":"Self Employed-Individual",
|
||||||
|
"subfield_key":"",
|
||||||
|
"subfield_caption":"",
|
||||||
|
"subfield_type":""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"answer_id":"9",
|
||||||
|
"answer":"Society",
|
||||||
|
"subfield_key":"",
|
||||||
|
"subfield_caption":"",
|
||||||
|
"subfield_type":""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"answer_id":"3",
|
||||||
|
"answer":"Sole proprietorship",
|
||||||
|
"subfield_key":"",
|
||||||
|
"subfield_caption":"",
|
||||||
|
"subfield_type":""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"answer_id":"10",
|
||||||
|
"answer":"Trust",
|
||||||
|
"subfield_key":"",
|
||||||
|
"subfield_caption":"",
|
||||||
|
"subfield_type":""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"api_properties":null,
|
||||||
"onchange_properties":null,
|
"onchange_properties":null,
|
||||||
"is_repeatable":null,
|
"is_repeatable":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
@ -367,8 +428,22 @@
|
|||||||
"type":"4",
|
"type":"4",
|
||||||
"answers":[
|
"answers":[
|
||||||
{
|
{
|
||||||
"answer_id":"Puchase of Medical Equipment",
|
"answer_id":"Purchase of Medical Equipment (New)",
|
||||||
"answer":"Puchase of Medical Equipment",
|
"answer":"Purchase of Medical Equipment (New)",
|
||||||
|
"subfield_key":"",
|
||||||
|
"subfield_caption":"",
|
||||||
|
"subfield_type":""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"answer_id":"Purchase of Medical Equipment (Refurbished)",
|
||||||
|
"answer":"Purchase of Medical Equipment (Refurbished)",
|
||||||
|
"subfield_key":"",
|
||||||
|
"subfield_caption":"",
|
||||||
|
"subfield_type":""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"answer_id":"Purchase of Medical Equipment (New and Refurbished)",
|
||||||
|
"answer":"Purchase of Medical Equipment (New and Refurbished)",
|
||||||
"subfield_key":"",
|
"subfield_key":"",
|
||||||
"subfield_caption":"",
|
"subfield_caption":"",
|
||||||
"subfield_type":""
|
"subfield_type":""
|
||||||
@ -510,41 +585,6 @@
|
|||||||
"value_keys":null
|
"value_keys":null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"purpose":"FORM_CTRL",
|
|
||||||
"form_controls":[
|
|
||||||
{
|
|
||||||
"insert_index":"total_work_exp",
|
|
||||||
"expression":"(total_work_exp > vintage_in_current_biz)",
|
|
||||||
"value_keys":[
|
|
||||||
"total_work_exp",
|
|
||||||
"vintage_in_current_biz"
|
|
||||||
],
|
|
||||||
"questions":[
|
|
||||||
{
|
|
||||||
"question_key":"previous_experience_details",
|
|
||||||
"question":"Previous Experience Details",
|
|
||||||
"place_holder":"Enter text",
|
|
||||||
"type":"1",
|
|
||||||
"api_properties":null,
|
|
||||||
"answers":null,
|
|
||||||
"onchange_properties":null,
|
|
||||||
"is_repeatable":null,
|
|
||||||
"field_type":"string",
|
|
||||||
"validations":[
|
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Previous Experience Required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -587,41 +627,6 @@
|
|||||||
"value_keys":null
|
"value_keys":null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"purpose":"FORM_CTRL",
|
|
||||||
"form_controls":[
|
|
||||||
{
|
|
||||||
"insert_index":"total_work_exp",
|
|
||||||
"expression":"(total_work_exp > vintage_in_current_biz)",
|
|
||||||
"value_keys":[
|
|
||||||
"total_work_exp",
|
|
||||||
"vintage_in_current_biz"
|
|
||||||
],
|
|
||||||
"questions":[
|
|
||||||
{
|
|
||||||
"question":"Previous Experience Details",
|
|
||||||
"question_key":"previous_experience_details",
|
|
||||||
"place_holder":"Enter text",
|
|
||||||
"type":"1",
|
|
||||||
"api_properties":null,
|
|
||||||
"answers":null,
|
|
||||||
"onchange_properties":null,
|
|
||||||
"is_repeatable":null,
|
|
||||||
"field_type":"string",
|
|
||||||
"validations":[
|
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Previous Experience Required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -685,12 +690,52 @@
|
|||||||
"purpose":"FORM_CTRL",
|
"purpose":"FORM_CTRL",
|
||||||
"form_controls":[
|
"form_controls":[
|
||||||
{
|
{
|
||||||
"insert_index":"occupancy_ratio",
|
"insert_index":"floor",
|
||||||
"expression":"(String('institution_type') == String('Hospital')) || (String('institution_type') == String('Nursing Home'))",
|
"expression":"(String('institution_type') == String('Hospital')) || (String('institution_type') == String('Nursing Home'))",
|
||||||
"value_keys":[
|
"value_keys":[
|
||||||
"institution_type"
|
"institution_type"
|
||||||
],
|
],
|
||||||
"questions":[
|
"questions":[
|
||||||
|
{
|
||||||
|
"question":"How many Bedded",
|
||||||
|
"question_key":"how_many_beds",
|
||||||
|
"type":"1",
|
||||||
|
"field_type":"num",
|
||||||
|
"place_holder": "Enter the number",
|
||||||
|
"api_properties":null,
|
||||||
|
"onchange_properties":null,
|
||||||
|
"is_repeatable":null,
|
||||||
|
"answers":null,
|
||||||
|
"validations":[
|
||||||
|
{
|
||||||
|
"name":"required",
|
||||||
|
"isactive":"1",
|
||||||
|
"validator":"Validators.required",
|
||||||
|
"message":"Required",
|
||||||
|
"value":null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"question":"Occupancy Ratio",
|
||||||
|
"question_key":"occupancy_ratio",
|
||||||
|
"type":"1",
|
||||||
|
"field_type":"num",
|
||||||
|
"place_holder": "Enter the number",
|
||||||
|
"api_properties":null,
|
||||||
|
"onchange_properties":null,
|
||||||
|
"is_repeatable":null,
|
||||||
|
"answers":null,
|
||||||
|
"validations":[
|
||||||
|
{
|
||||||
|
"name":"required",
|
||||||
|
"isactive":"1",
|
||||||
|
"validator":"Validators.required",
|
||||||
|
"message":"Required",
|
||||||
|
"value":null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"question_key":"tot_doctors",
|
"question_key":"tot_doctors",
|
||||||
"question":"How many doctor’s",
|
"question":"How many doctor’s",
|
||||||
@ -1025,46 +1070,6 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"question":"How many Bedded",
|
|
||||||
"question_key":"how_many_beds",
|
|
||||||
"type":"1",
|
|
||||||
"field_type":"num",
|
|
||||||
"place_holder": "Enter the number",
|
|
||||||
"api_properties":null,
|
|
||||||
"onchange_properties":null,
|
|
||||||
"is_repeatable":null,
|
|
||||||
"answers":null,
|
|
||||||
"validations":[
|
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"question":"Occupancy Ratio",
|
|
||||||
"question_key":"occupancy_ratio",
|
|
||||||
"type":"1",
|
|
||||||
"field_type":"num",
|
|
||||||
"place_holder": "Enter the number",
|
|
||||||
"api_properties":null,
|
|
||||||
"onchange_properties":null,
|
|
||||||
"is_repeatable":null,
|
|
||||||
"answers":null,
|
|
||||||
"validations":[
|
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"question":"Number of staff observed",
|
"question":"Number of staff observed",
|
||||||
"question_key":"staff_observer_number",
|
"question_key":"staff_observer_number",
|
||||||
|
|||||||
@ -23,7 +23,7 @@ import { NetworkDetectionProvider, ConnectionStatus } from '../../../../provider
|
|||||||
templateUrl: 'product-list.html',
|
templateUrl: 'product-list.html',
|
||||||
})
|
})
|
||||||
export class HomePage{
|
export class HomePage{
|
||||||
productList: any;
|
productList: any = [];
|
||||||
product:string='';
|
product:string='';
|
||||||
sales_pd_type:string=''
|
sales_pd_type:string=''
|
||||||
pd_type_list:any=[{
|
pd_type_list:any=[{
|
||||||
@ -42,6 +42,16 @@ export class HomePage{
|
|||||||
this.pdTriggerProvider.getEntityPreferences(users.fk_entity_id).subscribe(result=>{
|
this.pdTriggerProvider.getEntityPreferences(users.fk_entity_id).subscribe(result=>{
|
||||||
if(result['dataStatus']){
|
if(result['dataStatus']){
|
||||||
this.productList=result['records'].salespd_products;
|
this.productList=result['records'].salespd_products;
|
||||||
|
let user_info = JSON.parse(localStorage.getItem('user_details'))
|
||||||
|
if(user_info && user_info.user_config && user_info.user_config.salespd_products) {
|
||||||
|
let product_config = user_info.user_config.salespd_products
|
||||||
|
console.log(product_config)
|
||||||
|
this.productList = this.productList.filter(vv=>product_config.includes(vv.product_id))
|
||||||
|
console.log(this.productList)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.productList = []
|
||||||
|
}
|
||||||
let old_product_id=localStorage.getItem('product_id_salesPD')
|
let old_product_id=localStorage.getItem('product_id_salesPD')
|
||||||
this.product=old_product_id
|
this.product=old_product_id
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,6 +35,7 @@
|
|||||||
border-radius: 10px;" *ngFor="let val of pd_type_list" [value]="val.id" (change)="getProductForAlert($event)"><span>{{val.dis_name}}</span></mat-radio-button>
|
border-radius: 10px;" *ngFor="let val of pd_type_list" [value]="val.id" (change)="getProductForAlert($event)"><span>{{val.dis_name}}</span></mat-radio-button>
|
||||||
</mat-radio-group>
|
</mat-radio-group>
|
||||||
<mat-label><br/><h6>Choose the Product</h6></mat-label>
|
<mat-label><br/><h6>Choose the Product</h6></mat-label>
|
||||||
|
<p *ngIf="productList.length == 0">No Products available</p>
|
||||||
<mat-radio-group placeholder="Product" [(ngModel)]="product" class="radio-group">
|
<mat-radio-group placeholder="Product" [(ngModel)]="product" class="radio-group">
|
||||||
<mat-radio-button color="primary" style="background-color: lightgrey;
|
<mat-radio-button color="primary" style="background-color: lightgrey;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
|||||||
@ -93,13 +93,13 @@ initiateMasterApis(type) {
|
|||||||
// HARD CODED API PARAMS
|
// HARD CODED API PARAMS
|
||||||
this.salesPDProvider.getAllMasterDatas('STATE').subscribe(res=>{
|
this.salesPDProvider.getAllMasterDatas('STATE').subscribe(res=>{
|
||||||
// FOR MEQ PRODUCTS MASTER API
|
// FOR MEQ PRODUCTS MASTER API
|
||||||
this.salesPDProvider.getAllMasterDatas('BUSINESSENTITYTYPE').subscribe(res=>{
|
// this.salesPDProvider.getAllMasterDatas('BUSINESSENTITYTYPE').subscribe(res=>{
|
||||||
this.salesPDProvider.getAllMasterDatas('COMPANYRELATIONSHIPS').subscribe(res=>{
|
this.salesPDProvider.getAllMasterDatas('COMPANYRELATIONSHIPS').subscribe(res=>{
|
||||||
this.salesPDProvider.getAllMasterDatas('SALESEQUIPMENTLIST').subscribe(res=>{
|
this.salesPDProvider.getAllMasterDatas('SALESEQUIPMENTLIST').subscribe(res=>{
|
||||||
this.salesPDProvider.getAllMasterDatas('SALESVENDORLIST').subscribe(res=>{})
|
this.salesPDProvider.getAllMasterDatas('SALESVENDORLIST').subscribe(res=>{})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
// })
|
||||||
})
|
})
|
||||||
// SALES PD TEMPLATE FOR WCTL AND LFMP
|
// SALES PD TEMPLATE FOR WCTL AND LFMP
|
||||||
// this.salesPDProvider.getData('8','1').subscribe(res=>{
|
// this.salesPDProvider.getData('8','1').subscribe(res=>{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user