diff --git a/assets/css/main.css b/assets/css/main.css index 0afa2c3..30d3ad6 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -4950,9 +4950,9 @@ input[type="radio"] + span { cursor: pointer; } -.inset-mb input[type="radio"] { - opacity: 0; -} +/*.inset-mb input[type="radio"] {*/ + /*opacity: 0;*/ +/*}*/ input[type="radio"]:checked + span { background-position: 0 -23px; @@ -6055,9 +6055,9 @@ a.linkS2[data-target="#withdraw-money"]{ border: 1px solid #42B476; } -input[type="radio"]{ - opacity: 0; -} +/*input[type="radio"]{*/ + /*opacity: 0;*/ +/*}*/ .wr-inset-pluss{ margin-top: 24px; diff --git a/projects/templates/customer_project_create.html b/projects/templates/customer_project_create.html index bba6cd8..9a8131a 100644 --- a/projects/templates/customer_project_create.html +++ b/projects/templates/customer_project_create.html @@ -89,7 +89,7 @@ {% if form.work_type.value|int == id %}checked{% endif %} name="{{ form.work_type.html_name }}"> - +{# #}

{{ text }}

@@ -191,7 +191,7 @@ {% if form.deal_type.value == 'secure_deal' %}checked{% endif %} value="secure_deal"> - +{# #}

@@ -211,7 +211,7 @@ {% if form.deal_type.value == 'direct_payment' %}checked{% endif %} value="direct_payment"> - +{# #}

diff --git a/users/templates/partials/customer_profile_info_block.html b/users/templates/partials/customer_profile_info_block.html index f0cac88..28dc017 100644 --- a/users/templates/partials/customer_profile_info_block.html +++ b/users/templates/partials/customer_profile_info_block.html @@ -61,7 +61,7 @@

{#
0
#} -
{{ customer|get_project_message_count }}
+
{{ num_current_projects }}
{% endif %} diff --git a/users/views.py b/users/views.py index 4fdb5e2..cc32c27 100644 --- a/users/views.py +++ b/users/views.py @@ -629,7 +629,9 @@ class CustomerProfileOpenProjectsView(BaseMixin, View): order__team__isnull=True) trashed_projects = customer.customer_projects.filter(state='trashed', order__contractor__isnull=True, order__team__isnull=True) - + # @Add fast + num_current_projects = customer.customer_projects.filter(state='active').exclude(order__contractor__isnull=True, + order__team__isnull=True).count() if form.is_valid(): realty = form.cleaned_data.get('realty') @@ -661,7 +663,7 @@ class CustomerProfileOpenProjectsView(BaseMixin, View): 'open_project_count': projects.paginator.count, 'trashed_project_count': trashed_projects.count(), - + 'num_current_projects': num_current_projects, 'is_paginated': True, 'page_obj': projects, }) @@ -740,6 +742,7 @@ class CustomerProfileCurrentProjectsView(BaseMixin, View): projects = customer.customer_projects.filter(state='active').exclude(order__contractor__isnull=True, order__team__isnull=True) + num_current_projects = projects.count() # trashed_projects = customer.customer_projects.filter(state='trashed') paginator = Paginator(projects, settings.PAGE_SIZE) @@ -755,7 +758,7 @@ class CustomerProfileCurrentProjectsView(BaseMixin, View): context.update({ 'projects': projects, 'customer': customer, - + 'num_current_projects': num_current_projects, # 'open_project_count': projects.paginator.count, # 'trashed_project_count': trashed_projects.count(), @@ -859,9 +862,14 @@ class CustomerProfileReviewsView(BaseMixin, View): customer = get_object_or_404(User.customer_objects, pk=self.kwargs['pk']) reviews = Review.objects.filter(target_customer=customer) + # @Add fast + num_current_projects = customer.customer_projects.filter(state='active').exclude(order__contractor__isnull=True, + order__team__isnull=True).count() + context.update({ 'reviews': reviews, 'customer': customer, + 'num_current_projects': num_current_projects }) return render(request, self.template_name, context)