Skip to content
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

fix: Fix active_on if announcement is already published and fix datepicker buttons #763

Merged
merged 4 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
:enable-time-picker="false"
arrow-navigation
auto-apply
prevent-min-max-navigation
>
<template #day="{ day, date }">
<span :aria-label="formatDate(date)">
Expand All @@ -75,15 +74,16 @@
</v-col>

<v-col cols="12" sm="6" md="6" lg="4" xl="3" class="d-flex flex-column">
<h5>Expiry date range <FilterDateRangeTooltip id="expires-on-tooltip" /></h5>
<h5>
Expiry date range <FilterDateRangeTooltip id="expires-on-tooltip" />
</h5>
<VueDatePicker
v-model="expiryDateRange"
range
format="yyyy-MM-dd"
:enable-time-picker="false"
arrow-navigation
auto-apply
prevent-min-max-navigation
placeholder="Select date range"
>
<template #day="{ day, date }">
Expand Down
1 change: 1 addition & 0 deletions backend/src/v1/services/announcements-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ export const updateAnnouncement = async (
}

if (
input.status != AnnouncementStatus.Published && // If announcement is already published, don't change the active_on
!isEmpty(input.active_on) &&
ZonedDateTime.parse(input.active_on).isBefore(ZonedDateTime.now())
) {
Expand Down