Compare commits
No commits in common. "cdd32c56db14b8f28d3c661fa4d14a9640e24211" and "169de55b0a36fbe5d99cf2f0c0bbb2c766122b87" have entirely different histories.
cdd32c56db
...
169de55b0a
@ -2,7 +2,12 @@ import { showErrorToast } from "@repo/rdx-ui/helpers";
|
||||
import * as React from "react";
|
||||
|
||||
import type { ProformaSummaryData } from "../../types";
|
||||
import { useChangeProformaStatus } from "../hooks/use-change-status";
|
||||
import { useChangeProformaStatus } from "../hooks/use-change-proforma-status";
|
||||
|
||||
type ProformasType = {
|
||||
id: string;
|
||||
status: string;
|
||||
}[];
|
||||
|
||||
interface ChangeStatusDialogState {
|
||||
open: boolean;
|
||||
@ -44,7 +49,7 @@ export function useChangeStatusDialogController() {
|
||||
setState((s) => ({ ...s, loading: true }));
|
||||
|
||||
for (const proforma of state.proformas) {
|
||||
await changeStatus(proforma.id, state.targetStatus, {
|
||||
await changeStatus(proforma.id.toString(), state.targetStatus, {
|
||||
onError: (err: unknown) => {
|
||||
const error = err as Error;
|
||||
showErrorToast("Error cambiando estado", error.message);
|
||||
|
||||
@ -1 +1 @@
|
||||
export * from "./use-change-status";
|
||||
export * from "./use-change-proforma-status";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user