Skip to content

Commit f8f4a8a

Browse files
committed
#1583 added doc comments
1 parent 92f7638 commit f8f4a8a

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

src/backend/src/utils/reimbursement-requests.utils.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,12 @@ export const validateUserEditRRPermissions = async (
396396
}
397397
};
398398

399+
/**
400+
* Validates that the refund amount is less than the total amount owed to the user
401+
* @param user the user reporting or editing a refund
402+
* @param refundAmount the amount of the refund
403+
* @param organizationId the organization the request pertains to
404+
*/
399405
export const validateRefund = async (user: User, refundAmount: number, organizationId: string) => {
400406
const totalOwed = await prisma.reimbursement_Request
401407
.findMany({

src/frontend/src/hooks/finance.hooks.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,10 @@ export const useReportRefund = () => {
426426
);
427427
};
428428

429+
/**
430+
* Custom react hook to edit a refund
431+
* @returns the edited refund
432+
*/
429433
export const useEditRefund = () => {
430434
const queryClient = useQueryClient();
431435

0 commit comments

Comments
 (0)