+
+
+ );
+}
+
+function SaveStatusDetails({
+ snapshot,
+ pending,
+ rejected,
+ incidents,
+ conflicts,
+ holds,
+}: Pick
& {
+ readonly snapshot: MdbaseSnapshot | null;
+ readonly incidents: ReturnType;
+ readonly conflicts: number;
+ readonly holds: number;
+}): JSX.Element {
+ const online = !sdkOffline(snapshot);
+ const connection = openConnection(snapshot);
+ const entries = [...pending, ...rejected];
+ const stalled = snapshot?.sync?.pendingFor === "long";
+ return (
+
+ {entries.length + incidents.length > 0 ? (
-
-
- {online && (stalled || incidents.length > 0) ? (
-
- ) : null}
-
-
+ ) : null}
+ {connection && conflicts + holds > 0 ? (
+ 0}
+ hasHolds={holds > 0}
+ />
+ ) : null}
+
+ {entries.length ? : null}
+ {online && (stalled || incidents.length > 0) ? (
+
+ ) : null}
+
);
}
@@ -80,7 +120,7 @@ function SaveStatusEntries({
connection,
}: {
readonly connection: MdbaseApplicationConnection | null;
- readonly entries: NonNullable