Pārlūkot izejas kodu

[May Revert] Fix Thomas Feedback 157 & Email on 10/10/2025

main
cyril.tsui pirms 2 mēnešiem
vecāks
revīzija
bafe481fb4
2 mainītis faili ar 6 papildinājumiem un 5 dzēšanām
  1. +4
    -3
      src/components/CreateProject/CreateProject.tsx
  2. +2
    -2
      src/components/Report/FinancialStatusReportGen/FinancialStatusReportGen.tsx

+ 4
- 3
src/components/CreateProject/CreateProject.tsx Parādīt failu

@@ -533,6 +533,7 @@ const CreateProject: React.FC<Props> = ({
const expectedProjectFee = formProps.watch("expectedProjectFee");
const ratePerManhour = formProps.watch("ratePerManhour");
const totalManhour = formProps.watch("totalManhour");
const subContractFee = formProps.watch("subContractFee");
const firstLoadedRef = useRef(false);
useEffect(() => {
if (
@@ -542,12 +543,12 @@ const CreateProject: React.FC<Props> = ({
) {
formProps.setValue(
"totalManhour",
Math.ceil(expectedProjectFee / ratePerManhour),
Math.ceil((expectedProjectFee - (subContractFee ?? 0)) / ratePerManhour),
);
} else {
firstLoadedRef.current = true;
}
}, [expectedProjectFee, ratePerManhour]);
}, [expectedProjectFee, subContractFee, ratePerManhour]);

useEffect(() => {
if (
@@ -557,7 +558,7 @@ const CreateProject: React.FC<Props> = ({
) {
formProps.setValue(
"totalManhour",
Math.ceil(expectedProjectFee / ratePerManhour),
Math.ceil((expectedProjectFee - (subContractFee ?? 0)) / ratePerManhour),
);
}
}, [totalManhour]);


+ 2
- 2
src/components/Report/FinancialStatusReportGen/FinancialStatusReportGen.tsx Parādīt failu

@@ -58,8 +58,8 @@ const GenFinancialStatusReport: React.FC<Props> & SubComponents = ({ projects, t
setLoading(true)
let postData = {
teamLeadId: -1,
startMonth: "1970-01-01",
endMonth: dayjs().format("YYYY-MM-DD").toString()
startMonth: "1970-01",
endMonth: dayjs().format("YYYY-MM").toString()
}
if(query.targetDate){
postData.startMonth = query.targetDate


Notiek ielāde…
Atcelt
Saglabāt