-
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
adding step letters to abl #1953
Conversation
@SidelineCory24 - is this ready for review? |
Yes. I see I only tagged someone on the BE PR 😅 |
@mjoyce91 I'm having the code climate/coverage issue again and there's no info when I click the details. |
@SidelineCory24 - just need to bump your test coverage |
const stepLetterOneDate = get(details, 'stepLetterOne') === null ? new Date() : new Date(get(details, 'stepLetterOne')); | ||
const stepLetterTwoDate = get(details, 'stepLetterTwo') === null ? new Date() : new Date(get(details, 'stepLetterTwo')); |
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.
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.
done
Optional suggestion: some users may not know that they can just delete the date to clear it. Maybe a red X icon like we have elsewhere? |
Good idea! |
@mjoyce91 in reference to the styling fixes, should I do that on this PR or the cleanup ticket that I'm working on with the other styling updates? |
I would do it in this one. I think of the cleanup more specifically as how we display the data in the table |
@SidelineCory24 - this actually isn't because of anything new in your code. This happens when you try to update a bidder with a null status. |
…lting/State-TalentMap into feature/abl-step-letters
const stepLetterOne = get(bidder, 'available_bidder_details.step_letter_one'); | ||
const formattedStepLetterOne = stepLetterOne ? formatDate(stepLetterOne) : NO_DATE; | ||
const stepLetterTwo = get(bidder, 'available_bidder_details.step_letter_two'); | ||
const formattedStepLetterTwo = stepLetterTwo ? formatDate(stepLetterTwo) : NO_DATE; |
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.
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.
done
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.
const stepLetterOne = get(bidder, 'available_bidder_details.step_letter_one'); | ||
const formattedStepLetterOne = stepLetterOne ? formatDate(stepLetterOne) : NO_DATE; | ||
const stepLetterTwo = get(bidder, 'available_bidder_details.step_letter_two'); | ||
const formattedStepLetterTwo = stepLetterTwo ? formatDate(stepLetterTwo) : NO_DATE; |
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.
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.
I was wondering that myself. I can remove it and it back if more clarity is needed. They can always use the editor as well to see the second letter has no date.
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.
done
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.
ss in above comment to show update
<div> | ||
<dt>Step Letter 1:</dt> | ||
<DatePicker | ||
selected={stepLetterOne} | ||
onChange={d => { updateStepLetterOne(d); }} | ||
dateFormat="MMMM d, yyyy" | ||
/> | ||
</div> | ||
<div> | ||
<dt>Step Letter 2:</dt> | ||
<DatePicker | ||
selected={stepLetterTwo} | ||
onChange={d => { updateStepLetterTwo(d); }} | ||
dateFormat="MMMM d, yyyy" | ||
/> | ||
</div> |
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.
Question: should we do data validation to ensure that Step Letter 1 exists before allowing them to enter Step Letter 2?
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.
And then it goes in reverse as well. If Step Letter 1 and Step Letter 2 both exist, can they delete Step Letter 1 without deleting Step Letter 2?
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.
Data validation makes sense. I'll do the None listed
styling like the OC edit options.
For the reverse option, making step1 read only if step2 isn't null
sounds good since step1 has to exist before step2.
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.
done
@mjoyce91 larger date picker styling has been pushed |
One edge case that isn't accounted for: Step 1. Give an available bidder 2 step letters |
* dev: abl table cleanup (#1976) # Conflicts: # src/Components/AvailableBidder/AvailableBidderRow/AvailableBidderRow.jsx # src/sass/_availableBidders.scss
@elizabeth-jimenez @mjoyce91 this should show all the changes based on feedback. step_letter_feedback.mp4
|
@SidelineCory24 I like the SL2 before SL1 date check. There may be a way to add that validation to the datepicker itself so that you can't even click on a past date. That can be a tech debt task. |
done step_letter_date_disabled.mp4 |
{stepLetterTwoFlag && | ||
<div className="step-letter-clear-icon"> | ||
<FA name="times-circle fa-lg inactive" /> | ||
</div> | ||
} | ||
{!stepLetterTwoFlag && | ||
<div className="step-letter-clear-icon"> | ||
<InteractiveElement | ||
onClick={clearStepLetterTwoDate} | ||
> | ||
<FA name="times-circle fa-lg active" /> | ||
</InteractiveElement> | ||
</div> | ||
} |
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.
can this be a .... 🥁 ternary?
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.
Yeah really lines 234-264 could all be encapsulated in a single ternary
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.
ternary fix has been pushed
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.
can they mike? like one big one? I see two smaller ones but can't see the big one :(
@elizabeth-jimenez - I think I like current functionality. That way if they delete SL1 on accident, they don't lose the SL2 date. |
ok cool 😁 - I could see the pros and cons to it |
@@ -407,6 +460,7 @@ | |||
} | |||
|
|||
.tippy-popper { | |||
// TODO - consolidate these two classes |
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.
i'm looking into consolidating them, but all good if we dont!
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.
i win
I got the consolidation!
|
this consolidation is being done on another pr |
BE PR
To-Do & Feedback:
submit
button if the red error outline appears around step 1 or 2