Skip to content

feat: Add photo attachments inside equipment and intervention#30

Merged
cballevre merged 4 commits intomainfrom
feat/add-photo-attachments
Aug 1, 2025
Merged

feat: Add photo attachments inside equipment and intervention#30
cballevre merged 4 commits intomainfrom
feat/add-photo-attachments

Conversation

@cballevre
Copy link
Copy Markdown
Owner

No description provided.

@cballevre cballevre requested a review from Copilot August 1, 2025 07:45
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds the ability to distinguish between photo and document attachments for both equipment and interventions by introducing a type field to categorize attachments.

  • Adds a type column to attachment tables with check constraints for 'photo' and 'document' values
  • Updates the attachment component to handle different attachment types with appropriate UI and file filters
  • Separates photo and document sections in equipment and intervention detail pages

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
supabase/schemas/intervention_attachments.sql Adds type column with check constraint to intervention attachments schema
supabase/schemas/equipment_attachments.sql Adds type column with check constraint to equipment attachments schema
supabase/migrations/20250801073345_add_type_to_attachment_tables.sql Migration script to add type column and constraints to both attachment tables
src/shared/utils/sanitize-file-name.ts New utility function to sanitize file names for storage
src/shared/components/attachment-list.tsx Updates component to handle attachment types with filtered queries and type-specific UI
src/interventions/pages/show.tsx Renders separate photo and document attachment sections
src/interventions/pages/list.tsx Changes sorting from id to date
src/equipments/pages/show.tsx Renders separate photo and document attachment sections
public/locales/fr.json Updates French translations for photo and document sections
public/locales/en.json Updates English translations for photo and document sections
.github/copilot-instructions.md Adds commit message conventions to project guidelines

Comment thread supabase/migrations/20250801073345_add_type_to_attachment_tables.sql Outdated
Comment thread supabase/migrations/20250801073345_add_type_to_attachment_tables.sql Outdated
Comment thread src/interventions/pages/list.tsx
@cballevre cballevre force-pushed the feat/add-photo-attachments branch from 08ff944 to 66d2e9b Compare August 1, 2025 07:51
@cballevre cballevre merged commit d936b28 into main Aug 1, 2025
1 check passed
@cballevre cballevre deleted the feat/add-photo-attachments branch August 1, 2025 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants