@flowselections/floriday-authenticatie-module 1.0.6 → 1.0.8
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-lib/components/floriday/FlorydayConnectionPage.d.ts +2 -0
- package/dist-lib/components/floriday/FlorydayConnectionPage.d.ts.map +1 -0
- package/dist-lib/components/floriday/FlorydayConnectionPage.js +5 -0
- package/dist-lib/components/settings/FlorydaySettingsCard.d.ts.map +1 -1
- package/dist-lib/components/settings/FlorydaySettingsCard.js +5 -2
- package/dist-lib/index.d.ts +1 -1
- package/dist-lib/index.d.ts.map +1 -1
- package/dist-lib/index.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlorydayConnectionPage.d.ts","sourceRoot":"","sources":["../../../src/components/floriday/FlorydayConnectionPage.tsx"],"names":[],"mappings":"AAEA,wBAAgB,sBAAsB,4CAYrC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { FlorydaySettingsCard } from "../settings/FlorydaySettingsCard";
|
|
3
|
+
export function FlorydayConnectionPage() {
|
|
4
|
+
return (_jsxs("main", { className: "p-6 max-w-4xl mx-auto space-y-6", children: [_jsxs("div", { children: [_jsx("h1", { className: "text-2xl font-bold", children: "Floriday koppeling" }), _jsx("p", { className: "text-sm text-muted-foreground mt-1", children: "Verbind je Floriday-account om automatisch gegevens uit te wisselen met het platform." })] }), _jsx(FlorydaySettingsCard, {})] }));
|
|
5
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlorydaySettingsCard.d.ts","sourceRoot":"","sources":["../../../src/components/settings/FlorydaySettingsCard.tsx"],"names":[],"mappings":"AA4CA,wBAAgB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"FlorydaySettingsCard.d.ts","sourceRoot":"","sources":["../../../src/components/settings/FlorydaySettingsCard.tsx"],"names":[],"mappings":"AA4CA,wBAAgB,oBAAoB,4CAkHnC"}
|
|
@@ -20,7 +20,8 @@ export function FlorydaySettingsCard() {
|
|
|
20
20
|
queryFn: () => getSettings(),
|
|
21
21
|
});
|
|
22
22
|
const activeEnv = settings?.active_environment ?? "staging";
|
|
23
|
-
const
|
|
23
|
+
const safeConnections = Array.isArray(connections) ? connections : [];
|
|
24
|
+
const activeConn = safeConnections.find((c) => c.environment === activeEnv) ?? null;
|
|
24
25
|
const envMutation = useMutation({
|
|
25
26
|
mutationFn: (env) => setEnv({ data: { environment: env } }),
|
|
26
27
|
onMutate: async (env) => {
|
|
@@ -109,7 +110,9 @@ function PublishingSettings({ env, connection, }) {
|
|
|
109
110
|
queryFn: () => listWarehouses({ data: { environment: env } }),
|
|
110
111
|
enabled: Boolean(connection),
|
|
111
112
|
});
|
|
112
|
-
const warehouses = warehousesQuery.data &&
|
|
113
|
+
const warehouses = warehousesQuery.data?.ok && Array.isArray(warehousesQuery.data.warehouses)
|
|
114
|
+
? warehousesQuery.data.warehouses
|
|
115
|
+
: [];
|
|
113
116
|
const warehousesError = warehousesQuery.data && !warehousesQuery.data.ok ? warehousesQuery.data.error : null;
|
|
114
117
|
// Auto-preselect het default-magazijn van Floriday wanneer de gebruiker
|
|
115
118
|
// nog geen keuze heeft gemaakt.
|
package/dist-lib/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FlowModule } from "@flowselections/core";
|
|
2
2
|
export * from './_core-safelist';
|
|
3
|
-
export
|
|
3
|
+
export { FlorydayConnectionPage } from './components/floriday/FlorydayConnectionPage';
|
|
4
4
|
export * from './lib/floriday.functions';
|
|
5
5
|
export declare const myModule: FlowModule;
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist-lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGvD,cAAc,kBAAkB,CAAC;AACjC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGvD,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACtF,cAAc,0BAA0B,CAAC;AAEzC,eAAO,MAAM,QAAQ,EAAE,UActB,CAAC"}
|
package/dist-lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Plug } from "lucide-react";
|
|
2
2
|
import { FlorydaySettingsCard } from "./components/settings/FlorydaySettingsCard";
|
|
3
3
|
export * from './_core-safelist';
|
|
4
|
-
export
|
|
4
|
+
export { FlorydayConnectionPage } from './components/floriday/FlorydayConnectionPage';
|
|
5
5
|
export * from './lib/floriday.functions';
|
|
6
6
|
export const myModule = {
|
|
7
7
|
id: "floriday_connection",
|