Commit Graph

98 Commits

Author SHA1 Message Date
Anthony LC
45d05873e2 🔥(app-desk) remove FAQ part in header
The FAQ part in the header is not displayed in
the mockup anymore, we remove it.
2024-02-20 16:25:31 +01:00
Anthony LC
1f3ab759d7 ⬇️(app-desk) downgrade @types/react-dom
Downgrade @types/react-dom to 18.2.18.
The lastest version seems to have lot of compatibility
issues with other packages:
- @openfun/cunningham-react
- @tanstack/react-query-devtools
- next
2024-02-19 16:58:23 +01:00
renovate[bot]
8b5f5bf092 ⬆️(dependencies) update js dependencies 2024-02-19 16:58:23 +01:00
Anthony LC
cd2efbe40d ️(frontend) add stale cache
We add a stale cache to reduce the number of requests to
the server.
This will help to improve the performance of the application.
2024-02-19 15:22:09 +01:00
Anthony LC
8b0c20dbdc (app-desk) add team page
- add the team page, you can access to
the team page with the id of the team.
- Add link to the panel team to access to the
team page.
2024-02-19 15:22:09 +01:00
Anthony LC
d0562029e8 (app-desk) integrate team endpoint
Integrate team endpoint with react-query.
It will be used to get the team on the team page.
2024-02-19 15:22:09 +01:00
Anthony LC
77efb1a89c 💄(app-desk) do not count the owner in item list icon
In every team, the owner is always included in it,
so we shouldn't count the owner when we display the icon
to say if a team has members.
2024-02-19 15:04:53 +01:00
Anthony LC
4566e132e1 💄(app-desk) integrate the create team design
- Integrate the create team design based from the
mockup
- Manage the different states of the create team
2024-02-19 15:04:53 +01:00
Anthony LC
f818715a45 🚚(app-desk) change next router to pages
2 routers exists in Next.js, "app" router and "page" router.
The "app" router has a bug introduced in Next.js 13.4.14, which is
not fixed yet. For the moment we cannot use dynamic routes with
"app" router with an SPA. As advised by the Next.js team, we
migrated to the "pages" router.
2024-02-19 15:04:53 +01:00
renovate[bot]
7d90092020 ⬆️(dependencies) update python dependencies 2024-02-19 10:08:28 +01:00
Lebaud Antoine
469903c9eb ✏️(project) fix minor typos
Found typos, fixed them.
2024-02-16 16:03:52 +01:00
Lebaud Antoine
1f1253ab21 🔧(backend) activate container liveness probes
Enabled Dockerflow Django app by activating liveness probes. The previously
unavailable routes such as `__heartbeat__` and `__lbheartbeat__` are now
accessible. New endpoints include:
* GET /__version__
* GET /__heartbeat__
* GET /__lbheartbeat__
2024-02-16 15:16:30 +01:00
Lebaud Antoine
6620932371 🐛(project) run production image locally with docker-compose
The local deployment of the Production image through docker-compose was
failing due to issues in the Django configurations, influenced by Joanie.

The bug stemmed from a dependency on a development-specific package
(drf-spectacular-sidecar) while attempting to run the application in
production mode.

Changes Made:
- Introduced new Django settings for local demo environments.
- Uncommented the nginx configuration to address the production image
  deployment issues.
2024-02-16 15:16:30 +01:00
Marie PUPO JEAMMET
8e537d962c 🗃️(database) create invitation model
Create invitation model, factory and related tests to prepare back-end
for invitation endpoints. We chose to use a separate dedicated model
for separation of concerns, see
https://github.com/numerique-gouv/people/issues/25
2024-02-15 19:42:40 +01:00
Lebaud Antoine
6080af961a 🩹(backend) fix Django Admin UserAdmin page
*Broken Identity string representation
Resolving a format error in the Identity string representation caused by
potential None values in the email field. This issue was discovered when
attempting to access the User details page in the Django Admin

