Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
thecalcc committed Sep 30, 2024
1 parent 3b31a30 commit e12db85
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 67 deletions.
1 change: 0 additions & 1 deletion client/planning-extension/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ const extension: IExtension = {
onTrigger: () => {
const superdeskArticle = superdesk.entities.article;

// keep in sync with client/planning-extension/src/extension.ts:123
if (
superdesk.privileges.hasPrivilege('archive') &&
item.assignment_id != null &&
Expand Down
66 changes: 0 additions & 66 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
// styles
import './client/styles/index.scss';

import {IArticle} from 'superdesk-api';
import {superdeskApi} from './client/superdeskApi';

// scripts
import planningModule from './client';
import * as ctrl from './client/controllers';
import {gettext} from './client/utils/gettext';
import {isContentLinkToCoverageAllowed} from './client/utils/archive';
import ng from 'superdesk-core/scripts/core/services/ng';

configurePlanning.$inject = ['superdeskProvider'];
Expand Down Expand Up @@ -40,66 +34,6 @@ function configurePlanning(superdesk) {
privileges: {
planning_locations_management: 1,
},
})
.activity('planning.fulfil', {
label: gettext('Fulfil Assignment'),
icon: 'calendar-list',
modal: true,
priority: 2000,
controller: ctrl.FulFilAssignmentController,
filters: [
{
action: 'list',
type: 'archive',
},
{
action: 'external-app',
type: 'fulfill-assignment',
},
],
group: gettext('Planning'),
privileges: {archive: 1},
additionalCondition: ['archiveService', 'item',
function(archiveService, item: IArticle) {
return !item.assignment_id &&
!archiveService.isPersonal(item) &&
!superdeskApi.entities.article.isLockedInOtherSession(item) &&
isContentLinkToCoverageAllowed(item) &&
!['killed', 'recalled', 'unpublished', 'spiked', 'correction'].includes(item.state);
}],
})

// TAG: AUTHORING-ANGULAR
.activity('planning.unlink', {
label: gettext('Unlink as Coverage'),
icon: 'cut',
priority: 1000,
controller: ctrl.UnlinkAssignmentController,
filters: [
{
action: 'list',
type: 'archive',
},
{
action: 'external-app',
type: 'unlink-assignment',
},
],
group: gettext('Planning'),
privileges: {archive: 1},

// keep in sync with client/planning-extension/src/extension.ts:126
additionalCondition: ['archiveService', 'item', 'authoring',
function(archiveService, item, authoring) {
return item.assignment_id &&
!archiveService.isPersonal(item) &&
!superdeskApi.entities.article.isLockedInOtherSession(item) &&
(
authoring.itemActions(item).edit ||
authoring.itemActions(item).correct ||
authoring.itemActions(item).deschedule
);
}],
});
}

Expand Down

0 comments on commit e12db85

Please sign in to comment.