feat: add icons to action buttons in purchase management pages
This commit is contained in:
parent
9ba4cf0ee3
commit
92860bfb28
@ -8,7 +8,7 @@ import purchaseRoutes from '@/routes/purchase';
|
|||||||
import React, { useMemo, useState } from 'react';
|
import React, { useMemo, useState } from 'react';
|
||||||
import { toast } from 'sonner';
|
import { toast } from 'sonner';
|
||||||
import { Product, ProductPrice } from '@/types';
|
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 { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
|
||||||
import { Calendar } from '@/components/ui/calendar';
|
import { Calendar } from '@/components/ui/calendar';
|
||||||
import { format } from 'date-fns';
|
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">
|
<div className="flex items-center justify-between shrink-0">
|
||||||
<h1 className="text-3xl font-bold tracking-tight">Tambah Belanja</h1>
|
<h1 className="text-3xl font-bold tracking-tight">Tambah Belanja</h1>
|
||||||
<Link href={purchaseRoutes.index().url}>
|
<Link href={purchaseRoutes.index().url}>
|
||||||
<Button variant='outline'>Kembali</Button>
|
<Button variant='outline'>
|
||||||
|
<ArrowLeft className="size-4" />
|
||||||
|
Kembali</Button>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import purchaseRoutes from '@/routes/purchase';
|
|||||||
import React, { useMemo, useState } from 'react';
|
import React, { useMemo, useState } from 'react';
|
||||||
import { toast } from 'sonner';
|
import { toast } from 'sonner';
|
||||||
import { Product, ProductPrice, Purchase } from '@/types';
|
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 { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
|
||||||
import { Calendar } from '@/components/ui/calendar';
|
import { Calendar } from '@/components/ui/calendar';
|
||||||
import { format } from 'date-fns';
|
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">
|
<div className="flex items-center justify-between shrink-0">
|
||||||
<h1 className="text-3xl font-bold tracking-tight">Ubah Belanja</h1>
|
<h1 className="text-3xl font-bold tracking-tight">Ubah Belanja</h1>
|
||||||
<Link href={purchaseRoutes.index().url}>
|
<Link href={purchaseRoutes.index().url}>
|
||||||
<Button variant='outline'>Kembali</Button>
|
<Button variant='outline'>
|
||||||
|
<ArrowLeft className="size-4" />
|
||||||
|
Kembali</Button>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { Head, Link } from '@inertiajs/react';
|
|||||||
import type { Purchase } from '@/types';
|
import type { Purchase } from '@/types';
|
||||||
import { Card, CardContent } from '@/components/ui/card';
|
import { Card, CardContent } from '@/components/ui/card';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Trash2 } from 'lucide-react';
|
import { Plus, Trash2 } from 'lucide-react';
|
||||||
import { format } from 'date-fns';
|
import { format } from 'date-fns';
|
||||||
import { id } from 'date-fns/locale';
|
import { id } from 'date-fns/locale';
|
||||||
import { DataTable } from '@/components/data-table';
|
import { DataTable } from '@/components/data-table';
|
||||||
@ -50,6 +50,7 @@ export default function PurchaseIndex({ purchases }: { purchases: Purchase[] })
|
|||||||
</div>
|
</div>
|
||||||
<Link href={purchaseRoutes.create().url}>
|
<Link href={purchaseRoutes.create().url}>
|
||||||
<Button>
|
<Button>
|
||||||
|
<Plus className="size-4" />
|
||||||
Tambah
|
Tambah
|
||||||
</Button>
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user