feature/adminpanel #6

Open
ali wants to merge 3 commits from feature/adminpanel into master

3 commits

Author SHA1 Message Date
c359105019 FIX(promotions): include filters.py/docs/urls.py in admin panel restructure
These were dropped from the prior restructuring commit by a failed
multi-pathspec git add (one invalid path aborted the whole call).
Wires up filters.py's Admin*Filter classes, mounts apps.promotions.urls
(the new router package) instead of the deleted urls_admin module, and
brings docs/adminpanel_technical.md in sync with the new layout.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-23 17:28:33 +03:30
1d77303f00 REFACTOR(promotions): split admin panel into views/serializers/urls subpackages
Restructures the admin promotions/referrals endpoints to match the
admin/users folder split used by the sibling advertising service
(apps/crm, apps/escrow, apps/stores there): views/admin/, serializers/admin/,
and a shared urls/router.py with the two resources as GenericViewSets
registered on one DefaultRouter, instead of flat _admin-suffixed modules
with separate ListAPIView/RetrieveAPIView classes.

Scoped to the admin slice only -- the pre-existing user-token/
application-token views, urls, and serializers keep their original
_user/_application file layout and URL namespaces, since converting
those too would rename routes tests.py and external callers depend on.
filters.py stays a single flat file, matching how advertising's own
filters.py is not split into subfolders either.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-23 17:27:15 +03:30
d27ae32e27 FEATURE(promotions): add read-only admin endpoints for promotions and referrals
Adds GET /api/v2/promotions/admin/promotions/ and .../referrals/, listing
every Promotion (type derived from Plan.processor) and referral activity
(invited_by = resolved payee, invited_user = raw event.data['user'] --
there's no dedicated referral model or referral_code field in this
codebase). Follows the existing _user/_application file-suffix convention
with a new _admin suffix, backed by real django-filter FilterSets.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-23 17:10:49 +03:30