You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.4 KiB

2 years ago
  1. export const ExhibitCardStatus = {
  2. upcoming: 0,
  3. finished: 1,
  4. canceled: 2,
  5. postponed: 3,
  6. ongoing: 4,
  7. };
  8. export const statue2number = {
  9. Upcoming: 0,
  10. Finished: 1,
  11. Canceled: 2,
  12. Postponed: 3,
  13. Ongoing: 4,
  14. };
  15. export const StatusText = Object.keys(ExhibitCardStatus).reduce((t, key) => {
  16. t[ExhibitCardStatus[key]] = key;
  17. return t;
  18. }, {});
  19. export function needLeftTagStatus(status) {
  20. return ['201', '102', '101'].includes(status);
  21. }
  22. export const testExhibitionList = Array(22)
  23. .fill(1)
  24. .map((_, i) => ({
  25. id: i + 1,
  26. title: "CES 2022, International Consumer Electronics Show",
  27. location: "America - U.S.A. - Las Vagas",
  28. rate: Math.ceil(Math.random() * 5),
  29. rateNumber: 344,
  30. exhibitNumber: Math.floor(Math.random() * 1000),
  31. visitorNumber: Math.floor(Math.random() * 1000),
  32. category: "Aerospace, Maritime & Transportation",
  33. image: "https://picsum.photos/180/120",
  34. 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 ... ",
  35. startDate: new Date("2022-03-25").getTime(),
  36. endDate: new Date(`2022-04-0${i + 1}`).getTime(),
  37. favorite: Math.floor(Math.random() * 10) > 5,
  38. recommend: Math.floor(Math.random() * 10) > 5,
  39. status: Math.floor(Math.random() * 5), // 0: upcoming, 1: finished, 2: canceled, 3: postponed, 4: ongoing
  40. }));