fix: replace QToolbar by Teleport
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Javier Segarra 2024-05-06 08:37:41 +02:00
parent d2e178a41b
commit f85665b271
1 changed files with 41 additions and 35 deletions

View File

@ -14,6 +14,9 @@ import { useArrayData } from 'src/composables/useArrayData';
import useNotify from 'src/composables/useNotify.js'; import useNotify from 'src/composables/useNotify.js';
import { useVnConfirm } from 'composables/useVnConfirm'; import { useVnConfirm } from 'composables/useVnConfirm';
import axios from 'axios'; import axios from 'axios';
import { useStateStore } from 'stores/useStateStore';
const stateStore = useStateStore();
const route = useRoute(); const route = useRoute();
const { t } = useI18n(); const { t } = useI18n();
@ -197,43 +200,46 @@ onMounted(async () => {
auto-load auto-load
@on-fetch="(data) => (shelvingsOptions = data)" @on-fetch="(data) => (shelvingsOptions = data)"
/> />
<QToolbar class="bg-vn-dark justify-end"> <template v-if="stateStore.isHeaderMounted()">
<div id="st-data" class="q-py-sm flex items-center"> <Teleport to="#st-data">
<div class="q-pa-md q-mr-lg" style="border: 2px solid #222"> <div class="q-py-sm flex items-center">
<QCardSection horizontal> <div class="q-pa-md q-mr-lg" style="border: 2px solid #222">
<span class="text-weight-bold text-subtitle1 text-center full-width"> <QCardSection horizontal>
{{ t('shelvings.total') }} <span
</span> class="text-weight-bold text-subtitle1 text-center full-width"
</QCardSection> >
<QCardSection class="column items-center" horizontal> {{ t('shelvings.total') }}
<div>
<span class="details-label"
>{{ t('shelvings.totalLabels') }}
</span> </span>
<span>: {{ totalLabels }}</span> </QCardSection>
</div> <QCardSection class="column items-center" horizontal>
</QCardSection> <div>
<span class="details-label"
>{{ t('shelvings.totalLabels') }}
</span>
<span>: {{ totalLabels }}</span>
</div></QCardSection
>
</div>
<QBtn
color="primary"
icon="delete"
:disabled="!rowsSelected.length"
@click="
openConfirmationModal(
t('shelvings.removeConfirmTitle'),
t('shelvings.removeConfirmSubtitle'),
removeLines
)
"
>
<QTooltip>
{{ t('shelvings.removeLines') }}
</QTooltip>
</QBtn>
</div> </div>
<QBtn </Teleport>
color="primary" </template>
icon="delete"
:disabled="!rowsSelected.length"
@click="
openConfirmationModal(
t('shelvings.removeConfirmTitle'),
t('shelvings.removeConfirmSubtitle'),
removeLines
)
"
>
<QTooltip>
{{ t('shelvings.removeLines') }}
</QTooltip>
</QBtn>
</div>
<QSpace />
<div id="st-actions"></div>
</QToolbar>
<QPage class="column items-center q-pa-md"> <QPage class="column items-center q-pa-md">
<QTable <QTable
:rows="rows" :rows="rows"