From 6a3123570ac2de892584419062017b05be68c97f Mon Sep 17 00:00:00 2001 From: Tero Elonen Date: Thu, 3 Oct 2024 12:19:53 +0300 Subject: [PATCH 1/2] UHF-10588: Enable calculator feature on ELO --- conf/cmi/config_ignore.settings.yml | 2 ++ ...m_display.paragraph.calculator.default.yml | 32 +++++++++++++++++ ...w_display.paragraph.calculator.default.yml | 34 +++++++++++++++++++ conf/cmi/core.extension.yml | 1 + .../field.field.node.page.field_content.yml | 5 +++ ...ld.field.node.page.field_lower_content.yml | 5 +++ ....paragraph.calculator.field_calculator.yml | 25 ++++++++++++++ ...raph.calculator.field_calculator_title.yml | 21 ++++++++++++ ...eld.storage.paragraph.field_calculator.yml | 22 ++++++++++++ ...orage.paragraph.field_calculator_title.yml | 23 +++++++++++++ ....paragraph.calculator.field_calculator.yml | 1 + ...raph.calculator.field_calculator_title.yml | 1 + .../paragraphs.paragraphs_type.calculator.yml | 2 ++ ....paragraph.calculator.field_calculator.yml | 1 + ...raph.calculator.field_calculator_title.yml | 1 + .../paragraphs.paragraphs_type.calculator.yml | 2 ++ .../paragraphs.paragraphs_type.calculator.yml | 17 ++++++++++ 17 files changed, 195 insertions(+) create mode 100644 conf/cmi/core.entity_form_display.paragraph.calculator.default.yml create mode 100644 conf/cmi/core.entity_view_display.paragraph.calculator.default.yml create mode 100644 conf/cmi/field.field.paragraph.calculator.field_calculator.yml create mode 100644 conf/cmi/field.field.paragraph.calculator.field_calculator_title.yml create mode 100644 conf/cmi/field.storage.paragraph.field_calculator.yml create mode 100644 conf/cmi/field.storage.paragraph.field_calculator_title.yml create mode 100644 conf/cmi/language/fi/field.field.paragraph.calculator.field_calculator.yml create mode 100644 conf/cmi/language/fi/field.field.paragraph.calculator.field_calculator_title.yml create mode 100644 conf/cmi/language/fi/paragraphs.paragraphs_type.calculator.yml create mode 100644 conf/cmi/language/sv/field.field.paragraph.calculator.field_calculator.yml create mode 100644 conf/cmi/language/sv/field.field.paragraph.calculator.field_calculator_title.yml create mode 100644 conf/cmi/language/sv/paragraphs.paragraphs_type.calculator.yml create mode 100644 conf/cmi/paragraphs.paragraphs_type.calculator.yml diff --git a/conf/cmi/config_ignore.settings.yml b/conf/cmi/config_ignore.settings.yml index 0773d70d..0d2b9a92 100644 --- a/conf/cmi/config_ignore.settings.yml +++ b/conf/cmi/config_ignore.settings.yml @@ -3,5 +3,7 @@ _core: mode: simple ignored_config_entities: - 'easy_breadcrumb.settings:home_segment_title' + - 'field.storage.paragraph.field_calculator:settings.allowed_values' - 'hdbt_admin_tools.site_settings:site_settings' + - helfi_calculator.calculator_settings - 'system.site:page.front' diff --git a/conf/cmi/core.entity_form_display.paragraph.calculator.default.yml b/conf/cmi/core.entity_form_display.paragraph.calculator.default.yml new file mode 100644 index 00000000..63a16e39 --- /dev/null +++ b/conf/cmi/core.entity_form_display.paragraph.calculator.default.yml @@ -0,0 +1,32 @@ +uuid: 415efa63-8fdb-4c9b-ad08-484fcf3c9ac4 +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.calculator.field_calculator + - field.field.paragraph.calculator.field_calculator_title + - paragraphs.paragraphs_type.calculator +_core: + default_config_hash: oidsK5Gbjpqc50yrLakSNTleVrr8jtrpQJfktf_R2rs +id: paragraph.calculator.default +targetEntityType: paragraph +bundle: calculator +mode: default +content: + field_calculator: + type: options_select + weight: 2 + region: content + settings: { } + third_party_settings: { } + field_calculator_title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } +hidden: + created: true + status: true diff --git a/conf/cmi/core.entity_view_display.paragraph.calculator.default.yml b/conf/cmi/core.entity_view_display.paragraph.calculator.default.yml new file mode 100644 index 00000000..729d50a1 --- /dev/null +++ b/conf/cmi/core.entity_view_display.paragraph.calculator.default.yml @@ -0,0 +1,34 @@ +uuid: 88f36111-2d96-4d0d-812d-af3c88a2ef9c +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.calculator.field_calculator + - field.field.paragraph.calculator.field_calculator_title + - paragraphs.paragraphs_type.calculator + module: + - options +_core: + default_config_hash: lstlYqyDuxffhG6_KlqYEX65K6EDoV9jzNiYAuswSu4 +id: paragraph.calculator.default +targetEntityType: paragraph +bundle: calculator +mode: default +content: + field_calculator: + type: list_key + label: hidden + settings: { } + third_party_settings: { } + weight: 2 + region: content + field_calculator_title: + type: string + label: hidden + settings: + link_to_entity: false + third_party_settings: { } + weight: 0 + region: content +hidden: + search_api_excerpt: true diff --git a/conf/cmi/core.extension.yml b/conf/cmi/core.extension.yml index 11b7bd8a..c59c464a 100644 --- a/conf/cmi/core.extension.yml +++ b/conf/cmi/core.extension.yml @@ -42,6 +42,7 @@ module: helfi_api_base: 0 helfi_azure_fs: 0 helfi_base_content: 0 + helfi_calculator: 0 helfi_ckeditor: 0 helfi_etusivu_entities: 0 helfi_eu_cookie_compliance: 0 diff --git a/conf/cmi/field.field.node.page.field_content.yml b/conf/cmi/field.field.node.page.field_content.yml index 40ec4eba..f9b4651e 100644 --- a/conf/cmi/field.field.node.page.field_content.yml +++ b/conf/cmi/field.field.node.page.field_content.yml @@ -7,6 +7,7 @@ dependencies: - node.type.page - paragraphs.paragraphs_type.accordion - paragraphs.paragraphs_type.banner + - paragraphs.paragraphs_type.calculator - paragraphs.paragraphs_type.chart - paragraphs.paragraphs_type.columns - paragraphs.paragraphs_type.contact_card_listing @@ -61,6 +62,7 @@ settings: service_list_search: service_list_search unit_search: unit_search unit_contact_card: unit_contact_card + calculator: calculator negate: 0 target_bundles_drag_drop: accordion: @@ -69,6 +71,9 @@ settings: banner: weight: 2 enabled: true + calculator: + weight: 19 + enabled: true chart: weight: 11 enabled: true diff --git a/conf/cmi/field.field.node.page.field_lower_content.yml b/conf/cmi/field.field.node.page.field_lower_content.yml index 946e3d93..8463943d 100644 --- a/conf/cmi/field.field.node.page.field_lower_content.yml +++ b/conf/cmi/field.field.node.page.field_lower_content.yml @@ -7,6 +7,7 @@ dependencies: - node.type.page - paragraphs.paragraphs_type.accordion - paragraphs.paragraphs_type.banner + - paragraphs.paragraphs_type.calculator - paragraphs.paragraphs_type.chart - paragraphs.paragraphs_type.columns - paragraphs.paragraphs_type.contact_card_listing @@ -61,6 +62,7 @@ settings: service_list_search: service_list_search unit_search: unit_search unit_contact_card: unit_contact_card + calculator: calculator negate: 0 target_bundles_drag_drop: accordion: @@ -69,6 +71,9 @@ settings: banner: weight: 4 enabled: true + calculator: + weight: 20 + enabled: true chart: weight: 11 enabled: true diff --git a/conf/cmi/field.field.paragraph.calculator.field_calculator.yml b/conf/cmi/field.field.paragraph.calculator.field_calculator.yml new file mode 100644 index 00000000..6a8385ec --- /dev/null +++ b/conf/cmi/field.field.paragraph.calculator.field_calculator.yml @@ -0,0 +1,25 @@ +uuid: f97ffdb6-9779-4a4d-9cf2-8ed9401ab9ab +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_calculator + - paragraphs.paragraphs_type.calculator + module: + - options +_core: + default_config_hash: cjDkOC6b6J_rVgoqX4O2jaE-C7nObpMRwc8TYfzlC8M +id: paragraph.calculator.field_calculator +field_name: field_calculator +entity_type: paragraph +bundle: calculator +label: Calculator +description: '' +required: true +translatable: false +default_value: + - + value: disabled +default_value_callback: '' +settings: { } +field_type: list_string diff --git a/conf/cmi/field.field.paragraph.calculator.field_calculator_title.yml b/conf/cmi/field.field.paragraph.calculator.field_calculator_title.yml new file mode 100644 index 00000000..2822a58b --- /dev/null +++ b/conf/cmi/field.field.paragraph.calculator.field_calculator_title.yml @@ -0,0 +1,21 @@ +uuid: 42151b6f-f57a-450f-93de-aba536ac377a +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_calculator_title + - paragraphs.paragraphs_type.calculator +_core: + default_config_hash: hssV1dRPZ995nBWME2MzKlJK4yWkRhyO-mN3vVDvRw0 +id: paragraph.calculator.field_calculator_title +field_name: field_calculator_title +entity_type: paragraph +bundle: calculator +label: Title +description: '' +required: true +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/conf/cmi/field.storage.paragraph.field_calculator.yml b/conf/cmi/field.storage.paragraph.field_calculator.yml new file mode 100644 index 00000000..65e2b645 --- /dev/null +++ b/conf/cmi/field.storage.paragraph.field_calculator.yml @@ -0,0 +1,22 @@ +uuid: 1ae46ae8-8fc7-49fc-b182-230d527aa803 +langcode: en +status: true +dependencies: + module: + - options + - paragraphs +_core: + default_config_hash: 4CPKApPiqbFT1VUtHFecJAe176DnMFwbIlEZbRFFGoE +id: paragraph.field_calculator +field_name: field_calculator +entity_type: paragraph +type: list_string +settings: + allowed_values_function: 'Drupal\helfi_calculator\Form\CalculatorSettings::getActiveCalculators' +module: options +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/conf/cmi/field.storage.paragraph.field_calculator_title.yml b/conf/cmi/field.storage.paragraph.field_calculator_title.yml new file mode 100644 index 00000000..b0298a5b --- /dev/null +++ b/conf/cmi/field.storage.paragraph.field_calculator_title.yml @@ -0,0 +1,23 @@ +uuid: 4ba1bc49-ed21-4cd7-9d4d-8a7a47e62294 +langcode: en +status: true +dependencies: + module: + - paragraphs +_core: + default_config_hash: XoFaMysHdv1VV8liUZt09qTEQSPhAOridCypc_7yd8w +id: paragraph.field_calculator_title +field_name: field_calculator_title +entity_type: paragraph +type: string +settings: + max_length: 255 + case_sensitive: false + is_ascii: false +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/conf/cmi/language/fi/field.field.paragraph.calculator.field_calculator.yml b/conf/cmi/language/fi/field.field.paragraph.calculator.field_calculator.yml new file mode 100644 index 00000000..466557ff --- /dev/null +++ b/conf/cmi/language/fi/field.field.paragraph.calculator.field_calculator.yml @@ -0,0 +1 @@ +label: Laskuri diff --git a/conf/cmi/language/fi/field.field.paragraph.calculator.field_calculator_title.yml b/conf/cmi/language/fi/field.field.paragraph.calculator.field_calculator_title.yml new file mode 100644 index 00000000..f02d7516 --- /dev/null +++ b/conf/cmi/language/fi/field.field.paragraph.calculator.field_calculator_title.yml @@ -0,0 +1 @@ +label: Otsikko diff --git a/conf/cmi/language/fi/paragraphs.paragraphs_type.calculator.yml b/conf/cmi/language/fi/paragraphs.paragraphs_type.calculator.yml new file mode 100644 index 00000000..e1d0281a --- /dev/null +++ b/conf/cmi/language/fi/paragraphs.paragraphs_type.calculator.yml @@ -0,0 +1,2 @@ +label: Laskuri +description: '' diff --git a/conf/cmi/language/sv/field.field.paragraph.calculator.field_calculator.yml b/conf/cmi/language/sv/field.field.paragraph.calculator.field_calculator.yml new file mode 100644 index 00000000..02f0633e --- /dev/null +++ b/conf/cmi/language/sv/field.field.paragraph.calculator.field_calculator.yml @@ -0,0 +1 @@ +label: Räknare diff --git a/conf/cmi/language/sv/field.field.paragraph.calculator.field_calculator_title.yml b/conf/cmi/language/sv/field.field.paragraph.calculator.field_calculator_title.yml new file mode 100644 index 00000000..2711e04d --- /dev/null +++ b/conf/cmi/language/sv/field.field.paragraph.calculator.field_calculator_title.yml @@ -0,0 +1 @@ +label: Titel diff --git a/conf/cmi/language/sv/paragraphs.paragraphs_type.calculator.yml b/conf/cmi/language/sv/paragraphs.paragraphs_type.calculator.yml new file mode 100644 index 00000000..b5c10ad2 --- /dev/null +++ b/conf/cmi/language/sv/paragraphs.paragraphs_type.calculator.yml @@ -0,0 +1,2 @@ +label: Räknare +description: '' diff --git a/conf/cmi/paragraphs.paragraphs_type.calculator.yml b/conf/cmi/paragraphs.paragraphs_type.calculator.yml new file mode 100644 index 00000000..ce97c92b --- /dev/null +++ b/conf/cmi/paragraphs.paragraphs_type.calculator.yml @@ -0,0 +1,17 @@ +uuid: 85966a0f-05e4-4d71-a626-5ad964da27c3 +langcode: en +status: true +dependencies: + module: + - paragraphs_library +third_party_settings: + paragraphs_library: + allow_library_conversion: true +_core: + default_config_hash: BAFNReN7tDKFf-aDohDCqKdXeaUeWmQNbfWVivqg53I +id: calculator +label: Calculator +icon_uuid: null +icon_default: null +description: 'A paragraph that adds a predefined calculator to the page.' +behavior_plugins: { } From 2183b4d680210c1033049d06f02e89f312d86cf9 Mon Sep 17 00:00:00 2001 From: Tero Elonen Date: Thu, 3 Oct 2024 12:45:05 +0300 Subject: [PATCH 2/2] UHF-10588: Add calculator configuration files --- conf/cmi/helfi_calculator.settings.yml | 26 +++++++++++++++++++ .../language/fi/helfi_calculator.settings.yml | 13 ++++++++++ 2 files changed, 39 insertions(+) create mode 100644 conf/cmi/helfi_calculator.settings.yml create mode 100644 conf/cmi/language/fi/helfi_calculator.settings.yml diff --git a/conf/cmi/helfi_calculator.settings.yml b/conf/cmi/helfi_calculator.settings.yml new file mode 100644 index 00000000..e9c266c2 --- /dev/null +++ b/conf/cmi/helfi_calculator.settings.yml @@ -0,0 +1,26 @@ +langcode: en +calculators: + home_care_service_voucher: + label: 'Home care service voucher' + active: false + json: '{}' + home_care_client_fee: + label: 'Home care client fee' + active: false + json: '{}' + continuous_housing_service_voucher: + label: '24-hour housing service voucher' + active: false + json: '{}' + families_home_services_client_fee: + label: 'Families home services client fee' + active: false + json: '{}' + early_childhood_education_fee: + label: 'Early childhood education fee' + active: false + json: '{}' + helsinki_benefit_amount_estimate: + label: 'Helsinki benefit amount estimate' + active: false + json: '{}' diff --git a/conf/cmi/language/fi/helfi_calculator.settings.yml b/conf/cmi/language/fi/helfi_calculator.settings.yml new file mode 100644 index 00000000..877d2acd --- /dev/null +++ b/conf/cmi/language/fi/helfi_calculator.settings.yml @@ -0,0 +1,13 @@ +calculators: + home_care_service_voucher: + label: 'Kotihoidon palvelusetelilaskuri' + home_care_client_fee: + label: 'Kotihoidon asiakasmaksun laskuri' + continuous_housing_service_voucher: + label: 'Palveluasumisen palvelusetelilaskuri' + families_home_services_client_fee: + label: 'Lapsiperheiden kotipalvelun asiakasmaksulaskuri' + early_childhood_education_fee: + label: 'Varhaiskasvatusmaksun laskuri' + helsinki_benefit_amount_estimate: + label: 'Helsinki-lisän arviolaskuri'