Allow for anonymous pulse submission and viewing in the pulse report.#2797
Allow for anonymous pulse submission and viewing in the pulse report.#2797mkimberlin merged 5 commits intodevelopfrom
Conversation
web-ui/src/pages/PulsePage.jsx
Outdated
| Cookies.set(cookieName, 'true', { expires: 1 }); | ||
| } else { | ||
| // Refresh browser to show that pulses where already submitted today. | ||
| history.go(0); |
There was a problem hiding this comment.
I know this wasn't you, but this is odd to me. Why are we refreshing the whole page to trigger a state change, I wonder... I blame @mvolkmann. I think he forgot how to write React code. 🤣
There was a problem hiding this comment.
Now that I think about this. Couldn't this whole if/else be turned into just lines 106-107?
There was a problem hiding this comment.
Yes. I think we can. Currently, the cookie is only used when anonymous. But, we could do it generically too. Also, the refresh was weird to me too.
There was a problem hiding this comment.
history.go(0) is the tool for when you can't find another way to get it to work and you are getting tired. ;-)
| <div style={{ padding: '.3rem' }}/> | ||
| <label> | ||
| <Checkbox | ||
| disableRipple |
There was a problem hiding this comment.
The ripple haunts my dreams now.
| @@ -0,0 +1 @@ | |||
| ALTER TABLE pulse_response DROP CONSTRAINT pulse_response_teamMemberId_fkey; | |||
There was a problem hiding this comment.
It seems odd to me that we would need to drop a foreign key reference to allow null. Is this in some way related to: https://stackoverflow.com/questions/23325838/postgresql-null-value-in-foreign-key-column ?
There was a problem hiding this comment.
@mkimberlin Honestly, I just assumed that because it was referencing the member_profile, that it could not be null. I did not test without this.
There was a problem hiding this comment.
I removed that file, it was not necessary and took out the history.go(0) call too.
No description provided.