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

RAS-843 Fix breaking changes for DS 63.0.0 #874

Merged
merged 3 commits into from
Jul 28, 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
2 changes: 1 addition & 1 deletion .design-system-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
62.2.4
63.0.0
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ load-design-system-templates:
pipenv run ./scripts/load_templates.sh $(DESIGN_SYSTEM_VERSION)

lint:
pipenv check ./response_operations_ui ./tests -i 51499
pipenv check ./response_operations_ui ./tests -i 51499 -i 59062 -i 58755
pipenv run isort .
pipenv run black --line-length 120 .
pipenv run djlint .
pipenv run flake8 --exclude ./node_modules

lint-check: load-design-system-templates
pipenv check ./response_operations_ui ./tests -i 51499
pipenv check ./response_operations_ui ./tests -i 51499 -i 59062 -i 58755
pipenv run isort . --check-only
pipenv run black --line-length 120 --check .
pipenv run djlint .
Expand Down
4 changes: 2 additions & 2 deletions _infra/helm/response-operations-ui/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 3.1.27
version: 3.1.28

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 3.1.27
appVersion: 3.1.28
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

{% extends "layouts/base.html" %}
{% from "components/button/_macro.njk" import onsButton %}
{% from "components/lists/_macro.njk" import onsList %}
{% from "components/list/_macro.njk" import onsList %}
{% from "components/password/_macro.njk" import onsPassword %}
{% from "components/input/_macro.njk" import onsInput %}
{% from "components/fieldset/_macro.njk" import onsFieldset %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% from "components/metadata/_macro.njk" import onsMetadata %}
{% from "components/input/_macro.njk" import onsInput %}
{% from "components/button/_macro.njk" import onsButton %}
{% from "components/lists/_macro.njk" import onsList %}
{% from "components/list/_macro.njk" import onsList %}
{% set page_title = "Change Name" %}

{% block main %}
Expand Down
2 changes: 1 addition & 1 deletion response_operations_ui/templates/account/change-email.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% from "components/metadata/_macro.njk" import onsMetadata %}
{% from "components/input/_macro.njk" import onsInput %}
{% from "components/button/_macro.njk" import onsButton %}
{% from "components/lists/_macro.njk" import onsList %}
{% from "components/list/_macro.njk" import onsList %}
{% set page_title = "Change email address" %}

{% set ns = namespace() %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% from "components/fieldset/_macro.njk" import onsFieldset %}
{% from "components/input/_macro.njk" import onsInput %}
{% from "components/button/_macro.njk" import onsButton %}
{% from "components/lists/_macro.njk" import onsList %}
{% from "components/list/_macro.njk" import onsList %}
{% extends "layouts/base.html" %}
{% from "components/metadata/_macro.njk" import onsMetadata %}
{% from "components/password/_macro.njk" import onsPassword %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% from "components/fieldset/_macro.njk" import onsFieldset %}
{% from "components/input/_macro.njk" import onsInput %}
{% from "components/button/_macro.njk" import onsButton %}
{% from "components/lists/_macro.njk" import onsList %}
{% from "components/list/_macro.njk" import onsList %}
{% from "components/metadata/_macro.njk" import onsMetadata %}

{% set ns = namespace() %}
Expand Down
2 changes: 1 addition & 1 deletion response_operations_ui/templates/admin/banner-manage.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% from "components/button/_macro.njk" import onsButton %}
{% from "components/fieldset/_macro.njk" import onsFieldset %}
{% from "components/input/_macro.njk" import onsInput %}
{% from "components/lists/_macro.njk" import onsList %}
{% from "components/list/_macro.njk" import onsList %}
{% from "components/textarea/_macro.njk" import onsTextarea %}
{% from "components/radios/_macro.njk" import onsRadios %}
{% set page_title = 'Alert Admin' %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% from "components/button/_macro.njk" import onsButton %}
{% from "components/fieldset/_macro.njk" import onsFieldset %}
{% from "components/input/_macro.njk" import onsInput %}
{% from "components/lists/_macro.njk" import onsList %}
{% from "components/list/_macro.njk" import onsList %}
{% from "components/textarea/_macro.njk" import onsTextarea %}
{% from "components/radios/_macro.njk" import onsRadios %}
{% set page_title = 'Alert Admin' %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% from "components/button/_macro.njk" import onsButton %}
{% from "components/fieldset/_macro.njk" import onsFieldset %}
{% from "components/input/_macro.njk" import onsInput %}
{% from "components/lists/_macro.njk" import onsList %}
{% from "components/list/_macro.njk" import onsList %}
{% from "components/textarea/_macro.njk" import onsTextarea %}

