This repository was archived by the owner on Mar 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -6,13 +6,15 @@ import PageTitle from "components/PageTitle";
6
6
import {
7
7
getWorkPeriodsHasSelectedItems ,
8
8
getWorkPeriodsIsProcessingPayments ,
9
+ getWorkPeriodsIsSelectedAll ,
9
10
} from "store/selectors/workPeriods" ;
10
11
import { processPayments } from "store/thunks/workPeriods" ;
11
12
import styles from "./styles.module.scss" ;
12
13
13
14
const PeriodsContentHeader = ( ) => {
14
15
const hasSelectedItems = useSelector ( getWorkPeriodsHasSelectedItems ) ;
15
16
const isProcessingPayments = useSelector ( getWorkPeriodsIsProcessingPayments ) ;
17
+ const isSelectedAll = useSelector ( getWorkPeriodsIsSelectedAll ) ;
16
18
const dispatch = useDispatch ( ) ;
17
19
18
20
const onProcessPaymentsClick = useCallback ( ( ) => {
@@ -25,7 +27,9 @@ const PeriodsContentHeader = () => {
25
27
< Button
26
28
className = { styles . button }
27
29
variant = "contained"
28
- isDisabled = { ! hasSelectedItems || isProcessingPayments }
30
+ isDisabled = {
31
+ isProcessingPayments || ! ( hasSelectedItems || isSelectedAll )
32
+ }
29
33
onClick = { onProcessPaymentsClick }
30
34
>
31
35
Process Payment
You can’t perform that action at this time.
0 commit comments