Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b50ea7a

Browse files
committedJul 5, 2021
Added comments for PaymentCancel component.
1 parent 7ccac08 commit b50ea7a

File tree

1 file changed

+11
-0
lines changed
  • src/routes/WorkPeriods/components/PaymentCancel

1 file changed

+11
-0
lines changed
 

‎src/routes/WorkPeriods/components/PaymentCancel/index.jsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@ import { cancelWorkPeriodPayment } from "services/workPeriods";
1212
import styles from "./styles.module.scss";
1313
import { loadWorkPeriodAfterPaymentCancel } from "store/thunks/workPeriods";
1414

15+
/**
16+
* Displays a Cancel button. Shows a modal with payment cancelling confirmation
17+
* when clicking this button.
18+
*
19+
* @param {Object} props component properties
20+
* @param {string} [props.className] class name to be added to root element
21+
* @param {Object} props.item payment object with id, workPeriodId and status
22+
* @param {number} [props.timeout] timeout the delay after cancelling payment
23+
* after which an attempt will be made to update working period's data from the server
24+
* @returns {JSX.Element}
25+
*/
1526
const PaymentCancel = ({ className, item, timeout = 3000 }) => {
1627
const { id: paymentId, workPeriodId: periodId } = item;
1728
const [isModalOpen, setIsModalOpen] = useState(false);

0 commit comments

Comments
 (0)
This repository has been archived.