|
@@ -144,7 +144,7 @@ class ServiceTypeTable(tables.Table):
|
|
|
args=[tables.A('pk')], attrs= {"a": {"style": "pointer-events: none;"}, 'th':{'scope':'col'}, "td":{"class":"description_col"}})
|
|
|
edit = tables.LinkColumn('service_type/edit/', verbose_name='', orderable=False, text = "E",
|
|
|
args=[tables.A('pk')], attrs={'th':{'scope':'col'}, "td":{"class":"edit_col"}})
|
|
|
- deletee = tables.LinkColumn('service_type/delete/', verbose_name='', orderable=False, text = "D",
|
|
|
+ delete = tables.LinkColumn('service_type/delete/', verbose_name='', orderable=False, text = "D",
|
|
|
args=[tables.A('pk')], attrs={'th':{'scope':'col'}, "td":{"class":"delete_col"}})
|
|
|
|
|
|
|
|
@@ -165,20 +165,41 @@ class ServiceTypeTable(tables.Table):
|
|
|
class CommentsTable(tables.Table):
|
|
|
|
|
|
id = tables.Column( attrs={"td":{"width":"50px"}})
|
|
|
- name_comment = tables.LinkColumn('service_type/edit/', verbose_name='Комментарий', orderable=False, text = lambda record: record.codename,
|
|
|
- args=[tables.A('pk')], attrs= {"a": {"style": "pointer-events: none;"}, 'th':{'scope':'col'}, "td":{"class":"name_col"}})
|
|
|
- description = tables.LinkColumn('service_type/edit/', orderable=False, verbose_name='Описание', text = lambda record: record.description,
|
|
|
+ user_id = tables.Column(accessor='user_id.full_name', order_by=('user_id.first_name', 'user_id.last_name'), verbose_name=_('User'), attrs={"td":{"width":"15%"}})
|
|
|
+
|
|
|
+ check = tables.BooleanColumn(verbose_name='', attrs={'th':{'scope':'col'}, "td":{"width":"5%"}})
|
|
|
+ delete = tables.LinkColumn('comments/delete/', verbose_name='', orderable=False, text = "D",
|
|
|
+ args=[tables.A('pk')], attrs={'th':{'scope':'col'}, "td":{"class":"delete_col"}})
|
|
|
+ status = tables.Column(verbose_name=_('Status'), attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ model = Comments
|
|
|
+ attrs = {"class": "table table-layout-fixed text-start"}
|
|
|
+ exclude = ('ticket_status', 'id_metaservice',
|
|
|
+ 'is_global', 'is_visible')
|
|
|
+
|
|
|
+ def render_check(self, value, record):
|
|
|
+ if record.status == 'active':
|
|
|
+ return format_html('<input class="form-check-input status-toggle" checked type="checkbox" id="flexCheckDefault" data-comments-id="{}">', record.id)
|
|
|
+ else:
|
|
|
+ return format_html('<input class="form-check-input status-toggle" type="checkbox" id="flexCheckDefault" data-comments-id="{}">', record.id)
|
|
|
+
|
|
|
+class TechSupTable(tables.Table):
|
|
|
+
|
|
|
+ id = tables.Column( attrs={"td":{"width":"50px"}})
|
|
|
+ user_id = tables.Column(accessor='user_id.full_name', order_by=('user_id.first_name', 'user_id.last_name'), verbose_name=_('User'), attrs={"td":{"width":"15%"}})
|
|
|
+ description = tables.LinkColumn('tech_support/edit/', orderable=False, verbose_name='Описание', text = lambda record: record.description,
|
|
|
args=[tables.A('pk')], attrs= {"a": {"style": "pointer-events: none;"}, 'th':{'scope':'col'}, "td":{"class":"description_col"}})
|
|
|
- edit = tables.LinkColumn('service_type/edit/', verbose_name='', orderable=False, text = "E",
|
|
|
+ edit = tables.LinkColumn('tech_support/edit/', verbose_name='', orderable=False, text = "E",
|
|
|
args=[tables.A('pk')], attrs={'th':{'scope':'col'}, "td":{"class":"edit_col"}})
|
|
|
- deletee = tables.LinkColumn('service_type/delete/', verbose_name='', orderable=False, text = "D",
|
|
|
+ delete = tables.LinkColumn('tech_support/delete/', verbose_name='', orderable=False, text = "D",
|
|
|
args=[tables.A('pk')], attrs={'th':{'scope':'col'}, "td":{"class":"delete_col"}})
|
|
|
-
|
|
|
+ status = tables.Column(verbose_name=_('Status'), attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
|
|
|
|
|
|
class Meta:
|
|
|
- model = ServiceType
|
|
|
+ model = Comments
|
|
|
attrs = {"class": "table table-layout-fixed text-start"}
|
|
|
- exclude = ('ticket_status',
|
|
|
+ exclude = ('ticket_status', 'id_metaservice',
|
|
|
'is_global', 'is_visible')
|
|
|
|
|
|
class ServiceTable(tables.Table):
|
|
@@ -187,14 +208,6 @@ class ServiceTable(tables.Table):
|
|
|
servicetype_id = tables.Column(verbose_name=_('Description of the service'), accessor = 'servicetype_id.caption',
|
|
|
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_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%"}})
|
|
|
-
|
|
|
id_provider = tables.Column(verbose_name=_('Организатор'))
|
|
|
name_service = tables.Column(verbose_name=_('Экскурсия'))
|
|
|
rating = tables.Column(verbose_name=_('Рейтинг'))
|
|
@@ -217,7 +230,7 @@ class UserInfoTable(tables.Table):
|
|
|
|
|
|
id = tables.Column(verbose_name=_('ID'), attrs={"td":{"width":"5%"}})
|
|
|
|
|
|
- deletee = tables.LinkColumn('user_information/delete/', verbose_name='', orderable=False, text = "D",
|
|
|
+ delete = tables.LinkColumn('user_information/delete/', verbose_name='', orderable=False, text = "D",
|
|
|
args=[tables.A('pk')], attrs={'th':{'scope':'col'}, "td":{"class":"delete_col"}})
|
|
|
|
|
|
class Meta:
|