create-mithaq 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (396) hide show
  1. package/LICENSE +22 -0
  2. package/LICENSES/openstatus-time-picker.txt +21 -0
  3. package/LICENSES/payload.txt +22 -0
  4. package/LICENSES/ponytail.txt +21 -0
  5. package/index.js +521 -0
  6. package/package.json +19 -4
  7. package/template/apps/asas-backoffice/components.json +25 -0
  8. package/template/apps/asas-backoffice/gitignore +3 -0
  9. package/template/apps/asas-backoffice/package.json +57 -0
  10. package/template/apps/asas-backoffice/public/favicon.svg +1 -0
  11. package/template/apps/asas-backoffice/src/api.ts +147 -0
  12. package/template/apps/asas-backoffice/src/auth-frame.tsx +150 -0
  13. package/template/apps/asas-backoffice/src/components/ui/accordion.tsx +74 -0
  14. package/template/apps/asas-backoffice/src/components/ui/alert-dialog.tsx +185 -0
  15. package/template/apps/asas-backoffice/src/components/ui/avatar.tsx +106 -0
  16. package/template/apps/asas-backoffice/src/components/ui/badge.tsx +48 -0
  17. package/template/apps/asas-backoffice/src/components/ui/breadcrumb.tsx +124 -0
  18. package/template/apps/asas-backoffice/src/components/ui/button-group.tsx +87 -0
  19. package/template/apps/asas-backoffice/src/components/ui/button.tsx +55 -0
  20. package/template/apps/asas-backoffice/src/components/ui/calendar.tsx +223 -0
  21. package/template/apps/asas-backoffice/src/components/ui/card.tsx +102 -0
  22. package/template/apps/asas-backoffice/src/components/ui/chart.tsx +371 -0
  23. package/template/apps/asas-backoffice/src/components/ui/checkbox.tsx +28 -0
  24. package/template/apps/asas-backoffice/src/components/ui/collapsible.tsx +19 -0
  25. package/template/apps/asas-backoffice/src/components/ui/combobox.tsx +308 -0
  26. package/template/apps/asas-backoffice/src/components/ui/dialog.tsx +158 -0
  27. package/template/apps/asas-backoffice/src/components/ui/direction.tsx +6 -0
  28. package/template/apps/asas-backoffice/src/components/ui/directional-icon.tsx +20 -0
  29. package/template/apps/asas-backoffice/src/components/ui/dropdown-menu.tsx +267 -0
  30. package/template/apps/asas-backoffice/src/components/ui/field.tsx +236 -0
  31. package/template/apps/asas-backoffice/src/components/ui/input-group.tsx +155 -0
  32. package/template/apps/asas-backoffice/src/components/ui/input-otp.tsx +84 -0
  33. package/template/apps/asas-backoffice/src/components/ui/input.tsx +19 -0
  34. package/template/apps/asas-backoffice/src/components/ui/label.tsx +19 -0
  35. package/template/apps/asas-backoffice/src/components/ui/popover.tsx +90 -0
  36. package/template/apps/asas-backoffice/src/components/ui/radio-group.tsx +37 -0
  37. package/template/apps/asas-backoffice/src/components/ui/resizable.tsx +47 -0
  38. package/template/apps/asas-backoffice/src/components/ui/scroll-area.tsx +54 -0
  39. package/template/apps/asas-backoffice/src/components/ui/select.tsx +204 -0
  40. package/template/apps/asas-backoffice/src/components/ui/separator.tsx +24 -0
  41. package/template/apps/asas-backoffice/src/components/ui/sheet.tsx +139 -0
  42. package/template/apps/asas-backoffice/src/components/ui/sidebar.tsx +714 -0
  43. package/template/apps/asas-backoffice/src/components/ui/skeleton.tsx +13 -0
  44. package/template/apps/asas-backoffice/src/components/ui/slider.tsx +55 -0
  45. package/template/apps/asas-backoffice/src/components/ui/spinner.tsx +10 -0
  46. package/template/apps/asas-backoffice/src/components/ui/switch.tsx +29 -0
  47. package/template/apps/asas-backoffice/src/components/ui/table.tsx +115 -0
  48. package/template/apps/asas-backoffice/src/components/ui/tabs.tsx +79 -0
  49. package/template/apps/asas-backoffice/src/components/ui/textarea.tsx +17 -0
  50. package/template/apps/asas-backoffice/src/components/ui/toggle-group.tsx +89 -0
  51. package/template/apps/asas-backoffice/src/components/ui/toggle.tsx +44 -0
  52. package/template/apps/asas-backoffice/src/components/ui/tooltip.tsx +63 -0
  53. package/template/apps/asas-backoffice/src/components.ts +35 -0
  54. package/template/apps/asas-backoffice/src/copy.ts +1 -0
  55. package/template/apps/asas-backoffice/src/first-user.ts +14 -0
  56. package/template/apps/asas-backoffice/src/hooks/use-mobile.ts +19 -0
  57. package/template/apps/asas-backoffice/src/lib/utils.ts +1 -0
  58. package/template/apps/asas-backoffice/src/links.ts +38 -0
  59. package/template/apps/asas-backoffice/src/locale-switch.tsx +28 -0
  60. package/template/apps/asas-backoffice/src/no-organization.tsx +5 -0
  61. package/template/apps/asas-backoffice/src/redirect.ts +1 -0
  62. package/template/apps/asas-backoffice/src/request-headers.ts +11 -0
  63. package/template/apps/asas-backoffice/src/routeTree.gen.ts +206 -0
  64. package/template/apps/asas-backoffice/src/router.tsx +18 -0
  65. package/template/apps/asas-backoffice/src/routes/(screens)/backoffice/files.ts +10 -0
  66. package/template/apps/asas-backoffice/src/routes/(screens)/backoffice/screen.json +3971 -0
  67. package/template/apps/asas-backoffice/src/routes/(screens)/backoffice/types.ts +163 -0
  68. package/template/apps/asas-backoffice/src/routes/(screens)/backoffice.$.tsx +17 -0
  69. package/template/apps/asas-backoffice/src/routes/(screens)/backoffice.index.tsx +10 -0
  70. package/template/apps/asas-backoffice/src/routes/(screens)/backoffice.tsx +13 -0
  71. package/template/apps/asas-backoffice/src/routes/__root.tsx +95 -0
  72. package/template/apps/asas-backoffice/src/routes/api/$.ts +34 -0
  73. package/template/apps/asas-backoffice/src/routes/auth.create-first-user.tsx +113 -0
  74. package/template/apps/asas-backoffice/src/routes/auth.sign-in.tsx +77 -0
  75. package/template/apps/asas-backoffice/src/routes/unauthorized.tsx +134 -0
  76. package/template/apps/asas-backoffice/src/screen-form.tsx +36 -0
  77. package/template/apps/asas-backoffice/src/screen-list.tsx +140 -0
  78. package/template/apps/asas-backoffice/src/screen-names.ts +10 -0
  79. package/template/apps/asas-backoffice/src/screens.tsx +888 -0
  80. package/template/apps/asas-backoffice/src/server.ts +30 -0
  81. package/template/apps/asas-backoffice/src/slide.ts +22 -0
  82. package/template/apps/asas-backoffice/src/start.ts +42 -0
  83. package/template/apps/asas-backoffice/src/styles.css +202 -0
  84. package/template/apps/asas-backoffice/src/theme.ts +2 -0
  85. package/template/apps/asas-backoffice/tsconfig.json +19 -0
  86. package/template/apps/asas-backoffice/vite.config.ts +32 -0
  87. package/template/apps/asas-tanstack/components.json +25 -0
  88. package/template/apps/asas-tanstack/gitignore +3 -0
  89. package/template/apps/asas-tanstack/package.json +58 -0
  90. package/template/apps/asas-tanstack/public/favicon.svg +1 -0
  91. package/template/apps/asas-tanstack/src/api.ts +147 -0
  92. package/template/apps/asas-tanstack/src/auth-frame.tsx +150 -0
  93. package/template/apps/asas-tanstack/src/choose-password.tsx +150 -0
  94. package/template/apps/asas-tanstack/src/components/ui/accordion.tsx +10 -0
  95. package/template/apps/asas-tanstack/src/components/ui/alert-dialog.tsx +173 -0
  96. package/template/apps/asas-tanstack/src/components/ui/avatar.tsx +104 -0
  97. package/template/apps/asas-tanstack/src/components/ui/badge.tsx +48 -0
  98. package/template/apps/asas-tanstack/src/components/ui/breadcrumb.tsx +125 -0
  99. package/template/apps/asas-tanstack/src/components/ui/button-group.tsx +87 -0
  100. package/template/apps/asas-tanstack/src/components/ui/button.tsx +56 -0
  101. package/template/apps/asas-tanstack/src/components/ui/calendar.tsx +223 -0
  102. package/template/apps/asas-tanstack/src/components/ui/card.tsx +94 -0
  103. package/template/apps/asas-tanstack/src/components/ui/chart.tsx +369 -0
  104. package/template/apps/asas-tanstack/src/components/ui/checkbox.tsx +27 -0
  105. package/template/apps/asas-tanstack/src/components/ui/collapsible.tsx +19 -0
  106. package/template/apps/asas-tanstack/src/components/ui/combobox.tsx +300 -0
  107. package/template/apps/asas-tanstack/src/components/ui/dialog.tsx +149 -0
  108. package/template/apps/asas-tanstack/src/components/ui/direction.tsx +5 -0
  109. package/template/apps/asas-tanstack/src/components/ui/directional-icon.tsx +20 -0
  110. package/template/apps/asas-tanstack/src/components/ui/dropdown-menu.tsx +267 -0
  111. package/template/apps/asas-tanstack/src/components/ui/field.tsx +225 -0
  112. package/template/apps/asas-tanstack/src/components/ui/input-group.tsx +147 -0
  113. package/template/apps/asas-tanstack/src/components/ui/input-otp.tsx +20 -0
  114. package/template/apps/asas-tanstack/src/components/ui/input.tsx +20 -0
  115. package/template/apps/asas-tanstack/src/components/ui/label.tsx +18 -0
  116. package/template/apps/asas-tanstack/src/components/ui/popover.tsx +50 -0
  117. package/template/apps/asas-tanstack/src/components/ui/radio-group.tsx +10 -0
  118. package/template/apps/asas-tanstack/src/components/ui/resizable.tsx +47 -0
  119. package/template/apps/asas-tanstack/src/components/ui/scroll-area.tsx +52 -0
  120. package/template/apps/asas-tanstack/src/components/ui/select.tsx +190 -0
  121. package/template/apps/asas-tanstack/src/components/ui/separator.tsx +23 -0
  122. package/template/apps/asas-tanstack/src/components/ui/sheet.tsx +127 -0
  123. package/template/apps/asas-tanstack/src/components/ui/sidebar.tsx +716 -0
  124. package/template/apps/asas-tanstack/src/components/ui/skeleton.tsx +13 -0
  125. package/template/apps/asas-tanstack/src/components/ui/slider.tsx +13 -0
  126. package/template/apps/asas-tanstack/src/components/ui/spinner.tsx +11 -0
  127. package/template/apps/asas-tanstack/src/components/ui/switch.tsx +8 -0
  128. package/template/apps/asas-tanstack/src/components/ui/table.tsx +119 -0
  129. package/template/apps/asas-tanstack/src/components/ui/tabs.tsx +80 -0
  130. package/template/apps/asas-tanstack/src/components/ui/textarea.tsx +18 -0
  131. package/template/apps/asas-tanstack/src/components/ui/toggle-group.tsx +8 -0
  132. package/template/apps/asas-tanstack/src/components/ui/toggle.tsx +44 -0
  133. package/template/apps/asas-tanstack/src/components/ui/tooltip.tsx +68 -0
  134. package/template/apps/asas-tanstack/src/components.ts +35 -0
  135. package/template/apps/asas-tanstack/src/copy.ts +1207 -0
  136. package/template/apps/asas-tanstack/src/first-run.ts +16 -0
  137. package/template/apps/asas-tanstack/src/hooks/use-mobile.ts +19 -0
  138. package/template/apps/asas-tanstack/src/lib/utils.ts +6 -0
  139. package/template/apps/asas-tanstack/src/links.ts +38 -0
  140. package/template/apps/asas-tanstack/src/locale-switch.tsx +28 -0
  141. package/template/apps/asas-tanstack/src/no-organization.tsx +108 -0
  142. package/template/apps/asas-tanstack/src/quiet-abort.ts +25 -0
  143. package/template/apps/asas-tanstack/src/redirect.ts +39 -0
  144. package/template/apps/asas-tanstack/src/request-headers.ts +11 -0
  145. package/template/apps/asas-tanstack/src/routeTree.gen.ts +424 -0
  146. package/template/apps/asas-tanstack/src/router.tsx +18 -0
  147. package/template/apps/asas-tanstack/src/routes/(screens)/dashboard/files.ts +11 -0
  148. package/template/apps/asas-tanstack/src/routes/(screens)/dashboard/screen.json +4242 -0
  149. package/template/apps/asas-tanstack/src/routes/(screens)/dashboard/types.ts +160 -0
  150. package/template/apps/asas-tanstack/src/routes/(screens)/dashboard.$.tsx +17 -0
  151. package/template/apps/asas-tanstack/src/routes/(screens)/dashboard.index.tsx +10 -0
  152. package/template/apps/asas-tanstack/src/routes/(screens)/dashboard.tsx +13 -0
  153. package/template/apps/asas-tanstack/src/routes/(screens)/portal/files.ts +9 -0
  154. package/template/apps/asas-tanstack/src/routes/(screens)/portal/screen.json +1564 -0
  155. package/template/apps/asas-tanstack/src/routes/(screens)/portal/types.ts +94 -0
  156. package/template/apps/asas-tanstack/src/routes/(screens)/portal.$.tsx +17 -0
  157. package/template/apps/asas-tanstack/src/routes/(screens)/portal.index.tsx +10 -0
  158. package/template/apps/asas-tanstack/src/routes/(screens)/portal.tsx +13 -0
  159. package/template/apps/asas-tanstack/src/routes/__root.tsx +99 -0
  160. package/template/apps/asas-tanstack/src/routes/api/$.ts +11 -0
  161. package/template/apps/asas-tanstack/src/routes/auth.accept-invitation.tsx +108 -0
  162. package/template/apps/asas-tanstack/src/routes/auth.first-run.tsx +114 -0
  163. package/template/apps/asas-tanstack/src/routes/auth.forgot-password.tsx +94 -0
  164. package/template/apps/asas-tanstack/src/routes/auth.handoff.ts +39 -0
  165. package/template/apps/asas-tanstack/src/routes/auth.reset-password.tsx +16 -0
  166. package/template/apps/asas-tanstack/src/routes/auth.set-password.tsx +16 -0
  167. package/template/apps/asas-tanstack/src/routes/auth.sign-in.tsx +98 -0
  168. package/template/apps/asas-tanstack/src/routes/auth.sign-up.tsx +143 -0
  169. package/template/apps/asas-tanstack/src/routes/index.tsx +146 -0
  170. package/template/apps/asas-tanstack/src/routes/unauthorized.tsx +134 -0
  171. package/template/apps/asas-tanstack/src/screen-form.tsx +36 -0
  172. package/template/apps/asas-tanstack/src/screen-list.tsx +140 -0
  173. package/template/apps/asas-tanstack/src/screen-names.ts +10 -0
  174. package/template/apps/asas-tanstack/src/screens.tsx +888 -0
  175. package/template/apps/asas-tanstack/src/server.ts +26 -0
  176. package/template/apps/asas-tanstack/src/slide.ts +22 -0
  177. package/template/apps/asas-tanstack/src/start.ts +57 -0
  178. package/template/apps/asas-tanstack/src/styles.css +163 -0
  179. package/template/apps/asas-tanstack/src/theme.ts +5 -0
  180. package/template/apps/asas-tanstack/tsconfig.json +19 -0
  181. package/template/apps/asas-tanstack/vite.config.ts +34 -0
  182. package/template/package.json +16 -0
  183. package/template/templates/asas/.claude/skills/add-field/SKILL.md +27 -0
  184. package/template/templates/asas/.claude/skills/add-kayan/SKILL.md +26 -0
  185. package/template/templates/asas/.claude/skills/eject-admin-piece/SKILL.md +28 -0
  186. package/template/templates/asas/.claude/skills/upgrade-mithaq/SKILL.md +35 -0
  187. package/template/templates/asas/.env.example +33 -0
  188. package/template/templates/asas/AGENTS.md +101 -0
  189. package/template/templates/asas/CLAUDE.md +1 -0
  190. package/template/templates/asas/README.md +1056 -0
  191. package/template/templates/asas/mithaq.hints.json +25 -0
  192. package/template/templates/asas/package.json +53 -0
  193. package/template/templates/asas/src/asas.ts +118 -0
  194. package/template/templates/asas/src/backoffice-http.ts +117 -0
  195. package/template/templates/asas/src/dev-setup.ts +112 -0
  196. package/template/templates/asas/src/local-database.ts +22 -0
  197. package/template/templates/asas/src/messages/account.json +132 -0
  198. package/template/templates/asas/src/messages/auditLog.json +304 -0
  199. package/template/templates/asas/src/messages/backofficeLog.json +132 -0
  200. package/template/templates/asas/src/messages/courses.json +312 -0
  201. package/template/templates/asas/src/messages/enrollments.json +60 -0
  202. package/template/templates/asas/src/messages/invitation.json +82 -0
  203. package/template/templates/asas/src/messages/localUsers.json +48 -0
  204. package/template/templates/asas/src/messages/media.json +76 -0
  205. package/template/templates/asas/src/messages/member.json +62 -0
  206. package/template/templates/asas/src/messages/memberRoles.json +48 -0
  207. package/template/templates/asas/src/messages/mithaq.json +214 -0
  208. package/template/templates/asas/src/messages/organization.json +72 -0
  209. package/template/templates/asas/src/messages/organizationRole.json +62 -0
  210. package/template/templates/asas/src/messages/roles.json +72 -0
  211. package/template/templates/asas/src/messages/session.json +102 -0
  212. package/template/templates/asas/src/messages/sessions.json +136 -0
  213. package/template/templates/asas/src/messages/settings.json +64 -0
  214. package/template/templates/asas/src/messages/tags.json +48 -0
  215. package/template/templates/asas/src/messages/user.json +112 -0
  216. package/template/templates/asas/src/messages/verification.json +62 -0
  217. package/template/templates/asas/src/migrations/20260920080701_parched_tombstone/migration.sql +177 -0
  218. package/template/templates/asas/src/migrations/20260920080701_parched_tombstone/snapshot.json +2169 -0
  219. package/template/templates/asas/src/migrations/20260920230505_zippy_ben_urich/migration.sql +1 -0
  220. package/template/templates/asas/src/migrations/20260920230505_zippy_ben_urich/snapshot.json +2182 -0
  221. package/template/templates/asas/src/migrations/20260920231219_slim_retro_girl/migration.sql +20 -0
  222. package/template/templates/asas/src/migrations/20260920231219_slim_retro_girl/snapshot.json +2409 -0
  223. package/template/templates/asas/src/migrations/20260922082945_military_ironclad/migration.sql +15 -0
  224. package/template/templates/asas/src/migrations/20260922082945_military_ironclad/snapshot.json +2627 -0
  225. package/template/templates/asas/src/migrations/20260922112630_bitter_chat/migration.sql +5 -0
  226. package/template/templates/asas/src/migrations/20260922112630_bitter_chat/snapshot.json +2691 -0
  227. package/template/templates/asas/src/migrations/20260923235915_foamy_rachel_grey/migration.sql +8 -0
  228. package/template/templates/asas/src/migrations/20260923235915_foamy_rachel_grey/snapshot.json +2795 -0
  229. package/template/templates/asas/src/migrations/20260926145709_clean_the_initiative/migration.sql +3 -0
  230. package/template/templates/asas/src/migrations/20260926145709_clean_the_initiative/snapshot.json +2834 -0
  231. package/template/templates/asas/src/migrations/20260927212525_bent_prowler/migration.sql +9 -0
  232. package/template/templates/asas/src/migrations/20260927212525_bent_prowler/snapshot.json +2870 -0
  233. package/template/templates/asas/src/migrations/20260927223441_tranquil_bromley/migration.sql +1 -0
  234. package/template/templates/asas/src/migrations/20260927223441_tranquil_bromley/snapshot.json +2881 -0
  235. package/template/templates/asas/src/migrations/20260928030047_outgoing_wraith/migration.sql +15 -0
  236. package/template/templates/asas/src/migrations/20260928030047_outgoing_wraith/snapshot.json +3073 -0
  237. package/template/templates/asas/src/migrations/20260929024407_grey_morlun/migration.sql +21 -0
  238. package/template/templates/asas/src/migrations/20260929024407_grey_morlun/snapshot.json +3098 -0
  239. package/template/templates/asas/src/migrations/20260929130530_bored_jackal/migration.sql +21 -0
  240. package/template/templates/asas/src/migrations/20260929130530_bored_jackal/snapshot.json +3124 -0
  241. package/template/templates/asas/src/migrations/20260930102924_material_newton_destine/migration.sql +32 -0
  242. package/template/templates/asas/src/migrations/20260930102924_material_newton_destine/snapshot.json +3324 -0
  243. package/template/templates/asas/src/migrations/20261003022353_clumsy_taskmaster/migration.sql +2 -0
  244. package/template/templates/asas/src/migrations/20261003022353_clumsy_taskmaster/snapshot.json +3350 -0
  245. package/template/templates/asas/src/migrations/20261003143249_premium_red_shift/migration.sql +21 -0
  246. package/template/templates/asas/src/migrations/20261003143249_premium_red_shift/snapshot.json +3635 -0
  247. package/template/templates/asas/src/migrations/20261008215349_square_norrin_radd/migration.sql +8 -0
  248. package/template/templates/asas/src/migrations/20261008215349_square_norrin_radd/snapshot.json +3635 -0
  249. package/template/templates/asas/src/migrations/20261008230204_many_scarecrow/migration.sql +18 -0
  250. package/template/templates/asas/src/migrations/20261008230204_many_scarecrow/snapshot.json +3635 -0
  251. package/template/templates/asas/src/migrations/20261010005521_elite_giant_girl/migration.sql +18 -0
  252. package/template/templates/asas/src/migrations/20261010005521_elite_giant_girl/snapshot.json +3635 -0
  253. package/template/templates/asas/src/migrations/20261010120822_needy_thunderbolt/migration.sql +11 -0
  254. package/template/templates/asas/src/migrations/20261010120822_needy_thunderbolt/snapshot.json +3667 -0
  255. package/template/templates/asas/src/migrations/20261012000752_organization_ownership/migration.sql +48 -0
  256. package/template/templates/asas/src/migrations/20261012000752_organization_ownership/snapshot.json +3891 -0
  257. package/template/templates/asas/src/migrations/20261014221355_tags_restrict/migration.sql +1 -0
  258. package/template/templates/asas/src/migrations/20261014221355_tags_restrict/snapshot.json +3881 -0
  259. package/template/templates/asas/src/migrations/20261014222218_one_seat_per_session/migration.sql +1 -0
  260. package/template/templates/asas/src/migrations/20261014222218_one_seat_per_session/snapshot.json +3894 -0
  261. package/template/templates/asas/src/migrations/20261014223522_session_archive_reason/migration.sql +1 -0
  262. package/template/templates/asas/src/migrations/20261014223522_session_archive_reason/snapshot.json +3907 -0
  263. package/template/templates/asas/src/migrations/20261014225728_course_archive_by_operation/migration.sql +1 -0
  264. package/template/templates/asas/src/migrations/20261014225728_course_archive_by_operation/snapshot.json +3907 -0
  265. package/template/templates/asas/src/migrations/20261015042444_organization_names/migration.sql +1 -0
  266. package/template/templates/asas/src/migrations/20261015042444_organization_names/snapshot.json +3920 -0
  267. package/template/templates/asas/src/migrations/20261015053212_member_last_seen/migration.sql +1 -0
  268. package/template/templates/asas/src/migrations/20261015053212_member_last_seen/snapshot.json +3933 -0
  269. package/template/templates/asas/src/migrations/20261015093203_activity_and_staff_history/migration.sql +15 -0
  270. package/template/templates/asas/src/migrations/20261015093203_activity_and_staff_history/snapshot.json +4113 -0
  271. package/template/templates/asas/src/migrations/20261015095752_portal/migration.sql +2 -0
  272. package/template/templates/asas/src/migrations/20261015095752_portal/snapshot.json +4113 -0
  273. package/template/templates/asas/src/migrations/20261015135529_better_auth_indexes/migration.sql +9 -0
  274. package/template/templates/asas/src/migrations/20261015135529_better_auth_indexes/snapshot.json +4302 -0
  275. package/template/templates/asas/src/migrations/20261015162438_audit_changes_json/migration.sql +27 -0
  276. package/template/templates/asas/src/migrations/20261015162438_audit_changes_json/snapshot.json +4289 -0
  277. package/template/templates/asas/src/migrations/drizzle.config.ts +11 -0
  278. package/template/templates/asas/src/migrations/schema.ts +30 -0
  279. package/template/templates/asas/src/mithaq.ts +4 -0
  280. package/template/templates/asas/src/organizations.ts +3 -0
  281. package/template/templates/asas/src/seed.ts +427 -0
  282. package/template/templates/asas/src/ui-backoffice/home.tsx +63 -0
  283. package/template/templates/asas/src/ui-backoffice/organization-actions.tsx +121 -0
  284. package/template/templates/asas/src/ui-backoffice/record-page.tsx +30 -0
  285. package/template/templates/asas/src/ui-backoffice/role-cells.tsx +59 -0
  286. package/template/templates/asas/src/ui-backoffice/user-actions.tsx +249 -0
  287. package/template/templates/asas/src/ui-dashboard/dashboard.tsx +300 -0
  288. package/template/templates/asas/src/ui-dashboard/home.tsx +73 -0
  289. package/template/templates/asas/src/ui-dashboard/members-card.tsx +147 -0
  290. package/template/templates/asas/src/ui-dashboard/members.tsx +829 -0
  291. package/template/templates/asas/src/ui-dashboard/theme-provider.tsx +10 -0
  292. package/template/templates/asas/src/ui-dashboard/versions.tsx +446 -0
  293. package/template/templates/asas/src/ui-portal/courses-home.tsx +96 -0
  294. package/template/templates/asas/src/ui-portal/home.tsx +73 -0
  295. package/template/templates/asas/src/ui-portal/page.tsx +11 -0
  296. package/template/templates/features/audit-log/audit-log/audit-log.ts +284 -0
  297. package/template/templates/features/audit-log/backoffice-log/backoffice-log.ts +67 -0
  298. package/template/templates/features/audit-log/index.ts +4 -0
  299. package/template/templates/features/audit-log/package.json +13 -0
  300. package/template/templates/features/auth/index.ts +11 -0
  301. package/template/templates/features/auth/local-users/local-users.ts +143 -0
  302. package/template/templates/features/auth/package.json +13 -0
  303. package/template/templates/features/auth/user/account.access.ts +8 -0
  304. package/template/templates/features/auth/user/account.ts +31 -0
  305. package/template/templates/features/auth/user/index.ts +18 -0
  306. package/template/templates/features/auth/user/invitation.access.ts +4 -0
  307. package/template/templates/features/auth/user/invitation.ts +27 -0
  308. package/template/templates/features/auth/user/member.access.ts +10 -0
  309. package/template/templates/features/auth/user/member.screens.ts +37 -0
  310. package/template/templates/features/auth/user/member.ts +26 -0
  311. package/template/templates/features/auth/user/organization.access.ts +20 -0
  312. package/template/templates/features/auth/user/organization.screens.ts +37 -0
  313. package/template/templates/features/auth/user/organization.ts +25 -0
  314. package/template/templates/features/auth/user/organizationRole.access.ts +8 -0
  315. package/template/templates/features/auth/user/organizationRole.ts +25 -0
  316. package/template/templates/features/auth/user/session.access.ts +8 -0
  317. package/template/templates/features/auth/user/session.ts +28 -0
  318. package/template/templates/features/auth/user/user.access.ts +30 -0
  319. package/template/templates/features/auth/user/user.screens.ts +45 -0
  320. package/template/templates/features/auth/user/user.ts +31 -0
  321. package/template/templates/features/auth/user/verification.access.ts +8 -0
  322. package/template/templates/features/auth/user/verification.ts +23 -0
  323. package/template/templates/features/courses/courses/courses.ts +601 -0
  324. package/template/templates/features/courses/courses/cover-reads.ts +33 -0
  325. package/template/templates/features/courses/courses/ui/archived-badge.tsx +9 -0
  326. package/template/templates/features/courses/courses/ui/fee-cell.tsx +19 -0
  327. package/template/templates/features/courses/courses/ui/no-courses.tsx +13 -0
  328. package/template/templates/features/courses/courses/ui/status-cell.tsx +33 -0
  329. package/template/templates/features/courses/courses/ui/unpublish-button.tsx +15 -0
  330. package/template/templates/features/courses/domain/archive.ts +39 -0
  331. package/template/templates/features/courses/domain/on-offer.ts +6 -0
  332. package/template/templates/features/courses/enrollments/enrollments.ts +309 -0
  333. package/template/templates/features/courses/enrollments/ui/session-cell.tsx +75 -0
  334. package/template/templates/features/courses/enrollments/ui/session-labels.tsx +36 -0
  335. package/template/templates/features/courses/index.ts +8 -0
  336. package/template/templates/features/courses/package.json +24 -0
  337. package/template/templates/features/courses/portal/ui/catalogue.tsx +86 -0
  338. package/template/templates/features/courses/portal/ui/course.tsx +176 -0
  339. package/template/templates/features/courses/portal/ui/enrollments.tsx +170 -0
  340. package/template/templates/features/courses/portal/ui/parts.tsx +95 -0
  341. package/template/templates/features/courses/portal/ui/reads.ts +76 -0
  342. package/template/templates/features/courses/portal/ui/rules.ts +87 -0
  343. package/template/templates/features/courses/portal/ui/shell.tsx +194 -0
  344. package/template/templates/features/courses/sessions/seats.ts +42 -0
  345. package/template/templates/features/courses/sessions/sessions.ts +186 -0
  346. package/template/templates/features/media/index.ts +10 -0
  347. package/template/templates/features/media/media/media.ts +131 -0
  348. package/template/templates/features/media/media/ui/preview.tsx +143 -0
  349. package/template/templates/features/media/package.json +19 -0
  350. package/template/templates/features/roles/index.ts +4 -0
  351. package/template/templates/features/roles/member-roles/member-roles.ts +207 -0
  352. package/template/templates/features/roles/package.json +21 -0
  353. package/template/templates/features/roles/roles/roles.ts +184 -0
  354. package/template/templates/features/roles/roles/ui/role-form.tsx +267 -0
  355. package/template/templates/features/roles/roles/ui/roles.tsx +190 -0
  356. package/template/templates/features/settings/index.ts +3 -0
  357. package/template/templates/features/settings/package.json +13 -0
  358. package/template/templates/features/settings/settings/settings.ts +64 -0
  359. package/template/templates/features/tags/index.ts +3 -0
  360. package/template/templates/features/tags/package.json +14 -0
  361. package/template/templates/features/tags/tags/tags.ts +80 -0
  362. package/template/templates/mithaq/components.json +22 -0
  363. package/template/templates/mithaq/package.json +33 -0
  364. package/template/templates/mithaq/src/mail/index.ts +32 -0
  365. package/template/templates/mithaq/src/mail/mailers.ts +36 -0
  366. package/template/templates/mithaq/src/mithaq/audit-sink.ts +111 -0
  367. package/template/templates/mithaq/src/mithaq/auth/backoffice-roles.ts +108 -0
  368. package/template/templates/mithaq/src/mithaq/auth/index.ts +1859 -0
  369. package/template/templates/mithaq/src/mithaq/auth/organizations.ts +80 -0
  370. package/template/templates/mithaq/src/mithaq/pages.ts +83 -0
  371. package/template/templates/mithaq/src/mithaq/rich-text-nodes.ts +19 -0
  372. package/template/templates/mithaq/src/mithaq.ts +593 -0
  373. package/template/templates/mithaq/src/roles/default-member-roles.ts +29 -0
  374. package/template/templates/mithaq/src/roles/grants.ts +47 -0
  375. package/template/templates/mithaq/src/roles/member-access.ts +11 -0
  376. package/template/templates/mithaq/src/roles/statements.ts +13 -0
  377. package/template/templates/mithaq/src/roles/system-roles.ts +16 -0
  378. package/template/templates/mithaq/src/roles/tenant-access.ts +260 -0
  379. package/template/templates/mithaq/src/roles/tenant-roles.ts +321 -0
  380. package/template/templates/mithaq/src/steps/expected-updated-at.ts +41 -0
  381. package/template/templates/mithaq/src/storage/defaults.ts +156 -0
  382. package/template/templates/mithaq/src/storage/index.ts +97 -0
  383. package/template/templates/mithaq/src/storage/local.ts +143 -0
  384. package/template/templates/mithaq/src/storage/r2.ts +5 -0
  385. package/template/templates/mithaq/src/storage/s3.ts +91 -0
  386. package/template/templates/mithaq/src/storage/uploadthing.ts +59 -0
  387. package/template/templates/mithaq/src/ui/activity-page.tsx +33 -0
  388. package/template/templates/mithaq/src/ui/activity.tsx +527 -0
  389. package/template/templates/mithaq/src/ui/app-shell.tsx +268 -0
  390. package/template/templates/mithaq/src/ui/kpi-card.tsx +25 -0
  391. package/template/templates/mithaq/src/ui/record-page.tsx +50 -0
  392. package/template/templates/mithaq/src/ui/rich-text-nodes.tsx +33 -0
  393. package/template/templates/mithaq/src/ui/screen-nav.tsx +28 -0
  394. package/template/templates/mithaq/src/ui/table-page.tsx +9 -0
  395. package/template/templates/mithaq/src/ui/top-shell.tsx +60 -0
  396. package/README.md +0 -3
