Skip to content

Commit

Permalink
Remove vendor feature code (#4086)
Browse files Browse the repository at this point in the history
Fixes #4074
  • Loading branch information
sandeepsajan0 authored Oct 17, 2024
1 parent 5e72bb4 commit eb17de2
Show file tree
Hide file tree
Showing 28 changed files with 142 additions and 1,200 deletions.
1 change: 0 additions & 1 deletion docs/references/wagtail-admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ The WagTail Admin is your "back office" for setting up form applications and pub

- Cookie consent settings: Cookie consent settings allow us to store your settings and preferences
- User settings: Users could add a consent checkbox on login form and include extra text on login form
- Vendor form settings
- Project settings: Creating forms in Projects
- Determination messages: Pre-populated text
- Determination settings: Creating determination forms
Expand Down
20 changes: 1 addition & 19 deletions hypha/apply/activity/adapters/emails.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ class EmailAdapter(AdapterBase):
MESSAGES.PARTNERS_UPDATED_PARTNER: "partners_updated_partner",
MESSAGES.UPLOAD_CONTRACT: "messages/email/contract_uploaded.html",
MESSAGES.SUBMIT_CONTRACT_DOCUMENTS: "messages/email/submit_contract_documents.html",
MESSAGES.CREATED_PROJECT: "handle_project_created",
MESSAGES.UPDATED_VENDOR: "handle_vendor_updated",
MESSAGES.CREATED_PROJECT: "messages/email/project_created.html",
MESSAGES.SENT_TO_COMPLIANCE: "messages/email/sent_to_compliance.html",
MESSAGES.REQUEST_PROJECT_CHANGE: "messages/email/project_request_change.html",
MESSAGES.ASSIGN_PAF_APPROVER: "messages/email/assign_paf_approvers.html",
Expand Down Expand Up @@ -208,23 +207,6 @@ def handle_invoice_updated(self, **kwargs):
**kwargs,
)

def handle_project_created(self, source, **kwargs):
from hypha.apply.projects.models import ProjectSettings

request = kwargs.get("request")
project_settings = ProjectSettings.for_request(request)
if project_settings.vendor_setup_required:
return self.render_message(
"messages/email/vendor_setup_needed.html", source=source, **kwargs
)

def handle_vendor_updated(self, source, **kwargs):
return self.render_message(
"messages/email/vendor_updated.html",
source=source,
**kwargs,
)

def handle_determination(self, determination, source, **kwargs):
submission = source
if determination.send_notice:
Expand Down
85 changes: 85 additions & 0 deletions hypha/apply/activity/migrations/0084_alter_event_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Generated by Django 4.2.11 on 2024-08-12 11:10

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("activity", "0083_alter_event_type"),
]

