Enhance device management and user experience features

- Updated `package.json` to include the latest version of `@radix-ui/react-separator` and added `moment` for date handling.
- Modified `blockDevice` function in `omada-actions.ts` to include a `blockedBy` parameter, allowing differentiation between admin and parent actions.
- Refactored `payment.ts` to include expiry date handling for devices during payment processing.
- Improved `DevicesTable` and `ClickableRow` components to support admin functionalities and enhance device interaction.
- Updated `BlockDeviceDialog` to accept an `admin` prop, allowing for tailored blocking actions based on user role.
- Enhanced UI components for better consistency and responsiveness across the dashboard.

These changes improve the overall functionality and maintainability of the application, providing a better user experience in device management.
This commit is contained in:
2025-01-01 23:48:56 +05:00
parent bdf3729b0d
commit 745f8d8fad
16 changed files with 378 additions and 213 deletions

View File

@ -55,7 +55,7 @@ export function Wallet({
<Drawer open={isOpen} onOpenChange={setIsOpen}>
<DrawerTrigger asChild>
<Button onClick={() => setIsOpen(!isOpen)} variant="outline">
{walletBalance} MVR
{new Intl.NumberFormat('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 }).format(walletBalance)} MVR
<Wallet2 />
</Button>
</DrawerTrigger>
@ -67,7 +67,7 @@ export function Wallet({
<div>
Your wallet balance is{" "}
<span className="font-semibold">
{walletBalance.toFixed(2)}
{new Intl.NumberFormat('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 }).format(walletBalance)}
</span>{" "}
</div>
</DrawerDescription>