Commit Graph

18 Commits

Author SHA1 Message Date
Daniel Volz 82b2be48cd feat: Add Medication Refill feature with mobile UI improvements (#30)
* feat: Add Medication Refill feature with UI improvements

- Add refill functionality to medications (add packs/loose pills)
- Add refill API endpoint with history tracking
- Add refill section in edit forms (desktop & mobile)
- Add refill modal in medication detail view
- Add refill history display with expand/collapse
- Add schedule lightbox for clicking medication images
- Improve button styling with primary/info/success classes
- Move '+ New entry' button to medication list header
- Lightbox size: 50% desktop, 90% mobile
- Update selectedMed sync after stock changes
- Migrate from schema-sql.ts to Drizzle Kit migrations

* fix: Improve mobile tooltips and refill modal layout

- Center tooltips on screen for mobile devices (fixed position)
- Close tooltips automatically when scrolling on touch devices
- Use click-based tooltip activation instead of hover on mobile
- Fix refill modal buttons to display in two rows on mobile
2026-01-17 20:39:18 +01:00
Daniel Volz f41f6df558 fix: add .js extension to schema-sql imports for ESM compatibility (#15) 2026-01-02 15:41:58 +01:00
copilot-swe-agent[bot] 653e9e7fa8 Remove database schema duplication by creating shared schema-sql.ts module
Co-authored-by: DanielVolz <3275994+DanielVolz@users.noreply.github.com>
2026-01-01 12:42:53 +00:00
Daniel Volz ba3ebd27f4 feat: add comprehensive test suite and CI pipeline
- Add 402 unit tests with 61.7% code coverage
- Add Vitest configuration with coverage reporting
- Extract testable utility functions from services
- Create test.yml workflow (runs on PR and push to main)
- Update docker-build.yml to require tests before building
- Add scheduler-utils.ts and server-config.ts for testable code

Test files added:
- auth.test.ts, medications.test.ts, planner.test.ts
- settings.test.ts, doses.test.ts, share.test.ts
- database.test.ts, server.test.ts, services.test.ts
- env.test.ts, translations.test.ts, integration.test.ts
- e2e-routes.test.ts, stock-calculation.test.ts
2025-12-30 11:14:52 +01:00
Daniel Volz 666306b416 Refactor medication model to use blisters and pills instead of strips and tabs
- Updated medication schema to replace stripsPerPack and tabsPerStrip with blistersPerPack and pillsPerBlister.
- Adjusted medication routes to handle new blister and pill structure, including calculations for total pills.
- Modified frontend components to reflect changes in medication data structure and ensure compatibility with new backend logic.
- Updated reminder scheduler and share routes to utilize the new medication model.
- Enhanced Docker configuration for better permissions handling during development.
2025-12-29 19:18:14 +01:00
Daniel Volz 69ca8fd3ba feat: implement per-person dose tracking and update migration process
- Enhanced the database migration process to ensure compatibility with existing production databases, including detailed steps for adding/modifying columns.
- Updated the client-side logic to support tracking doses taken by multiple users, including changes to the data structure and UI components.
- Added new styles for per-person dose tracking to improve user experience and visual clarity.
2025-12-28 19:47:14 +01:00
Daniel Volz 4a6aab338f feat: migrate taken_by to taken_by_json for multi-person support
- Added `taken_by_json` column to `medications` table to store an array of names.
- Updated migration scripts to convert existing `taken_by` data into JSON format.
- Modified backend routes to handle the new `taken_by_json` structure, including parsing and filtering logic.
- Updated frontend to support multi-value input for "Taken By" using tags.
- Adjusted validation and state management for the new array format in forms.
- Enhanced UI for displaying multiple names and added autocomplete suggestions for input.
- Updated translations for input placeholders to reflect new functionality.
- Added CSS styles for tag input components.
2025-12-28 18:22:32 +01:00
Daniel Volz abffd66e9c feat: add expiration date to share tokens and enhance error handling for expired links 2025-12-28 17:47:49 +01:00
Daniel Volz b0f26b1e66 feat(share): implement share functionality for medication schedules with token-based access 2025-12-26 21:06:03 +01:00
Daniel Volz a7f9f90db4 feat(auth): implement user authentication and profile management
- Added authentication context and provider to manage user state.
- Created login and registration forms with validation and error handling.
- Implemented user profile component for updating user information and changing passwords.
- Introduced user settings in the database for notification preferences.
- Updated translations for authentication-related strings in English and German.
- Enhanced styles for authentication components and user profile.
- Added middleware for optional and required authentication checks.
2025-12-26 19:57:35 +01:00
Daniel Volz 5900fddb2d feat: simplify environment configuration by hardcoding token TTLs and removing unnecessary variables 2025-12-25 14:54:38 +01:00
Daniel Volz aa87a65d31 feat: remove email rate limit configuration from environment and database schema 2025-12-25 13:24:25 +01:00
Daniel Volz 738513a3ba refactor: rename project to MedAssist-ng and update configurations
- Updated environment variables in .env.example for production setup.
- Changed project references from MedAssist to MedAssist-ng in documentation and code.
- Adjusted Docker configurations for new image names and ports.
- Removed deprecated push-images.sh script and added docker-compose.dev.yml for development.
- Updated translation files to reflect new project name.
- Ensured all email notifications and headers reflect the new branding.
2025-12-24 13:01:53 +01:00
Daniel Volz f1ee8e6fdf feat: add multiple columns to medications table for enhanced data tracking 2025-12-21 13:05:57 +01:00
Daniel Volz 0239d01d3b feat: add migration for image_url column in medications table with error handling 2025-12-20 21:01:18 +01:00
Daniel Volz a0e879e8d2 Refactor code structure for improved readability and maintainability 2025-12-20 20:48:23 +01:00
Daniel Volz c643bfcc47 feat: implement database setup with direct table creation and improved error handling 2025-12-20 17:57:11 +01:00
Daniel Volz 47f8494795 Initial commit 2025-12-19 13:09:53 +01:00