-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DRAFT : Redesign & maintenance (#124)
* feat: refactor layout and material UI * ref: router 6 migration * fix: legacy panels * ref: filter rework * feat: finish filter Home * ref: redesign survey unit card * fix: status chip * fix(home): scrollbar offset * add new color for lockIcon * use local Typhography and change style * add placeholder * feat(ui): Row component * add fontWeight to statusChip * add inactiveStyle & inaccessible * add inactive & locked * add priority on card * ref(ui): add disabled variant for Card * terminated switch * feat(ui): notifications * fix: filter terminated * remove color * add finalize enum * change accordion sidebar * add finalize enum * remove console.log palette * feat: suivi circular progress * feat: notifications actions * feat(ui): Pie chart for suivi page * ref: CampaignProgressPieChart * ref: search and types * feat: SyncDialog update * feat: suivi table * fix: comment modal * fix: text layout on suivi table * fix: button layout on sync result * feat(ui): Survey Unit page header * feat(ui): Survey Unit Address Card * feat: survey unit logement & repérage * feat: survey unit persons form & card * fix: comment on add button * fix: Contacts card * fix: add form for comment dialog * feat: ContactOutcomeForm * feat: Contact attempt form * feat: seeder for development * feat: Communications form * feat: Comment form * ref: Snackbar * fix: snackbar showing too much * chore: cleaning * chore: cleaning tests & dependencies * feat: not found page * Add new component QuestionnaireCard * add icons * create customChip * HousingResident component * personlist Component * QuestionnaireCard component * to fix gitlab ci * remove rollupOptions * feat: reset data page * add help button & popover * add old Questionnaire component * fix surveyUnitHeader * fix homepage * fix tableau de synthése * maj mui * comment grappe select * fix PieChart size * add textfield searchByName * feat: identification for phone surveyUnit * feat: form for move property * change paddingBlock for pieChart * change filter input * activate select grappe * desactivate grappe * fix: noident identification text * active grappe select * feat: persist filter state * fix: label for identification * fix pieChart label * fix : no nograp doesn't crash Select anymore, bonus fix for ssech * feat: packaged randomness * chore: refactor code for readibility * fix: remove Chat references, not used anymore * fix: another chat reference * fix: add missing radio-group `name` attribute * feat: change some labels * add persist campagn monsuivi * oidc * fix: typo * feat: prevent workbox upgrade -> keep v6.6.1 * fix: restore previious authentication * feat: fallback-configuration * Chore service worker tests (#128) * chore: test workbox 6 * feat: bump app version for test * fix: use theme from provider, clean theme build, i18n * feat: restore state life-cycle * fix: typo * feat: transmission steps are checked instead of disapear * fix: work-box dependecies version * test: clg in sw registration * chore: more log in SW installation * chore: even more log * fix: missing import * Update ServiceWorkerStatus.jsx * fix: restore Queen SW * bumb: worbox version * feat: i18n --------- Co-authored-by: Laurent Caouissin <[email protected]> * Fix suppress location (#129) * fix: remove category dont know * fix: conditional rendering for noLocation * add noLocation to dictionnary * fix: remove clg * fix: add dynamic data for grappe * fix: move addressDeliveryPoint to be correct with AddressCard * feat: add reset to campaign select filter * fix: handle tricky bug on phoneNumbers being switched between persons (#130) * add case to switch lang depends on browser for datepicker * fix: remove useless Fragment * add medium message to contact * add new condition & remove ternary * correction orthographique status * chore: remove unused files
- Loading branch information
Showing
235 changed files
with
10,576 additions
and
9,905 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
QUEEN_URL=https://queen.demo.dev.sspcloud.fr | ||
PEARL_API_URL=https://pearl-bo.demo.dev.sspcloud.fr | ||
QUEEN_URL=https://drama-queen.demo.insee.io | ||
PEARL_API_URL=https://pearl-bo.demo.insee.io | ||
PEARL_AUTHENTICATION_MODE=anonymous | ||
CHAT_URL= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ dist | |
build | ||
dist-ssr | ||
*.local | ||
Caddyfile | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,22 @@ | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<meta name="description" content="Web site created using create-react-app" /> | ||
<link rel="apple-touch-icon" href="/static/images/logo-insee-header.png" /> | ||
<!-- | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<meta name="description" content="Web site created using create-react-app" /> | ||
<link rel="apple-touch-icon" href="/static/images/logo-insee-header.png" /> | ||
<!-- | ||
manifest.json provides metadata used when your web app is installed on a | ||
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ | ||
--> | ||
<link rel="manifest" href="/manifest.json" /> | ||
|
||
<script type="text/javascript" | ||
src="https://unpkg.com/@webcomponents/[email protected]/webcomponents-bundle.js"></script> | ||
<title>Collecte Enquêteurs</title> | ||
</head> | ||
<link rel="manifest" href="/manifest.json" /> | ||
|
||
<body> | ||
<noscript>You need to enable JavaScript to run this app.</noscript> | ||
<div id="root"></div> | ||
<script type="module" src="./src/index.jsx"></script> | ||
</body> | ||
<title>Collecte Enquêteurs</title> | ||
</head> | ||
|
||
</html> | ||
<body> | ||
<noscript>You need to enable JavaScript to run this app.</noscript> | ||
<div id="root"></div> | ||
<script type="module" src="./src/index.jsx"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,102 @@ | ||
import { Route, useLocation } from 'react-router-dom'; | ||
|
||
import CssBaseline from '@material-ui/core/CssBaseline'; | ||
import D from 'i18n'; | ||
import { DatabaseConsole } from 'components/panel-body/databaseConsole'; | ||
import Home from 'components/panel-body/home'; | ||
import Notification from 'components/common/Notification'; | ||
import { NotificationWrapper } from 'components/notificationWrapper'; | ||
import Palette from 'components/common/palette'; | ||
import Preloader from 'components/common/loader'; | ||
import React from 'react'; | ||
import { ResetData } from 'components/panel-body/resetData'; | ||
import SynchronizeWrapper from 'components/sychronizeWrapper'; | ||
import { ThemeProvider } from '@material-ui/core/styles'; | ||
import theme from './theme'; | ||
import { useAuth } from 'utils/auth/initAuth'; | ||
import { useServiceWorker } from 'utils/hooks/useServiceWorker'; | ||
import { createBrowserRouter, Outlet, RouterProvider } from 'react-router-dom'; | ||
import { loadConfiguration, useConfiguration } from './utils/hooks/useConfiguration'; | ||
import { PearlTheme } from './ui/PearlTheme'; | ||
import { Header } from './ui/Header'; | ||
import { Home } from './pages/Home'; | ||
import { useAuth } from './utils/auth/initAuth'; | ||
import { Preloader } from './ui/Preloader'; | ||
import D from './i18n/build-dictionary'; | ||
import { SyncContextProvider } from './ui/Sync/SyncContextProvider'; | ||
import { useEffectOnce } from './utils/hooks/useEffectOnce'; | ||
import { SurveyUnitPage } from './pages/SurveyUnitPage'; | ||
import './app.css'; | ||
import { SuiviPage } from './pages/SuiviPage'; | ||
import { LocalizationProvider } from '@mui/x-date-pickers'; | ||
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns'; | ||
import { QueenPage } from './pages/QueenPage'; | ||
import { ServiceWorkerStatus } from './ui/ServiceWorkerStatus'; | ||
import { ResetData } from './pages/ResetData'; | ||
import { enUS, fr } from 'date-fns/locale'; | ||
|
||
const router = createBrowserRouter([ | ||
{ | ||
path: '/queen/*', | ||
element: <QueenPage />, | ||
}, | ||
{ | ||
path: '/', | ||
element: <AppWrapper />, | ||
children: [ | ||
{ | ||
path: '/', | ||
element: <Home />, | ||
}, | ||
{ | ||
path: '/suivi', | ||
element: <SuiviPage />, | ||
}, | ||
{ | ||
path: '/survey-unit/:id', | ||
element: <Outlet />, | ||
children: [ | ||
{ | ||
path: 'details', | ||
element: <SurveyUnitPage />, | ||
}, | ||
], | ||
}, | ||
{ | ||
path: '/support/reset-data', | ||
element: <ResetData />, | ||
}, | ||
], | ||
}, | ||
]); | ||
|
||
export function App() { | ||
const configuration = useConfiguration(); | ||
|
||
useEffectOnce(loadConfiguration, []); | ||
|
||
if (!configuration) { | ||
return null; | ||
} | ||
|
||
function App() { | ||
const { pathname } = useLocation(); | ||
return <RouterProvider router={router} />; | ||
} | ||
|
||
function AppWrapper() { | ||
const { authenticated } = useAuth(); | ||
const serviceWorkerInfo = useServiceWorker(authenticated); | ||
const browserLanguage = navigator.language; | ||
let dateFnsLocale; | ||
switch (browserLanguage) { | ||
case 'fr': | ||
case 'fr-FR': | ||
dateFnsLocale = fr; | ||
break; | ||
case 'en-US': | ||
case 'en': | ||
default: | ||
dateFnsLocale = enUS; | ||
break; | ||
} | ||
|
||
return ( | ||
<ThemeProvider theme={theme}> | ||
<CssBaseline /> | ||
<Notification serviceWorkerInfo={serviceWorkerInfo} /> | ||
<div> | ||
{!authenticated && <Preloader message={D.pleaseWait} />} | ||
{authenticated && ( | ||
<SynchronizeWrapper> | ||
<NotificationWrapper> | ||
{!pathname.startsWith('/support') && ( | ||
<Route path="/" render={routeProps => <Home {...routeProps} />} /> | ||
)} | ||
<Route path="/support/palette" component={Palette} /> | ||
<Route path="/support/reset-data" component={ResetData} /> | ||
<Route path="/support/database" component={DatabaseConsole} /> | ||
</NotificationWrapper> | ||
</SynchronizeWrapper> | ||
)} | ||
</div> | ||
</ThemeProvider> | ||
<PearlTheme> | ||
<LocalizationProvider dateAdapter={AdapterDateFns} adapterLocale={dateFnsLocale}> | ||
<ServiceWorkerStatus authenticated={authenticated} /> | ||
<div> | ||
{authenticated ? ( | ||
<SyncContextProvider> | ||
<Header /> | ||
<Outlet /> | ||
</SyncContextProvider> | ||
) : ( | ||
<Preloader message={D.pleaseWait} /> | ||
)} | ||
</div> | ||
</LocalizationProvider> | ||
</PearlTheme> | ||
); | ||
} | ||
|
||
export default App; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.