Skip to content

Commit

Permalink
Fix : Locked items in package widget cannot be opened [SDESK-6706] (#…
Browse files Browse the repository at this point in the history
…4168)

* Fix:Locked items in package widget cannot be opened [SDESK-6706]

* Address the comment

* itemActions is synchronous

* use openArticle

Co-authored-by: Tomas Kikutis <t.kikutis@gmail.com>
  • Loading branch information
devketanpro and tomaskikutis authored Jan 6, 2023
1 parent 3095e37 commit 03d236c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/apps/authoring/packages/packages.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import _ from 'lodash';
import {gettext} from 'core/utils';
import {openArticle} from 'core/get-superdesk-api-implementation';

PackagesCtrl.$inject = ['$scope', 'superdesk', 'api', 'search'];
function PackagesCtrl($scope, superdesk, api, search) {
Expand Down Expand Up @@ -27,9 +28,9 @@ function PackagesCtrl($scope, superdesk, api, search) {

$scope.openPackage = function(packageItem) {
if (packageItem._type === 'published') {
superdesk.intent('view', 'item', packageItem);
openArticle(packageItem._id, 'view');
} else {
superdesk.intent('edit', 'item', packageItem);
openArticle(packageItem._id, 'edit');
}
};

Expand Down

0 comments on commit 03d236c

Please sign in to comment.