79 lines
1.4 KiB
Python
79 lines
1.4 KiB
Python
from django.contrib import admin
|
|
from unfold.admin import ModelAdmin # type: ignore
|
|
|
|
from core.apps.contracts.models import (
|
|
ContractOwnerModel,
|
|
LegalEntityModel,
|
|
IndividualModel,
|
|
)
|
|
|
|
|
|
@admin.register(IndividualModel)
|
|
class IndividualAdmin(ModelAdmin):
|
|
list_display = (
|
|
"full_name",
|
|
"individual_code",
|
|
"phone",
|
|
"use_face_id",
|
|
"created_at",
|
|
)
|
|
|
|
search_fields = (
|
|
"full_name",
|
|
"iin_code",
|
|
"person_code",
|
|
"phone",
|
|
"use_face_id",
|
|
"created_at",
|
|
"updated_at",
|
|
)
|
|
|
|
list_display_links = (
|
|
"full_name",
|
|
)
|
|
|
|
|
|
@admin.register(LegalEntityModel)
|
|
class LegalentityAdmin(ModelAdmin):
|
|
list_display = (
|
|
"name",
|
|
"role",
|
|
"entity_code",
|
|
"phone",
|
|
"created_at",
|
|
)
|
|
search_fields = (
|
|
"name",
|
|
"role",
|
|
"bin_code",
|
|
"identifier",
|
|
"phone",
|
|
"created_at",
|
|
"updated_at",
|
|
)
|
|
|
|
list_display_links = (
|
|
"name",
|
|
)
|
|
|
|
|
|
@admin.register(ContractOwnerModel)
|
|
class OwnerAdmin(ModelAdmin):
|
|
list_display = (
|
|
"owner_identity",
|
|
"owner_name",
|
|
"status",
|
|
"created_at"
|
|
)
|
|
|
|
search_fields = (
|
|
"owner_name",
|
|
"status",
|
|
"created_at",
|
|
"updated_at"
|
|
)
|
|
|
|
list_display_links = (
|
|
"owner_identity",
|
|
)
|