fix(mui): Projects review fixes — real order link, revert title/label, drop added status field
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useState } from "react";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { Link as RouterLink, useNavigate } from "react-router-dom";
|
||||
import { motion } from "framer-motion";
|
||||
import Box from "@mui/material/Box";
|
||||
import Typography from "@mui/material/Typography";
|
||||
@@ -283,12 +283,13 @@ export default function Projects() {
|
||||
render: (p) =>
|
||||
p.order_id ? (
|
||||
<Box
|
||||
component="a"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
navigate(`/orders/${p.order_id}`);
|
||||
component={RouterLink}
|
||||
to={`/orders/${p.order_id}`}
|
||||
sx={{
|
||||
color: "text.secondary",
|
||||
textDecoration: "none",
|
||||
"&:hover": { textDecoration: "underline" },
|
||||
}}
|
||||
sx={{ cursor: "pointer", color: "text.secondary" }}
|
||||
>
|
||||
{p.order_number}
|
||||
</Box>
|
||||
@@ -427,7 +428,7 @@ export default function Projects() {
|
||||
loading={deleteMutation.isPending}
|
||||
>
|
||||
<CheckboxField
|
||||
label="Smazat i soubory z disku"
|
||||
label="Smazat i soubory na disku"
|
||||
checked={deleteFiles}
|
||||
onChange={setDeleteFiles}
|
||||
/>
|
||||
@@ -437,7 +438,7 @@ export default function Projects() {
|
||||
isOpen={showCreate}
|
||||
onClose={() => setShowCreate(false)}
|
||||
onSubmit={handleCreate}
|
||||
title="Nový projekt"
|
||||
title="Přidat projekt"
|
||||
subtitle={`Číslo projektu: ${
|
||||
nextNumberQuery.data?.number ??
|
||||
nextNumberQuery.data?.next_number ??
|
||||
@@ -497,19 +498,6 @@ export default function Projects() {
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<Field label="Stav">
|
||||
<Select
|
||||
value={createForm.status}
|
||||
onChange={(value) =>
|
||||
setCreateForm({ ...createForm, status: value })
|
||||
}
|
||||
options={Object.entries(STATUS_LABELS).map(([value, label]) => ({
|
||||
value,
|
||||
label,
|
||||
}))}
|
||||
/>
|
||||
</Field>
|
||||
|
||||
<Box sx={{ display: "flex", gap: 2, flexWrap: "wrap" }}>
|
||||
<Box sx={{ flex: "1 1 200px" }}>
|
||||
<Field label="Začátek">
|
||||
|
||||
Reference in New Issue
Block a user