Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/submitted bulk actions #3350

Open
wants to merge 9 commits into
base: staging
Choose a base branch
from

Conversation

clari182
Copy link
Collaborator

@clari182 clari182 commented Feb 4, 2025

@clari182 clari182 marked this pull request as ready for review February 7, 2025 13:36
@clari182 clari182 requested a review from pdcp1 February 7, 2025 13:38
setSelectedRows(newSelection);
};

// Function to check if all rows are selected
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change this filter code for something like more clear like:
selectedRows.filter()

},
});
}
columns = columns.concat([
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Utilize columns.push to maintain consistency.


const bulkActions = async () => {
try {
const selectedSubmissions = Object.keys(selectedRows).filter(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change to selectRows.filter

const addToast = useToastContext();

const [selectedRows, setSelectedRows] = useState({});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe selectedRows should be an array of objects rather than a single object.

);

if (selectedSubmissions.length > 0) {
if (selectedAction === 'claim') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please refactor this code to extract three different functions for each action (claim, unclaim, and reject)?

@pdcp1 pdcp1 assigned pdcp1 and clari182 and unassigned pdcp1 Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants