Close dialog on status change

This commit is contained in:
Jose Selesan
2026-05-06 17:03:42 -03:00
parent 41a217e8a9
commit 7be776f189
22 changed files with 408 additions and 428 deletions

View File

@@ -1,18 +1,16 @@
type IssueLike = {
path: PropertyKey[]
message: string
}
path: PropertyKey[];
message: string;
};
export function zodIssuesToRecord(
issues: IssueLike[]
): Record<string, string[]> {
const out: Record<string, string[]> = {}
export function zodIssuesToRecord(issues: IssueLike[]): Record<string, string[]> {
const out: Record<string, string[]> = {};
for (const issue of issues) {
const key = issue.path.length ? issue.path.join('.') : 'root'
out[key] ??= []
out[key].push(issue.message)
const key = issue.path.length ? issue.path.join('.') : 'root';
out[key] ??= [];
out[key].push(issue.message);
}
return out
}
return out;
}