export const ExhibitCardStatus = { upcoming: 0, finished: 1, canceled: 2, postponed: 3, ongoing: 4, }; export const statue2number = { Upcoming: 0, Finished: 1, Canceled: 2, Postponed: 3, Ongoing: 4, }; export const StatusText = Object.keys(ExhibitCardStatus).reduce((t, key) => { t[ExhibitCardStatus[key]] = key; return t; }, {}); export function needLeftTagStatus(status) { return ['201', '102', '101'].includes(status); } export const testExhibitionList = Array(22) .fill(1) .map((_, i) => ({ id: i + 1, title: "CES 2022, International Consumer Electronics Show", location: "America - U.S.A. - Las Vagas", rate: Math.ceil(Math.random() * 5), rateNumber: 344, exhibitNumber: Math.floor(Math.random() * 1000), visitorNumber: Math.floor(Math.random() * 1000), category: "Aerospace, Maritime & Transportation", image: "https://picsum.photos/180/120", description: "MEDICAL JAPAN is Japan’s leading trade show consisting of specialised shows for Medical, Elderly Care and Pharmacy industry. A large number of visitors specialised in medical ... ", startDate: new Date("2022-03-25").getTime(), endDate: new Date(`2022-04-0${i + 1}`).getTime(), favorite: Math.floor(Math.random() * 10) > 5, recommend: Math.floor(Math.random() * 10) > 5, status: Math.floor(Math.random() * 5), // 0: upcoming, 1: finished, 2: canceled, 3: postponed, 4: ongoing }));