create-mithaq 0.1.1 → 0.2.1

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 (348) hide show
  1. package/LICENSES/openstatus-time-picker.txt +21 -0
  2. package/index.js +457 -63
  3. package/package.json +1 -1
  4. package/template/apps/{asas-platform → asas-backoffice}/package.json +5 -3
  5. package/template/apps/{asas-platform → asas-backoffice}/src/api.ts +1 -1
  6. package/template/apps/{asas-platform → asas-backoffice}/src/auth-frame.tsx +12 -12
  7. package/template/apps/asas-backoffice/src/components.ts +35 -0
  8. package/template/apps/asas-backoffice/src/first-user.ts +14 -0
  9. package/template/apps/{asas-platform → asas-backoffice}/src/links.ts +1 -1
  10. package/template/apps/{asas-platform → asas-backoffice}/src/locale-switch.tsx +7 -5
  11. package/template/apps/asas-backoffice/src/no-organization.tsx +5 -0
  12. package/template/apps/asas-backoffice/src/redirect.ts +1 -0
  13. package/template/apps/{asas-platform → asas-backoffice}/src/request-headers.ts +1 -1
  14. package/template/apps/asas-backoffice/src/routeTree.gen.ts +206 -0
  15. package/template/apps/asas-backoffice/src/router.tsx +18 -0
  16. package/template/apps/asas-backoffice/src/routes/(screens)/backoffice/files.ts +10 -0
  17. package/template/apps/{asas-platform/src/routes/(screens)/platform → asas-backoffice/src/routes/(screens)/backoffice}/screen.json +426 -64
  18. package/template/apps/{asas-platform/src/routes/(screens)/platform → asas-backoffice/src/routes/(screens)/backoffice}/types.ts +18 -0
  19. package/template/apps/{asas-platform/src/routes/(screens)/platform.$.tsx → asas-backoffice/src/routes/(screens)/backoffice.$.tsx} +4 -4
  20. package/template/apps/{asas-platform/src/routes/(screens)/platform.index.tsx → asas-backoffice/src/routes/(screens)/backoffice.index.tsx} +3 -3
  21. package/template/apps/{asas-platform/src/routes/(screens)/platform.tsx → asas-backoffice/src/routes/(screens)/backoffice.tsx} +3 -3
  22. package/template/apps/{asas-platform → asas-backoffice}/src/routes/__root.tsx +2 -2
  23. package/template/apps/asas-backoffice/src/routes/api/$.ts +34 -0
  24. package/template/apps/asas-backoffice/src/routes/auth.create-first-user.tsx +113 -0
  25. package/template/apps/{asas-platform → asas-backoffice}/src/routes/auth.sign-in.tsx +9 -4
  26. package/template/apps/{asas-platform → asas-backoffice}/src/routes/unauthorized.tsx +24 -12
  27. package/template/apps/{asas-platform → asas-backoffice}/src/screen-form.tsx +5 -3
  28. package/template/apps/{asas-platform → asas-backoffice}/src/screen-list.tsx +6 -5
  29. package/template/apps/{asas-platform → asas-backoffice}/src/screen-names.ts +1 -1
  30. package/template/apps/{asas-platform → asas-backoffice}/src/screens.tsx +46 -26
  31. package/template/apps/asas-backoffice/src/server.ts +30 -0
  32. package/template/apps/{asas-platform → asas-backoffice}/src/slide.ts +1 -1
  33. package/template/apps/{asas-platform → asas-backoffice}/src/start.ts +1 -1
  34. package/template/apps/{asas-platform → asas-backoffice}/src/styles.css +9 -7
  35. package/template/apps/{asas-platform → asas-backoffice}/tsconfig.json +2 -2
  36. package/template/apps/{asas-platform → asas-backoffice}/vite.config.ts +7 -1
  37. package/template/apps/asas-tanstack/package.json +4 -2
  38. package/template/apps/asas-tanstack/src/api.ts +1 -1
  39. package/template/apps/asas-tanstack/src/auth-frame.tsx +12 -12
  40. package/template/apps/asas-tanstack/src/choose-password.tsx +150 -0
  41. package/template/apps/asas-tanstack/src/components.ts +35 -0
  42. package/template/apps/asas-tanstack/src/copy.ts +416 -79
  43. package/template/apps/asas-tanstack/src/first-run.ts +16 -0
  44. package/template/apps/asas-tanstack/src/links.ts +1 -1
  45. package/template/apps/asas-tanstack/src/locale-switch.tsx +7 -5
  46. package/template/apps/asas-tanstack/src/no-organization.tsx +108 -0
  47. package/template/apps/asas-tanstack/src/redirect.ts +20 -1
  48. package/template/apps/asas-tanstack/src/request-headers.ts +1 -1
  49. package/template/apps/asas-tanstack/src/routeTree.gen.ts +42 -0
  50. package/template/apps/asas-tanstack/src/router.tsx +12 -1
  51. package/template/apps/asas-tanstack/src/routes/(screens)/dashboard/files.ts +9 -2
  52. package/template/apps/asas-tanstack/src/routes/(screens)/dashboard/screen.json +475 -116
  53. package/template/apps/asas-tanstack/src/routes/(screens)/dashboard/types.ts +4 -2
  54. package/template/apps/asas-tanstack/src/routes/(screens)/portal/files.ts +7 -2
  55. package/template/apps/asas-tanstack/src/routes/(screens)/portal/screen.json +83 -319
  56. package/template/apps/asas-tanstack/src/routes/(screens)/portal/types.ts +3 -1
  57. package/template/apps/asas-tanstack/src/routes/__root.tsx +1 -1
  58. package/template/apps/asas-tanstack/src/routes/auth.accept-invitation.tsx +14 -7
  59. package/template/apps/asas-tanstack/src/routes/auth.first-run.tsx +114 -0
  60. package/template/apps/asas-tanstack/src/routes/auth.forgot-password.tsx +2 -2
  61. package/template/apps/asas-tanstack/src/routes/auth.handoff.ts +5 -5
  62. package/template/apps/asas-tanstack/src/routes/auth.reset-password.tsx +7 -100
  63. package/template/apps/asas-tanstack/src/routes/auth.set-password.tsx +16 -0
  64. package/template/apps/asas-tanstack/src/routes/auth.sign-in.tsx +27 -15
  65. package/template/apps/asas-tanstack/src/routes/auth.sign-up.tsx +59 -38
  66. package/template/apps/asas-tanstack/src/routes/index.tsx +18 -14
  67. package/template/apps/asas-tanstack/src/routes/unauthorized.tsx +24 -12
  68. package/template/apps/asas-tanstack/src/screen-form.tsx +5 -3
  69. package/template/apps/asas-tanstack/src/screen-list.tsx +6 -5
  70. package/template/apps/asas-tanstack/src/screen-names.ts +1 -1
  71. package/template/apps/asas-tanstack/src/screens.tsx +46 -26
  72. package/template/apps/asas-tanstack/src/server.ts +10 -0
  73. package/template/apps/asas-tanstack/src/slide.ts +1 -1
  74. package/template/apps/asas-tanstack/src/styles.css +7 -3
  75. package/template/apps/asas-tanstack/tsconfig.json +2 -2
  76. package/template/apps/asas-tanstack/vite.config.ts +7 -1
  77. package/template/package.json +3 -3
  78. package/template/templates/asas/.claude/skills/add-field/SKILL.md +27 -0
  79. package/template/templates/asas/.claude/skills/add-kayan/SKILL.md +26 -0
  80. package/template/templates/asas/.claude/skills/eject-admin-piece/SKILL.md +28 -0
  81. package/template/templates/asas/.claude/skills/upgrade-mithaq/SKILL.md +35 -0
  82. package/template/templates/asas/.env.example +22 -5
  83. package/template/templates/asas/AGENTS.md +101 -0
  84. package/template/templates/asas/CLAUDE.md +1 -0
  85. package/template/templates/asas/README.md +1094 -0
  86. package/template/templates/asas/package.json +19 -4
  87. package/template/templates/asas/src/asas.ts +81 -56
  88. package/template/templates/asas/src/{platform-http.ts → backoffice-http.ts} +48 -27
  89. package/template/templates/asas/src/dev-setup.ts +112 -0
  90. package/template/templates/asas/src/local-database.ts +22 -0
  91. package/template/templates/asas/src/messages/account.json +129 -103
  92. package/template/templates/asas/src/messages/auditLog.json +223 -105
  93. package/template/templates/asas/src/messages/backofficeLog.json +132 -0
  94. package/template/templates/asas/src/messages/courses.json +256 -214
  95. package/template/templates/asas/src/messages/enrollments.json +45 -27
  96. package/template/templates/asas/src/messages/invitation.json +72 -56
  97. package/template/templates/asas/src/messages/localUsers.json +34 -28
  98. package/template/templates/asas/src/messages/media.json +31 -21
  99. package/template/templates/asas/src/messages/member.json +59 -39
  100. package/template/templates/asas/src/messages/memberRoles.json +37 -31
  101. package/template/templates/asas/src/messages/mithaq.json +206 -162
  102. package/template/templates/asas/src/messages/organization.json +63 -41
  103. package/template/templates/asas/src/messages/organizationRole.json +59 -47
  104. package/template/templates/asas/src/messages/roles.json +59 -45
  105. package/template/templates/asas/src/messages/session.json +99 -79
  106. package/template/templates/asas/src/messages/sessions.json +110 -80
  107. package/template/templates/asas/src/messages/settings.json +51 -53
  108. package/template/templates/asas/src/messages/tags.json +31 -21
  109. package/template/templates/asas/src/messages/user.json +109 -87
  110. package/template/templates/asas/src/messages/verification.json +59 -47
  111. package/template/templates/asas/src/migrations/20261014221355_tags_restrict/migration.sql +1 -0
  112. package/template/templates/asas/src/migrations/20261014221355_tags_restrict/snapshot.json +3881 -0
  113. package/template/templates/asas/src/migrations/20261014222218_one_seat_per_session/migration.sql +1 -0
  114. package/template/templates/asas/src/migrations/20261014222218_one_seat_per_session/snapshot.json +3894 -0
  115. package/template/templates/asas/src/migrations/20261014223522_session_archive_reason/migration.sql +1 -0
  116. package/template/templates/asas/src/migrations/20261014223522_session_archive_reason/snapshot.json +3907 -0
  117. package/template/templates/asas/src/migrations/20261014225728_course_archive_by_operation/migration.sql +1 -0
  118. package/template/templates/asas/src/migrations/20261014225728_course_archive_by_operation/snapshot.json +3907 -0
  119. package/template/templates/asas/src/migrations/20261015042444_organization_names/migration.sql +1 -0
  120. package/template/templates/asas/src/migrations/20261015042444_organization_names/snapshot.json +3920 -0
  121. package/template/templates/asas/src/migrations/20261015053212_member_last_seen/migration.sql +1 -0
  122. package/template/templates/asas/src/migrations/20261015053212_member_last_seen/snapshot.json +3933 -0
  123. package/template/templates/asas/src/migrations/20261015093203_activity_and_staff_history/migration.sql +15 -0
  124. package/template/templates/asas/src/migrations/20261015093203_activity_and_staff_history/snapshot.json +4113 -0
  125. package/template/templates/asas/src/migrations/20261015095752_portal/migration.sql +2 -0
  126. package/template/templates/asas/src/migrations/20261015095752_portal/snapshot.json +4113 -0
  127. package/template/templates/asas/src/migrations/20261015135529_better_auth_indexes/migration.sql +9 -0
  128. package/template/templates/asas/src/migrations/20261015135529_better_auth_indexes/snapshot.json +4302 -0
  129. package/template/templates/asas/src/migrations/20261015162438_audit_changes_json/migration.sql +27 -0
  130. package/template/templates/asas/src/migrations/20261015162438_audit_changes_json/snapshot.json +4289 -0
  131. package/template/templates/asas/src/migrations/schema.ts +1 -0
  132. package/template/templates/asas/src/mithaq.ts +4 -406
  133. package/template/templates/asas/src/organizations.ts +3 -0
  134. package/template/templates/asas/src/seed.ts +147 -45
  135. package/template/templates/asas/src/{ui-platform → ui-backoffice}/home.tsx +9 -9
  136. package/template/templates/asas/src/ui-backoffice/organization-actions.tsx +121 -0
  137. package/template/templates/asas/src/{ui-platform → ui-backoffice}/record-page.tsx +4 -4
  138. package/template/templates/asas/src/{ui-platform → ui-backoffice}/role-cells.tsx +13 -6
  139. package/template/templates/asas/src/{ui-platform → ui-backoffice}/user-actions.tsx +46 -48
  140. package/template/templates/asas/src/ui-dashboard/dashboard.tsx +10 -4
  141. package/template/templates/asas/src/ui-dashboard/home.tsx +73 -0
  142. package/template/templates/asas/src/ui-dashboard/members-card.tsx +147 -0
  143. package/template/templates/asas/src/ui-dashboard/members.tsx +637 -438
  144. package/template/templates/asas/src/ui-dashboard/versions.tsx +22 -8
  145. package/template/templates/asas/src/ui-portal/courses-home.tsx +96 -0
  146. package/template/templates/asas/src/ui-portal/home.tsx +9 -13
  147. package/template/templates/features/audit-log/audit-log/audit-log.ts +284 -0
  148. package/template/templates/features/audit-log/backoffice-log/backoffice-log.ts +67 -0
  149. package/template/templates/features/audit-log/index.ts +4 -0
  150. package/template/templates/features/audit-log/package.json +13 -0
  151. package/template/templates/features/auth/index.ts +11 -0
  152. package/template/templates/{asas/src → features/auth}/local-users/local-users.ts +7 -7
  153. package/template/templates/{auth → features/auth}/package.json +2 -3
  154. package/template/templates/{asas/src/kayan → features}/auth/user/account.access.ts +2 -2
  155. package/template/templates/{asas/src/kayan → features}/auth/user/account.ts +2 -2
  156. package/template/templates/{asas/src/kayan → features}/auth/user/invitation.access.ts +1 -1
  157. package/template/templates/{asas/src/kayan → features}/auth/user/invitation.ts +3 -3
  158. package/template/templates/{asas/src/kayan → features}/auth/user/member.access.ts +4 -4
  159. package/template/templates/{asas/src/kayan → features}/auth/user/member.screens.ts +5 -5
  160. package/template/templates/{asas/src/kayan → features}/auth/user/member.ts +4 -3
  161. package/template/templates/{asas/src/kayan → features}/auth/user/organization.access.ts +6 -6
  162. package/template/templates/{asas/src/kayan → features}/auth/user/organization.screens.ts +6 -6
  163. package/template/templates/{asas/src/kayan → features}/auth/user/organization.ts +2 -1
  164. package/template/templates/{asas/src/kayan → features}/auth/user/organizationRole.access.ts +2 -2
  165. package/template/templates/{asas/src/kayan → features}/auth/user/organizationRole.ts +3 -3
  166. package/template/templates/{asas/src/kayan → features}/auth/user/session.access.ts +2 -2
  167. package/template/templates/{asas/src/kayan → features}/auth/user/session.ts +2 -2
  168. package/template/templates/{asas/src/kayan → features}/auth/user/user.access.ts +8 -7
  169. package/template/templates/{asas/src/kayan → features}/auth/user/user.screens.ts +9 -9
  170. package/template/templates/{asas/src/kayan → features}/auth/user/user.ts +2 -2
  171. package/template/templates/{asas/src/kayan → features}/auth/user/verification.access.ts +2 -2
  172. package/template/templates/{asas/src/kayan → features}/auth/user/verification.ts +2 -2
  173. package/template/templates/{asas/src → features/courses}/courses/courses.ts +122 -133
  174. package/template/templates/features/courses/courses/cover-reads.ts +33 -0
  175. package/template/templates/features/courses/courses/ui/archived-badge.tsx +9 -0
  176. package/template/templates/{asas/src → features/courses}/courses/ui/fee-cell.tsx +1 -1
  177. package/template/templates/{asas/src → features/courses}/courses/ui/status-cell.tsx +5 -3
  178. package/template/templates/features/courses/courses/ui/unpublish-button.tsx +15 -0
  179. package/template/templates/features/courses/domain/archive.ts +39 -0
  180. package/template/templates/features/courses/domain/on-offer.ts +6 -0
  181. package/template/templates/features/courses/enrollments/enrollments.ts +309 -0
  182. package/template/templates/{asas/src → features/courses}/enrollments/ui/session-cell.tsx +17 -7
  183. package/template/templates/{asas/src → features/courses/enrollments}/ui/session-labels.tsx +3 -3
  184. package/template/templates/features/courses/index.ts +8 -0
  185. package/template/templates/features/courses/package.json +24 -0
  186. package/template/templates/features/courses/portal/ui/catalogue.tsx +86 -0
  187. package/template/templates/features/courses/portal/ui/course.tsx +176 -0
  188. package/template/templates/features/courses/portal/ui/enrollments.tsx +170 -0
  189. package/template/templates/features/courses/portal/ui/parts.tsx +95 -0
  190. package/template/templates/features/courses/portal/ui/reads.ts +76 -0
  191. package/template/templates/features/courses/portal/ui/rules.ts +87 -0
  192. package/template/templates/features/courses/portal/ui/shell.tsx +194 -0
  193. package/template/templates/features/courses/sessions/seats.ts +42 -0
  194. package/template/templates/{asas/src → features/courses}/sessions/sessions.ts +45 -14
  195. package/template/templates/features/media/index.ts +10 -0
  196. package/template/templates/{asas/src → features/media}/media/media.ts +34 -40
  197. package/template/templates/{asas/src → features/media}/media/ui/preview.tsx +2 -2
  198. package/template/templates/features/media/package.json +19 -0
  199. package/template/templates/features/roles/index.ts +4 -0
  200. package/template/templates/{asas/src → features/roles}/member-roles/member-roles.ts +15 -15
  201. package/template/templates/features/roles/package.json +21 -0
  202. package/template/templates/{asas/src → features/roles}/roles/roles.ts +23 -23
  203. package/template/templates/{asas/src → features/roles}/roles/ui/role-form.tsx +65 -24
  204. package/template/templates/{asas/src → features/roles}/roles/ui/roles.tsx +49 -25
  205. package/template/templates/features/settings/index.ts +3 -0
  206. package/template/templates/features/settings/package.json +13 -0
  207. package/template/templates/{asas/src → features/settings}/settings/settings.ts +12 -17
  208. package/template/templates/features/tags/index.ts +3 -0
  209. package/template/templates/features/tags/package.json +14 -0
  210. package/template/templates/{asas/src → features/tags}/tags/tags.ts +15 -15
  211. package/template/templates/mithaq/package.json +33 -0
  212. package/template/templates/mithaq/src/mail/index.ts +32 -0
  213. package/template/templates/mithaq/src/mail/mailers.ts +36 -0
  214. package/template/templates/{asas/src/audit-log/sink.ts → mithaq/src/mithaq/audit-sink.ts} +31 -9
  215. package/template/templates/{auth/src/platform-roles.ts → mithaq/src/mithaq/auth/backoffice-roles.ts} +44 -23
  216. package/template/templates/mithaq/src/mithaq/auth/index.ts +1859 -0
  217. package/template/templates/mithaq/src/mithaq/auth/organizations.ts +80 -0
  218. package/template/templates/{asas/src → mithaq/src/mithaq}/pages.ts +16 -7
  219. package/template/templates/mithaq/src/mithaq/rich-text-nodes.ts +19 -0
  220. package/template/templates/mithaq/src/mithaq.ts +593 -0
  221. package/template/templates/mithaq/src/roles/default-member-roles.ts +29 -0
  222. package/template/templates/{asas → mithaq}/src/roles/grants.ts +1 -1
  223. package/template/templates/mithaq/src/roles/member-access.ts +11 -0
  224. package/template/templates/{asas/src → mithaq/src/roles}/statements.ts +6 -4
  225. package/template/templates/mithaq/src/roles/system-roles.ts +16 -0
  226. package/template/templates/{asas/src → mithaq/src/roles}/tenant-access.ts +96 -57
  227. package/template/templates/{asas/src → mithaq/src/roles}/tenant-roles.ts +84 -25
  228. package/template/templates/{asas → mithaq}/src/steps/expected-updated-at.ts +2 -2
  229. package/template/templates/{asas → mithaq}/src/storage/index.ts +3 -1
  230. package/template/templates/mithaq/src/ui/activity-page.tsx +33 -0
  231. package/template/templates/mithaq/src/ui/activity.tsx +527 -0
  232. package/template/templates/{asas → mithaq}/src/ui/app-shell.tsx +27 -19
  233. package/template/templates/mithaq/src/ui/rich-text-nodes.tsx +33 -0
  234. package/template/templates/{asas → mithaq}/src/ui/screen-nav.tsx +1 -1
  235. package/template/templates/{asas → mithaq}/src/ui/top-shell.tsx +8 -8
  236. package/template/apps/asas-platform/src/components/mithaq/cells.tsx +0 -112
  237. package/template/apps/asas-platform/src/components/mithaq/controls.tsx +0 -650
  238. package/template/apps/asas-platform/src/components/mithaq/field-shell.tsx +0 -53
  239. package/template/apps/asas-platform/src/components/mithaq/filter-operators.ts +0 -108
  240. package/template/apps/asas-platform/src/components/mithaq/form.tsx +0 -1467
  241. package/template/apps/asas-platform/src/components/mithaq/list-columns.tsx +0 -108
  242. package/template/apps/asas-platform/src/components/mithaq/list-filters.tsx +0 -368
  243. package/template/apps/asas-platform/src/components/mithaq/list-pagination.tsx +0 -153
  244. package/template/apps/asas-platform/src/components/mithaq/list-query.ts +0 -432
  245. package/template/apps/asas-platform/src/components/mithaq/list-selection.tsx +0 -74
  246. package/template/apps/asas-platform/src/components/mithaq/list.tsx +0 -865
  247. package/template/apps/asas-platform/src/components/mithaq/nav.tsx +0 -871
  248. package/template/apps/asas-platform/src/components/mithaq/nodes.tsx +0 -1024
  249. package/template/apps/asas-platform/src/components/mithaq/relationship-cell.tsx +0 -127
  250. package/template/apps/asas-platform/src/components/mithaq/relationship-control.tsx +0 -400
  251. package/template/apps/asas-platform/src/components/mithaq/rich-text-nodes.ts +0 -6
  252. package/template/apps/asas-platform/src/components/mithaq/rich-text.tsx +0 -1083
  253. package/template/apps/asas-platform/src/components/mithaq/upload.tsx +0 -686
  254. package/template/apps/asas-platform/src/components/ui/drawer.tsx +0 -216
  255. package/template/apps/asas-platform/src/redirect.ts +0 -1
  256. package/template/apps/asas-platform/src/routeTree.gen.ts +0 -181
  257. package/template/apps/asas-platform/src/router.tsx +0 -7
  258. package/template/apps/asas-platform/src/routes/(screens)/platform/files.ts +0 -4
  259. package/template/apps/asas-platform/src/routes/api/$.ts +0 -30
  260. package/template/apps/asas-platform/src/server.ts +0 -20
  261. package/template/apps/asas-tanstack/src/components/mithaq/cells.tsx +0 -112
  262. package/template/apps/asas-tanstack/src/components/mithaq/controls.tsx +0 -650
  263. package/template/apps/asas-tanstack/src/components/mithaq/field-shell.tsx +0 -53
  264. package/template/apps/asas-tanstack/src/components/mithaq/filter-operators.ts +0 -108
  265. package/template/apps/asas-tanstack/src/components/mithaq/form.tsx +0 -1467
  266. package/template/apps/asas-tanstack/src/components/mithaq/list-columns.tsx +0 -108
  267. package/template/apps/asas-tanstack/src/components/mithaq/list-filters.tsx +0 -368
  268. package/template/apps/asas-tanstack/src/components/mithaq/list-pagination.tsx +0 -153
  269. package/template/apps/asas-tanstack/src/components/mithaq/list-query.ts +0 -432
  270. package/template/apps/asas-tanstack/src/components/mithaq/list-selection.tsx +0 -74
  271. package/template/apps/asas-tanstack/src/components/mithaq/list.tsx +0 -865
  272. package/template/apps/asas-tanstack/src/components/mithaq/nav.tsx +0 -871
  273. package/template/apps/asas-tanstack/src/components/mithaq/nodes.tsx +0 -1024
  274. package/template/apps/asas-tanstack/src/components/mithaq/relationship-cell.tsx +0 -127
  275. package/template/apps/asas-tanstack/src/components/mithaq/relationship-control.tsx +0 -400
  276. package/template/apps/asas-tanstack/src/components/mithaq/rich-text-nodes.ts +0 -6
  277. package/template/apps/asas-tanstack/src/components/mithaq/rich-text.tsx +0 -1083
  278. package/template/apps/asas-tanstack/src/components/mithaq/upload.tsx +0 -686
  279. package/template/apps/asas-tanstack/src/components/ui/drawer.tsx +0 -215
  280. package/template/templates/asas/src/audit-log/audit-log.ts +0 -187
  281. package/template/templates/asas/src/audit-log/ui/activity.tsx +0 -243
  282. package/template/templates/asas/src/courses/ui/archive-button.tsx +0 -25
  283. package/template/templates/asas/src/courses/ui/no-courses-on-offer.tsx +0 -11
  284. package/template/templates/asas/src/courses/ui/on-offer.ts +0 -6
  285. package/template/templates/asas/src/enrollments/enrollments.ts +0 -137
  286. package/template/templates/asas/src/rich-text-nodes.ts +0 -11
  287. package/template/templates/asas/src/roles.ts +0 -16
  288. package/template/templates/asas/src/ui/rich-text-nodes.tsx +0 -15
  289. package/template/templates/asas/src/ui-platform/organization-actions.tsx +0 -114
  290. package/template/templates/auth/src/index.ts +0 -690
  291. /package/template/apps/{asas-platform → asas-backoffice}/components.json +0 -0
  292. /package/template/apps/{asas-platform → asas-backoffice}/gitignore +0 -0
  293. /package/template/apps/{asas-platform → asas-backoffice}/public/favicon.svg +0 -0
  294. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/accordion.tsx +0 -0
  295. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/alert-dialog.tsx +0 -0
  296. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/avatar.tsx +0 -0
  297. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/badge.tsx +0 -0
  298. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/breadcrumb.tsx +0 -0
  299. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/button-group.tsx +0 -0
  300. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/button.tsx +0 -0
  301. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/calendar.tsx +0 -0
  302. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/card.tsx +0 -0
  303. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/chart.tsx +0 -0
  304. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/checkbox.tsx +0 -0
  305. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/collapsible.tsx +0 -0
  306. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/combobox.tsx +0 -0
  307. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/dialog.tsx +0 -0
  308. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/direction.tsx +0 -0
  309. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/directional-icon.tsx +0 -0
  310. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/dropdown-menu.tsx +0 -0
  311. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/field.tsx +0 -0
  312. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/input-group.tsx +0 -0
  313. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/input-otp.tsx +0 -0
  314. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/input.tsx +0 -0
  315. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/label.tsx +0 -0
  316. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/popover.tsx +0 -0
  317. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/radio-group.tsx +0 -0
  318. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/resizable.tsx +0 -0
  319. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/scroll-area.tsx +0 -0
  320. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/select.tsx +0 -0
  321. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/separator.tsx +0 -0
  322. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/sheet.tsx +0 -0
  323. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/sidebar.tsx +0 -0
  324. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/skeleton.tsx +0 -0
  325. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/slider.tsx +0 -0
  326. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/spinner.tsx +0 -0
  327. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/switch.tsx +0 -0
  328. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/table.tsx +0 -0
  329. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/tabs.tsx +0 -0
  330. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/textarea.tsx +0 -0
  331. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/toggle-group.tsx +0 -0
  332. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/toggle.tsx +0 -0
  333. /package/template/apps/{asas-platform → asas-backoffice}/src/components/ui/tooltip.tsx +0 -0
  334. /package/template/apps/{asas-platform → asas-backoffice}/src/copy.ts +0 -0
  335. /package/template/apps/{asas-platform → asas-backoffice}/src/hooks/use-mobile.ts +0 -0
  336. /package/template/apps/{asas-platform → asas-backoffice}/src/lib/utils.ts +0 -0
  337. /package/template/apps/{asas-platform → asas-backoffice}/src/theme.ts +0 -0
  338. /package/template/templates/{asas/src/kayan → features}/auth/user/index.ts +0 -0
  339. /package/template/templates/{asas/src → features/courses}/courses/ui/no-courses.tsx +0 -0
  340. /package/template/templates/{asas → mithaq}/components.json +0 -0
  341. /package/template/templates/{asas → mithaq}/src/storage/defaults.ts +0 -0
  342. /package/template/templates/{asas → mithaq}/src/storage/local.ts +0 -0
  343. /package/template/templates/{asas → mithaq}/src/storage/r2.ts +0 -0
  344. /package/template/templates/{asas → mithaq}/src/storage/s3.ts +0 -0
  345. /package/template/templates/{asas → mithaq}/src/storage/uploadthing.ts +0 -0
  346. /package/template/templates/{asas → mithaq}/src/ui/kpi-card.tsx +0 -0
  347. /package/template/templates/{asas → mithaq}/src/ui/record-page.tsx +0 -0
  348. /package/template/templates/{asas → mithaq}/src/ui/table-page.tsx +0 -0
