-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from gorserg/add_bid_views
add bid views, add validation for new bid add views for EU FinancialDocument, EligibilityDocument, QualificationDocument now functions prepare_shortlistedFirms and prepare_bid_identifier return set If set with bid exist in set with firms then broker can create bid
- Loading branch information
Showing
3 changed files
with
181 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
openprocurement/tender/competitivedialogue/views/stage2/bid.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# -*- coding: utf-8 -*- | ||
from openprocurement.tender.openeu.views.bid import TenderBidResource as BaseResourceEU | ||
from openprocurement.tender.openua.views.bid import TenderBidResource as BaseResourceUA | ||
from openprocurement.tender.competitivedialogue.models import STAGE_2_UA_TYPE, STAGE_2_EU_TYPE | ||
from openprocurement.tender.competitivedialogue.utils import stage2_bid_post | ||
from openprocurement.api.utils import ( | ||
opresource, | ||
json_view, | ||
) | ||
from openprocurement.api.validation import ( | ||
validate_bid_data | ||
) | ||
|
||
|
||
@opresource(name='Competitive Dialogue Stage2 EU Bids', | ||
collection_path='/tenders/{tender_id}/bids', | ||
path='/tenders/{tender_id}/bids/{bid_id}', | ||
procurementMethodType=STAGE_2_EU_TYPE, | ||
description="Competitive Dialogue Stage2EU bids") | ||
class CompetitiveDialogueStage2EUBidResource(BaseResourceEU): | ||
""" Tender Stage2 EU bids """ | ||
|
||
@json_view(content_type="application/json", permission='create_bid', validators=(validate_bid_data,)) | ||
def collection_post(self): | ||
return stage2_bid_post(self) | ||
|
||
|
||
@opresource(name='Competitive Dialogue Stage2 UA Bids', | ||
collection_path='/tenders/{tender_id}/bids', | ||
path='/tenders/{tender_id}/bids/{bid_id}', | ||
procurementMethodType=STAGE_2_UA_TYPE, | ||
description="Competitive Dialogue Stage2 UA bids") | ||
class CompetitiveDialogueStage2UABidResource(BaseResourceUA): | ||
""" Tender Stage2 UA Stage2 bids """ | ||
|
||
@json_view(content_type="application/json", permission='create_bid', validators=(validate_bid_data,)) | ||
def collection_post(self): | ||
return stage2_bid_post(self) |
63 changes: 63 additions & 0 deletions
63
openprocurement/tender/competitivedialogue/views/stage2/bid_document.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# -*- coding: utf-8 -*- | ||
from openprocurement.api.utils import opresource | ||
from openprocurement.tender.openeu.views.bid_document import ( | ||
bid_financial_documents_resource, | ||
bid_eligibility_documents_resource, | ||
bid_qualification_documents_resource, | ||
TenderEUBidDocumentResource, | ||
TenderEUBidFinancialDocumentResource, | ||
TenderEUBidEligibilityDocumentResource, | ||
TenderEUBidQualificationDocumentResource | ||
) | ||
from openprocurement.tender.openua.views.bid_document import TenderUaBidDocumentResource | ||
from openprocurement.tender.competitivedialogue.models import STAGE_2_UA_TYPE, STAGE_2_EU_TYPE | ||
|
||
|
||
@opresource( | ||
name='Competitive Dialogue Stage2 EU Bid Documents', | ||
collection_path='/tenders/{tender_id}/bids/{bid_id}/documents', | ||
path='/tenders/{tender_id}/bids/{bid_id}/documents/{document_id}', | ||
procurementMethodType=STAGE_2_EU_TYPE, | ||
description="Competitive Dialogue Stage2 EU bidder documents") | ||
class CompetitiveDialogueStage2EUBidDocumentResource(TenderEUBidDocumentResource): | ||
pass | ||
|
||
|
||
@opresource( | ||
name='Competitive Dialogue Stage2 UA Bid Documents', | ||
collection_path='/tenders/{tender_id}/bids/{bid_id}/documents', | ||
path='/tenders/{tender_id}/bids/{bid_id}/documents/{document_id}', | ||
procurementMethodType=STAGE_2_UA_TYPE, | ||
description="Competitive Dialogue Stage2 UA bidder documents") | ||
class CompetitiveDialogueStage2UaBidDocumentResource(TenderUaBidDocumentResource): | ||
pass | ||
|
||
|
||
@bid_financial_documents_resource( | ||
name='Competitive Dialogue Stage2 EU Bid Financial Documents', | ||
collection_path='/tenders/{tender_id}/bids/{bid_id}/financial_documents', | ||
path='/tenders/{tender_id}/bids/{bid_id}/financial_documents/{document_id}', | ||
procurementMethodType=STAGE_2_EU_TYPE, | ||
description="Competitive Dialogue Stage2 EU bidder financial documents") | ||
class CompetitiveDialogueStage2EUBidFinancialDocumentResource(TenderEUBidFinancialDocumentResource): | ||
pass | ||
|
||
|
||
@bid_eligibility_documents_resource( | ||
name='Competitive Dialogue Stage2 EU Bid Eligibility Documents', | ||
collection_path='/tenders/{tender_id}/bids/{bid_id}/eligibility_documents', | ||
path='/tenders/{tender_id}/bids/{bid_id}/eligibility_documents/{document_id}', | ||
procurementMethodType=STAGE_2_EU_TYPE, | ||
description="Competitive Dialogue Stage2 EU bidder eligibility documents") | ||
class CompetitiveDialogueStage2EUBidEligibilityDocumentResource(TenderEUBidEligibilityDocumentResource): | ||
pass | ||
|
||
|
||
@bid_qualification_documents_resource( | ||
name='Competitive Dialogue Stage2 EU Bid Qualification Documents', | ||
collection_path='/tenders/{tender_id}/bids/{bid_id}/qualification_documents', | ||
path='/tenders/{tender_id}/bids/{bid_id}/qualification_documents/{document_id}', | ||
procurementMethodType=STAGE_2_EU_TYPE, | ||
description="Competitive Dialogue Stage2 EU bidder qualification documents") | ||
class CompetitiveDialogueStage2EUBidQualificationDocumentResource(TenderEUBidQualificationDocumentResource): | ||
pass |