@burdenoff/microfe-healthybowl 2026.902.21 → 2026.902.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/healthybowl/hooks/useHealthyBowlData.js +0 -15
- package/dist/healthybowl/hooks/useHealthyBowlData.js.map +1 -1
- package/dist/healthybowl/offline/graphql.js.map +1 -1
- package/dist/healthybowl/offline/syncEngine.js +1 -2
- package/dist/healthybowl/offline/syncEngine.js.map +1 -1
- package/dist/healthybowl/offline/types.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js +188 -228
- package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/SchemeDetailsPage.js +191 -261
- package/dist/healthybowl/pages/government-schemes/SchemeDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/network/ExpertsPage.js +419 -520
- package/dist/healthybowl/pages/network/ExpertsPage.js.map +1 -1
- package/package.json +1 -1
- package/dist/healthybowl/hooks/useConsultationPayments.js +0 -59
- package/dist/healthybowl/hooks/useConsultationPayments.js.map +0 -1
- package/dist/healthybowl/pages/government-schemes/schemeApplicationTransitions.js +0 -49
- package/dist/healthybowl/pages/government-schemes/schemeApplicationTransitions.js.map +0 -1
- package/dist/healthybowl/pages/government-schemes/schemeDocumentSlots.js +0 -48
- package/dist/healthybowl/pages/government-schemes/schemeDocumentSlots.js.map +0 -1
- package/dist/healthybowl/pages/government-schemes/useSchemeApplicationTransition.js +0 -54
- package/dist/healthybowl/pages/government-schemes/useSchemeApplicationTransition.js.map +0 -1
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { useHealthyBowl as e } from "../../context/HealthyBowlContext.js";
|
|
2
|
-
import { useHealthyBowlData as t } from "../../hooks/useHealthyBowlData.js";
|
|
3
|
-
import { useCallback as n, useState as r } from "react";
|
|
4
|
-
import { gql as i } from "@apollo/client";
|
|
5
|
-
import { useMutation as a } from "@apollo/client/react";
|
|
6
|
-
//#region src/healthybowl/pages/government-schemes/useSchemeApplicationTransition.ts
|
|
7
|
-
var o = i`
|
|
8
|
-
mutation UpdateHealthyBowlSchemeApplicationStatus($input: UpdateHealthyBowlSchemeApplicationStatusInput!) {
|
|
9
|
-
updateHealthyBowlSchemeApplicationStatus(input: $input) {
|
|
10
|
-
id
|
|
11
|
-
status
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
`;
|
|
15
|
-
function s(e, t) {
|
|
16
|
-
if (typeof e == "object" && e) {
|
|
17
|
-
let t = e;
|
|
18
|
-
if (Array.isArray(t.errors) && t.errors.length > 0) {
|
|
19
|
-
let e = t.errors[0], n = e?.extensions?.userMessage;
|
|
20
|
-
if (typeof n == "string" && n.length > 0) return n;
|
|
21
|
-
if (typeof e?.message == "string" && e.message.length > 0) return e.message;
|
|
22
|
-
}
|
|
23
|
-
if (typeof t.message == "string" && t.message.length > 0) return t.message;
|
|
24
|
-
}
|
|
25
|
-
return t;
|
|
26
|
-
}
|
|
27
|
-
function c() {
|
|
28
|
-
let { workspaceId: i } = e(), { refetch: c } = t(), [l] = a(o), [u, d] = r(null);
|
|
29
|
-
return {
|
|
30
|
-
transition: n(async (e, t, n) => {
|
|
31
|
-
d(e);
|
|
32
|
-
try {
|
|
33
|
-
await l({ variables: { input: {
|
|
34
|
-
id: e,
|
|
35
|
-
status: t,
|
|
36
|
-
context: { workspaceId: i }
|
|
37
|
-
} } }), await c(), n?.onSuccess?.();
|
|
38
|
-
} catch (e) {
|
|
39
|
-
n?.onError?.(s(e, "The application could not be updated."));
|
|
40
|
-
} finally {
|
|
41
|
-
d(null);
|
|
42
|
-
}
|
|
43
|
-
}, [
|
|
44
|
-
l,
|
|
45
|
-
i,
|
|
46
|
-
c
|
|
47
|
-
]),
|
|
48
|
-
pendingId: u
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
//#endregion
|
|
52
|
-
export { c as useSchemeApplicationTransition };
|
|
53
|
-
|
|
54
|
-
//# sourceMappingURL=useSchemeApplicationTransition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useSchemeApplicationTransition.js","names":[],"sources":["../../../../src/healthybowl/pages/government-schemes/useSchemeApplicationTransition.ts"],"sourcesContent":["/**\n * Move a government scheme application along its lifecycle (BOFF-6037).\n *\n * Declared as an inline `gql` document rather than an entry under `src/operations/`: the mutation is\n * newer than the committed `graphql/wspace.graphql` snapshot that codegen validates against, and\n * this is the escape hatch the repo uses for exactly that case (~44 of 52 hooks do the same).\n *\n * @module healthybowl\n */\nimport { useCallback, useState } from 'react';\nimport { gql } from '@apollo/client';\nimport { useMutation } from '@apollo/client/react';\nimport { useHealthyBowl } from '../../context/HealthyBowlContext';\nimport { useHealthyBowlData } from '../../hooks/useHealthyBowlData';\nimport type { SchemeApplicationStatus } from './schemeApplicationTransitions';\n\nconst UPDATE_SCHEME_APPLICATION_STATUS = gql`\n mutation UpdateHealthyBowlSchemeApplicationStatus($input: UpdateHealthyBowlSchemeApplicationStatusInput!) {\n updateHealthyBowlSchemeApplicationStatus(input: $input) {\n id\n status\n }\n }\n`;\n\ninterface TransitionCallbacks {\n onSuccess?: () => void;\n onError?: (message: string) => void;\n}\n\n/**\n * Read the operator-facing message off a rejected mutation.\n *\n * Apollo Client v4 rejects with `CombinedGraphQLErrors`, which has no v3 `graphQLErrors` property,\n * and the server puts the readable text in `extensions.userMessage` — which for this mutation is\n * the sentence naming which transitions ARE allowed. `err.message` alone would render Apollo's\n * aggregate wording and throw that away.\n */\nfunction readErrorMessage(err: unknown, fallback: string): string {\n if (err !== null && typeof err === 'object') {\n const shaped = err as { errors?: unknown; message?: unknown };\n if (Array.isArray(shaped.errors) && shaped.errors.length > 0) {\n const first = shaped.errors[0] as { message?: unknown; extensions?: { userMessage?: unknown } | null };\n const userMessage = first?.extensions?.userMessage;\n if (typeof userMessage === 'string' && userMessage.length > 0) return userMessage;\n if (typeof first?.message === 'string' && first.message.length > 0) return first.message;\n }\n if (typeof shaped.message === 'string' && shaped.message.length > 0) return shaped.message;\n }\n return fallback;\n}\n\nexport function useSchemeApplicationTransition(): {\n transition: (id: string, status: SchemeApplicationStatus, callbacks?: TransitionCallbacks) => Promise<void>;\n pendingId: string | null;\n} {\n const { workspaceId } = useHealthyBowl();\n const { refetch } = useHealthyBowlData();\n const [mutate] = useMutation(UPDATE_SCHEME_APPLICATION_STATUS);\n const [pendingId, setPendingId] = useState<string | null>(null);\n\n const transition = useCallback(\n async (id: string, status: SchemeApplicationStatus, callbacks?: TransitionCallbacks) => {\n setPendingId(id);\n try {\n await mutate({ variables: { input: { id, status, context: { workspaceId } } } });\n // fe-libs clears its read cache on a successful mutation, so the list is refetched\n // explicitly rather than trusted to update itself.\n await refetch();\n callbacks?.onSuccess?.();\n } catch (err) {\n callbacks?.onError?.(readErrorMessage(err, 'The application could not be updated.'));\n } finally {\n setPendingId(null);\n }\n },\n [mutate, workspaceId, refetch]\n );\n\n return { transition, pendingId };\n}\n"],"mappings":";;;;;;AAgBA,IAAM,IAAmC,CAAG;;;;;;;;AAsB5C,SAAS,EAAiB,GAAc,GAA0B;CAChE,IAAoB,OAAO,KAAQ,YAA/B,GAAyC;EAC3C,IAAM,IAAS;EACf,IAAI,MAAM,QAAQ,EAAO,MAAM,KAAK,EAAO,OAAO,SAAS,GAAG;GAC5D,IAAM,IAAQ,EAAO,OAAO,IACtB,IAAc,GAAO,YAAY;GACvC,IAAI,OAAO,KAAgB,YAAY,EAAY,SAAS,GAAG,OAAO;GACtE,IAAI,OAAO,GAAO,WAAY,YAAY,EAAM,QAAQ,SAAS,GAAG,OAAO,EAAM;EACnF;EACA,IAAI,OAAO,EAAO,WAAY,YAAY,EAAO,QAAQ,SAAS,GAAG,OAAO,EAAO;CACrF;CACA,OAAO;AACT;AAEA,SAAgB,IAGd;CACA,IAAM,EAAE,mBAAgB,EAAe,GACjC,EAAE,eAAY,EAAmB,GACjC,CAAC,KAAU,EAAY,CAAgC,GACvD,CAAC,GAAW,KAAgB,EAAwB,IAAI;CAoB9D,OAAO;EAAE,YAlBU,EACjB,OAAO,GAAY,GAAiC,MAAoC;GACtF,EAAa,CAAE;GACf,IAAI;IAKF,AAJA,MAAM,EAAO,EAAE,WAAW,EAAE,OAAO;KAAE;KAAI;KAAQ,SAAS,EAAE,eAAY;IAAE,EAAE,EAAE,CAAC,GAG/E,MAAM,EAAQ,GACd,GAAW,YAAY;GACzB,SAAS,GAAK;IACZ,GAAW,UAAU,EAAiB,GAAK,uCAAuC,CAAC;GACrF,UAAU;IACR,EAAa,IAAI;GACnB;EACF,GACA;GAAC;GAAQ;GAAa;EAAO,CAGtB;EAAY;CAAU;AACjC"}
|