Skip to content
Snippets Groups Projects
Commit b68cc018 authored by Marte Fossum's avatar Marte Fossum
Browse files

GREG-330: Remove old confirmation-/error message

parent 59bed020
No related branches found
No related tags found
1 merge request!388GREG-330: Remove old confirmation-/error message
...@@ -104,7 +104,7 @@ export default function SponsorGuestButtons(props: SponsorGuestButtonsProps) { ...@@ -104,7 +104,7 @@ export default function SponsorGuestButtons(props: SponsorGuestButtonsProps) {
{cancelledInvitationFor && ( {cancelledInvitationFor && (
<Alert <Alert
sx={{ fontSize: '1.375rem', marginTop: '1rem', marginBottom: '1rem' }} sx={{ fontSize: '1.375rem', marginTop: '1rem', marginBottom: '1rem' }}
severity="info" severity="success"
> >
{t('guestInfo.invitationCancelled', { {t('guestInfo.invitationCancelled', {
name: cancelledInvitationFor, name: cancelledInvitationFor,
......
...@@ -150,6 +150,8 @@ export default function GuestRoleInfo({ ...@@ -150,6 +150,8 @@ export default function GuestRoleInfo({
const newEndDate = addDays(-1)(today) const newEndDate = addDays(-1)(today)
if (role.start_date !== undefined && role.start_date > newEndDate) { if (role.start_date !== undefined && role.start_date > newEndDate) {
setBadEndDate(true) setBadEndDate(true)
setShowPeriodChange(false)
setShowPeriodChangeFailed(false)
} else { } else {
role.end_date = newEndDate role.end_date = newEndDate
endPeriodPost(role_id, { end_date: newEndDate }, reloadGuests) endPeriodPost(role_id, { end_date: newEndDate }, reloadGuests)
...@@ -196,7 +198,13 @@ export default function GuestRoleInfo({ ...@@ -196,7 +198,13 @@ export default function GuestRoleInfo({
.then((result) => { .then((result) => {
if (result !== null) { if (result !== null) {
setShowPeriodChange(true) setShowPeriodChange(true)
setBadEndDate(false)
setShowPeriodChangeFailed(false)
console.log('result', result) console.log('result', result)
} else {
setShowPeriodChangeFailed(true)
setShowPeriodChange(false)
setBadEndDate(false)
} }
// Reload the guest so that the information on the overview page is updated // Reload the guest so that the information on the overview page is updated
reloadGuests() reloadGuests()
......
...@@ -177,6 +177,8 @@ export default function StepRegistration() { ...@@ -177,6 +177,8 @@ export default function StepRegistration() {
const handleBack = () => { const handleBack = () => {
setActiveStep((prevActiveStep) => prevActiveStep - 1) setActiveStep((prevActiveStep) => prevActiveStep - 1)
setFormDataErrorReport(undefined)
setSubmitErrorReport(undefined)
} }
const handleForwardFromRegister = ( const handleForwardFromRegister = (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment