#15-messages #22

Merged
jkeffects merged 19 commits from #15-messages into main 2024-12-31 13:25:27 +00:00
3 changed files with 11 additions and 7 deletions
Showing only changes of commit faadc71b1b - Show all commits

View file

@ -75,7 +75,6 @@
<select id="date" ref="date" value="" required>
<option value="" disabled>Datum wählen</option>
<option v-for="cal in filteredCalendar" :key="cal.id" :value="cal.id">
{{ cal.title }}
{{
cal.allDay
? new Date(cal.starttime).toLocaleDateString("de-DE", {
@ -91,6 +90,8 @@
minute: "2-digit",
})
}}
-
{{ cal.title }}
</option>
</select>
<button type="submit" primary class="!w-fit">hinzufügen</button>
@ -124,7 +125,9 @@ export default defineComponent({
...mapState(useCalendarStore, ["calendars"]),
...mapState(useAbilityStore, ["can"]),
filteredCalendar() {
return this.calendars.filter((c) => !this.dates.map((d) => d.calendarId).includes(c.id));
return this.calendars.filter(
(c) => !this.dates.map((d) => d.calendarId).includes(c.id) && new Date(c.starttime) >= new Date()
);
},
sortedDates() {
return this.dates.sort(

View file

@ -10,7 +10,7 @@
<div class="bg-primary p-2 text-white flex flex-row justify-between items-center">
<p>{{ print }}</p>
<div class="flex flex-row">
<div>
<div v-if="print.endsWith('.pdf')">
<ViewfinderCircleIcon class="w-5 h-5 p-1 box-content cursor-pointer" @click="openPdfShow(print)" />
</div>
<div>
@ -25,7 +25,7 @@
<button
v-if="can('create', 'club', 'newsletter')"
primary
class="!w-fit"
class="!w-fit whitespace-nowrap flex flex-row gap-2"
:disabled="printing != undefined"
@click="createNewsletterPrintout"
>
@ -37,7 +37,7 @@
<button
v-if="can('create', 'club', 'newsletter')"
primary
class="!w-fit"
class="!w-fit whitespace-nowrap flex flex-row gap-2"
:disabled="sending != undefined"
@click="createNewsletterSend"
>
@ -52,7 +52,7 @@
<button
v-if="can('create', 'club', 'newsletter')"
primary-outline
class="!w-fit"
class="!w-fit whitespace-nowrap flex flex-row gap-2"
:disabled="sendingPreview != undefined"
@click="createNewsletterMailPreview"
>
@ -111,7 +111,7 @@ export default defineComponent({
const fileURL = window.URL.createObjectURL(new Blob([response.data]));
const fileLink = document.createElement("a");
fileLink.href = fileURL;
fileLink.setAttribute("download", filename + ".pdf");
fileLink.setAttribute("download", filename);
document.body.appendChild(fileLink);
fileLink.click();
fileLink.remove();

View file

@ -172,6 +172,7 @@ export default defineComponent({
return this.members.filter((m) => this.recipients.includes(m.id));
},
queried(): Array<MemberViewModel> {
if (this.recipientsByQueryId == "def") return [];
let keys = Object.keys(this.data?.[0] ?? {});
let memberKey = keys.find((k) => k.includes("member_id"));
return this.members.filter((m) =>