@fayz-ai/plugin-agenda 0.24.0 → 0.24.1
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/data/supabase.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supabase.d.ts","sourceRoot":"","sources":["../../src/data/supabase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAM/B,MAAM,SAAS,CAAA;AAubhB,MAAM,WAAW,6BAA6B;IAC5C,uGAAuG;IACvG,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AA8ED,wBAAgB,4BAA4B,CAAC,eAAe,CAAC,EAAE,6BAA6B,GAAG,kBAAkB,
|
|
1
|
+
{"version":3,"file":"supabase.d.ts","sourceRoot":"","sources":["../../src/data/supabase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAM/B,MAAM,SAAS,CAAA;AAubhB,MAAM,WAAW,6BAA6B;IAC5C,uGAAuG;IACvG,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AA8ED,wBAAgB,4BAA4B,CAAC,eAAe,CAAC,EAAE,6BAA6B,GAAG,kBAAkB,CA6pDhH"}
|
package/dist/index.js
CHANGED
|
@@ -7876,7 +7876,7 @@ function createSupabaseAgendaProvider(providerOptions) {
|
|
|
7876
7876
|
return { busyStarts, closedDates: Array.from(new Set(closedDates)) };
|
|
7877
7877
|
},
|
|
7878
7878
|
async updateBooking(id, data) {
|
|
7879
|
-
const { core } = getClients();
|
|
7879
|
+
const { core, pub } = getClients();
|
|
7880
7880
|
const { data: existing, error: existingErr } = await core.from("appointments").select("id, order_id, starts_at, assignee_id, unit_id, metadata").eq("id", id).single();
|
|
7881
7881
|
if (existingErr) throw existingErr;
|
|
7882
7882
|
const updates = {};
|
|
@@ -7944,6 +7944,10 @@ function createSupabaseAgendaProvider(providerOptions) {
|
|
|
7944
7944
|
const { error: itemErr } = await core.from("items").insert(items);
|
|
7945
7945
|
if (itemErr) throw itemErr;
|
|
7946
7946
|
}
|
|
7947
|
+
try {
|
|
7948
|
+
await pub.rpc("order_reconcile_receivable", { p_order_id: orderId });
|
|
7949
|
+
} catch {
|
|
7950
|
+
}
|
|
7947
7951
|
}
|
|
7948
7952
|
} else if (data.services) {
|
|
7949
7953
|
const tenantId = getTenantId();
|