*Broken User creation form
The replacement of the User's username with an email led to errors in
the UserAdmin class. The base class used the 'username' field in the
'add_fieldsets' attribute. This problem was discovered while attempting to
create a new user in the Django Admin.
2024-02-15 15:54:07 +01:00
Anthony LC
aba376702f 🐛(app-desk) fix circular dependency problem
Some circular dependency problems started to appear with Jest.
This commit fixes the problem by removing the feature index
file and moving the exports to the respective feature.
2024-02-15 09:56:07 +01:00
Anthony LC
1e38174c1b ️(e2e) add workers to playwright with CI
We have added workers to playwright to run tests in parallel,
this will help us to run tests faster.
The tests run on a commun database, so to keep the tests
stable between browsers, we created 3 different
users to run the tests, it will avoid to have commun data
stepping on each other.
2024-02-15 09:56:07 +01:00
Anthony LC
0ab9f16cb3 🌐(app-desk) improve message missing translations
- Improve the message when a translation is missing in the app,
now it will show the key of the missing translation.
- It also show the translation that are in crowdin but not in the
app.

- Add missing translations
2024-02-15 09:56:07 +01:00
Anthony LC
c71463a385 🚚(app-desk) create route teams/create
- Create the routes teams/create.
- Add link to the buttons routing to this page
- Adapt design
2024-02-15 09:56:07 +01:00
Anthony LC
47ffa60a94 ️(app-desk) add infinite scrool to teams list
If we have a big list of teams, we need to add infinite
scroll to avoid loading all the teams at once.
2024-02-15 09:56:07 +01:00
Anthony LC
fafffd2391 (app-desk) add interaction to sort button
In the team panel, we have the possibility to sort the teams.
This commit adds the interaction to the button.
2024-02-15 09:56:07 +01:00
Anthony LC
36e2dc2378 ♻️(backend) api teams list ordering
Give the possibility to order the teams list by
creation date.
By default the list is ordered by
creation date descending.
2024-02-15 09:56:07 +01:00
Anthony LC
4f0465fd32 (app-desk) integrate teams panel design
- Integrate teams panel design based from the mockup.
- List teams from the API.
2024-02-15 09:56:07 +01:00
Anthony LC
148ea81aa9 🎨(app-desk) box default direction column
Change the default direction of the Box component to column
to have a behavior closer to a normal div.
2024-02-15 09:56:07 +01:00
renovate[bot]
9981b9c615 ⬆️(dependencies) update django to v5.0.2 [SECURITY] 2024-02-12 12:00:30 +01:00
Lebaud Antoine
d1cc1942dc 🩹(backend) enhance Django Admin for Team Slug
Make Team's Slug field non-editable in the Django admin. It avoid
UX issues by preventing accidental slug overwrites during updates.
The Slug is now displayed in the teams list view.
2024-02-12 11:47:46 +01:00
Lebaud Antoine
a7d72d0fab 👷(project) streamline Docker image publishing workflow
Refactored 'Hub' CI job for clarity, using 'docker/build-push-action.'
This dedicated workflow efficiently manages image releases on push tag
and main branch merges events.

'Hub' job was broken by Chat GPT translation from Circle CI.

Images are pushed to a temporary Docker Hub repository,
lasuite/people.

