Skip to content

Commit

Permalink
Use Vendor instead of Appicant in projects and fix formatting issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sandeepsajan0 committed Jul 11, 2023
1 parent 55e4955 commit 54aa657
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{% block salutation %}
{% if request.user != source.user %}
{% blocktrans with name=source.user.get_full_name|default:"applicant" %}Dear {{ name }},{% endblocktrans %}
{% blocktrans with name=source.user.get_full_name|default:"vendor" %}Dear {{ name }},{% endblocktrans %}
{% endif %}
{% endblock %}

Expand Down
6 changes: 3 additions & 3 deletions hypha/apply/projects/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ def can_submit_contract_documents(user, project, **kwargs):
if project.status != CONTRACTING:
return False, 'Project is not in Contracting State'
if user != project.user:
return False, 'Only Applicant can submit contracting documents'
return False, 'Only Vendor can submit contracting documents'
if not kwargs.get('contract', None):
return False, 'Can not submit without contract'
if not project.submitted_contract_documents:
return True, 'Applicant can submit contracting documents'
return True, 'Vendor can submit contracting documents'

return False, 'Forbidden Error'

Expand Down Expand Up @@ -265,7 +265,7 @@ def can_access_project(user, project):
return True, 'Staff can view project in all statuses'

if user.is_applicant and user == project.user:
return True, 'Applicant(project user) can view project in all statuses'
return True, 'Vendor(project user) can view project in all statuses'

if project.status in [DRAFT, WAITING_FOR_APPROVAL, CONTRACTING] and project.paf_approvals.exists():
paf_reviewer_roles_users_ids = []
Expand Down
4 changes: 2 additions & 2 deletions hypha/apply/projects/templatetags/project_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def user_next_step_on_project(project, user, request=None):
return "Review the contract for all relevant details and approve."
if user.is_applicant:
return f"Awaiting contract approval from {settings.ORG_SHORT_NAME}"
return f"Awaiting contract approval from Staff"
return "Awaiting contract approval from Staff"
elif project.status == IN_PROGRESS:
if user.is_applicant:
return "Add invoices"
Expand All @@ -106,7 +106,7 @@ def user_next_step_instructions(project, user):
if project.status == CONTRACTING and user == project.user and project.contracts.exists():
contract = project.contracts.order_by('-created_at').first()
if contract and not contract.signed_by_applicant:
return ['Please download the signed contract uploaded by contracting team',
return [f'Please download the signed contract uploaded by {settings.ORG_SHORT_NAME}',
'Countersign',
'Upload it back',
'Please also make sure to upload other required contracting documents']
Expand Down
2 changes: 1 addition & 1 deletion hypha/apply/projects/views/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def form_valid(self, form):
)

messages.success(self.request, _("Contractor documents have been approved."
" You can receive invoices from applicant now."),
" You can receive invoices from vendor now."),
extra_tags=PROJECT_ACTION_MESSAGE_TAG)
return response

Expand Down

0 comments on commit 54aa657

Please sign in to comment.