helper.js 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. export const FETCH_CONFIG = {
  2. headers: {
  3. 'Accept': 'application/json',
  4. 'Content-Type': 'application/json'
  5. },
  6. apiUrl: 'http://localhost:6543/api/v2',
  7. mockApiUrl: 'http://localhost:3001'
  8. }
  9. export const PAGE = {
  10. HOME: '/',
  11. WORKSPACE: {
  12. DASHBOARD: (idws = 'idws') => `/workspace/${idws}`,
  13. NEW: '/workspace/new',
  14. CALENDAR: (idws = ':idws') => `/workspace/${idws}/apps/calendar`,
  15. CONTENT_LIST: (idws = ':idws') => `/workspace/${idws}/apps/contents`,
  16. CONTENT: (idws = ':idws', idcts = ':idcts') => `/workspace/${idws}/apps/contents/${idcts}`,
  17. CONTENT_NEW: (idws = ':idws', ctstype = ':ctstype') => `/workspace/${idws}/apps/contents/${ctstype}/new`,
  18. CONTENT_EDIT: (idws = ':idws', idcts = ':idcts') => `/workspace/${idws}/apps/contents/${idcts}/edit`,
  19. CONTENT_TITLE_EDIT: (idws = ':idws', idcts = ':idcts') => `/workspace/${idws}/apps/contents/${idcts}/title/edit`,
  20. ADMIN: (idws = ':idws') => `/workspace/${idws}/admin`
  21. },
  22. LOGIN: '/login',
  23. ACCOUNT: '/account'
  24. }
  25. export const ROLE = [{
  26. id: 0,
  27. name: 'reader',
  28. icon: 'fa-eye',
  29. translationKey: 'role.reader'
  30. }, {
  31. id: 1,
  32. name: 'contributor',
  33. icon: 'fa-pencil',
  34. translationKey: 'role.contributor'
  35. }, {
  36. id: 2,
  37. name: 'content_manager',
  38. icon: 'fa-graduation-cap',
  39. translationKey: 'role.content_manager'
  40. }, {
  41. id: 3,
  42. name: 'manager',
  43. icon: 'fa-gavel',
  44. translationKey: 'role.manager'
  45. }]