feat(apps): add role‑based CustomUser admin and ticketing system
- New Features * Introduce CustomUser with role field and admin integration * Add ProjectMembership model linking users to projects * Add Ticket model with status, type, creator, and project relationships * Register CustomUser and ProjectMembership in Django admin with list views * Add URLs and views for account management and ticket CRUD operations - Enhancements * Provide pagination and filtering for ticket listings * Improve admin UI with role‑specific fieldsets - Bug Fixes * Remove obsolete serializers and placeholder files
This commit is contained in:
37 files changed
+954
-126
No files matched your search
+29
-3
@@ -1,5 +1,31 @@
|
||||
"""generated with djinit"""
|
||||
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
from apps.finance.models import Expense, Invoice, Payment, TeamPayment
|
||||
|
||||
|
||||
class PaymentInline(admin.TabularInline):
|
||||
model = Payment
|
||||
extra = 1
|
||||
|
||||
|
||||
@admin.register(Invoice)
|
||||
class InvoiceAdmin(admin.ModelAdmin):
|
||||
list_display = ["id", "project", "client", "amount", "due_date", "status"]
|
||||
list_filter = ["status"]
|
||||
inlines = [PaymentInline]
|
||||
|
||||
|
||||
@admin.register(Payment)
|
||||
class PaymentAdmin(admin.ModelAdmin):
|
||||
list_display = ["invoice", "amount", "method", "paid_at"]
|
||||
|
||||
|
||||
@admin.register(Expense)
|
||||
class ExpenseAdmin(admin.ModelAdmin):
|
||||
list_display = ["project", "category", "amount", "raised_by", "date"]
|
||||
list_filter = ["category"]
|
||||
|
||||
|
||||
@admin.register(TeamPayment)
|
||||
class TeamPaymentAdmin(admin.ModelAdmin):
|
||||
list_display = ["member", "period", "amount", "paid_at"]
|
||||
Reference in new issue
Block a user