fix: refactoring errors (#359)

* #352 - require one date to be set to save

* fix many type regressions
This commit is contained in:
Hayden 2023-03-20 21:48:22 -08:00 committed by GitHub
parent 4a8ba6231d
commit 97fb94d231
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 164 additions and 289 deletions

View file

@ -14,6 +14,10 @@ export function flatTree(tree: TreeItem[]): Ref<FlatTreeItem[]> {
// the display is a string of the tree hierarchy separated by breadcrumbs
function flatten(items: TreeItem[], display: string) {
if (!items) {
return;
}
for (const item of items) {
v.value.push({
id: item.id,
@ -40,5 +44,5 @@ export async function useFlatLocations(): Promise<Ref<FlatTreeItem[]>> {
return ref([]);
}
return flatTree(locations.data.items);
return flatTree(locations.data);
}