FPSMS-frontend
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

76 lines
2.7 KiB

  1. import { DoDetail } from "@/app/api/do/actions";
  2. import { decimalFormatter, integerFormatter } from "@/app/utils/formatUtil";
  3. import { Box, Card, CardContent, Grid, Stack, TextField } from "@mui/material";
  4. import { upperFirst } from "lodash";
  5. import { useFormContext } from "react-hook-form";
  6. import { useTranslation } from "react-i18next";
  7. type Props = {
  8. };
  9. const DoInfoCard: React.FC<Props> = ({
  10. }) => {
  11. const { t } = useTranslation("do");
  12. const { control, getValues, register, watch } = useFormContext<DoDetail>();
  13. return (
  14. <Card sx={{ display: "block" }}>
  15. <CardContent component={Stack} spacing={4}>
  16. <Box>
  17. <Grid container spacing={2} columns={{ xs: 6, sm: 12 }}>
  18. <Grid item xs={6}>
  19. <TextField
  20. {...register("code")}
  21. label={t("Code")}
  22. fullWidth
  23. disabled={true}
  24. />
  25. </Grid>
  26. <Grid item xs={6}>
  27. <TextField
  28. {...register("supplierCode")}
  29. label={t("Supplier Code")}
  30. fullWidth
  31. disabled={true}
  32. />
  33. </Grid>
  34. <Grid item xs={6}>
  35. <TextField
  36. {...register("shopName")}
  37. label={t("Shop Name")}
  38. fullWidth
  39. disabled={true}
  40. />
  41. </Grid>
  42. <Grid item xs={6}>
  43. <TextField
  44. {...register("orderDate")}
  45. label={t("Order Date")}
  46. fullWidth
  47. disabled={true}
  48. />
  49. </Grid>
  50. <Grid item xs={6}>
  51. <TextField
  52. {...register("estimatedArrivalDate")}
  53. label={t("Estimated Arrival Date")}
  54. fullWidth
  55. disabled={true}
  56. />
  57. </Grid>
  58. <Grid item xs={6}/>
  59. </Grid>
  60. </Box>
  61. </CardContent>
  62. </Card>
  63. )
  64. }
  65. export default DoInfoCard;