feat: add icons to action buttons in purchase management pages

This commit is contained in:
Yoga Pangestu 2026-04-22 21:38:27 +07:00
parent 9ba4cf0ee3
commit 92860bfb28
3 changed files with 10 additions and 5 deletions

View File

@ -8,7 +8,7 @@ import purchaseRoutes from '@/routes/purchase';
import React, { useMemo, useState } from 'react';
import { toast } from 'sonner';
import { Product, ProductPrice } from '@/types';
import { Plus, Trash2, CalendarIcon, Minus, ShoppingCart, Search, ImagePlus, X, Loader, Save } from 'lucide-react';
import { Plus, Trash2, CalendarIcon, Minus, ShoppingCart, Search, ImagePlus, X, Loader, Save, ArrowLeft } from 'lucide-react';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
import { Calendar } from '@/components/ui/calendar';
import { format } from 'date-fns';
@ -314,7 +314,9 @@ export default function PurchaseCreate({ products, cartItems }: { products: Prod
<div className="flex items-center justify-between shrink-0">
<h1 className="text-3xl font-bold tracking-tight">Tambah Belanja</h1>
<Link href={purchaseRoutes.index().url}>
<Button variant='outline'>Kembali</Button>
<Button variant='outline'>
<ArrowLeft className="size-4" />
Kembali</Button>
</Link>
</div>

View File

@ -8,7 +8,7 @@ import purchaseRoutes from '@/routes/purchase';
import React, { useMemo, useState } from 'react';
import { toast } from 'sonner';
import { Product, ProductPrice, Purchase } from '@/types';
import { Plus, Trash2, CalendarIcon, Minus, ShoppingCart, Search, ImagePlus, X, Loader, Save } from 'lucide-react';
import { Plus, Trash2, CalendarIcon, Minus, ShoppingCart, Search, ImagePlus, X, Loader, Save, ArrowLeft } from 'lucide-react';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
import { Calendar } from '@/components/ui/calendar';
import { format } from 'date-fns';
@ -318,7 +318,9 @@ export default function PurchaseEdit({ purchase, products }: { purchase: Purchas
<div className="flex items-center justify-between shrink-0">
<h1 className="text-3xl font-bold tracking-tight">Ubah Belanja</h1>
<Link href={purchaseRoutes.index().url}>
<Button variant='outline'>Kembali</Button>
<Button variant='outline'>
<ArrowLeft className="size-4" />
Kembali</Button>
</Link>
</div>

View File

@ -2,7 +2,7 @@ import { Head, Link } from '@inertiajs/react';
import type { Purchase } from '@/types';
import { Card, CardContent } from '@/components/ui/card';
import { Button } from '@/components/ui/button';
import { Trash2 } from 'lucide-react';
import { Plus, Trash2 } from 'lucide-react';
import { format } from 'date-fns';
import { id } from 'date-fns/locale';
import { DataTable } from '@/components/data-table';
@ -50,6 +50,7 @@ export default function PurchaseIndex({ purchases }: { purchases: Purchase[] })
</div>
<Link href={purchaseRoutes.create().url}>
<Button>
<Plus className="size-4" />
Tambah
</Button>
</Link>