@@ -0,0 +1,4242 @@
1
+ {
2
+ "path": "/dashboard",
3
+ "providers": [
4
+ "./src/ui-dashboard/theme-provider.tsx#ThemeProvider",
5
+ "@asas/mithaq:./src/ui/rich-text-nodes.tsx#RichTextNodes",
6
+ "@asas/courses:./enrollments/ui/session-labels.tsx#SessionLabels"
7
+ ],
8
+ "pages": {
9
+ "dashboard": {
10
+ "path": "/",
11
+ "component": "./src/ui-dashboard/dashboard.tsx#Dashboard",
12
+ "permission": "courses.find"
13
+ },
14
+ "members": {
15
+ "path": "/members",
16
+ "component": "./src/ui-dashboard/members.tsx#Members",
17
+ "nav": {
18
+ "label": {
19
+ "en": "Members",
20
+ "ar": "الأعضاء"
21
+ }
22
+ },
23
+ "permission": "member.find"
24
+ },
25
+ "activity": {
26
+ "path": "/activity",
27
+ "component": "@asas/mithaq:./src/ui/activity-page.tsx#ActivityPage",
28
+ "nav": {
29
+ "label": {
30
+ "en": "Activity",
31
+ "ar": "النشاط"
32
+ }
33
+ },
34
+ "permission": "auditLog.find"
35
+ }
36
+ },
37
+ "nav": [
38
+ {
39
+ "path": "/courses",
40
+ "page": "list",
41
+ "kayan": "courses",
42
+ "permission": "courses.find"
43
+ },
44
+ {
45
+ "path": "/sessions",
46
+ "page": "list",
47
+ "kayan": "sessions",
48
+ "permission": "sessions.find"
49
+ },
50
+ {
51
+ "path": "/enrollments",
52
+ "page": "list",
53
+ "kayan": "enrollments",
54
+ "permission": "enrollments.find"
55
+ },
56
+ {
57
+ "path": "/tags",
58
+ "page": "list",
59
+ "kayan": "tags",
60
+ "permission": "tags.find"
61
+ },
62
+ {
63
+ "path": "/media",
64
+ "page": "list",
65
+ "kayan": "media",
66
+ "permission": "media.find"
67
+ },
68
+ {
69
+ "path": "/roles",
70
+ "page": "list",
71
+ "kayan": "roles",
72
+ "permission": "roles.find"
73
+ },
74
+ {
75
+ "path": "/settings",
76
+ "page": "settings",
77
+ "kayan": "settings",
78
+ "permission": "settings.findOne"
79
+ },
80
+ {
81
+ "path": "/members",
82
+ "page": "members",
83
+ "label": {
84
+ "en": "Members",
85
+ "ar": "الأعضاء"
86
+ },
87
+ "permission": "member.find"
88
+ },
89
+ {
90
+ "path": "/activity",
91
+ "page": "activity",
92
+ "label": {
93
+ "en": "Activity",
94
+ "ar": "النشاط"
95
+ },
96
+ "permission": "auditLog.find"
97
+ }
98
+ ],
99
+ "layouts": {
100
+ "app": "@asas/mithaq:./src/ui/app-shell.tsx#AppShell",
101
+ "record": "@asas/mithaq:./src/ui/record-page.tsx#RecordPage",
102
+ "table": "@asas/mithaq:./src/ui/table-page.tsx#TablePage",
103
+ "top": "@asas/mithaq:./src/ui/top-shell.tsx#TopShell"
104
+ },
105
+ "components": {
106
+ "activity": "@asas/mithaq:./src/ui/activity.tsx#Activity",
107
+ "activityLog": "@asas/mithaq:./src/ui/activity.tsx#ActivityTab",
108
+ "versions": "./src/ui-dashboard/versions.tsx#Versions"
109
+ },
110
+ "controls": {
111
+ "text": {
112
+ "control": "text",
113
+ "cell": "text"
114
+ },
115
+ "email": {
116
+ "control": "email",
117
+ "cell": "email"
118
+ },
119
+ "number": {
120
+ "control": "number",
121
+ "cell": "number"
122
+ },
123
+ "integer": {
124
+ "control": "integer",
125
+ "cell": "integer"
126
+ },
127
+ "decimal": {
128
+ "control": "decimal",
129
+ "cell": "decimal"
130
+ },
131
+ "checkbox": {
132
+ "control": "checkbox",
133
+ "cell": "checkbox"
134
+ },
135
+ "datetime": {
136
+ "control": "datetime",
137
+ "cell": "datetime"
138
+ },
139
+ "date": {
140
+ "control": "date",
141
+ "cell": "date"
142
+ },
143
+ "textArray": {
144
+ "control": "textArray",
145
+ "cell": "textArray"
146
+ },
147
+ "uuid": {
148
+ "control": "uuid",
149
+ "cell": "uuid"
150
+ },
151
+ "relationship": {
152
+ "control": "relationship",
153
+ "cell": "relationship"
154
+ },
155
+ "json": {
156
+ "control": "json",
157
+ "cell": "json"
158
+ },
159
+ "join": {
160
+ "control": "join",
161
+ "cell": "join"
162
+ },
163
+ "richText": {
164
+ "control": "richText",
165
+ "cell": "richText"
166
+ },
167
+ "upload": {
168
+ "control": "upload",
169
+ "cell": "upload"
170
+ }
171
+ },
172
+ "kayan": {
173
+ "courses": {
174
+ "name": "courses",
175
+ "single": false,
176
+ "fields": [
177
+ {
178
+ "name": "id",
179
+ "kind": "uuid",
180
+ "label": {
181
+ "en": "ID",
182
+ "ar": "المعرف"
183
+ },
184
+ "rules": {
185
+ "required": false
186
+ },
187
+ "component": "uuid",
188
+ "cell": "uuid"
189
+ },
190
+ {
191
+ "name": "updatedAt",
192
+ "kind": "datetime",
193
+ "label": {
194
+ "en": "Updated at",
195
+ "ar": "تاريخ التعديل"
196
+ },
197
+ "rules": {
198
+ "required": true,
199
+ "defaultNow": true,
200
+ "nowOnUpdate": true,
201
+ "providedBy": {
202
+ "create": "application",
203
+ "update": "application"
204
+ }
205
+ },
206
+ "component": "datetime",
207
+ "cell": "datetime"
208
+ },
209
+ {
210
+ "name": "createdAt",
211
+ "kind": "datetime",
212
+ "label": {
213
+ "en": "Created at",
214
+ "ar": "تاريخ الإنشاء"
215
+ },
216
+ "rules": {
217
+ "required": true,
218
+ "defaultNow": true,
219
+ "index": true,
220
+ "providedBy": {
221
+ "create": "application",
222
+ "update": "application"
223
+ }
224
+ },
225
+ "component": "datetime",
226
+ "cell": "datetime"
227
+ },
228
+ {
229
+ "name": "organization",
230
+ "kind": "relationship",
231
+ "label": {
232
+ "en": "Organization",
233
+ "ar": "المؤسسة"
234
+ },
235
+ "rules": {
236
+ "required": true,
237
+ "index": true,
238
+ "providedBy": {
239
+ "create": "application",
240
+ "update": "never"
241
+ },
242
+ "onDelete": "restrict"
243
+ },
244
+ "relationTo": "organization",
245
+ "component": "relationship",
246
+ "cell": "relationship"
247
+ },
248
+ {
249
+ "name": "title",
250
+ "kind": "text",
251
+ "label": {
252
+ "en": "Title",
253
+ "ar": "العنوان"
254
+ },
255
+ "rules": {
256
+ "required": true,
257
+ "trim": true,
258
+ "maxLength": 120,
259
+ "index": true
260
+ },
261
+ "placeholder": {
262
+ "en": "Introduction to Arabic calligraphy",
263
+ "ar": "مقدمة في الخط العربي"
264
+ },
265
+ "prefix": {
266
+ "en": "Course",
267
+ "ar": "دورة"
268
+ },
269
+ "description": {
270
+ "en": "The name a student sees in the catalogue.",
271
+ "ar": "الاسم الذي يراه الطالب في الدليل."
272
+ },
273
+ "component": "text",
274
+ "cell": "text",
275
+ "filter": true,
276
+ "searchable": true
277
+ },
278
+ {
279
+ "name": "summary",
280
+ "kind": "text",
281
+ "label": {
282
+ "en": "Summary",
283
+ "ar": "الملخص"
284
+ },
285
+ "rules": {
286
+ "maxLength": 200,
287
+ "required": false
288
+ },
289
+ "component": "text",
290
+ "cell": "text",
291
+ "searchable": true,
292
+ "sortable": false
293
+ },
294
+ {
295
+ "name": "fee",
296
+ "kind": "number",
297
+ "label": {
298
+ "en": "Fee",
299
+ "ar": "الرسوم"
300
+ },
301
+ "rules": {
302
+ "required": false
303
+ },
304
+ "suffix": {
305
+ "en": "per seat",
306
+ "ar": "لكل مقعد"
307
+ },
308
+ "component": "number",
309
+ "cell": "@asas/courses:./courses/ui/fee-cell.tsx#FeeCell",
310
+ "filter": true
311
+ },
312
+ {
313
+ "name": "currency",
314
+ "kind": "text",
315
+ "label": {
316
+ "en": "Currency",
317
+ "ar": "العملة"
318
+ },
319
+ "rules": {
320
+ "required": false
321
+ },
322
+ "options": [
323
+ {
324
+ "value": "SAR",
325
+ "label": {
326
+ "en": "Saudi riyal",
327
+ "ar": "ريال سعودي"
328
+ }
329
+ },
330
+ {
331
+ "value": "USD",
332
+ "label": {
333
+ "en": "US dollar",
334
+ "ar": "دولار أمريكي"
335
+ }
336
+ }
337
+ ],
338
+ "component": "select",
339
+ "cell": "text"
340
+ },
341
+ {
342
+ "name": "level",
343
+ "kind": "number",
344
+ "label": {
345
+ "en": "Level",
346
+ "ar": "المستوى"
347
+ },
348
+ "rules": {
349
+ "min": 1,
350
+ "max": 5,
351
+ "required": false
352
+ },
353
+ "component": "slider",
354
+ "cell": "number"
355
+ },
356
+ {
357
+ "name": "notifications",
358
+ "kind": "checkbox",
359
+ "label": {
360
+ "en": "Notifications",
361
+ "ar": "الإشعارات"
362
+ },
363
+ "rules": {
364
+ "required": false
365
+ },
366
+ "component": "switch",
367
+ "cell": "checkbox"
368
+ },
369
+ {
370
+ "name": "delivery",
371
+ "kind": "text",
372
+ "label": {
373
+ "en": "Delivery",
374
+ "ar": "طريقة التقديم"
375
+ },
376
+ "rules": {
377
+ "required": false
378
+ },
379
+ "options": [
380
+ {
381
+ "value": "live",
382
+ "label": {
383
+ "en": "Live",
384
+ "ar": "مباشر"
385
+ }
386
+ },
387
+ {
388
+ "value": "recorded",
389
+ "label": {
390
+ "en": "Recorded",
391
+ "ar": "مسجل"
392
+ }
393
+ }
394
+ ],
395
+ "component": "radio",
396
+ "cell": "text"
397
+ },
398
+ {
399
+ "name": "audience",
400
+ "kind": "text",
401
+ "label": {
402
+ "en": "Audience",
403
+ "ar": "الجمهور"
404
+ },
405
+ "rules": {
406
+ "required": false
407
+ },
408
+ "options": [
409
+ {
410
+ "value": "beginner",
411
+ "label": {
412
+ "en": "Beginner",
413
+ "ar": "مبتدئ"
414
+ }
415
+ },
416
+ {
417
+ "value": "advanced",
418
+ "label": {
419
+ "en": "Advanced",
420
+ "ar": "متقدم"
421
+ }
422
+ }
423
+ ],
424
+ "component": "toggleGroup",
425
+ "cell": "text"
426
+ },
427
+ {
428
+ "name": "accessCode",
429
+ "kind": "text",
430
+ "label": {
431
+ "en": "Access code",
432
+ "ar": "رمز الدخول"
433
+ },
434
+ "rules": {
435
+ "maxLength": 6,
436
+ "required": false
437
+ },
438
+ "component": "otp",
439
+ "cell": "text"
440
+ },
441
+ {
442
+ "name": "archived",
443
+ "kind": "checkbox",
444
+ "label": {
445
+ "en": "Archived",
446
+ "ar": "مؤرشف"
447
+ },
448
+ "rules": {
449
+ "providedBy": {
450
+ "create": "never",
451
+ "update": "application"
452
+ },
453
+ "required": false
454
+ },
455
+ "component": "checkbox",
456
+ "cell": "checkbox",
457
+ "filter": true
458
+ },
459
+ {
460
+ "name": "topics",
461
+ "kind": "textArray",
462
+ "label": {
463
+ "en": "Topics",
464
+ "ar": "المواضيع"
465
+ },
466
+ "rules": {
467
+ "maxRows": 2,
468
+ "required": false
469
+ },
470
+ "options": [
471
+ {
472
+ "value": "script",
473
+ "label": {
474
+ "en": "Script",
475
+ "ar": "الخط"
476
+ }
477
+ },
478
+ {
479
+ "value": "grammar",
480
+ "label": {
481
+ "en": "Grammar",
482
+ "ar": "النحو"
483
+ }
484
+ },
485
+ {
486
+ "value": "recitation",
487
+ "label": {
488
+ "en": "Recitation",
489
+ "ar": "التلاوة"
490
+ }
491
+ }
492
+ ],
493
+ "component": "textArray",
494
+ "cell": "textArray"
495
+ },
496
+ {
497
+ "name": "opensOn",
498
+ "kind": "date",
499
+ "label": {
500
+ "en": "Opens on",
501
+ "ar": "يفتح في"
502
+ },
503
+ "rules": {
504
+ "required": false
505
+ },
506
+ "component": "date",
507
+ "cell": "date"
508
+ },
509
+ {
510
+ "name": "archiveReason",
511
+ "kind": "text",
512
+ "label": {
513
+ "en": "Archive reason",
514
+ "ar": "سبب الأرشفة"
515
+ },
516
+ "rules": {
517
+ "maxLength": 200,
518
+ "providedBy": {
519
+ "create": "never",
520
+ "update": "application"
521
+ },
522
+ "required": false
523
+ },
524
+ "component": "text",
525
+ "cell": "text"
526
+ },
527
+ {
528
+ "name": "tags",
529
+ "kind": "relationship",
530
+ "label": {
531
+ "en": "Tags",
532
+ "ar": "الوسوم"
533
+ },
534
+ "rules": {
535
+ "required": false,
536
+ "onDelete": "restrict"
537
+ },
538
+ "relationTo": "tags",
539
+ "hasMany": true,
540
+ "component": "relationship",
541
+ "cell": "relationship"
542
+ },
543
+ {
544
+ "name": "scheduledSessions",
545
+ "kind": "join",
546
+ "label": {
547
+ "en": "Scheduled sessions",
548
+ "ar": "الجلسات المجدولة"
549
+ },
550
+ "rules": {
551
+ "required": false,
552
+ "providedBy": {
553
+ "create": "never",
554
+ "update": "never"
555
+ }
556
+ },
557
+ "relationTo": "sessions",
558
+ "on": "course",
559
+ "component": "join",
560
+ "cell": "join"
561
+ },
562
+ {
563
+ "name": "_status",
564
+ "kind": "text",
565
+ "label": {
566
+ "en": "Status",
567
+ "ar": "الحالة"
568
+ },
569
+ "rules": {
570
+ "index": true,
571
+ "required": false
572
+ },
573
+ "options": [
574
+ {
575
+ "value": "draft",
576
+ "label": {
577
+ "en": "Draft",
578
+ "ar": "مسودة"
579
+ }
580
+ },
581
+ {
582
+ "value": "published",
583
+ "label": {
584
+ "en": "Published",
585
+ "ar": "منشور"
586
+ }
587
+ }
588
+ ],
589
+ "component": "text",
590
+ "cell": "@asas/courses:./courses/ui/status-cell.tsx#StatusCell"
591
+ },
592
+ {
593
+ "name": "details",
594
+ "kind": "richText",
595
+ "label": {
596
+ "en": "Details",
597
+ "ar": "التفاصيل"
598
+ },
599
+ "rules": {
600
+ "required": false
601
+ },
602
+ "component": "richText",
603
+ "cell": "richText",
604
+ "sortable": false
605
+ },
606
+ {
607
+ "name": "cover",
608
+ "kind": "upload",
609
+ "label": {
610
+ "en": "Cover image",
611
+ "ar": "صورة الغلاف"
612
+ },
613
+ "rules": {
614
+ "required": false,
615
+ "onDelete": "restrict"
616
+ },
617
+ "relationTo": "media",
618
+ "component": "upload",
619
+ "cell": "upload"
620
+ },
621
+ {
622
+ "name": "selfEnroll",
623
+ "kind": "checkbox",
624
+ "label": {
625
+ "en": "Students may enroll themselves",
626
+ "ar": "يسجّل الطلاب أنفسهم"
627
+ },
628
+ "rules": {
629
+ "required": false
630
+ },
631
+ "component": "checkbox",
632
+ "cell": "checkbox"
633
+ }
634
+ ],
635
+ "operations": [
636
+ {
637
+ "name": "create",
638
+ "effect": "create"
639
+ },
640
+ {
641
+ "name": "update",
642
+ "effect": "update"
643
+ },
644
+ {
645
+ "name": "delete",
646
+ "effect": "delete"
647
+ },
648
+ {
649
+ "name": "find",
650
+ "effect": "read"
651
+ },
652
+ {
653
+ "name": "findByID",
654
+ "effect": "read"
655
+ },
656
+ {
657
+ "name": "count",
658
+ "effect": "read"
659
+ },
660
+ {
661
+ "name": "updateMany",
662
+ "effect": "update",
663
+ "updatesMany": true
664
+ },
665
+ {
666
+ "name": "deleteMany",
667
+ "effect": "delete"
668
+ },
669
+ {
670
+ "name": "findVersions",
671
+ "effect": "read"
672
+ },
673
+ {
674
+ "name": "findVersionByID",
675
+ "effect": "read"
676
+ },
677
+ {
678
+ "name": "restoreVersion",
679
+ "effect": "update"
680
+ },
681
+ {
682
+ "name": "archive",
683
+ "effect": "update",
684
+ "fields": [
685
+ {
686
+ "name": "reason",
687
+ "kind": "text",
688
+ "label": {
689
+ "en": "Reason",
690
+ "ar": "السبب"
691
+ },
692
+ "rules": {
693
+ "required": true,
694
+ "maxLength": 200
695
+ },
696
+ "component": "text",
697
+ "cell": "text"
698
+ }
699
+ ]
700
+ },
701
+ {
702
+ "name": "unarchive",
703
+ "effect": "update",
704
+ "fields": [
705
+ {
706
+ "name": "reason",
707
+ "kind": "text",
708
+ "label": {
709
+ "en": "Reason",
710
+ "ar": "السبب"
711
+ },
712
+ "rules": {
713
+ "required": true,
714
+ "maxLength": 200
715
+ },
716
+ "component": "text",
717
+ "cell": "text"
718
+ }
719
+ ]
720
+ },
721
+ {
722
+ "name": "unpublish",
723
+ "effect": "update"
724
+ },
725
+ {
726
+ "name": "findWithSessions",
727
+ "effect": "read"
728
+ }
729
+ ],
730
+ "useAsTitle": "title",
731
+ "description": {
732
+ "en": "Everything on offer in the catalogue, and what a seat on each costs.",
733
+ "ar": "كل ما هو معروض في الدليل، وما يكلفه مقعد في كل منها."
734
+ },
735
+ "drafts": {
736
+ "autosave": {
737
+ "interval": 2000
738
+ }
739
+ },
740
+ "pages": {
741
+ "list": {
742
+ "path": "/courses",
743
+ "page": {
744
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#AppShell",
745
+ "header": [
746
+ {
747
+ "title": {}
748
+ }
749
+ ],
750
+ "main": [
751
+ {
752
+ "layout": "@asas/mithaq:./src/ui/table-page.tsx#TablePage",
753
+ "main": [
754
+ {
755
+ "list": {
756
+ "columns": [
757
+ {
758
+ "field": "title",
759
+ "cell": "text",
760
+ "decided": "table"
761
+ },
762
+ {
763
+ "field": "fee",
764
+ "cell": "@asas/courses:./courses/ui/fee-cell.tsx#FeeCell",
765
+ "decided": "field"
766
+ },
767
+ {
768
+ "field": "opensOn",
769
+ "cell": "date",
770
+ "decided": "table"
771
+ },
772
+ {
773
+ "field": "_status",
774
+ "cell": "@asas/courses:./courses/ui/status-cell.tsx#StatusCell",
775
+ "decided": "field"
776
+ },
777
+ {
778
+ "field": "details",
779
+ "cell": "richText",
780
+ "decided": "table"
781
+ },
782
+ {
783
+ "field": "cover",
784
+ "cell": "upload",
785
+ "decided": "table"
786
+ }
787
+ ],
788
+ "filters": [
789
+ "title",
790
+ "fee",
791
+ "archived"
792
+ ],
793
+ "search": [
794
+ "title",
795
+ "summary",
796
+ "details"
797
+ ],
798
+ "empty": "@asas/courses:./courses/ui/no-courses.tsx#NoCourses",
799
+ "bulk": [
800
+ {
801
+ "button": "deleteMany",
802
+ "label": {
803
+ "en": "Delete",
804
+ "ar": "حذف"
805
+ },
806
+ "confirm": {
807
+ "title": {
808
+ "en": "Delete the ticked courses?",
809
+ "ar": "حذف الدورات المحددة؟"
810
+ },
811
+ "body": {
812
+ "en": "This cannot be undone.",
813
+ "ar": "لا يمكن التراجع عن هذا."
814
+ }
815
+ }
816
+ },
817
+ {
818
+ "button": "updateMany",
819
+ "label": {
820
+ "en": "Update",
821
+ "ar": "تحديث"
822
+ },
823
+ "fields": [
824
+ "fee",
825
+ "notifications"
826
+ ]
827
+ }
828
+ ],
829
+ "row": [
830
+ {
831
+ "button": "archive",
832
+ "label": {
833
+ "en": "Archive",
834
+ "ar": "أرشفة"
835
+ },
836
+ "fields": [
837
+ "reason"
838
+ ],
839
+ "when": {
840
+ "or": [
841
+ {
842
+ "record.archived": {
843
+ "exists": false
844
+ }
845
+ },
846
+ {
847
+ "record.archived": {
848
+ "equals": false
849
+ }
850
+ }
851
+ ]
852
+ }
853
+ },
854
+ {
855
+ "button": "unarchive",
856
+ "label": {
857
+ "en": "Unarchive",
858
+ "ar": "إلغاء الأرشفة"
859
+ },
860
+ "fields": [
861
+ "reason"
862
+ ],
863
+ "when": {
864
+ "record.archived": {
865
+ "equals": true
866
+ }
867
+ }
868
+ }
869
+ ],
870
+ "tabs": [
871
+ {
872
+ "tab": "active",
873
+ "label": {
874
+ "en": "Active",
875
+ "ar": "النشطة"
876
+ },
877
+ "where": {
878
+ "or": [
879
+ {
880
+ "archived": {
881
+ "exists": false
882
+ }
883
+ },
884
+ {
885
+ "archived": {
886
+ "equals": false
887
+ }
888
+ }
889
+ ]
890
+ }
891
+ },
892
+ {
893
+ "tab": "drafts",
894
+ "label": {
895
+ "en": "Drafts",
896
+ "ar": "المسودات"
897
+ },
898
+ "where": {
899
+ "and": [
900
+ {
901
+ "or": [
902
+ {
903
+ "archived": {
904
+ "exists": false
905
+ }
906
+ },
907
+ {
908
+ "archived": {
909
+ "equals": false
910
+ }
911
+ }
912
+ ]
913
+ },
914
+ {
915
+ "_status": {
916
+ "equals": "draft"
917
+ }
918
+ }
919
+ ]
920
+ }
921
+ },
922
+ {
923
+ "tab": "archived",
924
+ "label": {
925
+ "en": "Archived",
926
+ "ar": "المؤرشفة"
927
+ },
928
+ "where": {
929
+ "archived": {
930
+ "equals": true
931
+ }
932
+ }
933
+ },
934
+ {
935
+ "tab": "all",
936
+ "label": {
937
+ "en": "All",
938
+ "ar": "الكل"
939
+ }
940
+ }
941
+ ]
942
+ }
943
+ }
944
+ ]
945
+ }
946
+ ]
947
+ }
948
+ },
949
+ "create": {
950
+ "path": "/courses/new",
951
+ "page": {
952
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#AppShell",
953
+ "header": [
954
+ {
955
+ "title": {}
956
+ },
957
+ {
958
+ "controls": {}
959
+ }
960
+ ],
961
+ "main": [
962
+ {
963
+ "layout": "@asas/mithaq:./src/ui/record-page.tsx#RecordPage",
964
+ "main": [
965
+ {
966
+ "form": [
967
+ {
968
+ "section": "about",
969
+ "label": {
970
+ "en": "About the course",
971
+ "ar": "عن الدورة"
972
+ },
973
+ "fields": [
974
+ {
975
+ "field": "title",
976
+ "component": "text",
977
+ "decided": "table"
978
+ },
979
+ {
980
+ "field": "summary",
981
+ "component": "text",
982
+ "decided": "table"
983
+ },
984
+ {
985
+ "field": "cover",
986
+ "component": "upload",
987
+ "decided": "table"
988
+ },
989
+ {
990
+ "field": "details",
991
+ "component": "richText",
992
+ "decided": "table"
993
+ }
994
+ ]
995
+ },
996
+ {
997
+ "section": "pricing",
998
+ "label": {
999
+ "en": "Pricing",
1000
+ "ar": "التسعير"
1001
+ },
1002
+ "fields": [
1003
+ {
1004
+ "row": [
1005
+ {
1006
+ "field": "fee",
1007
+ "component": "number",
1008
+ "decided": "table"
1009
+ },
1010
+ {
1011
+ "field": "currency",
1012
+ "component": "select",
1013
+ "decided": "field"
1014
+ }
1015
+ ]
1016
+ }
1017
+ ]
1018
+ },
1019
+ {
1020
+ "section": "teaching",
1021
+ "label": {
1022
+ "en": "Teaching",
1023
+ "ar": "التدريس"
1024
+ },
1025
+ "fields": [
1026
+ {
1027
+ "field": "delivery",
1028
+ "component": "radio",
1029
+ "decided": "field"
1030
+ },
1031
+ {
1032
+ "field": "accessCode",
1033
+ "component": "otp",
1034
+ "decided": "field",
1035
+ "when": {
1036
+ "delivery": {
1037
+ "equals": "live"
1038
+ }
1039
+ }
1040
+ },
1041
+ {
1042
+ "field": "notifications",
1043
+ "component": "switch",
1044
+ "decided": "field"
1045
+ },
1046
+ {
1047
+ "field": "selfEnroll",
1048
+ "component": "switch",
1049
+ "decided": "leaf"
1050
+ }
1051
+ ]
1052
+ }
1053
+ ]
1054
+ }
1055
+ ],
1056
+ "side": [
1057
+ {
1058
+ "section": "catalogue",
1059
+ "label": {
1060
+ "en": "Catalogue",
1061
+ "ar": "الدليل"
1062
+ },
1063
+ "fields": [
1064
+ {
1065
+ "field": "tags",
1066
+ "component": "relationship",
1067
+ "decided": "table"
1068
+ }
1069
+ ]
1070
+ }
1071
+ ]
1072
+ }
1073
+ ]
1074
+ }
1075
+ },
1076
+ "edit": {
1077
+ "path": "/courses/:id",
1078
+ "page": {
1079
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#AppShell",
1080
+ "header": [
1081
+ {
1082
+ "title": {}
1083
+ },
1084
+ {
1085
+ "component": "@asas/courses:./courses/ui/archived-badge.tsx#ArchivedBadge",
1086
+ "when": {
1087
+ "record.archived": {
1088
+ "equals": true
1089
+ }
1090
+ }
1091
+ },
1092
+ {
1093
+ "controls": {}
1094
+ }
1095
+ ],
1096
+ "main": [
1097
+ {
1098
+ "tabs": [
1099
+ {
1100
+ "tab": "details",
1101
+ "label": {
1102
+ "en": "Details",
1103
+ "ar": "التفاصيل"
1104
+ },
1105
+ "fields": [
1106
+ {
1107
+ "layout": "@asas/mithaq:./src/ui/record-page.tsx#RecordPage",
1108
+ "main": [
1109
+ {
1110
+ "form": [
1111
+ {
1112
+ "section": "about",
1113
+ "label": {
1114
+ "en": "About the course",
1115
+ "ar": "عن الدورة"
1116
+ },
1117
+ "fields": [
1118
+ {
1119
+ "field": "title",
1120
+ "component": "text",
1121
+ "decided": "table"
1122
+ },
1123
+ {
1124
+ "field": "summary",
1125
+ "component": "text",
1126
+ "decided": "table"
1127
+ },
1128
+ {
1129
+ "field": "cover",
1130
+ "component": "upload",
1131
+ "decided": "table"
1132
+ },
1133
+ {
1134
+ "field": "details",
1135
+ "component": "richText",
1136
+ "decided": "table"
1137
+ }
1138
+ ]
1139
+ },
1140
+ {
1141
+ "section": "pricing",
1142
+ "label": {
1143
+ "en": "Pricing",
1144
+ "ar": "التسعير"
1145
+ },
1146
+ "fields": [
1147
+ {
1148
+ "row": [
1149
+ {
1150
+ "field": "fee",
1151
+ "component": "number",
1152
+ "decided": "table"
1153
+ },
1154
+ {
1155
+ "field": "currency",
1156
+ "component": "select",
1157
+ "decided": "field"
1158
+ }
1159
+ ]
1160
+ }
1161
+ ]
1162
+ },
1163
+ {
1164
+ "section": "teaching",
1165
+ "label": {
1166
+ "en": "Teaching",
1167
+ "ar": "التدريس"
1168
+ },
1169
+ "fields": [
1170
+ {
1171
+ "field": "delivery",
1172
+ "component": "radio",
1173
+ "decided": "field"
1174
+ },
1175
+ {
1176
+ "field": "accessCode",
1177
+ "component": "otp",
1178
+ "decided": "field",
1179
+ "when": {
1180
+ "delivery": {
1181
+ "equals": "live"
1182
+ }
1183
+ }
1184
+ },
1185
+ {
1186
+ "field": "notifications",
1187
+ "component": "switch",
1188
+ "decided": "field"
1189
+ },
1190
+ {
1191
+ "field": "selfEnroll",
1192
+ "component": "switch",
1193
+ "decided": "leaf"
1194
+ }
1195
+ ]
1196
+ }
1197
+ ]
1198
+ }
1199
+ ],
1200
+ "side": [
1201
+ {
1202
+ "section": "catalogue",
1203
+ "label": {
1204
+ "en": "Catalogue",
1205
+ "ar": "الدليل"
1206
+ },
1207
+ "fields": [
1208
+ {
1209
+ "field": "tags",
1210
+ "component": "relationship",
1211
+ "decided": "table"
1212
+ },
1213
+ {
1214
+ "field": "archived",
1215
+ "readOnly": true,
1216
+ "component": "checkbox",
1217
+ "decided": "table"
1218
+ }
1219
+ ]
1220
+ },
1221
+ {
1222
+ "component": "@asas/mithaq:./src/ui/activity.tsx#Activity",
1223
+ "when": {
1224
+ "$user.collections.auditLog.operations.find": {
1225
+ "equals": true
1226
+ }
1227
+ }
1228
+ }
1229
+ ],
1230
+ "danger": [
1231
+ {
1232
+ "button": "unpublish",
1233
+ "label": {
1234
+ "en": "Unpublish",
1235
+ "ar": "إلغاء النشر"
1236
+ },
1237
+ "reload": true,
1238
+ "component": "@asas/courses:./courses/ui/unpublish-button.tsx#UnpublishButton",
1239
+ "confirm": {
1240
+ "title": {
1241
+ "en": "Unpublish this course?",
1242
+ "ar": "إلغاء نشر هذه الدورة؟"
1243
+ },
1244
+ "body": {
1245
+ "en": "It goes back to a draft that no student sees, until it is published again.",
1246
+ "ar": "تعود مسودة لا يراها أي طالب حتى تُنشر مجددا."
1247
+ }
1248
+ },
1249
+ "when": {
1250
+ "record._status": {
1251
+ "equals": "published"
1252
+ }
1253
+ }
1254
+ },
1255
+ {
1256
+ "button": "archive",
1257
+ "label": {
1258
+ "en": "Archive",
1259
+ "ar": "أرشفة"
1260
+ },
1261
+ "fields": [
1262
+ "reason"
1263
+ ],
1264
+ "reload": true,
1265
+ "confirm": {
1266
+ "title": {
1267
+ "en": "Archive this course?",
1268
+ "ar": "أرشفة هذه الدورة؟"
1269
+ },
1270
+ "body": {
1271
+ "en": "It leaves the catalogue for every student.",
1272
+ "ar": "تخرج من الدليل لكل الطلاب."
1273
+ }
1274
+ },
1275
+ "when": {
1276
+ "or": [
1277
+ {
1278
+ "record.archived": {
1279
+ "exists": false
1280
+ }
1281
+ },
1282
+ {
1283
+ "record.archived": {
1284
+ "equals": false
1285
+ }
1286
+ }
1287
+ ]
1288
+ }
1289
+ },
1290
+ {
1291
+ "button": "unarchive",
1292
+ "label": {
1293
+ "en": "Unarchive",
1294
+ "ar": "إلغاء الأرشفة"
1295
+ },
1296
+ "fields": [
1297
+ "reason"
1298
+ ],
1299
+ "reload": true,
1300
+ "confirm": {
1301
+ "title": {
1302
+ "en": "Unarchive this course?",
1303
+ "ar": "إلغاء أرشفة هذه الدورة؟"
1304
+ },
1305
+ "body": {
1306
+ "en": "It is back in the catalogue as it was.",
1307
+ "ar": "تعود إلى الدليل كما كانت."
1308
+ }
1309
+ },
1310
+ "when": {
1311
+ "record.archived": {
1312
+ "equals": true
1313
+ }
1314
+ }
1315
+ },
1316
+ {
1317
+ "button": "delete",
1318
+ "label": {
1319
+ "en": "Delete",
1320
+ "ar": "حذف"
1321
+ }
1322
+ }
1323
+ ]
1324
+ }
1325
+ ]
1326
+ },
1327
+ {
1328
+ "tab": "sessions",
1329
+ "label": {
1330
+ "en": "Sessions",
1331
+ "ar": "الجلسات"
1332
+ },
1333
+ "fields": [
1334
+ {
1335
+ "list": {
1336
+ "of": "sessions",
1337
+ "where": "course",
1338
+ "columns": [
1339
+ {
1340
+ "field": "startsAt",
1341
+ "cell": "datetime",
1342
+ "decided": "table"
1343
+ },
1344
+ {
1345
+ "field": "capacity",
1346
+ "cell": "number",
1347
+ "decided": "table"
1348
+ },
1349
+ {
1350
+ "field": "venue",
1351
+ "cell": "text",
1352
+ "decided": "table"
1353
+ },
1354
+ {
1355
+ "field": "format",
1356
+ "cell": "text",
1357
+ "decided": "table"
1358
+ },
1359
+ {
1360
+ "field": "archived",
1361
+ "cell": "checkbox",
1362
+ "decided": "table"
1363
+ }
1364
+ ],
1365
+ "filters": [
1366
+ "venue",
1367
+ "archived"
1368
+ ],
1369
+ "search": [
1370
+ "venue"
1371
+ ],
1372
+ "bulk": [
1373
+ {
1374
+ "button": "archiveMany",
1375
+ "label": {
1376
+ "en": "Archive",
1377
+ "ar": "أرشفة"
1378
+ },
1379
+ "confirm": {
1380
+ "title": {
1381
+ "en": "Archive the ticked sessions?",
1382
+ "ar": "أرشفة الجلسات المحددة؟"
1383
+ },
1384
+ "body": {
1385
+ "en": "They stay on the course, marked archived.",
1386
+ "ar": "تبقى في الدورة، معلمة بأنها مؤرشفة."
1387
+ }
1388
+ }
1389
+ }
1390
+ ],
1391
+ "sort": "startsAt"
1392
+ }
1393
+ }
1394
+ ]
1395
+ },
1396
+ {
1397
+ "tab": "versions",
1398
+ "label": {
1399
+ "en": "Versions",
1400
+ "ar": "الإصدارات"
1401
+ },
1402
+ "fields": [
1403
+ {
1404
+ "component": "./src/ui-dashboard/versions.tsx#Versions",
1405
+ "when": {
1406
+ "$user.collections.courses.operations.findVersions": {
1407
+ "equals": true
1408
+ }
1409
+ }
1410
+ }
1411
+ ]
1412
+ },
1413
+ {
1414
+ "tab": "activity",
1415
+ "label": {
1416
+ "en": "Activity",
1417
+ "ar": "النشاط"
1418
+ },
1419
+ "fields": [
1420
+ {
1421
+ "component": "@asas/mithaq:./src/ui/activity.tsx#ActivityTab",
1422
+ "when": {
1423
+ "$user.collections.auditLog.operations.find": {
1424
+ "equals": true
1425
+ }
1426
+ }
1427
+ }
1428
+ ]
1429
+ }
1430
+ ]
1431
+ }
1432
+ ]
1433
+ }
1434
+ },
1435
+ "board": {
1436
+ "path": "/courses/board",
1437
+ "page": {
1438
+ "shell": "@asas/mithaq:./src/ui/top-shell.tsx#TopShell",
1439
+ "header": [
1440
+ {
1441
+ "title": {}
1442
+ }
1443
+ ],
1444
+ "nav": [
1445
+ {
1446
+ "nav": {}
1447
+ }
1448
+ ],
1449
+ "main": [
1450
+ {
1451
+ "layout": "@asas/mithaq:./src/ui/table-page.tsx#TablePage",
1452
+ "main": [
1453
+ {
1454
+ "component": "@asas/courses:./courses/ui/no-courses.tsx#NoCourses"
1455
+ }
1456
+ ]
1457
+ }
1458
+ ]
1459
+ }
1460
+ }
1461
+ }
1462
+ },
1463
+ "sessions": {
1464
+ "name": "sessions",
1465
+ "single": false,
1466
+ "fields": [
1467
+ {
1468
+ "name": "id",
1469
+ "kind": "uuid",
1470
+ "label": {
1471
+ "en": "ID",
1472
+ "ar": "المعرف"
1473
+ },
1474
+ "rules": {
1475
+ "required": false
1476
+ },
1477
+ "component": "uuid",
1478
+ "cell": "uuid"
1479
+ },
1480
+ {
1481
+ "name": "updatedAt",
1482
+ "kind": "datetime",
1483
+ "label": {
1484
+ "en": "Updated at",
1485
+ "ar": "تاريخ التعديل"
1486
+ },
1487
+ "rules": {
1488
+ "required": true,
1489
+ "defaultNow": true,
1490
+ "nowOnUpdate": true,
1491
+ "providedBy": {
1492
+ "create": "application",
1493
+ "update": "application"
1494
+ }
1495
+ },
1496
+ "component": "datetime",
1497
+ "cell": "datetime"
1498
+ },
1499
+ {
1500
+ "name": "createdAt",
1501
+ "kind": "datetime",
1502
+ "label": {
1503
+ "en": "Created at",
1504
+ "ar": "تاريخ الإنشاء"
1505
+ },
1506
+ "rules": {
1507
+ "required": true,
1508
+ "defaultNow": true,
1509
+ "index": true,
1510
+ "providedBy": {
1511
+ "create": "application",
1512
+ "update": "application"
1513
+ }
1514
+ },
1515
+ "component": "datetime",
1516
+ "cell": "datetime"
1517
+ },
1518
+ {
1519
+ "name": "organization",
1520
+ "kind": "relationship",
1521
+ "label": {
1522
+ "en": "Organization",
1523
+ "ar": "المؤسسة"
1524
+ },
1525
+ "rules": {
1526
+ "required": true,
1527
+ "index": true,
1528
+ "providedBy": {
1529
+ "create": "application",
1530
+ "update": "never"
1531
+ },
1532
+ "onDelete": "restrict"
1533
+ },
1534
+ "relationTo": "organization",
1535
+ "component": "relationship",
1536
+ "cell": "relationship"
1537
+ },
1538
+ {
1539
+ "name": "course",
1540
+ "kind": "relationship",
1541
+ "label": {
1542
+ "en": "Course",
1543
+ "ar": "الدورة"
1544
+ },
1545
+ "rules": {
1546
+ "required": true,
1547
+ "onDelete": "restrict"
1548
+ },
1549
+ "relationTo": "courses",
1550
+ "component": "relationship",
1551
+ "cell": "relationship"
1552
+ },
1553
+ {
1554
+ "name": "startsAt",
1555
+ "kind": "datetime",
1556
+ "label": {
1557
+ "en": "Starts at",
1558
+ "ar": "وقت البداية"
1559
+ },
1560
+ "rules": {
1561
+ "required": true
1562
+ },
1563
+ "component": "datetime",
1564
+ "cell": "datetime"
1565
+ },
1566
+ {
1567
+ "name": "capacity",
1568
+ "kind": "number",
1569
+ "label": {
1570
+ "en": "Capacity",
1571
+ "ar": "السعة"
1572
+ },
1573
+ "rules": {
1574
+ "min": 1,
1575
+ "required": false
1576
+ },
1577
+ "component": "number",
1578
+ "cell": "number"
1579
+ },
1580
+ {
1581
+ "name": "venue",
1582
+ "kind": "text",
1583
+ "label": {
1584
+ "en": "Venue",
1585
+ "ar": "المكان"
1586
+ },
1587
+ "rules": {
1588
+ "required": false
1589
+ },
1590
+ "options": [
1591
+ {
1592
+ "value": "online",
1593
+ "label": {
1594
+ "en": "Online",
1595
+ "ar": "عبر الإنترنت"
1596
+ }
1597
+ },
1598
+ {
1599
+ "value": "campus",
1600
+ "label": {
1601
+ "en": "Campus",
1602
+ "ar": "الحرم"
1603
+ }
1604
+ }
1605
+ ],
1606
+ "component": "nativeSelect",
1607
+ "cell": "text"
1608
+ },
1609
+ {
1610
+ "name": "format",
1611
+ "kind": "text",
1612
+ "label": {
1613
+ "en": "Format",
1614
+ "ar": "الصيغة"
1615
+ },
1616
+ "rules": {
1617
+ "required": false
1618
+ },
1619
+ "options": [
1620
+ {
1621
+ "value": "workshop",
1622
+ "label": {
1623
+ "en": "Workshop",
1624
+ "ar": "ورشة عمل"
1625
+ }
1626
+ },
1627
+ {
1628
+ "value": "lecture",
1629
+ "label": {
1630
+ "en": "Lecture",
1631
+ "ar": "محاضرة"
1632
+ }
1633
+ }
1634
+ ],
1635
+ "component": "combobox",
1636
+ "cell": "text"
1637
+ },
1638
+ {
1639
+ "name": "archived",
1640
+ "kind": "checkbox",
1641
+ "label": {
1642
+ "en": "Archived",
1643
+ "ar": "مؤرشفة"
1644
+ },
1645
+ "rules": {
1646
+ "providedBy": {
1647
+ "create": "never",
1648
+ "update": "application"
1649
+ },
1650
+ "required": false
1651
+ },
1652
+ "component": "checkbox",
1653
+ "cell": "checkbox"
1654
+ },
1655
+ {
1656
+ "name": "details",
1657
+ "kind": "richText",
1658
+ "label": {
1659
+ "en": "Details",
1660
+ "ar": "التفاصيل"
1661
+ },
1662
+ "rules": {
1663
+ "required": false
1664
+ },
1665
+ "component": "richText",
1666
+ "cell": "richText",
1667
+ "sortable": false
1668
+ },
1669
+ {
1670
+ "name": "enrollments",
1671
+ "kind": "join",
1672
+ "label": {
1673
+ "en": "Enrollments",
1674
+ "ar": "التسجيلات"
1675
+ },
1676
+ "rules": {
1677
+ "required": false,
1678
+ "providedBy": {
1679
+ "create": "never",
1680
+ "update": "never"
1681
+ }
1682
+ },
1683
+ "relationTo": "enrollments",
1684
+ "on": "session",
1685
+ "component": "join",
1686
+ "cell": "join"
1687
+ },
1688
+ {
1689
+ "name": "archiveReason",
1690
+ "kind": "text",
1691
+ "label": {
1692
+ "en": "Archive reason",
1693
+ "ar": "سبب الأرشفة"
1694
+ },
1695
+ "rules": {
1696
+ "maxLength": 200,
1697
+ "providedBy": {
1698
+ "create": "never",
1699
+ "update": "application"
1700
+ },
1701
+ "required": false
1702
+ },
1703
+ "component": "text",
1704
+ "cell": "text"
1705
+ }
1706
+ ],
1707
+ "operations": [
1708
+ {
1709
+ "name": "create",
1710
+ "effect": "create"
1711
+ },
1712
+ {
1713
+ "name": "update",
1714
+ "effect": "update"
1715
+ },
1716
+ {
1717
+ "name": "delete",
1718
+ "effect": "delete"
1719
+ },
1720
+ {
1721
+ "name": "find",
1722
+ "effect": "read"
1723
+ },
1724
+ {
1725
+ "name": "findByID",
1726
+ "effect": "read"
1727
+ },
1728
+ {
1729
+ "name": "count",
1730
+ "effect": "read"
1731
+ },
1732
+ {
1733
+ "name": "updateMany",
1734
+ "effect": "update",
1735
+ "updatesMany": true
1736
+ },
1737
+ {
1738
+ "name": "deleteMany",
1739
+ "effect": "delete"
1740
+ },
1741
+ {
1742
+ "name": "archiveMany",
1743
+ "effect": "update",
1744
+ "updatesMany": true
1745
+ },
1746
+ {
1747
+ "name": "archive",
1748
+ "effect": "update",
1749
+ "fields": [
1750
+ {
1751
+ "name": "reason",
1752
+ "kind": "text",
1753
+ "label": {
1754
+ "en": "Reason",
1755
+ "ar": "السبب"
1756
+ },
1757
+ "rules": {
1758
+ "required": true,
1759
+ "maxLength": 200
1760
+ },
1761
+ "component": "text",
1762
+ "cell": "text"
1763
+ }
1764
+ ]
1765
+ },
1766
+ {
1767
+ "name": "unarchive",
1768
+ "effect": "update",
1769
+ "fields": [
1770
+ {
1771
+ "name": "reason",
1772
+ "kind": "text",
1773
+ "label": {
1774
+ "en": "Reason",
1775
+ "ar": "السبب"
1776
+ },
1777
+ "rules": {
1778
+ "required": true,
1779
+ "maxLength": 200
1780
+ },
1781
+ "component": "text",
1782
+ "cell": "text"
1783
+ }
1784
+ ]
1785
+ }
1786
+ ],
1787
+ "useAsTitle": "startsAt",
1788
+ "description": {
1789
+ "en": "The dates each course meets, and how many seats each one holds.",
1790
+ "ar": "مواعيد انعقاد كل دورة، وعدد المقاعد في كل منها."
1791
+ },
1792
+ "pages": {
1793
+ "list": {
1794
+ "path": "/sessions",
1795
+ "page": {
1796
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#AppShell",
1797
+ "header": [
1798
+ {
1799
+ "title": {}
1800
+ }
1801
+ ],
1802
+ "main": [
1803
+ {
1804
+ "layout": "@asas/mithaq:./src/ui/table-page.tsx#TablePage",
1805
+ "main": [
1806
+ {
1807
+ "list": {
1808
+ "columns": [
1809
+ {
1810
+ "field": "course",
1811
+ "cell": "relationship",
1812
+ "decided": "table"
1813
+ },
1814
+ {
1815
+ "field": "startsAt",
1816
+ "cell": "datetime",
1817
+ "decided": "table"
1818
+ },
1819
+ {
1820
+ "field": "capacity",
1821
+ "cell": "number",
1822
+ "decided": "table"
1823
+ },
1824
+ {
1825
+ "field": "venue",
1826
+ "cell": "text",
1827
+ "decided": "table"
1828
+ }
1829
+ ],
1830
+ "filters": [
1831
+ "course",
1832
+ "startsAt",
1833
+ "venue",
1834
+ "format",
1835
+ "archived"
1836
+ ],
1837
+ "search": [
1838
+ "course.title",
1839
+ "details"
1840
+ ]
1841
+ }
1842
+ }
1843
+ ]
1844
+ }
1845
+ ]
1846
+ }
1847
+ },
1848
+ "create": {
1849
+ "path": "/sessions/new",
1850
+ "page": {
1851
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#AppShell",
1852
+ "header": [
1853
+ {
1854
+ "title": {}
1855
+ },
1856
+ {
1857
+ "controls": {}
1858
+ }
1859
+ ],
1860
+ "main": [
1861
+ {
1862
+ "layout": "@asas/mithaq:./src/ui/record-page.tsx#RecordPage",
1863
+ "main": [
1864
+ {
1865
+ "form": [
1866
+ {
1867
+ "section": "course",
1868
+ "label": {
1869
+ "en": "Course",
1870
+ "ar": "الدورة"
1871
+ },
1872
+ "fields": [
1873
+ {
1874
+ "field": "course",
1875
+ "component": "relationship",
1876
+ "decided": "table"
1877
+ }
1878
+ ]
1879
+ },
1880
+ {
1881
+ "section": "schedule",
1882
+ "label": {
1883
+ "en": "Schedule",
1884
+ "ar": "الموعد"
1885
+ },
1886
+ "fields": [
1887
+ {
1888
+ "row": [
1889
+ {
1890
+ "field": "startsAt",
1891
+ "component": "datetime",
1892
+ "decided": "table"
1893
+ },
1894
+ {
1895
+ "field": "capacity",
1896
+ "component": "number",
1897
+ "decided": "table"
1898
+ }
1899
+ ]
1900
+ }
1901
+ ]
1902
+ },
1903
+ {
1904
+ "section": "place",
1905
+ "label": {
1906
+ "en": "Venue and format",
1907
+ "ar": "المكان والصيغة"
1908
+ },
1909
+ "fields": [
1910
+ {
1911
+ "row": [
1912
+ {
1913
+ "field": "venue",
1914
+ "component": "nativeSelect",
1915
+ "decided": "field"
1916
+ },
1917
+ {
1918
+ "field": "format",
1919
+ "component": "combobox",
1920
+ "decided": "field"
1921
+ }
1922
+ ]
1923
+ }
1924
+ ]
1925
+ },
1926
+ {
1927
+ "section": "notes",
1928
+ "label": {
1929
+ "en": "Notes",
1930
+ "ar": "ملاحظات"
1931
+ },
1932
+ "fields": [
1933
+ {
1934
+ "field": "details",
1935
+ "component": "richText",
1936
+ "decided": "table"
1937
+ }
1938
+ ]
1939
+ }
1940
+ ]
1941
+ }
1942
+ ]
1943
+ }
1944
+ ]
1945
+ }
1946
+ },
1947
+ "edit": {
1948
+ "path": "/sessions/:id",
1949
+ "page": {
1950
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#AppShell",
1951
+ "header": [
1952
+ {
1953
+ "title": {}
1954
+ },
1955
+ {
1956
+ "controls": {}
1957
+ }
1958
+ ],
1959
+ "main": [
1960
+ {
1961
+ "layout": "@asas/mithaq:./src/ui/record-page.tsx#RecordPage",
1962
+ "main": [
1963
+ {
1964
+ "tabs": [
1965
+ {
1966
+ "tab": "details",
1967
+ "label": {
1968
+ "en": "Details",
1969
+ "ar": "التفاصيل"
1970
+ },
1971
+ "fields": [
1972
+ {
1973
+ "form": [
1974
+ {
1975
+ "section": "schedule",
1976
+ "label": {
1977
+ "en": "Schedule",
1978
+ "ar": "الموعد"
1979
+ },
1980
+ "fields": [
1981
+ {
1982
+ "row": [
1983
+ {
1984
+ "field": "startsAt",
1985
+ "component": "datetime",
1986
+ "decided": "table"
1987
+ },
1988
+ {
1989
+ "field": "capacity",
1990
+ "component": "number",
1991
+ "decided": "table"
1992
+ }
1993
+ ]
1994
+ }
1995
+ ]
1996
+ },
1997
+ {
1998
+ "section": "place",
1999
+ "label": {
2000
+ "en": "Venue and format",
2001
+ "ar": "المكان والصيغة"
2002
+ },
2003
+ "fields": [
2004
+ {
2005
+ "row": [
2006
+ {
2007
+ "field": "venue",
2008
+ "component": "nativeSelect",
2009
+ "decided": "field"
2010
+ },
2011
+ {
2012
+ "field": "format",
2013
+ "component": "combobox",
2014
+ "decided": "field"
2015
+ }
2016
+ ]
2017
+ }
2018
+ ]
2019
+ },
2020
+ {
2021
+ "section": "notes",
2022
+ "label": {
2023
+ "en": "Notes",
2024
+ "ar": "ملاحظات"
2025
+ },
2026
+ "fields": [
2027
+ {
2028
+ "field": "details",
2029
+ "component": "richText",
2030
+ "decided": "table"
2031
+ }
2032
+ ]
2033
+ }
2034
+ ]
2035
+ }
2036
+ ]
2037
+ },
2038
+ {
2039
+ "tab": "enrollments",
2040
+ "label": {
2041
+ "en": "Enrollments",
2042
+ "ar": "التسجيلات"
2043
+ },
2044
+ "fields": [
2045
+ {
2046
+ "list": {
2047
+ "of": "enrollments",
2048
+ "where": "session",
2049
+ "columns": [
2050
+ {
2051
+ "field": "student",
2052
+ "cell": "relationship",
2053
+ "decided": "table"
2054
+ },
2055
+ {
2056
+ "field": "createdAt",
2057
+ "cell": "datetime",
2058
+ "decided": "table"
2059
+ }
2060
+ ]
2061
+ },
2062
+ "when": {
2063
+ "$user.collections.enrollments.operations.find": {
2064
+ "equals": true
2065
+ }
2066
+ }
2067
+ }
2068
+ ]
2069
+ }
2070
+ ]
2071
+ }
2072
+ ],
2073
+ "side": [
2074
+ {
2075
+ "section": "course",
2076
+ "label": {
2077
+ "en": "Course",
2078
+ "ar": "الدورة"
2079
+ },
2080
+ "fields": [
2081
+ {
2082
+ "field": "course",
2083
+ "component": "relationship",
2084
+ "decided": "table"
2085
+ },
2086
+ {
2087
+ "field": "archived",
2088
+ "readOnly": true,
2089
+ "component": "checkbox",
2090
+ "decided": "table"
2091
+ },
2092
+ {
2093
+ "field": "archiveReason",
2094
+ "readOnly": true,
2095
+ "component": "text",
2096
+ "decided": "table"
2097
+ }
2098
+ ]
2099
+ },
2100
+ {
2101
+ "component": "@asas/mithaq:./src/ui/activity.tsx#Activity",
2102
+ "when": {
2103
+ "$user.collections.auditLog.operations.find": {
2104
+ "equals": true
2105
+ }
2106
+ }
2107
+ }
2108
+ ],
2109
+ "danger": [
2110
+ {
2111
+ "button": "archive",
2112
+ "label": {
2113
+ "en": "Archive",
2114
+ "ar": "أرشفة"
2115
+ },
2116
+ "fields": [
2117
+ "reason"
2118
+ ],
2119
+ "reload": true,
2120
+ "confirm": {
2121
+ "title": {
2122
+ "en": "Archive this session?",
2123
+ "ar": "أرشفة هذه الجلسة؟"
2124
+ },
2125
+ "body": {
2126
+ "en": "It stays on the course, marked archived.",
2127
+ "ar": "تبقى في الدورة، معلمة بأنها مؤرشفة."
2128
+ }
2129
+ },
2130
+ "when": {
2131
+ "or": [
2132
+ {
2133
+ "record.archived": {
2134
+ "exists": false
2135
+ }
2136
+ },
2137
+ {
2138
+ "record.archived": {
2139
+ "equals": false
2140
+ }
2141
+ }
2142
+ ]
2143
+ }
2144
+ },
2145
+ {
2146
+ "button": "unarchive",
2147
+ "label": {
2148
+ "en": "Unarchive",
2149
+ "ar": "إلغاء الأرشفة"
2150
+ },
2151
+ "fields": [
2152
+ "reason"
2153
+ ],
2154
+ "reload": true,
2155
+ "confirm": {
2156
+ "title": {
2157
+ "en": "Unarchive this session?",
2158
+ "ar": "إلغاء أرشفة هذه الجلسة؟"
2159
+ },
2160
+ "body": {
2161
+ "en": "It is open again as it was.",
2162
+ "ar": "تعود مفتوحة كما كانت."
2163
+ }
2164
+ },
2165
+ "when": {
2166
+ "record.archived": {
2167
+ "equals": true
2168
+ }
2169
+ }
2170
+ },
2171
+ {
2172
+ "button": "delete",
2173
+ "label": {
2174
+ "en": "Delete",
2175
+ "ar": "حذف"
2176
+ }
2177
+ }
2178
+ ]
2179
+ }
2180
+ ]
2181
+ }
2182
+ }
2183
+ }
2184
+ },
2185
+ "enrollments": {
2186
+ "name": "enrollments",
2187
+ "single": false,
2188
+ "fields": [
2189
+ {
2190
+ "name": "id",
2191
+ "kind": "uuid",
2192
+ "label": {
2193
+ "en": "ID",
2194
+ "ar": "المعرف"
2195
+ },
2196
+ "rules": {
2197
+ "required": false
2198
+ },
2199
+ "component": "uuid",
2200
+ "cell": "uuid"
2201
+ },
2202
+ {
2203
+ "name": "updatedAt",
2204
+ "kind": "datetime",
2205
+ "label": {
2206
+ "en": "Updated at",
2207
+ "ar": "تاريخ التعديل"
2208
+ },
2209
+ "rules": {
2210
+ "required": true,
2211
+ "defaultNow": true,
2212
+ "nowOnUpdate": true,
2213
+ "providedBy": {
2214
+ "create": "application",
2215
+ "update": "application"
2216
+ }
2217
+ },
2218
+ "component": "datetime",
2219
+ "cell": "datetime"
2220
+ },
2221
+ {
2222
+ "name": "createdAt",
2223
+ "kind": "datetime",
2224
+ "label": {
2225
+ "en": "Created at",
2226
+ "ar": "تاريخ الإنشاء"
2227
+ },
2228
+ "rules": {
2229
+ "required": true,
2230
+ "defaultNow": true,
2231
+ "index": true,
2232
+ "providedBy": {
2233
+ "create": "application",
2234
+ "update": "application"
2235
+ }
2236
+ },
2237
+ "component": "datetime",
2238
+ "cell": "datetime"
2239
+ },
2240
+ {
2241
+ "name": "organization",
2242
+ "kind": "relationship",
2243
+ "label": {
2244
+ "en": "Organization",
2245
+ "ar": "المؤسسة"
2246
+ },
2247
+ "rules": {
2248
+ "required": true,
2249
+ "index": true,
2250
+ "providedBy": {
2251
+ "create": "application",
2252
+ "update": "never"
2253
+ },
2254
+ "onDelete": "restrict"
2255
+ },
2256
+ "relationTo": "organization",
2257
+ "component": "relationship",
2258
+ "cell": "relationship"
2259
+ },
2260
+ {
2261
+ "name": "session",
2262
+ "kind": "relationship",
2263
+ "label": {
2264
+ "en": "Session",
2265
+ "ar": "الحصة"
2266
+ },
2267
+ "rules": {
2268
+ "required": true,
2269
+ "onDelete": "restrict"
2270
+ },
2271
+ "relationTo": "sessions",
2272
+ "filterOptions": true,
2273
+ "component": "relationship",
2274
+ "cell": "@asas/courses:./enrollments/ui/session-cell.tsx#SessionCell"
2275
+ },
2276
+ {
2277
+ "name": "student",
2278
+ "kind": "relationship",
2279
+ "label": {
2280
+ "en": "Student",
2281
+ "ar": "الطالب"
2282
+ },
2283
+ "rules": {
2284
+ "required": true,
2285
+ "onDelete": "restrict"
2286
+ },
2287
+ "relationTo": "user",
2288
+ "filterOptions": true,
2289
+ "component": "relationship",
2290
+ "cell": "relationship"
2291
+ },
2292
+ {
2293
+ "name": "deletedAt",
2294
+ "kind": "datetime",
2295
+ "label": {
2296
+ "en": "Deleted at",
2297
+ "ar": "تاريخ الحذف"
2298
+ },
2299
+ "rules": {
2300
+ "providedBy": {
2301
+ "create": "never",
2302
+ "update": "never"
2303
+ },
2304
+ "required": false
2305
+ },
2306
+ "component": "datetime",
2307
+ "cell": "datetime"
2308
+ }
2309
+ ],
2310
+ "operations": [
2311
+ {
2312
+ "name": "create",
2313
+ "effect": "create"
2314
+ },
2315
+ {
2316
+ "name": "update",
2317
+ "effect": "update"
2318
+ },
2319
+ {
2320
+ "name": "delete",
2321
+ "effect": "delete"
2322
+ },
2323
+ {
2324
+ "name": "find",
2325
+ "effect": "read"
2326
+ },
2327
+ {
2328
+ "name": "findByID",
2329
+ "effect": "read"
2330
+ },
2331
+ {
2332
+ "name": "count",
2333
+ "effect": "read"
2334
+ },
2335
+ {
2336
+ "name": "updateMany",
2337
+ "effect": "update",
2338
+ "updatesMany": true
2339
+ },
2340
+ {
2341
+ "name": "deleteMany",
2342
+ "effect": "delete"
2343
+ }
2344
+ ],
2345
+ "useAsTitle": "student",
2346
+ "description": {
2347
+ "en": "Which student holds a seat in which session.",
2348
+ "ar": "أي طالب يشغل مقعدا في أي حصة."
2349
+ },
2350
+ "pages": {
2351
+ "list": {
2352
+ "path": "/enrollments",
2353
+ "page": {
2354
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#AppShell",
2355
+ "header": [
2356
+ {
2357
+ "title": {}
2358
+ }
2359
+ ],
2360
+ "main": [
2361
+ {
2362
+ "layout": "@asas/mithaq:./src/ui/table-page.tsx#TablePage",
2363
+ "main": [
2364
+ {
2365
+ "list": {
2366
+ "columns": [
2367
+ {
2368
+ "field": "session",
2369
+ "cell": "@asas/courses:./enrollments/ui/session-cell.tsx#SessionCell",
2370
+ "decided": "field"
2371
+ },
2372
+ {
2373
+ "field": "student",
2374
+ "cell": "relationship",
2375
+ "decided": "table"
2376
+ },
2377
+ {
2378
+ "field": "createdAt",
2379
+ "cell": "datetime",
2380
+ "decided": "table"
2381
+ }
2382
+ ],
2383
+ "filters": [
2384
+ "session",
2385
+ "student",
2386
+ "createdAt"
2387
+ ],
2388
+ "search": [
2389
+ "student.name"
2390
+ ]
2391
+ }
2392
+ }
2393
+ ]
2394
+ }
2395
+ ]
2396
+ }
2397
+ },
2398
+ "create": {
2399
+ "path": "/enrollments/new",
2400
+ "page": {
2401
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#AppShell",
2402
+ "header": [
2403
+ {
2404
+ "title": {}
2405
+ },
2406
+ {
2407
+ "controls": {}
2408
+ }
2409
+ ],
2410
+ "main": [
2411
+ {
2412
+ "layout": "@asas/mithaq:./src/ui/record-page.tsx#RecordPage",
2413
+ "main": [
2414
+ {
2415
+ "form": [
2416
+ {
2417
+ "section": "enrollment",
2418
+ "label": {
2419
+ "en": "Enrollment",
2420
+ "ar": "التسجيل"
2421
+ },
2422
+ "fields": [
2423
+ {
2424
+ "field": "session",
2425
+ "component": "relationship",
2426
+ "decided": "table"
2427
+ },
2428
+ {
2429
+ "field": "student",
2430
+ "component": "relationship",
2431
+ "decided": "table"
2432
+ }
2433
+ ]
2434
+ }
2435
+ ]
2436
+ }
2437
+ ]
2438
+ }
2439
+ ]
2440
+ }
2441
+ },
2442
+ "edit": {
2443
+ "path": "/enrollments/:id",
2444
+ "page": {
2445
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#AppShell",
2446
+ "header": [
2447
+ {
2448
+ "title": {}
2449
+ },
2450
+ {
2451
+ "controls": {}
2452
+ }
2453
+ ],
2454
+ "main": [
2455
+ {
2456
+ "layout": "@asas/mithaq:./src/ui/record-page.tsx#RecordPage",
2457
+ "main": [
2458
+ {
2459
+ "form": [
2460
+ {
2461
+ "section": "enrollment",
2462
+ "label": {
2463
+ "en": "Enrollment",
2464
+ "ar": "التسجيل"
2465
+ },
2466
+ "fields": [
2467
+ {
2468
+ "field": "session",
2469
+ "component": "relationship",
2470
+ "decided": "table"
2471
+ },
2472
+ {
2473
+ "field": "student",
2474
+ "component": "relationship",
2475
+ "decided": "table"
2476
+ }
2477
+ ]
2478
+ }
2479
+ ]
2480
+ }
2481
+ ],
2482
+ "side": [
2483
+ {
2484
+ "section": "record",
2485
+ "label": {
2486
+ "en": "Record",
2487
+ "ar": "السجل"
2488
+ },
2489
+ "fields": [
2490
+ {
2491
+ "field": "createdAt",
2492
+ "readOnly": true,
2493
+ "component": "datetime",
2494
+ "decided": "table"
2495
+ }
2496
+ ]
2497
+ },
2498
+ {
2499
+ "component": "@asas/mithaq:./src/ui/activity.tsx#Activity",
2500
+ "when": {
2501
+ "$user.collections.auditLog.operations.find": {
2502
+ "equals": true
2503
+ }
2504
+ }
2505
+ }
2506
+ ],
2507
+ "danger": [
2508
+ {
2509
+ "button": "delete",
2510
+ "label": {
2511
+ "en": "Delete",
2512
+ "ar": "حذف"
2513
+ }
2514
+ }
2515
+ ]
2516
+ }
2517
+ ]
2518
+ }
2519
+ }
2520
+ }
2521
+ },
2522
+ "tags": {
2523
+ "name": "tags",
2524
+ "single": false,
2525
+ "fields": [
2526
+ {
2527
+ "name": "id",
2528
+ "kind": "uuid",
2529
+ "label": {
2530
+ "en": "ID",
2531
+ "ar": "المعرف"
2532
+ },
2533
+ "rules": {
2534
+ "required": false
2535
+ },
2536
+ "component": "uuid",
2537
+ "cell": "uuid"
2538
+ },
2539
+ {
2540
+ "name": "updatedAt",
2541
+ "kind": "datetime",
2542
+ "label": {
2543
+ "en": "Updated at",
2544
+ "ar": "تاريخ التعديل"
2545
+ },
2546
+ "rules": {
2547
+ "required": true,
2548
+ "defaultNow": true,
2549
+ "nowOnUpdate": true,
2550
+ "providedBy": {
2551
+ "create": "application",
2552
+ "update": "application"
2553
+ }
2554
+ },
2555
+ "component": "datetime",
2556
+ "cell": "datetime"
2557
+ },
2558
+ {
2559
+ "name": "createdAt",
2560
+ "kind": "datetime",
2561
+ "label": {
2562
+ "en": "Created at",
2563
+ "ar": "تاريخ الإنشاء"
2564
+ },
2565
+ "rules": {
2566
+ "required": true,
2567
+ "defaultNow": true,
2568
+ "index": true,
2569
+ "providedBy": {
2570
+ "create": "application",
2571
+ "update": "application"
2572
+ }
2573
+ },
2574
+ "component": "datetime",
2575
+ "cell": "datetime"
2576
+ },
2577
+ {
2578
+ "name": "organization",
2579
+ "kind": "relationship",
2580
+ "label": {
2581
+ "en": "Organization",
2582
+ "ar": "المؤسسة"
2583
+ },
2584
+ "rules": {
2585
+ "required": true,
2586
+ "index": true,
2587
+ "providedBy": {
2588
+ "create": "application",
2589
+ "update": "never"
2590
+ },
2591
+ "onDelete": "restrict"
2592
+ },
2593
+ "relationTo": "organization",
2594
+ "component": "relationship",
2595
+ "cell": "relationship"
2596
+ },
2597
+ {
2598
+ "name": "name",
2599
+ "kind": "text",
2600
+ "label": {
2601
+ "en": "Name",
2602
+ "ar": "الاسم"
2603
+ },
2604
+ "rules": {
2605
+ "localized": true,
2606
+ "required": true,
2607
+ "trim": true,
2608
+ "maxLength": 60,
2609
+ "index": true
2610
+ },
2611
+ "component": "text",
2612
+ "cell": "text"
2613
+ }
2614
+ ],
2615
+ "operations": [
2616
+ {
2617
+ "name": "create",
2618
+ "effect": "create"
2619
+ },
2620
+ {
2621
+ "name": "update",
2622
+ "effect": "update"
2623
+ },
2624
+ {
2625
+ "name": "delete",
2626
+ "effect": "delete"
2627
+ },
2628
+ {
2629
+ "name": "find",
2630
+ "effect": "read"
2631
+ },
2632
+ {
2633
+ "name": "findByID",
2634
+ "effect": "read"
2635
+ },
2636
+ {
2637
+ "name": "count",
2638
+ "effect": "read"
2639
+ },
2640
+ {
2641
+ "name": "updateMany",
2642
+ "effect": "update",
2643
+ "updatesMany": true
2644
+ },
2645
+ {
2646
+ "name": "deleteMany",
2647
+ "effect": "delete"
2648
+ }
2649
+ ],
2650
+ "useAsTitle": "name",
2651
+ "description": {
2652
+ "en": "Labels the organization groups its records by.",
2653
+ "ar": "تسميات تجمع بها المؤسسة سجلاتها."
2654
+ },
2655
+ "pages": {
2656
+ "list": {
2657
+ "path": "/tags",
2658
+ "page": {
2659
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#AppShell",
2660
+ "header": [
2661
+ {
2662
+ "title": {}
2663
+ }
2664
+ ],
2665
+ "main": [
2666
+ {
2667
+ "layout": "@asas/mithaq:./src/ui/table-page.tsx#TablePage",
2668
+ "main": [
2669
+ {
2670
+ "list": {
2671
+ "columns": [
2672
+ {
2673
+ "field": "name",
2674
+ "cell": "text",
2675
+ "decided": "table"
2676
+ },
2677
+ {
2678
+ "field": "createdAt",
2679
+ "cell": "datetime",
2680
+ "decided": "table"
2681
+ }
2682
+ ],
2683
+ "search": [
2684
+ "name"
2685
+ ]
2686
+ }
2687
+ }
2688
+ ]
2689
+ }
2690
+ ]
2691
+ }
2692
+ },
2693
+ "create": {
2694
+ "path": "/tags/new",
2695
+ "page": {
2696
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#AppShell",
2697
+ "header": [
2698
+ {
2699
+ "title": {}
2700
+ },
2701
+ {
2702
+ "controls": {}
2703
+ }
2704
+ ],
2705
+ "main": [
2706
+ {
2707
+ "layout": "@asas/mithaq:./src/ui/record-page.tsx#RecordPage",
2708
+ "main": [
2709
+ {
2710
+ "form": [
2711
+ {
2712
+ "field": "name",
2713
+ "component": "text",
2714
+ "decided": "table"
2715
+ }
2716
+ ]
2717
+ }
2718
+ ]
2719
+ }
2720
+ ]
2721
+ },
2722
+ "mode": "drawer"
2723
+ },
2724
+ "edit": {
2725
+ "path": "/tags/:id",
2726
+ "page": {
2727
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#AppShell",
2728
+ "header": [
2729
+ {
2730
+ "title": {}
2731
+ },
2732
+ {
2733
+ "controls": {}
2734
+ }
2735
+ ],
2736
+ "main": [
2737
+ {
2738
+ "layout": "@asas/mithaq:./src/ui/record-page.tsx#RecordPage",
2739
+ "main": [
2740
+ {
2741
+ "form": [
2742
+ {
2743
+ "section": "tag",
2744
+ "label": {
2745
+ "en": "Tag",
2746
+ "ar": "الوسم"
2747
+ },
2748
+ "fields": [
2749
+ {
2750
+ "field": "name",
2751
+ "component": "text",
2752
+ "decided": "table"
2753
+ }
2754
+ ]
2755
+ }
2756
+ ]
2757
+ }
2758
+ ],
2759
+ "danger": [
2760
+ {
2761
+ "button": "delete",
2762
+ "label": {
2763
+ "en": "Delete",
2764
+ "ar": "حذف"
2765
+ }
2766
+ }
2767
+ ]
2768
+ }
2769
+ ]
2770
+ }
2771
+ }
2772
+ }
2773
+ },
2774
+ "media": {
2775
+ "name": "media",
2776
+ "single": false,
2777
+ "fields": [
2778
+ {
2779
+ "name": "id",
2780
+ "kind": "uuid",
2781
+ "label": {
2782
+ "en": "ID",
2783
+ "ar": "المعرف"
2784
+ },
2785
+ "rules": {
2786
+ "required": false
2787
+ },
2788
+ "component": "uuid",
2789
+ "cell": "uuid"
2790
+ },
2791
+ {
2792
+ "name": "updatedAt",
2793
+ "kind": "datetime",
2794
+ "label": {
2795
+ "en": "Updated at",
2796
+ "ar": "تاريخ التعديل"
2797
+ },
2798
+ "rules": {
2799
+ "required": true,
2800
+ "defaultNow": true,
2801
+ "nowOnUpdate": true,
2802
+ "providedBy": {
2803
+ "create": "application",
2804
+ "update": "application"
2805
+ }
2806
+ },
2807
+ "component": "datetime",
2808
+ "cell": "datetime"
2809
+ },
2810
+ {
2811
+ "name": "createdAt",
2812
+ "kind": "datetime",
2813
+ "label": {
2814
+ "en": "Created at",
2815
+ "ar": "تاريخ الإنشاء"
2816
+ },
2817
+ "rules": {
2818
+ "required": true,
2819
+ "defaultNow": true,
2820
+ "index": true,
2821
+ "providedBy": {
2822
+ "create": "application",
2823
+ "update": "application"
2824
+ }
2825
+ },
2826
+ "component": "datetime",
2827
+ "cell": "datetime"
2828
+ },
2829
+ {
2830
+ "name": "organization",
2831
+ "kind": "relationship",
2832
+ "label": {
2833
+ "en": "Organization",
2834
+ "ar": "المؤسسة"
2835
+ },
2836
+ "rules": {
2837
+ "required": true,
2838
+ "index": true,
2839
+ "providedBy": {
2840
+ "create": "application",
2841
+ "update": "never"
2842
+ },
2843
+ "onDelete": "restrict"
2844
+ },
2845
+ "relationTo": "organization",
2846
+ "component": "relationship",
2847
+ "cell": "relationship"
2848
+ },
2849
+ {
2850
+ "name": "filename",
2851
+ "kind": "text",
2852
+ "label": {
2853
+ "en": "File name",
2854
+ "ar": "اسم الملف"
2855
+ },
2856
+ "rules": {
2857
+ "providedBy": {
2858
+ "create": "application",
2859
+ "update": "never"
2860
+ },
2861
+ "required": true,
2862
+ "index": true
2863
+ },
2864
+ "component": "text",
2865
+ "cell": "text"
2866
+ },
2867
+ {
2868
+ "name": "mimeType",
2869
+ "kind": "text",
2870
+ "label": {
2871
+ "en": "File type",
2872
+ "ar": "نوع الملف"
2873
+ },
2874
+ "rules": {
2875
+ "providedBy": {
2876
+ "create": "application",
2877
+ "update": "never"
2878
+ },
2879
+ "required": true
2880
+ },
2881
+ "component": "text",
2882
+ "cell": "text"
2883
+ },
2884
+ {
2885
+ "name": "filesize",
2886
+ "kind": "number",
2887
+ "label": {
2888
+ "en": "File size",
2889
+ "ar": "حجم الملف"
2890
+ },
2891
+ "rules": {
2892
+ "providedBy": {
2893
+ "create": "application",
2894
+ "update": "never"
2895
+ },
2896
+ "required": true
2897
+ },
2898
+ "component": "number",
2899
+ "cell": "number"
2900
+ },
2901
+ {
2902
+ "name": "width",
2903
+ "kind": "number",
2904
+ "label": {
2905
+ "en": "Width",
2906
+ "ar": "العرض"
2907
+ },
2908
+ "rules": {
2909
+ "providedBy": {
2910
+ "create": "application",
2911
+ "update": "never"
2912
+ },
2913
+ "required": false
2914
+ },
2915
+ "component": "number",
2916
+ "cell": "number"
2917
+ },
2918
+ {
2919
+ "name": "height",
2920
+ "kind": "number",
2921
+ "label": {
2922
+ "en": "Height",
2923
+ "ar": "الارتفاع"
2924
+ },
2925
+ "rules": {
2926
+ "providedBy": {
2927
+ "create": "application",
2928
+ "update": "never"
2929
+ },
2930
+ "required": false
2931
+ },
2932
+ "component": "number",
2933
+ "cell": "number"
2934
+ },
2935
+ {
2936
+ "name": "key",
2937
+ "kind": "text",
2938
+ "label": {
2939
+ "en": "Object key",
2940
+ "ar": "مفتاح الملف"
2941
+ },
2942
+ "rules": {
2943
+ "providedBy": {
2944
+ "create": "application",
2945
+ "update": "never"
2946
+ },
2947
+ "required": true,
2948
+ "unique": true
2949
+ },
2950
+ "component": "text",
2951
+ "cell": "text"
2952
+ },
2953
+ {
2954
+ "name": "storage",
2955
+ "kind": "text",
2956
+ "label": {
2957
+ "en": "Storage",
2958
+ "ar": "التخزين"
2959
+ },
2960
+ "rules": {
2961
+ "providedBy": {
2962
+ "create": "application",
2963
+ "update": "never"
2964
+ },
2965
+ "required": true
2966
+ },
2967
+ "component": "text",
2968
+ "cell": "text"
2969
+ },
2970
+ {
2971
+ "name": "alt",
2972
+ "kind": "text",
2973
+ "label": {
2974
+ "en": "Alternative text",
2975
+ "ar": "النص البديل"
2976
+ },
2977
+ "rules": {
2978
+ "localized": true,
2979
+ "required": true,
2980
+ "maxLength": 300
2981
+ },
2982
+ "component": "text",
2983
+ "cell": "text"
2984
+ }
2985
+ ],
2986
+ "operations": [
2987
+ {
2988
+ "name": "create",
2989
+ "effect": "create"
2990
+ },
2991
+ {
2992
+ "name": "update",
2993
+ "effect": "update"
2994
+ },
2995
+ {
2996
+ "name": "delete",
2997
+ "effect": "delete"
2998
+ },
2999
+ {
3000
+ "name": "find",
3001
+ "effect": "read"
3002
+ },
3003
+ {
3004
+ "name": "findByID",
3005
+ "effect": "read"
3006
+ },
3007
+ {
3008
+ "name": "count",
3009
+ "effect": "read"
3010
+ },
3011
+ {
3012
+ "name": "updateMany",
3013
+ "effect": "update",
3014
+ "updatesMany": true
3015
+ },
3016
+ {
3017
+ "name": "deleteMany",
3018
+ "effect": "delete"
3019
+ }
3020
+ ],
3021
+ "useAsTitle": "filename",
3022
+ "description": {
3023
+ "en": "The images this organization uses, each with the words a screen reader says for it.",
3024
+ "ar": "الصور التي تستخدمها هذه المؤسسة، ولكل منها الكلمات التي يقرؤها قارئ الشاشة."
3025
+ },
3026
+ "storage": {
3027
+ "mimeTypes": [
3028
+ "image/png",
3029
+ "image/jpeg",
3030
+ "image/webp"
3031
+ ],
3032
+ "fileSize": 10485760
3033
+ },
3034
+ "pages": {
3035
+ "list": {
3036
+ "path": "/media",
3037
+ "page": {
3038
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#AppShell",
3039
+ "header": [
3040
+ {
3041
+ "title": {}
3042
+ }
3043
+ ],
3044
+ "main": [
3045
+ {
3046
+ "layout": "@asas/mithaq:./src/ui/table-page.tsx#TablePage",
3047
+ "main": [
3048
+ {
3049
+ "list": {
3050
+ "columns": [
3051
+ {
3052
+ "field": "filename",
3053
+ "cell": "@asas/media:./media/ui/preview.tsx#FileName",
3054
+ "decided": "leaf"
3055
+ },
3056
+ {
3057
+ "field": "alt",
3058
+ "cell": "text",
3059
+ "decided": "table"
3060
+ },
3061
+ {
3062
+ "field": "mimeType",
3063
+ "cell": "text",
3064
+ "decided": "table"
3065
+ },
3066
+ {
3067
+ "field": "filesize",
3068
+ "cell": "@asas/media:./media/ui/preview.tsx#FileSize",
3069
+ "decided": "leaf"
3070
+ },
3071
+ {
3072
+ "field": "createdAt",
3073
+ "cell": "datetime",
3074
+ "decided": "table"
3075
+ }
3076
+ ],
3077
+ "search": [
3078
+ "filename"
3079
+ ],
3080
+ "sort": "-createdAt"
3081
+ }
3082
+ }
3083
+ ]
3084
+ }
3085
+ ]
3086
+ }
3087
+ },
3088
+ "create": {
3089
+ "path": "/media/new",
3090
+ "component": "@asas/media:./media/ui/preview.tsx#NewImage"
3091
+ },
3092
+ "edit": {
3093
+ "path": "/media/:id",
3094
+ "page": {
3095
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#AppShell",
3096
+ "header": [
3097
+ {
3098
+ "title": {}
3099
+ },
3100
+ {
3101
+ "controls": {}
3102
+ }
3103
+ ],
3104
+ "main": [
3105
+ {
3106
+ "layout": "@asas/mithaq:./src/ui/record-page.tsx#RecordPage",
3107
+ "main": [
3108
+ {
3109
+ "form": [
3110
+ {
3111
+ "section": "description",
3112
+ "label": {
3113
+ "en": "Description",
3114
+ "ar": "الوصف"
3115
+ },
3116
+ "fields": [
3117
+ {
3118
+ "field": "alt",
3119
+ "component": "text",
3120
+ "decided": "table"
3121
+ }
3122
+ ]
3123
+ },
3124
+ {
3125
+ "section": "file",
3126
+ "label": {
3127
+ "en": "File",
3128
+ "ar": "الملف"
3129
+ },
3130
+ "fields": [
3131
+ {
3132
+ "field": "filename",
3133
+ "component": "text",
3134
+ "decided": "table"
3135
+ },
3136
+ {
3137
+ "field": "mimeType",
3138
+ "component": "text",
3139
+ "decided": "table"
3140
+ },
3141
+ {
3142
+ "row": [
3143
+ {
3144
+ "field": "width",
3145
+ "component": "number",
3146
+ "decided": "table"
3147
+ },
3148
+ {
3149
+ "field": "height",
3150
+ "component": "number",
3151
+ "decided": "table"
3152
+ }
3153
+ ]
3154
+ }
3155
+ ]
3156
+ }
3157
+ ]
3158
+ }
3159
+ ],
3160
+ "side": [
3161
+ {
3162
+ "component": "@asas/media:./media/ui/preview.tsx#MediaPreview"
3163
+ }
3164
+ ],
3165
+ "danger": [
3166
+ {
3167
+ "button": "delete",
3168
+ "label": {
3169
+ "en": "Delete",
3170
+ "ar": "حذف"
3171
+ }
3172
+ }
3173
+ ]
3174
+ }
3175
+ ]
3176
+ }
3177
+ }
3178
+ }
3179
+ },
3180
+ "roles": {
3181
+ "name": "roles",
3182
+ "single": false,
3183
+ "fields": [
3184
+ {
3185
+ "name": "id",
3186
+ "kind": "uuid",
3187
+ "label": {
3188
+ "en": "ID",
3189
+ "ar": "المعرف"
3190
+ },
3191
+ "rules": {
3192
+ "required": false
3193
+ },
3194
+ "component": "uuid",
3195
+ "cell": "uuid"
3196
+ },
3197
+ {
3198
+ "name": "updatedAt",
3199
+ "kind": "datetime",
3200
+ "label": {
3201
+ "en": "Updated at",
3202
+ "ar": "تاريخ التعديل"
3203
+ },
3204
+ "rules": {
3205
+ "required": true,
3206
+ "defaultNow": true,
3207
+ "nowOnUpdate": true,
3208
+ "providedBy": {
3209
+ "create": "application",
3210
+ "update": "application"
3211
+ }
3212
+ },
3213
+ "component": "datetime",
3214
+ "cell": "datetime"
3215
+ },
3216
+ {
3217
+ "name": "createdAt",
3218
+ "kind": "datetime",
3219
+ "label": {
3220
+ "en": "Created at",
3221
+ "ar": "تاريخ الإنشاء"
3222
+ },
3223
+ "rules": {
3224
+ "required": true,
3225
+ "defaultNow": true,
3226
+ "index": true,
3227
+ "providedBy": {
3228
+ "create": "application",
3229
+ "update": "application"
3230
+ }
3231
+ },
3232
+ "component": "datetime",
3233
+ "cell": "datetime"
3234
+ },
3235
+ {
3236
+ "name": "organization",
3237
+ "kind": "relationship",
3238
+ "label": {
3239
+ "en": "Organization",
3240
+ "ar": "المؤسسة"
3241
+ },
3242
+ "rules": {
3243
+ "required": true,
3244
+ "index": true,
3245
+ "providedBy": {
3246
+ "create": "application",
3247
+ "update": "never"
3248
+ },
3249
+ "onDelete": "restrict"
3250
+ },
3251
+ "relationTo": "organization",
3252
+ "component": "relationship",
3253
+ "cell": "relationship"
3254
+ },
3255
+ {
3256
+ "name": "name",
3257
+ "kind": "text",
3258
+ "label": {
3259
+ "en": "Name",
3260
+ "ar": "الاسم"
3261
+ },
3262
+ "rules": {
3263
+ "required": true,
3264
+ "unique": true,
3265
+ "trim": true,
3266
+ "maxLength": 60,
3267
+ "index": true
3268
+ },
3269
+ "component": "text",
3270
+ "cell": "text"
3271
+ },
3272
+ {
3273
+ "name": "label",
3274
+ "kind": "text",
3275
+ "label": {
3276
+ "en": "Label",
3277
+ "ar": "التسمية"
3278
+ },
3279
+ "rules": {
3280
+ "required": true,
3281
+ "localized": true,
3282
+ "trim": true,
3283
+ "maxLength": 60
3284
+ },
3285
+ "component": "text",
3286
+ "cell": "text"
3287
+ },
3288
+ {
3289
+ "name": "permissions",
3290
+ "kind": "textArray",
3291
+ "label": {
3292
+ "en": "Permissions",
3293
+ "ar": "الصلاحيات"
3294
+ },
3295
+ "rules": {
3296
+ "required": true
3297
+ },
3298
+ "component": "textArray",
3299
+ "cell": "textArray"
3300
+ }
3301
+ ],
3302
+ "operations": [
3303
+ {
3304
+ "name": "create",
3305
+ "effect": "create"
3306
+ },
3307
+ {
3308
+ "name": "update",
3309
+ "effect": "update"
3310
+ },
3311
+ {
3312
+ "name": "delete",
3313
+ "effect": "delete"
3314
+ },
3315
+ {
3316
+ "name": "find",
3317
+ "effect": "read"
3318
+ },
3319
+ {
3320
+ "name": "findByID",
3321
+ "effect": "read"
3322
+ },
3323
+ {
3324
+ "name": "count",
3325
+ "effect": "read"
3326
+ },
3327
+ {
3328
+ "name": "updateMany",
3329
+ "effect": "update",
3330
+ "updatesMany": true
3331
+ },
3332
+ {
3333
+ "name": "deleteMany",
3334
+ "effect": "delete"
3335
+ }
3336
+ ],
3337
+ "useAsTitle": "label",
3338
+ "description": {
3339
+ "en": "What each role in this organization may see and do.",
3340
+ "ar": "ما يمكن لكل دور في هذه المؤسسة أن يراه ويفعله."
3341
+ },
3342
+ "pages": {
3343
+ "list": {
3344
+ "path": "/roles",
3345
+ "page": {
3346
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#AppShell",
3347
+ "header": [
3348
+ {
3349
+ "title": {}
3350
+ }
3351
+ ],
3352
+ "main": [
3353
+ {
3354
+ "layout": "@asas/mithaq:./src/ui/table-page.tsx#TablePage",
3355
+ "main": [
3356
+ {
3357
+ "list": {
3358
+ "columns": [
3359
+ {
3360
+ "field": "label",
3361
+ "cell": "text",
3362
+ "decided": "table"
3363
+ },
3364
+ {
3365
+ "field": "name",
3366
+ "cell": "text",
3367
+ "decided": "table"
3368
+ },
3369
+ {
3370
+ "field": "permissions",
3371
+ "cell": "textArray",
3372
+ "decided": "table"
3373
+ }
3374
+ ],
3375
+ "limit": 100
3376
+ },
3377
+ "component": "@asas/roles:./roles/ui/roles.tsx#RolesTable"
3378
+ }
3379
+ ]
3380
+ }
3381
+ ]
3382
+ }
3383
+ },
3384
+ "create": {
3385
+ "path": "/roles/new",
3386
+ "page": {
3387
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#AppShell",
3388
+ "header": [
3389
+ {
3390
+ "title": {}
3391
+ },
3392
+ {
3393
+ "controls": {}
3394
+ }
3395
+ ],
3396
+ "main": [
3397
+ {
3398
+ "layout": "@asas/mithaq:./src/ui/record-page.tsx#RecordPage",
3399
+ "main": [
3400
+ {
3401
+ "form": [
3402
+ {
3403
+ "field": "name",
3404
+ "component": "text",
3405
+ "decided": "table"
3406
+ },
3407
+ {
3408
+ "field": "label",
3409
+ "component": "text",
3410
+ "decided": "table"
3411
+ },
3412
+ {
3413
+ "field": "permissions",
3414
+ "component": "textArray",
3415
+ "decided": "table"
3416
+ }
3417
+ ],
3418
+ "component": "@asas/roles:./roles/ui/role-form.tsx#RoleForm"
3419
+ }
3420
+ ]
3421
+ }
3422
+ ]
3423
+ }
3424
+ },
3425
+ "edit": {
3426
+ "path": "/roles/:id",
3427
+ "page": {
3428
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#AppShell",
3429
+ "header": [
3430
+ {
3431
+ "title": {}
3432
+ },
3433
+ {
3434
+ "controls": {}
3435
+ }
3436
+ ],
3437
+ "main": [
3438
+ {
3439
+ "layout": "@asas/mithaq:./src/ui/record-page.tsx#RecordPage",
3440
+ "main": [
3441
+ {
3442
+ "form": [
3443
+ {
3444
+ "field": "name",
3445
+ "component": "text",
3446
+ "decided": "table"
3447
+ },
3448
+ {
3449
+ "field": "label",
3450
+ "component": "text",
3451
+ "decided": "table"
3452
+ },
3453
+ {
3454
+ "field": "permissions",
3455
+ "component": "textArray",
3456
+ "decided": "table"
3457
+ }
3458
+ ],
3459
+ "component": "@asas/roles:./roles/ui/role-form.tsx#RoleForm"
3460
+ }
3461
+ ],
3462
+ "danger": [
3463
+ {
3464
+ "button": "delete",
3465
+ "label": {
3466
+ "en": "Delete",
3467
+ "ar": "حذف"
3468
+ },
3469
+ "component": "@asas/roles:./roles/ui/roles.tsx#DeleteRole"
3470
+ }
3471
+ ]
3472
+ }
3473
+ ]
3474
+ }
3475
+ }
3476
+ }
3477
+ },
3478
+ "memberRoles": {
3479
+ "name": "memberRoles",
3480
+ "single": false,
3481
+ "fields": [
3482
+ {
3483
+ "name": "id",
3484
+ "kind": "uuid",
3485
+ "label": {
3486
+ "en": "ID",
3487
+ "ar": "المعرف"
3488
+ },
3489
+ "rules": {
3490
+ "required": false
3491
+ },
3492
+ "component": "uuid",
3493
+ "cell": "uuid"
3494
+ },
3495
+ {
3496
+ "name": "updatedAt",
3497
+ "kind": "datetime",
3498
+ "label": {
3499
+ "en": "Updated at",
3500
+ "ar": "تاريخ التعديل"
3501
+ },
3502
+ "rules": {
3503
+ "required": true,
3504
+ "defaultNow": true,
3505
+ "nowOnUpdate": true,
3506
+ "providedBy": {
3507
+ "create": "application",
3508
+ "update": "application"
3509
+ }
3510
+ },
3511
+ "component": "datetime",
3512
+ "cell": "datetime"
3513
+ },
3514
+ {
3515
+ "name": "createdAt",
3516
+ "kind": "datetime",
3517
+ "label": {
3518
+ "en": "Created at",
3519
+ "ar": "تاريخ الإنشاء"
3520
+ },
3521
+ "rules": {
3522
+ "required": true,
3523
+ "defaultNow": true,
3524
+ "index": true,
3525
+ "providedBy": {
3526
+ "create": "application",
3527
+ "update": "application"
3528
+ }
3529
+ },
3530
+ "component": "datetime",
3531
+ "cell": "datetime"
3532
+ },
3533
+ {
3534
+ "name": "organization",
3535
+ "kind": "relationship",
3536
+ "label": {
3537
+ "en": "Organization",
3538
+ "ar": "المؤسسة"
3539
+ },
3540
+ "rules": {
3541
+ "required": true,
3542
+ "index": true,
3543
+ "providedBy": {
3544
+ "create": "application",
3545
+ "update": "never"
3546
+ },
3547
+ "onDelete": "restrict"
3548
+ },
3549
+ "relationTo": "organization",
3550
+ "component": "relationship",
3551
+ "cell": "relationship"
3552
+ },
3553
+ {
3554
+ "name": "user",
3555
+ "kind": "relationship",
3556
+ "label": {
3557
+ "ar": "العضو",
3558
+ "en": "Member"
3559
+ },
3560
+ "rules": {
3561
+ "required": true,
3562
+ "index": true,
3563
+ "onDelete": "cascade"
3564
+ },
3565
+ "relationTo": "user",
3566
+ "component": "relationship",
3567
+ "cell": "relationship"
3568
+ },
3569
+ {
3570
+ "name": "role",
3571
+ "kind": "text",
3572
+ "label": {
3573
+ "ar": "الدور",
3574
+ "en": "Role"
3575
+ },
3576
+ "rules": {
3577
+ "required": true,
3578
+ "maxLength": 60,
3579
+ "index": true
3580
+ },
3581
+ "component": "text",
3582
+ "cell": "text"
3583
+ }
3584
+ ],
3585
+ "operations": [
3586
+ {
3587
+ "name": "create",
3588
+ "effect": "create"
3589
+ },
3590
+ {
3591
+ "name": "update",
3592
+ "effect": "update"
3593
+ },
3594
+ {
3595
+ "name": "delete",
3596
+ "effect": "delete"
3597
+ },
3598
+ {
3599
+ "name": "find",
3600
+ "effect": "read"
3601
+ },
3602
+ {
3603
+ "name": "findByID",
3604
+ "effect": "read"
3605
+ },
3606
+ {
3607
+ "name": "count",
3608
+ "effect": "read"
3609
+ },
3610
+ {
3611
+ "name": "updateMany",
3612
+ "effect": "update",
3613
+ "updatesMany": true
3614
+ },
3615
+ {
3616
+ "name": "deleteMany",
3617
+ "effect": "delete"
3618
+ }
3619
+ ],
3620
+ "pages": {}
3621
+ },
3622
+ "settings": {
3623
+ "name": "settings",
3624
+ "single": true,
3625
+ "fields": [
3626
+ {
3627
+ "name": "id",
3628
+ "kind": "uuid",
3629
+ "label": {
3630
+ "en": "ID",
3631
+ "ar": "المعرف"
3632
+ },
3633
+ "rules": {
3634
+ "required": false
3635
+ },
3636
+ "component": "uuid",
3637
+ "cell": "uuid"
3638
+ },
3639
+ {
3640
+ "name": "updatedAt",
3641
+ "kind": "datetime",
3642
+ "label": {
3643
+ "en": "Updated at",
3644
+ "ar": "تاريخ التعديل"
3645
+ },
3646
+ "rules": {
3647
+ "required": true,
3648
+ "defaultNow": true,
3649
+ "nowOnUpdate": true,
3650
+ "providedBy": {
3651
+ "create": "application",
3652
+ "update": "application"
3653
+ }
3654
+ },
3655
+ "component": "datetime",
3656
+ "cell": "datetime"
3657
+ },
3658
+ {
3659
+ "name": "createdAt",
3660
+ "kind": "datetime",
3661
+ "label": {
3662
+ "en": "Created at",
3663
+ "ar": "تاريخ الإنشاء"
3664
+ },
3665
+ "rules": {
3666
+ "required": true,
3667
+ "defaultNow": true,
3668
+ "index": true,
3669
+ "providedBy": {
3670
+ "create": "application",
3671
+ "update": "application"
3672
+ }
3673
+ },
3674
+ "component": "datetime",
3675
+ "cell": "datetime"
3676
+ },
3677
+ {
3678
+ "name": "organization",
3679
+ "kind": "relationship",
3680
+ "label": {
3681
+ "en": "Organization",
3682
+ "ar": "المؤسسة"
3683
+ },
3684
+ "rules": {
3685
+ "required": true,
3686
+ "index": true,
3687
+ "providedBy": {
3688
+ "create": "application",
3689
+ "update": "never"
3690
+ },
3691
+ "onDelete": "restrict",
3692
+ "unique": true
3693
+ },
3694
+ "relationTo": "organization",
3695
+ "component": "relationship",
3696
+ "cell": "relationship"
3697
+ },
3698
+ {
3699
+ "name": "maintenance",
3700
+ "kind": "checkbox",
3701
+ "label": {
3702
+ "en": "Maintenance",
3703
+ "ar": "الصيانة"
3704
+ },
3705
+ "rules": {
3706
+ "required": false
3707
+ },
3708
+ "description": {
3709
+ "en": "While this is on, the portal tells students it is closed for maintenance. Staff keep working.",
3710
+ "ar": "ما دام هذا مفعلا، تخبر البوابة الطلاب بأنها مغلقة للصيانة. ويواصل الموظفون عملهم."
3711
+ },
3712
+ "component": "checkbox",
3713
+ "cell": "checkbox"
3714
+ },
3715
+ {
3716
+ "name": "contactEmail",
3717
+ "kind": "email",
3718
+ "label": {
3719
+ "en": "Contact email",
3720
+ "ar": "بريد التواصل"
3721
+ },
3722
+ "rules": {
3723
+ "required": false
3724
+ },
3725
+ "component": "email",
3726
+ "cell": "email"
3727
+ },
3728
+ {
3729
+ "name": "globalType",
3730
+ "kind": "text",
3731
+ "label": {
3732
+ "en": "Global type",
3733
+ "ar": "النوع العام"
3734
+ },
3735
+ "rules": {
3736
+ "required": true
3737
+ },
3738
+ "component": "text",
3739
+ "cell": "text"
3740
+ }
3741
+ ],
3742
+ "operations": [
3743
+ {
3744
+ "name": "update",
3745
+ "effect": "update"
3746
+ },
3747
+ {
3748
+ "name": "findOne",
3749
+ "effect": "read"
3750
+ }
3751
+ ],
3752
+ "description": {
3753
+ "en": "Where students reach the school, and whether the portal is open to them.",
3754
+ "ar": "أين يتواصل الطلاب مع المدرسة، وهل البوابة مفتوحة لهم."
3755
+ },
3756
+ "pages": {
3757
+ "settings": {
3758
+ "path": "/settings",
3759
+ "page": {
3760
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#AppShell",
3761
+ "header": [
3762
+ {
3763
+ "title": {}
3764
+ },
3765
+ {
3766
+ "controls": {}
3767
+ }
3768
+ ],
3769
+ "main": [
3770
+ {
3771
+ "layout": "@asas/mithaq:./src/ui/record-page.tsx#RecordPage",
3772
+ "main": [
3773
+ {
3774
+ "form": [
3775
+ {
3776
+ "section": "contact",
3777
+ "label": {
3778
+ "en": "Contact",
3779
+ "ar": "التواصل"
3780
+ },
3781
+ "fields": [
3782
+ {
3783
+ "field": "contactEmail",
3784
+ "component": "email",
3785
+ "decided": "table"
3786
+ }
3787
+ ]
3788
+ },
3789
+ {
3790
+ "section": "availability",
3791
+ "label": {
3792
+ "en": "Availability",
3793
+ "ar": "الإتاحة"
3794
+ },
3795
+ "fields": [
3796
+ {
3797
+ "field": "maintenance",
3798
+ "component": "switch",
3799
+ "decided": "leaf"
3800
+ }
3801
+ ]
3802
+ }
3803
+ ]
3804
+ }
3805
+ ]
3806
+ }
3807
+ ]
3808
+ }
3809
+ }
3810
+ }
3811
+ },
3812
+ "user": {
3813
+ "name": "user",
3814
+ "single": false,
3815
+ "fields": [
3816
+ {
3817
+ "name": "id",
3818
+ "kind": "text",
3819
+ "rules": {
3820
+ "required": false
3821
+ },
3822
+ "component": "text",
3823
+ "cell": "text"
3824
+ },
3825
+ {
3826
+ "name": "updatedAt",
3827
+ "kind": "datetime",
3828
+ "rules": {
3829
+ "required": true,
3830
+ "nowOnUpdate": true,
3831
+ "providedBy": {
3832
+ "update": "application"
3833
+ }
3834
+ },
3835
+ "component": "datetime",
3836
+ "cell": "datetime"
3837
+ },
3838
+ {
3839
+ "name": "createdAt",
3840
+ "kind": "datetime",
3841
+ "rules": {
3842
+ "required": true
3843
+ },
3844
+ "component": "datetime",
3845
+ "cell": "datetime"
3846
+ },
3847
+ {
3848
+ "name": "name",
3849
+ "kind": "text",
3850
+ "rules": {
3851
+ "required": true
3852
+ },
3853
+ "component": "text",
3854
+ "cell": "text"
3855
+ },
3856
+ {
3857
+ "name": "email",
3858
+ "kind": "text",
3859
+ "rules": {
3860
+ "required": true,
3861
+ "unique": true
3862
+ },
3863
+ "component": "text",
3864
+ "cell": "text"
3865
+ },
3866
+ {
3867
+ "name": "emailVerified",
3868
+ "kind": "checkbox",
3869
+ "rules": {
3870
+ "required": true
3871
+ },
3872
+ "component": "checkbox",
3873
+ "cell": "checkbox"
3874
+ },
3875
+ {
3876
+ "name": "image",
3877
+ "kind": "text",
3878
+ "rules": {
3879
+ "required": false
3880
+ },
3881
+ "component": "text",
3882
+ "cell": "text"
3883
+ },
3884
+ {
3885
+ "name": "role",
3886
+ "kind": "text",
3887
+ "rules": {
3888
+ "required": false
3889
+ },
3890
+ "component": "text",
3891
+ "cell": "text"
3892
+ },
3893
+ {
3894
+ "name": "banned",
3895
+ "kind": "checkbox",
3896
+ "rules": {
3897
+ "required": false
3898
+ },
3899
+ "component": "checkbox",
3900
+ "cell": "checkbox"
3901
+ },
3902
+ {
3903
+ "name": "banReason",
3904
+ "kind": "text",
3905
+ "rules": {
3906
+ "required": false
3907
+ },
3908
+ "component": "text",
3909
+ "cell": "text"
3910
+ },
3911
+ {
3912
+ "name": "banExpires",
3913
+ "kind": "datetime",
3914
+ "rules": {
3915
+ "required": false
3916
+ },
3917
+ "component": "datetime",
3918
+ "cell": "datetime"
3919
+ }
3920
+ ],
3921
+ "operations": [
3922
+ {
3923
+ "name": "create",
3924
+ "effect": "create"
3925
+ },
3926
+ {
3927
+ "name": "update",
3928
+ "effect": "update"
3929
+ },
3930
+ {
3931
+ "name": "delete",
3932
+ "effect": "delete"
3933
+ },
3934
+ {
3935
+ "name": "find",
3936
+ "effect": "read"
3937
+ },
3938
+ {
3939
+ "name": "findByID",
3940
+ "effect": "read"
3941
+ },
3942
+ {
3943
+ "name": "count",
3944
+ "effect": "read"
3945
+ },
3946
+ {
3947
+ "name": "updateMany",
3948
+ "effect": "update",
3949
+ "updatesMany": true
3950
+ },
3951
+ {
3952
+ "name": "deleteMany",
3953
+ "effect": "delete"
3954
+ }
3955
+ ],
3956
+ "useAsTitle": "name",
3957
+ "pages": {}
3958
+ },
3959
+ "organization": {
3960
+ "name": "organization",
3961
+ "single": false,
3962
+ "fields": [
3963
+ {
3964
+ "name": "id",
3965
+ "kind": "text",
3966
+ "rules": {
3967
+ "required": false
3968
+ },
3969
+ "component": "text",
3970
+ "cell": "text"
3971
+ },
3972
+ {
3973
+ "name": "updatedAt",
3974
+ "kind": "datetime",
3975
+ "label": {
3976
+ "en": "Updated at",
3977
+ "ar": "تاريخ التعديل"
3978
+ },
3979
+ "rules": {
3980
+ "required": true,
3981
+ "defaultNow": true,
3982
+ "nowOnUpdate": true,
3983
+ "providedBy": {
3984
+ "create": "application",
3985
+ "update": "application"
3986
+ }
3987
+ },
3988
+ "component": "datetime",
3989
+ "cell": "datetime"
3990
+ },
3991
+ {
3992
+ "name": "createdAt",
3993
+ "kind": "datetime",
3994
+ "rules": {
3995
+ "required": true
3996
+ },
3997
+ "component": "datetime",
3998
+ "cell": "datetime"
3999
+ },
4000
+ {
4001
+ "name": "name",
4002
+ "kind": "text",
4003
+ "rules": {
4004
+ "required": true
4005
+ },
4006
+ "component": "text",
4007
+ "cell": "text"
4008
+ },
4009
+ {
4010
+ "name": "slug",
4011
+ "kind": "text",
4012
+ "rules": {
4013
+ "required": true,
4014
+ "unique": true
4015
+ },
4016
+ "component": "text",
4017
+ "cell": "text"
4018
+ },
4019
+ {
4020
+ "name": "logo",
4021
+ "kind": "text",
4022
+ "rules": {
4023
+ "required": false
4024
+ },
4025
+ "component": "text",
4026
+ "cell": "text"
4027
+ },
4028
+ {
4029
+ "name": "metadata",
4030
+ "kind": "text",
4031
+ "rules": {
4032
+ "required": false
4033
+ },
4034
+ "component": "text",
4035
+ "cell": "text"
4036
+ },
4037
+ {
4038
+ "name": "names",
4039
+ "kind": "text",
4040
+ "rules": {
4041
+ "required": false
4042
+ },
4043
+ "component": "text",
4044
+ "cell": "text"
4045
+ }
4046
+ ],
4047
+ "operations": [
4048
+ {
4049
+ "name": "create",
4050
+ "effect": "create"
4051
+ },
4052
+ {
4053
+ "name": "update",
4054
+ "effect": "update"
4055
+ },
4056
+ {
4057
+ "name": "delete",
4058
+ "effect": "delete"
4059
+ },
4060
+ {
4061
+ "name": "find",
4062
+ "effect": "read"
4063
+ },
4064
+ {
4065
+ "name": "findByID",
4066
+ "effect": "read"
4067
+ },
4068
+ {
4069
+ "name": "count",
4070
+ "effect": "read"
4071
+ },
4072
+ {
4073
+ "name": "updateMany",
4074
+ "effect": "update",
4075
+ "updatesMany": true
4076
+ },
4077
+ {
4078
+ "name": "deleteMany",
4079
+ "effect": "delete"
4080
+ }
4081
+ ],
4082
+ "useAsTitle": "name",
4083
+ "pages": {}
4084
+ },
4085
+ "auditLog": {
4086
+ "name": "auditLog",
4087
+ "single": false,
4088
+ "fields": [
4089
+ {
4090
+ "name": "id",
4091
+ "kind": "uuid",
4092
+ "label": {
4093
+ "en": "ID",
4094
+ "ar": "المعرف"
4095
+ },
4096
+ "rules": {
4097
+ "required": false
4098
+ },
4099
+ "component": "uuid",
4100
+ "cell": "uuid"
4101
+ },
4102
+ {
4103
+ "name": "createdAt",
4104
+ "kind": "datetime",
4105
+ "label": {
4106
+ "en": "Created at",
4107
+ "ar": "تاريخ الإنشاء"
4108
+ },
4109
+ "rules": {
4110
+ "required": true,
4111
+ "defaultNow": true,
4112
+ "index": true,
4113
+ "providedBy": {
4114
+ "create": "application",
4115
+ "update": "application"
4116
+ }
4117
+ },
4118
+ "component": "datetime",
4119
+ "cell": "datetime"
4120
+ },
4121
+ {
4122
+ "name": "organization",
4123
+ "kind": "relationship",
4124
+ "label": {
4125
+ "en": "Organization",
4126
+ "ar": "المؤسسة"
4127
+ },
4128
+ "rules": {
4129
+ "required": true,
4130
+ "index": true,
4131
+ "providedBy": {
4132
+ "create": "application",
4133
+ "update": "never"
4134
+ },
4135
+ "onDelete": "restrict"
4136
+ },
4137
+ "relationTo": "organization",
4138
+ "component": "relationship",
4139
+ "cell": "relationship"
4140
+ },
4141
+ {
4142
+ "name": "kayan",
4143
+ "kind": "text",
4144
+ "label": {
4145
+ "en": "Kayan",
4146
+ "ar": "الكيان"
4147
+ },
4148
+ "rules": {
4149
+ "required": true,
4150
+ "maxLength": 60
4151
+ },
4152
+ "component": "text",
4153
+ "cell": "text"
4154
+ },
4155
+ {
4156
+ "name": "record",
4157
+ "kind": "text",
4158
+ "label": {
4159
+ "en": "Record",
4160
+ "ar": "السجل"
4161
+ },
4162
+ "rules": {
4163
+ "required": true,
4164
+ "index": true
4165
+ },
4166
+ "component": "text",
4167
+ "cell": "text"
4168
+ },
4169
+ {
4170
+ "name": "operation",
4171
+ "kind": "text",
4172
+ "label": {
4173
+ "en": "Operation",
4174
+ "ar": "العملية"
4175
+ },
4176
+ "rules": {
4177
+ "required": true,
4178
+ "maxLength": 60
4179
+ },
4180
+ "component": "text",
4181
+ "cell": "text"
4182
+ },
4183
+ {
4184
+ "name": "actor",
4185
+ "kind": "text",
4186
+ "label": {
4187
+ "en": "Actor",
4188
+ "ar": "المنفذ"
4189
+ },
4190
+ "rules": {
4191
+ "required": false
4192
+ },
4193
+ "component": "text",
4194
+ "cell": "text"
4195
+ },
4196
+ {
4197
+ "name": "impersonatedBy",
4198
+ "kind": "text",
4199
+ "label": {
4200
+ "en": "Impersonated by",
4201
+ "ar": "انتحل الصفة"
4202
+ },
4203
+ "rules": {
4204
+ "required": false
4205
+ },
4206
+ "component": "text",
4207
+ "cell": "text"
4208
+ },
4209
+ {
4210
+ "name": "changes",
4211
+ "kind": "json",
4212
+ "label": {
4213
+ "en": "Changes",
4214
+ "ar": "التغييرات"
4215
+ },
4216
+ "rules": {
4217
+ "required": true
4218
+ },
4219
+ "component": "json",
4220
+ "cell": "json",
4221
+ "sortable": false
4222
+ }
4223
+ ],
4224
+ "operations": [
4225
+ {
4226
+ "name": "find",
4227
+ "effect": "read"
4228
+ },
4229
+ {
4230
+ "name": "findByID",
4231
+ "effect": "read"
4232
+ },
4233
+ {
4234
+ "name": "count",
4235
+ "effect": "read"
4236
+ }
4237
+ ],
4238
+ "pages": {}
4239
+ }
4240
+ },
4241
+ "maxLimit": 100
4242
+ }