Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update preferences link in emails to point to the new profile page #2388

Merged
merged 2 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/server/src/lib/email.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ async function sendGrantAssignedNotficationForAgency(assignee_agency, grantDetai
const emailHTML = module.exports.addBaseBranding(grantAssignedBody, {
tool_name: 'Grants Identification Tool',
title: 'Grants Assigned Notification',
notifications_url: `${process.env.WEBSITE_DOMAIN}/grants?manageSettings=true`,
notifications_url: (process.env.ENABLE_MY_PROFILE === 'true') ? `${process.env.WEBSITE_DOMAIN}/my-profile` : `${process.env.WEBSITE_DOMAIN}/grants?manageSettings=true`,
});

// TODO: add plain text version of the email
Expand Down Expand Up @@ -238,7 +238,7 @@ async function sendGrantDigest({
const emailHTML = module.exports.addBaseBranding(formattedBody, {
tool_name: 'Federal Grant Finder',
title: 'New Grants Digest',
notifications_url: `${process.env.WEBSITE_DOMAIN}/grants?manageSettings=true`,
notifications_url: (process.env.ENABLE_MY_PROFILE === 'true') ? `${process.env.WEBSITE_DOMAIN}/my-profile` : `${process.env.WEBSITE_DOMAIN}/grants?manageSettings=true`,
});

// TODO: add plain text version of the email
Expand Down Expand Up @@ -304,7 +304,7 @@ async function buildAndSendUserSavedSearchGrantDigest(userId, openDate) {

await asyncBatch(inputs, getAndSendGrantForSavedSearch, 2);

console.log(`Successfully built and sent grants digest emails for ${openDate}`);
console.log(`Successfully built and sent grants digest emails for ${inputs.length} saved searches on ${openDate}`);
}

async function buildAndSendGrantDigest() {
Expand Down
1 change: 1 addition & 0 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
}

resource "aws_ecs_cluster_capacity_providers" "default" {
count = length(aws_ecs_cluster.default.*)

Check warning on line 145 in terraform/main.tf

View workflow job for this annotation

GitHub Actions / qa / Lint terraform

List items should be accessed using square brackets

cluster_name = aws_ecs_cluster.default[count.index].name
capacity_providers = ["FARGATE"]
Expand All @@ -165,8 +165,8 @@
]

# Cluster
ecs_cluster_id = join("", aws_ecs_cluster.default.*.id)

Check warning on line 168 in terraform/main.tf

View workflow job for this annotation

GitHub Actions / qa / Lint terraform

List items should be accessed using square brackets
ecs_cluster_name = join("", aws_ecs_cluster.default.*.name)

Check warning on line 169 in terraform/main.tf

View workflow job for this annotation

GitHub Actions / qa / Lint terraform

List items should be accessed using square brackets

# Task configuration
docker_tag = var.api_container_image_tag
Expand All @@ -176,6 +176,7 @@
enable_grants_scraper = var.api_enable_grants_scraper
enable_grants_digest = var.api_enable_grants_digest
enable_new_team_terminology = var.api_enable_new_team_terminology
enable_my_profile = var.api_enable_my_profile
enable_saved_search_grants_digest = var.api_enable_saved_search_grants_digest
unified_service_tags = local.unified_service_tags
datadog_environment_variables = var.api_datadog_environment_variables
Expand Down Expand Up @@ -217,7 +218,7 @@
security_group_ids = [module.api_to_postgres_security_group.id]

# Task configuration
ecs_cluster_name = join("", aws_ecs_cluster.default.*.name)

Check warning on line 221 in terraform/main.tf

View workflow job for this annotation

GitHub Actions / qa / Lint terraform

List items should be accessed using square brackets
docker_tag = var.api_container_image_tag
unified_service_tags = local.unified_service_tags
datadog_environment_variables = var.consume_grants_datadog_environment_variables
Expand Down Expand Up @@ -258,7 +259,7 @@
security_group_ids = [module.arpa_audit_report_security_group.id]

# Task configuration
ecs_cluster_name = join("", aws_ecs_cluster.default.*.name)

Check warning on line 262 in terraform/main.tf

View workflow job for this annotation

GitHub Actions / qa / Lint terraform

List items should be accessed using square brackets
docker_tag = var.api_container_image_tag
unified_service_tags = local.unified_service_tags
stop_timeout_seconds = 120
Expand Down Expand Up @@ -346,7 +347,7 @@
security_group_ids = [module.arpa_treasury_report_security_group.id]

# Task configuration
ecs_cluster_name = join("", aws_ecs_cluster.default.*.name)

Check warning on line 350 in terraform/main.tf

View workflow job for this annotation

GitHub Actions / qa / Lint terraform

List items should be accessed using square brackets
docker_tag = var.api_container_image_tag
unified_service_tags = local.unified_service_tags
stop_timeout_seconds = 120
Expand Down
1 change: 1 addition & 0 deletions terraform/modules/gost_api/task.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ module "api_container_definition" {
ENABLE_SAVED_SEARCH_GRANTS_DIGEST = var.enable_saved_search_grants_digest ? "true" : "false"
ENABLE_GRANTS_SCRAPER = "false"
ENABLE_NEW_TEAM_TERMINOLOGY = var.enable_new_team_terminology ? "true" : "false"
ENABLE_MY_PROFILE = var.enable_my_profile ? "true" : "false"
GRANTS_SCRAPER_DATE_RANGE = 7
GRANTS_SCRAPER_DELAY = 1000
NODE_OPTIONS = "--max_old_space_size=1024"
Expand Down
6 changes: 6 additions & 0 deletions terraform/modules/gost_api/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ variable "enable_new_team_terminology" {
default = false
}

variable "enable_my_profile" {
description = "When true, sets the ENABLE_MY_PROFILE environment variable to true in the API container."
type = bool
default = false
}

variable "enable_saved_search_grants_digest" {
description = "When true, sets the ENABLE_SAVED_SEARCH_GRANTS_DIGEST environment variable to true in the API container."
type = bool
Expand Down
1 change: 1 addition & 0 deletions terraform/prod.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ api_maximum_task_count = 5
api_enable_grants_scraper = false
api_enable_grants_digest = false
api_enable_new_team_terminology = false
api_enable_my_profile = false
api_enable_saved_search_grants_digest = true
api_log_retention_in_days = 30
api_datadog_environment_variables = {
Expand Down
1 change: 1 addition & 0 deletions terraform/sandbox.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ api_maximum_task_count = 5
api_enable_grants_scraper = false
api_enable_grants_digest = false
api_enable_new_team_terminology = false
api_enable_my_profile = true
api_enable_saved_search_grants_digest = false
api_log_retention_in_days = 7

Expand Down
1 change: 1 addition & 0 deletions terraform/staging.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ api_maximum_task_count = 5
api_enable_grants_scraper = false
api_enable_grants_digest = false
api_enable_new_team_terminology = true
api_enable_my_profile = true
api_enable_saved_search_grants_digest = true
api_log_retention_in_days = 14
api_datadog_environment_variables = {
Expand Down
4 changes: 4 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@
type = bool
}

variable "api_enable_my_profile" {
type = bool
}

variable "api_enable_saved_search_grants_digest" {
type = bool
}
Expand All @@ -216,16 +220,16 @@
}

// Postgres
variable "postgres_enabled" {

Check warning on line 223 in terraform/variables.tf

View workflow job for this annotation

GitHub Actions / qa / Lint terraform

`postgres_enabled` variable has no type
default = true
}
variable "postgres_prevent_destroy" {

Check warning on line 226 in terraform/variables.tf

View workflow job for this annotation

GitHub Actions / qa / Lint terraform

`postgres_prevent_destroy` variable has no type
default = true
}
variable "postgres_snapshot_before_destroy" {

Check warning on line 229 in terraform/variables.tf

View workflow job for this annotation

GitHub Actions / qa / Lint terraform

`postgres_snapshot_before_destroy` variable has no type
default = true
}
variable "postgres_apply_changes_immediately" {

Check warning on line 232 in terraform/variables.tf

View workflow job for this annotation

GitHub Actions / qa / Lint terraform

`postgres_apply_changes_immediately` variable has no type
default = false
}
variable "postgres_query_logging_enabled" {
Expand Down
Loading