提交 4bd12da4 编写于 作者: ibizdev's avatar ibizdev

chitanda 发布系统代码

上级 2d81d9c8
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<component <component
:is="viewname" :is="viewname"
class="viewcontainer2" class="viewcontainer2"
:viewUsage="4"
:viewdata ="viewdata" :viewdata ="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
:viewDefaultUsage="false" :viewDefaultUsage="false"
......
...@@ -62,11 +62,11 @@ export default class CampaignServiceBase extends EntityService { ...@@ -62,11 +62,11 @@ export default class CampaignServiceBase extends EntityService {
*/ */
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {}; let masterData:any = {};
let campaigncampaignsData:any = []; let campaignlistsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaigncampaigns'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists'),'undefined')){
campaigncampaignsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaigncampaigns') as any); campaignlistsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists') as any);
if(campaigncampaignsData && campaigncampaignsData.length && campaigncampaignsData.length > 0){ if(campaignlistsData && campaignlistsData.length && campaignlistsData.length > 0){
campaigncampaignsData.forEach((item:any) => { campaignlistsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.relationshipsid = null;
...@@ -76,12 +76,12 @@ export default class CampaignServiceBase extends EntityService { ...@@ -76,12 +76,12 @@ export default class CampaignServiceBase extends EntityService {
}); });
} }
} }
masterData.campaigncampaigns = campaigncampaignsData; masterData.campaignlists = campaignlistsData;
let campaignlistsData:any = []; let campaigncampaignsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaigncampaigns'),'undefined')){
campaignlistsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists') as any); campaigncampaignsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaigncampaigns') as any);
if(campaignlistsData && campaignlistsData.length && campaignlistsData.length > 0){ if(campaigncampaignsData && campaigncampaignsData.length && campaigncampaignsData.length > 0){
campaignlistsData.forEach((item:any) => { campaigncampaignsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.relationshipsid = null;
...@@ -91,7 +91,7 @@ export default class CampaignServiceBase extends EntityService { ...@@ -91,7 +91,7 @@ export default class CampaignServiceBase extends EntityService {
}); });
} }
} }
masterData.campaignlists = campaignlistsData; masterData.campaigncampaigns = campaigncampaignsData;
let leadsData:any = []; let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any); leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
...@@ -116,8 +116,8 @@ export default class CampaignServiceBase extends EntityService { ...@@ -116,8 +116,8 @@ export default class CampaignServiceBase extends EntityService {
} }
let tempContext:any = JSON.parse(JSON.stringify(context)); let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/campaigns`,data,isloading); let res:any = await Http.getInstance().post(`/campaigns`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_campaigncampaigns',JSON.stringify(res.data.campaigncampaigns));
this.tempStorage.setItem(tempContext.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists)); this.tempStorage.setItem(tempContext.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(tempContext.srfsessionkey+'_campaigncampaigns',JSON.stringify(res.data.campaigncampaigns));
this.tempStorage.setItem(tempContext.srfsessionkey+'_leads',JSON.stringify(res.data.leads)); this.tempStorage.setItem(tempContext.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
return res; return res;
} }
...@@ -133,11 +133,11 @@ export default class CampaignServiceBase extends EntityService { ...@@ -133,11 +133,11 @@ export default class CampaignServiceBase extends EntityService {
*/ */
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {}; let masterData:any = {};
let campaigncampaignsData:any = []; let campaignlistsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaigncampaigns'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists'),'undefined')){
campaigncampaignsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaigncampaigns') as any); campaignlistsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists') as any);
if(campaigncampaignsData && campaigncampaignsData.length && campaigncampaignsData.length > 0){ if(campaignlistsData && campaignlistsData.length && campaignlistsData.length > 0){
campaigncampaignsData.forEach((item:any) => { campaignlistsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.relationshipsid = null;
...@@ -147,12 +147,12 @@ export default class CampaignServiceBase extends EntityService { ...@@ -147,12 +147,12 @@ export default class CampaignServiceBase extends EntityService {
}); });
} }
} }
masterData.campaigncampaigns = campaigncampaignsData; masterData.campaignlists = campaignlistsData;
let campaignlistsData:any = []; let campaigncampaignsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaigncampaigns'),'undefined')){
campaignlistsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists') as any); campaigncampaignsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaigncampaigns') as any);
if(campaignlistsData && campaignlistsData.length && campaignlistsData.length > 0){ if(campaigncampaignsData && campaigncampaignsData.length && campaigncampaignsData.length > 0){
campaignlistsData.forEach((item:any) => { campaigncampaignsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.relationshipsid = null;
...@@ -162,7 +162,7 @@ export default class CampaignServiceBase extends EntityService { ...@@ -162,7 +162,7 @@ export default class CampaignServiceBase extends EntityService {
}); });
} }
} }
masterData.campaignlists = campaignlistsData; masterData.campaigncampaigns = campaigncampaignsData;
let leadsData:any = []; let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any); leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
...@@ -180,8 +180,8 @@ export default class CampaignServiceBase extends EntityService { ...@@ -180,8 +180,8 @@ export default class CampaignServiceBase extends EntityService {
masterData.leads = leadsData; masterData.leads = leadsData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/campaigns/${context.campaign}`,data,isloading); let res:any = await Http.getInstance().put(`/campaigns/${context.campaign}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_campaigncampaigns',JSON.stringify(res.data.campaigncampaigns));
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists)); this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(context.srfsessionkey+'_campaigncampaigns',JSON.stringify(res.data.campaigncampaigns));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads)); this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
return res; return res;
} }
...@@ -210,8 +210,8 @@ export default class CampaignServiceBase extends EntityService { ...@@ -210,8 +210,8 @@ export default class CampaignServiceBase extends EntityService {
*/ */
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/campaigns/${context.campaign}`,isloading); let res:any = await Http.getInstance().get(`/campaigns/${context.campaign}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_campaigncampaigns',JSON.stringify(res.data.campaigncampaigns));
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists)); this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(context.srfsessionkey+'_campaigncampaigns',JSON.stringify(res.data.campaigncampaigns));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads)); this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
return res; return res;
} }
...@@ -228,8 +228,8 @@ export default class CampaignServiceBase extends EntityService { ...@@ -228,8 +228,8 @@ export default class CampaignServiceBase extends EntityService {
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/campaigns/getdraft`,isloading); let res:any = await Http.getInstance().get(`/campaigns/getdraft`,isloading);
res.data.campaign = data.campaign; res.data.campaign = data.campaign;
this.tempStorage.setItem(context.srfsessionkey+'_campaigncampaigns',JSON.stringify(res.data.campaigncampaigns));
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists)); this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(context.srfsessionkey+'_campaigncampaigns',JSON.stringify(res.data.campaigncampaigns));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads)); this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
return res; return res;
} }
...@@ -258,11 +258,11 @@ export default class CampaignServiceBase extends EntityService { ...@@ -258,11 +258,11 @@ export default class CampaignServiceBase extends EntityService {
*/ */
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {}; let masterData:any = {};
let campaigncampaignsData:any = []; let campaignlistsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaigncampaigns'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists'),'undefined')){
campaigncampaignsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaigncampaigns') as any); campaignlistsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists') as any);
if(campaigncampaignsData && campaigncampaignsData.length && campaigncampaignsData.length > 0){ if(campaignlistsData && campaignlistsData.length && campaignlistsData.length > 0){
campaigncampaignsData.forEach((item:any) => { campaignlistsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.relationshipsid = null;
...@@ -272,12 +272,12 @@ export default class CampaignServiceBase extends EntityService { ...@@ -272,12 +272,12 @@ export default class CampaignServiceBase extends EntityService {
}); });
} }
} }
masterData.campaigncampaigns = campaigncampaignsData; masterData.campaignlists = campaignlistsData;
let campaignlistsData:any = []; let campaigncampaignsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaigncampaigns'),'undefined')){
campaignlistsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists') as any); campaigncampaignsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaigncampaigns') as any);
if(campaignlistsData && campaignlistsData.length && campaignlistsData.length > 0){ if(campaigncampaignsData && campaigncampaignsData.length && campaigncampaignsData.length > 0){
campaignlistsData.forEach((item:any) => { campaigncampaignsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.relationshipsid = null;
...@@ -287,7 +287,7 @@ export default class CampaignServiceBase extends EntityService { ...@@ -287,7 +287,7 @@ export default class CampaignServiceBase extends EntityService {
}); });
} }
} }
masterData.campaignlists = campaignlistsData; masterData.campaigncampaigns = campaigncampaignsData;
let leadsData:any = []; let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any); leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
...@@ -305,8 +305,8 @@ export default class CampaignServiceBase extends EntityService { ...@@ -305,8 +305,8 @@ export default class CampaignServiceBase extends EntityService {
masterData.leads = leadsData; masterData.leads = leadsData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/campaigns/${context.campaign}/save`,data,isloading); let res:any = await Http.getInstance().post(`/campaigns/${context.campaign}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_campaigncampaigns',JSON.stringify(res.data.campaigncampaigns));
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists)); this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(context.srfsessionkey+'_campaigncampaigns',JSON.stringify(res.data.campaigncampaigns));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads)); this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
return res; return res;
} }
......
...@@ -66,36 +66,36 @@ export default class ContactServiceBase extends EntityService { ...@@ -66,36 +66,36 @@ export default class ContactServiceBase extends EntityService {
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && true){ if(context.account && true){
let masterData:any = {}; let masterData:any = {};
let listcontactsData:any = []; let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any); leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){ if(leadsData && leadsData.length && leadsData.length > 0){
listcontactsData.forEach((item:any) => { leadsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.leadid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.listcontacts = listcontactsData; masterData.leads = leadsData;
let leadsData:any = []; let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any); listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any);
if(leadsData && leadsData.length && leadsData.length > 0){ if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){
leadsData.forEach((item:any) => { listcontactsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.leadid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.leads = leadsData; masterData.listcontacts = listcontactsData;
let opportunitiesData:any = []; let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any); opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
...@@ -120,42 +120,42 @@ export default class ContactServiceBase extends EntityService { ...@@ -120,42 +120,42 @@ export default class ContactServiceBase extends EntityService {
} }
let tempContext:any = JSON.parse(JSON.stringify(context)); let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts`,data,isloading); let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_leads',JSON.stringify(res.data.leads)); this.tempStorage.setItem(tempContext.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(tempContext.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities)); this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res; return res;
} }
let masterData:any = {}; let masterData:any = {};
let listcontactsData:any = []; let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any); leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){ if(leadsData && leadsData.length && leadsData.length > 0){
listcontactsData.forEach((item:any) => { leadsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.leadid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.listcontacts = listcontactsData; masterData.leads = leadsData;
let leadsData:any = []; let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any); listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any);
if(leadsData && leadsData.length && leadsData.length > 0){ if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){
leadsData.forEach((item:any) => { listcontactsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.leadid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.leads = leadsData; masterData.listcontacts = listcontactsData;
let opportunitiesData:any = []; let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any); opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
...@@ -180,8 +180,8 @@ export default class ContactServiceBase extends EntityService { ...@@ -180,8 +180,8 @@ export default class ContactServiceBase extends EntityService {
} }
let tempContext:any = JSON.parse(JSON.stringify(context)); let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/contacts`,data,isloading); let res:any = await Http.getInstance().post(`/contacts`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_leads',JSON.stringify(res.data.leads)); this.tempStorage.setItem(tempContext.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(tempContext.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities)); this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res; return res;
} }
...@@ -198,36 +198,36 @@ export default class ContactServiceBase extends EntityService { ...@@ -198,36 +198,36 @@ export default class ContactServiceBase extends EntityService {
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact){ if(context.account && context.contact){
let masterData:any = {}; let masterData:any = {};
let listcontactsData:any = []; let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any); leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){ if(leadsData && leadsData.length && leadsData.length > 0){
listcontactsData.forEach((item:any) => { leadsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.leadid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.listcontacts = listcontactsData; masterData.leads = leadsData;
let leadsData:any = []; let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any); listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any);
if(leadsData && leadsData.length && leadsData.length > 0){ if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){
leadsData.forEach((item:any) => { listcontactsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.leadid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.leads = leadsData; masterData.listcontacts = listcontactsData;
let opportunitiesData:any = []; let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any); opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
...@@ -245,42 +245,42 @@ export default class ContactServiceBase extends EntityService { ...@@ -245,42 +245,42 @@ export default class ContactServiceBase extends EntityService {
masterData.opportunities = opportunitiesData; masterData.opportunities = opportunitiesData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/accounts/${context.account}/contacts/${context.contact}`,data,isloading); let res:any = await Http.getInstance().put(`/accounts/${context.account}/contacts/${context.contact}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads)); this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities)); this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res; return res;
} }
let masterData:any = {}; let masterData:any = {};
let listcontactsData:any = []; let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any); leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){ if(leadsData && leadsData.length && leadsData.length > 0){
listcontactsData.forEach((item:any) => { leadsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.leadid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.listcontacts = listcontactsData; masterData.leads = leadsData;
let leadsData:any = []; let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any); listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any);
if(leadsData && leadsData.length && leadsData.length > 0){ if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){
leadsData.forEach((item:any) => { listcontactsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.leadid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.leads = leadsData; masterData.listcontacts = listcontactsData;
let opportunitiesData:any = []; let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any); opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
...@@ -298,8 +298,8 @@ export default class ContactServiceBase extends EntityService { ...@@ -298,8 +298,8 @@ export default class ContactServiceBase extends EntityService {
masterData.opportunities = opportunitiesData; masterData.opportunities = opportunitiesData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/contacts/${context.contact}`,data,isloading); let res:any = await Http.getInstance().put(`/contacts/${context.contact}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads)); this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities)); this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res; return res;
} }
...@@ -332,14 +332,14 @@ export default class ContactServiceBase extends EntityService { ...@@ -332,14 +332,14 @@ export default class ContactServiceBase extends EntityService {
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact){ if(context.account && context.contact){
let res:any = await Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}`,isloading); let res:any = await Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads)); this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities)); this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res; return res;
} }
let res:any = await Http.getInstance().get(`/contacts/${context.contact}`,isloading); let res:any = await Http.getInstance().get(`/contacts/${context.contact}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads)); this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities)); this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res; return res;
} }
...@@ -357,15 +357,15 @@ export default class ContactServiceBase extends EntityService { ...@@ -357,15 +357,15 @@ export default class ContactServiceBase extends EntityService {
if(context.account && true){ if(context.account && true){
let res:any = await Http.getInstance().get(`/accounts/${context.account}/contacts/getdraft`,isloading); let res:any = await Http.getInstance().get(`/accounts/${context.account}/contacts/getdraft`,isloading);
res.data.contact = data.contact; res.data.contact = data.contact;
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads)); this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities)); this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res; return res;
} }
let res:any = await Http.getInstance().get(`/contacts/getdraft`,isloading); let res:any = await Http.getInstance().get(`/contacts/getdraft`,isloading);
res.data.contact = data.contact; res.data.contact = data.contact;
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads)); this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities)); this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res; return res;
} }
...@@ -382,36 +382,36 @@ export default class ContactServiceBase extends EntityService { ...@@ -382,36 +382,36 @@ export default class ContactServiceBase extends EntityService {
public async Active(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Active(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact){ if(context.account && context.contact){
let masterData:any = {}; let masterData:any = {};
let listcontactsData:any = []; let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any); leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){ if(leadsData && leadsData.length && leadsData.length > 0){
listcontactsData.forEach((item:any) => { leadsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.leadid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.listcontacts = listcontactsData; masterData.leads = leadsData;
let leadsData:any = []; let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any); listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any);
if(leadsData && leadsData.length && leadsData.length > 0){ if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){
leadsData.forEach((item:any) => { listcontactsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.leadid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.leads = leadsData; masterData.listcontacts = listcontactsData;
let opportunitiesData:any = []; let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any); opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
...@@ -429,8 +429,8 @@ export default class ContactServiceBase extends EntityService { ...@@ -429,8 +429,8 @@ export default class ContactServiceBase extends EntityService {
masterData.opportunities = opportunitiesData; masterData.opportunities = opportunitiesData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/active`,data,isloading); let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/active`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads)); this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities)); this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res; return res;
} }
...@@ -449,36 +449,36 @@ export default class ContactServiceBase extends EntityService { ...@@ -449,36 +449,36 @@ export default class ContactServiceBase extends EntityService {
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact){ if(context.account && context.contact){
let masterData:any = {}; let masterData:any = {};
let listcontactsData:any = []; let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any); leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){ if(leadsData && leadsData.length && leadsData.length > 0){
listcontactsData.forEach((item:any) => { leadsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.leadid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.listcontacts = listcontactsData; masterData.leads = leadsData;
let leadsData:any = []; let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any); listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any);
if(leadsData && leadsData.length && leadsData.length > 0){ if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){
leadsData.forEach((item:any) => { listcontactsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.leadid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.leads = leadsData; masterData.listcontacts = listcontactsData;
let opportunitiesData:any = []; let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any); opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
...@@ -496,8 +496,8 @@ export default class ContactServiceBase extends EntityService { ...@@ -496,8 +496,8 @@ export default class ContactServiceBase extends EntityService {
masterData.opportunities = opportunitiesData; masterData.opportunities = opportunitiesData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/checkkey`,data,isloading); let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/checkkey`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads)); this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities)); this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res; return res;
} }
...@@ -516,36 +516,36 @@ export default class ContactServiceBase extends EntityService { ...@@ -516,36 +516,36 @@ export default class ContactServiceBase extends EntityService {
public async Inactive(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Inactive(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact){ if(context.account && context.contact){
let masterData:any = {}; let masterData:any = {};
let listcontactsData:any = []; let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any); leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){ if(leadsData && leadsData.length && leadsData.length > 0){
listcontactsData.forEach((item:any) => { leadsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.leadid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.listcontacts = listcontactsData; masterData.leads = leadsData;
let leadsData:any = []; let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any); listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any);
if(leadsData && leadsData.length && leadsData.length > 0){ if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){
leadsData.forEach((item:any) => { listcontactsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.leadid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.leads = leadsData; masterData.listcontacts = listcontactsData;
let opportunitiesData:any = []; let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any); opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
...@@ -563,8 +563,8 @@ export default class ContactServiceBase extends EntityService { ...@@ -563,8 +563,8 @@ export default class ContactServiceBase extends EntityService {
masterData.opportunities = opportunitiesData; masterData.opportunities = opportunitiesData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/inactive`,data,isloading); let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/inactive`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads)); this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities)); this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res; return res;
} }
...@@ -583,36 +583,36 @@ export default class ContactServiceBase extends EntityService { ...@@ -583,36 +583,36 @@ export default class ContactServiceBase extends EntityService {
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact){ if(context.account && context.contact){
let masterData:any = {}; let masterData:any = {};
let listcontactsData:any = []; let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any); leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){ if(leadsData && leadsData.length && leadsData.length > 0){
listcontactsData.forEach((item:any) => { leadsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.leadid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.listcontacts = listcontactsData; masterData.leads = leadsData;
let leadsData:any = []; let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any); listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any);
if(leadsData && leadsData.length && leadsData.length > 0){ if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){
leadsData.forEach((item:any) => { listcontactsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.leadid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.leads = leadsData; masterData.listcontacts = listcontactsData;
let opportunitiesData:any = []; let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any); opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
...@@ -630,42 +630,42 @@ export default class ContactServiceBase extends EntityService { ...@@ -630,42 +630,42 @@ export default class ContactServiceBase extends EntityService {
masterData.opportunities = opportunitiesData; masterData.opportunities = opportunitiesData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/save`,data,isloading); let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads)); this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities)); this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res; return res;
} }
let masterData:any = {}; let masterData:any = {};
let listcontactsData:any = []; let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any); leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){ if(leadsData && leadsData.length && leadsData.length > 0){
listcontactsData.forEach((item:any) => { leadsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.leadid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.listcontacts = listcontactsData; masterData.leads = leadsData;
let leadsData:any = []; let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any); listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any);
if(leadsData && leadsData.length && leadsData.length > 0){ if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){
leadsData.forEach((item:any) => { listcontactsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.leadid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.leads = leadsData; masterData.listcontacts = listcontactsData;
let opportunitiesData:any = []; let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any); opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
...@@ -683,8 +683,8 @@ export default class ContactServiceBase extends EntityService { ...@@ -683,8 +683,8 @@ export default class ContactServiceBase extends EntityService {
masterData.opportunities = opportunitiesData; masterData.opportunities = opportunitiesData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/contacts/${context.contact}/save`,data,isloading); let res:any = await Http.getInstance().post(`/contacts/${context.contact}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads)); this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities)); this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res; return res;
} }
...@@ -701,36 +701,36 @@ export default class ContactServiceBase extends EntityService { ...@@ -701,36 +701,36 @@ export default class ContactServiceBase extends EntityService {
public async SetPrimary(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async SetPrimary(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact){ if(context.account && context.contact){
let masterData:any = {}; let masterData:any = {};
let listcontactsData:any = []; let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any); leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){ if(leadsData && leadsData.length && leadsData.length > 0){
listcontactsData.forEach((item:any) => { leadsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.leadid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.listcontacts = listcontactsData; masterData.leads = leadsData;
let leadsData:any = []; let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any); listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any);
if(leadsData && leadsData.length && leadsData.length > 0){ if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){
leadsData.forEach((item:any) => { listcontactsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.leadid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.leads = leadsData; masterData.listcontacts = listcontactsData;
let opportunitiesData:any = []; let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any); opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
...@@ -748,8 +748,8 @@ export default class ContactServiceBase extends EntityService { ...@@ -748,8 +748,8 @@ export default class ContactServiceBase extends EntityService {
masterData.opportunities = opportunitiesData; masterData.opportunities = opportunitiesData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/setprimary`,data,isloading); let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/setprimary`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads)); this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities)); this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
return res; return res;
} }
......
...@@ -62,21 +62,6 @@ export default class IBizListServiceBase extends EntityService { ...@@ -62,21 +62,6 @@ export default class IBizListServiceBase extends EntityService {
*/ */
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {}; let masterData:any = {};
let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any);
if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){
listcontactsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.listcontacts = listcontactsData;
let listaccountsData:any = []; let listaccountsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts'),'undefined')){
listaccountsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts') as any); listaccountsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts') as any);
...@@ -122,6 +107,21 @@ export default class IBizListServiceBase extends EntityService { ...@@ -122,6 +107,21 @@ export default class IBizListServiceBase extends EntityService {
} }
} }
masterData.campaignlists = campaignlistsData; masterData.campaignlists = campaignlistsData;
let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any);
if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){
listcontactsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.listcontacts = listcontactsData;
Object.assign(data,masterData); Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){ if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null; data[this.APPDEKEY] = null;
...@@ -131,10 +131,10 @@ export default class IBizListServiceBase extends EntityService { ...@@ -131,10 +131,10 @@ export default class IBizListServiceBase extends EntityService {
} }
let tempContext:any = JSON.parse(JSON.stringify(context)); let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/ibizlists`,data,isloading); let res:any = await Http.getInstance().post(`/ibizlists`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts)); this.tempStorage.setItem(tempContext.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads)); this.tempStorage.setItem(tempContext.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads));
this.tempStorage.setItem(tempContext.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists)); this.tempStorage.setItem(tempContext.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(tempContext.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
return res; return res;
} }
...@@ -149,21 +149,6 @@ export default class IBizListServiceBase extends EntityService { ...@@ -149,21 +149,6 @@ export default class IBizListServiceBase extends EntityService {
*/ */
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {}; let masterData:any = {};
let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any);
if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){
listcontactsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.listcontacts = listcontactsData;
let listaccountsData:any = []; let listaccountsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts'),'undefined')){
listaccountsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts') as any); listaccountsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts') as any);
...@@ -209,12 +194,27 @@ export default class IBizListServiceBase extends EntityService { ...@@ -209,12 +194,27 @@ export default class IBizListServiceBase extends EntityService {
} }
} }
masterData.campaignlists = campaignlistsData; masterData.campaignlists = campaignlistsData;
let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any);
if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){
listcontactsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.listcontacts = listcontactsData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/ibizlists/${context.ibizlist}`,data,isloading); let res:any = await Http.getInstance().put(`/ibizlists/${context.ibizlist}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts)); this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts));
this.tempStorage.setItem(context.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads)); this.tempStorage.setItem(context.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads));
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists)); this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
return res; return res;
} }
...@@ -242,10 +242,10 @@ export default class IBizListServiceBase extends EntityService { ...@@ -242,10 +242,10 @@ export default class IBizListServiceBase extends EntityService {
*/ */
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/ibizlists/${context.ibizlist}`,isloading); let res:any = await Http.getInstance().get(`/ibizlists/${context.ibizlist}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts)); this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts));
this.tempStorage.setItem(context.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads)); this.tempStorage.setItem(context.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads));
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists)); this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
return res; return res;
} }
...@@ -261,10 +261,10 @@ export default class IBizListServiceBase extends EntityService { ...@@ -261,10 +261,10 @@ export default class IBizListServiceBase extends EntityService {
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/ibizlists/getdraft`,isloading); let res:any = await Http.getInstance().get(`/ibizlists/getdraft`,isloading);
res.data.ibizlist = data.ibizlist; res.data.ibizlist = data.ibizlist;
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts)); this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts));
this.tempStorage.setItem(context.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads)); this.tempStorage.setItem(context.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads));
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists)); this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
return res; return res;
} }
...@@ -292,21 +292,6 @@ export default class IBizListServiceBase extends EntityService { ...@@ -292,21 +292,6 @@ export default class IBizListServiceBase extends EntityService {
*/ */
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {}; let masterData:any = {};
let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any);
if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){
listcontactsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.listcontacts = listcontactsData;
let listaccountsData:any = []; let listaccountsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts'),'undefined')){
listaccountsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts') as any); listaccountsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listaccounts') as any);
...@@ -352,12 +337,27 @@ export default class IBizListServiceBase extends EntityService { ...@@ -352,12 +337,27 @@ export default class IBizListServiceBase extends EntityService {
} }
} }
masterData.campaignlists = campaignlistsData; masterData.campaignlists = campaignlistsData;
let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any);
if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){
listcontactsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.listcontacts = listcontactsData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/ibizlists/${context.ibizlist}/save`,data,isloading); let res:any = await Http.getInstance().post(`/ibizlists/${context.ibizlist}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts)); this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts));
this.tempStorage.setItem(context.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads)); this.tempStorage.setItem(context.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads));
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists)); this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
return res; return res;
} }
......
...@@ -69,36 +69,36 @@ export default class OpportunityServiceBase extends EntityService { ...@@ -69,36 +69,36 @@ export default class OpportunityServiceBase extends EntityService {
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && true){ if(context.account && context.contact && true){
let masterData:any = {}; let masterData:any = {};
let opportunityproductsData:any = []; let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any); opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){ if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunityproductsData.forEach((item:any) => { opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunityproducts = opportunityproductsData; masterData.opportunitycompetitors = opportunitycompetitorsData;
let opportunitycompetitorsData:any = []; let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any); opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){ if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => { opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.opportunityproductid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunitycompetitors = opportunitycompetitorsData; masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = []; let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any); quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
...@@ -123,43 +123,43 @@ export default class OpportunityServiceBase extends EntityService { ...@@ -123,43 +123,43 @@ export default class OpportunityServiceBase extends EntityService {
} }
let tempContext:any = JSON.parse(JSON.stringify(context)); let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/opportunities`,data,isloading); let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/opportunities`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors)); this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes)); this.tempStorage.setItem(tempContext.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
return res; return res;
} }
if(context.contact && true){ if(context.contact && true){
let masterData:any = {}; let masterData:any = {};
let opportunityproductsData:any = []; let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any); opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){ if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunityproductsData.forEach((item:any) => { opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunityproducts = opportunityproductsData; masterData.opportunitycompetitors = opportunitycompetitorsData;
let opportunitycompetitorsData:any = []; let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any); opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){ if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => { opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.opportunityproductid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunitycompetitors = opportunitycompetitorsData; masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = []; let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any); quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
...@@ -184,42 +184,42 @@ export default class OpportunityServiceBase extends EntityService { ...@@ -184,42 +184,42 @@ export default class OpportunityServiceBase extends EntityService {
} }
let tempContext:any = JSON.parse(JSON.stringify(context)); let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/contacts/${context.contact}/opportunities`,data,isloading); let res:any = await Http.getInstance().post(`/contacts/${context.contact}/opportunities`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors)); this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes)); this.tempStorage.setItem(tempContext.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
return res; return res;
} }
let masterData:any = {}; let masterData:any = {};
let opportunityproductsData:any = []; let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any); opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){ if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunityproductsData.forEach((item:any) => { opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunityproducts = opportunityproductsData; masterData.opportunitycompetitors = opportunitycompetitorsData;
let opportunitycompetitorsData:any = []; let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any); opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){ if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => { opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.opportunityproductid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunitycompetitors = opportunitycompetitorsData; masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = []; let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any); quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
...@@ -244,8 +244,8 @@ export default class OpportunityServiceBase extends EntityService { ...@@ -244,8 +244,8 @@ export default class OpportunityServiceBase extends EntityService {
} }
let tempContext:any = JSON.parse(JSON.stringify(context)); let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/opportunities`,data,isloading); let res:any = await Http.getInstance().post(`/opportunities`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors)); this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(tempContext.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes)); this.tempStorage.setItem(tempContext.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
return res; return res;
} }
...@@ -262,36 +262,36 @@ export default class OpportunityServiceBase extends EntityService { ...@@ -262,36 +262,36 @@ export default class OpportunityServiceBase extends EntityService {
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.opportunity){ if(context.account && context.contact && context.opportunity){
let masterData:any = {}; let masterData:any = {};
let opportunityproductsData:any = []; let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any); opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){ if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunityproductsData.forEach((item:any) => { opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunityproducts = opportunityproductsData; masterData.opportunitycompetitors = opportunitycompetitorsData;
let opportunitycompetitorsData:any = []; let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any); opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){ if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => { opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.opportunityproductid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunitycompetitors = opportunitycompetitorsData; masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = []; let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any); quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
...@@ -309,43 +309,43 @@ export default class OpportunityServiceBase extends EntityService { ...@@ -309,43 +309,43 @@ export default class OpportunityServiceBase extends EntityService {
masterData.quotes = quotesData; masterData.quotes = quotesData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/accounts/${context.account}/contacts/${context.contact}/opportunities/${context.opportunity}`,data,isloading); let res:any = await Http.getInstance().put(`/accounts/${context.account}/contacts/${context.contact}/opportunities/${context.opportunity}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors)); this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes)); this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
return res; return res;
} }
if(context.contact && context.opportunity){ if(context.contact && context.opportunity){
let masterData:any = {}; let masterData:any = {};
let opportunityproductsData:any = []; let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any); opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){ if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunityproductsData.forEach((item:any) => { opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunityproducts = opportunityproductsData; masterData.opportunitycompetitors = opportunitycompetitorsData;
let opportunitycompetitorsData:any = []; let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any); opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){ if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => { opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.opportunityproductid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunitycompetitors = opportunitycompetitorsData; masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = []; let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any); quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
...@@ -363,42 +363,42 @@ export default class OpportunityServiceBase extends EntityService { ...@@ -363,42 +363,42 @@ export default class OpportunityServiceBase extends EntityService {
masterData.quotes = quotesData; masterData.quotes = quotesData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/contacts/${context.contact}/opportunities/${context.opportunity}`,data,isloading); let res:any = await Http.getInstance().put(`/contacts/${context.contact}/opportunities/${context.opportunity}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors)); this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes)); this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
return res; return res;
} }
let masterData:any = {}; let masterData:any = {};
let opportunityproductsData:any = []; let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any); opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){ if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunityproductsData.forEach((item:any) => { opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunityproducts = opportunityproductsData; masterData.opportunitycompetitors = opportunitycompetitorsData;
let opportunitycompetitorsData:any = []; let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any); opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){ if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => { opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.opportunityproductid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunitycompetitors = opportunitycompetitorsData; masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = []; let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any); quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
...@@ -416,8 +416,8 @@ export default class OpportunityServiceBase extends EntityService { ...@@ -416,8 +416,8 @@ export default class OpportunityServiceBase extends EntityService {
masterData.quotes = quotesData; masterData.quotes = quotesData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/opportunities/${context.opportunity}`,data,isloading); let res:any = await Http.getInstance().put(`/opportunities/${context.opportunity}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors)); this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes)); this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
return res; return res;
} }
...@@ -453,21 +453,21 @@ export default class OpportunityServiceBase extends EntityService { ...@@ -453,21 +453,21 @@ export default class OpportunityServiceBase extends EntityService {
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.opportunity){ if(context.account && context.contact && context.opportunity){
let res:any = await Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}/opportunities/${context.opportunity}`,isloading); let res:any = await Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}/opportunities/${context.opportunity}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors)); this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes)); this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
return res; return res;
} }
if(context.contact && context.opportunity){ if(context.contact && context.opportunity){
let res:any = await Http.getInstance().get(`/contacts/${context.contact}/opportunities/${context.opportunity}`,isloading); let res:any = await Http.getInstance().get(`/contacts/${context.contact}/opportunities/${context.opportunity}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors)); this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes)); this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
return res; return res;
} }
let res:any = await Http.getInstance().get(`/opportunities/${context.opportunity}`,isloading); let res:any = await Http.getInstance().get(`/opportunities/${context.opportunity}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors)); this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes)); this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
return res; return res;
} }
...@@ -485,23 +485,23 @@ export default class OpportunityServiceBase extends EntityService { ...@@ -485,23 +485,23 @@ export default class OpportunityServiceBase extends EntityService {
if(context.account && context.contact && true){ if(context.account && context.contact && true){
let res:any = await Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}/opportunities/getdraft`,isloading); let res:any = await Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}/opportunities/getdraft`,isloading);
res.data.opportunity = data.opportunity; res.data.opportunity = data.opportunity;
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors)); this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes)); this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
return res; return res;
} }
if(context.contact && true){ if(context.contact && true){
let res:any = await Http.getInstance().get(`/contacts/${context.contact}/opportunities/getdraft`,isloading); let res:any = await Http.getInstance().get(`/contacts/${context.contact}/opportunities/getdraft`,isloading);
res.data.opportunity = data.opportunity; res.data.opportunity = data.opportunity;
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors)); this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes)); this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
return res; return res;
} }
let res:any = await Http.getInstance().get(`/opportunities/getdraft`,isloading); let res:any = await Http.getInstance().get(`/opportunities/getdraft`,isloading);
res.data.opportunity = data.opportunity; res.data.opportunity = data.opportunity;
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors)); this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes)); this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
return res; return res;
} }
...@@ -518,36 +518,36 @@ export default class OpportunityServiceBase extends EntityService { ...@@ -518,36 +518,36 @@ export default class OpportunityServiceBase extends EntityService {
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.opportunity){ if(context.account && context.contact && context.opportunity){
let masterData:any = {}; let masterData:any = {};
let opportunityproductsData:any = []; let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any); opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){ if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunityproductsData.forEach((item:any) => { opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunityproducts = opportunityproductsData; masterData.opportunitycompetitors = opportunitycompetitorsData;
let opportunitycompetitorsData:any = []; let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any); opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){ if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => { opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.opportunityproductid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunitycompetitors = opportunitycompetitorsData; masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = []; let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any); quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
...@@ -565,43 +565,43 @@ export default class OpportunityServiceBase extends EntityService { ...@@ -565,43 +565,43 @@ export default class OpportunityServiceBase extends EntityService {
masterData.quotes = quotesData; masterData.quotes = quotesData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/opportunities/${context.opportunity}/checkkey`,data,isloading); let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/opportunities/${context.opportunity}/checkkey`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors)); this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes)); this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
return res; return res;
} }
if(context.contact && context.opportunity){ if(context.contact && context.opportunity){
let masterData:any = {}; let masterData:any = {};
let opportunityproductsData:any = []; let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any); opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){ if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunityproductsData.forEach((item:any) => { opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunityproducts = opportunityproductsData; masterData.opportunitycompetitors = opportunitycompetitorsData;
let opportunitycompetitorsData:any = []; let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any); opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){ if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => { opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.opportunityproductid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunitycompetitors = opportunitycompetitorsData; masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = []; let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any); quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
...@@ -619,8 +619,8 @@ export default class OpportunityServiceBase extends EntityService { ...@@ -619,8 +619,8 @@ export default class OpportunityServiceBase extends EntityService {
masterData.quotes = quotesData; masterData.quotes = quotesData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/contacts/${context.contact}/opportunities/${context.opportunity}/checkkey`,data,isloading); let res:any = await Http.getInstance().post(`/contacts/${context.contact}/opportunities/${context.opportunity}/checkkey`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors)); this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes)); this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
return res; return res;
} }
...@@ -639,36 +639,36 @@ export default class OpportunityServiceBase extends EntityService { ...@@ -639,36 +639,36 @@ export default class OpportunityServiceBase extends EntityService {
public async Lose(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Lose(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.opportunity){ if(context.account && context.contact && context.opportunity){
let masterData:any = {}; let masterData:any = {};
let opportunityproductsData:any = []; let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any); opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){ if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunityproductsData.forEach((item:any) => { opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunityproducts = opportunityproductsData; masterData.opportunitycompetitors = opportunitycompetitorsData;
let opportunitycompetitorsData:any = []; let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any); opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){ if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => { opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.opportunityproductid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunitycompetitors = opportunitycompetitorsData; masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = []; let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any); quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
...@@ -686,43 +686,43 @@ export default class OpportunityServiceBase extends EntityService { ...@@ -686,43 +686,43 @@ export default class OpportunityServiceBase extends EntityService {
masterData.quotes = quotesData; masterData.quotes = quotesData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/opportunities/${context.opportunity}/lose`,data,isloading); let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/opportunities/${context.opportunity}/lose`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors)); this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes)); this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
return res; return res;
} }
if(context.contact && context.opportunity){ if(context.contact && context.opportunity){
let masterData:any = {}; let masterData:any = {};
let opportunityproductsData:any = []; let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any); opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){ if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunityproductsData.forEach((item:any) => { opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunityproducts = opportunityproductsData; masterData.opportunitycompetitors = opportunitycompetitorsData;
let opportunitycompetitorsData:any = []; let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any); opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){ if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => { opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.opportunityproductid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunitycompetitors = opportunitycompetitorsData; masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = []; let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any); quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
...@@ -740,8 +740,8 @@ export default class OpportunityServiceBase extends EntityService { ...@@ -740,8 +740,8 @@ export default class OpportunityServiceBase extends EntityService {
masterData.quotes = quotesData; masterData.quotes = quotesData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/contacts/${context.contact}/opportunities/${context.opportunity}/lose`,data,isloading); let res:any = await Http.getInstance().post(`/contacts/${context.contact}/opportunities/${context.opportunity}/lose`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors)); this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes)); this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
return res; return res;
} }
...@@ -760,36 +760,36 @@ export default class OpportunityServiceBase extends EntityService { ...@@ -760,36 +760,36 @@ export default class OpportunityServiceBase extends EntityService {
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.opportunity){ if(context.account && context.contact && context.opportunity){
let masterData:any = {}; let masterData:any = {};
let opportunityproductsData:any = []; let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any); opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){ if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunityproductsData.forEach((item:any) => { opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunityproducts = opportunityproductsData; masterData.opportunitycompetitors = opportunitycompetitorsData;
let opportunitycompetitorsData:any = []; let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any); opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){ if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => { opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.opportunityproductid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunitycompetitors = opportunitycompetitorsData; masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = []; let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any); quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
...@@ -807,43 +807,43 @@ export default class OpportunityServiceBase extends EntityService { ...@@ -807,43 +807,43 @@ export default class OpportunityServiceBase extends EntityService {
masterData.quotes = quotesData; masterData.quotes = quotesData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/opportunities/${context.opportunity}/save`,data,isloading); let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/opportunities/${context.opportunity}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors)); this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes)); this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
return res; return res;
} }
if(context.contact && context.opportunity){ if(context.contact && context.opportunity){
let masterData:any = {}; let masterData:any = {};
let opportunityproductsData:any = []; let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any); opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){ if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunityproductsData.forEach((item:any) => { opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunityproducts = opportunityproductsData; masterData.opportunitycompetitors = opportunitycompetitorsData;
let opportunitycompetitorsData:any = []; let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any); opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){ if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => { opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.opportunityproductid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunitycompetitors = opportunitycompetitorsData; masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = []; let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any); quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
...@@ -861,42 +861,42 @@ export default class OpportunityServiceBase extends EntityService { ...@@ -861,42 +861,42 @@ export default class OpportunityServiceBase extends EntityService {
masterData.quotes = quotesData; masterData.quotes = quotesData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/contacts/${context.contact}/opportunities/${context.opportunity}/save`,data,isloading); let res:any = await Http.getInstance().post(`/contacts/${context.contact}/opportunities/${context.opportunity}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors)); this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes)); this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
return res; return res;
} }
let masterData:any = {}; let masterData:any = {};
let opportunityproductsData:any = []; let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any); opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){ if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunityproductsData.forEach((item:any) => { opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunityproducts = opportunityproductsData; masterData.opportunitycompetitors = opportunitycompetitorsData;
let opportunitycompetitorsData:any = []; let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any); opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){ if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => { opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.opportunityproductid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunitycompetitors = opportunitycompetitorsData; masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = []; let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any); quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
...@@ -914,8 +914,8 @@ export default class OpportunityServiceBase extends EntityService { ...@@ -914,8 +914,8 @@ export default class OpportunityServiceBase extends EntityService {
masterData.quotes = quotesData; masterData.quotes = quotesData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/opportunities/${context.opportunity}/save`,data,isloading); let res:any = await Http.getInstance().post(`/opportunities/${context.opportunity}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors)); this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes)); this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
return res; return res;
} }
...@@ -932,36 +932,36 @@ export default class OpportunityServiceBase extends EntityService { ...@@ -932,36 +932,36 @@ export default class OpportunityServiceBase extends EntityService {
public async Win(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Win(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.opportunity){ if(context.account && context.contact && context.opportunity){
let masterData:any = {}; let masterData:any = {};
let opportunityproductsData:any = []; let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any); opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){ if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunityproductsData.forEach((item:any) => { opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunityproducts = opportunityproductsData; masterData.opportunitycompetitors = opportunitycompetitorsData;
let opportunitycompetitorsData:any = []; let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any); opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){ if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => { opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.opportunityproductid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunitycompetitors = opportunitycompetitorsData; masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = []; let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any); quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
...@@ -979,43 +979,43 @@ export default class OpportunityServiceBase extends EntityService { ...@@ -979,43 +979,43 @@ export default class OpportunityServiceBase extends EntityService {
masterData.quotes = quotesData; masterData.quotes = quotesData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/opportunities/${context.opportunity}/win`,data,isloading); let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/opportunities/${context.opportunity}/win`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors)); this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes)); this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
return res; return res;
} }
if(context.contact && context.opportunity){ if(context.contact && context.opportunity){
let masterData:any = {}; let masterData:any = {};
let opportunityproductsData:any = []; let opportunitycompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){
opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any); opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any);
if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){ if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){
opportunityproductsData.forEach((item:any) => { opportunitycompetitorsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.opportunityproductid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunityproducts = opportunityproductsData; masterData.opportunitycompetitors = opportunitycompetitorsData;
let opportunitycompetitorsData:any = []; let opportunityproductsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts'),'undefined')){
opportunitycompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunitycompetitors') as any); opportunityproductsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunityproducts') as any);
if(opportunitycompetitorsData && opportunitycompetitorsData.length && opportunitycompetitorsData.length > 0){ if(opportunityproductsData && opportunityproductsData.length && opportunityproductsData.length > 0){
opportunitycompetitorsData.forEach((item:any) => { opportunityproductsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.opportunityproductid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.opportunitycompetitors = opportunitycompetitorsData; masterData.opportunityproducts = opportunityproductsData;
let quotesData:any = []; let quotesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_quotes'),'undefined')){
quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any); quotesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_quotes') as any);
...@@ -1033,8 +1033,8 @@ export default class OpportunityServiceBase extends EntityService { ...@@ -1033,8 +1033,8 @@ export default class OpportunityServiceBase extends EntityService {
masterData.quotes = quotesData; masterData.quotes = quotesData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/contacts/${context.contact}/opportunities/${context.opportunity}/win`,data,isloading); let res:any = await Http.getInstance().post(`/contacts/${context.contact}/opportunities/${context.opportunity}/win`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors)); this.tempStorage.setItem(context.srfsessionkey+'_opportunitycompetitors',JSON.stringify(res.data.opportunitycompetitors));
this.tempStorage.setItem(context.srfsessionkey+'_opportunityproducts',JSON.stringify(res.data.opportunityproducts));
this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes)); this.tempStorage.setItem(context.srfsessionkey+'_quotes',JSON.stringify(res.data.quotes));
return res; return res;
} }
......
...@@ -62,6 +62,21 @@ export default class ProductServiceBase extends EntityService { ...@@ -62,6 +62,21 @@ export default class ProductServiceBase extends EntityService {
*/ */
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {}; let masterData:any = {};
let productpricelevelsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productpricelevels'),'undefined')){
productpricelevelsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productpricelevels') as any);
if(productpricelevelsData && productpricelevelsData.length && productpricelevelsData.length > 0){
productpricelevelsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.productpricelevelid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.productpricelevels = productpricelevelsData;
let productsubstitutesData:any = []; let productsubstitutesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productsubstitutes'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productsubstitutes'),'undefined')){
productsubstitutesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productsubstitutes') as any); productsubstitutesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productsubstitutes') as any);
...@@ -92,21 +107,6 @@ export default class ProductServiceBase extends EntityService { ...@@ -92,21 +107,6 @@ export default class ProductServiceBase extends EntityService {
} }
} }
masterData.productassociations = productassociationsData; masterData.productassociations = productassociationsData;
let productpricelevelsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productpricelevels'),'undefined')){
productpricelevelsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productpricelevels') as any);
if(productpricelevelsData && productpricelevelsData.length && productpricelevelsData.length > 0){
productpricelevelsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.productpricelevelid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.productpricelevels = productpricelevelsData;
Object.assign(data,masterData); Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){ if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null; data[this.APPDEKEY] = null;
...@@ -116,9 +116,9 @@ export default class ProductServiceBase extends EntityService { ...@@ -116,9 +116,9 @@ export default class ProductServiceBase extends EntityService {
} }
let tempContext:any = JSON.parse(JSON.stringify(context)); let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/products`,data,isloading); let res:any = await Http.getInstance().post(`/products`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_productpricelevels',JSON.stringify(res.data.productpricelevels));
this.tempStorage.setItem(tempContext.srfsessionkey+'_productsubstitutes',JSON.stringify(res.data.productsubstitutes)); this.tempStorage.setItem(tempContext.srfsessionkey+'_productsubstitutes',JSON.stringify(res.data.productsubstitutes));
this.tempStorage.setItem(tempContext.srfsessionkey+'_productassociations',JSON.stringify(res.data.productassociations)); this.tempStorage.setItem(tempContext.srfsessionkey+'_productassociations',JSON.stringify(res.data.productassociations));
this.tempStorage.setItem(tempContext.srfsessionkey+'_productpricelevels',JSON.stringify(res.data.productpricelevels));
return res; return res;
} }
...@@ -133,6 +133,21 @@ export default class ProductServiceBase extends EntityService { ...@@ -133,6 +133,21 @@ export default class ProductServiceBase extends EntityService {
*/ */
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {}; let masterData:any = {};
let productpricelevelsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productpricelevels'),'undefined')){
productpricelevelsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productpricelevels') as any);
if(productpricelevelsData && productpricelevelsData.length && productpricelevelsData.length > 0){
productpricelevelsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.productpricelevelid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.productpricelevels = productpricelevelsData;
let productsubstitutesData:any = []; let productsubstitutesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productsubstitutes'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productsubstitutes'),'undefined')){
productsubstitutesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productsubstitutes') as any); productsubstitutesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productsubstitutes') as any);
...@@ -163,26 +178,11 @@ export default class ProductServiceBase extends EntityService { ...@@ -163,26 +178,11 @@ export default class ProductServiceBase extends EntityService {
} }
} }
masterData.productassociations = productassociationsData; masterData.productassociations = productassociationsData;
let productpricelevelsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productpricelevels'),'undefined')){
productpricelevelsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productpricelevels') as any);
if(productpricelevelsData && productpricelevelsData.length && productpricelevelsData.length > 0){
productpricelevelsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.productpricelevelid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.productpricelevels = productpricelevelsData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/products/${context.product}`,data,isloading); let res:any = await Http.getInstance().put(`/products/${context.product}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_productpricelevels',JSON.stringify(res.data.productpricelevels));
this.tempStorage.setItem(context.srfsessionkey+'_productsubstitutes',JSON.stringify(res.data.productsubstitutes)); this.tempStorage.setItem(context.srfsessionkey+'_productsubstitutes',JSON.stringify(res.data.productsubstitutes));
this.tempStorage.setItem(context.srfsessionkey+'_productassociations',JSON.stringify(res.data.productassociations)); this.tempStorage.setItem(context.srfsessionkey+'_productassociations',JSON.stringify(res.data.productassociations));
this.tempStorage.setItem(context.srfsessionkey+'_productpricelevels',JSON.stringify(res.data.productpricelevels));
return res; return res;
} }
...@@ -210,9 +210,9 @@ export default class ProductServiceBase extends EntityService { ...@@ -210,9 +210,9 @@ export default class ProductServiceBase extends EntityService {
*/ */
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/products/${context.product}`,isloading); let res:any = await Http.getInstance().get(`/products/${context.product}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_productpricelevels',JSON.stringify(res.data.productpricelevels));
this.tempStorage.setItem(context.srfsessionkey+'_productsubstitutes',JSON.stringify(res.data.productsubstitutes)); this.tempStorage.setItem(context.srfsessionkey+'_productsubstitutes',JSON.stringify(res.data.productsubstitutes));
this.tempStorage.setItem(context.srfsessionkey+'_productassociations',JSON.stringify(res.data.productassociations)); this.tempStorage.setItem(context.srfsessionkey+'_productassociations',JSON.stringify(res.data.productassociations));
this.tempStorage.setItem(context.srfsessionkey+'_productpricelevels',JSON.stringify(res.data.productpricelevels));
return res; return res;
} }
...@@ -228,9 +228,9 @@ export default class ProductServiceBase extends EntityService { ...@@ -228,9 +228,9 @@ export default class ProductServiceBase extends EntityService {
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/products/getdraft`,isloading); let res:any = await Http.getInstance().get(`/products/getdraft`,isloading);
res.data.product = data.product; res.data.product = data.product;
this.tempStorage.setItem(context.srfsessionkey+'_productpricelevels',JSON.stringify(res.data.productpricelevels));
this.tempStorage.setItem(context.srfsessionkey+'_productsubstitutes',JSON.stringify(res.data.productsubstitutes)); this.tempStorage.setItem(context.srfsessionkey+'_productsubstitutes',JSON.stringify(res.data.productsubstitutes));
this.tempStorage.setItem(context.srfsessionkey+'_productassociations',JSON.stringify(res.data.productassociations)); this.tempStorage.setItem(context.srfsessionkey+'_productassociations',JSON.stringify(res.data.productassociations));
this.tempStorage.setItem(context.srfsessionkey+'_productpricelevels',JSON.stringify(res.data.productpricelevels));
return res; return res;
} }
...@@ -258,6 +258,21 @@ export default class ProductServiceBase extends EntityService { ...@@ -258,6 +258,21 @@ export default class ProductServiceBase extends EntityService {
*/ */
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {}; let masterData:any = {};
let productpricelevelsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productpricelevels'),'undefined')){
productpricelevelsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productpricelevels') as any);
if(productpricelevelsData && productpricelevelsData.length && productpricelevelsData.length > 0){
productpricelevelsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.productpricelevelid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.productpricelevels = productpricelevelsData;
let productsubstitutesData:any = []; let productsubstitutesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productsubstitutes'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productsubstitutes'),'undefined')){
productsubstitutesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productsubstitutes') as any); productsubstitutesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productsubstitutes') as any);
...@@ -288,26 +303,11 @@ export default class ProductServiceBase extends EntityService { ...@@ -288,26 +303,11 @@ export default class ProductServiceBase extends EntityService {
} }
} }
masterData.productassociations = productassociationsData; masterData.productassociations = productassociationsData;
let productpricelevelsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productpricelevels'),'undefined')){
productpricelevelsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productpricelevels') as any);
if(productpricelevelsData && productpricelevelsData.length && productpricelevelsData.length > 0){
productpricelevelsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.productpricelevelid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.productpricelevels = productpricelevelsData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/products/${context.product}/save`,data,isloading); let res:any = await Http.getInstance().post(`/products/${context.product}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_productpricelevels',JSON.stringify(res.data.productpricelevels));
this.tempStorage.setItem(context.srfsessionkey+'_productsubstitutes',JSON.stringify(res.data.productsubstitutes)); this.tempStorage.setItem(context.srfsessionkey+'_productsubstitutes',JSON.stringify(res.data.productsubstitutes));
this.tempStorage.setItem(context.srfsessionkey+'_productassociations',JSON.stringify(res.data.productassociations)); this.tempStorage.setItem(context.srfsessionkey+'_productassociations',JSON.stringify(res.data.productassociations));
this.tempStorage.setItem(context.srfsessionkey+'_productpricelevels',JSON.stringify(res.data.productpricelevels));
return res; return res;
} }
......
...@@ -62,36 +62,36 @@ export default class SalesLiteratureServiceBase extends EntityService { ...@@ -62,36 +62,36 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/ */
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {}; let masterData:any = {};
let productsalesliteraturesData:any = []; let salesliteratureitemsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_salesliteratureitems'),'undefined')){
productsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures') as any); salesliteratureitemsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_salesliteratureitems') as any);
if(productsalesliteraturesData && productsalesliteraturesData.length && productsalesliteraturesData.length > 0){ if(salesliteratureitemsData && salesliteratureitemsData.length && salesliteratureitemsData.length > 0){
productsalesliteraturesData.forEach((item:any) => { salesliteratureitemsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.salesliteratureitemid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.productsalesliteratures = productsalesliteraturesData; masterData.salesliteratureitems = salesliteratureitemsData;
let salesliteratureitemsData:any = []; let productsalesliteraturesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_salesliteratureitems'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures'),'undefined')){
salesliteratureitemsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_salesliteratureitems') as any); productsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures') as any);
if(salesliteratureitemsData && salesliteratureitemsData.length && salesliteratureitemsData.length > 0){ if(productsalesliteraturesData && productsalesliteraturesData.length && productsalesliteraturesData.length > 0){
salesliteratureitemsData.forEach((item:any) => { productsalesliteraturesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.salesliteratureitemid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.salesliteratureitems = salesliteratureitemsData; masterData.productsalesliteratures = productsalesliteraturesData;
let competitorsalesliteraturesData:any = []; let competitorsalesliteraturesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_competitorsalesliteratures'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_competitorsalesliteratures'),'undefined')){
competitorsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_competitorsalesliteratures') as any); competitorsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_competitorsalesliteratures') as any);
...@@ -116,8 +116,8 @@ export default class SalesLiteratureServiceBase extends EntityService { ...@@ -116,8 +116,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
} }
let tempContext:any = JSON.parse(JSON.stringify(context)); let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/salesliteratures`,data,isloading); let res:any = await Http.getInstance().post(`/salesliteratures`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_productsalesliteratures',JSON.stringify(res.data.productsalesliteratures));
this.tempStorage.setItem(tempContext.srfsessionkey+'_salesliteratureitems',JSON.stringify(res.data.salesliteratureitems)); this.tempStorage.setItem(tempContext.srfsessionkey+'_salesliteratureitems',JSON.stringify(res.data.salesliteratureitems));
this.tempStorage.setItem(tempContext.srfsessionkey+'_productsalesliteratures',JSON.stringify(res.data.productsalesliteratures));
this.tempStorage.setItem(tempContext.srfsessionkey+'_competitorsalesliteratures',JSON.stringify(res.data.competitorsalesliteratures)); this.tempStorage.setItem(tempContext.srfsessionkey+'_competitorsalesliteratures',JSON.stringify(res.data.competitorsalesliteratures));
return res; return res;
} }
...@@ -133,36 +133,36 @@ export default class SalesLiteratureServiceBase extends EntityService { ...@@ -133,36 +133,36 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/ */
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {}; let masterData:any = {};
let productsalesliteraturesData:any = []; let salesliteratureitemsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_salesliteratureitems'),'undefined')){
productsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures') as any); salesliteratureitemsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_salesliteratureitems') as any);
if(productsalesliteraturesData && productsalesliteraturesData.length && productsalesliteraturesData.length > 0){ if(salesliteratureitemsData && salesliteratureitemsData.length && salesliteratureitemsData.length > 0){
productsalesliteraturesData.forEach((item:any) => { salesliteratureitemsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.salesliteratureitemid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.productsalesliteratures = productsalesliteraturesData; masterData.salesliteratureitems = salesliteratureitemsData;
let salesliteratureitemsData:any = []; let productsalesliteraturesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_salesliteratureitems'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures'),'undefined')){
salesliteratureitemsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_salesliteratureitems') as any); productsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures') as any);
if(salesliteratureitemsData && salesliteratureitemsData.length && salesliteratureitemsData.length > 0){ if(productsalesliteraturesData && productsalesliteraturesData.length && productsalesliteraturesData.length > 0){
salesliteratureitemsData.forEach((item:any) => { productsalesliteraturesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.salesliteratureitemid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.salesliteratureitems = salesliteratureitemsData; masterData.productsalesliteratures = productsalesliteraturesData;
let competitorsalesliteraturesData:any = []; let competitorsalesliteraturesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_competitorsalesliteratures'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_competitorsalesliteratures'),'undefined')){
competitorsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_competitorsalesliteratures') as any); competitorsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_competitorsalesliteratures') as any);
...@@ -180,8 +180,8 @@ export default class SalesLiteratureServiceBase extends EntityService { ...@@ -180,8 +180,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
masterData.competitorsalesliteratures = competitorsalesliteraturesData; masterData.competitorsalesliteratures = competitorsalesliteraturesData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/salesliteratures/${context.salesliterature}`,data,isloading); let res:any = await Http.getInstance().put(`/salesliteratures/${context.salesliterature}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_productsalesliteratures',JSON.stringify(res.data.productsalesliteratures));
this.tempStorage.setItem(context.srfsessionkey+'_salesliteratureitems',JSON.stringify(res.data.salesliteratureitems)); this.tempStorage.setItem(context.srfsessionkey+'_salesliteratureitems',JSON.stringify(res.data.salesliteratureitems));
this.tempStorage.setItem(context.srfsessionkey+'_productsalesliteratures',JSON.stringify(res.data.productsalesliteratures));
this.tempStorage.setItem(context.srfsessionkey+'_competitorsalesliteratures',JSON.stringify(res.data.competitorsalesliteratures)); this.tempStorage.setItem(context.srfsessionkey+'_competitorsalesliteratures',JSON.stringify(res.data.competitorsalesliteratures));
return res; return res;
} }
...@@ -210,8 +210,8 @@ export default class SalesLiteratureServiceBase extends EntityService { ...@@ -210,8 +210,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/ */
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/salesliteratures/${context.salesliterature}`,isloading); let res:any = await Http.getInstance().get(`/salesliteratures/${context.salesliterature}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_productsalesliteratures',JSON.stringify(res.data.productsalesliteratures));
this.tempStorage.setItem(context.srfsessionkey+'_salesliteratureitems',JSON.stringify(res.data.salesliteratureitems)); this.tempStorage.setItem(context.srfsessionkey+'_salesliteratureitems',JSON.stringify(res.data.salesliteratureitems));
this.tempStorage.setItem(context.srfsessionkey+'_productsalesliteratures',JSON.stringify(res.data.productsalesliteratures));
this.tempStorage.setItem(context.srfsessionkey+'_competitorsalesliteratures',JSON.stringify(res.data.competitorsalesliteratures)); this.tempStorage.setItem(context.srfsessionkey+'_competitorsalesliteratures',JSON.stringify(res.data.competitorsalesliteratures));
return res; return res;
} }
...@@ -228,8 +228,8 @@ export default class SalesLiteratureServiceBase extends EntityService { ...@@ -228,8 +228,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/salesliteratures/getdraft`,isloading); let res:any = await Http.getInstance().get(`/salesliteratures/getdraft`,isloading);
res.data.salesliterature = data.salesliterature; res.data.salesliterature = data.salesliterature;
this.tempStorage.setItem(context.srfsessionkey+'_productsalesliteratures',JSON.stringify(res.data.productsalesliteratures));
this.tempStorage.setItem(context.srfsessionkey+'_salesliteratureitems',JSON.stringify(res.data.salesliteratureitems)); this.tempStorage.setItem(context.srfsessionkey+'_salesliteratureitems',JSON.stringify(res.data.salesliteratureitems));
this.tempStorage.setItem(context.srfsessionkey+'_productsalesliteratures',JSON.stringify(res.data.productsalesliteratures));
this.tempStorage.setItem(context.srfsessionkey+'_competitorsalesliteratures',JSON.stringify(res.data.competitorsalesliteratures)); this.tempStorage.setItem(context.srfsessionkey+'_competitorsalesliteratures',JSON.stringify(res.data.competitorsalesliteratures));
return res; return res;
} }
...@@ -258,36 +258,36 @@ export default class SalesLiteratureServiceBase extends EntityService { ...@@ -258,36 +258,36 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/ */
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {}; let masterData:any = {};
let productsalesliteraturesData:any = []; let salesliteratureitemsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_salesliteratureitems'),'undefined')){
productsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures') as any); salesliteratureitemsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_salesliteratureitems') as any);
if(productsalesliteraturesData && productsalesliteraturesData.length && productsalesliteraturesData.length > 0){ if(salesliteratureitemsData && salesliteratureitemsData.length && salesliteratureitemsData.length > 0){
productsalesliteraturesData.forEach((item:any) => { salesliteratureitemsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null; item.salesliteratureitemid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.productsalesliteratures = productsalesliteraturesData; masterData.salesliteratureitems = salesliteratureitemsData;
let salesliteratureitemsData:any = []; let productsalesliteraturesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_salesliteratureitems'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures'),'undefined')){
salesliteratureitemsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_salesliteratureitems') as any); productsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures') as any);
if(salesliteratureitemsData && salesliteratureitemsData.length && salesliteratureitemsData.length > 0){ if(productsalesliteraturesData && productsalesliteraturesData.length && productsalesliteraturesData.length > 0){
salesliteratureitemsData.forEach((item:any) => { productsalesliteraturesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.salesliteratureitemid = null; item.relationshipsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.salesliteratureitems = salesliteratureitemsData; masterData.productsalesliteratures = productsalesliteraturesData;
let competitorsalesliteraturesData:any = []; let competitorsalesliteraturesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_competitorsalesliteratures'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_competitorsalesliteratures'),'undefined')){
competitorsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_competitorsalesliteratures') as any); competitorsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_competitorsalesliteratures') as any);
...@@ -305,8 +305,8 @@ export default class SalesLiteratureServiceBase extends EntityService { ...@@ -305,8 +305,8 @@ export default class SalesLiteratureServiceBase extends EntityService {
masterData.competitorsalesliteratures = competitorsalesliteraturesData; masterData.competitorsalesliteratures = competitorsalesliteraturesData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/salesliteratures/${context.salesliterature}/save`,data,isloading); let res:any = await Http.getInstance().post(`/salesliteratures/${context.salesliterature}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_productsalesliteratures',JSON.stringify(res.data.productsalesliteratures));
this.tempStorage.setItem(context.srfsessionkey+'_salesliteratureitems',JSON.stringify(res.data.salesliteratureitems)); this.tempStorage.setItem(context.srfsessionkey+'_salesliteratureitems',JSON.stringify(res.data.salesliteratureitems));
this.tempStorage.setItem(context.srfsessionkey+'_productsalesliteratures',JSON.stringify(res.data.productsalesliteratures));
this.tempStorage.setItem(context.srfsessionkey+'_competitorsalesliteratures',JSON.stringify(res.data.competitorsalesliteratures)); this.tempStorage.setItem(context.srfsessionkey+'_competitorsalesliteratures',JSON.stringify(res.data.competitorsalesliteratures));
return res; return res;
} }
......
import { AppNavHistory } from '../app-nav-history/AppNavHistory'; import { AppNavHistory } from '../app-nav-history/AppNavHistory';
import { AppContextStore } from '../app-context-store/AppContextStore'; import { AppContextStore } from '../app-context-store/AppContextStore';
import { AppViewStore } from '../app-view-store/AppViewStore';
/** /**
* 应用服务基类 * 应用服务基类
...@@ -25,6 +26,14 @@ export class AppServiceBase { ...@@ -25,6 +26,14 @@ export class AppServiceBase {
*/ */
public readonly contextStore: AppContextStore = this.navHistory.contextStore; public readonly contextStore: AppContextStore = this.navHistory.contextStore;
/**
* 应用视图仓库
*
* @type {AppViewStore}
* @memberof AppServiceBase
*/
public readonly viewStore: AppViewStore = new AppViewStore();
/** /**
* 退出登录 * 退出登录
* *
......
import { SingletonMode } from '@/studio-core/decorators/SingletonMode';
import { AppViewStoreBase } from './AppViewStoreBase';
/**
* 应用视图仓库
*
* @export
* @class AppViewStore
* @extends {AppViewStoreBase}
*/
@SingletonMode()
export class AppViewStore extends AppViewStoreBase {
}
\ No newline at end of file
/**
* 应用视图仓库基类
*
* @export
* @class AppViewStoreBase
*/
export class AppViewStoreBase {
/**
* 已实例化非嵌入级视图,根据实例化顺序排序
*
* @type {any[]}
* @memberof AppViewStoreBase
*/
public readonly viewList: any[] = [];
/**
* 添加视图
*
* @param {*} view
* @memberof AppViewStoreBase
*/
public push(view: any): void {
this.viewList.push(view);
console.log(this.viewList);
}
/**
* 删除最后视图
*
* @memberof AppViewStoreBase
*/
public pop(): void {
this.viewList.pop();
}
}
\ No newline at end of file
...@@ -270,7 +270,7 @@ export class StudioDrawer extends Vue { ...@@ -270,7 +270,7 @@ export class StudioDrawer extends Vue {
*/ */
protected renderViews(h: CreateElement): any { protected renderViews(h: CreateElement): any {
return this.showViewList.map((view: any, i: number) => { return this.showViewList.map((view: any, i: number) => {
const props: any = { openMode: 'MODAL', viewDefaultUsage: false, viewdata: JSON.stringify(view.viewdata), viewparams: view.viewparams }; const props: any = { openMode: 'MODAL', viewUsage: 2, viewDefaultUsage: false, viewdata: JSON.stringify(view.viewdata), viewparams: view.viewparams };
const style: any = { 'z-index': i + 1 }; const style: any = { 'z-index': i + 1 };
return <div class={{ 'studio-drawer-item': true, 'active': this.activeIndex === i }}> return <div class={{ 'studio-drawer-item': true, 'active': this.activeIndex === i }}>
{h(view.viewname, { {h(view.viewname, {
......
import { ViewBase } from './ViewBase';
/**
* 导航视图基类
*
* @export
* @class ExpViewBase
* @extends {ViewBase}
*/
export class ExpViewBase extends ViewBase {
}
\ No newline at end of file
import { ListViewBase } from './ListViewBase'; import { ExpViewBase } from './ExpViewBase';
/** /**
* 列表导航视图基类 * 列表导航视图基类
* *
* @export * @export
* @class ListExpViewBase * @class ListExpViewBase
* @extends {ListViewBase} * @extends {ExpViewBase}
*/ */
export class ListExpViewBase extends ListViewBase { export class ListExpViewBase extends ExpViewBase {
} }
\ No newline at end of file
import { ViewBase } from './ViewBase'; import { ExpViewBase } from './ExpViewBase';
/** /**
* 分页导航视图基类 * 分页导航视图基类
* *
* @export * @export
* @class TabExpViewBase * @class TabExpViewBase
* @extends {ViewBase} * @extends {ExpViewBase}
*/ */
export class TabExpViewBase extends ViewBase { export class TabExpViewBase extends ExpViewBase {
} }
\ No newline at end of file
import { MDViewBase } from './MDViewBase'; import { ExpViewBase } from './ExpViewBase';
/** /**
* 树导航视图基类 * 树导航视图基类
* *
* @export * @export
* @class TreeExpViewBase * @class TreeExpViewBase
* @extends {MDViewBase} * @extends {ExpViewBase}
*/ */
export class TreeExpViewBase extends MDViewBase { export class TreeExpViewBase extends ExpViewBase {
} }
\ No newline at end of file
...@@ -60,11 +60,11 @@ export class ViewBase extends Vue { ...@@ -60,11 +60,11 @@ export class ViewBase extends Vue {
/** /**
* 视图使用模式 * 视图使用模式
* *
* @type {(1 | 2 | 4)} 1:路由模式;2:模态模式;4:嵌入模式 * @type {(1 | 2 | 4 | 7)} 1:路由模式;2:模态模式;4:嵌入模式;7:导航嵌入模式,如「分页导航、树导航等」内嵌入使用的视图
* @memberof ViewBase * @memberof ViewBase
*/ */
@Prop({ default: 1 }) @Prop({ default: 1 })
public viewUsage!: 1 | 2 | 4; public viewUsage!: 1 | 2 | 4 | 7;
/** /**
* 快速搜索值 * 快速搜索值
...@@ -264,6 +264,9 @@ export class ViewBase extends Vue { ...@@ -264,6 +264,9 @@ export class ViewBase extends Vue {
* @memberof ViewBase * @memberof ViewBase
*/ */
public created(): void { public created(): void {
if (this.viewUsage === 1 || this.viewUsage === 2) {
this.$appService.viewStore.push(this);
}
const secondtag = this.$util.createUUID(); const secondtag = this.$util.createUUID();
this.$store.commit('viewaction/createdView', { viewtag: this.viewtag, secondtag: secondtag }); this.$store.commit('viewaction/createdView', { viewtag: this.viewtag, secondtag: secondtag });
this.viewtag = secondtag; this.viewtag = secondtag;
...@@ -314,6 +317,9 @@ export class ViewBase extends Vue { ...@@ -314,6 +317,9 @@ export class ViewBase extends Vue {
* @memberof ViewBase * @memberof ViewBase
*/ */
public destroyed(): void { public destroyed(): void {
if (this.viewUsage === 1 || this.viewUsage === 2) {
this.$appService.viewStore.pop();
}
if (this.viewDefaultUsage) { if (this.viewDefaultUsage) {
const regExp = new RegExp(`^${this.context.srfsessionid}_(.*)`); const regExp = new RegExp(`^${this.context.srfsessionid}_(.*)`);
for (const key in localStorage) { for (const key in localStorage) {
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<component <component
:is="viewname" :is="viewname"
class="viewcontainer2" class="viewcontainer2"
:viewUsage="2"
:viewDefaultUsage="false" :viewDefaultUsage="false"
:viewdata="JSON.stringify(viewdata)" :viewdata="JSON.stringify(viewdata)"
:viewparam="JSON.stringify(viewparams)" :viewparam="JSON.stringify(viewparams)"
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
<component <component
:is="viewname" :is="viewname"
class="viewcontainer2" class="viewcontainer2"
:viewUsage="2"
:viewDefaultUsage="false" :viewDefaultUsage="false"
:viewdata="JSON.stringify(viewdata)" :viewdata="JSON.stringify(viewdata)"
:viewparam="JSON.stringify(viewparams)" :viewparam="JSON.stringify(viewparams)"
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
v-if="selection.view && !Object.is(this.selection.view.viewname, '')" v-if="selection.view && !Object.is(this.selection.view.viewname, '')"
:is="selection.view.viewname" :is="selection.view.viewname"
class="viewcontainer2" class="viewcontainer2"
:viewUsage="7"
:viewDefaultUsage="false" :viewDefaultUsage="false"
:viewdata="JSON.stringify(selection.context)" :viewdata="JSON.stringify(selection.context)"
:viewparam="JSON.stringify(selection.viewparam)" :viewparam="JSON.stringify(selection.viewparam)"
......
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<account-summary <account-summary
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</account-summary> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<activity-pointer-by-parent-key <activity-pointer-by-parent-key
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</activity-pointer-by-parent-key> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<account-info-major-contact <account-info-major-contact
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</account-info-major-contact> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<account-grid-view <account-grid-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</account-grid-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='portlet view-account-info-all ' :style="{}"> <div class='portlet view-account-info-all ' :style="{}">
<div class="portlet-without-title"> <div class="portlet-without-title">
<account-info-all :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></account-info-all> <account-info-all :viewUsage="4" :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></account-info-all>
</div> </div>
</div> </div>
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<campaign-summary <campaign-summary
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</campaign-summary> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<campaign-activity-by-parent-key <campaign-activity-by-parent-key
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</campaign-activity-by-parent-key> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<lead-grid-view <lead-grid-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</lead-grid-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<campaign-response-by-parent-key <campaign-response-by-parent-key
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</campaign-response-by-parent-key> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<campaign-list-grid-view <campaign-list-grid-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</campaign-list-grid-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
...@@ -6,6 +6,6 @@ ...@@ -6,6 +6,6 @@
</span> </span>
</p> </p>
<div class="portlet-with-title"> <div class="portlet-with-title">
<campaign-info-campagin :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></campaign-info-campagin> <campaign-info-campagin :viewUsage="4" :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></campaign-info-campagin>
</div> </div>
</div> </div>
<div class='portlet view-head ' :style="{}"> <div class='portlet view-head ' :style="{}">
<div class="portlet-without-title"> <div class="portlet-without-title">
<campaign-info-head :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></campaign-info-head> <campaign-info-head :viewUsage="4" :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></campaign-info-head>
</div> </div>
</div> </div>
<div class='portlet view-info ' :style="{}"> <div class='portlet view-info ' :style="{}">
<div class="portlet-without-title"> <div class="portlet-without-title">
<campaign-info :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></campaign-info> <campaign-info :viewUsage="4" :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></campaign-info>
</div> </div>
</div> </div>
...@@ -6,6 +6,6 @@ ...@@ -6,6 +6,6 @@
</span> </span>
</p> </p>
<div class="portlet-with-title"> <div class="portlet-with-title">
<campaign-info-manager :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></campaign-info-manager> <campaign-info-manager :viewUsage="4" :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></campaign-info-manager>
</div> </div>
</div> </div>
...@@ -6,6 +6,6 @@ ...@@ -6,6 +6,6 @@
</span> </span>
</p> </p>
<div class="portlet-with-title"> <div class="portlet-with-title">
<campaign-info-schedule :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></campaign-info-schedule> <campaign-info-schedule :viewUsage="4" :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></campaign-info-schedule>
</div> </div>
</div> </div>
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<competitor-summary <competitor-summary
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</competitor-summary> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<opportunity-competitor-opp-comp-grid-view <opportunity-competitor-opp-comp-grid-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</opportunity-competitor-opp-comp-grid-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='portlet view-comp-abstract ' :style="{}"> <div class='portlet view-comp-abstract ' :style="{}">
<div class="portlet-without-title"> <div class="portlet-without-title">
<competitor-info-abstract :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></competitor-info-abstract> <competitor-info-abstract :viewUsage="4" :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></competitor-info-abstract>
</div> </div>
</div> </div>
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<contact-summary-view <contact-summary-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</contact-summary-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<lead-con-lead-grid-view <lead-con-lead-grid-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</lead-con-lead-grid-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<opportunity-con-opp-grid-view <opportunity-con-opp-grid-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</opportunity-con-opp-grid-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<activity-pointer-by-parent-key <activity-pointer-by-parent-key
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</activity-pointer-by-parent-key> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='portlet view-con-abs ' :style="{}"> <div class='portlet view-con-abs ' :style="{}">
<div class="portlet-without-title"> <div class="portlet-without-title">
<contact-info-abstract :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></contact-info-abstract> <contact-info-abstract :viewUsage="4" :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></contact-info-abstract>
</div> </div>
</div> </div>
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<goal-summary-view <goal-summary-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</goal-summary-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<goal-child-goal-grid-view <goal-child-goal-grid-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</goal-child-goal-grid-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='portlet view-goal-info ' :style="{}"> <div class='portlet view-goal-info ' :style="{}">
<div class="portlet-without-title"> <div class="portlet-without-title">
<goal-info-goal-view :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></goal-info-goal-view> <goal-info-goal-view :viewUsage="4" :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></goal-info-goal-view>
</div> </div>
</div> </div>
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<ibiz-list-summary <ibiz-list-summary
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</ibiz-list-summary> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<list-account-by-list <list-account-by-list
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</list-account-by-list> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<list-contact-grid-view <list-contact-grid-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</list-contact-grid-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<list-lead-by-list <list-lead-by-list
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</list-lead-by-list> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<campaign-list-grid-view <campaign-list-grid-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</campaign-list-grid-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='portlet view-list-abs ' :style="{'height': isAdaptiveSize ? 'calc(100% - 16px)' : getHeight,}"> <div class='portlet view-list-abs ' :style="{'height': isAdaptiveSize ? 'calc(100% - 16px)' : getHeight,}">
<div class="portlet-without-title"> <div class="portlet-without-title">
<ibiz-list-info-abstract :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></ibiz-list-info-abstract> <ibiz-list-info-abstract :viewUsage="4" :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></ibiz-list-info-abstract>
</div> </div>
</div> </div>
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<incident-summary-view <incident-summary-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</incident-summary-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<incident-child-incident-grid-view <incident-child-incident-grid-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</incident-child-incident-grid-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='portlet view-incident-info ' :style="{}"> <div class='portlet view-incident-info ' :style="{}">
<div class="portlet-without-title"> <div class="portlet-without-title">
<incident-info-incident-view :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></incident-info-incident-view> <incident-info-incident-view :viewUsage="4" :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></incident-info-incident-view>
</div> </div>
</div> </div>
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<invoice-summary-view <invoice-summary-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</invoice-summary-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<invoice-detail-invoice-pro-grid-view <invoice-detail-invoice-pro-grid-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</invoice-detail-invoice-pro-grid-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='portlet view-inv-info ' :style="{}"> <div class='portlet view-inv-info ' :style="{}">
<div class="portlet-without-title"> <div class="portlet-without-title">
<invoice-info-invoice-view :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></invoice-info-invoice-view> <invoice-info-invoice-view :viewUsage="4" :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></invoice-info-invoice-view>
</div> </div>
</div> </div>
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<lead-dashboard-view <lead-dashboard-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</lead-dashboard-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<activity-pointer-by-parent-key <activity-pointer-by-parent-key
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</activity-pointer-by-parent-key> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='portlet view-lead-con ' :style="{}"> <div class='portlet view-lead-con ' :style="{}">
<div class="portlet-without-title"> <div class="portlet-without-title">
<lead-info-contact :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></lead-info-contact> <lead-info-contact :viewUsage="4" :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></lead-info-contact>
</div> </div>
</div> </div>
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<opportunity-summary <opportunity-summary
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</opportunity-summary> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<opportunity-product-opp-opp-pro-grid-view <opportunity-product-opp-opp-pro-grid-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</opportunity-product-opp-opp-pro-grid-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<quote-opp-qua-grid-view <quote-opp-qua-grid-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</quote-opp-qua-grid-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='portlet view-opp-abs ' :style="{}"> <div class='portlet view-opp-abs ' :style="{}">
<div class="portlet-without-title"> <div class="portlet-without-title">
<opportunity-info-abstract :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></opportunity-info-abstract> <opportunity-info-abstract :viewUsage="4" :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></opportunity-info-abstract>
</div> </div>
</div> </div>
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<product-summary-view <product-summary-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</product-summary-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<product-association-grid-view <product-association-grid-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</product-association-grid-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<product-price-level-pro-prilv-grid-view <product-price-level-pro-prilv-grid-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</product-price-level-pro-prilv-grid-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<product-substitute-grid-view <product-substitute-grid-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</product-substitute-grid-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='portlet view-pro-info ' :style="{}"> <div class='portlet view-pro-info ' :style="{}">
<div class="portlet-without-title"> <div class="portlet-without-title">
<product-info-pro-info :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></product-info-pro-info> <product-info-pro-info :viewUsage="4" :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></product-info-pro-info>
</div> </div>
</div> </div>
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<quote-summary <quote-summary
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</quote-summary> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<quote-detail-quo-detail-grid-view <quote-detail-quo-detail-grid-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</quote-detail-quo-detail-grid-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='portlet view-quo-abs ' :style="{}"> <div class='portlet view-quo-abs ' :style="{}">
<div class="portlet-without-title"> <div class="portlet-without-title">
<quote-info-abstract :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></quote-info-abstract> <quote-info-abstract :viewUsage="4" :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></quote-info-abstract>
</div> </div>
</div> </div>
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<sales-literature-summary-view <sales-literature-summary-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</sales-literature-summary-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<product-sales-literature-sal-lit-pro-grid-view <product-sales-literature-sal-lit-pro-grid-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</product-sales-literature-sal-lit-pro-grid-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<competitor-sales-literature-sal-lit-comp-grid-view <competitor-sales-literature-sal-lit-comp-grid-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</competitor-sales-literature-sal-lit-comp-grid-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='portlet view-sal-lit-info ' :style="{}"> <div class='portlet view-sal-lit-info ' :style="{}">
<div class="portlet-without-title"> <div class="portlet-without-title">
<sales-literature-info-sal-lit-view :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></sales-literature-info-sal-lit-view> <sales-literature-info-sal-lit-view :viewUsage="4" :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></sales-literature-info-sal-lit-view>
</div> </div>
</div> </div>
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<sales-order-summary-view <sales-order-summary-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</sales-order-summary-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='tabviewpanel' v-if='isActivied'> <div class='tabviewpanel' v-if='isActivied'>
<sales-order-detail-soproduct-grid-view <sales-order-detail-soproduct-grid-view
class='viewcontainer2' class='viewcontainer2'
:viewdata="viewdata" :viewdata="viewdata"
:viewparam="viewparam" :viewparam="viewparam"
@viewload="viewDatasChange($event)" @viewload="viewDatasChange($event)"
:viewDefaultUsage="false" > :viewDefaultUsage="false"
</sales-order-detail-soproduct-grid-view> :viewUsage="7"
/>
</div> </div>
\ No newline at end of file
<div class='portlet view-soinfo ' :style="{}"> <div class='portlet view-soinfo ' :style="{}">
<div class="portlet-without-title"> <div class="portlet-without-title">
<sales-order-info-soview :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></sales-order-info-soview> <sales-order-info-soview :viewUsage="4" :viewdata="JSON.stringify(context)" :viewDefaultUsage="false" ></sales-order-info-soview>
</div> </div>
</div> </div>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册