|
@@ -2,7 +2,7 @@ from django_tables2 import SingleTableView
|
|
from django.contrib.auth.mixins import UserPassesTestMixin
|
|
from django.contrib.auth.mixins import UserPassesTestMixin
|
|
from SharixAdmin.tables import TaskTable
|
|
from SharixAdmin.tables import TaskTable
|
|
from django.contrib.auth.decorators import login_required
|
|
from django.contrib.auth.decorators import login_required
|
|
-from dbsynce.models import Company
|
|
|
|
|
|
+from webservice_running.models import Tasks
|
|
from django.http import JsonResponse
|
|
from django.http import JsonResponse
|
|
from SharixAdmin.utils import group_required
|
|
from SharixAdmin.utils import group_required
|
|
from django.utils.translation import gettext as _
|
|
from django.utils.translation import gettext as _
|
|
@@ -10,7 +10,7 @@ from django.utils.translation import gettext as _
|
|
|
|
|
|
class TaskListView(UserPassesTestMixin, SingleTableView):
|
|
class TaskListView(UserPassesTestMixin, SingleTableView):
|
|
table_class = TaskTable
|
|
table_class = TaskTable
|
|
- queryset = Company.objects.all()
|
|
|
|
|
|
+ queryset = Tasks.objects.all()
|
|
template_name = 'SharixAdmin/task_management.html'
|
|
template_name = 'SharixAdmin/task_management.html'
|
|
|
|
|
|
def get_context_data(self, **kwargs):
|
|
def get_context_data(self, **kwargs):
|
|
@@ -35,7 +35,7 @@ def change_partners_status(request):
|
|
if request.method == 'POST':
|
|
if request.method == 'POST':
|
|
partners_id = request.POST.get('partners_id')
|
|
partners_id = request.POST.get('partners_id')
|
|
new_status = request.POST.get('new_status')
|
|
new_status = request.POST.get('new_status')
|
|
- partners = Company.objects.get(pk=partners_id)
|
|
|
|
|
|
+ partners = Tasks.objects.get(pk=partners_id)
|
|
partners.status = new_status
|
|
partners.status = new_status
|
|
partners.save()
|
|
partners.save()
|
|
return JsonResponse({'status': 'success'})
|
|
return JsonResponse({'status': 'success'})
|