123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- from django.contrib import admin
- from metaservicesynced.models import Permissions, ServiceType, Provider, Documents, Client, Orders, Relationship
- @admin.register(Permissions)
- class PermissionsAdmin(admin.ModelAdmin):
- list_display = (
- 'id',
- 'check_date',
- 'id_permissions',
- 'check_level',
- 'checked_by',
- 'user_id',
- 'status',
- 'ticket_status',
- 'id_metaservice',
- 'is_global',
- 'is_visible',
- )
- list_filter = ('check_date', 'checked_by', 'user_id', 'ticket_status')
- @admin.register(ServiceType)
- class ServiceTypeAdmin(admin.ModelAdmin):
- list_display = (
- 'id',
- 'codename',
- 'caption',
- 'description',
- 'requirements',
- 'price_type',
- 'status',
- 'ticket_status',
- 'id_metaservice',
- 'link_agreement',
- 'is_global',
- 'is_visible',
- )
- list_filter = ('ticket_status',)
- @admin.register(Provider)
- class ProviderAdmin(admin.ModelAdmin):
- list_display = (
- 'id',
- 'type',
- 'user_id',
- 'id_metaservice',
- 'requirements',
- 'status',
- 'ticket_status',
- 'location_type',
- 'default_location',
- 'is_global',
- 'is_visible',
- )
- list_filter = ('user_id', 'ticket_status')
- @admin.register(Documents)
- class DocumentsAdmin(admin.ModelAdmin):
- list_display = (
- 'id',
- 'check_date',
- 'check_level',
- 'expire_date',
- 'id_metaservice',
- 'requirements',
- 'status',
- 'ticket_status',
- 'datalink',
- 'doc_type',
- 'user_id',
- 'is_global',
- 'is_visible',
- 'checked_by',
- )
- list_filter = (
- 'check_date',
- 'expire_date',
- 'ticket_status',
- 'user_id',
- 'checked_by',
- )
- @admin.register(Client)
- class ClientAdmin(admin.ModelAdmin):
- list_display = (
- 'id',
- 'user',
- 'requirements',
- 'status',
- 'ticket_status',
- 'id_metaservice',
- 'is_global',
- 'is_visible',
- )
- list_filter = ('user', 'ticket_status')
- @admin.register(Orders)
- class OrdersAdmin(admin.ModelAdmin):
- list_display = (
- 'id',
- 'service_type',
- 'state',
- 'id_metaservice',
- 'provider',
- 'receiver',
- 'client_id',
- 'time_created',
- 'time_placed',
- 'time_start',
- 'time_finish_predicted',
- 'time_finish_real',
- 'ticket',
- 'predicted_price',
- 'real_price',
- 'is_global',
- 'is_visible',
- )
- list_filter = (
- 'service_type',
- 'provider',
- 'receiver',
- 'client_id',
- 'time_created',
- 'time_placed',
- 'time_start',
- 'time_finish_predicted',
- 'time_finish_real',
- )
- @admin.register(Relationship)
- class RelationshipAdmin(admin.ModelAdmin):
- list_display = (
- 'id',
- 'user_id_who',
- 'user_id_whom',
- 'neg_type',
- 'id_metaservice',
- 'requirements',
- 'status',
- 'ticket_status',
- 'is_global',
- 'is_visible',
- )
- list_filter = ('user_id_who', 'user_id_whom', 'ticket_status')
|