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
Prepare for 2023-admission #1206
Conversation
ABA-464 Remove prioritization text
HS has decided that we should no longer ask applicants to include a prioritization text, thus it should be removed (or hidden) from the website. Here is the background for the decision: Slik det er i dag har de som søker komité i Abakus mulighet til å prioritere hvilke komitéer de har mest lyst å være med i. Dette gir kandidatene et inntrykk av at deres prioritering har en påvirkning på hvilken komité de kommer med i, men realiteten er at denne prioriteringen brukes i aller minste grad. Det varierer også basert på hvem som er leder/nestleder for Abakus under opptaket. Det er altså ingen klare retningslinjer på hvordan man skal håndtere kandidaters egen prioritering. Prosjektet anbefaler derfor at prioritering fjernes. Hovedstyret velger derfor å inkludere et krav til at prioritering fjernes fra og med opptak 2023. ABA-463 Add information about usage of application-text
It should follow the following guidelines descided by HS: Hovedstyret velger basert på rapporten at man skal informere om at søknaden brukes i intervjuprosessen, men at man får intervju uansett. Da er motivasjonen større til å skrive en god søknad og til å bruke den underveis. Det anbefales også å spesifisere tydeligere hva kandidatene skal skrive. Det kan blant Ledelsen avgjøre om dette skal være generalisert for alle komitéene, eller spesifikt for hver komité. |
useEffect(() => { | ||
initializeValue(); | ||
}, []); | ||
|
||
const initializeValue = () => { | ||
const groupName = props.group.name.toLowerCase(); | ||
|
||
const restoredApplicationText = getApplictionTextDrafts(); | ||
|
||
if (restoredApplicationText != null && restoredApplicationText[groupName]) { | ||
props.form.setFieldValue(groupName, restoredApplicationText[groupName]); | ||
} | ||
}; | ||
|
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 code has the same functionality as what I modified in Applicationform/index.tsx
line 111. No need to do it twice.
useEffect(() => { | ||
// Only run on first load after myApplication is set | ||
if (isEditingApplication === null && myApplication !== undefined) { | ||
// Set to is not editing if myApplication exists (user has submitted an application) | ||
setIsEditingApplication(!myApplication); | ||
} | ||
}, [isEditingApplication, myApplication]); |
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 logic sets what isEditingApplication
should be on page load (the variable that decides if you see the page where you edit your application OR the receipt page you get after submitting the application).
The way I set it to now, it will always show the receipt page if you have previously submitted an application.
A more ideal behavior might be to save a timestamp to the application draft (in session storage) and compare that to the timestamp of the submitted application
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.
how did this work before?
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.
Previously it worked the same way as it does now, although with a little bug where you had to press the submit-button twice when you were making an application (because the initial value was still null, and not true or false -> implying that when you pressed the button it changed from null to true, then from true to false the second time - and you only see the receipt page when it is not true).
So the option to change stuff is more of a future improvement so to say
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.
Only have 1 question ^^^, everything else looks 💯
useEffect(() => { | ||
// Only run on first load after myApplication is set | ||
if (isEditingApplication === null && myApplication !== undefined) { | ||
// Set to is not editing if myApplication exists (user has submitted an application) | ||
setIsEditingApplication(!myApplication); | ||
} | ||
}, [isEditingApplication, myApplication]); |
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.
how did this work before?
Make overlay stick over icons Translate ActionButton to Norwegian Remove unnecessary use of draft in GroupApplication component
5f0476d
to
6464c77
Compare
Changes
Currently I have made no changes to the admin-views or the backend - as the priority-text was never mandatory. Thus it now works as if all applicants left them blank, and the admins will see it as an empty box. If anyone wants to remove it from the admin-view as well that should be a quick fix.
Visual changes;
Resolves ABA-464, ABA-463