From 4f104523ff4a03b4751eacbecea8bccefeff500f Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 8 Jan 2026 16:02:29 +0100 Subject: [PATCH] - include directive primevue.tooltip - refactor phrases to avoid timing problem with loading phrases of alert --- public/js/apps/Dashboard/Admin.js | 1 + public/js/components/Bootstrap/Confirm.js | 2 +- public/js/components/Dashboard/Admin.js | 11 +++++----- public/js/components/Dashboard/Admin/Edit.js | 7 +++---- system/phrasesupdate.php | 22 +++++++++++++++++++- 5 files changed, 32 insertions(+), 11 deletions(-) diff --git a/public/js/apps/Dashboard/Admin.js b/public/js/apps/Dashboard/Admin.js index 4a5fcee2f..7c57abbda 100644 --- a/public/js/apps/Dashboard/Admin.js +++ b/public/js/apps/Dashboard/Admin.js @@ -13,4 +13,5 @@ const app = Vue.createApp({ } }); app.use(PluginsPhrasen); +app.directive('tooltip', primevue.tooltip); app.mount('#main'); \ No newline at end of file diff --git a/public/js/components/Bootstrap/Confirm.js b/public/js/components/Bootstrap/Confirm.js index a56885473..f6ac52abc 100644 --- a/public/js/components/Bootstrap/Confirm.js +++ b/public/js/components/Bootstrap/Confirm.js @@ -17,7 +17,7 @@ export default { ` } diff --git a/public/js/components/Dashboard/Admin.js b/public/js/components/Dashboard/Admin.js index b35346fb5..3ea7a3260 100644 --- a/public/js/components/Dashboard/Admin.js +++ b/public/js/components/Dashboard/Admin.js @@ -41,7 +41,7 @@ export default { return this.$api .call(ApiDashboardAdmin.addDashboard(params)) .then(response =>{ - this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave')); //TODO(Manu) phrase here working + this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave')); let newDashboard = { dashboard_id: response.data, @@ -58,7 +58,8 @@ export default { return this.$api .call(ApiDashboardAdmin.updateDashboard(dashboard)) .then(response =>{ - this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave')); //TODO(Manu) phrase here working + + this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave')); let old = this.dashboards.find(el => el.dashboard_id == dashboard.dashboard_id); old.dashboard_kurzbz = dashboard.dashboard_kurzbz; @@ -70,7 +71,7 @@ export default { return this.$api .call(ApiDashboardAdmin.deleteDashboard(dashboard_id)) .then(response => { - this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successDelete')); //TODO(Manu) phrase here NOT always working + this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successDelete')); }) .catch(this.$fhcAlert.handleSystemError) @@ -108,7 +109,7 @@ export default {
- +
diff --git a/public/js/components/Dashboard/Admin/Edit.js b/public/js/components/Dashboard/Admin/Edit.js index 6b097d86c..c40d91183 100644 --- a/public/js/components/Dashboard/Admin/Edit.js +++ b/public/js/components/Dashboard/Admin/Edit.js @@ -18,8 +18,7 @@ export default { }, methods: { sendDelete() { - //TODO(Manu) phrases here NOT always working - BsConfirm.popup(this.$p.t('alert', 'confirm_delete') + " " + this.$p.t('dashboard', 'deleteInfo')) + BsConfirm.popup(this.$p.t('ui', 'confirm_delete') + " " + this.$p.t('ui', 'deleteInfo')) .then(() => this.$emit('delete', this.dashboard_id)).catch(); } }, @@ -33,8 +32,8 @@ export default {
- - + +
` } diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index f79d1aee0..b352922e2 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -52615,7 +52615,7 @@ I have been informed that I am under no obligation to consent to the transmissio // ### Phrases Dashboard Admin START array( 'app' => 'core', - 'category' => 'dashboard', + 'category' => 'ui', 'phrase' => 'deleteInfo', 'insertvon' => 'system', 'phrases' => array( @@ -52732,6 +52732,26 @@ I have been informed that I am under no obligation to consent to the transmissio ) ) ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'confirm_delete', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Möchten Sie wirklich löschen?', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Do you really want to delete?', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), // ### Phrases Dashboard Admin END );