refactor: clean up and reorganize imports in various components for improved readability and consistency
This commit is contained in:
parent
93828b6da9
commit
34190253e5
@ -17,7 +17,6 @@ import { FieldGroup } from "@/components/ui/field"
|
||||
import { Input } from "@/components/ui/input"
|
||||
import { Label } from "@/components/ui/label"
|
||||
import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group';
|
||||
import { SelectTrigger } from '@/components/ui/select';
|
||||
import payrollRoutes from '@/routes/payroll';
|
||||
import type { Payroll } from '@/types';
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import { usePrinter } from '@/hooks/use-printer';
|
||||
import { EscPosEncoder } from '@/lib/esc-pos-encoder';
|
||||
import type { Order } from '@/types/order';
|
||||
import { format } from 'date-fns';
|
||||
import { id } from 'date-fns/locale';
|
||||
import { useCallback } from 'react';
|
||||
import { toast } from 'sonner';
|
||||
import { usePrinter } from '@/hooks/use-printer';
|
||||
import { EscPosEncoder } from '@/lib/esc-pos-encoder';
|
||||
import type { Order } from '@/types/order';
|
||||
|
||||
export function useOrderPrint() {
|
||||
const {
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import { Head, Link } from '@inertiajs/react';
|
||||
import { Plus, Trash2 } from 'lucide-react';
|
||||
import { DataTable } from '@/components/data-table';
|
||||
import { DeleteConfirmation } from '@/components/modal/delete-confirmation';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
import { Head, Link } from '@inertiajs/react';
|
||||
import { Plus, Trash2 } from 'lucide-react';
|
||||
|
||||
import * as orderRoutes from '@/routes/order';
|
||||
import type { Order } from '@/types/order';
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
import { Link } from '@inertiajs/react';
|
||||
import type { ColumnDef } from '@tanstack/react-table';
|
||||
import { format } from 'date-fns';
|
||||
import { id } from 'date-fns/locale';
|
||||
import { Pencil, Printer, Trash2 } from 'lucide-react';
|
||||
import { DataTableColumnHeader } from '@/components/data-table-column-header';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
|
||||
import * as orderRoutes from '@/routes/order';
|
||||
import type { Order } from '@/types/order';
|
||||
import { Link } from '@inertiajs/react';
|
||||
import type { ColumnDef } from '@tanstack/react-table';
|
||||
import { format } from 'date-fns';
|
||||
import { id } from 'date-fns/locale';
|
||||
import { Pencil, Printer, Trash2 } from 'lucide-react';
|
||||
|
||||
interface ColumnProps {
|
||||
onDelete: (order: Order) => void;
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import { Bluetooth, Printer, Unplug, Usb } from 'lucide-react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import {
|
||||
DropdownMenu,
|
||||
@ -12,7 +13,6 @@ import {
|
||||
DropdownMenuSubTrigger,
|
||||
DropdownMenuTrigger,
|
||||
} from "@/components/ui/dropdown-menu";
|
||||
import { Bluetooth, Printer, Unplug, Usb } from 'lucide-react';
|
||||
|
||||
interface PrinterSettingsProps {
|
||||
isConnected: boolean;
|
||||
|
||||
@ -19,8 +19,6 @@ import { Field, FieldError } from "@/components/ui/field";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
|
||||
import type { Product, ProductPrice } from '@/types';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { ScrollArea } from '@/components/ui/scroll-area';
|
||||
import {
|
||||
Select,
|
||||
@ -35,7 +33,9 @@ import {
|
||||
SheetTrigger,
|
||||
SheetClose,
|
||||
} from "@/components/ui/sheet";
|
||||
import { cn } from '@/lib/utils';
|
||||
import purchaseRoutes from '@/routes/purchase';
|
||||
import type { Product, ProductPrice } from '@/types';
|
||||
|
||||
type CartItem = { product_id: number; quantity: number; unit_price: number; product: Product };
|
||||
|
||||
|
||||
@ -19,8 +19,6 @@ import { Field, FieldError } from "@/components/ui/field";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
|
||||
import type { Product, ProductPrice, Purchase } from '@/types';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { ScrollArea } from '@/components/ui/scroll-area';
|
||||
import {
|
||||
Select,
|
||||
@ -35,7 +33,9 @@ import {
|
||||
SheetTrigger,
|
||||
SheetClose,
|
||||
} from "@/components/ui/sheet";
|
||||
import { cn } from '@/lib/utils';
|
||||
import purchaseRoutes from '@/routes/purchase';
|
||||
import type { Product, ProductPrice, Purchase } from '@/types';
|
||||
|
||||
type CartItem = { product_id: number; quantity: number; unit_price: number; product: Product };
|
||||
|
||||
|
||||
@ -3,9 +3,8 @@ import { Plus, Trash2 } from 'lucide-react';
|
||||
import { DataTable } from '@/components/data-table';
|
||||
|
||||
import { DeleteConfirmation } from '@/components/modal/delete-confirmation';
|
||||
import {
|
||||
AlertDialogMedia,
|
||||
} from "@/components/ui/alert-dialog"
|
||||
|
||||
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
import { formatDate } from '@/lib/formatters';
|
||||
|
||||
@ -19,11 +19,11 @@ import {
|
||||
useComboboxAnchor,
|
||||
} from "@/components/ui/combobox"
|
||||
import { Field, FieldError } from "@/components/ui/field"
|
||||
import { Category } from '@/types/category';
|
||||
import { Input } from "@/components/ui/input"
|
||||
import { Label } from "@/components/ui/label"
|
||||
import productRoutes from '@/routes/product';
|
||||
import type { Product, ProductPrice } from '@/types';
|
||||
import type { Category } from '@/types/category';
|
||||
|
||||
interface ExistingImage {
|
||||
kind: 'existing';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user