|
@@ -6,10 +6,11 @@ import Card from "@mui/material/Card"; |
|
|
import CardContent from "@mui/material/CardContent"; |
|
|
import CardContent from "@mui/material/CardContent"; |
|
|
import Grid from "@mui/material/Grid"; |
|
|
import Grid from "@mui/material/Grid"; |
|
|
import TextField from "@mui/material/TextField"; |
|
|
import TextField from "@mui/material/TextField"; |
|
|
|
|
|
import { NumericFormat } from 'react-number-format'; |
|
|
import Typography from "@mui/material/Typography"; |
|
|
import Typography from "@mui/material/Typography"; |
|
|
import { useTranslation } from "react-i18next"; |
|
|
import { useTranslation } from "react-i18next"; |
|
|
import Button from "@mui/material/Button"; |
|
|
import Button from "@mui/material/Button"; |
|
|
import { useFormContext } from "react-hook-form"; |
|
|
|
|
|
|
|
|
import { Controller, useFormContext } from "react-hook-form"; |
|
|
import { CreateProjectInputs } from "@/app/api/projects/actions"; |
|
|
import { CreateProjectInputs } from "@/app/api/projects/actions"; |
|
|
import { |
|
|
import { |
|
|
BuildingType, |
|
|
BuildingType, |
|
@@ -469,17 +470,65 @@ const ProjectClientDetails: React.FC<Props> = ({ |
|
|
/> |
|
|
/> |
|
|
</Grid> |
|
|
</Grid> |
|
|
<Grid item xs={6}> |
|
|
<Grid item xs={6}> |
|
|
<TextField |
|
|
|
|
|
|
|
|
<Controller |
|
|
|
|
|
control={control} |
|
|
|
|
|
name="expectedProjectFee" |
|
|
|
|
|
render={({ field: { onChange, onBlur, name, value, ref } }) => ( |
|
|
|
|
|
<NumericFormat |
|
|
|
|
|
label={t("Expected Total Project Fee")} |
|
|
|
|
|
fullWidth |
|
|
|
|
|
onValueChange={(values) => { |
|
|
|
|
|
// console.log(values) |
|
|
|
|
|
onChange(values.floatValue) |
|
|
|
|
|
}} |
|
|
|
|
|
customInput={TextField} |
|
|
|
|
|
thousandSeparator |
|
|
|
|
|
valueIsNumericString |
|
|
|
|
|
decimalScale={2} |
|
|
|
|
|
fixedDecimalScale |
|
|
|
|
|
name={name} |
|
|
|
|
|
value={value} |
|
|
|
|
|
onBlur={onBlur} |
|
|
|
|
|
inputRef={ref} |
|
|
|
|
|
/> |
|
|
|
|
|
)} |
|
|
|
|
|
/> |
|
|
|
|
|
{/* <TextField |
|
|
label={t("Expected Total Project Fee")} |
|
|
label={t("Expected Total Project Fee")} |
|
|
fullWidth |
|
|
fullWidth |
|
|
type="number" |
|
|
type="number" |
|
|
inputProps={{ step: "0.01" }} |
|
|
|
|
|
|
|
|
inputProps={{ |
|
|
|
|
|
step: "0.01", |
|
|
|
|
|
}} |
|
|
{...register("expectedProjectFee", { valueAsNumber: true })} |
|
|
{...register("expectedProjectFee", { valueAsNumber: true })} |
|
|
/> |
|
|
|
|
|
|
|
|
/> */} |
|
|
</Grid> |
|
|
</Grid> |
|
|
|
|
|
|
|
|
<Grid item xs={6}> |
|
|
<Grid item xs={6}> |
|
|
<TextField |
|
|
|
|
|
|
|
|
<Controller |
|
|
|
|
|
control={control} |
|
|
|
|
|
name="subContractFee" |
|
|
|
|
|
render={({ field: { onChange, onBlur, name, value, ref } }) => ( |
|
|
|
|
|
<NumericFormat |
|
|
|
|
|
label={t("Sub-Contract Fee")} |
|
|
|
|
|
fullWidth |
|
|
|
|
|
onValueChange={(values) => { |
|
|
|
|
|
// console.log(values) |
|
|
|
|
|
onChange(values.floatValue) |
|
|
|
|
|
}} |
|
|
|
|
|
customInput={TextField} |
|
|
|
|
|
thousandSeparator |
|
|
|
|
|
valueIsNumericString |
|
|
|
|
|
decimalScale={2} |
|
|
|
|
|
fixedDecimalScale |
|
|
|
|
|
name={name} |
|
|
|
|
|
value={value} |
|
|
|
|
|
onBlur={onBlur} |
|
|
|
|
|
inputRef={ref} |
|
|
|
|
|
/> |
|
|
|
|
|
)} |
|
|
|
|
|
/> |
|
|
|
|
|
{/* <TextField |
|
|
label={t("Sub-Contract Fee")} |
|
|
label={t("Sub-Contract Fee")} |
|
|
fullWidth |
|
|
fullWidth |
|
|
type="number" |
|
|
type="number" |
|
@@ -488,7 +537,7 @@ const ProjectClientDetails: React.FC<Props> = ({ |
|
|
// shrink: Boolean(watch("subContractFee")), |
|
|
// shrink: Boolean(watch("subContractFee")), |
|
|
// }} |
|
|
// }} |
|
|
{...register("subContractFee", { valueAsNumber: true })} |
|
|
{...register("subContractFee", { valueAsNumber: true })} |
|
|
/> |
|
|
|
|
|
|
|
|
/> */} |
|
|
</Grid> |
|
|
</Grid> |
|
|
|
|
|
|
|
|
{/* <Grid item xs={6}> |
|
|
{/* <Grid item xs={6}> |
|
|