Skip to content

Commit 96f2e65

Browse files
committed
Merge branch 'dev' into diazz-code-30376498
2 parents 4d8cfa5 + cd7e42f commit 96f2e65

File tree

240 files changed

+12873
-28
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+12873
-28
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,7 @@ The following summarizes the various [apps](#adding-a-new-platform-ui-applicatio
556556
- [Gamification Admin](#gamification-admin)
557557
- [Learn](#learn)
558558
- [Self Service](#self-service)
559+
- [Review](#review)
559560
560561
## Platform App
561562
@@ -599,3 +600,10 @@ Application that allows customers to submit/start challenges self-service.
599600
600601
[Work README TBD](./src/apps/self-service/README.md)
601602
[Work Routes](./src/apps/self-service/src/self-service.routes.tsx)
603+
604+
## Review
605+
606+
The application that allows managing the review submissions.
607+
608+
[Review README TBD](./src/apps/review/README.md)
609+
[Review Routes](./src/apps/review/src/review-app.routes.tsx)

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"@storybook/react": "7.6.10",
2929
"@stripe/react-stripe-js": "1.13.0",
3030
"@stripe/stripe-js": "1.41.0",
31+
"@types/codemirror": "^5.60.15",
3132
"apexcharts": "^3.36.0",
3233
"axios": "^1.7.9",
3334
"browser-cookies": "^1.2.0",
@@ -43,6 +44,7 @@
4344
"draft-js-export-html": "^1.2.0",
4445
"draft-js-markdown-shortcuts-plugin": "^0.3.0",
4546
"draft-js-plugins-editor": "^2.0.3",
47+
"easymde": "^2.20.0",
4648
"express": "^4.21.2",
4749
"express-fileupload": "^1.4.0",
4850
"express-interceptor": "^1.2.0",
@@ -92,9 +94,12 @@
9294
"redux-promise": "^0.6.0",
9395
"redux-promise-middleware": "^6.1.3",
9496
"redux-thunk": "^2.4.1",
97+
"rehype-raw": "^7.0.0",
98+
"rehype-stringify": "^10.0.1",
9599
"remark-breaks": "^3.0.2",
96100
"remark-frontmatter": "^4.0.1",
97101
"remark-gfm": "^3.0.1",
102+
"remark-parse": "^11.0.0",
98103
"remove": "^0.1.5",
99104
"sanitize-html": "^2.12.1",
100105
"sass": "^1.79.0",

src/apps/admin/src/admin-app.routes.tsx

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
} from '~/libs/core'
99

1010
import {
11+
billingAccountRouteId,
1112
manageChallengeRouteId,
1213
manageReviewRouteId,
1314
permissionManagementRouteId,
@@ -51,6 +52,37 @@ const ManageReviewerPage: LazyLoadedComponent = lazyLoad(
5152
() => import('./review-management/ManageReviewerPage'),
5253
'ManageReviewerPage',
5354
)
55+
const BillingAccount: LazyLoadedComponent = lazyLoad(
56+
() => import('./billing-account/BillingAccount'),
57+
)
58+
const BillingAccountsPage: LazyLoadedComponent = lazyLoad(
59+
() => import('./billing-account/BillingAccountsPage'),
60+
'BillingAccountsPage',
61+
)
62+
const BillingAccountNewPage: LazyLoadedComponent = lazyLoad(
63+
() => import('./billing-account/BillingAccountNewPage'),
64+
'BillingAccountNewPage',
65+
)
66+
const BillingAccountDetailsPage: LazyLoadedComponent = lazyLoad(
67+
() => import('./billing-account/BillingAccountDetailsPage'),
68+
'BillingAccountDetailsPage',
69+
)
70+
const BillingAccountResourcesPage: LazyLoadedComponent = lazyLoad(
71+
() => import('./billing-account/BillingAccountResourcesPage'),
72+
'BillingAccountResourcesPage',
73+
)
74+
const BillingAccountResourceNewPage: LazyLoadedComponent = lazyLoad(
75+
() => import('./billing-account/BillingAccountResourceNewPage'),
76+
'BillingAccountResourceNewPage',
77+
)
78+
const ClientsPage: LazyLoadedComponent = lazyLoad(
79+
() => import('./billing-account/ClientsPage'),
80+
'ClientsPage',
81+
)
82+
const ClientEditPage: LazyLoadedComponent = lazyLoad(
83+
() => import('./billing-account/ClientEditPage'),
84+
'ClientEditPage',
85+
)
5486
const PermissionManagement: LazyLoadedComponent = lazyLoad(
5587
() => import('./permission-management/PermissionManagement'),
5688
)
@@ -142,6 +174,59 @@ export const adminRoutes: ReadonlyArray<PlatformRoute> = [
142174
id: manageReviewRouteId,
143175
route: manageReviewRouteId,
144176
},
177+
// Billing Account Module
178+
{
179+
children: [
180+
{
181+
element: <BillingAccountsPage />,
182+
id: 'billing-accounts-page',
183+
route: 'billing-accounts',
184+
},
185+
{
186+
element: <BillingAccountNewPage />,
187+
id: 'billing-account-new-page',
188+
route: 'billing-accounts/new',
189+
},
190+
{
191+
element: <BillingAccountDetailsPage />,
192+
id: 'billing-account-details-page',
193+
route: 'billing-accounts/:accountId/details',
194+
},
195+
{
196+
element: <BillingAccountResourcesPage />,
197+
id: 'billing-account-resources-page',
198+
route: 'billing-accounts/:accountId/resources',
199+
},
200+
{
201+
element: <BillingAccountNewPage />,
202+
id: 'billing-account-resources-page',
203+
route: 'billing-accounts/:accountId/edit',
204+
},
205+
{
206+
element: <BillingAccountResourceNewPage />,
207+
id: 'billing-account-resource-new-page',
208+
route: 'billing-accounts/:accountId/resources/new',
209+
},
210+
{
211+
element: <ClientsPage />,
212+
id: 'billing-account-clients-page',
213+
route: 'clients',
214+
},
215+
{
216+
element: <ClientEditPage />,
217+
id: 'billing-account-client-edit-page',
218+
route: 'clients/:clientId/edit',
219+
},
220+
{
221+
element: <ClientEditPage />,
222+
id: 'billing-account-client-edit-page',
223+
route: 'clients/new',
224+
},
225+
],
226+
element: <BillingAccount />,
227+
id: billingAccountRouteId,
228+
route: billingAccountRouteId,
229+
},
145230
// Permission Management Module
146231
{
147232
children: [
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import { FC, PropsWithChildren, useContext, useMemo } from 'react'
2+
import { Outlet, Routes } from 'react-router-dom'
3+
4+
import { routerContext, RouterContextData } from '~/libs/core'
5+
6+
import { Layout } from '../lib/components'
7+
import { adminRoutes } from '../admin-app.routes'
8+
import { billingAccountRouteId } from '../config/routes.config'
9+
10+
/**
11+
* The router outlet with layout.
12+
*/
13+
export const BillingAccount: FC & {
14+
Layout: FC<PropsWithChildren>
15+
} = () => {
16+
const childRoutes = useChildRoutes()
17+
18+
return (
19+
<>
20+
<Outlet />
21+
<Routes>{childRoutes}</Routes>
22+
</>
23+
)
24+
}
25+
26+
function useChildRoutes(): Array<JSX.Element> | undefined {
27+
const { getRouteElement }: RouterContextData = useContext(routerContext)
28+
const childRoutes = useMemo(
29+
() => adminRoutes[0].children
30+
?.find(r => r.id === billingAccountRouteId)
31+
?.children?.map(getRouteElement),
32+
[], // eslint-disable-line react-hooks/exhaustive-deps -- missing dependency: getRouteElement
33+
)
34+
return childRoutes
35+
}
36+
37+
/**
38+
* The outlet layout.
39+
*/
40+
BillingAccount.Layout = function BillingAccountLayout(
41+
props: PropsWithChildren,
42+
) {
43+
return <Layout>{props.children}</Layout>
44+
}
45+
46+
export default BillingAccount
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
@import '@libs/ui/styles/includes';
2+
3+
.container {
4+
display: flex;
5+
flex-direction: column;
6+
}
7+
8+
.loadingSpinnerContainer {
9+
position: relative;
10+
height: 100px;
11+
12+
.spinner {
13+
background: none;
14+
}
15+
}
16+
17+
.blockBottom {
18+
display: flex;
19+
justify-content: flex-end;
20+
align-items: flex-start;
21+
flex-wrap: wrap;
22+
gap: 30px;
23+
margin-left: auto;
24+
margin-top: $sp-2;
25+
26+
@include ltemd {
27+
flex-direction: column;
28+
align-items: flex-end;
29+
}
30+
}

0 commit comments

Comments
 (0)