{% set page_title = 'Template Create' %}
Expand Down
2 changes: 1 addition & 1 deletion response_operations_ui/templates/admin/template-edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% from "components/button/_macro.njk" import onsButton %}
{% from "components/fieldset/_macro.njk" import onsFieldset %}
{% from "components/input/_macro.njk" import onsInput %}
{% from "components/lists/_macro.njk" import onsList %}
{% from "components/list/_macro.njk" import onsList %}
{% from "components/textarea/_macro.njk" import onsTextarea %}
{% set page_title = 'Template Edit' %}
{% block main %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% from "components/button/_macro.njk" import onsButton %}
{% from "components/radios/_macro.njk" import onsRadios %}
{% from "components/fieldset/_macro.njk" import onsFieldset %}
{% from "components/lists/_macro.njk" import onsList %}
{% from "components/list/_macro.njk" import onsList %}

{% set page_title = 'Template Admin' %}
{% block main %}
Expand Down
2 changes: 1 addition & 1 deletion response_operations_ui/templates/admin/user-create.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

{% extends "layouts/base.html" %}
{% from "components/button/_macro.njk" import onsButton %}
{% from "components/lists/_macro.njk" import onsList %}
{% from "components/list/_macro.njk" import onsList %}
{% from "components/password/_macro.njk" import onsPassword %}
{% from "components/input/_macro.njk" import onsInput %}
{% from "components/fieldset/_macro.njk" import onsFieldset %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ <h2 class="ons-u-fs-r--b ons-u-pt-m">Collection exercise information</h2>
"value": label,
},
{
"value": event if event,
"name": id,
"value": event if event
},
]
%}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
},
{
"value": sample.totalSampleUnits,
"name": "total-businesses",
"numeric": "true"
}
]
Expand All @@ -55,7 +54,6 @@
},
{
"value": sample.expectedCollectionInstruments,
"name": "total-ci",
"numeric": "true"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ <h1 name="page-ce-title">Upload sample file</h1>
"value": "Total businesses"
},
{
"value": sample.totalSampleUnits,
"name": "total-businesses"
"value": sample.totalSampleUnits
}
]
},
Expand All @@ -49,8 +48,7 @@ <h1 name="page-ce-title">Upload sample file</h1>
"value": "Collection instruments"
},
{
"value": sample.expectedCollectionInstruments,
"name": "total-ci"
"value": sample.expectedCollectionInstruments
}
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% from "components/lists/_macro.njk" import onsList %}
{% from "components/list/_macro.njk" import onsList %}
{% if form.errors %}
{% set error_count = form.errors | length %}
{% set plural_suffix = 's' if error_count > 1 else '' %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
{% call onsMessage({
"type": msgType,
"id": msgId + loop.index|string,
"name": msgName,
"fromLabel": 'From',
"fromName": 'sm-from-user',
"fromId": 'sm-from-user-' + loop.index|string,
Expand All @@ -35,8 +34,7 @@
"unreadLink": unreadLink,
"unreadLinkId": unreadLinkId,
"unreadLinkText": unreadLinkText,
"messageID": 'conversation-message-body-' + loop.index|string,
"messageName": 'conversation-message-body'
"messageID": 'conversation-message-body-' + loop.index|string
}) %}
<span style="white-space:pre-line">{{ message.get('body') }}</span>
{% endcall %}
Expand Down
2 changes: 1 addition & 1 deletion response_operations_ui/templates/create-ce-event.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% from "components/metadata/_macro.njk" import onsMetadata %}
{% from "components/fieldset/_macro.njk" import onsFieldset %}
{% from "components/input/_macro.njk" import onsInput %}
{% from "components/lists/_macro.njk" import onsList %}
{% from "components/list/_macro.njk" import onsList %}

