diff --git a/client/src/pages/locations/index.tsx b/client/src/pages/locations/index.tsx index c628df7..e2cd862 100644 --- a/client/src/pages/locations/index.tsx +++ b/client/src/pages/locations/index.tsx @@ -1,11 +1,13 @@ -import { IResourceComponentsProps, useInvalidate, useList, useTranslate } from "@refinedev/core"; -import { theme } from "antd"; +import { IResourceComponentsProps, useInvalidate, useList, useNavigation, useTranslate } from "@refinedev/core"; +import { Button, theme } from "antd"; import dayjs from "dayjs"; import utc from "dayjs/plugin/utc"; import React from "react"; import { DndProvider, useDrag, useDrop } from "react-dnd"; import { HTML5Backend } from "react-dnd-html5-backend"; +import { EditOutlined, EyeOutlined } from "@ant-design/icons"; +import { Link } from "react-router-dom"; import SpoolIcon from "../../components/spoolIcon"; import { ISpool } from "../spools/model"; import { setSpoolLocation } from "./functions"; @@ -17,6 +19,7 @@ const { useToken } = theme; function SpoolCard({ spool }: { spool: ISpool }) { const { token } = useToken(); + const t = useTranslate(); const [{ opacity }, dragRef] = useDrag( () => ({ type: "spool", @@ -27,6 +30,7 @@ function SpoolCard({ spool }: { spool: ISpool }) { }), [] ); + const { editUrl, showUrl } = useNavigation(); const colorObj = spool.filament.multi_color_hexes ? { @@ -52,9 +56,24 @@ function SpoolCard({ spool }: { spool: ISpool }) {
- #{spool.id} {filament_name} + + #{spool.id} {filament_name} + +
+ +
-
+
{spool.remaining_weight} / {spool.filament.weight} g
diff --git a/client/src/pages/locations/locations.css b/client/src/pages/locations/locations.css index 76abccc..9723a39 100644 --- a/client/src/pages/locations/locations.css +++ b/client/src/pages/locations/locations.css @@ -5,7 +5,7 @@ .loc-container { padding: 1em; - width: 20em; + width: 24em; } .loc-container .loc-spools { @@ -28,11 +28,15 @@ .loc-container .spool .info { display: flex; flex-direction: column; - gap: 0.5em; + width: 100%; } .loc-container .spool .info .title { font-size: 1em; + display: flex; + align-items: center; + justify-content: space-between; + width: 100%; } .loc-container .spool .info .subtitle {