Commit Graph
8 Commits
Author SHA1 Message Date
Adam Daley a54d94f570 Refactor API and frontend helpers with improved testing (#3947)
* Fix GET fetch body and DRY DirectAdmin fields

* Remove unused bindings in Support module

* Gate dashboard invoice and order cards

* Extract and test data-fb-api parser

* Refactor API helpers and add unit tests

* Extract link action and loading state helpers

* Refactor icon checks into tested helpers

* Refactor frontend helpers and slim tests

* Harden API CSRF handling and icon checks
2026-07-09 11:47:34 +01:00
Adam Daley af882d9c4b Code quality: replace error_log with logger, fix Stripe search escaping, and several small cleanups (#3866)
* Refine logging and search escaping fixes

* Extract Identity::typeFromObject() and cache Proxy dispatcher

The role-type string (str_replace('model_', '', strtolower($class))) was
duplicated independently in Identity, Proxy, and Dispatcher. Extract it
to Identity::typeFromObject() so the logic lives in one place.

Also cache the resolved Dispatcher in Proxy so repeated API calls on the
same Proxy instance (e.g. a template calling many API methods) don't
re-run the DI lookup and instanceof check each time.
2026-06-30 00:35:38 +01:00
Adam Daley febec281a6 Migrate product models and enhance promo redemption functionality (#3587)
* Migrate product models; add `promo_redemption`

* Add DomainPricing & ProductOrder repositories

* Use Promo entity typehints and update tests

* Use DI logger, validate order config, update tests

* Replace `error_log` with logger; use stubs in tests

* Use attachOrderConfig and tighten service checks

* Clarify domain defaults and remove deprecated doc tag

* Add missing indexes to `promo_redemption` table

* Enrich promo API arrays and add redemption filters

* Various UI/JS fixes and template cleanups

* Log invoice issues as warnings; expose form_id

* Normalize spelling in UpdatePatcher comment

* Remove checkLimits production method and clean up stale test mocks

* Use getConfig() and add promo permission

* Use container logger directly, remove helpers

* Use defaults for optional Twig settings

* Import macro_functions into admin template

* Compensate promo redemptions on checkout failure

* 🐛 Fix product category and add-on availability handling
2026-06-18 17:56:14 +01:00
c7f43acac7 Use fb_api_link instead of custom event listeners in Huraga (#3794)
* Use fb_api_link rather than custom event listeners in Huraga

* API.js: Fall back to window.prompt when Modals isn't present in the theme

* Fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-18 05:36:16 +01:00
Adam Daley 7927792fe1 Enhance API with batch retrieval and admin transaction handling (#3769)
* Set X-Requested-With for same-origin requests

* Add string type hints and update copyrights

* Make addon API output admin-aware

* Admin mark-as-paid: save transaction and mark processed

* Use batch API fetch for order list

* Use batch API retrieval for orders

* Remove hardcoded 'Payment gateway' fallback

* Allow mixed value type for hash filter

* Fix custom admin transaction handling
2026-06-14 03:11:52 +01:00
Yağızhan Burak Yakar 6ae8afd412 Redirect to the correct tab after creating product categories (#3648)
* Redirect to the correct tab after creating product categories

* Make API wrapper reload instead of a no-op redirect if the URL is the same
2026-05-29 20:07:54 +03:00
Adam Daley 24327faba9 Update documentation links and remove legacy errors (#3635) 2026-05-28 21:06:42 +01:00
Adam Daley 6b9f775150 Refactor frontend, build process, and update documentation (#3625)
* Add frontend core, editor adapter & API refactor

* Remove unused Twig macro import and legacy filter

* Move gateway assets to public/gateways

* Include frontend build and assets in Docker image

* Move branding assets to public and refactor build

* Refine update page UI text and styles

* Add 'miterlimit' to cspell word list

* Bump dependencies in composer.lock

* Add esbuild helpers and update imports

* ddev: Node 24, tighten /data & build checks

* Remove .qwen/settings.json

* Docs: expand frontend, build and dev setup

* Add 'docroot' to cspell word list
2026-05-28 12:47:37 +01:00