[as] chore: 재원협의 코드 수정
This commit is contained in:
@@ -122,7 +122,7 @@ function findBizCstSyncItem(costItems: CostItemDef[]): CostItemDef | undefined {
|
||||
}
|
||||
|
||||
export interface BizCstTotalAmounts {
|
||||
bscPlanAmt: number;
|
||||
bgtRfltAmt: number;
|
||||
tstmDesignAmt: number;
|
||||
}
|
||||
|
||||
@@ -136,13 +136,13 @@ export function getBizCstTotalRow(
|
||||
costItems: CostItemDef[],
|
||||
): BizCstTotalAmounts {
|
||||
const syncCostItem = findBizCstSyncItem(costItems);
|
||||
if (!syncCostItem) return { bscPlanAmt: 0, tstmDesignAmt: 0 };
|
||||
if (!syncCostItem) return { bgtRfltAmt: 0, tstmDesignAmt: 0 };
|
||||
|
||||
const costRow = bizCstList.find((item) => item.acntgSeCd === syncCostItem.code);
|
||||
if (!costRow) return { bscPlanAmt: 0, tstmDesignAmt: 0 };
|
||||
if (!costRow) return { bgtRfltAmt: 0, tstmDesignAmt: 0 };
|
||||
|
||||
return {
|
||||
bscPlanAmt: costRow.bscPlanAmt || 0,
|
||||
bgtRfltAmt: costRow.bgtRfltAmt || 0,
|
||||
tstmDesignAmt: costRow.tstmDesignAmt || 0,
|
||||
};
|
||||
}
|
||||
@@ -178,7 +178,7 @@ export function calcBizCstSharRemaining(
|
||||
const leafSum = sumFnrsSharLeafAmounts(sharList, sharItems);
|
||||
|
||||
return {
|
||||
exstnRemaining: roundAmount(bizCstTotal.bscPlanAmt - leafSum.exstnAmt),
|
||||
exstnRemaining: roundAmount(bizCstTotal.bgtRfltAmt - leafSum.exstnAmt),
|
||||
chgRqtRemaining: roundAmount(bizCstTotal.tstmDesignAmt - leafSum.chgRqtAmt),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ function BusinessCostFormSection() {
|
||||
const data = bizCstList[idx];
|
||||
if (!data) return null;
|
||||
|
||||
const diff = (data.tstmDesignAmt || 0) - (data.bscPlanAmt || 0);
|
||||
const diff = (data.tstmDesignAmt || 0) - (data.bgtRfltAmt || 0);
|
||||
const paddingLeft = `${item.level * 1.6}rem`;
|
||||
const showSubIcon = item.level >= 2;
|
||||
|
||||
@@ -120,14 +120,14 @@ function BusinessCostFormSection() {
|
||||
</TableHead>
|
||||
<TableCell>
|
||||
<Controller
|
||||
name={`bizCstList.${idx}.bscPlanAmt`}
|
||||
name={`bizCstList.${idx}.bgtRfltAmt`}
|
||||
control={control}
|
||||
render={({ field, fieldState }) => (
|
||||
<Field data-invalid={fieldState.invalid}>
|
||||
<Input
|
||||
type="number"
|
||||
value={field.value || ""}
|
||||
onChange={(e) => handleCostChange(idx, "bscPlanAmt", e.target.value)}
|
||||
onChange={(e) => handleCostChange(idx, "bgtRfltAmt", e.target.value)}
|
||||
readOnly={item.readonly}
|
||||
aria-invalid={fieldState.invalid}
|
||||
className={`text-right ${item.readonly ? "bg-muted" : ""}`}
|
||||
@@ -138,14 +138,14 @@ function BusinessCostFormSection() {
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<Controller
|
||||
name={`bizCstList.${idx}.bgtRfltAmt`}
|
||||
name={`bizCstList.${idx}.bscPlanAmt`}
|
||||
control={control}
|
||||
render={({ field, fieldState }) => (
|
||||
<Field data-invalid={fieldState.invalid}>
|
||||
<Input
|
||||
type="number"
|
||||
value={field.value || ""}
|
||||
onChange={(e) => handleCostChange(idx, "bgtRfltAmt", e.target.value)}
|
||||
onChange={(e) => handleCostChange(idx, "bscPlanAmt", e.target.value)}
|
||||
readOnly={item.readonly}
|
||||
aria-invalid={fieldState.invalid}
|
||||
className={`text-right ${item.readonly ? "bg-muted" : ""}`}
|
||||
|
||||
@@ -199,7 +199,7 @@ function SplmntDmndDialog({
|
||||
try {
|
||||
await attachService.deleteAttachmentByAtflId(atflId);
|
||||
} catch (error) {
|
||||
console.error("보완요청 첨부파일 삭제 실패:", error);
|
||||
console.error("보완 요청 첨부파일 삭제 실패:", error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ function SplmntDmndDialog({
|
||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||
<DialogContent className="max-w-[100rem]" aria-describedby={undefined}>
|
||||
<DialogHeader>
|
||||
<DialogTitle>보완요청</DialogTitle>
|
||||
<DialogTitle>보완 요청</DialogTitle>
|
||||
</DialogHeader>
|
||||
|
||||
<div className="space-y-3">
|
||||
@@ -322,7 +322,7 @@ function SplmntDmndDialog({
|
||||
취소
|
||||
</Button>
|
||||
<Button type="button" onClick={handleConfirm} disabled={!canSubmit}>
|
||||
보완요청
|
||||
보완 요청
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
</DialogContent>
|
||||
|
||||
Reference in New Issue
Block a user