mirror of
https://github.com/soconnor0919/beenvoice.git
synced 2026-02-05 00:06:36 -05:00
fix: resolve lint errors in modified files
- Remove unused imports from invoice-form.tsx, sidebar.tsx, dashboard-shell.tsx - Remove unused imports from dashboard.ts and calendar.tsx - Fix unused parameter in invoice-calendar-view.tsx with underscore prefix - Fix type-only import for DayButton in calendar.tsx - All typecheck errors resolved - Remaining lint errors are in unmodified files (pre-existing)
This commit is contained in:
@@ -14,10 +14,9 @@ import { Button } from "~/components/ui/button";
|
|||||||
import { Input } from "~/components/ui/input";
|
import { Input } from "~/components/ui/input";
|
||||||
import { Label } from "~/components/ui/label";
|
import { Label } from "~/components/ui/label";
|
||||||
import { NumberInput } from "~/components/ui/number-input";
|
import { NumberInput } from "~/components/ui/number-input";
|
||||||
import { Plus, Trash2, Clock, DollarSign, Calendar as CalendarIcon, ChevronLeft, ChevronRight } from "lucide-react";
|
import { Plus, Trash2, Clock, Calendar as CalendarIcon, ChevronLeft, ChevronRight } from "lucide-react";
|
||||||
import { cn } from "~/lib/utils";
|
import { cn } from "~/lib/utils";
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "~/components/ui/card";
|
|
||||||
import { Tabs, TabsList, TabsTrigger } from "~/components/ui/tabs";
|
|
||||||
|
|
||||||
interface InvoiceItem {
|
interface InvoiceItem {
|
||||||
id: string;
|
id: string;
|
||||||
@@ -47,7 +46,7 @@ export function InvoiceCalendarView({
|
|||||||
onAddItem,
|
onAddItem,
|
||||||
onRemoveItem,
|
onRemoveItem,
|
||||||
className,
|
className,
|
||||||
defaultHourlyRate,
|
defaultHourlyRate: _defaultHourlyRate,
|
||||||
}: InvoiceCalendarViewProps) {
|
}: InvoiceCalendarViewProps) {
|
||||||
const [date, setDate] = React.useState<Date | undefined>(undefined); // Start unselected
|
const [date, setDate] = React.useState<Date | undefined>(undefined); // Start unselected
|
||||||
const [viewDate, setViewDate] = React.useState<Date>(new Date()); // Controls the view (month/week)
|
const [viewDate, setViewDate] = React.useState<Date>(new Date()); // Controls the view (month/week)
|
||||||
|
|||||||
@@ -4,11 +4,8 @@ import * as React from "react";
|
|||||||
import { useState, useEffect, useRef } from "react";
|
import { useState, useEffect, useRef } from "react";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { Button } from "~/components/ui/button";
|
import { Button } from "~/components/ui/button";
|
||||||
import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "~/components/ui/card";
|
import { Card, CardContent, CardHeader, CardTitle } from "~/components/ui/card";
|
||||||
import { Input } from "~/components/ui/input";
|
|
||||||
import { Label } from "~/components/ui/label";
|
import { Label } from "~/components/ui/label";
|
||||||
import { Textarea } from "~/components/ui/textarea";
|
|
||||||
import { Separator } from "~/components/ui/separator";
|
|
||||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "~/components/ui/tabs";
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "~/components/ui/tabs";
|
||||||
import {
|
import {
|
||||||
Select,
|
Select,
|
||||||
@@ -20,13 +17,11 @@ import {
|
|||||||
import { DatePicker } from "~/components/ui/date-picker";
|
import { DatePicker } from "~/components/ui/date-picker";
|
||||||
import { NumberInput } from "~/components/ui/number-input";
|
import { NumberInput } from "~/components/ui/number-input";
|
||||||
import { PageHeader } from "~/components/layout/page-header";
|
import { PageHeader } from "~/components/layout/page-header";
|
||||||
import { FloatingActionBar } from "~/components/layout/floating-action-bar";
|
|
||||||
import { InvoiceLineItems } from "./invoice-line-items";
|
import { InvoiceLineItems } from "./invoice-line-items";
|
||||||
import { InvoiceCalendarView } from "./invoice-calendar-view";
|
import { InvoiceCalendarView } from "./invoice-calendar-view";
|
||||||
import { api } from "~/trpc/react";
|
import { api } from "~/trpc/react";
|
||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
import { FileText, DollarSign, Check, Save, Clock, Trash2, Calendar as CalendarIcon, Tag, User, List } from "lucide-react";
|
import { Save, Calendar as CalendarIcon, Tag, User, List } from "lucide-react";
|
||||||
import { cn } from "~/lib/utils";
|
|
||||||
import {
|
import {
|
||||||
Dialog,
|
Dialog,
|
||||||
DialogContent,
|
DialogContent,
|
||||||
@@ -63,7 +58,6 @@ function InvoiceFormSkeleton() {
|
|||||||
|
|
||||||
export default function InvoiceForm({ invoiceId }: InvoiceFormProps) {
|
export default function InvoiceForm({ invoiceId }: InvoiceFormProps) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const utils = api.useUtils();
|
|
||||||
|
|
||||||
// State
|
// State
|
||||||
const [formData, setFormData] = useState<InvoiceFormData>({
|
const [formData, setFormData] = useState<InvoiceFormData>({
|
||||||
@@ -85,7 +79,6 @@ export default function InvoiceForm({ invoiceId }: InvoiceFormProps) {
|
|||||||
const [initialized, setInitialized] = useState(false);
|
const [initialized, setInitialized] = useState(false);
|
||||||
const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);
|
const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);
|
||||||
const [activeTab, setActiveTab] = useState("details");
|
const [activeTab, setActiveTab] = useState("details");
|
||||||
const firstItemEditedRef = useRef(false);
|
|
||||||
|
|
||||||
// Queries (Same as before)
|
// Queries (Same as before)
|
||||||
const { data: clients, isLoading: loadingClients } = api.clients.getAll.useQuery();
|
const { data: clients, isLoading: loadingClients } = api.clients.getAll.useQuery();
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { Menu } from "lucide-react";
|
|||||||
import { Logo } from "~/components/branding/logo";
|
import { Logo } from "~/components/branding/logo";
|
||||||
import { Button } from "~/components/ui/button";
|
import { Button } from "~/components/ui/button";
|
||||||
import { Sheet, SheetContent, SheetTrigger } from "~/components/ui/sheet";
|
import { Sheet, SheetContent, SheetTrigger } from "~/components/ui/sheet";
|
||||||
import { DashboardBreadcrumbs } from "~/components/navigation/dashboard-breadcrumbs";
|
|
||||||
|
|
||||||
function DashboardContent({ children }: { children: React.ReactNode }) {
|
function DashboardContent({ children }: { children: React.ReactNode }) {
|
||||||
const { isCollapsed } = useSidebar();
|
const { isCollapsed } = useSidebar();
|
||||||
|
|||||||
@@ -7,12 +7,8 @@ import { Skeleton } from "~/components/ui/skeleton";
|
|||||||
import { Button } from "~/components/ui/button";
|
import { Button } from "~/components/ui/button";
|
||||||
import {
|
import {
|
||||||
LogOut,
|
LogOut,
|
||||||
User,
|
|
||||||
ChevronLeft,
|
|
||||||
ChevronRight,
|
|
||||||
PanelLeftClose,
|
PanelLeftClose,
|
||||||
PanelLeftOpen,
|
PanelLeftOpen,
|
||||||
Settings
|
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import { navigationConfig } from "~/lib/navigation";
|
import { navigationConfig } from "~/lib/navigation";
|
||||||
import { useSidebar } from "./sidebar-provider";
|
import { useSidebar } from "./sidebar-provider";
|
||||||
@@ -65,7 +61,7 @@ export function Sidebar({ mobile, onClose }: SidebarProps) {
|
|||||||
|
|
||||||
{/* Navigation */}
|
{/* Navigation */}
|
||||||
<nav className={cn("flex flex-col px-2 gap-6 mt-4", collapsed && "items-center")}>
|
<nav className={cn("flex flex-col px-2 gap-6 mt-4", collapsed && "items-center")}>
|
||||||
{navigationConfig.map((section, sectionIndex) => (
|
{navigationConfig.map((section) => (
|
||||||
<div key={section.title}>
|
<div key={section.title}>
|
||||||
{!collapsed && (
|
{!collapsed && (
|
||||||
<div className="px-2 mb-2 text-xs font-semibold text-muted-foreground/60 tracking-wider uppercase">
|
<div className="px-2 mb-2 text-xs font-semibold text-muted-foreground/60 tracking-wider uppercase">
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
ChevronLeftIcon,
|
ChevronLeftIcon,
|
||||||
ChevronRightIcon,
|
ChevronRightIcon,
|
||||||
} from "lucide-react"
|
} from "lucide-react"
|
||||||
import { type DayButton, DayPicker, getDefaultClassNames } from "react-day-picker"
|
import { DayPicker, getDefaultClassNames, type DayButton } from "react-day-picker"
|
||||||
|
|
||||||
import { cn } from "~/lib/utils"
|
import { cn } from "~/lib/utils"
|
||||||
import { Button, buttonVariants } from "~/components/ui/button"
|
import { Button, buttonVariants } from "~/components/ui/button"
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { z } from "zod";
|
|
||||||
import { createTRPCRouter, protectedProcedure } from "~/server/api/trpc";
|
import { createTRPCRouter, protectedProcedure } from "~/server/api/trpc";
|
||||||
import { invoices, clients } from "~/server/db/schema";
|
import { invoices, clients } from "~/server/db/schema";
|
||||||
import { eq, and, desc, sql, gte, lt } from "drizzle-orm";
|
import { eq, desc } from "drizzle-orm";
|
||||||
|
|
||||||
export const dashboardRouter = createTRPCRouter({
|
export const dashboardRouter = createTRPCRouter({
|
||||||
getStats: protectedProcedure.query(async ({ ctx }) => {
|
getStats: protectedProcedure.query(async ({ ctx }) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user