diff --git a/src/main.css b/src/main.css
index 4cd20c5..d5c8f00 100644
--- a/src/main.css
+++ b/src/main.css
@@ -98,12 +98,12 @@ select[disabled] {
details {
user-select: none;
- & summary svg {
+ & summary svg[indicator] {
transform: rotate(90deg);
}
}
details[open] {
- & summary svg {
+ & summary svg[indicator] {
transform: rotate(-90deg);
}
}
diff --git a/src/stores/admin/newsletterDates.ts b/src/stores/admin/newsletterDates.ts
index 9e1e23f..8666d18 100644
--- a/src/stores/admin/newsletterDates.ts
+++ b/src/stores/admin/newsletterDates.ts
@@ -17,7 +17,16 @@ export const useNewsletterDatesStore = defineStore("newsletterDates", {
},
getters: {
detectedChangeNewsletterDates: (state) =>
- !isEqual(state.origin, state.dates) && state.syncingNewsletterDates != "syncing",
+ !isEqual(
+ state.origin.sort(
+ (a: NewsletterDatesViewModel, b: NewsletterDatesViewModel) =>
+ new Date(a.calendar.starttime).getTime() - new Date(b.calendar.starttime).getTime()
+ ),
+ state.dates.sort(
+ (a: NewsletterDatesViewModel, b: NewsletterDatesViewModel) =>
+ new Date(a.calendar.starttime).getTime() - new Date(b.calendar.starttime).getTime()
+ )
+ ) && state.syncingNewsletterDates != "syncing",
},
actions: {
setNewsletterDatesSyncingState(state: "synced" | "syncing" | "detectedChanges" | "failed") {
@@ -45,7 +54,7 @@ export const useNewsletterDatesStore = defineStore("newsletterDates", {
await http
.patch(`/admin/newsletter/${newsletterId}/synchronize/dates`, {
- dates: differenceWith(this.dates, this.origin, isEqual),
+ dates: this.dates,
})
.then((res) => {
this.syncingNewsletterDates = "synced";
diff --git a/src/viewmodels/admin/newsletterDates.models.ts b/src/viewmodels/admin/newsletterDates.models.ts
index b913b8a..5afe116 100644
--- a/src/viewmodels/admin/newsletterDates.models.ts
+++ b/src/viewmodels/admin/newsletterDates.models.ts
@@ -2,14 +2,14 @@ import type { CalendarViewModel } from "./calendar.models";
export interface NewsletterDatesViewModel {
newsletterId: number;
- calendarId: number;
+ calendarId: string;
diffTitle: string | null;
diffDescription: string | null;
calendar: CalendarViewModel;
}
export interface SyncNewsletterDatesViewModel {
- calendarId: number;
+ calendarId: string;
diffTitle?: string;
diffDescription?: string;
}
diff --git a/src/views/admin/club/newsletter/NewsletterDates.vue b/src/views/admin/club/newsletter/NewsletterDates.vue
index 9879f42..0434655 100644
--- a/src/views/admin/club/newsletter/NewsletterDates.vue
+++ b/src/views/admin/club/newsletter/NewsletterDates.vue
@@ -12,41 +12,89 @@
>
{{ item.calendar.title }} {{ item.calendar.starttime }}
+ {{ item.calendar.title }}:
+ {{
+ item.calendar.allDay
+ ? new Date(item.calendar.starttime ?? "").toLocaleDateString("de-DE", {
+ day: "2-digit",
+ month: "long",
+ year: "numeric",
+ })
+ : new Date(item.calendar.starttime ?? "").toLocaleDateString("de-DE", {
+ day: "2-digit",
+ month: "long",
+ year: "numeric",
+ hour: "2-digit",
+ minute: "2-digit",
+ })
+ }}
+
{{ member.lastname }}, {{ member.firstname }} {{ member.nameaffix ? `- ${member.nameaffix}` : "" }}
-Newsletter senden an Typ: {{ member.sendNewsletter?.type.type }}
-{{ member.lastname }}, {{ member.firstname }} {{ member.nameaffix ? `- ${member.nameaffix}` : "" }}
+Newsletter senden an Typ: {{ member.sendNewsletter?.type.type }}
+