Skip to content
Merged

thing #205

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default function CategoryLabel({
}

return (
<div className="inline-flex flex-wrap items-center gap-1" onClick={(e) => e.stopPropagation()}>
<div className="inline-flex items-center gap-1" onClick={(e) => e.stopPropagation()}>
{categories.slice(0, 3).map((cat, index) => (
<CategoryBadge
key={index}
Expand Down
16 changes: 9 additions & 7 deletions frontend/app/expense-tracker/expense-table/side-view-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function LineItemsTable({ lineItems }: { lineItems: PurchaseLineI
cell: ({ getValue }) => {
const value = getValue() as string | null;
return (
<div className="flex text-xs items-center min-h-8 select-none">
<div className="flex text-xs items-center min-h-8 select-none min-w-15">
{" "}
{value && value.trim().length > 0 ? value : "Unknown"}{" "}
</div>
Expand All @@ -58,11 +58,13 @@ export default function LineItemsTable({ lineItems }: { lineItems: PurchaseLineI
header: () => <span className="select-none">Category</span>,
accessorKey: "category",
cell: (ctx) => (
<CategoryLabel
category={ctx.getValue() ? (ctx.getValue() as string) : ""}
lineItemIds={[]}
editableTags={false}
/>
<div className="flex items-center min-w-25">
<CategoryLabel
category={ctx.getValue() ? (ctx.getValue() as string) : ""}
lineItemIds={[]}
editableTags={false}
/>
</div>
),
},
{
Expand All @@ -73,7 +75,7 @@ export default function LineItemsTable({ lineItems }: { lineItems: PurchaseLineI
cell: (ctx) => (
<div
className="text-xs h-10 flex
select-none items-center"
select-none items-center min-w-10"
>
{ctx.getValue() as string}
</div>
Expand Down
10 changes: 5 additions & 5 deletions frontend/app/expense-tracker/expense-table/table-content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export default function TableContent({

return (
<div
className={cn("flex items-center", row.depth > 0 && "pl-8")}
className={cn("flex items-center min-w-48", row.depth > 0 && "pl-8")}
style={{ height: `${TABLE_ROW_HEIGHT}rem` }}
>
{setSelections && selections && (
Expand Down Expand Up @@ -245,7 +245,7 @@ export default function TableContent({
enableSorting: true,
accessorFn: (row) => row.amount / 100,
cell: (ctx) => (
<div className="flex items-center" style={{ height: `${TABLE_ROW_HEIGHT}rem` }}>
<div className="flex items-center min-w-28" style={{ height: `${TABLE_ROW_HEIGHT}rem` }}>
<p className="text-xs">{`$${(ctx.getValue() as number).toLocaleString()}`}</p>
</div>
),
Expand All @@ -257,7 +257,7 @@ export default function TableContent({
cell: (ctx) => {
const row = ctx.row.original;
return (
<div className="flex items-center" style={{ height: `${TABLE_ROW_HEIGHT}rem` }}>
<div className="flex items-center min-w-75" style={{ height: `${TABLE_ROW_HEIGHT}rem` }}>
<CategoryLabel
category={ctx.getValue() as string}
updateCategory={(category, lineItemIds, removeCategory) => {
Expand All @@ -277,7 +277,7 @@ export default function TableContent({
enableSorting: true,
accessorFn: (row) => row.date.toLocaleDateString(),
cell: (ctx) => (
<div className="text-xs flex items-center" style={{ height: `${TABLE_ROW_HEIGHT}rem` }}>
<div className="text-xs flex items-center min-w-48" style={{ height: `${TABLE_ROW_HEIGHT}rem` }}>
{ctx.getValue() as string}
</div>
),
Expand All @@ -293,7 +293,7 @@ export default function TableContent({
cell: (ctx) => {
const row = ctx.row.original;
return (
<div className="flex items-center" style={{ height: `${TABLE_ROW_HEIGHT}rem` }}>
<div className="flex items-center min-w-48" style={{ height: `${TABLE_ROW_HEIGHT}rem` }}>
<DisasterLabel
disasterType={ctx.getValue()}
updateDisasterType={(type, lineItemIds) => {
Expand Down
4 changes: 2 additions & 2 deletions frontend/bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"leaflet": "^1.9.4",
"lucide-react": "^0.552.0",
"next": "15.5.3",
"nuqs": "^2.7.3",
"nuqs": "^2.8.2",
"openapi-fetch": "^0.14.1",
"openapi-typescript": "^7.9.1",
"pako": "^2.1.0",
Expand Down
Loading