Commit Graph

32 Commits

Author SHA1 Message Date
bd38d760d4 Update Dockerfile 2025-12-09 14:16:12 +01:00
25eafb1c6e feat: Refine notice filtering and Docker setup
Implement granular notice filtering logic based on user roles and notice targeting.
Update Dockerfiles and .dockerignore for a cleaner build process.
2025-12-09 14:15:43 +01:00
891ea7a12c Update Dockerfile 2025-12-09 14:07:27 +01:00
b04d75c0b9 Update Dockerfile 2025-12-09 14:05:15 +01:00
ca38e891c9 feat: Add targeted notices to Condopay
Implements the ability to send notices to specific families within a condominium, rather than broadcasting to all. This includes:
- Updating the `Notice` type with `targetFamilyIds`.
- Adding a `target_families` JSON column to the `notices` table in the database, with a migration for existing installations.
- Modifying the API to handle the new `targetFamilyIds` field during notice creation and retrieval.
- Updating the UI to allow users to select specific families for notices.
2025-12-09 14:04:49 +01:00
d15e1e9b79 Update Dockerfile 2025-12-09 13:55:37 +01:00
3a0021c5d8 feat: Add PayPal configuration to settings
Introduces the ability to configure PayPal credentials for individual condos within the settings. This feature is only visible if PayPal is enabled in the global settings. Also removes and simplifies Dockerfile configurations.
2025-12-09 13:55:11 +01:00
cf8a75fdae Update Dockerfile 2025-12-09 13:35:45 +01:00
a5645a32c0 feat: Add reports feature
Enables a new reports section in the application. This includes:
- Adding a `reports` flag to `AppFeatures` and `AppSettings`.
- Including a new "Reportistica" link in the main navigation for privileged users.
- Adding a `getCondoPayments` endpoint to the mock DB service.
- Updating the backend to support filtering payments by `condoId`.
- Providing a basic `ReportsPage` component.
2025-12-09 13:35:10 +01:00
dd95302689 Update Dockerfile 2025-12-07 23:31:06 +01:00
80d658a536 feat: Improve payment modal logic and Docker configuration
Refactor the family detail page to introduce a new `handleOpenAddModal` function. This function intelligently sets the default payment method based on the current user's role: 'manual' for admins/power users and 'paypal' for others. This enhances user experience by pre-selecting the most appropriate payment option.

Additionally, the Docker configuration files have been updated. The mult-stage build setup for the frontend and backend has been removed in favor of a simpler structure, streamlining the Docker build process. The `nginx.conf` has also been updated to reflect these changes and ensure proper proxying.
2025-12-07 23:16:47 +01:00
759322c4c6 Update Dockerfile 2025-12-07 22:47:45 +01:00
426f0067aa Update Dockerfile 2025-12-07 22:47:18 +01:00
d5b1a1ab16 Update Dockerfile 2025-12-07 22:46:42 +01:00
8ea1e231fd feat: Integrate PayPal for payments
Adds the `@paypal/react-paypal-js` dependency and updates import maps to support PayPal integration. Cleans up Dockerfile and Nginx configuration, removing them as they are no longer needed in this version.
2025-12-07 22:44:00 +01:00
2f4ba7f4b5 Update Dockerfile 2025-12-07 20:31:18 +01:00
5311400615 feat: Add tickets module and PayPal integration
Introduces a new 'Tickets' module for users to submit and manage issues within their condominium. This includes defining ticket types, statuses, priorities, and categories.

Additionally, this commit integrates PayPal as a payment option for family fee payments, enabling users to pay directly via PayPal using their client ID.

