styling & filtering
This commit is contained in:
parent
080b6a2b78
commit
faadc71b1b
3 changed files with 11 additions and 7 deletions
|
@ -75,7 +75,6 @@
|
||||||
<select id="date" ref="date" value="" required>
|
<select id="date" ref="date" value="" required>
|
||||||
<option value="" disabled>Datum wählen</option>
|
<option value="" disabled>Datum wählen</option>
|
||||||
<option v-for="cal in filteredCalendar" :key="cal.id" :value="cal.id">
|
<option v-for="cal in filteredCalendar" :key="cal.id" :value="cal.id">
|
||||||
{{ cal.title }}
|
|
||||||
{{
|
{{
|
||||||
cal.allDay
|
cal.allDay
|
||||||
? new Date(cal.starttime).toLocaleDateString("de-DE", {
|
? new Date(cal.starttime).toLocaleDateString("de-DE", {
|
||||||
|
@ -91,6 +90,8 @@
|
||||||
minute: "2-digit",
|
minute: "2-digit",
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
|
-
|
||||||
|
{{ cal.title }}
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
<button type="submit" primary class="!w-fit">hinzufügen</button>
|
<button type="submit" primary class="!w-fit">hinzufügen</button>
|
||||||
|
@ -124,7 +125,9 @@ export default defineComponent({
|
||||||
...mapState(useCalendarStore, ["calendars"]),
|
...mapState(useCalendarStore, ["calendars"]),
|
||||||
...mapState(useAbilityStore, ["can"]),
|
...mapState(useAbilityStore, ["can"]),
|
||||||
filteredCalendar() {
|
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() {
|
sortedDates() {
|
||||||
return this.dates.sort(
|
return this.dates.sort(
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<div class="bg-primary p-2 text-white flex flex-row justify-between items-center">
|
<div class="bg-primary p-2 text-white flex flex-row justify-between items-center">
|
||||||
<p>{{ print }}</p>
|
<p>{{ print }}</p>
|
||||||
<div class="flex flex-row">
|
<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)" />
|
<ViewfinderCircleIcon class="w-5 h-5 p-1 box-content cursor-pointer" @click="openPdfShow(print)" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
<button
|
<button
|
||||||
v-if="can('create', 'club', 'newsletter')"
|
v-if="can('create', 'club', 'newsletter')"
|
||||||
primary
|
primary
|
||||||
class="!w-fit"
|
class="!w-fit whitespace-nowrap flex flex-row gap-2"
|
||||||
:disabled="printing != undefined"
|
:disabled="printing != undefined"
|
||||||
@click="createNewsletterPrintout"
|
@click="createNewsletterPrintout"
|
||||||
>
|
>
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
<button
|
<button
|
||||||
v-if="can('create', 'club', 'newsletter')"
|
v-if="can('create', 'club', 'newsletter')"
|
||||||
primary
|
primary
|
||||||
class="!w-fit"
|
class="!w-fit whitespace-nowrap flex flex-row gap-2"
|
||||||
:disabled="sending != undefined"
|
:disabled="sending != undefined"
|
||||||
@click="createNewsletterSend"
|
@click="createNewsletterSend"
|
||||||
>
|
>
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
<button
|
<button
|
||||||
v-if="can('create', 'club', 'newsletter')"
|
v-if="can('create', 'club', 'newsletter')"
|
||||||
primary-outline
|
primary-outline
|
||||||
class="!w-fit"
|
class="!w-fit whitespace-nowrap flex flex-row gap-2"
|
||||||
:disabled="sendingPreview != undefined"
|
:disabled="sendingPreview != undefined"
|
||||||
@click="createNewsletterMailPreview"
|
@click="createNewsletterMailPreview"
|
||||||
>
|
>
|
||||||
|
@ -111,7 +111,7 @@ export default defineComponent({
|
||||||
const fileURL = window.URL.createObjectURL(new Blob([response.data]));
|
const fileURL = window.URL.createObjectURL(new Blob([response.data]));
|
||||||
const fileLink = document.createElement("a");
|
const fileLink = document.createElement("a");
|
||||||
fileLink.href = fileURL;
|
fileLink.href = fileURL;
|
||||||
fileLink.setAttribute("download", filename + ".pdf");
|
fileLink.setAttribute("download", filename);
|
||||||
document.body.appendChild(fileLink);
|
document.body.appendChild(fileLink);
|
||||||
fileLink.click();
|
fileLink.click();
|
||||||
fileLink.remove();
|
fileLink.remove();
|
||||||
|
|
|
@ -172,6 +172,7 @@ export default defineComponent({
|
||||||
return this.members.filter((m) => this.recipients.includes(m.id));
|
return this.members.filter((m) => this.recipients.includes(m.id));
|
||||||
},
|
},
|
||||||
queried(): Array<MemberViewModel> {
|
queried(): Array<MemberViewModel> {
|
||||||
|
if (this.recipientsByQueryId == "def") return [];
|
||||||
let keys = Object.keys(this.data?.[0] ?? {});
|
let keys = Object.keys(this.data?.[0] ?? {});
|
||||||
let memberKey = keys.find((k) => k.includes("member_id"));
|
let memberKey = keys.find((k) => k.includes("member_id"));
|
||||||
return this.members.filter((m) =>
|
return this.members.filter((m) =>
|
||||||
|
|
Loading…
Reference in a new issue