@@ -1,14 +1,14 @@
1
1
  {
2
- "path": "/platform",
2
+ "path": "/backoffice",
3
3
  "providers": [
4
4
  "./src/ui-dashboard/theme-provider.tsx#ThemeProvider",
5
- "./src/ui/rich-text-nodes.tsx#RichTextNodes",
6
- "./src/ui/session-labels.tsx#SessionLabels"
5
+ "@asas/mithaq:./src/ui/rich-text-nodes.tsx#RichTextNodes",
6
+ "@asas/courses:./enrollments/ui/session-labels.tsx#SessionLabels"
7
7
  ],
8
8
  "pages": {
9
9
  "home": {
10
10
  "path": "/",
11
- "component": "./src/ui-platform/home.tsx#Home"
11
+ "component": "./src/ui-backoffice/home.tsx#Home"
12
12
  }
13
13
  },
14
14
  "nav": [
@@ -71,12 +71,18 @@
71
71
  "page": "list",
72
72
  "kayan": "localUsers",
73
73
  "permission": "localUsers.find"
74
+ },
75
+ {
76
+ "path": "/history",
77
+ "page": "list",
78
+ "kayan": "backofficeLog",
79
+ "permission": "backofficeLog.find"
74
80
  }
75
81
  ],
76
82
  "layouts": {
77
- "app": "./src/ui/app-shell.tsx#PlatformShell",
78
- "record": "./src/ui-platform/record-page.tsx#PlatformRecordPage",
79
- "table": "./src/ui/table-page.tsx#TablePage"
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"
80
86
  },
