- This attempt stored no artefacts. -
- ); - - return ( -- No model extraction recorded. -
- )} - {detail.extraction?.finishReason === "length" ? ( -{detail.extraction.errorSummary}
-+ Checked ANU. No changes found. +
+ ) : record.syncs[0]?.status === "review_required" ? ( + + ANU changes are ready to review. + + ) : record.syncs[0]?.status === "failed" ? ( ++ {record.syncs[0].errorMessage ?? "The latest ANU sync failed."} +
+ ) : null} {labels.singular} record + {canSync ? ( +- There was nothing to compare against, so every field was - accepted and this import is the draft. -
- ) : null} - {summary.flags.length > 0 ? ( -{summary.headline}
-{summary.detail}
-- {flag.sourceExcerpt} -- ) : null} - {flag.resolutionNote ? ( - - Note: {flag.resolutionNote} - - ) : null} -
{fields}
-- {flag.sourceExcerpt} -- ) : null} - {flag.resolutionNote ? ( - - Note: {flag.resolutionNote} - - ) : null} -
- The page content matched the current draft. -
- ) : shown === 0 ? ( -- No change is{" "} - {CHANGE_FILTERS.find( - (option) => option.value === filter, - )?.label.toLowerCase()} - . Choose another view to see the rest. -
- ) : ( -- {group.note} -
- ) : null} -- {change.sourceExcerpt} -- ) : null} -
-
-
- );
-}
diff --git a/apps/web/ui/admin/catalogue/sync-button.tsx b/apps/web/ui/admin/catalogue/sync-button.tsx
new file mode 100644
index 00000000..10df0920
--- /dev/null
+++ b/apps/web/ui/admin/catalogue/sync-button.tsx
@@ -0,0 +1,79 @@
+"use client";
+
+import { Button } from "@coursemap/ui/primitives/button";
+import { RefreshCw } from "lucide-react";
+import { useRouter } from "next/navigation";
+import { useEffect, useState, useTransition } from "react";
+import { toast } from "sonner";
+import type { CatalogueKind } from "@/lib/catalogue/content";
+import type { CatalogueSync } from "@/lib/coursemap/admin-catalogue-record";
+
+export function CatalogueSyncButton({
+ recordId,
+ kind,
+ latestSync,
+}: {
+ recordId: number;
+ kind: CatalogueKind;
+ latestSync: CatalogueSync | null;
+}) {
+ const router = useRouter();
+ const [isPending, startTransition] = useTransition();
+ const [startedSyncId, setStartedSyncId] = useState- {tone === "before" ? "−" : "+"} {heading} -
-- {field.label} -
- ) : null} -