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

ibizdev提交

上级 974ba399
...@@ -4,12 +4,12 @@ const mock = MockAdapter.getInstance(); ...@@ -4,12 +4,12 @@ const mock = MockAdapter.getInstance();
// 模拟数据 // 模拟数据
const mockDatas: Array<any> = [ const mockDatas: Array<any> = [
{"sxzy":null,"jlczz":null,"ygbh":null,"ormorgsectorid":null,"bz":null,"reason":null,"xl":null,"xkml":null,"jymc":null,"jssj":null,"ormorgid":null,"bdwgznx":null,"createdate":"2020-05-18 16:52:45","enable":1,"updateman":"示例操作者","zjxtgznx":null,"srfkey":"1","gznx":null,"cjgzsj":null,"qssj":null,"fj":null,"pimeducationname":"教育信息","pimeducationid":"1","orgid":null,"bjgznx":null,"xllx":null,"spstate":null,"jlss":null,"byyx":null,"orgsectorid":null,"tozjdate":null,"btz":null,"pimpersonid":null,"sfdyxl":null,"xxxz":null,"xlcx":null,"sfzgxl":null,"jlspzt":null,"xwz":null,"degree":null,"jlglbh":null,"dbdwsj":null,"dzjbjsj":null,"updatedate":"2020-05-18 16:52:45","createman":"示例操作者","pimpersonname":null}, {"sxzy":null,"jlczz":null,"ygbh":null,"ormorgsectorid":null,"bz":null,"reason":null,"xl":null,"xkml":null,"jymc":null,"jssj":null,"ormorgid":null,"bdwgznx":null,"createdate":"2020-05-18 17:46:46","enable":1,"updateman":"示例操作者","zjxtgznx":null,"srfkey":"1","gznx":null,"cjgzsj":null,"qssj":null,"fj":null,"pimeducationname":"教育信息","pimeducationid":"1","orgid":null,"bjgznx":null,"xllx":null,"spstate":null,"jlss":null,"byyx":null,"orgsectorid":null,"tozjdate":null,"btz":null,"pimpersonid":null,"sfdyxl":null,"xxxz":null,"xlcx":null,"sfzgxl":null,"jlspzt":null,"xwz":null,"degree":null,"jlglbh":null,"dbdwsj":null,"dzjbjsj":null,"updatedate":"2020-05-18 17:46:46","createman":"示例操作者","pimpersonname":null},
{"sxzy":null,"jlczz":null,"ygbh":null,"ormorgsectorid":null,"bz":null,"reason":null,"xl":null,"xkml":null,"jymc":null,"jssj":null,"ormorgid":null,"bdwgznx":null,"createdate":"2020-05-18 16:52:45","enable":1,"updateman":"示例操作者","zjxtgznx":null,"srfkey":"2","gznx":null,"cjgzsj":null,"qssj":null,"fj":null,"pimeducationname":"教育信息(1)","pimeducationid":"2","orgid":null,"bjgznx":null,"xllx":null,"spstate":null,"jlss":null,"byyx":null,"orgsectorid":null,"tozjdate":null,"btz":null,"pimpersonid":null,"sfdyxl":null,"xxxz":null,"xlcx":null,"sfzgxl":null,"jlspzt":null,"xwz":null,"degree":null,"jlglbh":null,"dbdwsj":null,"dzjbjsj":null,"updatedate":"2020-05-18 16:52:45","createman":"示例操作者","pimpersonname":null}, {"sxzy":null,"jlczz":null,"ygbh":null,"ormorgsectorid":null,"bz":null,"reason":null,"xl":null,"xkml":null,"jymc":null,"jssj":null,"ormorgid":null,"bdwgznx":null,"createdate":"2020-05-18 17:46:46","enable":1,"updateman":"示例操作者","zjxtgznx":null,"srfkey":"2","gznx":null,"cjgzsj":null,"qssj":null,"fj":null,"pimeducationname":"教育信息(1)","pimeducationid":"2","orgid":null,"bjgznx":null,"xllx":null,"spstate":null,"jlss":null,"byyx":null,"orgsectorid":null,"tozjdate":null,"btz":null,"pimpersonid":null,"sfdyxl":null,"xxxz":null,"xlcx":null,"sfzgxl":null,"jlspzt":null,"xwz":null,"degree":null,"jlglbh":null,"dbdwsj":null,"dzjbjsj":null,"updatedate":"2020-05-18 17:46:46","createman":"示例操作者","pimpersonname":null},
{"sxzy":null,"jlczz":null,"ygbh":null,"ormorgsectorid":null,"bz":null,"reason":null,"xl":null,"xkml":null,"jymc":null,"jssj":null,"ormorgid":null,"bdwgznx":null,"createdate":"2020-05-18 16:52:45","enable":1,"updateman":"示例操作者","zjxtgznx":null,"srfkey":"3","gznx":null,"cjgzsj":null,"qssj":null,"fj":null,"pimeducationname":"教育信息(2)","pimeducationid":"3","orgid":null,"bjgznx":null,"xllx":null,"spstate":null,"jlss":null,"byyx":null,"orgsectorid":null,"tozjdate":null,"btz":null,"pimpersonid":null,"sfdyxl":null,"xxxz":null,"xlcx":null,"sfzgxl":null,"jlspzt":null,"xwz":null,"degree":null,"jlglbh":null,"dbdwsj":null,"dzjbjsj":null,"updatedate":"2020-05-18 16:52:45","createman":"示例操作者","pimpersonname":null}, {"sxzy":null,"jlczz":null,"ygbh":null,"ormorgsectorid":null,"bz":null,"reason":null,"xl":null,"xkml":null,"jymc":null,"jssj":null,"ormorgid":null,"bdwgznx":null,"createdate":"2020-05-18 17:46:46","enable":1,"updateman":"示例操作者","zjxtgznx":null,"srfkey":"3","gznx":null,"cjgzsj":null,"qssj":null,"fj":null,"pimeducationname":"教育信息(2)","pimeducationid":"3","orgid":null,"bjgznx":null,"xllx":null,"spstate":null,"jlss":null,"byyx":null,"orgsectorid":null,"tozjdate":null,"btz":null,"pimpersonid":null,"sfdyxl":null,"xxxz":null,"xlcx":null,"sfzgxl":null,"jlspzt":null,"xwz":null,"degree":null,"jlglbh":null,"dbdwsj":null,"dzjbjsj":null,"updatedate":"2020-05-18 17:46:46","createman":"示例操作者","pimpersonname":null},
{"sxzy":null,"jlczz":null,"ygbh":null,"ormorgsectorid":null,"bz":null,"reason":null,"xl":null,"xkml":null,"jymc":null,"jssj":null,"ormorgid":null,"bdwgznx":null,"createdate":"2020-05-18 16:52:45","enable":1,"updateman":"示例操作者","zjxtgznx":null,"srfkey":"4","gznx":null,"cjgzsj":null,"qssj":null,"fj":null,"pimeducationname":"教育信息(3)","pimeducationid":"4","orgid":null,"bjgznx":null,"xllx":null,"spstate":null,"jlss":null,"byyx":null,"orgsectorid":null,"tozjdate":null,"btz":null,"pimpersonid":null,"sfdyxl":null,"xxxz":null,"xlcx":null,"sfzgxl":null,"jlspzt":null,"xwz":null,"degree":null,"jlglbh":null,"dbdwsj":null,"dzjbjsj":null,"updatedate":"2020-05-18 16:52:45","createman":"示例操作者","pimpersonname":null}, {"sxzy":null,"jlczz":null,"ygbh":null,"ormorgsectorid":null,"bz":null,"reason":null,"xl":null,"xkml":null,"jymc":null,"jssj":null,"ormorgid":null,"bdwgznx":null,"createdate":"2020-05-18 17:46:46","enable":1,"updateman":"示例操作者","zjxtgznx":null,"srfkey":"4","gznx":null,"cjgzsj":null,"qssj":null,"fj":null,"pimeducationname":"教育信息(3)","pimeducationid":"4","orgid":null,"bjgznx":null,"xllx":null,"spstate":null,"jlss":null,"byyx":null,"orgsectorid":null,"tozjdate":null,"btz":null,"pimpersonid":null,"sfdyxl":null,"xxxz":null,"xlcx":null,"sfzgxl":null,"jlspzt":null,"xwz":null,"degree":null,"jlglbh":null,"dbdwsj":null,"dzjbjsj":null,"updatedate":"2020-05-18 17:46:46","createman":"示例操作者","pimpersonname":null},
{"sxzy":null,"jlczz":null,"ygbh":null,"ormorgsectorid":null,"bz":null,"reason":null,"xl":null,"xkml":null,"jymc":null,"jssj":null,"ormorgid":null,"bdwgznx":null,"createdate":"2020-05-18 16:52:45","enable":1,"updateman":"示例操作者","zjxtgznx":null,"srfkey":"5","gznx":null,"cjgzsj":null,"qssj":null,"fj":null,"pimeducationname":"教育信息(4)","pimeducationid":"5","orgid":null,"bjgznx":null,"xllx":null,"spstate":null,"jlss":null,"byyx":null,"orgsectorid":null,"tozjdate":null,"btz":null,"pimpersonid":null,"sfdyxl":null,"xxxz":null,"xlcx":null,"sfzgxl":null,"jlspzt":null,"xwz":null,"degree":null,"jlglbh":null,"dbdwsj":null,"dzjbjsj":null,"updatedate":"2020-05-18 16:52:45","createman":"示例操作者","pimpersonname":null}, {"sxzy":null,"jlczz":null,"ygbh":null,"ormorgsectorid":null,"bz":null,"reason":null,"xl":null,"xkml":null,"jymc":null,"jssj":null,"ormorgid":null,"bdwgznx":null,"createdate":"2020-05-18 17:46:46","enable":1,"updateman":"示例操作者","zjxtgznx":null,"srfkey":"5","gznx":null,"cjgzsj":null,"qssj":null,"fj":null,"pimeducationname":"教育信息(4)","pimeducationid":"5","orgid":null,"bjgznx":null,"xllx":null,"spstate":null,"jlss":null,"byyx":null,"orgsectorid":null,"tozjdate":null,"btz":null,"pimpersonid":null,"sfdyxl":null,"xxxz":null,"xlcx":null,"sfzgxl":null,"jlspzt":null,"xwz":null,"degree":null,"jlglbh":null,"dbdwsj":null,"dzjbjsj":null,"updatedate":"2020-05-18 17:46:46","createman":"示例操作者","pimpersonname":null},
{"sxzy":null,"jlczz":null,"ygbh":null,"ormorgsectorid":null,"bz":null,"reason":null,"xl":null,"xkml":null,"jymc":null,"jssj":null,"ormorgid":null,"bdwgznx":null,"createdate":"2020-05-18 16:52:45","enable":1,"updateman":"示例操作者","zjxtgznx":null,"srfkey":"6","gznx":null,"cjgzsj":null,"qssj":null,"fj":null,"pimeducationname":"教育信息(5)","pimeducationid":"6","orgid":null,"bjgznx":null,"xllx":null,"spstate":null,"jlss":null,"byyx":null,"orgsectorid":null,"tozjdate":null,"btz":null,"pimpersonid":null,"sfdyxl":null,"xxxz":null,"xlcx":null,"sfzgxl":null,"jlspzt":null,"xwz":null,"degree":null,"jlglbh":null,"dbdwsj":null,"dzjbjsj":null,"updatedate":"2020-05-18 16:52:45","createman":"示例操作者","pimpersonname":null} {"sxzy":null,"jlczz":null,"ygbh":null,"ormorgsectorid":null,"bz":null,"reason":null,"xl":null,"xkml":null,"jymc":null,"jssj":null,"ormorgid":null,"bdwgznx":null,"createdate":"2020-05-18 17:46:46","enable":1,"updateman":"示例操作者","zjxtgznx":null,"srfkey":"6","gznx":null,"cjgzsj":null,"qssj":null,"fj":null,"pimeducationname":"教育信息(5)","pimeducationid":"6","orgid":null,"bjgznx":null,"xllx":null,"spstate":null,"jlss":null,"byyx":null,"orgsectorid":null,"tozjdate":null,"btz":null,"pimpersonid":null,"sfdyxl":null,"xxxz":null,"xlcx":null,"sfzgxl":null,"jlspzt":null,"xwz":null,"degree":null,"jlglbh":null,"dbdwsj":null,"dzjbjsj":null,"updatedate":"2020-05-18 17:46:46","createman":"示例操作者","pimpersonname":null}
]; ];
......
...@@ -85,8 +85,8 @@ export default class PIMARCHIVESServiceBase extends EntityService { ...@@ -85,8 +85,8 @@ export default class PIMARCHIVESServiceBase extends EntityService {
} }
let res:any = await Http.getInstance().get(`/pimarchives/getdraft`,isloading); let res:any = await Http.getInstance().get(`/pimarchives/getdraft`,isloading);
res.data.pimarchives = data.pimarchives; res.data.pimarchives = data.pimarchives;
this.tempStorage.setItem(context.srfsessionkey+'_pimarchivesrecords',JSON.stringify(res.data.pimarchivesrecords));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchiveschanges',JSON.stringify(res.data.pimarchiveschanges)); this.tempStorage.setItem(context.srfsessionkey+'_pimarchiveschanges',JSON.stringify(res.data.pimarchiveschanges));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchivesrecords',JSON.stringify(res.data.pimarchivesrecords));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchivesloanandreturns',JSON.stringify(res.data.pimarchivesloanandreturns)); this.tempStorage.setItem(context.srfsessionkey+'_pimarchivesloanandreturns',JSON.stringify(res.data.pimarchivesloanandreturns));
return res; return res;
} }
...@@ -105,36 +105,36 @@ export default class PIMARCHIVESServiceBase extends EntityService { ...@@ -105,36 +105,36 @@ export default class PIMARCHIVESServiceBase extends EntityService {
return Http.getInstance().post(`/pimpeople/${context.pimperson}/pimarchives/${context.pimarchives}/save`,data,isloading); return Http.getInstance().post(`/pimpeople/${context.pimperson}/pimarchives/${context.pimarchives}/save`,data,isloading);
} }
let masterData:any = {}; let masterData:any = {};
let pimarchivesrecordsData:any = []; let pimarchiveschangesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesrecords'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchiveschanges'),'undefined')){
pimarchivesrecordsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesrecords') as any); pimarchiveschangesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchiveschanges') as any);
if(pimarchivesrecordsData && pimarchivesrecordsData.length && pimarchivesrecordsData.length > 0){ if(pimarchiveschangesData && pimarchiveschangesData.length && pimarchiveschangesData.length > 0){
pimarchivesrecordsData.forEach((item:any) => { pimarchiveschangesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimarchivesrecordid = null; item.pimarchiveschangeid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimarchivesrecords = pimarchivesrecordsData; masterData.pimarchiveschanges = pimarchiveschangesData;
let pimarchiveschangesData:any = []; let pimarchivesrecordsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchiveschanges'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesrecords'),'undefined')){
pimarchiveschangesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchiveschanges') as any); pimarchivesrecordsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesrecords') as any);
if(pimarchiveschangesData && pimarchiveschangesData.length && pimarchiveschangesData.length > 0){ if(pimarchivesrecordsData && pimarchivesrecordsData.length && pimarchivesrecordsData.length > 0){
pimarchiveschangesData.forEach((item:any) => { pimarchivesrecordsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimarchiveschangeid = null; item.pimarchivesrecordid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimarchiveschanges = pimarchiveschangesData; masterData.pimarchivesrecords = pimarchivesrecordsData;
let pimarchivesloanandreturnsData:any = []; let pimarchivesloanandreturnsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesloanandreturns'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesloanandreturns'),'undefined')){
pimarchivesloanandreturnsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesloanandreturns') as any); pimarchivesloanandreturnsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesloanandreturns') as any);
...@@ -152,8 +152,8 @@ export default class PIMARCHIVESServiceBase extends EntityService { ...@@ -152,8 +152,8 @@ export default class PIMARCHIVESServiceBase extends EntityService {
masterData.pimarchivesloanandreturns = pimarchivesloanandreturnsData; masterData.pimarchivesloanandreturns = pimarchivesloanandreturnsData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/pimarchives/${context.pimarchives}/save`,data,isloading); let res:any = await Http.getInstance().post(`/pimarchives/${context.pimarchives}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_pimarchivesrecords',JSON.stringify(res.data.pimarchivesrecords));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchiveschanges',JSON.stringify(res.data.pimarchiveschanges)); this.tempStorage.setItem(context.srfsessionkey+'_pimarchiveschanges',JSON.stringify(res.data.pimarchiveschanges));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchivesrecords',JSON.stringify(res.data.pimarchivesrecords));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchivesloanandreturns',JSON.stringify(res.data.pimarchivesloanandreturns)); this.tempStorage.setItem(context.srfsessionkey+'_pimarchivesloanandreturns',JSON.stringify(res.data.pimarchivesloanandreturns));
return res; return res;
} }
...@@ -172,8 +172,8 @@ export default class PIMARCHIVESServiceBase extends EntityService { ...@@ -172,8 +172,8 @@ export default class PIMARCHIVESServiceBase extends EntityService {
return Http.getInstance().get(`/pimpeople/${context.pimperson}/pimarchives/${context.pimarchives}`,isloading); return Http.getInstance().get(`/pimpeople/${context.pimperson}/pimarchives/${context.pimarchives}`,isloading);
} }
let res:any = await Http.getInstance().get(`/pimarchives/${context.pimarchives}`,isloading); let res:any = await Http.getInstance().get(`/pimarchives/${context.pimarchives}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_pimarchivesrecords',JSON.stringify(res.data.pimarchivesrecords));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchiveschanges',JSON.stringify(res.data.pimarchiveschanges)); this.tempStorage.setItem(context.srfsessionkey+'_pimarchiveschanges',JSON.stringify(res.data.pimarchiveschanges));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchivesrecords',JSON.stringify(res.data.pimarchivesrecords));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchivesloanandreturns',JSON.stringify(res.data.pimarchivesloanandreturns)); this.tempStorage.setItem(context.srfsessionkey+'_pimarchivesloanandreturns',JSON.stringify(res.data.pimarchivesloanandreturns));
return res; return res;
...@@ -193,36 +193,36 @@ export default class PIMARCHIVESServiceBase extends EntityService { ...@@ -193,36 +193,36 @@ export default class PIMARCHIVESServiceBase extends EntityService {
return Http.getInstance().put(`/pimpeople/${context.pimperson}/pimarchives/${context.pimarchives}`,data,isloading); return Http.getInstance().put(`/pimpeople/${context.pimperson}/pimarchives/${context.pimarchives}`,data,isloading);
} }
let masterData:any = {}; let masterData:any = {};
let pimarchivesrecordsData:any = []; let pimarchiveschangesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesrecords'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchiveschanges'),'undefined')){
pimarchivesrecordsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesrecords') as any); pimarchiveschangesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchiveschanges') as any);
if(pimarchivesrecordsData && pimarchivesrecordsData.length && pimarchivesrecordsData.length > 0){ if(pimarchiveschangesData && pimarchiveschangesData.length && pimarchiveschangesData.length > 0){
pimarchivesrecordsData.forEach((item:any) => { pimarchiveschangesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimarchivesrecordid = null; item.pimarchiveschangeid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimarchivesrecords = pimarchivesrecordsData; masterData.pimarchiveschanges = pimarchiveschangesData;
let pimarchiveschangesData:any = []; let pimarchivesrecordsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchiveschanges'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesrecords'),'undefined')){
pimarchiveschangesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchiveschanges') as any); pimarchivesrecordsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesrecords') as any);
if(pimarchiveschangesData && pimarchiveschangesData.length && pimarchiveschangesData.length > 0){ if(pimarchivesrecordsData && pimarchivesrecordsData.length && pimarchivesrecordsData.length > 0){
pimarchiveschangesData.forEach((item:any) => { pimarchivesrecordsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimarchiveschangeid = null; item.pimarchivesrecordid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimarchiveschanges = pimarchiveschangesData; masterData.pimarchivesrecords = pimarchivesrecordsData;
let pimarchivesloanandreturnsData:any = []; let pimarchivesloanandreturnsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesloanandreturns'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesloanandreturns'),'undefined')){
pimarchivesloanandreturnsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesloanandreturns') as any); pimarchivesloanandreturnsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesloanandreturns') as any);
...@@ -240,8 +240,8 @@ export default class PIMARCHIVESServiceBase extends EntityService { ...@@ -240,8 +240,8 @@ export default class PIMARCHIVESServiceBase extends EntityService {
masterData.pimarchivesloanandreturns = pimarchivesloanandreturnsData; masterData.pimarchivesloanandreturns = pimarchivesloanandreturnsData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/pimarchives/${context.pimarchives}`,data,isloading); let res:any = await Http.getInstance().put(`/pimarchives/${context.pimarchives}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_pimarchivesrecords',JSON.stringify(res.data.pimarchivesrecords));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchiveschanges',JSON.stringify(res.data.pimarchiveschanges)); this.tempStorage.setItem(context.srfsessionkey+'_pimarchiveschanges',JSON.stringify(res.data.pimarchiveschanges));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchivesrecords',JSON.stringify(res.data.pimarchivesrecords));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchivesloanandreturns',JSON.stringify(res.data.pimarchivesloanandreturns)); this.tempStorage.setItem(context.srfsessionkey+'_pimarchivesloanandreturns',JSON.stringify(res.data.pimarchivesloanandreturns));
return res; return res;
} }
...@@ -282,36 +282,36 @@ export default class PIMARCHIVESServiceBase extends EntityService { ...@@ -282,36 +282,36 @@ export default class PIMARCHIVESServiceBase extends EntityService {
return Http.getInstance().post(`/pimpeople/${context.pimperson}/pimarchives`,data,isloading); return Http.getInstance().post(`/pimpeople/${context.pimperson}/pimarchives`,data,isloading);
} }
let masterData:any = {}; let masterData:any = {};
let pimarchivesrecordsData:any = []; let pimarchiveschangesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesrecords'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchiveschanges'),'undefined')){
pimarchivesrecordsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesrecords') as any); pimarchiveschangesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchiveschanges') as any);
if(pimarchivesrecordsData && pimarchivesrecordsData.length && pimarchivesrecordsData.length > 0){ if(pimarchiveschangesData && pimarchiveschangesData.length && pimarchiveschangesData.length > 0){
pimarchivesrecordsData.forEach((item:any) => { pimarchiveschangesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimarchivesrecordid = null; item.pimarchiveschangeid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimarchivesrecords = pimarchivesrecordsData; masterData.pimarchiveschanges = pimarchiveschangesData;
let pimarchiveschangesData:any = []; let pimarchivesrecordsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchiveschanges'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesrecords'),'undefined')){
pimarchiveschangesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchiveschanges') as any); pimarchivesrecordsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesrecords') as any);
if(pimarchiveschangesData && pimarchiveschangesData.length && pimarchiveschangesData.length > 0){ if(pimarchivesrecordsData && pimarchivesrecordsData.length && pimarchivesrecordsData.length > 0){
pimarchiveschangesData.forEach((item:any) => { pimarchivesrecordsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimarchiveschangeid = null; item.pimarchivesrecordid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimarchiveschanges = pimarchiveschangesData; masterData.pimarchivesrecords = pimarchivesrecordsData;
let pimarchivesloanandreturnsData:any = []; let pimarchivesloanandreturnsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesloanandreturns'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesloanandreturns'),'undefined')){
pimarchivesloanandreturnsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesloanandreturns') as any); pimarchivesloanandreturnsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchivesloanandreturns') as any);
...@@ -336,8 +336,8 @@ export default class PIMARCHIVESServiceBase extends EntityService { ...@@ -336,8 +336,8 @@ export default class PIMARCHIVESServiceBase 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(`/pimarchives`,data,isloading); let res:any = await Http.getInstance().post(`/pimarchives`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimarchivesrecords',JSON.stringify(res.data.pimarchivesrecords));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimarchiveschanges',JSON.stringify(res.data.pimarchiveschanges)); this.tempStorage.setItem(tempContext.srfsessionkey+'_pimarchiveschanges',JSON.stringify(res.data.pimarchiveschanges));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimarchivesrecords',JSON.stringify(res.data.pimarchivesrecords));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimarchivesloanandreturns',JSON.stringify(res.data.pimarchivesloanandreturns)); this.tempStorage.setItem(tempContext.srfsessionkey+'_pimarchivesloanandreturns',JSON.stringify(res.data.pimarchivesloanandreturns));
return res; return res;
} }
......
...@@ -65,141 +65,141 @@ export default class PIMPERSONServiceBase extends EntityService { ...@@ -65,141 +65,141 @@ export default class PIMPERSONServiceBase 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 pimresearchfindingsData:any = []; let trmtrianpeopleData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimresearchfindings'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_trmtrianpeople'),'undefined')){
pimresearchfindingsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimresearchfindings') as any); trmtrianpeopleData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_trmtrianpeople') as any);
if(pimresearchfindingsData && pimresearchfindingsData.length && pimresearchfindingsData.length > 0){ if(trmtrianpeopleData && trmtrianpeopleData.length && trmtrianpeopleData.length > 0){
pimresearchfindingsData.forEach((item:any) => { trmtrianpeopleData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimresearchfindingsid = null; item.trmtrianpersonid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimresearchfindings = pimresearchfindingsData; masterData.trmtrianpeople = trmtrianpeopleData;
let pimvocationalsData:any = []; let pimpatentsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimvocationals'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpatents'),'undefined')){
pimvocationalsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimvocationals') as any); pimpatentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpatents') as any);
if(pimvocationalsData && pimvocationalsData.length && pimvocationalsData.length > 0){ if(pimpatentsData && pimpatentsData.length && pimpatentsData.length > 0){
pimvocationalsData.forEach((item:any) => { pimpatentsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimvocationalid = null; item.pimpatentid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimvocationals = pimvocationalsData; masterData.pimpatents = pimpatentsData;
let pimarchivesData:any = []; let pimachievementsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchives'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimachievements'),'undefined')){
pimarchivesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchives') as any); pimachievementsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimachievements') as any);
if(pimarchivesData && pimarchivesData.length && pimarchivesData.length > 0){ if(pimachievementsData && pimachievementsData.length && pimachievementsData.length > 0){
pimarchivesData.forEach((item:any) => { pimachievementsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimarchivesid = null; item.pimachievementsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimarchives = pimarchivesData; masterData.pimachievements = pimachievementsData;
let trmtrianpeopleData:any = []; let pimvacationsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_trmtrianpeople'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimvacations'),'undefined')){
trmtrianpeopleData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_trmtrianpeople') as any); pimvacationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimvacations') as any);
if(trmtrianpeopleData && trmtrianpeopleData.length && trmtrianpeopleData.length > 0){ if(pimvacationsData && pimvacationsData.length && pimvacationsData.length > 0){
trmtrianpeopleData.forEach((item:any) => { pimvacationsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.trmtrianpersonid = null; item.pimvacationid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.trmtrianpeople = trmtrianpeopleData; masterData.pimvacations = pimvacationsData;
let pimlanguageabilitiesData:any = []; let pimpapersData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimlanguageabilities'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpapers'),'undefined')){
pimlanguageabilitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimlanguageabilities') as any); pimpapersData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpapers') as any);
if(pimlanguageabilitiesData && pimlanguageabilitiesData.length && pimlanguageabilitiesData.length > 0){ if(pimpapersData && pimpapersData.length && pimpapersData.length > 0){
pimlanguageabilitiesData.forEach((item:any) => { pimpapersData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimlanguageabilityid = null; item.pimpaperid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimlanguageabilities = pimlanguageabilitiesData; masterData.pimpapers = pimpapersData;
let pimpersonchangesData:any = []; let pimlanguageabilitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonchanges'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimlanguageabilities'),'undefined')){
pimpersonchangesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonchanges') as any); pimlanguageabilitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimlanguageabilities') as any);
if(pimpersonchangesData && pimpersonchangesData.length && pimpersonchangesData.length > 0){ if(pimlanguageabilitiesData && pimlanguageabilitiesData.length && pimlanguageabilitiesData.length > 0){
pimpersonchangesData.forEach((item:any) => { pimlanguageabilitiesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimpersonchangeid = null; item.pimlanguageabilityid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimpersonchanges = pimpersonchangesData; masterData.pimlanguageabilities = pimlanguageabilitiesData;
let pimachievementsData:any = []; let pimrewardpunishmentsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimachievements'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimrewardpunishments'),'undefined')){
pimachievementsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimachievements') as any); pimrewardpunishmentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimrewardpunishments') as any);
if(pimachievementsData && pimachievementsData.length && pimachievementsData.length > 0){ if(pimrewardpunishmentsData && pimrewardpunishmentsData.length && pimrewardpunishmentsData.length > 0){
pimachievementsData.forEach((item:any) => { pimrewardpunishmentsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimachievementsid = null; item.pimrewardpunishmentid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimachievements = pimachievementsData; masterData.pimrewardpunishments = pimrewardpunishmentsData;
let pimexitandentriesData:any = []; let pimcontractsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimexitandentries'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimcontracts'),'undefined')){
pimexitandentriesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimexitandentries') as any); pimcontractsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimcontracts') as any);
if(pimexitandentriesData && pimexitandentriesData.length && pimexitandentriesData.length > 0){ if(pimcontractsData && pimcontractsData.length && pimcontractsData.length > 0){
pimexitandentriesData.forEach((item:any) => { pimcontractsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimexitandentryid = null; item.pimcontractid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimexitandentries = pimexitandentriesData; masterData.pimcontracts = pimcontractsData;
let pimpapersData:any = []; let pimresearchfindingsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpapers'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimresearchfindings'),'undefined')){
pimpapersData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpapers') as any); pimresearchfindingsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimresearchfindings') as any);
if(pimpapersData && pimpapersData.length && pimpapersData.length > 0){ if(pimresearchfindingsData && pimresearchfindingsData.length && pimresearchfindingsData.length > 0){
pimpapersData.forEach((item:any) => { pimresearchfindingsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimpaperid = null; item.pimresearchfindingsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimpapers = pimpapersData; masterData.pimresearchfindings = pimresearchfindingsData;
let attendancemreportmxesData:any = []; let attendancemreportmxesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_attendancemreportmxes'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_attendancemreportmxes'),'undefined')){
attendancemreportmxesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_attendancemreportmxes') as any); attendancemreportmxesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_attendancemreportmxes') as any);
...@@ -215,36 +215,36 @@ export default class PIMPERSONServiceBase extends EntityService { ...@@ -215,36 +215,36 @@ export default class PIMPERSONServiceBase extends EntityService {
} }
} }
masterData.attendancemreportmxes = attendancemreportmxesData; masterData.attendancemreportmxes = attendancemreportmxesData;
let pimarmycadresData:any = []; let pimtitlesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarmycadres'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimtitles'),'undefined')){
pimarmycadresData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarmycadres') as any); pimtitlesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimtitles') as any);
if(pimarmycadresData && pimarmycadresData.length && pimarmycadresData.length > 0){ if(pimtitlesData && pimtitlesData.length && pimtitlesData.length > 0){
pimarmycadresData.forEach((item:any) => { pimtitlesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimarmycadresid = null; item.pimtitleid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimarmycadres = pimarmycadresData; masterData.pimtitles = pimtitlesData;
let pimtitlesData:any = []; let pimeducationsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimtitles'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimeducations'),'undefined')){
pimtitlesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimtitles') as any); pimeducationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimeducations') as any);
if(pimtitlesData && pimtitlesData.length && pimtitlesData.length > 0){ if(pimeducationsData && pimeducationsData.length && pimeducationsData.length > 0){
pimtitlesData.forEach((item:any) => { pimeducationsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimtitleid = null; item.pimeducationid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimtitles = pimtitlesData; masterData.pimeducations = pimeducationsData;
let pimfaminfosData:any = []; let pimfaminfosData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimfaminfos'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimfaminfos'),'undefined')){
pimfaminfosData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimfaminfos') as any); pimfaminfosData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimfaminfos') as any);
...@@ -260,149 +260,149 @@ export default class PIMPERSONServiceBase extends EntityService { ...@@ -260,149 +260,149 @@ export default class PIMPERSONServiceBase extends EntityService {
} }
} }
masterData.pimfaminfos = pimfaminfosData; masterData.pimfaminfos = pimfaminfosData;
let pimrewardpunishmentsData:any = []; let pimworkhistoriesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimrewardpunishments'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimworkhistories'),'undefined')){
pimrewardpunishmentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimrewardpunishments') as any); pimworkhistoriesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimworkhistories') as any);
if(pimrewardpunishmentsData && pimrewardpunishmentsData.length && pimrewardpunishmentsData.length > 0){ if(pimworkhistoriesData && pimworkhistoriesData.length && pimworkhistoriesData.length > 0){
pimrewardpunishmentsData.forEach((item:any) => { pimworkhistoriesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimrewardpunishmentid = null; item.pimworkhistoryid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimrewardpunishments = pimrewardpunishmentsData; masterData.pimworkhistories = pimworkhistoriesData;
let pimpatentsData:any = []; let pimpersonabilitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpatents'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonabilities'),'undefined')){
pimpatentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpatents') as any); pimpersonabilitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonabilities') as any);
if(pimpatentsData && pimpatentsData.length && pimpatentsData.length > 0){ if(pimpersonabilitiesData && pimpersonabilitiesData.length && pimpersonabilitiesData.length > 0){
pimpatentsData.forEach((item:any) => { pimpersonabilitiesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimpatentid = null; item.pimpersonabilityid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimpatents = pimpatentsData; masterData.pimpersonabilities = pimpersonabilitiesData;
let pimworkhistoriesData:any = []; let pimvocationalsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimworkhistories'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimvocationals'),'undefined')){
pimworkhistoriesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimworkhistories') as any); pimvocationalsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimvocationals') as any);
if(pimworkhistoriesData && pimworkhistoriesData.length && pimworkhistoriesData.length > 0){ if(pimvocationalsData && pimvocationalsData.length && pimvocationalsData.length > 0){
pimworkhistoriesData.forEach((item:any) => { pimvocationalsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimworkhistoryid = null; item.pimvocationalid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimworkhistories = pimworkhistoriesData; masterData.pimvocationals = pimvocationalsData;
let pimcontractsData:any = []; let pimdistirbutionsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimcontracts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimdistirbutions'),'undefined')){
pimcontractsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimcontracts') as any); pimdistirbutionsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimdistirbutions') as any);
if(pimcontractsData && pimcontractsData.length && pimcontractsData.length > 0){ if(pimdistirbutionsData && pimdistirbutionsData.length && pimdistirbutionsData.length > 0){
pimcontractsData.forEach((item:any) => { pimdistirbutionsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimcontractid = null; item.pimdistirbutionid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimcontracts = pimcontractsData; masterData.pimdistirbutions = pimdistirbutionsData;
let pimvacationsData:any = []; let pimpersonchangesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimvacations'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonchanges'),'undefined')){
pimvacationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimvacations') as any); pimpersonchangesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonchanges') as any);
if(pimvacationsData && pimvacationsData.length && pimvacationsData.length > 0){ if(pimpersonchangesData && pimpersonchangesData.length && pimpersonchangesData.length > 0){
pimvacationsData.forEach((item:any) => { pimpersonchangesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimvacationid = null; item.pimpersonchangeid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimvacations = pimvacationsData; masterData.pimpersonchanges = pimpersonchangesData;
let pimeducationsData:any = []; let pimexitandentriesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimeducations'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimexitandentries'),'undefined')){
pimeducationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimeducations') as any); pimexitandentriesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimexitandentries') as any);
if(pimeducationsData && pimeducationsData.length && pimeducationsData.length > 0){ if(pimexitandentriesData && pimexitandentriesData.length && pimexitandentriesData.length > 0){
pimeducationsData.forEach((item:any) => { pimexitandentriesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimeducationid = null; item.pimexitandentryid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimeducations = pimeducationsData; masterData.pimexitandentries = pimexitandentriesData;
let pimpersonabilitiesData:any = []; let pimarmycadresData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonabilities'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarmycadres'),'undefined')){
pimpersonabilitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonabilities') as any); pimarmycadresData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarmycadres') as any);
if(pimpersonabilitiesData && pimpersonabilitiesData.length && pimpersonabilitiesData.length > 0){ if(pimarmycadresData && pimarmycadresData.length && pimarmycadresData.length > 0){
pimpersonabilitiesData.forEach((item:any) => { pimarmycadresData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimpersonabilityid = null; item.pimarmycadresid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimpersonabilities = pimpersonabilitiesData; masterData.pimarmycadres = pimarmycadresData;
let pimdistirbutionsData:any = []; let pimarchivesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimdistirbutions'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchives'),'undefined')){
pimdistirbutionsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimdistirbutions') as any); pimarchivesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchives') as any);
if(pimdistirbutionsData && pimdistirbutionsData.length && pimdistirbutionsData.length > 0){ if(pimarchivesData && pimarchivesData.length && pimarchivesData.length > 0){
pimdistirbutionsData.forEach((item:any) => { pimarchivesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimdistirbutionid = null; item.pimarchivesid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimdistirbutions = pimdistirbutionsData; masterData.pimarchives = pimarchivesData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/pimpeople/${context.pimperson}`,data,isloading); let res:any = await Http.getInstance().put(`/pimpeople/${context.pimperson}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_pimresearchfindings',JSON.stringify(res.data.pimresearchfindings));
this.tempStorage.setItem(context.srfsessionkey+'_pimvocationals',JSON.stringify(res.data.pimvocationals));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchives',JSON.stringify(res.data.pimarchives));
this.tempStorage.setItem(context.srfsessionkey+'_trmtrianpeople',JSON.stringify(res.data.trmtrianpeople)); this.tempStorage.setItem(context.srfsessionkey+'_trmtrianpeople',JSON.stringify(res.data.trmtrianpeople));
this.tempStorage.setItem(context.srfsessionkey+'_pimlanguageabilities',JSON.stringify(res.data.pimlanguageabilities)); this.tempStorage.setItem(context.srfsessionkey+'_pimpatents',JSON.stringify(res.data.pimpatents));
this.tempStorage.setItem(context.srfsessionkey+'_pimpersonchanges',JSON.stringify(res.data.pimpersonchanges));
this.tempStorage.setItem(context.srfsessionkey+'_pimachievements',JSON.stringify(res.data.pimachievements)); this.tempStorage.setItem(context.srfsessionkey+'_pimachievements',JSON.stringify(res.data.pimachievements));
this.tempStorage.setItem(context.srfsessionkey+'_pimexitandentries',JSON.stringify(res.data.pimexitandentries)); this.tempStorage.setItem(context.srfsessionkey+'_pimvacations',JSON.stringify(res.data.pimvacations));
this.tempStorage.setItem(context.srfsessionkey+'_pimpapers',JSON.stringify(res.data.pimpapers)); this.tempStorage.setItem(context.srfsessionkey+'_pimpapers',JSON.stringify(res.data.pimpapers));
this.tempStorage.setItem(context.srfsessionkey+'_pimlanguageabilities',JSON.stringify(res.data.pimlanguageabilities));
this.tempStorage.setItem(context.srfsessionkey+'_pimrewardpunishments',JSON.stringify(res.data.pimrewardpunishments));
this.tempStorage.setItem(context.srfsessionkey+'_pimcontracts',JSON.stringify(res.data.pimcontracts));
this.tempStorage.setItem(context.srfsessionkey+'_pimresearchfindings',JSON.stringify(res.data.pimresearchfindings));
this.tempStorage.setItem(context.srfsessionkey+'_attendancemreportmxes',JSON.stringify(res.data.attendancemreportmxes)); this.tempStorage.setItem(context.srfsessionkey+'_attendancemreportmxes',JSON.stringify(res.data.attendancemreportmxes));
this.tempStorage.setItem(context.srfsessionkey+'_pimarmycadres',JSON.stringify(res.data.pimarmycadres));
this.tempStorage.setItem(context.srfsessionkey+'_pimtitles',JSON.stringify(res.data.pimtitles)); this.tempStorage.setItem(context.srfsessionkey+'_pimtitles',JSON.stringify(res.data.pimtitles));
this.tempStorage.setItem(context.srfsessionkey+'_pimeducations',JSON.stringify(res.data.pimeducations));
this.tempStorage.setItem(context.srfsessionkey+'_pimfaminfos',JSON.stringify(res.data.pimfaminfos)); this.tempStorage.setItem(context.srfsessionkey+'_pimfaminfos',JSON.stringify(res.data.pimfaminfos));
this.tempStorage.setItem(context.srfsessionkey+'_pimrewardpunishments',JSON.stringify(res.data.pimrewardpunishments));
this.tempStorage.setItem(context.srfsessionkey+'_pimpatents',JSON.stringify(res.data.pimpatents));
this.tempStorage.setItem(context.srfsessionkey+'_pimworkhistories',JSON.stringify(res.data.pimworkhistories)); this.tempStorage.setItem(context.srfsessionkey+'_pimworkhistories',JSON.stringify(res.data.pimworkhistories));
this.tempStorage.setItem(context.srfsessionkey+'_pimcontracts',JSON.stringify(res.data.pimcontracts));
this.tempStorage.setItem(context.srfsessionkey+'_pimvacations',JSON.stringify(res.data.pimvacations));
this.tempStorage.setItem(context.srfsessionkey+'_pimeducations',JSON.stringify(res.data.pimeducations));
this.tempStorage.setItem(context.srfsessionkey+'_pimpersonabilities',JSON.stringify(res.data.pimpersonabilities)); this.tempStorage.setItem(context.srfsessionkey+'_pimpersonabilities',JSON.stringify(res.data.pimpersonabilities));
this.tempStorage.setItem(context.srfsessionkey+'_pimvocationals',JSON.stringify(res.data.pimvocationals));
this.tempStorage.setItem(context.srfsessionkey+'_pimdistirbutions',JSON.stringify(res.data.pimdistirbutions)); this.tempStorage.setItem(context.srfsessionkey+'_pimdistirbutions',JSON.stringify(res.data.pimdistirbutions));
this.tempStorage.setItem(context.srfsessionkey+'_pimpersonchanges',JSON.stringify(res.data.pimpersonchanges));
this.tempStorage.setItem(context.srfsessionkey+'_pimexitandentries',JSON.stringify(res.data.pimexitandentries));
this.tempStorage.setItem(context.srfsessionkey+'_pimarmycadres',JSON.stringify(res.data.pimarmycadres));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchives',JSON.stringify(res.data.pimarchives));
return res; return res;
} }
...@@ -443,27 +443,27 @@ export default class PIMPERSONServiceBase extends EntityService { ...@@ -443,27 +443,27 @@ export default class PIMPERSONServiceBase 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(`/pimpeople/${context.pimperson}`,isloading); let res:any = await Http.getInstance().get(`/pimpeople/${context.pimperson}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_pimresearchfindings',JSON.stringify(res.data.pimresearchfindings));
this.tempStorage.setItem(context.srfsessionkey+'_pimvocationals',JSON.stringify(res.data.pimvocationals));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchives',JSON.stringify(res.data.pimarchives));
this.tempStorage.setItem(context.srfsessionkey+'_trmtrianpeople',JSON.stringify(res.data.trmtrianpeople)); this.tempStorage.setItem(context.srfsessionkey+'_trmtrianpeople',JSON.stringify(res.data.trmtrianpeople));
this.tempStorage.setItem(context.srfsessionkey+'_pimlanguageabilities',JSON.stringify(res.data.pimlanguageabilities)); this.tempStorage.setItem(context.srfsessionkey+'_pimpatents',JSON.stringify(res.data.pimpatents));
this.tempStorage.setItem(context.srfsessionkey+'_pimpersonchanges',JSON.stringify(res.data.pimpersonchanges));
this.tempStorage.setItem(context.srfsessionkey+'_pimachievements',JSON.stringify(res.data.pimachievements)); this.tempStorage.setItem(context.srfsessionkey+'_pimachievements',JSON.stringify(res.data.pimachievements));
this.tempStorage.setItem(context.srfsessionkey+'_pimexitandentries',JSON.stringify(res.data.pimexitandentries)); this.tempStorage.setItem(context.srfsessionkey+'_pimvacations',JSON.stringify(res.data.pimvacations));
this.tempStorage.setItem(context.srfsessionkey+'_pimpapers',JSON.stringify(res.data.pimpapers)); this.tempStorage.setItem(context.srfsessionkey+'_pimpapers',JSON.stringify(res.data.pimpapers));
this.tempStorage.setItem(context.srfsessionkey+'_pimlanguageabilities',JSON.stringify(res.data.pimlanguageabilities));
this.tempStorage.setItem(context.srfsessionkey+'_pimrewardpunishments',JSON.stringify(res.data.pimrewardpunishments));
this.tempStorage.setItem(context.srfsessionkey+'_pimcontracts',JSON.stringify(res.data.pimcontracts));
this.tempStorage.setItem(context.srfsessionkey+'_pimresearchfindings',JSON.stringify(res.data.pimresearchfindings));
this.tempStorage.setItem(context.srfsessionkey+'_attendancemreportmxes',JSON.stringify(res.data.attendancemreportmxes)); this.tempStorage.setItem(context.srfsessionkey+'_attendancemreportmxes',JSON.stringify(res.data.attendancemreportmxes));
this.tempStorage.setItem(context.srfsessionkey+'_pimarmycadres',JSON.stringify(res.data.pimarmycadres));
this.tempStorage.setItem(context.srfsessionkey+'_pimtitles',JSON.stringify(res.data.pimtitles)); this.tempStorage.setItem(context.srfsessionkey+'_pimtitles',JSON.stringify(res.data.pimtitles));
this.tempStorage.setItem(context.srfsessionkey+'_pimeducations',JSON.stringify(res.data.pimeducations));
this.tempStorage.setItem(context.srfsessionkey+'_pimfaminfos',JSON.stringify(res.data.pimfaminfos)); this.tempStorage.setItem(context.srfsessionkey+'_pimfaminfos',JSON.stringify(res.data.pimfaminfos));
this.tempStorage.setItem(context.srfsessionkey+'_pimrewardpunishments',JSON.stringify(res.data.pimrewardpunishments));
this.tempStorage.setItem(context.srfsessionkey+'_pimpatents',JSON.stringify(res.data.pimpatents));
this.tempStorage.setItem(context.srfsessionkey+'_pimworkhistories',JSON.stringify(res.data.pimworkhistories)); this.tempStorage.setItem(context.srfsessionkey+'_pimworkhistories',JSON.stringify(res.data.pimworkhistories));
this.tempStorage.setItem(context.srfsessionkey+'_pimcontracts',JSON.stringify(res.data.pimcontracts));
this.tempStorage.setItem(context.srfsessionkey+'_pimvacations',JSON.stringify(res.data.pimvacations));
this.tempStorage.setItem(context.srfsessionkey+'_pimeducations',JSON.stringify(res.data.pimeducations));
this.tempStorage.setItem(context.srfsessionkey+'_pimpersonabilities',JSON.stringify(res.data.pimpersonabilities)); this.tempStorage.setItem(context.srfsessionkey+'_pimpersonabilities',JSON.stringify(res.data.pimpersonabilities));
this.tempStorage.setItem(context.srfsessionkey+'_pimvocationals',JSON.stringify(res.data.pimvocationals));
this.tempStorage.setItem(context.srfsessionkey+'_pimdistirbutions',JSON.stringify(res.data.pimdistirbutions)); this.tempStorage.setItem(context.srfsessionkey+'_pimdistirbutions',JSON.stringify(res.data.pimdistirbutions));
this.tempStorage.setItem(context.srfsessionkey+'_pimpersonchanges',JSON.stringify(res.data.pimpersonchanges));
this.tempStorage.setItem(context.srfsessionkey+'_pimexitandentries',JSON.stringify(res.data.pimexitandentries));
this.tempStorage.setItem(context.srfsessionkey+'_pimarmycadres',JSON.stringify(res.data.pimarmycadres));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchives',JSON.stringify(res.data.pimarchives));
return res; return res;
} }
...@@ -505,141 +505,141 @@ export default class PIMPERSONServiceBase extends EntityService { ...@@ -505,141 +505,141 @@ export default class PIMPERSONServiceBase 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 pimresearchfindingsData:any = []; let trmtrianpeopleData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimresearchfindings'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_trmtrianpeople'),'undefined')){
pimresearchfindingsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimresearchfindings') as any); trmtrianpeopleData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_trmtrianpeople') as any);
if(pimresearchfindingsData && pimresearchfindingsData.length && pimresearchfindingsData.length > 0){ if(trmtrianpeopleData && trmtrianpeopleData.length && trmtrianpeopleData.length > 0){
pimresearchfindingsData.forEach((item:any) => { trmtrianpeopleData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimresearchfindingsid = null; item.trmtrianpersonid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimresearchfindings = pimresearchfindingsData; masterData.trmtrianpeople = trmtrianpeopleData;
let pimvocationalsData:any = []; let pimpatentsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimvocationals'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpatents'),'undefined')){
pimvocationalsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimvocationals') as any); pimpatentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpatents') as any);
if(pimvocationalsData && pimvocationalsData.length && pimvocationalsData.length > 0){ if(pimpatentsData && pimpatentsData.length && pimpatentsData.length > 0){
pimvocationalsData.forEach((item:any) => { pimpatentsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimvocationalid = null; item.pimpatentid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimvocationals = pimvocationalsData; masterData.pimpatents = pimpatentsData;
let pimarchivesData:any = []; let pimachievementsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchives'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimachievements'),'undefined')){
pimarchivesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchives') as any); pimachievementsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimachievements') as any);
if(pimarchivesData && pimarchivesData.length && pimarchivesData.length > 0){ if(pimachievementsData && pimachievementsData.length && pimachievementsData.length > 0){
pimarchivesData.forEach((item:any) => { pimachievementsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimarchivesid = null; item.pimachievementsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimarchives = pimarchivesData; masterData.pimachievements = pimachievementsData;
let trmtrianpeopleData:any = []; let pimvacationsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_trmtrianpeople'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimvacations'),'undefined')){
trmtrianpeopleData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_trmtrianpeople') as any); pimvacationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimvacations') as any);
if(trmtrianpeopleData && trmtrianpeopleData.length && trmtrianpeopleData.length > 0){ if(pimvacationsData && pimvacationsData.length && pimvacationsData.length > 0){
trmtrianpeopleData.forEach((item:any) => { pimvacationsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.trmtrianpersonid = null; item.pimvacationid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.trmtrianpeople = trmtrianpeopleData; masterData.pimvacations = pimvacationsData;
let pimlanguageabilitiesData:any = []; let pimpapersData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimlanguageabilities'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpapers'),'undefined')){
pimlanguageabilitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimlanguageabilities') as any); pimpapersData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpapers') as any);
if(pimlanguageabilitiesData && pimlanguageabilitiesData.length && pimlanguageabilitiesData.length > 0){ if(pimpapersData && pimpapersData.length && pimpapersData.length > 0){
pimlanguageabilitiesData.forEach((item:any) => { pimpapersData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimlanguageabilityid = null; item.pimpaperid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimlanguageabilities = pimlanguageabilitiesData; masterData.pimpapers = pimpapersData;
let pimpersonchangesData:any = []; let pimlanguageabilitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonchanges'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimlanguageabilities'),'undefined')){
pimpersonchangesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonchanges') as any); pimlanguageabilitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimlanguageabilities') as any);
if(pimpersonchangesData && pimpersonchangesData.length && pimpersonchangesData.length > 0){ if(pimlanguageabilitiesData && pimlanguageabilitiesData.length && pimlanguageabilitiesData.length > 0){
pimpersonchangesData.forEach((item:any) => { pimlanguageabilitiesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimpersonchangeid = null; item.pimlanguageabilityid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimpersonchanges = pimpersonchangesData; masterData.pimlanguageabilities = pimlanguageabilitiesData;
let pimachievementsData:any = []; let pimrewardpunishmentsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimachievements'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimrewardpunishments'),'undefined')){
pimachievementsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimachievements') as any); pimrewardpunishmentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimrewardpunishments') as any);
if(pimachievementsData && pimachievementsData.length && pimachievementsData.length > 0){ if(pimrewardpunishmentsData && pimrewardpunishmentsData.length && pimrewardpunishmentsData.length > 0){
pimachievementsData.forEach((item:any) => { pimrewardpunishmentsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimachievementsid = null; item.pimrewardpunishmentid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimachievements = pimachievementsData; masterData.pimrewardpunishments = pimrewardpunishmentsData;
let pimexitandentriesData:any = []; let pimcontractsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimexitandentries'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimcontracts'),'undefined')){
pimexitandentriesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimexitandentries') as any); pimcontractsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimcontracts') as any);
if(pimexitandentriesData && pimexitandentriesData.length && pimexitandentriesData.length > 0){ if(pimcontractsData && pimcontractsData.length && pimcontractsData.length > 0){
pimexitandentriesData.forEach((item:any) => { pimcontractsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimexitandentryid = null; item.pimcontractid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimexitandentries = pimexitandentriesData; masterData.pimcontracts = pimcontractsData;
let pimpapersData:any = []; let pimresearchfindingsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpapers'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimresearchfindings'),'undefined')){
pimpapersData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpapers') as any); pimresearchfindingsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimresearchfindings') as any);
if(pimpapersData && pimpapersData.length && pimpapersData.length > 0){ if(pimresearchfindingsData && pimresearchfindingsData.length && pimresearchfindingsData.length > 0){
pimpapersData.forEach((item:any) => { pimresearchfindingsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimpaperid = null; item.pimresearchfindingsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimpapers = pimpapersData; masterData.pimresearchfindings = pimresearchfindingsData;
let attendancemreportmxesData:any = []; let attendancemreportmxesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_attendancemreportmxes'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_attendancemreportmxes'),'undefined')){
attendancemreportmxesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_attendancemreportmxes') as any); attendancemreportmxesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_attendancemreportmxes') as any);
...@@ -655,36 +655,36 @@ export default class PIMPERSONServiceBase extends EntityService { ...@@ -655,36 +655,36 @@ export default class PIMPERSONServiceBase extends EntityService {
} }
} }
masterData.attendancemreportmxes = attendancemreportmxesData; masterData.attendancemreportmxes = attendancemreportmxesData;
let pimarmycadresData:any = []; let pimtitlesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarmycadres'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimtitles'),'undefined')){
pimarmycadresData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarmycadres') as any); pimtitlesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimtitles') as any);
if(pimarmycadresData && pimarmycadresData.length && pimarmycadresData.length > 0){ if(pimtitlesData && pimtitlesData.length && pimtitlesData.length > 0){
pimarmycadresData.forEach((item:any) => { pimtitlesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimarmycadresid = null; item.pimtitleid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimarmycadres = pimarmycadresData; masterData.pimtitles = pimtitlesData;
let pimtitlesData:any = []; let pimeducationsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimtitles'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimeducations'),'undefined')){
pimtitlesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimtitles') as any); pimeducationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimeducations') as any);
if(pimtitlesData && pimtitlesData.length && pimtitlesData.length > 0){ if(pimeducationsData && pimeducationsData.length && pimeducationsData.length > 0){
pimtitlesData.forEach((item:any) => { pimeducationsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimtitleid = null; item.pimeducationid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimtitles = pimtitlesData; masterData.pimeducations = pimeducationsData;
let pimfaminfosData:any = []; let pimfaminfosData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimfaminfos'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimfaminfos'),'undefined')){
pimfaminfosData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimfaminfos') as any); pimfaminfosData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimfaminfos') as any);
...@@ -700,126 +700,126 @@ export default class PIMPERSONServiceBase extends EntityService { ...@@ -700,126 +700,126 @@ export default class PIMPERSONServiceBase extends EntityService {
} }
} }
masterData.pimfaminfos = pimfaminfosData; masterData.pimfaminfos = pimfaminfosData;
let pimrewardpunishmentsData:any = []; let pimworkhistoriesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimrewardpunishments'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimworkhistories'),'undefined')){
pimrewardpunishmentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimrewardpunishments') as any); pimworkhistoriesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimworkhistories') as any);
if(pimrewardpunishmentsData && pimrewardpunishmentsData.length && pimrewardpunishmentsData.length > 0){ if(pimworkhistoriesData && pimworkhistoriesData.length && pimworkhistoriesData.length > 0){
pimrewardpunishmentsData.forEach((item:any) => { pimworkhistoriesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimrewardpunishmentid = null; item.pimworkhistoryid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimrewardpunishments = pimrewardpunishmentsData; masterData.pimworkhistories = pimworkhistoriesData;
let pimpatentsData:any = []; let pimpersonabilitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpatents'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonabilities'),'undefined')){
pimpatentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpatents') as any); pimpersonabilitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonabilities') as any);
if(pimpatentsData && pimpatentsData.length && pimpatentsData.length > 0){ if(pimpersonabilitiesData && pimpersonabilitiesData.length && pimpersonabilitiesData.length > 0){
pimpatentsData.forEach((item:any) => { pimpersonabilitiesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimpatentid = null; item.pimpersonabilityid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimpatents = pimpatentsData; masterData.pimpersonabilities = pimpersonabilitiesData;
let pimworkhistoriesData:any = []; let pimvocationalsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimworkhistories'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimvocationals'),'undefined')){
pimworkhistoriesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimworkhistories') as any); pimvocationalsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimvocationals') as any);
if(pimworkhistoriesData && pimworkhistoriesData.length && pimworkhistoriesData.length > 0){ if(pimvocationalsData && pimvocationalsData.length && pimvocationalsData.length > 0){
pimworkhistoriesData.forEach((item:any) => { pimvocationalsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimworkhistoryid = null; item.pimvocationalid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimworkhistories = pimworkhistoriesData; masterData.pimvocationals = pimvocationalsData;
let pimcontractsData:any = []; let pimdistirbutionsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimcontracts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimdistirbutions'),'undefined')){
pimcontractsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimcontracts') as any); pimdistirbutionsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimdistirbutions') as any);
if(pimcontractsData && pimcontractsData.length && pimcontractsData.length > 0){ if(pimdistirbutionsData && pimdistirbutionsData.length && pimdistirbutionsData.length > 0){
pimcontractsData.forEach((item:any) => { pimdistirbutionsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimcontractid = null; item.pimdistirbutionid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimcontracts = pimcontractsData; masterData.pimdistirbutions = pimdistirbutionsData;
let pimvacationsData:any = []; let pimpersonchangesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimvacations'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonchanges'),'undefined')){
pimvacationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimvacations') as any); pimpersonchangesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonchanges') as any);
if(pimvacationsData && pimvacationsData.length && pimvacationsData.length > 0){ if(pimpersonchangesData && pimpersonchangesData.length && pimpersonchangesData.length > 0){
pimvacationsData.forEach((item:any) => { pimpersonchangesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimvacationid = null; item.pimpersonchangeid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimvacations = pimvacationsData; masterData.pimpersonchanges = pimpersonchangesData;
let pimeducationsData:any = []; let pimexitandentriesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimeducations'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimexitandentries'),'undefined')){
pimeducationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimeducations') as any); pimexitandentriesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimexitandentries') as any);
if(pimeducationsData && pimeducationsData.length && pimeducationsData.length > 0){ if(pimexitandentriesData && pimexitandentriesData.length && pimexitandentriesData.length > 0){
pimeducationsData.forEach((item:any) => { pimexitandentriesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimeducationid = null; item.pimexitandentryid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimeducations = pimeducationsData; masterData.pimexitandentries = pimexitandentriesData;
let pimpersonabilitiesData:any = []; let pimarmycadresData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonabilities'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarmycadres'),'undefined')){
pimpersonabilitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonabilities') as any); pimarmycadresData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarmycadres') as any);
if(pimpersonabilitiesData && pimpersonabilitiesData.length && pimpersonabilitiesData.length > 0){ if(pimarmycadresData && pimarmycadresData.length && pimarmycadresData.length > 0){
pimpersonabilitiesData.forEach((item:any) => { pimarmycadresData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimpersonabilityid = null; item.pimarmycadresid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimpersonabilities = pimpersonabilitiesData; masterData.pimarmycadres = pimarmycadresData;
let pimdistirbutionsData:any = []; let pimarchivesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimdistirbutions'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchives'),'undefined')){
pimdistirbutionsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimdistirbutions') as any); pimarchivesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchives') as any);
if(pimdistirbutionsData && pimdistirbutionsData.length && pimdistirbutionsData.length > 0){ if(pimarchivesData && pimarchivesData.length && pimarchivesData.length > 0){
pimdistirbutionsData.forEach((item:any) => { pimarchivesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimdistirbutionid = null; item.pimarchivesid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimdistirbutions = pimdistirbutionsData; masterData.pimarchives = pimarchivesData;
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;
...@@ -829,27 +829,27 @@ export default class PIMPERSONServiceBase extends EntityService { ...@@ -829,27 +829,27 @@ export default class PIMPERSONServiceBase 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(`/pimpeople`,data,isloading); let res:any = await Http.getInstance().post(`/pimpeople`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimresearchfindings',JSON.stringify(res.data.pimresearchfindings));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimvocationals',JSON.stringify(res.data.pimvocationals));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimarchives',JSON.stringify(res.data.pimarchives));
this.tempStorage.setItem(tempContext.srfsessionkey+'_trmtrianpeople',JSON.stringify(res.data.trmtrianpeople)); this.tempStorage.setItem(tempContext.srfsessionkey+'_trmtrianpeople',JSON.stringify(res.data.trmtrianpeople));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimlanguageabilities',JSON.stringify(res.data.pimlanguageabilities)); this.tempStorage.setItem(tempContext.srfsessionkey+'_pimpatents',JSON.stringify(res.data.pimpatents));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimpersonchanges',JSON.stringify(res.data.pimpersonchanges));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimachievements',JSON.stringify(res.data.pimachievements)); this.tempStorage.setItem(tempContext.srfsessionkey+'_pimachievements',JSON.stringify(res.data.pimachievements));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimexitandentries',JSON.stringify(res.data.pimexitandentries)); this.tempStorage.setItem(tempContext.srfsessionkey+'_pimvacations',JSON.stringify(res.data.pimvacations));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimpapers',JSON.stringify(res.data.pimpapers)); this.tempStorage.setItem(tempContext.srfsessionkey+'_pimpapers',JSON.stringify(res.data.pimpapers));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimlanguageabilities',JSON.stringify(res.data.pimlanguageabilities));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimrewardpunishments',JSON.stringify(res.data.pimrewardpunishments));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimcontracts',JSON.stringify(res.data.pimcontracts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimresearchfindings',JSON.stringify(res.data.pimresearchfindings));
this.tempStorage.setItem(tempContext.srfsessionkey+'_attendancemreportmxes',JSON.stringify(res.data.attendancemreportmxes)); this.tempStorage.setItem(tempContext.srfsessionkey+'_attendancemreportmxes',JSON.stringify(res.data.attendancemreportmxes));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimarmycadres',JSON.stringify(res.data.pimarmycadres));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimtitles',JSON.stringify(res.data.pimtitles)); this.tempStorage.setItem(tempContext.srfsessionkey+'_pimtitles',JSON.stringify(res.data.pimtitles));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimeducations',JSON.stringify(res.data.pimeducations));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimfaminfos',JSON.stringify(res.data.pimfaminfos)); this.tempStorage.setItem(tempContext.srfsessionkey+'_pimfaminfos',JSON.stringify(res.data.pimfaminfos));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimrewardpunishments',JSON.stringify(res.data.pimrewardpunishments));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimpatents',JSON.stringify(res.data.pimpatents));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimworkhistories',JSON.stringify(res.data.pimworkhistories)); this.tempStorage.setItem(tempContext.srfsessionkey+'_pimworkhistories',JSON.stringify(res.data.pimworkhistories));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimcontracts',JSON.stringify(res.data.pimcontracts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimvacations',JSON.stringify(res.data.pimvacations));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimeducations',JSON.stringify(res.data.pimeducations));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimpersonabilities',JSON.stringify(res.data.pimpersonabilities)); this.tempStorage.setItem(tempContext.srfsessionkey+'_pimpersonabilities',JSON.stringify(res.data.pimpersonabilities));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimvocationals',JSON.stringify(res.data.pimvocationals));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimdistirbutions',JSON.stringify(res.data.pimdistirbutions)); this.tempStorage.setItem(tempContext.srfsessionkey+'_pimdistirbutions',JSON.stringify(res.data.pimdistirbutions));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimpersonchanges',JSON.stringify(res.data.pimpersonchanges));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimexitandentries',JSON.stringify(res.data.pimexitandentries));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimarmycadres',JSON.stringify(res.data.pimarmycadres));
this.tempStorage.setItem(tempContext.srfsessionkey+'_pimarchives',JSON.stringify(res.data.pimarchives));
return res; return res;
} }
...@@ -864,66 +864,81 @@ export default class PIMPERSONServiceBase extends EntityService { ...@@ -864,66 +864,81 @@ export default class PIMPERSONServiceBase 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 pimresearchfindingsData:any = []; let trmtrianpeopleData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimresearchfindings'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_trmtrianpeople'),'undefined')){
pimresearchfindingsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimresearchfindings') as any); trmtrianpeopleData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_trmtrianpeople') as any);
if(pimresearchfindingsData && pimresearchfindingsData.length && pimresearchfindingsData.length > 0){ if(trmtrianpeopleData && trmtrianpeopleData.length && trmtrianpeopleData.length > 0){
pimresearchfindingsData.forEach((item:any) => { trmtrianpeopleData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimresearchfindingsid = null; item.trmtrianpersonid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimresearchfindings = pimresearchfindingsData; masterData.trmtrianpeople = trmtrianpeopleData;
let pimvocationalsData:any = []; let pimpatentsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimvocationals'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpatents'),'undefined')){
pimvocationalsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimvocationals') as any); pimpatentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpatents') as any);
if(pimvocationalsData && pimvocationalsData.length && pimvocationalsData.length > 0){ if(pimpatentsData && pimpatentsData.length && pimpatentsData.length > 0){
pimvocationalsData.forEach((item:any) => { pimpatentsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimvocationalid = null; item.pimpatentid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimvocationals = pimvocationalsData; masterData.pimpatents = pimpatentsData;
let pimarchivesData:any = []; let pimachievementsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchives'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimachievements'),'undefined')){
pimarchivesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchives') as any); pimachievementsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimachievements') as any);
if(pimarchivesData && pimarchivesData.length && pimarchivesData.length > 0){ if(pimachievementsData && pimachievementsData.length && pimachievementsData.length > 0){
pimarchivesData.forEach((item:any) => { pimachievementsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimarchivesid = null; item.pimachievementsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimarchives = pimarchivesData; masterData.pimachievements = pimachievementsData;
let trmtrianpeopleData:any = []; let pimvacationsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_trmtrianpeople'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimvacations'),'undefined')){
trmtrianpeopleData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_trmtrianpeople') as any); pimvacationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimvacations') as any);
if(trmtrianpeopleData && trmtrianpeopleData.length && trmtrianpeopleData.length > 0){ if(pimvacationsData && pimvacationsData.length && pimvacationsData.length > 0){
trmtrianpeopleData.forEach((item:any) => { pimvacationsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimvacationid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimvacations = pimvacationsData;
let pimpapersData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpapers'),'undefined')){
pimpapersData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpapers') as any);
if(pimpapersData && pimpapersData.length && pimpapersData.length > 0){
pimpapersData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.trmtrianpersonid = null; item.pimpaperid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.trmtrianpeople = trmtrianpeopleData; masterData.pimpapers = pimpapersData;
let pimlanguageabilitiesData:any = []; let pimlanguageabilitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimlanguageabilities'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimlanguageabilities'),'undefined')){
pimlanguageabilitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimlanguageabilities') as any); pimlanguageabilitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimlanguageabilities') as any);
...@@ -939,66 +954,51 @@ export default class PIMPERSONServiceBase extends EntityService { ...@@ -939,66 +954,51 @@ export default class PIMPERSONServiceBase extends EntityService {
} }
} }
masterData.pimlanguageabilities = pimlanguageabilitiesData; masterData.pimlanguageabilities = pimlanguageabilitiesData;
let pimpersonchangesData:any = []; let pimrewardpunishmentsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonchanges'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimrewardpunishments'),'undefined')){
pimpersonchangesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonchanges') as any); pimrewardpunishmentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimrewardpunishments') as any);
if(pimpersonchangesData && pimpersonchangesData.length && pimpersonchangesData.length > 0){ if(pimrewardpunishmentsData && pimrewardpunishmentsData.length && pimrewardpunishmentsData.length > 0){
pimpersonchangesData.forEach((item:any) => { pimrewardpunishmentsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.pimpersonchangeid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.pimpersonchanges = pimpersonchangesData;
let pimachievementsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimachievements'),'undefined')){
pimachievementsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimachievements') as any);
if(pimachievementsData && pimachievementsData.length && pimachievementsData.length > 0){
pimachievementsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimachievementsid = null; item.pimrewardpunishmentid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimachievements = pimachievementsData; masterData.pimrewardpunishments = pimrewardpunishmentsData;
let pimexitandentriesData:any = []; let pimcontractsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimexitandentries'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimcontracts'),'undefined')){
pimexitandentriesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimexitandentries') as any); pimcontractsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimcontracts') as any);
if(pimexitandentriesData && pimexitandentriesData.length && pimexitandentriesData.length > 0){ if(pimcontractsData && pimcontractsData.length && pimcontractsData.length > 0){
pimexitandentriesData.forEach((item:any) => { pimcontractsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimexitandentryid = null; item.pimcontractid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimexitandentries = pimexitandentriesData; masterData.pimcontracts = pimcontractsData;
let pimpapersData:any = []; let pimresearchfindingsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpapers'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimresearchfindings'),'undefined')){
pimpapersData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpapers') as any); pimresearchfindingsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimresearchfindings') as any);
if(pimpapersData && pimpapersData.length && pimpapersData.length > 0){ if(pimresearchfindingsData && pimresearchfindingsData.length && pimresearchfindingsData.length > 0){
pimpapersData.forEach((item:any) => { pimresearchfindingsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimpaperid = null; item.pimresearchfindingsid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimpapers = pimpapersData; masterData.pimresearchfindings = pimresearchfindingsData;
let attendancemreportmxesData:any = []; let attendancemreportmxesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_attendancemreportmxes'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_attendancemreportmxes'),'undefined')){
attendancemreportmxesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_attendancemreportmxes') as any); attendancemreportmxesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_attendancemreportmxes') as any);
...@@ -1014,36 +1014,36 @@ export default class PIMPERSONServiceBase extends EntityService { ...@@ -1014,36 +1014,36 @@ export default class PIMPERSONServiceBase extends EntityService {
} }
} }
masterData.attendancemreportmxes = attendancemreportmxesData; masterData.attendancemreportmxes = attendancemreportmxesData;
let pimarmycadresData:any = []; let pimtitlesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarmycadres'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimtitles'),'undefined')){
pimarmycadresData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarmycadres') as any); pimtitlesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimtitles') as any);
if(pimarmycadresData && pimarmycadresData.length && pimarmycadresData.length > 0){ if(pimtitlesData && pimtitlesData.length && pimtitlesData.length > 0){
pimarmycadresData.forEach((item:any) => { pimtitlesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimarmycadresid = null; item.pimtitleid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimarmycadres = pimarmycadresData; masterData.pimtitles = pimtitlesData;
let pimtitlesData:any = []; let pimeducationsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimtitles'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimeducations'),'undefined')){
pimtitlesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimtitles') as any); pimeducationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimeducations') as any);
if(pimtitlesData && pimtitlesData.length && pimtitlesData.length > 0){ if(pimeducationsData && pimeducationsData.length && pimeducationsData.length > 0){
pimtitlesData.forEach((item:any) => { pimeducationsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimtitleid = null; item.pimeducationid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimtitles = pimtitlesData; masterData.pimeducations = pimeducationsData;
let pimfaminfosData:any = []; let pimfaminfosData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimfaminfos'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimfaminfos'),'undefined')){
pimfaminfosData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimfaminfos') as any); pimfaminfosData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimfaminfos') as any);
...@@ -1059,149 +1059,149 @@ export default class PIMPERSONServiceBase extends EntityService { ...@@ -1059,149 +1059,149 @@ export default class PIMPERSONServiceBase extends EntityService {
} }
} }
masterData.pimfaminfos = pimfaminfosData; masterData.pimfaminfos = pimfaminfosData;
let pimrewardpunishmentsData:any = []; let pimworkhistoriesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimrewardpunishments'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimworkhistories'),'undefined')){
pimrewardpunishmentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimrewardpunishments') as any); pimworkhistoriesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimworkhistories') as any);
if(pimrewardpunishmentsData && pimrewardpunishmentsData.length && pimrewardpunishmentsData.length > 0){ if(pimworkhistoriesData && pimworkhistoriesData.length && pimworkhistoriesData.length > 0){
pimrewardpunishmentsData.forEach((item:any) => { pimworkhistoriesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimrewardpunishmentid = null; item.pimworkhistoryid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimrewardpunishments = pimrewardpunishmentsData; masterData.pimworkhistories = pimworkhistoriesData;
let pimpatentsData:any = []; let pimpersonabilitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpatents'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonabilities'),'undefined')){
pimpatentsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpatents') as any); pimpersonabilitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonabilities') as any);
if(pimpatentsData && pimpatentsData.length && pimpatentsData.length > 0){ if(pimpersonabilitiesData && pimpersonabilitiesData.length && pimpersonabilitiesData.length > 0){
pimpatentsData.forEach((item:any) => { pimpersonabilitiesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimpatentid = null; item.pimpersonabilityid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimpatents = pimpatentsData; masterData.pimpersonabilities = pimpersonabilitiesData;
let pimworkhistoriesData:any = []; let pimvocationalsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimworkhistories'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimvocationals'),'undefined')){
pimworkhistoriesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimworkhistories') as any); pimvocationalsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimvocationals') as any);
if(pimworkhistoriesData && pimworkhistoriesData.length && pimworkhistoriesData.length > 0){ if(pimvocationalsData && pimvocationalsData.length && pimvocationalsData.length > 0){
pimworkhistoriesData.forEach((item:any) => { pimvocationalsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimworkhistoryid = null; item.pimvocationalid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimworkhistories = pimworkhistoriesData; masterData.pimvocationals = pimvocationalsData;
let pimcontractsData:any = []; let pimdistirbutionsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimcontracts'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimdistirbutions'),'undefined')){
pimcontractsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimcontracts') as any); pimdistirbutionsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimdistirbutions') as any);
if(pimcontractsData && pimcontractsData.length && pimcontractsData.length > 0){ if(pimdistirbutionsData && pimdistirbutionsData.length && pimdistirbutionsData.length > 0){
pimcontractsData.forEach((item:any) => { pimdistirbutionsData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimcontractid = null; item.pimdistirbutionid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimcontracts = pimcontractsData; masterData.pimdistirbutions = pimdistirbutionsData;
let pimvacationsData:any = []; let pimpersonchangesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimvacations'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonchanges'),'undefined')){
pimvacationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimvacations') as any); pimpersonchangesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonchanges') as any);
if(pimvacationsData && pimvacationsData.length && pimvacationsData.length > 0){ if(pimpersonchangesData && pimpersonchangesData.length && pimpersonchangesData.length > 0){
pimvacationsData.forEach((item:any) => { pimpersonchangesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimvacationid = null; item.pimpersonchangeid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimvacations = pimvacationsData; masterData.pimpersonchanges = pimpersonchangesData;
let pimeducationsData:any = []; let pimexitandentriesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimeducations'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimexitandentries'),'undefined')){
pimeducationsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimeducations') as any); pimexitandentriesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimexitandentries') as any);
if(pimeducationsData && pimeducationsData.length && pimeducationsData.length > 0){ if(pimexitandentriesData && pimexitandentriesData.length && pimexitandentriesData.length > 0){
pimeducationsData.forEach((item:any) => { pimexitandentriesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimeducationid = null; item.pimexitandentryid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimeducations = pimeducationsData; masterData.pimexitandentries = pimexitandentriesData;
let pimpersonabilitiesData:any = []; let pimarmycadresData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonabilities'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarmycadres'),'undefined')){
pimpersonabilitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimpersonabilities') as any); pimarmycadresData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarmycadres') as any);
if(pimpersonabilitiesData && pimpersonabilitiesData.length && pimpersonabilitiesData.length > 0){ if(pimarmycadresData && pimarmycadresData.length && pimarmycadresData.length > 0){
pimpersonabilitiesData.forEach((item:any) => { pimarmycadresData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimpersonabilityid = null; item.pimarmycadresid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimpersonabilities = pimpersonabilitiesData; masterData.pimarmycadres = pimarmycadresData;
let pimdistirbutionsData:any = []; let pimarchivesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimdistirbutions'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_pimarchives'),'undefined')){
pimdistirbutionsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimdistirbutions') as any); pimarchivesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_pimarchives') as any);
if(pimdistirbutionsData && pimdistirbutionsData.length && pimdistirbutionsData.length > 0){ if(pimarchivesData && pimarchivesData.length && pimarchivesData.length > 0){
pimdistirbutionsData.forEach((item:any) => { pimarchivesData.forEach((item:any) => {
if(item.srffrontuf){ if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){ if(Object.is(item.srffrontuf,"0")){
item.pimdistirbutionid = null; item.pimarchivesid = null;
} }
delete item.srffrontuf; delete item.srffrontuf;
} }
}); });
} }
} }
masterData.pimdistirbutions = pimdistirbutionsData; masterData.pimarchives = pimarchivesData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/pimpeople/${context.pimperson}/save`,data,isloading); let res:any = await Http.getInstance().post(`/pimpeople/${context.pimperson}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_pimresearchfindings',JSON.stringify(res.data.pimresearchfindings));
this.tempStorage.setItem(context.srfsessionkey+'_pimvocationals',JSON.stringify(res.data.pimvocationals));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchives',JSON.stringify(res.data.pimarchives));
this.tempStorage.setItem(context.srfsessionkey+'_trmtrianpeople',JSON.stringify(res.data.trmtrianpeople)); this.tempStorage.setItem(context.srfsessionkey+'_trmtrianpeople',JSON.stringify(res.data.trmtrianpeople));
this.tempStorage.setItem(context.srfsessionkey+'_pimlanguageabilities',JSON.stringify(res.data.pimlanguageabilities)); this.tempStorage.setItem(context.srfsessionkey+'_pimpatents',JSON.stringify(res.data.pimpatents));
this.tempStorage.setItem(context.srfsessionkey+'_pimpersonchanges',JSON.stringify(res.data.pimpersonchanges));
this.tempStorage.setItem(context.srfsessionkey+'_pimachievements',JSON.stringify(res.data.pimachievements)); this.tempStorage.setItem(context.srfsessionkey+'_pimachievements',JSON.stringify(res.data.pimachievements));
this.tempStorage.setItem(context.srfsessionkey+'_pimexitandentries',JSON.stringify(res.data.pimexitandentries)); this.tempStorage.setItem(context.srfsessionkey+'_pimvacations',JSON.stringify(res.data.pimvacations));
this.tempStorage.setItem(context.srfsessionkey+'_pimpapers',JSON.stringify(res.data.pimpapers)); this.tempStorage.setItem(context.srfsessionkey+'_pimpapers',JSON.stringify(res.data.pimpapers));
this.tempStorage.setItem(context.srfsessionkey+'_pimlanguageabilities',JSON.stringify(res.data.pimlanguageabilities));
this.tempStorage.setItem(context.srfsessionkey+'_pimrewardpunishments',JSON.stringify(res.data.pimrewardpunishments));
this.tempStorage.setItem(context.srfsessionkey+'_pimcontracts',JSON.stringify(res.data.pimcontracts));
this.tempStorage.setItem(context.srfsessionkey+'_pimresearchfindings',JSON.stringify(res.data.pimresearchfindings));
this.tempStorage.setItem(context.srfsessionkey+'_attendancemreportmxes',JSON.stringify(res.data.attendancemreportmxes)); this.tempStorage.setItem(context.srfsessionkey+'_attendancemreportmxes',JSON.stringify(res.data.attendancemreportmxes));
this.tempStorage.setItem(context.srfsessionkey+'_pimarmycadres',JSON.stringify(res.data.pimarmycadres));
this.tempStorage.setItem(context.srfsessionkey+'_pimtitles',JSON.stringify(res.data.pimtitles)); this.tempStorage.setItem(context.srfsessionkey+'_pimtitles',JSON.stringify(res.data.pimtitles));
this.tempStorage.setItem(context.srfsessionkey+'_pimeducations',JSON.stringify(res.data.pimeducations));
this.tempStorage.setItem(context.srfsessionkey+'_pimfaminfos',JSON.stringify(res.data.pimfaminfos)); this.tempStorage.setItem(context.srfsessionkey+'_pimfaminfos',JSON.stringify(res.data.pimfaminfos));
this.tempStorage.setItem(context.srfsessionkey+'_pimrewardpunishments',JSON.stringify(res.data.pimrewardpunishments));
this.tempStorage.setItem(context.srfsessionkey+'_pimpatents',JSON.stringify(res.data.pimpatents));
this.tempStorage.setItem(context.srfsessionkey+'_pimworkhistories',JSON.stringify(res.data.pimworkhistories)); this.tempStorage.setItem(context.srfsessionkey+'_pimworkhistories',JSON.stringify(res.data.pimworkhistories));
this.tempStorage.setItem(context.srfsessionkey+'_pimcontracts',JSON.stringify(res.data.pimcontracts));
this.tempStorage.setItem(context.srfsessionkey+'_pimvacations',JSON.stringify(res.data.pimvacations));
this.tempStorage.setItem(context.srfsessionkey+'_pimeducations',JSON.stringify(res.data.pimeducations));
this.tempStorage.setItem(context.srfsessionkey+'_pimpersonabilities',JSON.stringify(res.data.pimpersonabilities)); this.tempStorage.setItem(context.srfsessionkey+'_pimpersonabilities',JSON.stringify(res.data.pimpersonabilities));
this.tempStorage.setItem(context.srfsessionkey+'_pimvocationals',JSON.stringify(res.data.pimvocationals));
this.tempStorage.setItem(context.srfsessionkey+'_pimdistirbutions',JSON.stringify(res.data.pimdistirbutions)); this.tempStorage.setItem(context.srfsessionkey+'_pimdistirbutions',JSON.stringify(res.data.pimdistirbutions));
this.tempStorage.setItem(context.srfsessionkey+'_pimpersonchanges',JSON.stringify(res.data.pimpersonchanges));
this.tempStorage.setItem(context.srfsessionkey+'_pimexitandentries',JSON.stringify(res.data.pimexitandentries));
this.tempStorage.setItem(context.srfsessionkey+'_pimarmycadres',JSON.stringify(res.data.pimarmycadres));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchives',JSON.stringify(res.data.pimarchives));
return res; return res;
} }
...@@ -1285,27 +1285,27 @@ export default class PIMPERSONServiceBase extends EntityService { ...@@ -1285,27 +1285,27 @@ export default class PIMPERSONServiceBase 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(`/pimpeople/getdraft`,isloading); let res:any = await Http.getInstance().get(`/pimpeople/getdraft`,isloading);
res.data.pimperson = data.pimperson; res.data.pimperson = data.pimperson;
this.tempStorage.setItem(context.srfsessionkey+'_pimresearchfindings',JSON.stringify(res.data.pimresearchfindings));
this.tempStorage.setItem(context.srfsessionkey+'_pimvocationals',JSON.stringify(res.data.pimvocationals));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchives',JSON.stringify(res.data.pimarchives));
this.tempStorage.setItem(context.srfsessionkey+'_trmtrianpeople',JSON.stringify(res.data.trmtrianpeople)); this.tempStorage.setItem(context.srfsessionkey+'_trmtrianpeople',JSON.stringify(res.data.trmtrianpeople));
this.tempStorage.setItem(context.srfsessionkey+'_pimlanguageabilities',JSON.stringify(res.data.pimlanguageabilities)); this.tempStorage.setItem(context.srfsessionkey+'_pimpatents',JSON.stringify(res.data.pimpatents));
this.tempStorage.setItem(context.srfsessionkey+'_pimpersonchanges',JSON.stringify(res.data.pimpersonchanges));
this.tempStorage.setItem(context.srfsessionkey+'_pimachievements',JSON.stringify(res.data.pimachievements)); this.tempStorage.setItem(context.srfsessionkey+'_pimachievements',JSON.stringify(res.data.pimachievements));
this.tempStorage.setItem(context.srfsessionkey+'_pimexitandentries',JSON.stringify(res.data.pimexitandentries)); this.tempStorage.setItem(context.srfsessionkey+'_pimvacations',JSON.stringify(res.data.pimvacations));
this.tempStorage.setItem(context.srfsessionkey+'_pimpapers',JSON.stringify(res.data.pimpapers)); this.tempStorage.setItem(context.srfsessionkey+'_pimpapers',JSON.stringify(res.data.pimpapers));
this.tempStorage.setItem(context.srfsessionkey+'_pimlanguageabilities',JSON.stringify(res.data.pimlanguageabilities));
this.tempStorage.setItem(context.srfsessionkey+'_pimrewardpunishments',JSON.stringify(res.data.pimrewardpunishments));
this.tempStorage.setItem(context.srfsessionkey+'_pimcontracts',JSON.stringify(res.data.pimcontracts));
this.tempStorage.setItem(context.srfsessionkey+'_pimresearchfindings',JSON.stringify(res.data.pimresearchfindings));
this.tempStorage.setItem(context.srfsessionkey+'_attendancemreportmxes',JSON.stringify(res.data.attendancemreportmxes)); this.tempStorage.setItem(context.srfsessionkey+'_attendancemreportmxes',JSON.stringify(res.data.attendancemreportmxes));
this.tempStorage.setItem(context.srfsessionkey+'_pimarmycadres',JSON.stringify(res.data.pimarmycadres));
this.tempStorage.setItem(context.srfsessionkey+'_pimtitles',JSON.stringify(res.data.pimtitles)); this.tempStorage.setItem(context.srfsessionkey+'_pimtitles',JSON.stringify(res.data.pimtitles));
this.tempStorage.setItem(context.srfsessionkey+'_pimeducations',JSON.stringify(res.data.pimeducations));
this.tempStorage.setItem(context.srfsessionkey+'_pimfaminfos',JSON.stringify(res.data.pimfaminfos)); this.tempStorage.setItem(context.srfsessionkey+'_pimfaminfos',JSON.stringify(res.data.pimfaminfos));
this.tempStorage.setItem(context.srfsessionkey+'_pimrewardpunishments',JSON.stringify(res.data.pimrewardpunishments));
this.tempStorage.setItem(context.srfsessionkey+'_pimpatents',JSON.stringify(res.data.pimpatents));
this.tempStorage.setItem(context.srfsessionkey+'_pimworkhistories',JSON.stringify(res.data.pimworkhistories)); this.tempStorage.setItem(context.srfsessionkey+'_pimworkhistories',JSON.stringify(res.data.pimworkhistories));
this.tempStorage.setItem(context.srfsessionkey+'_pimcontracts',JSON.stringify(res.data.pimcontracts));
this.tempStorage.setItem(context.srfsessionkey+'_pimvacations',JSON.stringify(res.data.pimvacations));
this.tempStorage.setItem(context.srfsessionkey+'_pimeducations',JSON.stringify(res.data.pimeducations));
this.tempStorage.setItem(context.srfsessionkey+'_pimpersonabilities',JSON.stringify(res.data.pimpersonabilities)); this.tempStorage.setItem(context.srfsessionkey+'_pimpersonabilities',JSON.stringify(res.data.pimpersonabilities));
this.tempStorage.setItem(context.srfsessionkey+'_pimvocationals',JSON.stringify(res.data.pimvocationals));
this.tempStorage.setItem(context.srfsessionkey+'_pimdistirbutions',JSON.stringify(res.data.pimdistirbutions)); this.tempStorage.setItem(context.srfsessionkey+'_pimdistirbutions',JSON.stringify(res.data.pimdistirbutions));
this.tempStorage.setItem(context.srfsessionkey+'_pimpersonchanges',JSON.stringify(res.data.pimpersonchanges));
this.tempStorage.setItem(context.srfsessionkey+'_pimexitandentries',JSON.stringify(res.data.pimexitandentries));
this.tempStorage.setItem(context.srfsessionkey+'_pimarmycadres',JSON.stringify(res.data.pimarmycadres));
this.tempStorage.setItem(context.srfsessionkey+'_pimarchives',JSON.stringify(res.data.pimarchives));
return res; return res;
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册