mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-08 23:59:28 +00:00
- include directive primevue.tooltip
- refactor phrases to avoid timing problem with loading phrases of alert
This commit is contained in:
@@ -13,4 +13,5 @@ const app = Vue.createApp({
|
||||
}
|
||||
});
|
||||
app.use(PluginsPhrasen);
|
||||
app.directive('tooltip', primevue.tooltip);
|
||||
app.mount('#main');
|
||||
@@ -17,7 +17,7 @@ export default {
|
||||
</template>
|
||||
<template v-slot:footer>
|
||||
<button type="button" class="btn btn-primary" @click="result=true;this.hide()">OK</button>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{this.$p.t('ui', 'cancel')}}</button>
|
||||
</template>
|
||||
</bs-modal>`
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
<div v-if="dashboard">
|
||||
<ul class="nav nav-tabs mt-3" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="edit-tab" data-bs-toggle="tab" data-bs-target="#edit" type="button" role="tab" aria-controls="edit" aria-selected="false">Edit</button>
|
||||
<button class="nav-link" id="edit-tab" data-bs-toggle="tab" data-bs-target="#edit" type="button" role="tab" aria-controls="edit" aria-selected="false">{{this.$p.t('ui', 'bearbeiten')}}</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link active" id="widgets-tab" data-bs-toggle="tab" data-bs-target="#widgets" type="button" role="tab" aria-controls="widgets" aria-selected="true">Widgets</button>
|
||||
@@ -122,7 +123,7 @@ export default {
|
||||
<dashboard-admin-edit v-bind="dashboard" :key="dashboard.dashboard_id" @change="dashboardUpdate($event)" @delete="dashboardDelete($event)"></dashboard-admin-edit>
|
||||
</div>
|
||||
<div class="tab-pane fade show active" id="widgets" role="tabpanel" aria-labelledby="widgets-tab">
|
||||
<dashboard-admin-widgets :key="dashboard.dashboard_id" :dashboard_id="dashboard.dashboard_id" :widgets="widgets" @change="test" @assign-widgets="assignWidgets"></dashboard-admin-widgets>
|
||||
<dashboard-admin-widgets :key="dashboard.dashboard_id" :dashboard_id="dashboard.dashboard_id" :widgets="widgets" @assign-widgets="assignWidgets"></dashboard-admin-widgets>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="presets" role="tabpanel" aria-labelledby="presets-tab">
|
||||
<dashboard-admin-presets :dashboard="dashboard.dashboard_kurzbz" :widgets="widgets"></dashboard-admin-presets>
|
||||
|
||||
@@ -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 {
|
||||
<textarea id="dashboard-admin-edit-beschreibung" class="form-control" v-model="desc"></textarea>
|
||||
</div>
|
||||
<div>
|
||||
<button class="btn btn-danger" @click="sendDelete">Delete</button>
|
||||
<button class="btn btn-primary" @click="$emit('change', {dashboard_id,dashboard_kurzbz:kurzbz,beschreibung:desc})">Update</button>
|
||||
<button class="btn btn-danger" @click="sendDelete">{{this.$p.t('ui', 'loeschen')}}</button>
|
||||
<button class="btn btn-primary" @click="$emit('change', {dashboard_id,dashboard_kurzbz:kurzbz,beschreibung:desc})">{{this.$p.t('ui', 'btnAktualisieren')}}</button>
|
||||
</div>
|
||||
</div>`
|
||||
}
|
||||
|
||||
@@ -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
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user