{% set page_title = 'Create event date' %}
{% block main %}
Expand Down
2 changes: 1 addition & 1 deletion response_operations_ui/templates/create-message.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% from "components/fieldset/_macro.njk" import onsFieldset %}
{% from "components/input/_macro.njk" import onsInput %}
{% from "components/textarea/_macro.njk" import onsTextarea %}
{% from "components/lists/_macro.njk" import onsList %}
{% from "components/list/_macro.njk" import onsList %}

{% set page_title = "Create Message" %}
{% block main %}
Expand Down
2 changes: 1 addition & 1 deletion response_operations_ui/templates/create-new-account.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "layouts/base.html" %}
{% from "components/button/_macro.njk" import onsButton %}
{% from "components/lists/_macro.njk" import onsList %}
{% from "components/list/_macro.njk" import onsList %}
{% from "components/password/_macro.njk" import onsPassword %}
{% from "components/input/_macro.njk" import onsInput %}
{% from "components/fieldset/_macro.njk" import onsFieldset %}
Expand Down
2 changes: 1 addition & 1 deletion response_operations_ui/templates/create-survey.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% from "components/radios/_macro.njk" import onsRadios %}
{% from "components/fieldset/_macro.njk" import onsFieldset %}
{% from "components/input/_macro.njk" import onsInput %}
{% from "components/lists/_macro.njk" import onsList %}
{% from "components/list/_macro.njk" import onsList %}

{% set page_title = 'Create survey' %}

Expand Down
2 changes: 1 addition & 1 deletion response_operations_ui/templates/home.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "layouts/base.html" %}
{% from "components/lists/_macro.njk" import onsList %}
{% from "components/list/_macro.njk" import onsList %}

{% set page_title = "Home" %}

