-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
Make sure to run |
src/Components/BidderPortfolio/AddToInternalListButton/AddToInternalListButton.jsx
Outdated
Show resolved
Hide resolved
src/Components/BidderPortfolio/AddToInternalListButton/AddToInternalListButton.jsx
Outdated
Show resolved
Hide resolved
…etaPhase-Consulting/State-TalentMAP into feature/cdo-unassigned-bidders
@mjoyce91 I added more stuff to it 😭 |
src/Components/BidderPortfolio/AddToInternalListButton/AddToInternalListButton.jsx
Outdated
Show resolved
Hide resolved
src/actions/cdo.js
Outdated
const config = { | ||
method: remove ? 'delete' : 'put', | ||
url: `cdo/${id}/availablebidders/`, | ||
}; | ||
const getAction = () => api()(config); | ||
|
||
batch(() => { | ||
dispatch(availableBiddersToggleUserIsLoading(true)); | ||
dispatch(availableBiddersToggleUserErrored(false)); | ||
}); | ||
|
||
axios.all([getAction()]) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 🤔
There was a problem hiding this comment.
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 🤷♀️
src/Components/BidderPortfolio/AddToInternalListButton/AddToInternalListButton.jsx
Outdated
Show resolved
Hide resolved
src/actions/cdo.js
Outdated
axios.all([getAction()]) | ||
api()(config) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Dual Merge: API PR 445
Ticket text 'Add to Internal List' and 'Remove from Internal List' too lengthy; 'Add' and 'Remove' replaced with icons