From d30904883663eb9210f261e52f6334ec2642e590 Mon Sep 17 00:00:00 2001 From: thecalcc Date: Thu, 14 Sep 2023 13:39:30 +0300 Subject: [PATCH] Fix lint --- client/planning-extension/src/extension.ts | 74 +++++++++++----------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/client/planning-extension/src/extension.ts b/client/planning-extension/src/extension.ts index 0da0ab372..c8c1f4d44 100644 --- a/client/planning-extension/src/extension.ts +++ b/client/planning-extension/src/extension.ts @@ -111,48 +111,48 @@ const extension: IExtension = { const displayTopbarWidget = superdesk.privileges.hasPrivilege('planning_assignments_view') && extensionConfig?.assignmentsTopBarWidget === true; - const result: IExtensionActivationResult = { - contributions: { - entities: { - article: { - getActions: (item) => [{ - label: superdesk.localization.gettext('Fulfil assignment'), - groupId: 'planning-actions', - icon: 'calendar-list', - onTrigger: () => { - if ( - !item.assignment_id && - isContentLinkToCoverageAllowed(item) && - !ng.get('archiveService').isPersonal(item) && - ng.get('privileges').hasUserPrivileges({archive: 1}) && - !superdesk.entities.article.isLockedInOtherSession(item) && - !['killed', 'recalled', 'unpublished', 'spiked', 'correction'].includes(item.state) - ) { - const event = new CustomEvent("planning:fulfilassignment", {detail: item}); - window.dispatchEvent(event); - } - }, - }], - onSpike: (item: IArticle) => onSpike(superdesk, item), - onSpikeMultiple: (items: Array) => onSpikeMultiple(superdesk, items), - onPublish: (item: IArticle) => onPublishArticle(superdesk, item), - onRewriteAfter: (item: IArticle) => onArticleRewriteAfter(superdesk, item), - onSendBefore: (items: Array, desk: IDesk) => onSendBefore(superdesk, items, desk), - }, - ingest: { - ruleHandlers: { - planning_publish: { - editor: AutopostIngestRuleEditor, - preview: AutopostIngestRulePreview, - }, + const result: IExtensionActivationResult = { + contributions: { + entities: { + article: { + getActions: (item) => [{ + label: superdesk.localization.gettext('Fulfil assignment'), + groupId: 'planning-actions', + icon: 'calendar-list', + onTrigger: () => { + if ( + !item.assignment_id && + isContentLinkToCoverageAllowed(item) && + !ng.get('archiveService').isPersonal(item) && + ng.get('privileges').hasUserPrivileges({archive: 1}) && + !superdesk.entities.article.isLockedInOtherSession(item) && + !['killed', 'recalled', 'unpublished', 'spiked', 'correction'].includes(item.state) + ) { + const event = new CustomEvent("planning:fulfilassignment", {detail: item}); + window.dispatchEvent(event); + } + }, + }], + onSpike: (item: IArticle) => onSpike(superdesk, item), + onSpikeMultiple: (items: Array) => onSpikeMultiple(superdesk, items), + onPublish: (item: IArticle) => onPublishArticle(superdesk, item), + onRewriteAfter: (item: IArticle) => onArticleRewriteAfter(superdesk, item), + onSendBefore: (items: Array, desk: IDesk) => onSendBefore(superdesk, items, desk), + }, + ingest: { + ruleHandlers: { + planning_publish: { + editor: AutopostIngestRuleEditor, + preview: AutopostIngestRulePreview, }, }, }, - globalMenuHorizontal: displayTopbarWidget ? [AssignmentsList] : [], }, - }; + globalMenuHorizontal: displayTopbarWidget ? [AssignmentsList] : [], + }, + }; - return Promise.resolve(result); + return Promise.resolve(result); }, };