import { DataTableProvider } from "@/lib/hooks"; import { Trans, useTranslation } from "react-i18next"; import { QuotesDataTable } from "./components"; import { HelpButton } from "@/components"; import { Button, Label, ScrollArea, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Tabs, TabsContent, TabsList, TabsTrigger, Toggle, } from "@/ui"; import { useToggle } from "@wojtekmaj/react-hooks"; import { EyeIcon, EyeOffIcon, PlusIcon } from "lucide-react"; import { useState } from "react"; import { useNavigate } from "react-router-dom"; export const QuotesList = () => { const { t } = useTranslation(); const navigate = useNavigate(); const [status, setStatus] = useState("all"); const [enabledPreview, toggleEnabledPreview] = useToggle(true); const quoteStatuses = [ { value: "all", label: t("quotes.list.tabs.all") }, { value: "draft", label: t("quotes.list.tabs.draft") }, { value: "ready", label: t("quotes.list.tabs.ready") }, { value: "delivered", label: t("quotes.list.tabs.delivered") }, { value: "accepted", label: t("quotes.list.tabs.accepted") }, { value: "rejected", label: t("quotes.list.tabs.rejected") }, { value: "archived", label: t("quotes.list.tabs.archived") }, ]; return ( navigate("/quotes/add")}> {t("quotes.create.title")} {quoteStatuses.map((s) => ( {s.label} ))} {t("quotes.list.tabs_title")} {quoteStatuses.map((s) => ( {s.label} ))} } /> {enabledPreview ? ( <> {t("common.disable_preview")} > ) : ( <> {t("common.enable_preview")} > )} {quoteStatuses.map((s) => ( ))} ); }; const HelpContent = () => { const { t } = useTranslation(); return {t("quotes.list.status_help.intro")} {t("quotes.list.status_help.possible")} {t("quotes.status.draft")}: {t("quotes.quote_status_editor.status.draft.description")} {t("quotes.status.ready")}: {t("quotes.quote_status_editor.status.ready.description")} {t("quotes.status.delivered")}: {t("quotes.quote_status_editor.status.delivered.description")} {t("quotes.status.accepted")}: {t("quotes.quote_status_editor.status.accepted.description")} {t("quotes.status.rejected")}: {t("quotes.quote_status_editor.status.rejected.description")} {t("quotes.status.archived")}: {t("quotes.quote_status_editor.status.archived.description")} {t("quotes.list.status_help.outro")} ; };
{t("quotes.list.status_help.intro")}
{t("quotes.list.status_help.possible")}
{t("quotes.list.status_help.outro")}