Skip to content

Candidatures : Indiquer la date minimale pour les champs début et fin de contrat#4597

Merged
francoisfreitag merged 1 commit into
masterfrom
ff/min-hiring-start-at
Aug 26, 2024
Merged

Candidatures : Indiquer la date minimale pour les champs début et fin de contrat#4597
francoisfreitag merged 1 commit into
masterfrom
ff/min-hiring-start-at

Conversation

@francoisfreitag

@francoisfreitag francoisfreitag commented Aug 26, 2024

Copy link
Copy Markdown
Member

🤔 Pourquoi ?

Évite des erreurs utilisateurs.

image

@francoisfreitag francoisfreitag self-assigned this Aug 26, 2024
@francoisfreitag francoisfreitag added the modifié Modifié dans le changelog. label Aug 26, 2024
Comment thread itou/www/apply/forms.py Outdated
self.fields["hiring_start_at"].required = True
for field in ["hiring_start_at", "hiring_end_at"]:
self.fields[field].widget = DuetDatePickerWidget()
self.fields[field].widget = DuetDatePickerWidget(attrs={"min": timezone.localdate().isoformat()})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Si j'en crois .clean_hiring_start_at(), les GEIQ peuvent embaucher rétroactivement, mais on veux peut-être supprimé cela maintenant que ça fait quelque temps que c'est ouvert pour eux.
Et peut-être aussi ajouter le max pour hiring_start_at au passage 🤷.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread itou/www/apply/forms.py
if not self.is_geiq:
today = timezone.localdate()
attrs_min["min"] = today.isoformat()
attrs_max["max"] = (today + relativedelta(months=6)).isoformat()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L'erreur dans le futur est commune ;).

@francoisfreitag francoisfreitag added this pull request to the merge queue Aug 26, 2024
Merged via the queue into master with commit 1e7d08e Aug 26, 2024
@francoisfreitag francoisfreitag deleted the ff/min-hiring-start-at branch August 26, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

modifié Modifié dans le changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants