Merge pull request #1338 from cywio/reorder-websites

Add ability to reorder websites on dashboard
This commit is contained in:
Mike Cao
2022-08-03 18:05:42 -05:00
committed by GitHub
10 changed files with 238 additions and 19 deletions

View File

@@ -78,3 +78,14 @@ export function stringToColor(str) {
}
return color;
}
export function orderByWebsiteMap(websites, orderMap) {
if (!websites) return [];
let ordered = [...websites];
for (let website of websites) {
ordered[orderMap[website.website_uuid]] = website;
}
return ordered;
}