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

setting up FE for adding to available bidders and grabbing button state #1259

Merged
merged 34 commits into from
Dec 22, 2020

Conversation

elizabeth-jimenez
Copy link

@elizabeth-jimenez elizabeth-jimenez commented Nov 23, 2020

Dual Merge: API PR 445

Ticket text 'Add to Internal List' and 'Remove from Internal List' too lengthy; 'Add' and 'Remove' replaced with icons

src/actions/cdo.js Outdated Show resolved Hide resolved
src/actions/cdo.js Outdated Show resolved Hide resolved
@mjoyce91
Copy link

I'm getting an error toast even though the PUT is successful

Screen Shot 2020-11-25 at 8 42 26 AM

src/reducers/cdo/cdo.js Outdated Show resolved Hide resolved
@mjoyce91
Copy link

Make sure to run makemigrations again as you have some uncommitted changes

@elizabeth-jimenez
Copy link
Author

@mjoyce91 I added more stuff to it 😭

Comment on lines 135 to 146
const config = {
method: remove ? 'delete' : 'put',
url: `cdo/${id}/availablebidders/`,
};
const getAction = () => api()(config);

batch(() => {
dispatch(availableBiddersToggleUserIsLoading(true));
dispatch(availableBiddersToggleUserErrored(false));
});

axios.all([getAction()])

Choose a reason for hiding this comment

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

A little confused by this. axios.all is for when you have multiple requests. You should just be able to call api() directly

Copy link
Author

Choose a reason for hiding this comment

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

if i remember correctly, i think just api()(config) was giving me trouble 🤔

Copy link
Author

Choose a reason for hiding this comment

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

it worked this time! 👀 must have been something else wrong when i had api()(config) and i just assumed it was that 🤷‍♀️

Comment on lines 146 to 145
axios.all([getAction()])
api()(config)

Choose a reason for hiding this comment

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

This end up working for you?

Copy link
Author

Choose a reason for hiding this comment

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

yes :) i commented above 👍

.then(() => {
const toastTitle = remove ? REMOVE_FROM_INTERNAL_LIST_SUCCESS_TITLE
: ADD_TO_INTERNAL_LIST_SUCCESS_TITLE;
// TODO: update this path during integration of Available Bidders

Choose a reason for hiding this comment

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

👍

@mjoyce91 mjoyce91 merged commit 42bfff9 into dev Dec 22, 2020
@mjoyce91 mjoyce91 deleted the feature/cdo-unassigned-bidders branch December 22, 2020 15:27
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