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
This commit is contained in:
2026-04-04 14:52:41 +02:00
parent 17e784fee7
commit d3abdb7ed9
30 changed files with 2272 additions and 5 deletions

View File

@@ -22,6 +22,7 @@ class Subscriber extends Model
'phone',
'synced_to_mailwizz',
'synced_at',
'coupon_code',
];
protected function casts(): array
@@ -95,7 +96,8 @@ class Subscriber extends Model
$q->where('first_name', 'like', $like)
->orWhere('last_name', 'like', $like)
->orWhere('email', 'like', $like)
->orWhere('phone', 'like', $like);
->orWhere('phone', 'like', $like)
->orWhere('coupon_code', 'like', $like);
});
}
}