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