From 4978ab3640c3805a7c8b9a20d0cddb2cd69090cf Mon Sep 17 00:00:00 2001 From: Rotem Hen Date: Wed, 20 Dec 2023 20:36:42 +0200 Subject: [PATCH] replace svg image with actual component + localization --- .../labels/CustomLabels.labels-meta.xml | 48 ++++++++++++ .../lwc/editCardModal/editCardModal.css | 4 + .../lwc/editCardModal/editCardModal.html | 24 ++---- .../lwc/editCardModal/editCardModal.js | 56 ++++++++++++-- .../main/default/lwc/editCardModal/labels.js | 12 +++ .../lwc/subFilterCard/subFilterCard.css | 1 + .../lwc/subFilterCard/subFilterCard.html | 2 +- .../lwc/summaryComponent/summaryComponent.js | 4 +- ...d_Setting__c-el.objectTranslation-meta.xml | 3 +- .../Layout__c.fieldTranslation-meta.xml | 4 +- ..._Filter_Logic__c.fieldTranslation-meta.xml | 2 +- ...d_Setting__c-hu.objectTranslation-meta.xml | 4 +- ...d_Setting__c-pl.objectTranslation-meta.xml | 3 +- ...d_Setting__c-ru.objectTranslation-meta.xml | 3 +- .../Layout__c.fieldTranslation-meta.xml | 4 +- ..._Filter_Logic__c.fieldTranslation-meta.xml | 2 +- ...d_Setting__c-sk.objectTranslation-meta.xml | 3 +- ...d_Setting__c-sl.objectTranslation-meta.xml | 3 +- .../side_example.resource-meta.xml | 5 -- .../default/staticresources/side_example.svg | 58 --------------- .../stack_example.resource-meta.xml | 5 -- .../default/staticresources/stack_example.svg | 33 --------- .../translations/bg.translation-meta.xml | 37 ++++------ .../translations/cs.translation-meta.xml | 40 ++++------ .../translations/da.translation-meta.xml | 28 +++---- .../translations/de.translation-meta.xml | 49 +++++------- .../translations/el.translation-meta.xml | 60 ++++++--------- .../translations/en_GB.translation-meta.xml | 28 +++---- .../translations/es.translation-meta.xml | 49 +++++------- .../translations/es_MX.translation-meta.xml | 49 +++++------- .../translations/fi.translation-meta.xml | 37 ++++------ .../translations/fr.translation-meta.xml | 46 +++++------- .../translations/hr.translation-meta.xml | 41 +++++----- .../translations/hu.translation-meta.xml | 74 +++++++++---------- .../translations/in.translation-meta.xml | 40 ++++------ .../translations/it.translation-meta.xml | 40 ++++------ .../translations/iw.translation-meta.xml | 22 +++--- .../translations/ja.translation-meta.xml | 41 +++++----- .../translations/ko.translation-meta.xml | 30 ++++---- .../translations/nl_NL.translation-meta.xml | 48 +++++------- .../translations/no.translation-meta.xml | 28 +++---- .../translations/pl.translation-meta.xml | 46 +++++------- .../translations/pt_BR.translation-meta.xml | 48 +++++------- .../translations/pt_PT.translation-meta.xml | 46 +++++------- .../translations/ro.translation-meta.xml | 55 ++++++-------- .../translations/ru.translation-meta.xml | 31 ++++---- .../translations/sk.translation-meta.xml | 37 ++++------ .../translations/sl.translation-meta.xml | 43 +++++------ .../translations/sv.translation-meta.xml | 31 ++++---- .../translations/th.translation-meta.xml | 25 +++---- .../translations/tr.translation-meta.xml | 28 +++---- .../translations/uk.translation-meta.xml | 36 ++++----- .../translations/vi.translation-meta.xml | 65 ++++++++-------- .../translations/zh_CN.translation-meta.xml | 19 +++-- .../translations/zh_TW.translation-meta.xml | 23 +++--- 55 files changed, 687 insertions(+), 916 deletions(-) delete mode 100644 projects/MobileDashboard/force-app/main/default/staticresources/side_example.resource-meta.xml delete mode 100644 projects/MobileDashboard/force-app/main/default/staticresources/side_example.svg delete mode 100644 projects/MobileDashboard/force-app/main/default/staticresources/stack_example.resource-meta.xml delete mode 100644 projects/MobileDashboard/force-app/main/default/staticresources/stack_example.svg diff --git a/projects/MobileDashboard/force-app/main/default/labels/CustomLabels.labels-meta.xml b/projects/MobileDashboard/force-app/main/default/labels/CustomLabels.labels-meta.xml index 2ffa2ec..bc165eb 100644 --- a/projects/MobileDashboard/force-app/main/default/labels/CustomLabels.labels-meta.xml +++ b/projects/MobileDashboard/force-app/main/default/labels/CustomLabels.labels-meta.xml @@ -353,6 +353,54 @@ Uses more vertical space. Recommended for long field names. + + MobileDashboard_card_modal_design_tab_example_my_sa + en_US + true + MobileDashboard + Card modal - design tab - example cards - My Service Appointments + My Service Appointments + + + MobileDashboard_card_modal_design_tab_example_cannot_complete + en_US + true + MobileDashboard + Card modal - design tab - example cards - Cannot Complete + Cannot Complete + + + MobileDashboard_card_modal_design_tab_example_canceled + en_US + true + MobileDashboard + Card modal - design tab - example cards - Canceled + Canceled + + + MobileDashboard_card_modal_design_tab_example_completed + en_US + true + MobileDashboard + Card modal - design tab - example cards - Completed + Completed + + + MobileDashboard_card_modal_design_tab_example_scheduled + en_US + true + MobileDashboard + Card modal - design tab - example cards - Scheduled + Scheduled + + + MobileDashboard_card_modal_design_tab_example_in_progress + en_US + true + MobileDashboard + Card modal - design tab - example cards - In Progress + In Progress + MobileDashboard_card_modal_design_tab_card_data_title diff --git a/projects/MobileDashboard/force-app/main/default/lwc/editCardModal/editCardModal.css b/projects/MobileDashboard/force-app/main/default/lwc/editCardModal/editCardModal.css index 86f5b35..f53b7c7 100644 --- a/projects/MobileDashboard/force-app/main/default/lwc/editCardModal/editCardModal.css +++ b/projects/MobileDashboard/force-app/main/default/lwc/editCardModal/editCardModal.css @@ -34,6 +34,10 @@ margin-right: 60px; } +.layout-radio c-summary-component { + max-width: 350px; +} + .sub-filters-container { display: flex; flex-direction: column; diff --git a/projects/MobileDashboard/force-app/main/default/lwc/editCardModal/editCardModal.html b/projects/MobileDashboard/force-app/main/default/lwc/editCardModal/editCardModal.html index 4848b86..6fdd676 100644 --- a/projects/MobileDashboard/force-app/main/default/lwc/editCardModal/editCardModal.html +++ b/projects/MobileDashboard/force-app/main/default/lwc/editCardModal/editCardModal.html @@ -131,14 +131,10 @@

LABELS.MobileDashboard_card_modal_design_tab_layout_side_description }

