staff-member-pages.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. const { pages } = require('@alancnet/material-framework/app/crud')
  2. pages({
  3. camelName: 'staffMember',
  4. apiPrefix: '/api/staff-members/:location',
  5. appPrefix: '/staff-members/:location',
  6. pascalName: 'StaffMember',
  7. pascalPlural: 'StaffMembers',
  8. titleName: '{{ctrl.$routeParams.location == "all" ? "All" : ctrl.$routeParams.location}} Staff Member',
  9. titlePlural: '{{ctrl.$routeParams.location == "all" ? "All" : ctrl.$routeParams.location}} Staff Members',
  10. columns: [
  11. { camelName: 'name', row: 1 },
  12. { camelName: 'title', row: 2 },
  13. {
  14. titleName: 'Category',
  15. camelName: 'laborCategoryId',
  16. type: 'autocomplete',
  17. apiPrefix: '/api/labor-categories'
  18. },
  19. {
  20. titleName: 'Location',
  21. camelName: 'locationId',
  22. routeParam: 'location',
  23. type: 'autocomplete',
  24. apiPrefix: '/api/locations'
  25. },
  26. {
  27. titleName: 'Staffing Agency',
  28. camelName: 'staffingAgencyId',
  29. type: 'autocomplete',
  30. apiPrefix: '/api/staffing-agencies'
  31. },
  32. {
  33. inList: false,
  34. camelName: 'wage',
  35. type: 'currency'
  36. }
  37. ],
  38. layout: [
  39. {
  40. section: null,
  41. rows: [
  42. [ 'name', 'title' ],
  43. [ 'wage', 'locationId' ]
  44. ]
  45. },
  46. {
  47. section: 'Staffing information',
  48. rows: [
  49. [ 'laborCategoryId', 'staffingAgencyId' ]
  50. ]
  51. }
  52. ]
  53. })