|
@@ -3,16 +3,16 @@ from metaservicesynced.models import *
|
|
from .models import *
|
|
from .models import *
|
|
from django.utils.html import format_html
|
|
from django.utils.html import format_html
|
|
from metaservicesynced.models import *
|
|
from metaservicesynced.models import *
|
|
-
|
|
|
|
|
|
+from django.utils.translation import gettext_lazy as _
|
|
|
|
|
|
class TransactionsWalletTable(tables.Table):
|
|
class TransactionsWalletTable(tables.Table):
|
|
# id = tables.Column(order_by=True)
|
|
# id = tables.Column(order_by=True)
|
|
id = tables.Column(verbose_name='#', orderable=False, attrs={"td":{"width":"5%"}})
|
|
id = tables.Column(verbose_name='#', orderable=False, attrs={"td":{"width":"5%"}})
|
|
- wallet = tables.Column(verbose_name='Владелец', orderable=False, attrs={"td":{"width":"15%"}})
|
|
|
|
- name_operation = tables.Column(verbose_name='Услуга', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
|
|
- price = tables.Column(verbose_name='Баллы', attrs={"class":"row", "td":{"width":"10%"}})
|
|
|
|
- date_operation = tables.Column(verbose_name='Дата оформления', attrs={"td":{"width":"30%"}})
|
|
|
|
- is_carried_out = tables.BooleanColumn(verbose_name='Статус', orderable=False, yesno="Успешно,Не успешно", attrs={"td":{"width":"20%"}})
|
|
|
|
|
|
+ wallet = tables.Column(verbose_name=_('Owner'), orderable=False, attrs={"td":{"width":"15%"}})
|
|
|
|
+ name_operation = tables.Column(verbose_name=_('Service'), attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
|
|
+ price = tables.Column(verbose_name=_('Points'), attrs={"class":"row", "td":{"width":"10%"}})
|
|
|
|
+ date_operation = tables.Column(verbose_name=_('Registration date'), attrs={"td":{"width":"30%"}})
|
|
|
|
+ is_carried_out = tables.BooleanColumn(verbose_name=_('Status'), orderable=False, yesno=_("Successful, not successful"), attrs={"td":{"width":"20%"}})
|
|
|
|
|
|
class Meta:
|
|
class Meta:
|
|
#model = TransactionsWallets
|
|
#model = TransactionsWallets
|
|
@@ -27,11 +27,11 @@ class TransactionsWalletTable(tables.Table):
|
|
return format_html("<a href='{}'>{}</a>", record.get_absolute_url(), value)
|
|
return format_html("<a href='{}'>{}</a>", record.get_absolute_url(), value)
|
|
|
|
|
|
class PartnersTable(tables.Table):
|
|
class PartnersTable(tables.Table):
|
|
- id = tables.Column(verbose_name='ID', attrs={"td":{"width":"5%"}})
|
|
|
|
- legal_name = tables.Column(verbose_name='Юрлицо', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
|
|
- repr_id = tables.Column(accessor='repr_id.full_name', order_by=('repr_id.first_name', 'repr_id.last_name'), verbose_name='Ответственный', attrs={"td":{"width":"15%"}})
|
|
|
|
|
|
+ id = tables.Column(verbose_name=_('ID'), attrs={"td":{"width":"5%"}})
|
|
|
|
+ legal_name = tables.Column(verbose_name=_('Legal entity'), attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
|
|
+ repr_id = tables.Column(accessor='repr_id.full_name', order_by=('repr_id.first_name', 'repr_id.last_name'), verbose_name=_('Responsible'), attrs={"td":{"width":"15%"}})
|
|
|
|
|
|
- status = tables.Column(verbose_name='Статус', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
|
|
|
|
+ status = tables.Column(verbose_name=_('Status'), attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
check = tables.BooleanColumn(verbose_name='', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
check = tables.BooleanColumn(verbose_name='', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
# paginate_by = 10
|
|
# paginate_by = 10
|
|
class Meta:
|
|
class Meta:
|
|
@@ -50,10 +50,10 @@ class PartnersTable(tables.Table):
|
|
|
|
|
|
class ResourceTable(tables.Table):
|
|
class ResourceTable(tables.Table):
|
|
|
|
|
|
- id = tables.Column(verbose_name='ID', attrs={"td":{"width":"5%"}})
|
|
|
|
|
|
+ id = tables.Column(verbose_name=_('ID'), attrs={"td":{"width":"5%"}})
|
|
#В user_id ссылка LinkColumn на страницу Аси "Информация о партнере" страница partner_information_form
|
|
#В user_id ссылка LinkColumn на страницу Аси "Информация о партнере" страница partner_information_form
|
|
- user_id = tables.Column(accessor='user_id.full_name', order_by=('user_id.first_name', 'user_id.last_name'), verbose_name='Ответственный', attrs={"td":{"width":"15%"}})
|
|
|
|
- status = tables.Column(verbose_name='Статус', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
|
|
|
|
+ user_id = tables.Column(accessor='user_id.full_name', order_by=('user_id.first_name', 'user_id.last_name'), verbose_name=_('Responsible'), attrs={"td":{"width":"15%"}})
|
|
|
|
+ status = tables.Column(verbose_name=_('Status'), attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
check = tables.BooleanColumn(verbose_name='', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
check = tables.BooleanColumn(verbose_name='', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
# paginate_by = 10
|
|
# paginate_by = 10
|
|
class Meta:
|
|
class Meta:
|
|
@@ -70,10 +70,10 @@ class ResourceTable(tables.Table):
|
|
|
|
|
|
class ProviderTable(tables.Table):
|
|
class ProviderTable(tables.Table):
|
|
|
|
|
|
- id = tables.Column(verbose_name='ID', attrs={"td":{"width":"5%"}})
|
|
|
|
- user_id = tables.Column(accessor='user_id.full_name', order_by=('user_id.first_name', 'user_id.last_name'), verbose_name='ФИО', attrs={"td":{"width":"15%"}})
|
|
|
|
|
|
+ id = tables.Column(verbose_name=_('ID'), attrs={"td":{"width":"5%"}})
|
|
|
|
+ user_id = tables.Column(accessor='user_id.full_name', order_by=('user_id.first_name', 'user_id.last_name'), verbose_name=_('Full Name'), attrs={"td":{"width":"15%"}})
|
|
|
|
|
|
- status = tables.Column(verbose_name='Статус', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
|
|
|
|
+ status = tables.Column(verbose_name=_('Status'), attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
check = tables.BooleanColumn(verbose_name='', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
check = tables.BooleanColumn(verbose_name='', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
paginate_by = 10
|
|
paginate_by = 10
|
|
class Meta:
|
|
class Meta:
|
|
@@ -91,11 +91,11 @@ class ProviderTable(tables.Table):
|
|
|
|
|
|
class ServiceTariffTable(tables.Table):
|
|
class ServiceTariffTable(tables.Table):
|
|
|
|
|
|
- id = tables.Column(verbose_name='ID', attrs={"td":{"width":"5%"}})
|
|
|
|
- servicetype_id = tables.LinkColumn('service_tariff/edit/', verbose_name='Название тарифа', text = lambda record: record.servicetype_id.caption,
|
|
|
|
|
|
+ id = tables.Column(verbose_name=_('ID'), attrs={"td":{"width":"5%"}})
|
|
|
|
+ servicetype_id = tables.LinkColumn('service_tariff/edit/', verbose_name=_('Name of the tariff'), text = lambda record: record.servicetype_id.caption,
|
|
args=[tables.A('pk')], attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
args=[tables.A('pk')], attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
- ticket_status = tables.Column(verbose_name='Название схемы услуги', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
|
|
- check = tables.BooleanColumn(verbose_name='Активность', orderable=False, attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
|
|
|
|
+ ticket_status = tables.Column(verbose_name=_('Name of the service scheme'), attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
|
|
+ check = tables.BooleanColumn(verbose_name=_('Activity'), orderable=False, attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
|
|
|
|
|
|
|
|
class Meta:
|
|
class Meta:
|
|
@@ -114,7 +114,7 @@ class ServiceTariffTable(tables.Table):
|
|
|
|
|
|
class ServiceTypeTable(tables.Table):
|
|
class ServiceTypeTable(tables.Table):
|
|
|
|
|
|
- id = tables.Column(verbose_name='ID', attrs={"td":{"width":"5%"}})
|
|
|
|
|
|
+ id = tables.Column(verbose_name=_('ID'), attrs={"td":{"width":"5%"}})
|
|
caption = tables.LinkColumn('service_type/edit/', verbose_name='Название услуги', text = lambda record: record.caption,
|
|
caption = tables.LinkColumn('service_type/edit/', verbose_name='Название услуги', text = lambda record: record.caption,
|
|
args=[tables.A('pk')], attrs={'th':{'scope':'col'}, "td":{"width":"100%"},})
|
|
args=[tables.A('pk')], attrs={'th':{'scope':'col'}, "td":{"width":"100%"},})
|
|
deletee = tables.LinkColumn('service_type/delete/', verbose_name='', text = "Удалить",
|
|
deletee = tables.LinkColumn('service_type/delete/', verbose_name='', text = "Удалить",
|
|
@@ -129,24 +129,24 @@ class ServiceTypeTable(tables.Table):
|
|
'is_global', 'is_visible',)
|
|
'is_global', 'is_visible',)
|
|
|
|
|
|
def render_delete(self, value, record):
|
|
def render_delete(self, value, record):
|
|
- return format_html('<a href="/service_type/delete" class="btn btn-outline-danger">Удалить</a>')
|
|
|
|
|
|
+ return format_html('<a href="/service_type/delete" class="btn btn-outline-danger">_(Delete)</a>')
|
|
|
|
|
|
def render_name_operation(self, value, record):
|
|
def render_name_operation(self, value, record):
|
|
return format_html("<a href='{}'>{}</a>", record.get_absolute_url(), value)
|
|
return format_html("<a href='{}'>{}</a>", record.get_absolute_url(), value)
|
|
|
|
|
|
class ServiceTable(tables.Table):
|
|
class ServiceTable(tables.Table):
|
|
|
|
|
|
- id = tables.Column(verbose_name='ID', attrs={"td":{"width":"5%"}})
|
|
|
|
- servicetype_id = tables.Column(verbose_name='Описание услуги (сервиса)', accessor = 'servicetype_id.caption',
|
|
|
|
|
|
+ id = tables.Column(verbose_name=_('ID'), attrs={"td":{"width":"5%"}})
|
|
|
|
+ servicetype_id = tables.Column(verbose_name=_('Description of the service'), accessor = 'servicetype_id.caption',
|
|
attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
|
|
|
|
# description = tables.Column(verbose_name='Название тарифа', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
# description = tables.Column(verbose_name='Название тарифа', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
# description = tables.Column(verbose_name='Описание строки тарифов', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
# description = tables.Column(verbose_name='Описание строки тарифов', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
# price_type = tables.Column(verbose_name='Тип тарифа', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
# price_type = tables.Column(verbose_name='Тип тарифа', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
|
|
|
|
- price_km = tables.Column(verbose_name='Стоимость км.', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
|
|
- price_min = tables.Column(verbose_name='Стоимость мин.', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
|
|
- price_amount = tables.Column(verbose_name='Стоимость услуги', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
|
|
|
|
+ price_km = tables.Column(verbose_name=_('Cost km.'), attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
|
|
+ price_min = tables.Column(verbose_name=_('Cost min.'), attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
|
|
+ price_amount = tables.Column(verbose_name=_('Cost of service'), attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
|
|
|
|
class Meta:
|
|
class Meta:
|
|
model = Service
|
|
model = Service
|
|
@@ -163,7 +163,7 @@ class ServiceTable(tables.Table):
|
|
|
|
|
|
class UserInfoTable(tables.Table):
|
|
class UserInfoTable(tables.Table):
|
|
|
|
|
|
- id = tables.Column(verbose_name='ID', attrs={"td":{"width":"5%"}})
|
|
|
|
|
|
+ id = tables.Column(verbose_name=_('ID'), attrs={"td":{"width":"5%"}})
|
|
|
|
|
|
class Meta:
|
|
class Meta:
|
|
model = SharixUser
|
|
model = SharixUser
|