CANCERYS\kw093 2 månader sedan
förälder
incheckning
7c3a286487
2 ändrade filer med 16 tillägg och 7 borttagningar
  1. +14
    -5
      src/components/JoSave/JoRelease.tsx
  2. +2
    -2
      src/components/JoSave/JoSave.tsx

+ 14
- 5
src/components/JoSave/JoRelease.tsx Visa fil

@@ -1,22 +1,29 @@
import { Button, Card, CardContent, Stack, Typography } from "@mui/material";
import { Button, Card, CardContent, Stack, Typography, Box } from "@mui/material";
import { useTranslation } from "react-i18next";
import { JoDetailPickLine } from "@/app/api/jo";
import { fetchInventories } from "@/app/api/inventory/actions";
import { InventoryResult } from "@/app/api/inventory";
import { useEffect, useState, useMemo } from "react";
import { useFormContext } from "react-hook-form";
import { JoDetail } from "@/app/api/jo";

type Props = {
onActionClick?: () => void;
pickLines: JoDetailPickLine[];
handleRelease: () => void;
}

const JoRelease: React.FC<Props> = ({
onActionClick,
pickLines
pickLines,
handleRelease
}) => {

const { t } = useTranslation("jo");
const [inventoryData, setInventoryData] = useState<InventoryResult[]>([]);

const { watch } = useFormContext<JoDetail>();

useEffect(() => {
const fetchInventoryData = async () => {
try {
@@ -86,13 +93,15 @@ const JoRelease: React.FC<Props> = ({
<Typography variant="body2" color="text.secondary" sx={{ mt: 1 }}>
{t("Lines with insufficient stock: ")}<strong style={{ color: 'red' }}>{stockCounts.insufficient}</strong>
</Typography>
{/*<Button

<Button
variant="contained"
color="primary"
onClick={onActionClick}
onClick={handleRelease}
>
{t("Release")}
</Button>*/}
</Button>
</Stack>

</CardContent>


+ 2
- 2
src/components/JoSave/JoSave.tsx Visa fil

@@ -186,9 +186,9 @@ const JoSave: React.FC<Props> = ({
{serverError}
</Typography>
)}
<ActionButtons handleRelease={handleRelease} handleStart={handleStart}/>
{/*<ActionButtons handleRelease={handleRelease} handleStart={handleStart}/>*/}
<InfoCard />
<JoRelease pickLines={pickLines}/>
<JoRelease pickLines={pickLines} handleRelease={handleRelease}/>
<PickTable />
<Stack direction="row" justifyContent="flex-end" gap={1}>
<Button


Laddar…
Avbryt
Spara