Skip to content

Commit

Permalink
feat: Implement edit note publication schedule - EXO-75389 - Meeds-io…
Browse files Browse the repository at this point in the history
…/MIPs#161 (#1214)

Implement edit note publication schedule
  • Loading branch information
hakermi committed Nov 26, 2024
1 parent 6a1afb2 commit 3b129a3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
:publish="publicationSettings?.publish"
:is-publishing="isPublishing"
:edit-mode="editMode"
:from-external-page="noteObject?.fromExternalPage"
:saved-schedule-settings="{
scheduled: currentScheduleSettings?.schedule,
postDate: currentScheduleSettings?.postDate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,17 +203,19 @@
</template>
<script>
const SCHEDULE_OPTION = 'schedule';
const PUBLISH_NOW_OPTION = 'publish_now';
const CANCEL_SCHEDULE_OPTION = 'cancel_schedule';
const CANCEL_PUBLICATION_OPTION = 'cancel_unpublish';
export const SCHEDULE_OPTION = 'schedule';
export const PUBLISH_NOW_OPTION = 'publish_now';
export const CANCEL_SCHEDULE_OPTION = 'cancel_schedule';
export const CANCEL_PUBLICATION_OPTION = 'cancel_unpublish';
export default {
data() {
const { startDate, minStartDate, endDate } = this.initDateValues();
const betweenScheduleType = {label: this.$t('notes.publication.schedule.between.label'), value: 'between'};
const untilScheduleType = {label: this.$t('notes.publication.schedule.until.label'), value: 'until'};
const fromScheduleType = {label: this.$t('notes.publication.schedule.from.label'), value: 'from'};
return {
CANCEL_SCHEDULE_OPTION,
CANCEL_PUBLICATION_OPTION,
editScheduleOption: null,
schedule: false,
betweenScheduleType: betweenScheduleType,
Expand Down Expand Up @@ -266,6 +268,10 @@ export default {
canPublish: {
type: Boolean,
default: false
},
fromExternalPage: {
type: Boolean,
default: false
}
},
watch: {
Expand Down Expand Up @@ -307,10 +313,6 @@ export default {
isMultipleSelectionOption() {
return this.schedule && this.isUntilScheduleType && !this.hasSavedUnpublishSchedule;
},
cancelOption() {
return this.hasSavedUnpublishSchedule && {label: this.$t('notes.publication.publish.cancel.label'), value: CANCEL_PUBLICATION_OPTION}
|| {label: this.$t('notes.publication.schedule.cancel.label'), value: CANCEL_SCHEDULE_OPTION};
},
formattedStartDate() {
return this.startDate && this.formatDate(this.startDate) || '';
},
Expand Down

0 comments on commit 3b129a3

Please sign in to comment.