fix: update redirect paths and enhance UI layout for order management

- Changed redirect paths in WithRoleRedirect trait from '/login' to '/auth/login' for consistency.
- Adjusted footer layout in home view to include padding for better spacing.
- Improved order management UI by modifying flexbox structure for better responsiveness and alignment of buttons.
This commit is contained in:
Yoga Pangestu 2026-01-11 13:14:17 +07:00
parent 3a05ee2617
commit bdd793343f
3 changed files with 20 additions and 12 deletions

View File

@ -9,7 +9,7 @@ trait WithRoleRedirect
public function goToProfile(): RedirectResponse
{
if (! auth()->check()) {
return redirect('/login');
return redirect('/auth/login');
}
$user = auth()->user();
@ -27,6 +27,6 @@ public function goToProfile(): RedirectResponse
return redirect('/member/overview');
}
return redirect('/login');
return redirect('/auth/login');
}
}

View File

@ -86,7 +86,7 @@ class="hover:text-home-secondary transition-colors duration-300 flex items-cente
</svg></div>
<span>{{ $contactSettings->email }}</span>
</div>
<div class="flex items-center gap-4">
<div class="flex items-center gap-4 pb-8 md:pb-0">
<div><svg class="w-5 h-5 text-home-primary" fill="none" stroke="currentColor"
viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"

View File

@ -1,28 +1,36 @@
<flux:main>
<div class="flex justify-between items-center">
<div class="flex flex-col gap-4 sm:flex-row sm:justify-between sm:items-center">
<div>
<flux:heading size="xl">{{ $pageTitle }}</flux:heading>
</div>
@can('create order')
<div class="flex" x-data="{
<div class="flex flex-col gap-2 sm:flex-row sm:items-center" x-data="{
isConnected: !!(localStorage.getItem('printerDevice') || localStorage.getItem('btPrinterDevice'))
}" @printer-status-change.window="isConnected = $event.detail.connected">
<flux:button href="{{ route('studio.manage.order.create') }}" variant="primary" wire:navigate class="text-sm">
}"
@printer-status-change.window="isConnected = $event.detail.connected">
<flux:button href="{{ route('studio.manage.order.create') }}" variant="primary" wire:navigate
class="text-sm w-full sm:w-auto">
Tambah
</flux:button>
<template x-if="!isConnected">
<div class="flex gap-2 ms-2">
<flux:button variant="primary" color="cyan" wire:click="$dispatch('connectUSB')">
<div class="flex flex-col gap-2 sm:flex-row">
<flux:button variant="primary" color="cyan" wire:click="$dispatch('connectUSB')"
class="w-full sm:w-auto">
Connect USB
</flux:button>
<flux:button variant="primary" color="indigo" wire:click="$dispatch('connectBluetooth')">
<flux:button variant="primary" color="indigo" wire:click="$dispatch('connectBluetooth')"
class="w-full sm:w-auto">
Connect Bluetooth
</flux:button>
</div>
</template>
<template x-if="isConnected">
<div class="flex gap-2 ms-2">
<flux:button variant="primary" color="red" wire:click="$dispatch('disconnectPrinter')">
<div>
<flux:button variant="primary" color="red" wire:click="$dispatch('disconnectPrinter')"
class="w-full sm:w-auto">
Disconnect
</flux:button>
</div>