Skip to content

Commit

Permalink
TGA sign off event listener (#4339)
Browse files Browse the repository at this point in the history
  • Loading branch information
thecalcc authored Oct 11, 2023
1 parent 528eeb1 commit 9194901
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ export function AuthoringContainerDirective(authoringWorkspace: AuthoringWorkspa
scope: {},
require: 'sdAuthoringContainer',
link: function(scope, elem, attrs, ctrl) {
// Needed only for authoring Angular. In authoring react we have a generic
// event ('resource:updated') which listens to all item changes.
scope.$on('author_approval:updated', (event) => {
if (event.item_id === scope.item._id) {
scope.item.extra.publish_sign_off = event.sign_off_new_data;
}
});

scope.$watch(authoringWorkspace.getState, (state) => {
if (state) {
if (itemInEditMode != null) {
Expand Down

0 comments on commit 9194901

Please sign in to comment.