Expand Down
8 changes: 1 addition & 7 deletions response_operations_ui/templates/messages.html
Original file line number Diff line number Diff line change
Expand Up @@ -185,36 +185,30 @@ <h1 class="ons-u-fs-l ons-u-mt-l">Oops! Something went wrong</h1>
{
"value": ruRef,
"data": "RU Ref",
"name": "tbl-messages-RU_Ref",
"id": 'ru-ref-' + loop.index|string
},
{
"value": businessName,
"data": "Business name",
"name": "tbl-messages-business",
"id": 'business-name-' + loop.index|string
},
{
"value": '<span class="ons-u-fw-b"><a href="' + url_for('messages_bp.view_conversation', thread_id=message.thread_id, page=page, conversation_tab=conversation_tab, ru_ref_filter=ru_ref_filter, business_id_filter=business_id_filter) +'#latest-message" id="message-link-' + loop.index|string + '">' + message.subject + '</a></span>' if message.unread else '<a href="' + url_for('messages_bp.view_conversation', thread_id=message.thread_id, page=page, conversation_tab=conversation_tab, ru_ref_filter=ru_ref_filter, business_id_filter=business_id_filter) +'#latest-message" id="message-link-' + loop.index|string + '">' + message.subject + '</a>',
"data": "Subject",
"name": "tbl-messages-subject"
"data": "Subject"
},
{
"value": fromValue if message.from else 'Unavailable',
"data": "From",
"name": "tbl-messages-from",
"id": 'messages-from-' + loop.index|string
},
{
"value": toValue if message.to else 'Unavailable',
"data": "To",
"name": "tbl-messages-to",
"id": 'messages-to-' + loop.index|string
},
{
"value": sentDate if message.sent_date else 'Unavailable',
"data": "Date and time",
"name": "tbl-messages-received",
"id": 'messages-time-' + loop.index|string
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ <h2 class="ons-u-fs-r--b ons-u-pt-m">Dates</h2>
},
{
"value": event,
"tdClasses": "ons-u-ta-right",
"name": name
"tdClasses": "ons-u-ta-right"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ <h2 class="ons-u-fs-r--b ons-u-pt-m">Reference information for this collection e
"value": label
},
{
"value": event if event,
"name": id
"value": event if event
}
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% from "components/lists/_macro.njk" import onsList %}
{% from "components/list/_macro.njk" import onsList %}
{% with messages = get_flashed_messages(category_filter=["error"]) %}
{% if messages %}
{% call
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% from "components/lists/_macro.njk" import onsList %}
{% from "components/list/_macro.njk" import onsList %}
{% from "components/panel/_macro.njk" import onsPanel %}
{% set ns.optionError = false %}
{% with messages = get_flashed_messages(with_categories=true) %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,15 @@ <h1 id="RU_NAME" class="ons-u-fs-xl">{{ ru.name }}</h1>
"tds": [
{
"value": res,
"data": "Respondent",
"name": "tbl-respondents-respondent"
"data": "Respondent"
},
{
"value": respondent.status,
"data": "Account status",
"name": "tbl-respondents-status"
"data": "Account status"
},
{
"value": survey_string|join(''),
"data": "Surveys",
"name": "tbl-respondents-surveys"
"data": "Surveys"
}
]
}
Expand Down
15 changes: 5 additions & 10 deletions response_operations_ui/templates/reporting-unit-survey.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,28 +79,23 @@ <h3 id="COLLECTION_EXERCISES" class="ons-u-fs-m">Collection exercises</h3>
"tds": [
{
"value": ce.exerciseRef,
"data": "Period",
"name": "tbl-collection-exercises-period"
"data": "Period"
},
{
"value": ce.companyName,
"data": "Reporting unit name",
"name": "tbl-collection-exercises-ru-name"
"data": "Reporting unit name"
},
{
"value": ce.tradingAs,
"data": "Trading as",
"name": "tbl-collection-exercises-trading-as"
"data": "Trading as"
},
{
"value": ce.companyRegion,
"data": "Region",
"name": "tbl-collection-exercises-region"
"data": "Region"
},
{
"value": '<span class="ons-status ' + status_class + '">' + ce.responseStatus + '</span>' + survey_link,
"data": "Status",
"name": "tbl-collection-exercises-status"
"data": "Status"
},
]
}
Expand Down
9 changes: 3 additions & 6 deletions response_operations_ui/templates/reporting-unit.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,15 @@ <h1 id="RU_NAME" class="ons-u-fs-xl">{{ ru.name }}</h1>
"tds": [
{
"value": '<a href="' + url_for("reporting_unit_bp.view_reporting_unit_survey", ru_ref=ru.sampleUnitRef, survey_id=survey[1].surveyId) + '" id="survey-' + survey[1].shortName + '" >' + survey[1].surveyName + '</a>',
"data": "Survey",
"name": "tbl-surveys-survey"
"data": "Survey"
},
{
"value": survey[1].period,
"data": "Current period",
"name": "tbl-surveys-period"
"data": "Current period"
},
{
"value": '<span class="ons-status ' + status_class + '">' + survey[1].caseStatus + '</span>',
"data": "Status",
"name": "tbl-surveys-status"
"data": "Status"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion response_operations_ui/templates/reset-password.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "layouts/base.html" %}
{% from "components/button/_macro.njk" import onsButton %}
{% from "components/lists/_macro.njk" import onsList %}
{% from "components/list/_macro.njk" import onsList %}
{% from "components/password/_macro.njk" import onsPassword %}
{% from "components/input/_macro.njk" import onsInput %}
{% from "components/fieldset/_macro.njk" import onsFieldset %}
Expand Down
Loading