feat(unified-mobile-desktop-ui): Complete US-501 - Header Actions Bar Unificat - Rapoarte

Implemented by Ralph autonomous loop.
Iteration: 1

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Claude Agent
2026-01-12 22:16:53 +00:00
parent 3a11fcd81c
commit 94d215d6ae
8 changed files with 1074 additions and 206 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div class="app-container" :class="{ 'mobile-layout': isMobile }">
<!-- US-109: Mobile Material Design Top Bar -->
<!-- US-501: Mobile Material Design Top Bar -->
<MobileTopBar
v-if="isMobile"
title="Trezorerie"
@@ -10,6 +10,9 @@
@action-click="handleTopBarAction"
/>
<!-- US-501: Export Menu (for mobile export dropdown) -->
<Menu ref="exportMenu" :model="exportMenuItems" :popup="true" />
<!-- Mobile Drawer Menu (replaces old Sidebar) -->
<MobileDrawerMenu
v-model="showDrawer"
@@ -177,7 +180,7 @@
</div>
</div>
<!-- Desktop: Action buttons -->
<!-- US-501: Desktop Action buttons with Export dropdown -->
<div v-if="!isMobile" class="form-actions">
<Button
icon="pi pi-filter-slash"
@@ -185,18 +188,12 @@
class="p-button-outlined p-button-secondary"
@click="resetFilters"
/>
<Button
icon="pi pi-file-excel"
label="Export Excel"
class="p-button-outlined p-button-success"
@click="exportExcel"
:disabled="!hasData"
/>
<Button
icon="pi pi-file-pdf"
label="Export PDF"
class="p-button-outlined p-button-danger"
<SplitButton
label="Export"
icon="pi pi-download"
:model="desktopExportItems"
@click="exportPDF"
class="p-button-outlined"
:disabled="!hasData"
/>
<Button
@@ -395,11 +392,13 @@ import { useAccountingPeriodStore } from "@reports/stores/sharedStores";
import { format } from "date-fns";
import { exportToExcel, exportBankCashRegisterPDF } from "@reports/utils/exportUtils";
// US-109: Mobile Material Design components
// US-501: Mobile Material Design components
import MobileTopBar from "@shared/components/mobile/MobileTopBar.vue";
import MobileBottomNav from "@shared/components/mobile/MobileBottomNav.vue";
import BottomSheet from "@shared/components/mobile/BottomSheet.vue";
import MobileDrawerMenu from "@shared/components/mobile/MobileDrawerMenu.vue";
import Menu from "primevue/menu";
import SplitButton from "primevue/splitbutton";
import { useRouter } from "vue-router";
const toast = useToast();
@@ -424,7 +423,7 @@ const handleLogout = async () => {
router.push('/login');
};
// US-109: Mobile TopBar actions (filter, refresh, export)
// US-501: Mobile TopBar actions (filter, reset, export dropdown)
const mobileTopBarActions = computed(() => [
{
icon: "pi pi-filter",
@@ -433,25 +432,54 @@ const mobileTopBarActions = computed(() => [
active: hasActiveFilters.value
},
{
icon: "pi pi-refresh",
label: "Actualizează",
tooltip: "Actualizează"
icon: "pi pi-filter-slash",
label: "Resetează",
tooltip: "Resetează Filtrele"
},
{
icon: "pi pi-download",
label: "Export",
tooltip: "Export Excel"
tooltip: "Export"
}
]);
// US-109: Handle top bar action clicks
const handleTopBarAction = (action) => {
// US-501: Export menu ref for mobile
const exportMenu = ref(null);
const exportMenuItems = ref([
{
label: "Export PDF",
icon: "pi pi-file-pdf",
command: () => exportPDF()
},
{
label: "Export XLSX",
icon: "pi pi-file-excel",
command: () => exportExcel()
}
]);
// US-501: Desktop export dropdown items (SplitButton)
const desktopExportItems = ref([
{
label: "Export PDF",
icon: "pi pi-file-pdf",
command: () => exportPDF()
},
{
label: "Export XLSX",
icon: "pi pi-file-excel",
command: () => exportExcel()
}
]);
// US-501: Handle top bar action clicks
const handleTopBarAction = (action, event) => {
if (action.icon === "pi pi-filter") {
showFilters.value = !showFilters.value;
} else if (action.icon === "pi pi-refresh") {
refreshData();
} else if (action.icon === "pi pi-filter-slash") {
resetFilters();
} else if (action.icon === "pi pi-download") {
exportExcel();
exportMenu.value.toggle(event);
}
};