feat: add logo field to settings schema and update settings client to handle file uploads
feat: integrate dialog close context in vendor select field and CRUD dialog components feat: enhance vendor general info to format status using utility function feat: implement form dialog context for managing dialog close actions feat: add async select field dialog close context for better form handling fix: update form mutation hook to close dialog on successful submission feat: extend document print types to include expense and credit note feat: add settings update payload type to include logo and other fields feat: create employee attendance and work history pages with resource management feat: implement payment made and received detail pages with actions feat: add quick shortcuts component for easy navigation in the dashboard feat: create actions for payment made and received with print and delete options feat: implement dialog close context for better dialog management feat: add error parsing utility for improved error handling in API responses
This commit is contained in:
@@ -10,6 +10,7 @@ import { Field, FieldLabel, FieldError, FieldDescription } from "@/shared/compon
|
||||
import { Button } from "@/shared/components/ui/button"
|
||||
import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/shared/components/ui/dialog"
|
||||
import { ScrollArea } from "@/shared/components/ui/scroll-area"
|
||||
import { DialogCloseContext } from "@/shared/hooks/use-dialog-close"
|
||||
import {
|
||||
Combobox,
|
||||
ComboboxInput,
|
||||
@@ -228,7 +229,9 @@ export function RhfVendorSelectField<
|
||||
<DialogTitle className="text-2xl font-bold">Add Vendor</DialogTitle>
|
||||
</DialogHeader>
|
||||
<ScrollArea className="max-h-[80vh] px-4">
|
||||
<VendorForm onSuccess={handleCreateSuccess} />
|
||||
<DialogCloseContext.Provider value={() => setIsCreateOpen(false)}>
|
||||
<VendorForm onSuccess={handleCreateSuccess} />
|
||||
</DialogCloseContext.Provider>
|
||||
</ScrollArea>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
|
||||
+3
-2
@@ -16,6 +16,7 @@ import {
|
||||
import { Badge } from "@/shared/components/ui/badge"
|
||||
import { Separator } from "@/shared/components/ui/separator"
|
||||
import { Money } from "@/shared/components/money"
|
||||
import { formatEnum } from "@/shared/utils/formatters"
|
||||
|
||||
type VendorData = {
|
||||
id?: number
|
||||
@@ -82,8 +83,8 @@ export function VendorGeneralInfo({ vendor }: VendorGeneralInfoProps) {
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
<Badge variant="secondary">{vendor.company_name || fullName || "Unknown vendor"}</Badge>
|
||||
{vendor.status && (
|
||||
<Badge variant={vendor.status === "active" ? "default" : "outline"} className="capitalize">
|
||||
{vendor.status}
|
||||
<Badge variant={vendor.status === "active" ? "default" : "outline"}>
|
||||
{formatEnum(vendor.status)}
|
||||
</Badge>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user