81
87
  "components": {},
82
88
  "controls": {
@@ -124,6 +130,10 @@
124
130
  "control": "relationship",
125
131
  "cell": "relationship"
126
132
  },
133
+ "json": {
134
+ "control": "json",
135
+ "cell": "json"
136
+ },
127
137
  "join": {
128
138
  "control": "join",
129
139
  "cell": "join"
@@ -287,7 +297,7 @@
287
297
  "list": {
288
298
  "path": "/users",
289
299
  "page": {
290
- "shell": "./src/ui/app-shell.tsx#PlatformShell",
300
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#BackofficeShell",
291
301
  "header": [
292
302
  {
293
303
  "title": {}
@@ -295,7 +305,7 @@
295
305
  ],
296
306
  "main": [
297
307
  {
298
- "layout": "./src/ui/table-page.tsx#TablePage",
308
+ "layout": "@asas/mithaq:./src/ui/table-page.tsx#TablePage",
299
309
  "main": [
300
310
  {
301
311
  "list": {
@@ -312,7 +322,7 @@
312
322
  },
313
323
  {
314
324
  "field": "role",
315
- "cell": "./src/ui-platform/user-actions.tsx#PlatformRole",
325
+ "cell": "./src/ui-backoffice/user-actions.tsx#BackofficeRole",
316
326
  "decided": "leaf"
317
327
  },
318
328
  {
@@ -337,7 +347,7 @@
337
347
  "name",
338
348
  "email"
339
349
  ],
340
- "menu": "./src/ui-platform/user-actions.tsx#UserMenu",
350
+ "menu": "./src/ui-backoffice/user-actions.tsx#UserMenu",
341
351
  "sort": "email"
342
352
  }
343
353
  }
@@ -349,7 +359,7 @@
349
359
  "view": {
350
360
  "path": "/users/:id",
351
361
  "page": {
352
- "shell": "./src/ui/app-shell.tsx#PlatformShell",
362
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#BackofficeShell",
353
363
  "header": [
354
364
  {
355
365
  "title": {}
@@ -357,10 +367,10 @@
357
367
  ],
358
368
  "main": [
359
369
  {
360
- "layout": "./src/ui-platform/record-page.tsx#PlatformRecordPage",
370
+ "layout": "./src/ui-backoffice/record-page.tsx#BackofficeRecordPage",
361
371
  "main": [
362
372
  {
363
- "component": "./src/ui-platform/user-actions.tsx#UserButtons"
373
+ "component": "./src/ui-backoffice/user-actions.tsx#UserButtons"
364
374
  },
365
375
  {
366
376
  "section": "person",
@@ -394,14 +404,14 @@
394
404
  {
395
405
  "section": "standing",
396
406
  "label": {
397
- "en": "Standing on the platform",
398
- "ar": "الوضع في المنصة"
407
+ "en": "Standing in the backoffice",
408
+ "ar": "الوضع في لوحة الإدارة الخلفية"
399
409
  },
400
410
  "fields": [
401
411
  {
402
412
  "field": "role",
403
413
  "component": "text",
404
- "cell": "./src/ui-platform/user-actions.tsx#PlatformRole",
414
+ "cell": "./src/ui-backoffice/user-actions.tsx#BackofficeRole",
405
415
  "decided": "table"
406
416
  },
407
417
  {
@@ -526,6 +536,15 @@
526
536
  },
527
537
  "component": "text",
528
538
  "cell": "text"
539
+ },
540
+ {
541
+ "name": "names",
542
+ "kind": "text",
543
+ "rules": {
544
+ "required": false
545
+ },
546
+ "component": "text",
547
+ "cell": "text"
529
548
  }
530
549
  ],
531
550
  "operations": [
@@ -568,7 +587,7 @@
568
587
  "list": {
569
588
  "path": "/organizations",
570
589
  "page": {
571
- "shell": "./src/ui/app-shell.tsx#PlatformShell",
590
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#BackofficeShell",
572
591
  "header": [
573
592
  {
574
593
  "title": {}
@@ -576,7 +595,7 @@
576
595
  ],
577
596
  "main": [
578
597
  {
579
- "layout": "./src/ui/table-page.tsx#TablePage",
598
+ "layout": "@asas/mithaq:./src/ui/table-page.tsx#TablePage",
580
599
  "main": [
581
600
  {
582
601
  "list": {
@@ -588,7 +607,7 @@
588
607
  },
589
608
  {
590
609
  "field": "slug",
591
- "cell": "./src/ui-platform/organization-actions.tsx#OrganizationActions",
610
+ "cell": "./src/ui-backoffice/organization-actions.tsx#OrganizationActions",
592
611
  "decided": "leaf"
593
612
  },
594
613
  {
@@ -617,7 +636,7 @@
617
636
  "view": {
618
637
  "path": "/organizations/:id",
619
638
  "page": {
620
- "shell": "./src/ui/app-shell.tsx#PlatformShell",
639
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#BackofficeShell",
621
640
  "header": [
622
641
  {
623
642
  "title": {}
@@ -625,7 +644,7 @@
625
644
  ],
626
645
  "main": [
627
646
  {
628
- "layout": "./src/ui-platform/record-page.tsx#PlatformRecordPage",
647
+ "layout": "./src/ui-backoffice/record-page.tsx#BackofficeRecordPage",
629
648
  "main": [
630
649
  {
631
650
  "section": "organization",
@@ -730,6 +749,7 @@
730
749
  "kind": "relationship",
731
750
  "rules": {
732
751
  "required": true,
752
+ "index": true,
733
753
  "onDelete": "cascade"
734
754
  },
735
755
  "relationTo": "organization",
@@ -741,6 +761,7 @@
741
761
  "kind": "relationship",
742
762
  "rules": {
743
763
  "required": true,
764
+ "index": true,
744
765
  "onDelete": "cascade"
745
766
  },
746
767
  "relationTo": "user",
@@ -755,6 +776,15 @@
755
776
  },
756
777
  "component": "text",
757
778
  "cell": "text"
779
+ },
780
+ {
781
+ "name": "lastSeenAt",
782
+ "kind": "datetime",
783
+ "rules": {
784
+ "required": false
785
+ },
786
+ "component": "datetime",
787
+ "cell": "datetime"
758
788
  }
759
789
  ],
760
790
  "operations": [
@@ -797,7 +827,7 @@
797
827
  "list": {
798
828
  "path": "/members",
799
829
  "page": {
800
- "shell": "./src/ui/app-shell.tsx#PlatformShell",
830
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#BackofficeShell",
801
831
  "header": [
802
832
  {
803
833
  "title": {}
@@ -805,7 +835,7 @@
805
835
  ],
806
836
  "main": [
807
837
  {
808
- "layout": "./src/ui/table-page.tsx#TablePage",
838
+ "layout": "@asas/mithaq:./src/ui/table-page.tsx#TablePage",
809
839
  "main": [
810
840
  {
811
841
  "list": {
@@ -822,7 +852,7 @@
822
852
  },
823
853
  {
824
854
  "field": "role",
825
- "cell": "./src/ui-platform/role-cells.tsx#MembershipRole",
855
+ "cell": "./src/ui-backoffice/role-cells.tsx#MembershipRole",
826
856
  "decided": "leaf"
827
857
  },
828
858
  {
@@ -852,7 +882,7 @@
852
882
  "view": {
853
883
  "path": "/members/:id",
854
884
  "page": {
855
- "shell": "./src/ui/app-shell.tsx#PlatformShell",
885
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#BackofficeShell",
856
886
  "header": [
857
887
  {
858
888
  "title": {}
@@ -860,7 +890,7 @@
860
890
  ],
861
891
  "main": [
862
892
  {
863
- "layout": "./src/ui-platform/record-page.tsx#PlatformRecordPage",
893
+ "layout": "./src/ui-backoffice/record-page.tsx#BackofficeRecordPage",
864
894
  "main": [
865
895
  {
866
896
  "section": "membership",
@@ -882,7 +912,7 @@
882
912
  {
883
913
  "field": "role",
884
914
  "component": "text",
885
- "cell": "./src/ui-platform/role-cells.tsx#MembershipRole",
915
+ "cell": "./src/ui-backoffice/role-cells.tsx#MembershipRole",
886
916
  "decided": "table"
887
917
  }
888
918
  ]
@@ -1047,7 +1077,7 @@
1047
1077
  "ar": "لكل مقعد"
1048
1078
  },
1049
1079
  "component": "number",
1050
- "cell": "./src/courses/ui/fee-cell.tsx#FeeCell"
1080
+ "cell": "@asas/courses:./courses/ui/fee-cell.tsx#FeeCell"
1051
1081
  },
1052
1082
  {
1053
1083
  "name": "currency",
@@ -1186,6 +1216,10 @@
1186
1216
  "ar": "مؤرشف"
1187
1217
  },
1188
1218
  "rules": {
1219
+ "providedBy": {
1220
+ "create": "never",
1221
+ "update": "application"
1222
+ },
1189
1223
  "required": false
1190
1224
  },
1191
1225
  "component": "checkbox",
@@ -1250,6 +1284,10 @@
1250
1284
  },
1251
1285
  "rules": {
1252
1286
  "maxLength": 200,
1287
+ "providedBy": {
1288
+ "create": "never",
1289
+ "update": "application"
1290
+ },
1253
1291
  "required": false
1254
1292
  },
1255
1293
  "component": "text",
@@ -1263,7 +1301,8 @@
1263
1301
  "ar": "الوسوم"
1264
1302
  },
1265
1303
  "rules": {
1266
- "required": false
1304
+ "required": false,
1305
+ "onDelete": "restrict"
1267
1306
  },
1268
1307
  "relationTo": "tags",
1269
1308
  "hasMany": true,
@@ -1347,6 +1386,19 @@
1347
1386
  "relationTo": "media",
1348
1387
  "component": "upload",
1349
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"
1350
1402
  }
1351
1403
  ],
1352
1404
  "operations": [
@@ -1399,6 +1451,14 @@
1399
1451
  "name": "archive",
1400
1452
  "effect": "update"
1401
1453
  },
1454
+ {
1455
+ "name": "unarchive",
1456
+ "effect": "update"
1457
+ },
1458
+ {
1459
+ "name": "unpublish",
1460
+ "effect": "update"
1461
+ },
1402
1462
  {
1403
1463
  "name": "findWithSessions",
1404
1464
  "effect": "read"
@@ -1414,7 +1474,7 @@
1414
1474
  "list": {
1415
1475
  "path": "/courses",
1416
1476
  "page": {
1417
- "shell": "./src/ui/app-shell.tsx#PlatformShell",
1477
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#BackofficeShell",
1418
1478
  "header": [
1419
1479
  {
1420
1480
  "title": {}
@@ -1422,7 +1482,7 @@
1422
1482
  ],
1423
1483
  "main": [
1424
1484
  {
1425
- "layout": "./src/ui/table-page.tsx#TablePage",
1485
+ "layout": "@asas/mithaq:./src/ui/table-page.tsx#TablePage",
1426
1486
  "main": [
1427
1487
  {
1428
1488
  "list": {
@@ -1439,7 +1499,7 @@
1439
1499
  },
1440
1500
  {
1441
1501
  "field": "fee",
1442
- "cell": "./src/courses/ui/fee-cell.tsx#FeeCell",
1502
+ "cell": "@asas/courses:./courses/ui/fee-cell.tsx#FeeCell",
1443
1503
  "decided": "field"
1444
1504
  },
1445
1505
  {
@@ -1473,7 +1533,7 @@
1473
1533
  "view": {
1474
1534
  "path": "/courses/:id",
1475
1535
  "page": {
1476
- "shell": "./src/ui/app-shell.tsx#PlatformShell",
1536
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#BackofficeShell",
1477
1537
  "header": [
1478
1538
  {
1479
1539
  "title": {}
@@ -1481,7 +1541,7 @@
1481
1541
  ],
1482
1542
  "main": [
1483
1543
  {
1484
- "layout": "./src/ui-platform/record-page.tsx#PlatformRecordPage",
1544
+ "layout": "./src/ui-backoffice/record-page.tsx#BackofficeRecordPage",
1485
1545
  "main": [
1486
1546
  {
1487
1547
  "tabs": [
@@ -1575,6 +1635,11 @@
1575
1635
  "field": "opensOn",
1576
1636
  "component": "date",
1577
1637
  "decided": "table"
1638
+ },
1639
+ {
1640
+ "field": "selfEnroll",
1641
+ "component": "checkbox",
1642
+ "decided": "table"
1578
1643
  }
1579
1644
  ]
1580
1645
  },
@@ -1886,6 +1951,10 @@
1886
1951
  "ar": "مؤرشفة"
1887
1952
  },
1888
1953
  "rules": {
1954
+ "providedBy": {
1955
+ "create": "never",
1956
+ "update": "application"
1957
+ },
1889
1958
  "required": false
1890
1959
  },
1891
1960
  "component": "checkbox",
@@ -1923,6 +1992,24 @@
1923
1992
  "on": "session",
1924
1993
  "component": "join",
1925
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"
1926
2013
  }
1927
2014
  ],
1928
2015
  "operations": [
@@ -1963,6 +2050,14 @@
1963
2050
  "name": "archiveMany",
1964
2051
  "effect": "update",
1965
2052
  "updatesMany": true
2053
+ },
2054
+ {
2055
+ "name": "archive",
2056
+ "effect": "update"
2057
+ },
2058
+ {
2059
+ "name": "unarchive",
2060
+ "effect": "update"
1966
2061
  }
1967
2062
  ],
1968
2063
  "useAsTitle": "startsAt",
@@ -1970,7 +2065,7 @@
1970
2065
  "list": {
1971
2066
  "path": "/sessions",
1972
2067
  "page": {
1973
- "shell": "./src/ui/app-shell.tsx#PlatformShell",
2068
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#BackofficeShell",
1974
2069
  "header": [
1975
2070
  {
1976
2071
  "title": {}
@@ -1978,7 +2073,7 @@
1978
2073
  ],
1979
2074
  "main": [
1980
2075
  {
1981
- "layout": "./src/ui/table-page.tsx#TablePage",
2076
+ "layout": "@asas/mithaq:./src/ui/table-page.tsx#TablePage",
1982
2077
  "main": [
1983
2078
  {
1984
2079
  "list": {
@@ -2030,7 +2125,7 @@
2030
2125
  "view": {
2031
2126
  "path": "/sessions/:id",
2032
2127
  "page": {
2033
- "shell": "./src/ui/app-shell.tsx#PlatformShell",
2128
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#BackofficeShell",
2034
2129
  "header": [
2035
2130
  {
2036
2131
  "title": {}
@@ -2038,7 +2133,7 @@
2038
2133
  ],
2039
2134
  "main": [
2040
2135
  {
2041
- "layout": "./src/ui-platform/record-page.tsx#PlatformRecordPage",
2136
+ "layout": "./src/ui-backoffice/record-page.tsx#BackofficeRecordPage",
2042
2137
  "main": [
2043
2138
  {
2044
2139
  "tabs": [
@@ -2279,8 +2374,9 @@
2279
2374
  "onDelete": "restrict"
2280
2375
  },
2281
2376
  "relationTo": "sessions",
2377
+ "filterOptions": true,
2282
2378
  "component": "relationship",
2283
- "cell": "./src/enrollments/ui/session-cell.tsx#SessionCell"
2379
+ "cell": "@asas/courses:./enrollments/ui/session-cell.tsx#SessionCell"
2284
2380
  },
2285
2381
  {
2286
2382
  "name": "student",
@@ -2294,6 +2390,7 @@
2294
2390
  "onDelete": "restrict"
2295
2391
  },
2296
2392
  "relationTo": "user",
2393
+ "filterOptions": true,
2297
2394
  "component": "relationship",
2298
2395
  "cell": "relationship"
2299
2396
  },
@@ -2355,7 +2452,7 @@
2355
2452
  "list": {
2356
2453
  "path": "/enrollments",
2357
2454
  "page": {
2358
- "shell": "./src/ui/app-shell.tsx#PlatformShell",
2455
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#BackofficeShell",
2359
2456
  "header": [
2360
2457
  {
2361
2458
  "title": {}
@@ -2363,14 +2460,14 @@
2363
2460
  ],
2364
2461
  "main": [
2365
2462
  {
2366
- "layout": "./src/ui/table-page.tsx#TablePage",
2463
+ "layout": "@asas/mithaq:./src/ui/table-page.tsx#TablePage",
2367
2464
  "main": [
2368
2465
  {
2369
2466
  "list": {
2370
2467
  "columns": [
2371
2468
  {
2372
2469
  "field": "session",
2373
- "cell": "./src/enrollments/ui/session-cell.tsx#SessionCell",
2470
+ "cell": "@asas/courses:./enrollments/ui/session-cell.tsx#SessionCell",
2374
2471
  "decided": "field"
2375
2472
  },
2376
2473
  {
@@ -2405,7 +2502,7 @@
2405
2502
  "view": {
2406
2503
  "path": "/enrollments/:id",
2407
2504
  "page": {
2408
- "shell": "./src/ui/app-shell.tsx#PlatformShell",
2505
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#BackofficeShell",
2409
2506
  "header": [
2410
2507
  {
2411
2508
  "title": {}
@@ -2413,7 +2510,7 @@
2413
2510
  ],
2414
2511
  "main": [
2415
2512
  {
2416
- "layout": "./src/ui-platform/record-page.tsx#PlatformRecordPage",
2513
+ "layout": "./src/ui-backoffice/record-page.tsx#BackofficeRecordPage",
2417
2514
  "main": [
2418
2515
  {
2419
2516
  "section": "enrollment",
@@ -2605,7 +2702,7 @@
2605
2702
  "list": {
2606
2703
  "path": "/tags",
2607
2704
  "page": {
2608
- "shell": "./src/ui/app-shell.tsx#PlatformShell",
2705
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#BackofficeShell",
2609
2706
  "header": [
2610
2707
  {
2611
2708
  "title": {}
@@ -2613,7 +2710,7 @@
2613
2710
  ],
2614
2711
  "main": [
2615
2712
  {
2616
- "layout": "./src/ui/table-page.tsx#TablePage",
2713
+ "layout": "@asas/mithaq:./src/ui/table-page.tsx#TablePage",
2617
2714
  "main": [
2618
2715
  {
2619
2716
  "list": {
@@ -2650,7 +2747,7 @@
2650
2747
  "view": {
2651
2748
  "path": "/tags/:id",
2652
2749
  "page": {
2653
- "shell": "./src/ui/app-shell.tsx#PlatformShell",
2750
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#BackofficeShell",
2654
2751
  "header": [
2655
2752
  {
2656
2753
  "title": {}
@@ -2658,7 +2755,7 @@
2658
2755
  ],
2659
2756
  "main": [
2660
2757
  {
2661
- "layout": "./src/ui-platform/record-page.tsx#PlatformRecordPage",
2758
+ "layout": "./src/ui-backoffice/record-page.tsx#BackofficeRecordPage",
2662
2759
  "main": [
2663
2760
  {
2664
2761
  "section": "tag",
@@ -2869,7 +2966,7 @@
2869
2966
  "list": {
2870
2967
  "path": "/roles",
2871
2968
  "page": {
2872
- "shell": "./src/ui/app-shell.tsx#PlatformShell",
2969
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#BackofficeShell",
2873
2970
  "header": [
2874
2971
  {
2875
2972
  "title": {}
@@ -2877,7 +2974,7 @@
2877
2974
  ],
2878
2975
  "main": [
2879
2976
  {
2880
- "layout": "./src/ui/table-page.tsx#TablePage",
2977
+ "layout": "@asas/mithaq:./src/ui/table-page.tsx#TablePage",
2881
2978
  "main": [
2882
2979
  {
2883
2980
  "list": {
@@ -2909,7 +3006,7 @@
2909
3006
  "view": {
2910
3007
  "path": "/roles/:id",
2911
3008
  "page": {
2912
- "shell": "./src/ui/app-shell.tsx#PlatformShell",
3009
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#BackofficeShell",
2913
3010
  "header": [
2914
3011
  {
2915
3012
  "title": {}
@@ -2917,7 +3014,7 @@
2917
3014
  ],
2918
3015
  "main": [
2919
3016
  {
2920
- "layout": "./src/ui-platform/record-page.tsx#PlatformRecordPage",
3017
+ "layout": "./src/ui-backoffice/record-page.tsx#BackofficeRecordPage",
2921
3018
  "main": [
2922
3019
  {
2923
3020
  "section": "role",
@@ -2934,7 +3031,7 @@
2934
3031
  {
2935
3032
  "field": "permissions",
2936
3033
  "component": "textArray",
2937
- "cell": "./src/roles/ui/roles.tsx#Permissions",
3034
+ "cell": "@asas/roles:./roles/ui/roles.tsx#Permissions",
2938
3035
  "decided": "table"
2939
3036
  }
2940
3037
  ]
@@ -3119,7 +3216,7 @@
3119
3216
  "list": {
3120
3217
  "path": "/member-roles",
3121
3218
  "page": {
3122
- "shell": "./src/ui/app-shell.tsx#PlatformShell",
3219
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#BackofficeShell",
3123
3220
  "header": [
3124
3221
  {
3125
3222
  "title": {}
@@ -3127,7 +3224,7 @@
3127
3224
  ],
3128
3225
  "main": [
3129
3226
  {
3130
- "layout": "./src/ui/table-page.tsx#TablePage",
3227
+ "layout": "@asas/mithaq:./src/ui/table-page.tsx#TablePage",
3131
3228
  "main": [
3132
3229
  {
3133
3230
  "list": {
@@ -3139,7 +3236,7 @@
3139
3236
  },
3140
3237
  {
3141
3238
  "field": "role",
3142
- "cell": "./src/ui-platform/role-cells.tsx#RoleName",
3239
+ "cell": "./src/ui-backoffice/role-cells.tsx#RoleName",
3143
3240
  "decided": "leaf"
3144
3241
  },
3145
3242
  {
@@ -3167,7 +3264,7 @@
3167
3264
  "view": {
3168
3265
  "path": "/member-roles/:id",
3169
3266
  "page": {
3170
- "shell": "./src/ui/app-shell.tsx#PlatformShell",
3267
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#BackofficeShell",
3171
3268
  "header": [
3172
3269
  {
3173
3270
  "title": {}
@@ -3175,7 +3272,7 @@
3175
3272
  ],
3176
3273
  "main": [
3177
3274
  {
3178
- "layout": "./src/ui-platform/record-page.tsx#PlatformRecordPage",
3275
+ "layout": "./src/ui-backoffice/record-page.tsx#BackofficeRecordPage",
3179
3276
  "main": [
3180
3277
  {
3181
3278
  "section": "assignment",
@@ -3192,7 +3289,7 @@
3192
3289
  {
3193
3290
  "field": "role",
3194
3291
  "component": "text",
3195
- "cell": "./src/ui-platform/role-cells.tsx#RoleName",
3292
+ "cell": "./src/ui-backoffice/role-cells.tsx#RoleName",
3196
3293
  "decided": "table"
3197
3294
  }
3198
3295
  ]
@@ -3476,7 +3573,7 @@
3476
3573
  "list": {
3477
3574
  "path": "/local-users",
3478
3575
  "page": {
3479
- "shell": "./src/ui/app-shell.tsx#PlatformShell",
3576
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#BackofficeShell",
3480
3577
  "header": [
3481
3578
  {
3482
3579
  "title": {}
@@ -3484,7 +3581,7 @@
3484
3581
  ],
3485
3582
  "main": [
3486
3583
  {
3487
- "layout": "./src/ui/table-page.tsx#TablePage",
3584
+ "layout": "@asas/mithaq:./src/ui/table-page.tsx#TablePage",
3488
3585
  "main": [
3489
3586
  {
3490
3587
  "list": {
@@ -3554,7 +3651,7 @@
3554
3651
  "edit": {
3555
3652
  "path": "/local-users/:id",
3556
3653
  "page": {
3557
- "shell": "./src/ui/app-shell.tsx#PlatformShell",
3654
+ "shell": "@asas/mithaq:./src/ui/app-shell.tsx#BackofficeShell",
3558
3655
  "header": [
3559
3656
  {
3560
3657
  "title": {}
@@ -3565,7 +3662,7 @@
3565
3662
  ],
3566
3663
  "main": [
3567
3664
  {
3568
- "layout": "./src/ui-platform/record-page.tsx#PlatformRecordPage",
3665
+ "layout": "./src/ui-backoffice/record-page.tsx#BackofficeRecordPage",
3569
3666
  "main": [
3570
3667
  {
3571
3668
  "form": [
@@ -3603,6 +3700,271 @@
3603
3700
  }
3604
3701
  }
3605
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
+ }
3606
3968
  }
3607
3969
  },
3608
3970
  "maxLimit": 100