initial commit
This commit is contained in:
3
core/apps/companies/admin/__init__.py
Normal file
3
core/apps/companies/admin/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from .accounts import * # noqa
|
||||
from .companies import * # noqa
|
||||
from .folders import * # noqa
|
||||
27
core/apps/companies/admin/accounts.py
Normal file
27
core/apps/companies/admin/accounts.py
Normal file
@@ -0,0 +1,27 @@
|
||||
from django.contrib import admin
|
||||
from unfold.admin import ModelAdmin # type: ignore
|
||||
|
||||
from core.apps.companies.models import CompanyAccountModel
|
||||
|
||||
|
||||
@admin.register(CompanyAccountModel)
|
||||
class DirectorAdmin(ModelAdmin):
|
||||
list_display = (
|
||||
"user_name",
|
||||
"role",
|
||||
"company",
|
||||
"created_at",
|
||||
)
|
||||
|
||||
list_display_links = (
|
||||
"user_name",
|
||||
"role",
|
||||
)
|
||||
|
||||
search_fields = (
|
||||
"user",
|
||||
"role",
|
||||
"company",
|
||||
"created_at",
|
||||
"updated_at",
|
||||
)
|
||||
32
core/apps/companies/admin/companies.py
Normal file
32
core/apps/companies/admin/companies.py
Normal file
@@ -0,0 +1,32 @@
|
||||
from django.contrib import admin
|
||||
from unfold.admin import ModelAdmin # type: ignore
|
||||
|
||||
from core.apps.companies.models import CompanyModel
|
||||
|
||||
|
||||
@admin.register(CompanyModel)
|
||||
class CompanyAdmin(ModelAdmin):
|
||||
list_display = (
|
||||
"name",
|
||||
"company_code",
|
||||
"phone",
|
||||
"email",
|
||||
"iik_code",
|
||||
"legal_address",
|
||||
"real_address",
|
||||
"created_at",
|
||||
)
|
||||
search_fields = (
|
||||
"name",
|
||||
"company_code",
|
||||
"phone",
|
||||
"email",
|
||||
"iik_code",
|
||||
"legal_address",
|
||||
"real_address",
|
||||
"created_at",
|
||||
"updated_at"
|
||||
)
|
||||
list_display_links = (
|
||||
"name",
|
||||
)
|
||||
24
core/apps/companies/admin/folders.py
Normal file
24
core/apps/companies/admin/folders.py
Normal file
@@ -0,0 +1,24 @@
|
||||
from django.contrib import admin
|
||||
from unfold.admin import ModelAdmin # type: ignore
|
||||
|
||||
from core.apps.companies.models import CompanyFolderModel
|
||||
|
||||
|
||||
@admin.register(CompanyFolderModel)
|
||||
class FolderAdmin(ModelAdmin):
|
||||
list_display = (
|
||||
"name",
|
||||
"company",
|
||||
"created_at"
|
||||
)
|
||||
|
||||
search_fields = (
|
||||
"name",
|
||||
"company",
|
||||
"created_at",
|
||||
"updated_at",
|
||||
)
|
||||
|
||||
list_display_links = (
|
||||
"name",
|
||||
)
|
||||
Reference in New Issue
Block a user