Commit Graph
709 Commits
Author SHA1 Message Date
hamed a0a2eb1799 Add migration to enhance session_payments table with payment_method_uuid and reference fields for split-payment details 2026-07-23 15:37:58 +03:30
hamed 1d1c3d5f30 Update community IDs and source locations in graph.json and manifest.json
- Adjusted source location for mockPricing() in AppointmentBookingModal.test.tsx from L144 to L149.
- Updated community IDs for various migration entries and commands in graph.json to reflect new community associations.
- Modified timestamps and AST hashes for AppointmentBookingModal.test.tsx and AppointmentsPage.tsx in manifest.json.
2026-07-23 15:18:59 +03:30
hamed 36f13ac7d3 Update manifest.json with new mtime and ast_hash for AppointmentsPage and AppointmentBookingModal test 2026-07-23 15:13:38 +03:30
hamed 0edaf6518f Add JSON files for security audit and test data
- Created a JSON file for the security audit report dated 2026-07-19, detailing various security findings and their relationships.
- Added a JSON file for seed test data, including user creation logic and dependencies in the `seed_testdata.php` file.
- Introduced a JSON file for the AdminCspSubscriberTest, outlining test cases and their structure in the `AdminCspSubscriberTest.php`.
2026-07-23 15:12:37 +03:30
hamed 9a776be13c feat: ensure نوبت‌ها menu remains always expanded in the sidebar 2026-07-23 15:03:47 +03:30
hamed f218bc17ef feat: enhance security audit and CSP configuration for admin interface 2026-07-23 14:12:05 +03:30
hamed 9a43dcf798 feat: add seed data for clinic, doctors, and secretaries 2026-07-23 14:03:48 +03:30
hamed e279812b96 Add JSON files for insurance API documentation and purge doctors command tests
- Created a new JSON file for the insurance API documentation, detailing endpoints, parameters, and responses.
- Added a JSON file for the PurgeDoctorsCommandTest, including test methods and their relationships to the command and other components.
2026-07-22 16:49:32 +03:30
hamed c94ceaa027 feat: add test for clinic owner viewing slots when online booking is disabled 2026-07-22 16:47:52 +03:30
hamed ed516c81a8 feat: Enhance appointment management by decoupling online booking toggle for admin context
- Introduced management mode for appointment slots, allowing doctors, admins, and clinic managers to view and book slots regardless of the online booking status.
- Updated SlotCalculatorService to accept a management context parameter, bypassing online booking restrictions.
- Modified appointment-related endpoints to handle management context and ensure proper authorization checks.
- Added tests to verify that management users can access slots even when online booking is disabled, while public users are still restricted.
- Improved documentation for API endpoints to reflect new management parameters and behaviors.
2026-07-22 16:43:56 +03:30
hamed 5507b42fd8 feat: implement per-doctor insurance settings in multi-doctor clinics
- Updated InsuranceModal to include doctorUuid in the payload for insurance contracts.
- Enhanced TenantInsuranceContracts to allow selection of doctors and pass doctorUuid in API requests.
- Modified InsuranceController to handle doctorUuid for tenant insurance endpoints, ensuring contracts are stored per doctor.
- Updated API documentation to reflect the new optional doctor_uuid parameter for tenant insurance endpoints.
- Added tests to verify the functionality of per-doctor insurance contracts and ensure isolation of contracts between doctors.
2026-07-21 19:21:55 +03:30
hamed 7e847b62c4 feat: update allowed frontend hosts and add clinic-pro.ir domain 2026-07-21 16:51:42 +03:30
hamed 512dbdaba0 feat: update PurchaseSubscriptionSidebar for mobile visibility and styling adjustments 2026-07-21 10:50:17 +03:30
hamed 087683e877 feat(csp): add worker-src directive for ALTCHA proof-of-work in admin CSP 2026-07-20 14:34:46 +03:30
hamed a8d33ceeaf feat: enhance purge commands with environment handling and testing improvements 2026-07-20 11:54:02 +03:30
hamed 28725792d7 feat: update purge commands documentation for clarity on production usage 2026-07-20 11:17:39 +03:30
hamed 46d7253ad9 feat: add command to purge unclaimed imported doctors and their surrogates 2026-07-20 09:44:09 +03:30
hamed 97e5acdf18 Add AST cache for MaintenanceSubscriber with detailed node and edge relationships 2026-07-19 22:06:36 +03:30
hamedandClaude Fable 5 7ac8ddbd25 feat(config): add central maintenance mode
Adds a platform-wide maintenance switch controlled from the admin panel.
A single kernel.request subscriber (priority 6, after the firewall listener)
short-circuits every request with 503, so no controller has to check it and
all API clients — the admin SPA, nobat724_front and clinic-pro-tauri — are
covered at once.

- SiteConfig gains five maintenance_* keys; no entity change, no migration
- MaintenanceService caches the state in Redis for 30s and is fail-open:
  a Redis or database failure never takes the site down by itself
- API responses reuse the BaseController::error() envelope with code
  MAINTENANCE_MODE plus a Retry-After header; browsers get a self-contained
  Twig page (inline CSS, noindex) that renders even mid-deploy