Key changes:
- Added `Ticket` related types and enums.
- Implemented `TicketService` functions for CRUD operations.
- Integrated `@paypal/react-paypal-js` library.
- Added `paypalClientId` to `AppSettings` and `Condo` types.
- Updated `FamilyDetail` page to include PayPal payment option.
- Added 'Segnalazioni' navigation link to `Layout`.
2025-12-07 19:49:59 +01:00
2566b406e1 Update Dockerfile 2025-12-07 16:31:13 +01:00
3a2532805a feat: Add email alerts tab to settings
Introduces a new tab in the settings section dedicated to configuring email alerts. This allows administrators to manage automatic email notifications for various events within the Condopay application.
2025-12-07 16:29:20 +01:00
185d4fb008 Update Dockerfile 2025-12-07 16:15:12 +01:00
fd107c1ef8 feat: Enhance condo and family data models
Adds new fields for detailed address information and notes to the Condo and Family types.
Updates database schema and server API endpoints to support these new fields, improving data richness for location and specific family/condo details.
2025-12-07 16:10:33 +01:00
385fd3624f Update Dockerfile 2025-12-07 15:09:37 +01:00
c5065ff637 fix: Improve settings persistence and auth handling
The changes address several issues related to data persistence and security within the Condopay application.

**Settings Persistence:**
- **Condo Creation:** Corrected the logic for creating new condos. The system now correctly handles passing an empty string for the `id` when creating a new condo, allowing the backend service to generate the ID, rather than attempting to create a new ID on the frontend.
- **Family Quota Parsing:** Enhanced the parsing of `customMonthlyQuota` for families to safely handle empty or whitespace-only input, preventing potential errors during data submission.

**Authentication and Authorization:**
- **Admin Role Enforcement:** Ensured that the default admin user created during database initialization always has the 'admin' role, even if it was previously changed or created incorrectly.
- **Token Verification Error Handling:** Modified the JWT token verification to return a `401 Unauthorized` status for all token-related errors (e.g., expired, invalid). This will prompt the frontend to log out the user more effectively.
- **Admin Access Logging:** Added console warnings when non-admin users attempt to access admin-only routes, providing better visibility into potential access control issues.

**Infrastructure:**
- **Docker Cleanup:** Removed unused and outdated Dockerfiles and `.dockerignore` content, streamlining the build process and removing potential confusion.

These improvements enhance the reliability of data management for condos and families, strengthen security by ensuring proper role enforcement and error handling, and clean up the development infrastructure.
2025-12-07 13:18:42 +01:00
987afe5f5b Update Dockerfile 2025-12-07 13:00:58 +01:00
9459834b0e fix: Improve condo ID handling and add error message
Prevents client-side generation of condo IDs, delegating this to the backend/service for consistency.
Introduces an alert for save condo errors and ensures the active condo is correctly updated or set.
Adds logic to auto-select the first condo if none is active.
2025-12-07 12:54:51 +01:00
4dcf681503 sostituiro npm ci con npm install 2025-12-07 10:28:57 +01:00
074f10273d Update Dockerfile 2025-12-07 01:48:21 +01:00
3f954c65b1 feat: Introduce multi-condo management and notices
This commit refactors the application to support managing multiple condominiums.

Key changes include:
- Introduction of `Condo` and `Notice` data types.
- Implementation of multi-condo selection and management, including active condo context.
- Addition of a notice system to inform users about important updates or events within a condo.
- Styling adjustments to ensure better visibility of form elements.
- Mock database updates to accommodate new entities and features.
2025-12-07 01:37:19 +01:00
f575d9973a Update Dockerfile 2025-12-07 00:30:14 +01:00
26fc451871 feat: Add email configuration and alert system
Introduces SMTP configuration settings and alert definitions to enable automated email notifications.
This includes new types for `SmtpConfig` and `AlertDefinition`, and integrates these into the settings page and mock database.
Adds styling for select elements and scrollbar hiding in the main HTML.
Updates mock database logic to potentially support local development without a backend.
2025-12-06 23:01:02 +01:00
7311577d53 Update Dockerfile 2025-12-06 22:21:40 +01:00
79e249b638 feat: Setup project with Vite and React
Initializes the Condopay frontend project using Vite, React, and TypeScript. Includes basic project structure, dependencies, and configuration for Tailwind CSS and React Router.
2025-12-06 18:55:48 +01:00