ui/formatMoney.tsx
+ const total = useMemo(() => sum(items), [items]);
- import { format } from "../lib/legacy-format";
+ "refund.title": "Refund this order",
types/ConfirmModal.css
+ export function formatAmount(value: number) {
+ <Button variant="ghost" onClick={close}>Cancel</Button>
+ status: "pending",
+ logger.info("refund.requested", { orderId });
workers/customer.ts
+ import { format } from "@/lib/format";
- "refund.title": "Issue refund",
+ padding: var(--space-3) var(--space-4);
}
+ const total = useMemo(() => sum(items), [items]);
emails/currency.md
- <button className="btn btn-link" onClick={close}>
+ const reason = form.watch("reason");
- console.log("refund", orderId);
+ it("shows the refund reason", async () => {
+ export function formatAmount(value: number) {
+ <Button variant="ghost" onClick={close}>Cancel</Button>
components/orders/useCapture.json
if (!order) throw new NotFoundError(id);
});
+ await queue.add("email.refund", { orderId });
lib/RefundToast.ts
- padding: 12px 16px;
+ type RefundState = "idle" | "submitting" | "done";
expect(screen.getByRole("dialog")).toBeVisible();
+ if (value == null) return "";
utils/OrderTimeline.spec.ts
+ logger.info("refund.requested", { orderId });
- // TODO: tidy this up
return <Money value={amount} currency={currency} />;
const order = await orders.retrieve(id);
if (!order) throw new NotFoundError(id);
api/invoice.tsx
}
+ const total = useMemo(() => sum(items), [items]);
- import { format } from "../lib/legacy-format";
+ "refund.title": "Refund this order",
- padding: 12px 16px;
+ type RefundState = "idle" | "submitting" | "done";
test/OrderSummary.tsx
+ it("shows the refund reason", async () => {
+ export function formatAmount(value: number) {
+ <Button variant="ghost" onClick={close}>Cancel</Button>
admin/pages/auditLog.css
- const total = items.reduce((a, b) => a + b.price, 0);
+ import { format } from "@/lib/format";
- "refund.title": "Issue refund",
+ padding: var(--space-3) var(--space-4);
i18n/shipping.ts
+ if (value == null) return "";
- <button className="btn btn-link" onClick={close}>
+ const reason = form.watch("reason");
- console.log("refund", orderId);
+ it("shows the refund reason", async () => {
server/routes/orders.md
const order = await orders.retrieve(id);
if (!order) throw new NotFoundError(id);
});
+ await queue.add("email.refund", { orderId });
- const total = items.reduce((a, b) => a + b.price, 0);
+ import { format } from "@/lib/format";
store/RefundHistory.json
+ "refund.title": "Refund this order",
- padding: 12px 16px;
+ type RefundState = "idle" | "submitting" | "done";
components/checkout/notifications.ts
+ status: "pending",
+ logger.info("refund.requested", { orderId });
- // TODO: tidy this up
return <Money value={amount} currency={currency} />;
hooks/payment.spec.ts
+ padding: var(--space-3) var(--space-4);
}
+ const total = useMemo(() => sum(items), [items]);
- import { format } from "../lib/legacy-format";
+ "refund.title": "Refund this order",
styles/OrderActions.tsx
- console.log("refund", orderId);
+ it("shows the refund reason", async () => {
+ export function formatAmount(value: number) {
+ <Button variant="ghost" onClick={close}>Cancel</Button>
+ status: "pending",
+ logger.info("refund.requested", { orderId });
ui/reasons.tsx
+ await queue.add("email.refund", { orderId });
- const total = items.reduce((a, b) => a + b.price, 0);
+ import { format } from "@/lib/format";
types/StatusBadge.css
expect(screen.getByRole("dialog")).toBeVisible();
+ if (value == null) return "";
- <button className="btn btn-link" onClick={close}>
+ const reason = form.watch("reason");
workers/ledger.ts
return <Money value={amount} currency={currency} />;
const order = await orders.retrieve(id);
if (!order) throw new NotFoundError(id);
});
+ await queue.add("email.refund", { orderId });
emails/useRefund.md
- import { format } from "../lib/legacy-format";
+ "refund.title": "Refund this order",
- padding: 12px 16px;
+ type RefundState = "idle" | "submitting" | "done";
expect(screen.getByRole("dialog")).toBeVisible();
+ if (value == null) return "";
components/orders/featureFlags.json
+ <Button variant="ghost" onClick={close}>Cancel</Button>
+ status: "pending",
+ logger.info("refund.requested", { orderId });
lib/tax.ts
- "refund.title": "Issue refund",
+ padding: var(--space-3) var(--space-4);
}
+ const total = useMemo(() => sum(items), [items]);
utils/refund.spec.ts
+ const reason = form.watch("reason");
- console.log("refund", orderId);
+ it("shows the refund reason", async () => {
+ export function formatAmount(value: number) {
+ <Button variant="ghost" onClick={close}>Cancel</Button>
api/Money.tsx
});
+ await queue.add("email.refund", { orderId });
- const total = items.reduce((a, b) => a + b.price, 0);
+ import { format } from "@/lib/format";
- "refund.title": "Issue refund",
+ padding: var(--space-3) var(--space-4);
test/session.tsx
+ type RefundState = "idle" | "submitting" | "done";
expect(screen.getByRole("dialog")).toBeVisible();
+ if (value == null) return "";
admin/pages/RefundForm.css
- // TODO: tidy this up
return <Money value={amount} currency={currency} />;
const order = await orders.retrieve(id);
if (!order) throw new NotFoundError(id);
i18n/permissions.ts
+ const total = useMemo(() => sum(items), [items]);
- import { format } from "../lib/legacy-format";
+ "refund.title": "Refund this order",
- padding: 12px 16px;
+ type RefundState = "idle" | "submitting" | "done";
server/routes/RefundDialog.md
+ export function formatAmount(value: number) {
+ <Button variant="ghost" onClick={close}>Cancel</Button>
+ status: "pending",
+ logger.info("refund.requested", { orderId });
- // TODO: tidy this up
return <Money value={amount} currency={currency} />;
store/webhooks.json
+ import { format } from "@/lib/format";
- "refund.title": "Issue refund",
+ padding: var(--space-3) var(--space-4);
components/checkout/cart.ts
- <button className="btn btn-link" onClick={close}>
+ const reason = form.watch("reason");
- console.log("refund", orderId);
+ it("shows the refund reason", async () => {
hooks/formatMoney.spec.ts
if (!order) throw new NotFoundError(id);
});
+ await queue.add("email.refund", { orderId });
- const total = items.reduce((a, b) => a + b.price, 0);
+ import { format } from "@/lib/format";
styles/ConfirmModal.tsx
- padding: 12px 16px;
+ type RefundState = "idle" | "submitting" | "done";
expect(screen.getByRole("dialog")).toBeVisible();
+ if (value == null) return "";
- <button className="btn btn-link" onClick={close}>
+ const reason = form.watch("reason");
ui/customer.tsx
+ logger.info("refund.requested", { orderId });
- // TODO: tidy this up
return <Money value={amount} currency={currency} />;
types/currency.css
}
+ const total = useMemo(() => sum(items), [items]);
- import { format } from "../lib/legacy-format";
+ "refund.title": "Refund this order",
workers/useCapture.ts
+ it("shows the refund reason", async () => {
+ export function formatAmount(value: number) {
+ <Button variant="ghost" onClick={close}>Cancel</Button>
+ status: "pending",
+ logger.info("refund.requested", { orderId });
emails/RefundToast.md
- const total = items.reduce((a, b) => a + b.price, 0);
+ import { format } from "@/lib/format";
- "refund.title": "Issue refund",
+ padding: var(--space-3) var(--space-4);
}
+ const total = useMemo(() => sum(items), [items]);
components/orders/OrderTimeline.json
+ if (value == null) return "";
- <button className="btn btn-link" onClick={close}>
+ const reason = form.watch("reason");
lib/invoice.ts
const order = await orders.retrieve(id);
if (!order) throw new NotFoundError(id);
});
+ await queue.add("email.refund", { orderId });
utils/OrderSummary.spec.ts
+ "refund.title": "Refund this order",
- padding: 12px 16px;
+ type RefundState = "idle" | "submitting" | "done";
expect(screen.getByRole("dialog")).toBeVisible();
+ if (value == null) return "";
api/auditLog.tsx
+ status: "pending",
+ logger.info("refund.requested", { orderId });
- // TODO: tidy this up
return <Money value={amount} currency={currency} />;
const order = await orders.retrieve(id);
if (!order) throw new NotFoundError(id);
test/shipping.tsx
+ padding: var(--space-3) var(--space-4);
}
+ const total = useMemo(() => sum(items), [items]);
admin/pages/orders.css
- console.log("refund", orderId);
+ it("shows the refund reason", async () => {
+ export function formatAmount(value: number) {
+ <Button variant="ghost" onClick={close}>Cancel</Button>
i18n/RefundHistory.ts
+ await queue.add("email.refund", { orderId });
- const total = items.reduce((a, b) => a + b.price, 0);
+ import { format } from "@/lib/format";
- "refund.title": "Issue refund",
+ padding: var(--space-3) var(--space-4);
server/routes/notifications.md
expect(screen.getByRole("dialog")).toBeVisible();
+ if (value == null) return "";
- <button className="btn btn-link" onClick={close}>
+ const reason = form.watch("reason");
- console.log("refund", orderId);
+ it("shows the refund reason", async () => {
store/payment.json
return <Money value={amount} currency={currency} />;
const order = await orders.retrieve(id);
if (!order) throw new NotFoundError(id);
components/checkout/OrderActions.ts
- import { format } from "../lib/legacy-format";
+ "refund.title": "Refund this order",
- padding: 12px 16px;
+ type RefundState = "idle" | "submitting" | "done";
hooks/reasons.spec.ts
+ <Button variant="ghost" onClick={close}>Cancel</Button>
+ status: "pending",
+ logger.info("refund.requested", { orderId });
- // TODO: tidy this up
return <Money value={amount} currency={currency} />;
styles/StatusBadge.tsx
- "refund.title": "Issue refund",
+ padding: var(--space-3) var(--space-4);
}
+ const total = useMemo(() => sum(items), [items]);
- import { format } from "../lib/legacy-format";
+ "refund.title": "Refund this order",
ui/ledger.tsx
+ const reason = form.watch("reason");
- console.log("refund", orderId);
+ it("shows the refund reason", async () => {
types/useRefund.css
});
+ await queue.add("email.refund", { orderId });
- const total = items.reduce((a, b) => a + b.price, 0);
+ import { format } from "@/lib/format";
workers/featureFlags.ts
+ type RefundState = "idle" | "submitting" | "done";
expect(screen.getByRole("dialog")).toBeVisible();
+ if (value == null) return "";
- <button className="btn btn-link" onClick={close}>
+ const reason = form.watch("reason");
emails/tax.md
- // TODO: tidy this up
return <Money value={amount} currency={currency} />;
const order = await orders.retrieve(id);
if (!order) throw new NotFoundError(id);
});
+ await queue.add("email.refund", { orderId });
components/orders/refund.json
+ const total = useMemo(() => sum(items), [items]);
- import { format } from "../lib/legacy-format";
+ "refund.title": "Refund this order",
lib/Money.ts
+ export function formatAmount(value: number) {
+ <Button variant="ghost" onClick={close}>Cancel</Button>
+ status: "pending",
+ logger.info("refund.requested", { orderId });
utils/session.spec.ts
+ import { format } from "@/lib/format";
- "refund.title": "Issue refund",
+ padding: var(--space-3) var(--space-4);
}
+ const total = useMemo(() => sum(items), [items]);
api/RefundForm.tsx
- <button className="btn btn-link" onClick={close}>
+ const reason = form.watch("reason");
- console.log("refund", orderId);
+ it("shows the refund reason", async () => {
+ export function formatAmount(value: number) {
+ <Button variant="ghost" onClick={close}>Cancel</Button>
test/permissions.tsx
if (!order) throw new NotFoundError(id);
});
+ await queue.add("email.refund", { orderId });
admin/pages/RefundDialog.css
- padding: 12px 16px;
+ type RefundState = "idle" | "submitting" | "done";
expect(screen.getByRole("dialog")).toBeVisible();
+ if (value == null) return "";
i18n/webhooks.ts
+ logger.info("refund.requested", { orderId });
- // TODO: tidy this up
return <Money value={amount} currency={currency} />;
const order = await orders.retrieve(id);
if (!order) throw new NotFoundError(id);
server/routes/cart.md
}
+ const total = useMemo(() => sum(items), [items]);
- import { format } from "../lib/legacy-format";
+ "refund.title": "Refund this order",
- padding: 12px 16px;
+ type RefundState = "idle" | "submitting" | "done";
store/formatMoney.json
+ it("shows the refund reason", async () => {
+ export function formatAmount(value: number) {
+ <Button variant="ghost" onClick={close}>Cancel</Button>
components/checkout/ConfirmModal.ts
- const total = items.reduce((a, b) => a + b.price, 0);
+ import { format } from "@/lib/format";
- "refund.title": "Issue refund",
+ padding: var(--space-3) var(--space-4);
hooks/customer.spec.ts
+ if (value == null) return "";
- <button className="btn btn-link" onClick={close}>
+ const reason = form.watch("reason");
- console.log("refund", orderId);
+ it("shows the refund reason", async () => {
styles/currency.tsx
const order = await orders.retrieve(id);
if (!order) throw new NotFoundError(id);
});
+ await queue.add("email.refund", { orderId });
- const total = items.reduce((a, b) => a + b.price, 0);
+ import { format } from "@/lib/format";
ui/useCapture.tsx
+ "refund.title": "Refund this order",
- padding: 12px 16px;
+ type RefundState = "idle" | "submitting" | "done";
types/RefundToast.css
+ status: "pending",
+ logger.info("refund.requested", { orderId });
- // TODO: tidy this up
return <Money value={amount} currency={currency} />;
workers/OrderTimeline.ts
+ padding: var(--space-3) var(--space-4);
}
+ const total = useMemo(() => sum(items), [items]);
- import { format } from "../lib/legacy-format";
+ "refund.title": "Refund this order",
emails/invoice.md
- console.log("refund", orderId);
+ it("shows the refund reason", async () => {
+ export function formatAmount(value: number) {
+ <Button variant="ghost" onClick={close}>Cancel</Button>
+ status: "pending",
+ logger.info("refund.requested", { orderId });
components/orders/OrderSummary.json
+ await queue.add("email.refund", { orderId });
- const total = items.reduce((a, b) => a + b.price, 0);
+ import { format } from "@/lib/format";
lib/auditLog.ts
expect(screen.getByRole("dialog")).toBeVisible();
+ if (value == null) return "";
- <button className="btn btn-link" onClick={close}>
+ const reason = form.watch("reason");
utils/shipping.spec.ts
return <Money value={amount} currency={currency} />;
const order = await orders.retrieve(id);
if (!order) throw new NotFoundError(id);
});
+ await queue.add("email.refund", { orderId });
api/orders.tsx
- import { format } from "../lib/legacy-format";
+ "refund.title": "Refund this order",
- padding: 12px 16px;
+ type RefundState = "idle" | "submitting" | "done";
expect(screen.getByRole("dialog")).toBeVisible();
+ if (value == null) return "";
test/RefundHistory.tsx
+ <Button variant="ghost" onClick={close}>Cancel</Button>
+ status: "pending",
+ logger.info("refund.requested", { orderId });
admin/pages/notifications.css
- "refund.title": "Issue refund",
+ padding: var(--space-3) var(--space-4);
}
+ const total = useMemo(() => sum(items), [items]);
i18n/payment.ts
+ const reason = form.watch("reason");
- console.log("refund", orderId);
+ it("shows the refund reason", async () => {
+ export function formatAmount(value: number) {
+ <Button variant="ghost" onClick={close}>Cancel</Button>
server/routes/OrderActions.md
});
+ await queue.add("email.refund", { orderId });
- const total = items.reduce((a, b) => a + b.price, 0);
+ import { format } from "@/lib/format";
- "refund.title": "Issue refund",
+ padding: var(--space-3) var(--space-4);
store/reasons.json
+ type RefundState = "idle" | "submitting" | "done";
expect(screen.getByRole("dialog")).toBeVisible();
+ if (value == null) return "";
components/checkout/StatusBadge.ts
- // TODO: tidy this up
return <Money value={amount} currency={currency} />;
const order = await orders.retrieve(id);
if (!order) throw new NotFoundError(id);
hooks/ledger.spec.ts
+ const total = useMemo(() => sum(items), [items]);
- import { format } from "../lib/legacy-format";
+ "refund.title": "Refund this order",
- padding: 12px 16px;
+ type RefundState = "idle" | "submitting" | "done";
styles/useRefund.tsx
+ export function formatAmount(value: number) {
+ <Button variant="ghost" onClick={close}>Cancel</Button>
+ status: "pending",
+ logger.info("refund.requested", { orderId });
- // TODO: tidy this up
return <Money value={amount} currency={currency} />;
ui/featureFlags.tsx
+ import { format } from "@/lib/format";
- "refund.title": "Issue refund",
+ padding: var(--space-3) var(--space-4);
types/tax.css
- <button className="btn btn-link" onClick={close}>
+ const reason = form.watch("reason");
- console.log("refund", orderId);
+ it("shows the refund reason", async () => {
workers/refund.ts
if (!order) throw new NotFoundError(id);
});
+ await queue.add("email.refund", { orderId });
- const total = items.reduce((a, b) => a + b.price, 0);
+ import { format } from "@/lib/format";
emails/Money.md
- padding: 12px 16px;
+ type RefundState = "idle" | "submitting" | "done";
expect(screen.getByRole("dialog")).toBeVisible();
+ if (value == null) return "";
- <button className="btn btn-link" onClick={close}>
+ const reason = form.watch("reason");
components/orders/session.json
+ logger.info("refund.requested", { orderId });
- // TODO: tidy this up
return <Money value={amount} currency={currency} />;
lib/RefundForm.ts
}
+ const total = useMemo(() => sum(items), [items]);
- import { format } from "../lib/legacy-format";
+ "refund.title": "Refund this order",
utils/permissions.spec.ts
+ it("shows the refund reason", async () => {
+ export function formatAmount(value: number) {
+ <Button variant="ghost" onClick={close}>Cancel</Button>
+ status: "pending",
+ logger.info("refund.requested", { orderId });
api/RefundDialog.tsx
- const total = items.reduce((a, b) => a + b.price, 0);
+ import { format } from "@/lib/format";
- "refund.title": "Issue refund",
+ padding: var(--space-3) var(--space-4);
}
+ const total = useMemo(() => sum(items), [items]);
test/webhooks.tsx
+ if (value == null) return "";
- <button className="btn btn-link" onClick={close}>
+ const reason = form.watch("reason");
admin/pages/cart.css
const order = await orders.retrieve(id);
if (!order) throw new NotFoundError(id);
});
+ await queue.add("email.refund", { orderId });
i18n/formatMoney.ts
+ "refund.title": "Refund this order",
- padding: 12px 16px;
+ type RefundState = "idle" | "submitting" | "done";
expect(screen.getByRole("dialog")).toBeVisible();
+ if (value == null) return "";
server/routes/ConfirmModal.md
+ status: "pending",
+ logger.info("refund.requested", { orderId });
- // TODO: tidy this up
return <Money value={amount} currency={currency} />;
const order = await orders.retrieve(id);
if (!order) throw new NotFoundError(id);
store/customer.json
+ padding: var(--space-3) var(--space-4);
}
+ const total = useMemo(() => sum(items), [items]);
components/checkout/currency.ts
- console.log("refund", orderId);
+ it("shows the refund reason", async () => {
+ export function formatAmount(value: number) {
+ <Button variant="ghost" onClick={close}>Cancel</Button>
hooks/useCapture.spec.ts
+ await queue.add("email.refund", { orderId });
- const total = items.reduce((a, b) => a + b.price, 0);
+ import { format } from "@/lib/format";
- "refund.title": "Issue refund",
+ padding: var(--space-3) var(--space-4);
styles/RefundToast.tsx
expect(screen.getByRole("dialog")).toBeVisible();
+ if (value == null) return "";
- <button className="btn btn-link" onClick={close}>
+ const reason = form.watch("reason");
- console.log("refund", orderId);
+ it("shows the refund reason", async () => {
ui/OrderTimeline.tsx
return <Money value={amount} currency={currency} />;
const order = await orders.retrieve(id);
if (!order) throw new NotFoundError(id);
types/invoice.css
- import { format } from "../lib/legacy-format";
+ "refund.title": "Refund this order",
- padding: 12px 16px;
+ type RefundState = "idle" | "submitting" | "done";
workers/OrderSummary.ts
+ <Button variant="ghost" onClick={close}>Cancel</Button>
+ status: "pending",
+ logger.info("refund.requested", { orderId });
- // TODO: tidy this up
return <Money value={amount} currency={currency} />;
emails/auditLog.md
- "refund.title": "Issue refund",
+ padding: var(--space-3) var(--space-4);
}
+ const total = useMemo(() => sum(items), [items]);
- import { format } from "../lib/legacy-format";
+ "refund.title": "Refund this order",
components/orders/shipping.json
+ const reason = form.watch("reason");
- console.log("refund", orderId);
+ it("shows the refund reason", async () => {
lib/orders.ts
});
+ await queue.add("email.refund", { orderId });
- const total = items.reduce((a, b) => a + b.price, 0);
payment/payment-module.ts
const amount = input.amount;
+ if (!amount) amount = captured
return this.recordRefund_(payment, amount);
ui/RefundDialog.tsx
const order = await orders.retrieve(id);
+ const reason = form.watch("reason");
}
return <Money value={amount} currency={currency} />;
ui/refund.tsx
+ padding: var(--space-3) var(--space-4);
- // TODO: tidy this up
+ if (value == null) return "";
- "refund.title": "Issue refund",
ui/StatusBadge.tsx
expect(screen.getByRole("dialog")).toBeVisible();
+ import { format } from "@/lib/format";
+ status: "pending",