diff --git a/api/views.py b/api/views.py index 11abebe..69ed315 100755 --- a/api/views.py +++ b/api/views.py @@ -40,7 +40,7 @@ class NoteViewSet(ModelViewSet): queryset = Notes.objects.all() serializer_class = NoteSerializer filter_class = NoteFilterSet - + permission_classes = (permissions.IsAuthenticatedOrReadOnly,) class MessageViewSet(ModelViewSet): queryset = Message.objects.all() diff --git a/assets/css/extra.css b/assets/css/extra.css index b058932..3a87ae4 100644 --- a/assets/css/extra.css +++ b/assets/css/extra.css @@ -68,3 +68,17 @@ .textAreaBlock2 input[type="text"] { margin: 0; } + + +.stepssBlock ul li.reserved::before { + background: rgba(0, 0, 0, 0) url("../img/reserved2.png") no-repeat scroll center center / cover ; + height: 16px; + width: 17px; +} + + +.stepssBlock ul li.unreserved::before { + background: rgba(0, 0, 0, 0) url("../img/reserved.png") no-repeat scroll center center / cover ; + height: 14px; + width: 13px; +} diff --git a/chat/templates/chat_contractor.html b/chat/templates/chat_contractor.html index abaa9fb..929734a 100644 --- a/chat/templates/chat_contractor.html +++ b/chat/templates/chat_contractor.html @@ -97,7 +97,7 @@
{{ order }}
Испонитель: {{ request.user.get_full_name }}
+Исполнитель: {{ request.user.get_full_name }}
Чаты: Иванов, Петров
@@ -137,14 +137,28 @@2 / Резервирование
++ Резервирование заказчиком суммы оплаты по заказ. Деньги перечисляются и хранятся на + сайте. +
+2 / Резервирование
@@ -297,16 +308,25 @@ $("#approve-stages").on('click', function(){ $(".stage-block-approve").each(function(){ var stageId = $(this).attr('data-id'); - alert(stageId); + }); }); // Вытащить сообщения для чата заказа $('.order-block').on('click', function () { + $('.order-block').each(function () { + $(this).removeClass('orAct'); + }); + $(this).addClass('orAct'); + var orderId = $(this).attr('data-id'); var recipentId = $(this).attr('data-recipent-id'); $("#chat-contractor-order #orderId").val(orderId); + $("#add-form-order-note #orderNote").val(orderId); + $("#chat-contractor-order #recipentOrderId").val(recipentId); + $("#add-form-order-note #recipentNote").val(recipentId); + var inbox = document.getElementById('message-chat-order-space'); inbox.innerHTML = ''; @@ -330,6 +350,21 @@ } }); + $.ajax({ + url: '/api/note/', + type: 'GET', + data: {csrfmiddlewaretoken: csrftoken, 'order': orderId}, + dataType: 'json', + success: function (json) { + console.log(json.results); + var noteHtmlInbox = ''; + $.each(json.results, function (i, v) { + noteHtmlInbox += '
Этап '+ v.pos +''+ v.name +'
' + - 'Результаты этапа:'+ v.result+'
до 16.03.2015
'+ v.cost +'Этап ' + v.pos + '' + v.name + '
' + + 'Результаты этапа:' + v.result + '
'+ v.status+'
' + v.cost + 'Этапы работы
1 / Согласование условий
@@ -136,37 +136,35 @@- Какое кол-во этапов подразумевает работа? -
- - -#} +{# Какое кол-во этапов подразумевает работа? #} +{#
#} +{# #} +{##} +{#Какое кол-во этапов подразумевает работа? ' + + '
'; + + if (stageCount == 0){ + htmlInboxStage += 'Этап 1
Этап ' + v.pos + '' + v.name + '
' + 'Результаты этапа:' + v.result + '