- Whitelist keeps /oauth/*, the login endpoints and /api/v1/admin/settings
  reachable, otherwise an admin could neither sign in nor switch it back off
- Admin bypass falls back to decoding the Authorization JWT, because several
  admin-panel endpoints sit in the public_endpoints firewall (security: false)
  where no token is ever resolved and isGranted always returns false
- A kernel.exception handler at priority 20 covers routing 404/405 and
  firewall 401, which are thrown before the request listener runs
- app:maintenance on|off|status is the escape hatch when the panel is down

Also removes a stray `APP_SECRET = ...` line from .env.dev: the spaces around
`=` are rejected by Symfony Dotenv, which made every console command and the
whole app fatal. The secret already lives in .env.local, as the comment above
that line instructs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 22:01:34 +03:30
hamed 6275b3da1e feat: implement Content-Security-Policy for admin SPA and enhance session cookie security 2026-07-19 21:00:32 +03:30
hamed e670b38821 feat: enhance doctor import process with source profile ID for improved idempotency and deduplication 2026-07-19 20:19:35 +03:30
hamed 74577c2ff6 feat: unify doctor title handling and enhance specialty selection
- Implemented a helper function `displayDoctorName` to prepend "دکتر" to doctor names for consistent display across the application.
- Updated various components (InviteDoctorModal, DashboardPage, DoctorDetailPage, DoctorsPage, etc.) to utilize the new helper for rendering doctor names.
- Modified the DoctorFormPage to automatically add the "دکتر" title in the UI without requiring user input.
- Fixed the EditSpecialtyPicker component to allow multiple specialty selections, resolving a UI bug where only one specialty could be selected at a time.
- Ensured that the backend strips the "دکتر" title from the name during pre-registration and doctor creation processes.
- Added tests for the new functionality, including checks for title handling and specialty selection logic.
- Updated API documentation to reflect changes in name handling and display logic.
2026-07-19 19:57:03 +03:30
hamed 801c6f96db Refactor doctor data repair commands into a single command
- Removed individual commands for backfilling specialty parents, surrogate roles, and fixing IRIMC names.
- Introduced RepairImportedDoctorsCommand to consolidate functionality.
- Implemented a step-based approach for repairs, allowing for idempotent execution.
- Added new service classes for handling specific repair steps, including BackfillSpecialtyParentsStep, BackfillSurrogateRoleStep, FixDegreeStep, and StripNameTitleStep.
- Created RepairOptions and RepairResult classes to manage step execution options and results.
- Updated tests to ensure new command structure and functionality are covered, including idempotency and dry-run behavior.
- Added IrimcDegreeMapper for mapping IRIMC titles to degrees.
2026-07-19 19:20:04 +03:30
hamed ef83ce4452 feat: enhance login error handling to differentiate between staff-only and wrong password errors 2026-07-19 19:02:05 +03:30
hamed c151b10c57 chore: update dependencies in composer.json and composer.lock for improved stability and features 2026-07-19 17:34:51 +03:30
hamed 6496ebf336 feat: implement specialty hierarchy handling in doctor and representation APIs, add backfill command and tests 2026-07-19 17:30:46 +03:30
hamed 21b67ec075 feat: enhance clinic API to resolve contact fields from address record and add tests for contact field resolution 2026-07-19 16:43:57 +03:30
hamed cb399ac653 Merge branch 'dev' into main
# Conflicts:
#	docs/api/doctor.md
2026-07-19 16:15:30 +03:30
hamed b05aeaf58b Refactor doctor name handling across the application
- Removed the "دکتر" prefix from doctor names in various components and API responses to ensure consistency and clarity.
- Updated the AppointmentDetailPage, CommentsPage, DashboardPage, RatingsPage, SecretariesPage, and other relevant files to reflect the changes in doctor name formatting.
- Adjusted API documentation to align with the new naming conventions.
- Implemented validation to prevent the creation of clinics without a name and restricted users to a single clinic.
- Added tests to verify that doctor names are stored without titles and that clinic creation adheres to the new validation rules.
2026-07-19 16:09:55 +03:30
hamed 7761c37a3e feat: update user roles and passwords in QA driver, enhance documentation with error codes, and improve trial activation error handling 2026-07-19 15:19:03 +03:30
hamed 3e841b5e57 feat: implement OTP login flow for non-staff accounts in QA driver 2026-07-19 13:58:20 +03:30
hamed b10b0813f3 feat: enhance QA driver with detailed persona definitions for improved testing accuracy 2026-07-19 13:41:16 +03:30
hamed 773f9d4d16 feat: update session payment logic to ensure accurate payable amounts and reflect consumables in cost breakdown
- Adjusted the calculation of payable amounts in PaymentStep to align with server logic, ensuring overpayments are handled correctly.
- Enhanced DetailsStep to include consumables in the itemized cost breakdown, ensuring consistency with patient share calculations.
- Updated tests for SessionPaymentPage to validate new behavior regarding overpayments and consumable listings.
- Modified PatientController to register SessionPayment correctly when settling sessions via wallet, preventing double charges.
- Refactored WalletService to remove outdated methods and ensure wallet transactions reflect the correct amounts after discounts.
- Improved accessibility in SearchableSelect component by adding aria labels and ensuring proper role attributes for screen readers.
- Updated styles to ensure minimum touch targets meet WCAG guidelines for mobile usability.
2026-07-19 13:29:46 +03:30
hamed 0d9784b03a feat: add QA driver for ClinicPro to automate testing and reporting 2026-07-19 12:43:18 +03:30
hamed fe2783480e feat: update default label for not visited statuses in doctor appointments panel 2026-07-19 11:55:13 +03:30
hamed 4e78a76824 feat: implement filtered and paginated doctor appointments panel with status filtering 2026-07-19 11:50:16 +03:30
hamed 8420a1a6c2 feat: implement filtered and paginated appointment retrieval for doctors 2026-07-19 11:41:43 +03:30
hamed f1d147f9ef feat: add admin page driver for screenshots and audits of React SPA 2026-07-19 11:30:44 +03:30
hamed e7de7aa88b feat: enhance Tauri charts with smooth curves and forecasting
- Implemented a smooth curve rendering for the TauriLineChart using a cubic Bezier path.
- Added a forecasting feature to project trends based on recent data points.
- Updated TauriDashboardView to pass the current month for accurate forecasting.
- Refactored TauriLineChart to handle actual and forecasted data points distinctly.
- Introduced gradient strokes and glow effects to align with ApexCharts styling.
- Enhanced user interaction with hover markers and tooltips for forecasted data.
- Added a new test suite for ClinicDetailPage to ensure proper rendering and functionality.
2026-07-19 11:25:45 +03:30
hamed 15366788d5 feat(NewAppointmentModal): implement pricing retrieval and validation for visit costs 2026-07-19 10:58:04 +03:30
hamed 088e1348b5 feat(ConfirmAppointmentModal): add payment handling tests and improve modal functionality 2026-07-19 10:49:30 +03:30
hamed 357adb1d14 feat: enhance payment status handling and summary in MyPaymentsPage
- Added support for 'partial' payment status in MyPaymentsPage and related components.
- Updated API responses to include 'paid_rials' and 'summary' for invoices.
- Introduced InvoicePaymentStatus service to derive payment status based on actual payments.
- Enhanced tests to cover new payment scenarios including partial payments and payment methods.
- Updated documentation to reflect changes in payment status and API responses.
2026-07-19 10:38:29 +03:30
hamed 5c8fe8ece4 feat: add payments summary endpoint and UI redesign for MyPaymentsPage
- Implemented a new API endpoint `/api/v1/my/billing/payments/summary` to provide a financial summary of payments with filters for national code, status, and date range.
- Updated the InvoiceRepository to aggregate totals for paid and unsettled invoices.
- Created a new hook `usePaymentsSummary` to fetch summary data in the frontend.
- Redesigned the MyPaymentsPage to align with the ClaimsPage structure, incorporating a design system, summary statistics, and improved filtering options.
- Added tests for the new payments summary endpoint to ensure correct functionality and filtering behavior.
2026-07-19 10:12:01 +03:30
hamed 7ebc04fc3f feat(payment): prefill amount field with remaining balance and cap wallet prefill 2026-07-19 09:52:11 +03:30
hamed 7e4e4b9157 Add AST JSON representation for DisplayName.php with method and import details 2026-07-19 08:38:34 +03:30
hamed d780b5cbb6 feat(validation): enforce naming rules for doctors and clinics to prevent placeholders 2026-07-19 08:38:11 +03:30
hamed 44b89d7add Add AST JSON representation for migration Version20260719044321
This commit introduces a new JSON file that contains the abstract syntax tree (AST) representation for the migration file Version20260719044321.php. The AST includes nodes for the migration class, its methods, and their relationships, as well as raw calls made within the migration. This structure aids in understanding the code's architecture and dependencies.
2026-07-19 08:24:05 +03:30
hamed a4b07c2f80 feat(blog): add city_id to blogs for city-specific scoping
- Introduced a new nullable city_id column in the blogs table to allow scoping of blog posts to specific cities.
- Updated Blog entity to include a ManyToOne relationship with the City entity.
- Enhanced BlogController to handle city_id in the request, allowing filtering of posts by city.
- Modified BlogRepository to support querying published posts based on city_id.
- Added tests to ensure correct behavior for city-scoped and nationwide posts, including creation and updating of posts with city associations.
2026-07-19 08:23:57 +03:30
hamedandClaude Opus 4.8 bd66b213c2 chore(graphify): rebuild code graph after doctor list location change
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 08:09:09 +03:30
hamedandClaude Opus 4.8 e78b0c4b4c chore(prompt): split SEO audit follow-up into backend task prompts
The nobat724_front SEO audit produced three backend-side tasks that the
frontend work is blocked on or that it only masks:

- doctors-list-city-and-limit: implemented in the previous commit
- blog-city-field: blog has no city column, so the city-scoped blog work
  on the public site is written but inert
- cleanup-polluted-doctor-clinic-records: records named after a phone
  number or "test" reach public results; the site currently hides them
  with a noindex filter, which masks rather than fixes the data

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 08:09:00 +03:30