-
+
{tile.value}
{t(`blames.tiles.${tile.key}`)}
@@ -67,15 +70,25 @@ function Tiles({ reports }: { readonly reports: readonly DocumentSummary[] }): R
);
}
-function Bars({ entries }: { readonly entries: readonly (readonly [string, number])[] }): ReactNode {
+function Bars({
+ entries,
+}: {
+ readonly entries: readonly (readonly [string, number])[];
+}): ReactNode {
const top = Math.max(...entries.map(([, n]) => n), 1);
return (
{entries.map(([label, n]) => (
- -
+
-
{label}
-
+
{n}
@@ -98,7 +111,13 @@ export function BlamesScreen({ environment }: { readonly environment: string }):
const wanted = params.get('view') ?? 'sprint';
const view: View = (VIEWS as readonly string[]).includes(wanted) ? (wanted as View) : 'sprint';
const reports = useQuery({
- queryKey: ['compass', inputs.httpBase, 'documents', environment, { type, state, limit: LIMIT }],
+ queryKey: [
+ 'compass',
+ inputs.httpBase,
+ 'documents',
+ environment,
+ { type, state, limit: LIMIT },
+ ],
queryFn: ({ signal }) =>
client.documents(
{
@@ -117,7 +136,8 @@ export function BlamesScreen({ environment }: { readonly environment: string }):
});
const all = reports.data?.documents ?? [];
const open = all.filter((d) => !closed(d.state));
- const visible = state === 'all' ? all : state === 'addressed' ? all.filter((d) => closed(d.state)) : open;
+ const visible =
+ state === 'all' ? all : state === 'addressed' ? all.filter((d) => closed(d.state)) : open;
const href = (next: { readonly state?: string; readonly view?: string }) => {
const out = new URLSearchParams();
out.set('type', type);
@@ -139,7 +159,9 @@ export function BlamesScreen({ environment }: { readonly environment: string }):
list.push(d);
sprints.set(d.sprint, list);
}
- const ordered = [...sprints.entries()].sort((a, b) => b[0].localeCompare(a[0], 'en', { numeric: true }));
+ const ordered = [...sprints.entries()].sort((a, b) =>
+ b[0].localeCompare(a[0], 'en', { numeric: true }),
+ );
const owners = new Map();
for (const d of [...open].sort((a, b) => (ageOf(b) ?? 0) - (ageOf(a) ?? 0))) {
const owner = d.owner === '' ? t('blames.noOwner') : d.owner;
@@ -147,21 +169,28 @@ export function BlamesScreen({ environment }: { readonly environment: string }):
list.push(d);
owners.set(owner, list);
}
- const ownerLoad = [...all.reduce((m, d) => {
- const key = d.owner === '' ? t('blames.noOwner') : d.owner;
- m.set(key, (m.get(key) ?? 0) + 1);
- return m;
- }, new Map())].sort((a, b) => b[1] - a[1]);
- const filed = [...all.reduce((m, d) => {
- const day = d.created === '' ? '?' : d.created;
- m.set(day, (m.get(day) ?? 0) + 1);
- return m;
- }, new Map())].sort((a, b) => a[0].localeCompare(b[0]));
+ const ownerLoad = [
+ ...all.reduce((m, d) => {
+ const key = d.owner === '' ? t('blames.noOwner') : d.owner;
+ m.set(key, (m.get(key) ?? 0) + 1);
+ return m;
+ }, new Map()),
+ ].sort((a, b) => b[1] - a[1]);
+ const filed = [
+ ...all.reduce((m, d) => {
+ const day = d.created === '' ? '?' : d.created;
+ m.set(day, (m.get(day) ?? 0) + 1);
+ return m;
+ }, new Map()),
+ ].sort((a, b) => a[0].localeCompare(b[0]));
return (
-