Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
60359bd
feat: add "Autre..." section in constat detaille
Feb 25, 2026
8c53c81
add allowed host
Feb 25, 2026
46e50a0
fix: constat detaille custom input
Feb 25, 2026
974d3e7
fic: typo
Feb 26, 2026
eabd415
tests: add constat tests
Feb 26, 2026
3a9d273
tests: add compte-rendu tests
Feb 28, 2026
7be5718
feat: enable name edition in account page
Mar 9, 2026
8fa8c56
fix: correctly set all dept numbers
Mar 10, 2026
8938094
feat: add tests for user signup with multiple department numbers
Mar 10, 2026
262ea94
feat: only keep one result if searched by pop reference
Mar 11, 2026
3df488d
feat: update search results limit and add PDF download functionality
Mar 11, 2026
1b52912
feat: add healthcheck for MinIO service and improve PDF page renderin…
Mar 11, 2026
78441ed
feat: log department updates for user during service change
Mar 16, 2026
59d7fdd
wip: replace canvas viewer by react-pdf/renderer
Mar 16, 2026
d2b5fbc
wip
Mar 16, 2026
fba212d
refactor: simplify ModernView by removing unnecessary iframe handling
Mar 17, 2026
b934ff2
feat: enhance getIsSectionVisited to include attachment length check
Mar 17, 2026
6571885
feat: focus on field after clicking on error
Mar 17, 2026
c7b1845
wip: validation
Mar 23, 2026
1122c14
feat: implement constat validation flow and add related tests
Mar 24, 2026
7cd08aa
feat: add DSFR mail wrapper and integrate into email content generation
Mar 24, 2026
7aa017d
docs: update README to clarify data sources for patrimonial data
Mar 25, 2026
7fb481a
feat: reset to legacy view
Mar 25, 2026
4236d07
feat: add PDF generation endpoint for constat validation and update r…
Mar 25, 2026
93c4057
feat: add constat_validation table and integrate pending validation s…
Mar 25, 2026
2740483
wip: enhance email content generation with DSFR mail wrapper and impr…
Mar 25, 2026
0188f1e
feat: add validation status to state report and update related compon…
Mar 25, 2026
ab150f8
fix: ensure the correct element is targeted for validation status vis…
Mar 25, 2026
d963515
feat: add validation fields for user settings and update account mana…
Mar 25, 2026
c815b9e
fix: correct date field naming in state report response
Mar 25, 2026
498287d
fix: import fileURLToPath for correct __dirname resolution in dsfrMai…
Mar 25, 2026
5cd8646
feat: add Marianne image assets and update asset directory path in ds…
Mar 25, 2026
36ada9e
fix: disable SSL for database credentials in drizzle configuration
Mar 25, 2026
974b101
feat: update validation status handling in transaction and add valida…
Mar 25, 2026
f5f8bd5
feat: enhance state report handling by adding validation status and a…
Mar 25, 2026
1d7e6bd
fix: restore alertes-mh section and update activity report title in s…
Mar 26, 2026
6716232
feat: add loading state handling for alerts in StateReportAlertObjetS…
Mar 26, 2026
a95b922
feat: refactor asset handling and enhance test setup for alerts flow
Mar 26, 2026
cfac25b
feat: bump powersync version and use new builtin attachment system
Mar 26, 2026
6554b8b
feat: enhance PDF generation and image upload tests for compte-rendu …
Mar 26, 2026
afda78c
feat: add alerts handling and validation flow for state reports
Mar 26, 2026
f1835e5
feat: add uuid dependency and integrate sync functionality in SyncFor…
Mar 26, 2026
49a336a
feat: integrate local storage for attachment retrieval in UploadImage…
Mar 26, 2026
da51e5c
feat: remove debug log from attachment update and set Playwright to h…
Mar 26, 2026
387e0da
feat: add manual workflow_dispatch GitHub Action to run E2E tests
Mar 26, 2026
3264046
wip: enhance attachment remote storage functionality and add image up…
Mar 26, 2026
4049d5a
wip: streamline database query and remove unused remote storage logic…
Mar 26, 2026
a09a2a7
wip: refactor attachment handling by introducing useAttachmentImages …
Mar 26, 2026
e0d9d32
wip: implement KonvaDrawingCanvas for enhanced image annotation
Mar 26, 2026
b8c515d
wip
Mar 27, 2026
51afdd5
wip: enhance image upload functionality and improve error handling in…
Mar 27, 2026
84e68a7
chore: remove unused Docker Compose files and obsolete user tests
Mar 27, 2026
5021f89
refactor: update attachment handling to include blob URLs and streaml…
Mar 27, 2026
876a644
feat: enhance image upload and processing, improve database reset fun…
Mar 27, 2026
22f2077
feat: update PowerSync configuration and sync settings, enhance image…
Mar 27, 2026
44f58e1
feat: add Mailpit service for email testing, remove console logs from…
Mar 27, 2026
20db827
Feat/admin panel (#68)
ledouxm Mar 28, 2026
e649812
feat: add stats API and frontend components for statistics overview a…
Mar 28, 2026
8ff8d2b
feat: optimize stats API queries for improved performance and readabi…
Mar 28, 2026
4407320
feat: update journal with new entry for silly roland deschain
Mar 28, 2026
4bd1437
feat: simplify service lookup in stats tests and add logging for sent…
Mar 30, 2026
f73424a
feat: implement presigned URL for file uploads and refactor upload ro…
Mar 30, 2026
1a465cb
feat: remove picture_lines table and related functionality across bac…
Mar 31, 2026
bdb3a2b
wip
Mar 31, 2026
f388e0e
feat: integrate PDFViewerPaginated component for enhanced PDF viewing…
Mar 31, 2026
73c66da
feat: adjust image label positioning in PDF generation
Mar 31, 2026
0cb76aa
feat: improve image handling in PDF generation by updating image cell…
Mar 31, 2026
0bf117f
feat: add size prop to FullWidthButton in LoginForm and SignupForm fo…
Mar 31, 2026
a588d3a
feat: refactor UploadImage and UploadImageButton components for impro…
Mar 31, 2026
088ddfb
feat: remove LoginForm and auth module for codebase cleanup
Mar 31, 2026
845735c
feat: enhance UploadImageModal with dynamic height adjustment based o…
Mar 31, 2026
a8c3b9b
feat: implement PDF rendering with dynamic page visibility and improv…
Mar 31, 2026
72c9529
feat: add padding to Flex component in contentMap for improved layout
Mar 31, 2026
a3f335b
feat: refactor BannerAndContent to conditionally render PDF component…
Mar 31, 2026
a1ce3d9
feat: enhance ConstatPdf and ConstatGeneral components with loading s…
Mar 31, 2026
c2b9867
feat: update stats and validation routes, enhance upload service logg…
Mar 31, 2026
caf9141
feat: update state report schema and attachment handling
Mar 31, 2026
f101616
feat: update attachment insertion logic to use existing IDs instead o…
Mar 31, 2026
96538fd
feat: update attachment handling to use v7() for IDs and improve dele…
Mar 31, 2026
0463925
feat: update PostgreSQL image version to 17-alpine in docker-compose
Mar 31, 2026
1b478bf
feat: refactor PDF generation and email sending process
Mar 31, 2026
094647c
wip
Apr 1, 2026
a200e0a
feat: add label field to report attachments and update related compon…
Apr 1, 2026
bf00b24
feat: implement download functionality in ConstatPdf
Apr 1, 2026
08326c1
fix: download button styles
Apr 1, 2026
4c42733
fix: adjust layout and styling in Banner and SendBannerContent compon…
Apr 1, 2026
ae29975
fix: set menu button size 40x40
Apr 1, 2026
8d280b0
fix: conditionally render modification prompt in SingleClause component
Apr 1, 2026
42fec73
fix: simplify KpiCard rendering and update table caption in StatsPage
Apr 1, 2026
14d2f20
fix: remove capture attribute from UploadImageButton
Apr 2, 2026
39bc24e
fix: add box shadow to header on mobile devices
Apr 2, 2026
b0cb9b0
fix: update alert property names and types for consistency
Apr 2, 2026
744788f
fix: update alert components and improve form handling
Apr 2, 2026
9f7fda7
fix: refactor AlertesForm to use dynamic fields for email inputs
Apr 2, 2026
deaa3ad
wip
Apr 2, 2026
fb65191
fix: enhance AlertsReminder to handle selected alert IDs and improve …
Apr 2, 2026
083b163
fix: update alert labels to include 'MH' for consistency and clarity
Apr 2, 2026
d6785d9
fix: update button labels from 'Enregistrer' to 'Valider' for consist…
Apr 2, 2026
c783f85
fix: remove VITE_ALERTES_MH_ENABLED references from envVars and syncS…
Apr 3, 2026
36baa48
fix: update alert email content generation for proper handling of und…
Apr 3, 2026
593b5de
fix: update contact message in HelpMenu
Apr 7, 2026
582107b
fix: enhance layout and add alert message in AlertsReminder component
Apr 7, 2026
2585268
fix: update email content in createBordereauMailContent for clarity a…
Apr 7, 2026
e8ca485
feat: prevent user from editing a report with different created_by
Apr 7, 2026
065a1b9
fix: update email content in createBordereauMailContent for accuracy …
Apr 8, 2026
02da960
fix: typo
Apr 8, 2026
7cad209
fix: update button labels for clarity in HelpMenu component
Apr 9, 2026
12f713a
fix: improve validation request and result email content for clarity …
Apr 9, 2026
ced48eb
fix: update EmailInput and PDFViewerPaginated components for improved…
Apr 9, 2026
75f45ed
fix: enhance layout and functionality of the PDF viewer and add valid…
Apr 9, 2026
b7c3622
feat: add needValidation parameter to state report PDF generation
Apr 9, 2026
7020bb0
fix: replace error handling with AppError for validation routes
Apr 9, 2026
a4b64c5
feat: enhance stats API and frontend to include deployed UDAP and CRM…
Apr 9, 2026
9f0f650
fix: update MonumentHistorique component to integrate isDisabled stat…
Apr 9, 2026
7802a12
feat: extend stats API and frontend to include totalConstats for impr…
Apr 9, 2026
fe00aff
feat: enhance PDF handling and error management in backend routes
Apr 9, 2026
9ce40bb
fix: adjust margin for ViewConstatPdf component in BannerAndContent
Apr 13, 2026
264edc4
fix: copy visited_sections
Apr 13, 2026
8d1d1dc
feat: integrate radio buttons for constat validation decision
Apr 13, 2026
7fbc0f2
feat: add color selection and tool options to ImageCanvas component
Apr 15, 2026
cd2571e
feat: make PictureThumbnail image clickable for editing
Apr 15, 2026
6524de9
fix: adjust PictureThumbnail layout and error handling display
Apr 15, 2026
5c55cac
fix: loading condition in ImmeubleAutocomplete
Apr 15, 2026
b6a3364
fix: add search by reference pop
Apr 15, 2026
3a70670
feat: add Politique de confidentialité route and update CGU content
Apr 15, 2026
4d79c11
fix: update footer links and improve accessibility message in Layout …
Apr 15, 2026
655e8b3
fix: reorder headers in constats by service table for clarity
Apr 15, 2026
0dad4c8
fix: update date range handling in StatsPage and add validation button
Apr 15, 2026
65f2f94
fix: set 2 images per row
Apr 16, 2026
cfad2d8
fix: adjust gap size for responsive design and conditionally render t…
Apr 16, 2026
51a0ac3
fix: improve layout responsiveness in ImageCanvas and UploadImageModa…
Apr 16, 2026
0e43995
fix: update border color in ColorSelection component for better visib…
Apr 16, 2026
a3af9bf
fix: refactor image saving logic to use transactions and preserve cre…
Apr 16, 2026
f36078a
fix: reverse order of direction buttons in ImageCanvas component
Apr 21, 2026
33b1924
fix: update email content to include PDF download link and refactor P…
Apr 21, 2026
73ccc62
feat: add attachment redirection functionality
Apr 21, 2026
4b7f7f7
fix: update attachment redirection logic and adjust test assertions f…
Apr 21, 2026
731ed61
fix: adjust button margin for responsive design and update label visi…
Apr 21, 2026
433d3a7
feat: add rapid moonstone journal entry and enhance attachment redire…
Apr 21, 2026
3582302
fix: add partial details label
Apr 22, 2026
5b80c78
fix: add visite_details field + fix pdf issues
Apr 22, 2026
c8fa6ba
fix: typo
Apr 22, 2026
4e04e33
feat: add CSV export functionality for whitelist and users in admin p…
Apr 22, 2026
779db49
refactor: simplify button layout in WhitelistPanel and UsersPanel
Apr 22, 2026
8a43801
feat: implement search functionality for reports with SearchBar compo…
Apr 22, 2026
efdb499
feat: add SearchModal component and integrate AppSearchBar for report…
Apr 22, 2026
adb225e
fix: alert MH reminder position
Apr 22, 2026
181914a
fix
Apr 26, 2026
ff19e27
Merge remote-tracking branch 'origin/main' into development
Apr 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .claude/settings.local.json

This file was deleted.

2 changes: 2 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ SMTP_WEB_PORT=${MAILPIT_WEB_PORT}
# BACKEND
PORT=${BACKEND_PORT}

BACKEND_URL=http://localhost:${BACKEND_PORT}

FRONTEND_URL=http://localhost:${FRONTEND_PORT}
EMAIL_HOST=localhost
EMAIL_PORT=${SMTP_PORT}
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Run E2E Tests

on:
workflow_dispatch:

jobs:
e2e:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false

- name: Install dependencies
run: pnpm install

- name: Install Playwright browsers
run: pnpm playwright install --with-deps chromium

- name: Run E2E tests
run: pnpm e2e
env:
CI: true

- name: Upload test report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright-report/
retention-days: 7

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium test

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Comment on lines +8 to +41
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ vite.config.ts.timestamp*
node_modules
/.pnp
.pnp.js

minio-data
# testing
/coverage

Expand Down Expand Up @@ -66,4 +66,7 @@ packages/backend/data/attachments/*

keycloak-theme/*

*.csv
*.csv

.playwright-mcp
.claude
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ graph LR
Backend -->|pictures and pdf| PatrinotesS3[Patrinotes S3]
```

Les données patrimoniales proviennent de deux sources externes : **data.gouv.fr**, qui fournit les fichiers CSV des
monuments historiques et du mobilier, ainsi que l'API d'adresse ; et **POP** (Plateforme Ouverte du Patrimoine), dont
les images sont récupérées par scraping. Le backend agrège et structure ces données avant de les persister dans la base
de données Postgres.

# Framework et dépendances

## Architecture du repo
Expand Down
36 changes: 0 additions & 36 deletions ci/docker-compose.development.yaml

This file was deleted.

37 changes: 0 additions & 37 deletions ci/docker-compose.main.yaml

This file was deleted.

18 changes: 18 additions & 0 deletions db/0019_bouncy_falcon.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
CREATE TABLE "constat_validation" (
"id" text PRIMARY KEY NOT NULL,
"state_report_id" text,
"token" text NOT NULL,
"token_expires_at" text NOT NULL,
"validator_email" text NOT NULL,
"status" text DEFAULT 'pending' NOT NULL,
"comment" text,
"recipients" text NOT NULL,
"pdf_path" text NOT NULL,
"created_at" text NOT NULL,
"service_id" text
);
--> statement-breakpoint
ALTER TABLE "user_settings"
ADD COLUMN "validation_enabled" boolean DEFAULT false;
--> statement-breakpoint
ALTER TABLE "user_settings" ADD COLUMN "validation_email" text;
1 change: 1 addition & 0 deletions db/0020_noisy_lady_ursula.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "state_report" ADD COLUMN "validation_status" text;
2 changes: 2 additions & 0 deletions db/0021_bizarre_wither.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE "user_settings" ADD COLUMN "validation_nom" text;--> statement-breakpoint
ALTER TABLE "user_settings" ADD COLUMN "validation_prenom" text;
1 change: 1 addition & 0 deletions db/0022_volatile_joseph.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "state_report" ADD COLUMN "alerts_sent" boolean DEFAULT false;
4 changes: 4 additions & 0 deletions db/0023_naive_fenris.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ALTER TABLE "report_attachment" ADD COLUMN "is_ignored" boolean DEFAULT false;--> statement-breakpoint
ALTER TABLE "state_report_alert_attachment" ADD COLUMN "is_ignored" boolean DEFAULT false;--> statement-breakpoint
ALTER TABLE "state_report_attachment" ADD COLUMN "is_ignored" boolean DEFAULT false;--> statement-breakpoint
ALTER TABLE "visited_section_attachment" ADD COLUMN "is_ignored" boolean DEFAULT false;
2 changes: 2 additions & 0 deletions db/0024_grey_captain_universe.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE "internal_user" ADD COLUMN "createdAt" timestamp DEFAULT now();--> statement-breakpoint
ALTER TABLE "whitelist" ADD COLUMN "createdAt" timestamp DEFAULT now();
15 changes: 15 additions & 0 deletions db/0025_silly_roland_deschain.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ALTER TABLE "state_report" DROP COLUMN "bilan_quinquennal";
--> statement-breakpoint
ALTER TABLE "state_report"
ADD COLUMN "bilan_quinquennal" boolean DEFAULT true;
--> statement-breakpoint
ALTER TABLE "picture_lines" ADD COLUMN "newAttachmentId" text;
--> statement-breakpoint
ALTER TABLE "state_report"
ADD COLUMN "visite_partielle_parties" text;
--> statement-breakpoint
UPDATE "state_report"
SET
"visite_partielle_parties" = "visite_partielle_details";
--> statement-breakpoint
UPDATE "state_report" SET "visite_partielle_details" = NULL;
78 changes: 78 additions & 0 deletions db/0026_mighty_arachne.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
ALTER TABLE "picture_lines" DISABLE ROW LEVEL SECURITY;
--> statement-breakpoint
DROP TABLE "picture_lines" CASCADE;
--> statement-breakpoint
ALTER TABLE "state_report_attachment"
ALTER COLUMN "created_at"
SET DEFAULT now();
--> statement-breakpoint
ALTER TABLE "state_report_attachment" ADD COLUMN "type" text;
--> statement-breakpoint
-- plan_situation (single attachment ID)
INSERT INTO
state_report_attachment (
id,
attachment_id,
state_report_id,
type,
service_id,
created_at
)
SELECT
gen_random_uuid (),
plan_situation,
id,
'plan_situation',
service_id,
NOW()
FROM state_report
WHERE
plan_situation IS NOT NULL
AND plan_situation != '' ON CONFLICT (id) DO NOTHING;

-- plan_edifice (single attachment ID)
INSERT INTO
state_report_attachment (
id,
attachment_id,
state_report_id,
type,
service_id,
created_at
)
SELECT
gen_random_uuid (),
plan_edifice,
id,
'plan_edifice',
service_id,
NOW()
FROM state_report
WHERE
plan_edifice IS NOT NULL
AND plan_edifice != '' ON CONFLICT (id) DO NOTHING;

-- vue_generale (semicolon-separated list of attachment IDs)
INSERT INTO
state_report_attachment (
id,
attachment_id,
state_report_id,
type,
service_id,
created_at
)
SELECT gen_random_uuid (), trim(vue_id), sr.id, 'vue_generale', sr.service_id, NOW()
FROM state_report sr, unnest (
string_to_array (sr.vue_generale, ';')
) AS vue_id
WHERE
sr.vue_generale IS NOT NULL
AND sr.vue_generale != ''
AND trim(vue_id) != '' ON CONFLICT (id) DO NOTHING;

ALTER TABLE "state_report" DROP COLUMN "plan_situation";
--> statement-breakpoint
ALTER TABLE "state_report" DROP COLUMN "plan_edifice";
--> statement-breakpoint
ALTER TABLE "state_report" DROP COLUMN "vue_generale";
1 change: 1 addition & 0 deletions db/0027_wonderful_dark_beast.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "report_attachment" ADD COLUMN "label" text;
7 changes: 7 additions & 0 deletions db/0028_lethal_lenny_balinger.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CREATE TABLE "attachment_redirection" (
"id" text PRIMARY KEY NOT NULL,
"s3_key" text NOT NULL,
"created_at" timestamp NOT NULL,
"created_by" text NOT NULL,
"sent_to" text NOT NULL
);
1 change: 1 addition & 0 deletions db/0029_rapid_moonstone.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "attachment_redirection" ADD COLUMN "name" text;
Loading
Loading