Duplicated 'build-docker' job was removed from people workflow.
2024-02-12 11:37:38 +01:00
Lebaud Antoine
46ad7435c8 🔐(project) add Docker Hub secrets
Added Docker Hub username and password, to shared secrets.
2024-02-12 11:37:38 +01:00
renovate[bot]
1d4d4ee902 ⬆️(dependencies) update python dependencies 2024-02-12 10:38:36 +01:00
Marie PUPO JEAMMET
c6ea7c0831 📝(api) use DRF constants instead of bare status codes
Replace bare status codes used in tests with DRF status code constants,
for more explicit tests.
2024-02-08 15:53:08 +01:00
Marie PUPO JEAMMET
d2bf44d2fd (models) add slug field to Team model
Add slug field for team objects. Unique slug based on team names,
in an effort to avoid duplicates.
2024-02-08 15:53:08 +01:00
Lebaud Antoine
c117f67952 ✏️(project) fix minor typos
Found typos and fixed them.
2024-02-06 08:58:21 +01:00
Anthony LC
ec2fcaa1dd ♻️(app-desk) create Auth component
- Create the Auth component, it will manage the authentication.
- Moved auth folder to features folder.
2024-02-05 16:08:22 +01:00
Anthony LC
0b703cda97 🚚(app-desk) move features to features folder
The features were in the app folder, app folder is where Next uses
his router system.
To avoid confusion between the folder router and the features,
we export the features in a feature folder.
2024-02-05 16:08:22 +01:00
Anthony LC
fc6487ddc1 🚚(app-desk) integrate next router with menu
Integrate next router with the menu.
Create most of the pages.
2024-02-05 16:08:22 +01:00
Anthony LC
66dbea3c6d (app-desk) integrate static menu in the app
Integrate the menu from the mockup in the app.
2024-02-05 16:08:22 +01:00
Anthony LC
cbe356214d 🚨(frontend) fix some eslint warnings
- Eslint tried to search some configs in the node_modules folder,
we ignore node_modules in the eslint config now.
- Adapt next eslint to use next/babel.
2024-02-05 16:08:22 +01:00
Anthony LC
ce55721b5d 💄(app-desk) handle svg as react component
The svg in nextjs was not handled as a react component, it was
not possible to change dynamically the color of the svg by example.
We add the @svgr/webpack, it will handle the svg as react component.
We keep as well the way next.js handle the svg, so we can use both
ways.
To handle the svg in the next way we need to add the
`?url` at the end of the svg import.
2024-02-05 16:08:22 +01:00
Anthony LC
32e42e126d 🌐(app-desk) translate Desk in french
Translate app Desk in french thanks to crowdin.
2024-02-05 15:34:37 +01:00
Anthony LC
8043d12315 🚨(i18n) add linter to i18n package
We need to add a linter to the i18n package, we are mainly
interested by the jest linting rules so we create
a jest eslint config pluggable our other configs and to the
i18n eslint config.
2024-02-05 15:34:37 +01:00
Anthony LC
801cb98e15 (i18n) install jest and add tests
We install Jest to test our i18n package.
We tests:
  - the extraction of the translations on the Desk app fo crowdin
  - the formatings of the translations from crowdin to the app
  - we check that all the translations are present in the app
We connect the tests to the CI.
2024-02-05 15:34:37 +01:00
Anthony LC
3d0824e023 🌐(i18n) create package i18n
We create a package i18n to manage the translations of the project.
It help us to extract the translations from the frontend to
be deployed to crowdin.
It also help us to format the translations from crowdin to
be used by the frontend apps.
2024-02-05 15:34:37 +01:00
Anthony LC
7add42f525 🌐(app-desk) plug i18n to LanguagePicker
- Plug i18n to LanguagePicker.
- Make translatable all the string of the app.
2024-02-05 15:34:37 +01:00
Anthony LC
01b7ad3f30 🌐(app-desk) install internationalization
Install internationalization in the Desk app.
We use react-i18next.
2024-02-05 15:34:37 +01:00
renovate[bot]
6a0ed04b0d ⬆️(dependencies) update python dependencies 2024-02-05 13:22:56 +01:00
Anthony LC
21550fe01d 🚨(frontend) fix linting issues
The prettier upgrade was causing some linting issues.
This commit fixes them.
2024-02-05 09:46:30 +01:00
renovate[bot]
92e3e11daf ⬆️(dependencies) update js dependencies 2024-02-05 09:46:30 +01:00
Lebaud Antoine
c54d457fa6 🎨(project) fixed minor code formatting issues in .sops.yaml
Identified and resolved minor code formatting issues.

Updates:
* Add a newline at the end of the file
* Capitalize first names and last names of all users.
2024-02-01 13:54:18 +01:00
Marie
6f18713a7e 📝(doc) improve test names and docstrings
improve test names and docstrings

Co-authored-by: aleb_the_flash <45729124+lebaudantoine@users.noreply.github.com>
2024-02-01 10:36:06 +01:00
Samuel Paccoud - DINUM
a4ac5304d7 🐛(api) return best matching identity only
Use best matching identity to order results.
2024-02-01 10:36:06 +01:00