Skip to content

Commit 9c3e2bd

Browse files
committed
fix(unit-user-usage): change page titles and url
1 parent c3beb35 commit 9c3e2bd

File tree

6 files changed

+13
-4
lines changed

6 files changed

+13
-4
lines changed

components/usage/UnitUserUsage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,14 @@ export const UnitUserUsage = ({ unitId }: UnitUserUsageProps) => {
9191
return (
9292
<Container maxWidth="xl">
9393
<Typography component="h2" variant="h1">
94-
User Usage
94+
Unit Inventory
9595
</Typography>
9696
<Typography variant="h3">
9797
Unit: <em>{unit.name}</em>
9898
</Typography>
9999

100100
<Typography>Owner: {unit.owner_id}</Typography>
101+
101102
<Box marginY={1}>
102103
{pivot ? (
103104
<UserUsageByProjectTable

components/usage/UserUsageByProjectTable.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useMemo, useState } from "react";
44
import type { InventoryUserDetail } from "@squonk/data-manager-client";
55

66
import { Edit } from "@mui/icons-material";
7-
import { Chip } from "@mui/material";
7+
import { Chip, Typography } from "@mui/material";
88
import { createColumnHelper } from "@tanstack/react-table";
99
import groupBy from "just-group-by";
1010

@@ -132,6 +132,10 @@ export const UserUsageByProjectTable = ({
132132
onMemberChange={onChange}
133133
/>
134134
)}
135+
136+
<Typography gutterBottom variant="h4">
137+
Project Members
138+
</Typography>
135139
<DataTable
136140
columns={columns}
137141
customRowProps={(row) => ({

components/usage/UserUsageTable.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ export const UserUsageTable = ({ users, toolbarContent, onChange }: UserUsageTab
154154

155155
return (
156156
<>
157+
<Typography gutterBottom variant="h4">
158+
User Usage
159+
</Typography>
160+
157161
<DataTable columns={columns} data={users} toolbarContent={toolbarContent} />
158162
<Typography variant="caption">
159163
A user is considered active in a given day if they have used the Data Manager API

components/userContext/SelectUnit.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export const SelectUnit = ({
8282
<Adornment href={`/unit/${unit.id}/charges`} title="Charges">
8383
<ReceiptIcon />
8484
</Adornment>
85-
<Adornment href={`/unit/${unit.id}/user-usage`} title="User Usage">
85+
<Adornment href={`/unit/${unit.id}/inventory`} title="User Usage">
8686
<DataUsageIcon />
8787
</Adornment>
8888
</>
File renamed without changes.

types/nextjs-routes.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ declare module "nextjs-routes" {
4444
| StaticRoute<"/results">
4545
| StaticRoute<"/run">
4646
| DynamicRoute<"/unit/[unitId]/charges", { "unitId": string }>
47-
| DynamicRoute<"/unit/[unitId]/user-usage", { "unitId": string }>
47+
| DynamicRoute<"/unit/[unitId]/inventory", { "unitId": string }>
4848
| StaticRoute<"/viewer/sdf">;
4949

5050
interface StaticRoute<Pathname> {

0 commit comments

Comments
 (0)