12 Commits

Author SHA1 Message Date
1e7ee14540 fix: clear Mailwizz checkboxlist tag when deleting subscriber
Encode empty checkboxlist arrays as an empty scalar so multipart requests
include the field. On delete, PUT only coupon and tag fields to Mailwizz
after merging the tag CSV from getSubscriber.

Made-with: Cursor
2026-04-05 13:33:56 +02:00
7eda51f52a feat: clean Weeztix and Mailwizz when admin deletes subscriber
Run CleanupSubscriberIntegrationsService before delete: remove coupon code
in Weeztix via list+DELETE API; update Mailwizz contact to strip configured
source tag from the tag field and clear the mapped coupon field.

Extract MailwizzCheckboxlistTags and MailwizzSubscriberFormPayload for
shared sync/cleanup behaviour. Add WeeztixService list and delete helpers.

Integration failures are logged only; local delete always proceeds.
Feature tests cover Mailwizz strip+clear and Weeztix delete paths.

Made-with: Cursor
2026-04-05 11:57:16 +02:00
de83a6fb76 fix: isolate public subscribe from integration job failures
Queue Weeztix/Mailwizz after the HTTP response and catch dispatch errors.
Jobs log Mailwizz/Weeztix API failures without rethrowing so sync driver
and terminating callbacks do not surface 500s after a successful create.

Add JS fallback for non-JSON error responses, deployment note, and a
regression test for failing Mailwizz under QUEUE_CONNECTION=sync.

Made-with: Cursor
2026-04-05 11:47:59 +02:00
d802ce2a7c feat(subscribe): queue Weeztix coupon, then Mailwizz; document queues
- RegisterSubscriberOnPage: persist subscriber then dispatch integrations
- IssueWeeztixCouponForSubscriber on weeztix queue; dispatches Mailwizz after
  coupon attempt (idempotent if coupon_code already set); failed() fallback
- SyncSubscriberToMailwizz implements ShouldQueueAfterCommit
- Deployment: worker listens weeztix,mailwizz,default; warn against sync in prod
- .env.example: QUEUE_CONNECTION notes for subscribe UX

Made-with: Cursor
2026-04-05 11:34:01 +02:00
217e1d9afb fix(weeztix): allow OAuth reconnect in wizard step 2 and re-sync company
Always sync company from profile after OAuth; remove skip when company_guid
was already set. Step 2 shows reconnect for connected users plus link to step 3.

Made-with: Cursor
2026-04-05 11:16:49 +02:00
6561bda30d feat(weeztix): auto company from OAuth, remove company UI
Store company_guid after OAuth via profile API; drop company select and
companies endpoint. Coupons AJAX uses stored company only. Form request
no longer accepts company fields from the browser.

Made-with: Cursor
2026-04-05 10:56:29 +02:00
977e09d8ac fix: show real Weeztix company trade names, not GUID-as-name
Merge nested company objects, prefer trade_name over name, skip UUID-like
labels; Alpine falls back to stored company_name when API label is junk.

Made-with: Cursor
2026-04-05 10:48:04 +02:00
d3abdb7ed9 feat: add Weeztix OAuth, coupon codes, and Mailwizz mapping
Implement Weeztix integration per documentation: database config and
subscriber coupon_code, OAuth redirect/callback, admin setup UI with
company/coupon selection via AJAX, synchronous coupon creation on public
subscribe with duplicate and rate-limit handling, Mailwizz field mapping
for coupon codes, subscriber table and CSV export, and connection hint
on the pages list.

Made-with: Cursor
2026-04-04 14:52:41 +02:00
17e784fee7 feat: E.164 phone validation and storage with libphonenumber
- Add giggsey/libphonenumber-for-php, PhoneNumberNormalizer, ValidPhoneNumber rule

- Store subscribers as E.164; mutator normalizes on save; optional phone required from form block

- Migration to normalize legacy subscriber phones; Mailwizz/search/UI/tests updated

- Add run-deploy-from-local.sh and PREREGISTER_DEFAULT_PHONE_REGION in .env.example

Made-with: Cursor
2026-04-04 14:25:52 +02:00
ff58e82497 Implemented a block editor for changing the layout of the page 2026-04-04 01:17:05 +02:00
83e2158383 feat: Phase 4 - Mailwizz integration with subscriber sync and retry 2026-04-03 22:03:53 +02:00
78e1be3e3b feat: Phase 2 - admin layout, dashboard, page CRUD, subscribers, user management 2026-04-03 20:09:20 +02:00