Skip to content

Commit 98e47c9

Browse files
[SDANSA-576] Show seconds in publish schedule when configured (#5133) (#5212)
* [SDANSA-576] Show seconds in publish schedule when configured * [SDANSA-576] Add config-driven seconds support to publish schedule Co-authored-by: Brian Mwangi <mwangikabiru21@gmail.com>
1 parent 8bbcf14 commit 98e47c9

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

scripts/core/interactive-article-actions-panel/subcomponents/publishing-date-options.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ export class PublishingDateOptions extends React.PureComponent<IProps> {
115115

116116
const canSetEmbargo = this.props.allowSettingEmbargo && sdApi.user.hasPrivilege('embargo');
117117
const canSetPublishSchedule = this.props.allowSettingPublishSchedule;
118+
const allowSeconds = appConfig.authoring?.panels?.publish?.allowSeconds ?? false;
118119

119120
if (items.length !== 1) {
120121
return null;
@@ -127,6 +128,7 @@ export class PublishingDateOptions extends React.PureComponent<IProps> {
127128
<DateTimePicker
128129
value={embargo}
129130
valueType="date"
131+
allowSeconds={allowSeconds}
130132
locale={{
131133
type: 'full',
132134
payload: getLocaleForDatePicker(),
@@ -154,6 +156,7 @@ export class PublishingDateOptions extends React.PureComponent<IProps> {
154156
<DateTimePicker
155157
value={publishSchedule}
156158
valueType="date"
159+
allowSeconds={allowSeconds}
157160
locale={{
158161
type: 'full',
159162
payload: getLocaleForDatePicker(),

scripts/core/superdesk-api.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3802,6 +3802,7 @@ declare module 'superdesk-api' {
38023802

38033803
panels?: {
38043804
publish?: {
3805+
allowSeconds?: boolean;
38053806
publishSchedule?: boolean
38063807
publishingTarget?: boolean;
38073808
}

0 commit comments

Comments
 (0)