ソースを参照

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

main
cyril.tsui 2ヶ月前
コミット
bafe481fb4
2個のファイルの変更6行の追加5行の削除
  1. +4
    -3
      src/components/CreateProject/CreateProject.tsx
  2. +2
    -2
      src/components/Report/FinancialStatusReportGen/FinancialStatusReportGen.tsx

+ 4
- 3
src/components/CreateProject/CreateProject.tsx ファイルの表示

@@ -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 ファイルの表示

@@ -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


読み込み中…
キャンセル
保存