operations = [
migrations.AlterField(
model_name="event",
name="type",
field=models.CharField(
choices=[
("UPDATE_LEAD", "updated lead"),
("BATCH_UPDATE_LEAD", "batch updated lead"),
("EDIT_SUBMISSION", "edited submission"),
("APPLICANT_EDIT", "edited applicant"),
("NEW_SUBMISSION", "submitted new submission"),
("DRAFT_SUBMISSION", "submitted new draft submission"),
("SCREENING", "screened"),
("TRANSITION", "transitioned"),
("BATCH_TRANSITION", "batch transitioned"),
("DETERMINATION_OUTCOME", "sent determination outcome"),
("BATCH_DETERMINATION_OUTCOME", "sent batch determination outcome"),
("INVITED_TO_PROPOSAL", "invited to proposal"),
("REVIEWERS_UPDATED", "updated reviewers"),
("BATCH_REVIEWERS_UPDATED", "batch updated reviewers"),
("PARTNERS_UPDATED", "updated partners"),
("PARTNERS_UPDATED_PARTNER", "partners updated partner"),
("READY_FOR_REVIEW", "marked ready for review"),
("BATCH_READY_FOR_REVIEW", "marked batch ready for review"),
("NEW_REVIEW", "added new review"),
("COMMENT", "added comment"),
("PROPOSAL_SUBMITTED", "submitted proposal"),
("OPENED_SEALED", "opened sealed submission"),
("REVIEW_OPINION", "reviewed opinion"),
("DELETE_SUBMISSION", "deleted submission"),
("DELETE_REVIEW", "deleted review"),
("DELETE_REVIEW_OPINION", "deleted review opinion"),
("CREATED_PROJECT", "created project"),
("UPDATE_PROJECT_LEAD", "updated project lead"),
("UPDATE_PROJECT_TITLE", "updated project title"),
("EDIT_REVIEW", "edited review"),
("SEND_FOR_APPROVAL", "sent for approval"),
("APPROVE_PROJECT", "approved project"),
("ASSIGN_PAF_APPROVER", "assign paf approver"),
("APPROVE_PAF", "approved paf"),
("PROJECT_TRANSITION", "transitioned project"),
("REQUEST_PROJECT_CHANGE", "requested project change"),
("SUBMIT_CONTRACT_DOCUMENTS", "submitted contract documents"),
("UPLOAD_DOCUMENT", "uploaded document to project"),
("REMOVE_DOCUMENT", "removed document from project"),
("UPLOAD_CONTRACT", "uploaded contract to project"),
("APPROVE_CONTRACT", "approved contract"),
("CREATE_INVOICE", "created invoice for project"),
("UPDATE_INVOICE_STATUS", "updated invoice status"),
("APPROVE_INVOICE", "approve invoice"),
("DELETE_INVOICE", "deleted invoice"),
("SENT_TO_COMPLIANCE", "sent project to compliance"),
("UPDATE_INVOICE", "updated invoice"),
("SUBMIT_REPORT", "submitted report"),
("SKIPPED_REPORT", "skipped report"),
("REPORT_FREQUENCY_CHANGED", "changed report frequency"),
("DISABLED_REPORTING", "disabled reporting"),
("REPORT_NOTIFY", "notified report"),
("CREATE_REMINDER", "created reminder"),
("DELETE_REMINDER", "deleted reminder"),
("REVIEW_REMINDER", "reminder to review"),
("BATCH_DELETE_SUBMISSION", "batch deleted submissions"),
("BATCH_ARCHIVE_SUBMISSION", "batch archive submissions"),
("BATCH_INVOICE_STATUS_UPDATE", "batch update invoice status"),
("STAFF_ACCOUNT_CREATED", "created new account"),
("STAFF_ACCOUNT_EDITED", "edited account"),
("ARCHIVE_SUBMISSION", "archived submission"),
("UNARCHIVE_SUBMISSION", "unarchived submission"),
("REMOVE_TASK", "remove task"),
],
max_length=50,
verbose_name="verb",
),
),
]
1 change: 0 additions & 1 deletion hypha/apply/activity/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class MESSAGES(TextChoices):
DELETE_REVIEW = "DELETE_REVIEW", _("deleted review")
DELETE_REVIEW_OPINION = "DELETE_REVIEW_OPINION", _("deleted review opinion")
CREATED_PROJECT = "CREATED_PROJECT", _("created project")
UPDATED_VENDOR = "UPDATED_VENDOR", _("updated contracting information")
UPDATE_PROJECT_LEAD = "UPDATE_PROJECT_LEAD", _("updated project lead")
UPDATE_PROJECT_TITLE = "UPDATE_PROJECT_TITLE", _("updated project title")
EDIT_REVIEW = "EDIT_REVIEW", _("edited review")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% block content %}{# fmt:off #}
{% blocktrans %}A Project has been created for your submission on {{ ORG_SHORT_NAME }}.{% endblocktrans %}

{% trans "Next step is to complete Contracting Information by visiting project detail page." %}
{% trans "No action needed for now, wait until contract is ready for you to sign." %}

{% trans "Project" %}: {{ source.title }}
{% trans "Link" %}: {{ request.scheme }}://{{ request.get_host }}{{ source.get_absolute_url }}
Expand Down
10 changes: 0 additions & 10 deletions hypha/apply/activity/templates/messages/email/vendor_updated.html

This file was deleted.

6 changes: 0 additions & 6 deletions hypha/apply/projects/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
ProjectReportForm,
ProjectSettings,
ProjectSOWForm,
VendorFormSettings,
)


Expand Down Expand Up @@ -95,10 +94,6 @@ class ProjectSettingsAdmin(SettingModelAdmin):
model = ProjectSettings


class VendorFormSettingsAdmin(SettingModelAdmin):
model = VendorFormSettings


class ProjectAdminGroup(ModelAdminGroup):
menu_label = "Projects"
menu_icon = str(AdminIcon.PROJECT)
Expand All @@ -108,6 +103,5 @@ class ProjectAdminGroup(ModelAdminGroup):
ProjectFormAdmin,
ProjectReportFormAdmin,
ProjectSOWFormAdmin,
VendorFormSettingsAdmin,
ProjectSettingsAdmin,
)
14 changes: 0 additions & 14 deletions hypha/apply/projects/forms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@
UploadDocumentForm,
)
from .report import ReportEditForm, ReportFrequencyForm
from .vendor import (
CreateVendorFormStep1,
CreateVendorFormStep2,
CreateVendorFormStep3,
CreateVendorFormStep4,
CreateVendorFormStep5,
CreateVendorFormStep6,
)

__all__ = [
"UpdateProjectTitleForm",
Expand All @@ -60,12 +52,6 @@
"UpdateProjectLeadForm",
"ReportEditForm",
"ReportFrequencyForm",
"CreateVendorFormStep1",
"CreateVendorFormStep2",
"CreateVendorFormStep3",
"CreateVendorFormStep4",
"CreateVendorFormStep5",
"CreateVendorFormStep6",
"CreateInvoiceForm",
"ChangeInvoiceStatusForm",
"EditInvoiceForm",
Expand Down
147 changes: 0 additions & 147 deletions hypha/apply/projects/forms/vendor.py

This file was deleted.

Loading

0 comments on commit eb17de2

Please sign in to comment.