fix - pos sharing on agc bug fixed influently

This commit is contained in:
2025-12-22 09:42:22 +03:30
parent 4096dbbd6e
commit 65a826ab7f
8 changed files with 115 additions and 65 deletions

View File

@@ -225,7 +225,7 @@ class RancherViewSet(BaseViewSet, RancherDashboardService, SoftDeleteMixin, view
url_name='rancher_dashboard_by_quota_usage',
name='rancher_dashboard_by_quota_usage'
)
def rancher_dashboard_by_quota_usage(self, request, pk=None):
def ranchers_dashboard_by_quota_usage(self, request, pk=None):
""" rancher dashboard """
rancher = self.get_object()
@@ -261,3 +261,37 @@ class RancherViewSet(BaseViewSet, RancherDashboardService, SoftDeleteMixin, view
rancher=rancher
)
return Response(rancher_dashboard_data)
@action(
methods=['get'],
detail=False,
url_name='org_ranchers',
url_path='org_ranchers',
name='org_ranchers'
)
def org_ranchers(self, request):
"""
list of ranchers by organization
"""
queryset = self.get_queryset(visibility_by_org_scope=True)
page = self.paginate_queryset(queryset)
if page is not None: # noqa
serializer = product_serializers.IncentivePlanRancherSerializer(page, many=True)
return self.get_paginated_response(serializer.data)
return Response(status=status.HTTP_200_OK)
@action(
methods=['get'],
detail=False,
url_name='org_ranchers_dashboard',
url_path='org_ranchers_dashboard',
name='org_ranchers_dashboard'
)
def org_ranchers_dashboard(self, request):
"""
dashboard of ranchers report
"""
queryset = self.get_queryset(visibility_by_org_scope=True)

View File

@@ -1,5 +1,6 @@
from django.urls import path, include
from rest_framework import routers
from .api import HerdViewSet, RancherViewSet
router = routers.DefaultRouter()
@@ -8,4 +9,4 @@ router.register('rancher', RancherViewSet, basename='rancher')
urlpatterns = [
path('api/v1/', include(router.urls))
]
]