Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
thecalcc committed Sep 14, 2023
1 parent 3b4db41 commit d309048
Showing 1 changed file with 37 additions and 37 deletions.
74 changes: 37 additions & 37 deletions client/planning-extension/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<IArticle>) => onSpikeMultiple(superdesk, items),
onPublish: (item: IArticle) => onPublishArticle(superdesk, item),
onRewriteAfter: (item: IArticle) => onArticleRewriteAfter(superdesk, item),
onSendBefore: (items: Array<IArticle>, 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});

Check failure on line 131 in client/planning-extension/src/extension.ts

View workflow job for this annotation

GitHub Actions / client (14.x)

Expected blank line after variable declarations

Check failure on line 131 in client/planning-extension/src/extension.ts

View workflow job for this annotation

GitHub Actions / client (14.x)

Strings must use singlequote

Check failure on line 131 in client/planning-extension/src/extension.ts

View workflow job for this annotation

GitHub Actions / client (14.x)

Expected blank line after variable declarations

Check failure on line 131 in client/planning-extension/src/extension.ts

View workflow job for this annotation

GitHub Actions / client (14.x)

Strings must use singlequote
window.dispatchEvent(event);
}
},
}],
onSpike: (item: IArticle) => onSpike(superdesk, item),
onSpikeMultiple: (items: Array<IArticle>) => onSpikeMultiple(superdesk, items),
onPublish: (item: IArticle) => onPublishArticle(superdesk, item),
onRewriteAfter: (item: IArticle) => onArticleRewriteAfter(superdesk, item),
onSendBefore: (items: Array<IArticle>, 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);
},
};

Expand Down

0 comments on commit d309048

Please sign in to comment.