- - ; - - + +
LABELS.MobileDashboard_card_modal_design_tab_layout_stack_description }

- - ; - - + +
diff --git a/projects/MobileDashboard/force-app/main/default/lwc/editCardModal/editCardModal.js b/projects/MobileDashboard/force-app/main/default/lwc/editCardModal/editCardModal.js index 9c24eeb..6ee7a3a 100644 --- a/projects/MobileDashboard/force-app/main/default/lwc/editCardModal/editCardModal.js +++ b/projects/MobileDashboard/force-app/main/default/lwc/editCardModal/editCardModal.js @@ -3,8 +3,6 @@ import { api } from "lwc"; import LightningModal from "lightning/modal"; import AlertMessage from "c/alertMessage"; import getAllFields from "@salesforce/apex/DashboardSettingsService.getAllFields"; -import SIDE_EXAMPLE_SVG from "@salesforce/resourceUrl/side_example"; -import STACK_EXAMPLE_SVG from "@salesforce/resourceUrl/stack_example"; import customLabels from "./labels"; export default class EditCardModal extends LightningModal { @@ -32,9 +30,6 @@ export default class EditCardModal extends LightningModal { color: "#747474" }; - side_svg_url = `${SIDE_EXAMPLE_SVG}#side_example`; - stack_svg_url = `${STACK_EXAMPLE_SVG}#stack_example`; - connectedCallback() { this.tempCard = { ...this.card }; this.refreshFieldsOptions(this.tempCard.object?.value); @@ -245,6 +240,57 @@ export default class EditCardModal extends LightningModal { return !this.tempCard.object?.value || !this.tempCard.filter.conditionLogic; } + get exampleSettings() { + return { + Title__c: this.LABELS.MobileDashboard_card_modal_design_tab_example_my_sa, + subQueriesData: [ + { + index: 0, + count: 1, + label: this.LABELS.MobileDashboard_card_modal_design_tab_example_cannot_complete, + icon: 'utility:error', + color: '#B72020', + }, + { + index: 1, + count: 2, + label: this.LABELS.MobileDashboard_card_modal_design_tab_example_canceled, + icon: 'utility:warning', + color: '#8C4B02', + }, + { + index: 2, + count: 5, + label: this.LABELS.MobileDashboard_card_modal_design_tab_example_completed, + icon: 'utility:success', + color: '#2E844A', + }, + { + index: 3, + count: 6, + label: this.LABELS.MobileDashboard_card_modal_design_tab_example_scheduled, + icon: 'utility:clock', + color: '#747474', + }, + { + index: 4, + count: 4, + label: this.LABELS.MobileDashboard_card_modal_design_tab_example_in_progress, + icon: 'utility:event', + color: '#747474', + }, + ], + }; + } + + get sideExampleSettings() { + return { ...this.exampleSettings, Layout__c: 'SIDE' }; + } + + get stackExampleSettings() { + return { ...this.exampleSettings, Layout__c: 'STACK' }; + } + detectSubFilterDrag = async () => { const filters = this.template.querySelectorAll("c-sub-filter-card"); if (filters.length !== this.tempCard.subFilters.length) { diff --git a/projects/MobileDashboard/force-app/main/default/lwc/editCardModal/labels.js b/projects/MobileDashboard/force-app/main/default/lwc/editCardModal/labels.js index 8e587a9..19201f6 100644 --- a/projects/MobileDashboard/force-app/main/default/lwc/editCardModal/labels.js +++ b/projects/MobileDashboard/force-app/main/default/lwc/editCardModal/labels.js @@ -17,6 +17,12 @@ import MobileDashboard_card_modal_design_tab_layout_side_title from "@salesforce import MobileDashboard_card_modal_design_tab_layout_side_description from "@salesforce/label/c.MobileDashboard_card_modal_design_tab_layout_side_description"; import MobileDashboard_card_modal_design_tab_layout_stack_title from "@salesforce/label/c.MobileDashboard_card_modal_design_tab_layout_stack_title"; import MobileDashboard_card_modal_design_tab_layout_stack_description from "@salesforce/label/c.MobileDashboard_card_modal_design_tab_layout_stack_description"; +import MobileDashboard_card_modal_design_tab_example_my_sa from "@salesforce/label/c.MobileDashboard_card_modal_design_tab_example_my_sa"; +import MobileDashboard_card_modal_design_tab_example_cannot_complete from "@salesforce/label/c.MobileDashboard_card_modal_design_tab_example_cannot_complete"; +import MobileDashboard_card_modal_design_tab_example_canceled from "@salesforce/label/c.MobileDashboard_card_modal_design_tab_example_canceled"; +import MobileDashboard_card_modal_design_tab_example_completed from "@salesforce/label/c.MobileDashboard_card_modal_design_tab_example_completed"; +import MobileDashboard_card_modal_design_tab_example_scheduled from "@salesforce/label/c.MobileDashboard_card_modal_design_tab_example_scheduled"; +import MobileDashboard_card_modal_design_tab_example_in_progress from "@salesforce/label/c.MobileDashboard_card_modal_design_tab_example_in_progress"; import MobileDashboard_card_modal_design_tab_card_data_title from "@salesforce/label/c.MobileDashboard_card_modal_design_tab_card_data_title"; import MobileDashboard_settings_delete_sub_filter_warning_title from "@salesforce/label/c.MobileDashboard_settings_delete_sub_filter_warning_title"; import MobileDashboard_settings_delete_sub_filter_warning_body from "@salesforce/label/c.MobileDashboard_settings_delete_sub_filter_warning_body"; @@ -48,6 +54,12 @@ const customLabels = { MobileDashboard_card_modal_design_tab_layout_side_description, MobileDashboard_card_modal_design_tab_layout_stack_title, MobileDashboard_card_modal_design_tab_layout_stack_description, + MobileDashboard_card_modal_design_tab_example_my_sa, + MobileDashboard_card_modal_design_tab_example_cannot_complete, + MobileDashboard_card_modal_design_tab_example_canceled, + MobileDashboard_card_modal_design_tab_example_completed, + MobileDashboard_card_modal_design_tab_example_scheduled, + MobileDashboard_card_modal_design_tab_example_in_progress, MobileDashboard_card_modal_design_tab_card_data_title, MobileDashboard_settings_delete_sub_filter_warning_title, MobileDashboard_settings_delete_sub_filter_warning_body, diff --git a/projects/MobileDashboard/force-app/main/default/lwc/subFilterCard/subFilterCard.css b/projects/MobileDashboard/force-app/main/default/lwc/subFilterCard/subFilterCard.css index 3c17738..26bc86c 100644 --- a/projects/MobileDashboard/force-app/main/default/lwc/subFilterCard/subFilterCard.css +++ b/projects/MobileDashboard/force-app/main/default/lwc/subFilterCard/subFilterCard.css @@ -67,6 +67,7 @@ c-basic-filter { } .preview { + max-width: 200px; margin-right: 24px; display: flex; flex-direction: column; diff --git a/projects/MobileDashboard/force-app/main/default/lwc/subFilterCard/subFilterCard.html b/projects/MobileDashboard/force-app/main/default/lwc/subFilterCard/subFilterCard.html index 91c532e..c015dcb 100644 --- a/projects/MobileDashboard/force-app/main/default/lwc/subFilterCard/subFilterCard.html +++ b/projects/MobileDashboard/force-app/main/default/lwc/subFilterCard/subFilterCard.html @@ -55,7 +55,7 @@ -
+