fix: comments con companies app fixed
This commit is contained in:
@@ -13,7 +13,7 @@ from core.apps.companies.serializers.accounts import (
|
||||
)
|
||||
|
||||
###################################################################################
|
||||
# @view-set | POST, GET, UPDATE, DELETE, PATCH, PUT -
|
||||
# @view-set | ALL - /company-accounts
|
||||
###################################################################################
|
||||
@extend_schema(tags=["CompanyAccount"])
|
||||
class CompanyAccountCrudViewSet(BaseViewSetMixin, ModelViewSet):
|
||||
|
||||
@@ -35,9 +35,9 @@ from core.apps.contracts.models import ContractModel
|
||||
UserModel = get_user_model()
|
||||
|
||||
|
||||
######################################################################
|
||||
# Crud
|
||||
######################################################################
|
||||
###################################################################################
|
||||
# @view-set | ALL - /companies
|
||||
###################################################################################
|
||||
@extend_schema(tags=["Company"])
|
||||
class CompanyCrudViewSet(BaseViewSetMixin, ModelViewSet):
|
||||
queryset = CompanyModel.objects.all()
|
||||
@@ -60,9 +60,9 @@ class CompanyCrudViewSet(BaseViewSetMixin, ModelViewSet):
|
||||
}
|
||||
|
||||
|
||||
######################################################################
|
||||
# company/<uuid:pk>/contract
|
||||
######################################################################
|
||||
###################################################################################
|
||||
# @api-view | GET - /companies/<uuid:pk>/contracts
|
||||
###################################################################################
|
||||
@extend_schema(tags=["Company Contracts"])
|
||||
class CompanyContractApiView(BaseApiViewMixin, GenericAPIView): # type: ignore
|
||||
queryset = CompanyModel.objects.all()
|
||||
@@ -101,9 +101,9 @@ class CompanyContractApiView(BaseApiViewMixin, GenericAPIView): # type: ignore
|
||||
return Response(serializer.data, status=status.HTTP_200_OK)
|
||||
|
||||
|
||||
######################################################################
|
||||
# company/<uuid:pk>/accounts
|
||||
######################################################################
|
||||
###################################################################################
|
||||
# @api-view | GET - /company/<uuid:pk>/accounts
|
||||
###################################################################################
|
||||
@extend_schema(tags=["Company Accounts"])
|
||||
class CompanyAccountApiView(BaseApiViewMixin, GenericAPIView): # type: ignore
|
||||
queryset = CompanyModel.objects.all()
|
||||
@@ -128,9 +128,10 @@ class CompanyAccountApiView(BaseApiViewMixin, GenericAPIView): # type: ignore
|
||||
return Response(data=ser.data, status=status.HTTP_200_OK)
|
||||
|
||||
|
||||
######################################################################
|
||||
# company/<uuid:pk>/folders
|
||||
######################################################################
|
||||
|
||||
###################################################################################
|
||||
# @api-view | GET, POST - /company/<uuid:pk>/folders
|
||||
###################################################################################
|
||||
@extend_schema(tags=["Company Folders"])
|
||||
class CompanyFolderApiView(BaseApiViewMixin, GenericAPIView): # type: ignore
|
||||
queryset = CompanyModel.objects.all()
|
||||
@@ -142,7 +143,7 @@ class CompanyFolderApiView(BaseApiViewMixin, GenericAPIView): # type: ignore
|
||||
}
|
||||
method_permission_classes = {
|
||||
"get": [IsCompanyAccount],
|
||||
"get": [IsCompanyAccount],
|
||||
"post": [IsCompanyAccount],
|
||||
}
|
||||
|
||||
@extend_schema(
|
||||
|
||||
@@ -24,9 +24,9 @@ from core.apps.companies.serializers.folders import (
|
||||
)
|
||||
|
||||
|
||||
######################################################################
|
||||
# Crud
|
||||
######################################################################
|
||||
###################################################################################
|
||||
# @view-set | ALL - /company-folders
|
||||
###################################################################################
|
||||
@extend_schema(tags=["CompanyFolder"])
|
||||
class CompanyFolderCrudViewSet(BaseViewSetMixin, ModelViewSet):
|
||||
queryset = CompanyFolderModel.objects.all()
|
||||
@@ -48,9 +48,9 @@ class CompanyFolderCrudViewSet(BaseViewSetMixin, ModelViewSet):
|
||||
}
|
||||
|
||||
|
||||
######################################################################
|
||||
# /company-folders/<uuid:pk>/contracts
|
||||
######################################################################
|
||||
###################################################################################
|
||||
# @api-view | POST - /company-folders/<uuid:pk>/contracts
|
||||
###################################################################################
|
||||
@extend_schema(tags=["CompanyFolder Contracts"])
|
||||
class ContractFolderApiView(BaseApiViewMixin, GenericAPIView): # type: ignore
|
||||
queryset = CompanyFolderModel.objects.all()
|
||||
|
||||
Reference in New Issue
Block a user