Skip to content

Commit

Permalink
feat: 마지막으로 차등 정산을 적용하려는 참여자는 readOnly로 수정을 막도록 함
Browse files Browse the repository at this point in the history
  • Loading branch information
pakxe committed Aug 21, 2024
1 parent e276dca commit e701469
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,20 @@ const PutAndDeleteBillActionModal = ({
memberReportListInAction,
addAdjustedMember,
onSubmit: putMemberReportListInAction,
} = useMemberReportListInAction(billAction.actionId, billAction.price);
getIsSamePriceStateAndServerState,
getOnlyOneNotAdjustedRemainMemberIndex,
} = useMemberReportListInAction(billAction.actionId, Number(inputPair.price));
const {
inputList,
onChange,
canEditList,
canSubmit: isChangedMemberReportInput,
} = useMemberReportInput({
data: memberReportListInAction,
addAdjustedMember,
totalPrice: billAction.price,
getIsSamePriceStateAndServerState,
getOnlyOneNotAdjustedRemainMemberIndex,
});

const {data: stepListData = []} = useRequestGetStepList();
Expand Down Expand Up @@ -114,6 +119,7 @@ const PutAndDeleteBillActionModal = ({
value={price}
placeholder="0"
type="number"
readOnly={!canEditList[index]}
style={{textAlign: 'right'}}
></EditableItem.Input>
<Text size="caption"></Text>
Expand Down

0 comments on commit e701469

Please sign in to comment.