1234567891011121314151617181920212223242526272829303132333435363738 |
- const RESEARCHLIST = ['ficc_researcher', 'researcher', 'rai_researcher','ficc_admin', 'rai_admin',];
- const SELLERLIST = ['ficc_seller', 'rai_seller', 'ficc_group', 'rai_group', 'ficc_team'];
- const ADMINLIST = ['admin'];
- export const getRole = (role) => {
- return RESEARCHLIST.includes(role) ? 'researcher' : SELLERLIST.includes(role) ? 'seller' : role;
- }
- export const editInfoBack = ({ ActivityType,RoadshowType,RoadshowPlatform,City,Province,CompanyId,CompanyName,ResearcherId,Theme,CooperationName,ActivityCategory,StartDate,EndDate,StartTime,EndTime },type= 1) => {
- return {
- activityType: ActivityType,
- roadshowType: RoadshowType,
- roadshowPlatform: RoadshowPlatform,
- roadshowCity: Province ? [Province,City] : [],
- companyId: CompanyId,
- companyName: CompanyName,
- meetingTheme: Theme,
- partnersName: CooperationName,
- activityClass: ActivityCategory,
- selectResearchers: [
-
- {
- researcherId: type === 2 ? ResearcherId.split(',').map(item => Number(item)) : Number(ResearcherId),
- startTime: new Date(`${StartDate.replace(/-/g,'/')} ${StartTime}`).getTime(),
- endTime: new Date(`${EndDate.replace(/-/g,'/')} ${EndTime}`).getTime(),
- },
- ],
- };
- }
|