Skip to content

Commit 79e3634

Browse files
committed
project_alias is part of product_ui
1 parent 05b483f commit 79e3634

File tree

9 files changed

+11
-5
lines changed

9 files changed

+11
-5
lines changed

packages/notifications-library/src/notifications_library/_models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class UserData:
2525
class ProductUIData:
2626
logo_url: str
2727
strong_color: str
28+
project_alias: str
2829

2930

3031
@dataclass(frozen=True)

packages/notifications-library/src/notifications_library/templates/on_share_project.email.content.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
{% block content %}
44
<p>Dear {{ user.first_name }},</p>
55

6-
<p>Great news! {{ sharer_username }} has shared a {{ resource_alias }} with you on {{ product.display_name }}.</p>
6+
<p>Great news! {{ sharer_username }} has shared a {{ product.ui.project_alias }} with you on {{ product.display_name }}.</p>
77

8-
<p>To view the {{ resource_alias }} and accept the sharing, follow below:</p>
8+
<p>To view the {{ product.ui.project_alias }} and accept the sharing, follow below:</p>
99

1010
<p>
1111
{% if sharer_message %}

packages/notifications-library/src/notifications_library/templates/on_share_project.email.content.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Dear {{ user.first_name }},
22

3-
Great news! {{ sharer_username }} has shared a {{ resource_alias }} with you on {{ product.display_name }}.
3+
Great news! {{ sharer_username }} has shared a {{ product.ui.project_alias }} with you on {{ product.display_name }}.
44

5-
To view the {{ resource_alias }} and accept the sharing, follow below:
5+
To view the {{ product.ui.project_alias }} and accept the sharing, follow below:
66

77
{{ sharer_message }}
88
{{ accept_link }}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
A {{ resource_alias }} was shared with you on {{ host }}
1+
A {{ product.ui.project_alias }} was shared with you on {{ host }}

packages/notifications-library/tests/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def product_data(
6161
"https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/static-webserver/client/source/resource/osparc/osparc-white.svg",
6262
),
6363
strong_color=vendor.get("ui", {}).get("strong_color", "rgb(131, 0, 191)"),
64+
project_alias="project",
6465
)
6566

6667
return ProductData( # type: ignore

packages/postgres-database/src/simcore_postgres_database/models/products.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
class VendorUI(TypedDict, total=True):
3333
logo_url: str # vendor logo url
3434
strong_color: str # vendor main color
35+
project_alias: str # project alias for the product (e.g. "project" or "study")
3536

3637

3738
class Vendor(TypedDict, total=False):

packages/pytest-simcore/src/pytest_simcore/helpers/faker_factories.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ def random_product(
260260
ui=VendorUI(
261261
logo_url=fake.url(),
262262
strong_color=fake.color(),
263+
project_alias="project",
263264
),
264265
),
265266
"registration_email_template": registration_email_template,

services/web/server/src/simcore_service_webserver/products/_models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ def _update_json_schema_extra(schema: JsonDict) -> None:
245245
"ui": {
246246
"logo_url": "https://acme.com/logo",
247247
"strong_color": "#123456",
248+
"project_alias": "study",
248249
},
249250
},
250251
"issues": [

services/web/server/tests/unit/isolated/products/test_products_model.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def test_product_to_static():
6363
"ui": {
6464
"logo_url": "https://acme.com/logo",
6565
"strong_color": "#123456",
66+
"project_alias": "study",
6667
},
6768
},
6869
"issues": [

0 commit comments

Comments
 (0)