34 lines
708 B
Python
34 lines
708 B
Python
from django.contrib import admin
|
|
|
|
from core.admins.base import BaseAdmin, SoftDeleteListFilter
|
|
from apps.time_entries.models import TimeEntry
|
|
|
|
|
|
@admin.register(TimeEntry)
|
|
class TimeEntryAdmin(BaseAdmin):
|
|
list_display = (
|
|
"id",
|
|
"user",
|
|
"workspace",
|
|
"project",
|
|
"start_time",
|
|
"end_time",
|
|
"is_billable",
|
|
)
|
|
list_filter = (
|
|
SoftDeleteListFilter,
|
|
"workspace",
|
|
"project",
|
|
"is_billable",
|
|
)
|
|
search_fields = (
|
|
"user__mobile",
|
|
"project__name",
|
|
"description",
|
|
)
|
|
autocomplete_fields = (
|
|
"user",
|
|
"workspace",
|
|
"project",
|
|
)
|