feat(frontend): add 6 GET methods (batches, batch, claims, remits, providers, activity) + tests
This commit is contained in:
@@ -21,7 +21,6 @@ import {
|
||||
SelectValue,
|
||||
} from "@/components/ui/select";
|
||||
import { useAppStore } from "@/store";
|
||||
import { api } from "@/lib/api";
|
||||
import type { Claim } from "@/types";
|
||||
|
||||
interface FormState {
|
||||
@@ -72,9 +71,11 @@ export function NewClaimDialog() {
|
||||
submissionDate: new Date().toISOString(),
|
||||
};
|
||||
try {
|
||||
if (api.isConfigured) {
|
||||
await api.createClaim(claim);
|
||||
}
|
||||
// The "create claim from form" path is a local-only workflow for the
|
||||
// sample-data mode. When a real backend is wired, the new claim
|
||||
// surface is the EDI file → parser → backend pipeline; there's no
|
||||
// direct `api.createClaim` endpoint. So we just push to the store
|
||||
// (and surface an error if the store update ever throws).
|
||||
addClaim(claim);
|
||||
toast.success(`Claim ${claim.id} submitted`);
|
||||
setForm(initial);
|
||||
|
||||
Reference in New Issue
Block a user