from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from .models import DepotUser


@admin.register(DepotUser)
class DepotUserAdmin(UserAdmin):
    # Add your custom fields to the fieldsets
    fieldsets = UserAdmin.fieldsets + (
        ('Additional Info', {'fields': (
            'phone_number',
            'company',
            'line',
            'company_permissions',
            'new_field1',
            'is_company_admin',
        )}),
    )

    # Add fields to display in list view
    list_display = UserAdmin.list_display + ('phone_number', 'company', 'line', 'is_company_admin')

    # Add fields to the add form
    add_fieldsets = UserAdmin.add_fieldsets + (
        ('Additional Info', {'fields': (
            'email',
            'phone_number',
            'company',
            'line',
            'company_permissions',
            'new_field1',
            'is_company_admin',
        )}),
    )