Skip to content
Snippets Groups Projects
Commit a54fcbf8 authored by Andreas Ellewsen's avatar Andreas Ellewsen
Browse files

Merge branch 'bugfix/past-start-dates-okay' into 'master'

Allow changing past start dates of roles in webui

See merge request !248
parents 740d8f62 538e68ca
No related branches found
No related tags found
1 merge request!248Allow changing past start dates of roles in webui
Pipeline #111221 passed
......@@ -77,10 +77,7 @@ export default function GuestRoleInfo({ guest }: GuestRoleInfoProps) {
const submit: SubmitHandler<RoleFormData> = (data) => {
const payload: { start_date?: string; end_date: string } = {
end_date: format(data.end_date as Date, 'yyyy-MM-dd'),
}
// Ignore start dates before today ()
if (data.start_date >= today) {
payload.start_date = format(data.start_date as Date, 'yyyy-MM-dd')
start_date: format(data.start_date as Date, 'yyyy-MM-dd'),
}
console.log('submitting', JSON.stringify(payload))
......
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