From 5f633bbfa3a79a295955c883a8e734f08def321a Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Sun, 20 Mar 2022 13:49:26 -0400 Subject: [PATCH] Change name for the announcement being edited to editedAnnouncement --- src/components/announcement/announcement.js | 12 ++++++------ src/components/announcement/announcement.vue | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/announcement/announcement.js b/src/components/announcement/announcement.js index 893a07e0..caa0543e 100644 --- a/src/components/announcement/announcement.js +++ b/src/components/announcement/announcement.js @@ -9,7 +9,7 @@ const Announcement = { data () { return { editing: false, - newAnnouncement: { + editedAnnouncement: { content: '', startsAt: undefined, endsAt: undefined, @@ -65,16 +65,16 @@ const Announcement = { return this.announcement['all_day'] ? d.toLocaleDateString(locale) : d.toLocaleString(locale) }, enterEditMode () { - this.newAnnouncement.content = this.announcement.pleroma['raw_content'] - this.newAnnouncement.startsAt = this.announcement['starts_at'] - this.newAnnouncement.endsAt = this.announcement['ends_at'] - this.newAnnouncement.allDay = this.announcement['all_day'] + this.editedAnnouncement.content = this.announcement.pleroma['raw_content'] + this.editedAnnouncement.startsAt = this.announcement['starts_at'] + this.editedAnnouncement.endsAt = this.announcement['ends_at'] + this.editedAnnouncement.allDay = this.announcement['all_day'] this.editing = true }, submitEdit () { this.$store.dispatch('editAnnouncement', { id: this.announcement.id, - ...this.newAnnouncement + ...this.editedAnnouncement }) .then(() => { this.editing = false diff --git a/src/components/announcement/announcement.vue b/src/components/announcement/announcement.vue index f3b73d89..72d99d85 100644 --- a/src/components/announcement/announcement.vue +++ b/src/components/announcement/announcement.vue @@ -12,7 +12,7 @@ />