feat(mobile-fixes-phase3): Complete US-307 - Restructurare Footer Nav (4 butoane noi)
Implemented by Ralph autonomous loop. Iteration: 1 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -558,11 +558,8 @@
|
||||
</Transition>
|
||||
|
||||
<!-- US-103: Mobile Bottom Navigation (using shared component) -->
|
||||
<MobileBottomNav
|
||||
v-if="isMobile && !mobileSelectionMode"
|
||||
:items="mobileBottomNavItems"
|
||||
@item-click="handleBottomNavClick"
|
||||
/>
|
||||
<!-- US-307: Using default nav items (Dashboard, Bonuri, Facturi, Setări) -->
|
||||
<MobileBottomNav v-if="isMobile && !mobileSelectionMode" />
|
||||
|
||||
<!-- Desktop: Compact Data Table with Batch Grouping (US-002) -->
|
||||
<!-- US-104: Explicit !isMobile check (not v-else) to ensure bulk-actions-bar only shows on desktop -->
|
||||
@@ -1119,20 +1116,8 @@ const handleTopBarAction = (action) => {
|
||||
}
|
||||
}
|
||||
|
||||
// US-103: Bottom nav items for MobileBottomNav component
|
||||
const mobileBottomNavItems = computed(() => [
|
||||
{ to: '/data-entry', icon: 'pi pi-receipt', label: 'Bonuri', active: true },
|
||||
{ icon: 'pi pi-cloud-upload', label: 'Upload' }, // No 'to' - handled via item-click
|
||||
{ to: '/reports/dashboard', icon: 'pi pi-chart-bar', label: 'Rapoarte' },
|
||||
{ to: '/settings', icon: 'pi pi-cog', label: 'Setări' }
|
||||
])
|
||||
|
||||
// US-103: Handle bottom nav clicks for items without routes
|
||||
const handleBottomNavClick = (item) => {
|
||||
if (item.label === 'Upload') {
|
||||
openBulkFileInput()
|
||||
}
|
||||
}
|
||||
// US-307: Removed custom mobileBottomNavItems - using MobileBottomNav defaults
|
||||
// Upload functionality moved to FAB (US-303)
|
||||
|
||||
// US-103/US-113: Selection footer actions for MobileSelectionFooter component
|
||||
// Bonuri batch actions: Delete + Export
|
||||
|
||||
@@ -381,11 +381,8 @@
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
<!-- US-109: Mobile Bottom Navigation -->
|
||||
<MobileBottomNav
|
||||
v-if="isMobile"
|
||||
:items="mobileBottomNavItems"
|
||||
/>
|
||||
<!-- US-109/US-307: Mobile Bottom Navigation (using default nav items) -->
|
||||
<MobileBottomNav v-if="isMobile" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -459,12 +456,7 @@ const handleTopBarAction = (action) => {
|
||||
};
|
||||
|
||||
// US-109: Bottom nav items for MobileBottomNav component
|
||||
const mobileBottomNavItems = computed(() => [
|
||||
{ to: "/data-entry", icon: "pi pi-receipt", label: "Bonuri" },
|
||||
{ to: "/reports/bank-cash-register", icon: "pi pi-wallet", label: "Trezorerie", active: true },
|
||||
{ to: "/reports/dashboard", icon: "pi pi-chart-bar", label: "Rapoarte" },
|
||||
{ to: "/settings", icon: "pi pi-cog", label: "Setări" }
|
||||
]);
|
||||
// US-307: Removed custom mobileBottomNavItems - using MobileBottomNav defaults
|
||||
|
||||
// Handle window resize
|
||||
const handleResize = () => {
|
||||
|
||||
@@ -197,8 +197,8 @@
|
||||
</template>
|
||||
</Dialog>
|
||||
|
||||
<!-- US-111: Mobile Bottom Navigation -->
|
||||
<MobileBottomNav v-if="isMobile" :items="mobileBottomNavItems" />
|
||||
<!-- US-111/US-307: Mobile Bottom Navigation (using default nav items) -->
|
||||
<MobileBottomNav v-if="isMobile" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -263,18 +263,7 @@ const handleTopBarAction = (action) => {
|
||||
}
|
||||
};
|
||||
|
||||
// US-111: Bottom nav items for MobileBottomNav component
|
||||
const mobileBottomNavItems = computed(() => [
|
||||
{ to: "/data-entry", icon: "pi pi-receipt", label: "Bonuri" },
|
||||
{
|
||||
to: "/reports/cache-stats",
|
||||
icon: "pi pi-database",
|
||||
label: "Cache",
|
||||
active: true,
|
||||
},
|
||||
{ to: "/reports/dashboard", icon: "pi pi-chart-bar", label: "Rapoarte" },
|
||||
{ to: "/settings", icon: "pi pi-cog", label: "Setări" },
|
||||
]);
|
||||
// US-307: Removed custom mobileBottomNavItems - using MobileBottomNav defaults
|
||||
|
||||
// US-111: Handle window resize
|
||||
const handleResize = () => {
|
||||
|
||||
@@ -179,8 +179,8 @@
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<!-- Mobile Bottom Nav -->
|
||||
<MobileBottomNav v-if="isMobile" :items="mobileNavItems" />
|
||||
<!-- Mobile Bottom Nav - US-307: Using default nav items -->
|
||||
<MobileBottomNav v-if="isMobile" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -539,13 +539,8 @@ const handleResize = () => {
|
||||
windowWidth.value = window.innerWidth;
|
||||
};
|
||||
|
||||
// Mobile navigation items with 'Rapoarte' active (since Dashboard is /reports/dashboard)
|
||||
const mobileNavItems = computed(() => [
|
||||
{ to: '/data-entry', icon: 'pi pi-receipt', label: 'Bonuri' },
|
||||
{ icon: 'pi pi-cloud-upload', label: 'Upload' },
|
||||
{ to: '/reports/dashboard', icon: 'pi pi-chart-bar', label: 'Rapoarte', active: true },
|
||||
{ to: '/settings', icon: 'pi pi-cog', label: 'Setări' }
|
||||
]);
|
||||
// US-307: Removed custom mobileNavItems - using MobileBottomNav defaults
|
||||
// Dashboard is now at /dashboard with its own nav item
|
||||
|
||||
// Handle logout from drawer menu
|
||||
const handleLogout = async () => {
|
||||
|
||||
@@ -350,8 +350,8 @@
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<!-- Mobile Bottom Nav -->
|
||||
<MobileBottomNav v-if="isMobile" :items="mobileNavItems" />
|
||||
<!-- Mobile Bottom Nav - US-307: Using default nav items -->
|
||||
<MobileBottomNav v-if="isMobile" />
|
||||
|
||||
<!-- Mobile Filters BottomSheet -->
|
||||
<BottomSheet v-model="isFilterSheetOpen">
|
||||
@@ -483,12 +483,7 @@ const topBarActions = computed(() => [
|
||||
])
|
||||
|
||||
// Mobile navigation items
|
||||
const mobileNavItems = computed(() => [
|
||||
{ to: '/data-entry', icon: 'pi pi-receipt', label: 'Bonuri' },
|
||||
{ icon: 'pi pi-cloud-upload', label: 'Upload' },
|
||||
{ to: '/reports/dashboard', icon: 'pi pi-chart-bar', label: 'Rapoarte', active: true },
|
||||
{ to: '/settings', icon: 'pi pi-cog', label: 'Setări' }
|
||||
])
|
||||
// US-307: Removed custom mobileNavItems - using MobileBottomNav defaults
|
||||
|
||||
// Currency formatter
|
||||
const formatCurrency = (value) => {
|
||||
|
||||
@@ -364,11 +364,8 @@
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
<!-- US-107: Mobile Bottom Navigation -->
|
||||
<MobileBottomNav
|
||||
v-if="isMobile"
|
||||
:items="mobileBottomNavItems"
|
||||
/>
|
||||
<!-- US-107/US-307: Mobile Bottom Navigation (using default nav items) -->
|
||||
<MobileBottomNav v-if="isMobile" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -442,13 +439,7 @@ const handleTopBarAction = (action) => {
|
||||
}
|
||||
};
|
||||
|
||||
// US-107: Bottom nav items for MobileBottomNav component
|
||||
const mobileBottomNavItems = computed(() => [
|
||||
{ to: "/data-entry", icon: "pi pi-receipt", label: "Bonuri" },
|
||||
{ to: "/reports/invoices", icon: "pi pi-file-text", label: "Facturi", active: true },
|
||||
{ to: "/reports/dashboard", icon: "pi pi-chart-bar", label: "Rapoarte" },
|
||||
{ to: "/settings", icon: "pi pi-cog", label: "Setări" }
|
||||
]);
|
||||
// US-307: Removed custom mobileBottomNavItems - using MobileBottomNav defaults
|
||||
|
||||
// Handle window resize
|
||||
const handleResize = () => {
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<!-- Mobile Bottom Nav -->
|
||||
<MobileBottomNav v-if="isMobile" :items="mobileNavItems" />
|
||||
<!-- Mobile Bottom Nav - US-307: Using default nav items -->
|
||||
<MobileBottomNav v-if="isMobile" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -76,12 +76,7 @@ const handlePeriodChange = (period) => {
|
||||
}
|
||||
|
||||
// Mobile navigation items
|
||||
const mobileNavItems = computed(() => [
|
||||
{ to: '/data-entry', icon: 'pi pi-receipt', label: 'Bonuri' },
|
||||
{ icon: 'pi pi-cloud-upload', label: 'Upload' },
|
||||
{ to: '/reports/dashboard', icon: 'pi pi-chart-bar', label: 'Rapoarte', active: true },
|
||||
{ to: '/settings', icon: 'pi pi-cog', label: 'Setări' }
|
||||
])
|
||||
// US-307: Removed custom mobileNavItems - using MobileBottomNav defaults
|
||||
|
||||
// Lifecycle
|
||||
onMounted(() => {
|
||||
|
||||
@@ -123,11 +123,8 @@
|
||||
</template>
|
||||
</Card>
|
||||
|
||||
<!-- US-110: Mobile Bottom Navigation -->
|
||||
<MobileBottomNav
|
||||
v-if="isMobile"
|
||||
:items="mobileBottomNavItems"
|
||||
/>
|
||||
<!-- US-110/US-307: Mobile Bottom Navigation (using default nav items) -->
|
||||
<MobileBottomNav v-if="isMobile" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -218,13 +215,7 @@ const handleTopBarAction = (action) => {
|
||||
}
|
||||
}
|
||||
|
||||
// US-110: Bottom nav items for MobileBottomNav component
|
||||
const mobileBottomNavItems = computed(() => [
|
||||
{ to: '/data-entry', icon: 'pi pi-receipt', label: 'Bonuri' },
|
||||
{ to: '/reports/server-logs', icon: 'pi pi-file-edit', label: 'Loguri', active: true },
|
||||
{ to: '/reports/dashboard', icon: 'pi pi-chart-bar', label: 'Rapoarte' },
|
||||
{ to: '/settings', icon: 'pi pi-cog', label: 'Setări' }
|
||||
])
|
||||
// US-307: Removed custom mobileBottomNavItems - using MobileBottomNav defaults
|
||||
|
||||
// US-110: Handle window resize
|
||||
const handleResize = () => {
|
||||
|
||||
@@ -78,8 +78,8 @@
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<!-- Mobile Bottom Nav -->
|
||||
<MobileBottomNav v-if="isMobile" :items="mobileNavItems" />
|
||||
<!-- Mobile Bottom Nav - US-307: Using default nav items -->
|
||||
<MobileBottomNav v-if="isMobile" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -111,13 +111,7 @@ const handleLogout = async () => {
|
||||
router.push('/login')
|
||||
}
|
||||
|
||||
// Mobile navigation items - Settings is active on this page
|
||||
const mobileNavItems = computed(() => [
|
||||
{ to: '/data-entry', icon: 'pi pi-receipt', label: 'Bonuri' },
|
||||
{ icon: 'pi pi-cloud-upload', label: 'Upload' },
|
||||
{ to: '/reports/dashboard', icon: 'pi pi-chart-bar', label: 'Rapoarte' },
|
||||
{ to: '/settings', icon: 'pi pi-cog', label: 'Setări', active: true }
|
||||
])
|
||||
// US-307: Removed custom mobileNavItems - using MobileBottomNav defaults
|
||||
|
||||
// Lifecycle
|
||||
onMounted(() => {
|
||||
|
||||
@@ -360,11 +360,8 @@
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
<!-- US-108: Mobile Bottom Navigation -->
|
||||
<MobileBottomNav
|
||||
v-if="isMobile"
|
||||
:items="mobileBottomNavItems"
|
||||
/>
|
||||
<!-- US-108/US-307: Mobile Bottom Navigation (using default nav items) -->
|
||||
<MobileBottomNav v-if="isMobile" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -429,13 +426,7 @@ const handleTopBarAction = (action) => {
|
||||
}
|
||||
};
|
||||
|
||||
// US-108: Bottom nav items for MobileBottomNav component
|
||||
const mobileBottomNavItems = computed(() => [
|
||||
{ to: "/data-entry", icon: "pi pi-receipt", label: "Bonuri" },
|
||||
{ to: "/reports/trial-balance", icon: "pi pi-calculator", label: "Balanță", active: true },
|
||||
{ to: "/reports/dashboard", icon: "pi pi-chart-bar", label: "Rapoarte" },
|
||||
{ to: "/settings", icon: "pi pi-cog", label: "Setări" }
|
||||
]);
|
||||
// US-307: Removed custom mobileBottomNavItems - using MobileBottomNav defaults
|
||||
|
||||
// Handle window resize
|
||||
const handleResize = () => {
|
||||
|
||||
Reference in New Issue
Block a user