Skip to content

Commit

Permalink
Merge pull request #420 from UN-OCHA/HPC-8242
Browse files Browse the repository at this point in the history
HPC - 8242 Stable version of FTSAdminRewrite without 'Add flow' functionality
  • Loading branch information
Onitoxan authored Oct 25, 2024
2 parents f7da37c + d7dc2f4 commit 719cd8b
Show file tree
Hide file tree
Showing 91 changed files with 14,511 additions and 531 deletions.
2 changes: 1 addition & 1 deletion apps/hpc-cdm/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"polyfills": "apps/hpc-cdm/src/polyfills.ts",
"tsConfig": "apps/hpc-cdm/tsconfig.app.json",
"assets": ["apps/hpc-cdm/src/favicon.ico", "apps/hpc-cdm/src/assets"],
"styles": [],
"styles": ["node_modules/tailwindcss/tailwind.css"],
"scripts": [],
"webpackConfig": "apps/hpc-cdm/webpack.config.js",
"isolatedConfig": true
Expand Down
8 changes: 7 additions & 1 deletion apps/hpc-cdm/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@
"**/*.test.tsx",
"jest.config.ts"
],
"include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"],
"include": [
"**/*.js",
"**/*.jsx",
"**/*.ts",
"**/*.tsx",
"../../tailwind.config.js"
],
"files": [
"src/app/components/enketo-form/enketo-core.d.ts",
"../../node_modules/@nx/react/typings/cssmodule.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion apps/hpc-ftsadmin/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"apps/hpc-ftsadmin/src/favicon.ico",
"apps/hpc-ftsadmin/src/assets"
],
"styles": [],
"styles": ["node_modules/tailwindcss/tailwind.css"],
"scripts": [],
"webpackConfig": "apps/hpc-ftsadmin/webpack.config.js",
"isolatedConfig": true
Expand Down
49 changes: 44 additions & 5 deletions apps/hpc-ftsadmin/src/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@ import { LanguageKey, LANGUAGE_CHOICE, t } from '../i18n';
import PageMeta from './components/page-meta';
import { AppContext, contextFromEnv } from './context';
import { Z_INDEX } from './layout';
import PageFlowsList from './pages/flows-list';
import PageFlowsList from './pages/flows/flows-list';
import PageKeywordsList from './pages/keywords/keyword-list';
import PageNotFound from './pages/not-found';
import PageNotLoggedIn from './pages/not-logged-in';
import PagePendingFlowsList from './pages/flows/pending-flows-list';
import PageOrganizationsList from './pages/organizations/organization-list';
import PageOrganization from './pages/organizations/organization';
import * as paths from './paths';
import { RouteParamsValidator } from './components/route-params-validator';

const environmentWarning = (env: Environment, lang: LanguageKey) => {
const warning = env.getDevHeaderWarning(lang);
Expand Down Expand Up @@ -91,10 +96,7 @@ export const App = () => {
loader={loadEnv}
strings={{
...t.get(lang, (s) => s.components.loader),
notFound: {
...t.get(lang, (s) => s.components.notFound),
...t.get(lang, (s) => s.routes.operations.notFound),
},
notFound: t.get(lang, (s) => s.components.notFound),
}}
>
{(context) => {
Expand Down Expand Up @@ -126,6 +128,18 @@ export const App = () => {
label: t.t(lang, (s) => s.navigation.flows),
path: paths.flows(),
},
{
label: t.t(lang, (s) => s.navigation.pendingFlows),
path: paths.pendingFlows(),
},
{
label: t.t(lang, (s) => s.navigation.organizations),
path: paths.organizations(),
},
{
label: t.t(lang, (s) => s.navigation.keywords),
path: paths.keywords(),
},
]}
className={CLASSES.CONTAINER.FLUID}
externalLinks={[
Expand Down Expand Up @@ -175,6 +189,31 @@ export const App = () => {
path={paths.flows()}
element={<PageFlowsList />}
/>
<Route
path={paths.pendingFlows()}
element={<PagePendingFlowsList />}
/>
<Route
path={paths.organizations()}
element={<PageOrganizationsList />}
/>
<Route
path={paths.organizationRoot()}
element={
<RouteParamsValidator
element={<PageOrganization />}
routeParam="id"
/>
}
/>
<Route
path={paths.addOrganization()}
element={<PageOrganization />}
/>
<Route
path={paths.keywords()}
element={<PageKeywordsList />}
/>
<Route element={<PageNotFound />} />
</Routes>
</LoggedInContainer>
Expand Down
Loading

0 comments on commit 719cd8b

Please sign in to comment.