Skip to content

Send Quotation Modal

Dialog for sending a ManpowerHub quotation by email — multi-email recipient/CC chip input, subject, and message body with default template.

Open in
pnpm dlx shadcn@latest add @woxcn/manpowerhub-send-quotation-modal

Install the ManpowerHub theme first, then add the block:

npx shadcn@latest add https://woxcn-registry.woxware.io/r/manpowerhub-send-quotation-modal.json

This installs the send quotation modal at components/ui/manpowerhub-send-quotation-modal.tsx.

import { useState } from "react";
import { SendQuotationModal } from "@/components/ui/manpowerhub-send-quotation-modal";
import { Button } from "@/components/ui/button";
export function QuotationActions({ quotation }) {
const [open, setOpen] = useState(false);
return (
<>
<Button onClick={() => setOpen(true)}>Send quotation</Button>
<SendQuotationModal
open={open}
onOpenChange={setOpen}
quotationNumber={quotation.quotationNumber}
initialSubject={`Quotation ${quotation.quotationNumber} — ${quotation.proposalSubject}`}
onSend={async ({ recipients, cc, subject, body }) => {
await api.quotations.send(quotation.id, { recipients, cc, subject, body });
setOpen(false);
}}
/>
</>
);
}

Recipients and CC fields accept multiple emails entered by pressing Enter, comma, or space. Invalid addresses are shown in red. Clicking an email chip’s × removes it.

  • open: controls dialog visibility.
  • onOpenChange(open): called when the dialog open state changes.
  • quotationNumber: optional — shown in title and used to pre-fill the default subject.
  • initialSubject: optional override for the pre-filled subject line.
  • initialBody: optional override for the default message body template.
  • onSend(values): called with { recipients, cc, subject, body } after validation passes.
interface SendQuotationValues {
recipients: string[];
cc: string[];
subject: string;
body: string;
}