diff --git a/client/actions/assignments/tests/api_test.ts b/client/actions/assignments/tests/api_test.ts index 784566571..8dfacd4de 100644 --- a/client/actions/assignments/tests/api_test.ts +++ b/client/actions/assignments/tests/api_test.ts @@ -528,16 +528,6 @@ describe('actions.assignments.api', () => { }); }); - it('removeAssignment', (done) => ( - store.test(done, assignmentsApi.removeAssignment(data.assignments[0])) - .then(() => { - expect(services.api('assignments').remove.callCount).toBe(1); - expect(services.api('assignments').remove.args[0]).toEqual([data.assignments[0]]); - - done(); - }) - ).catch(done.fail)); - describe('receivedAssignments', () => { beforeEach(() => { restoreSinonStub(assignmentsApi.receivedAssignments); diff --git a/client/actions/assignments/tests/ui_test.ts b/client/actions/assignments/tests/ui_test.ts index 4073ee67a..889f59eae 100644 --- a/client/actions/assignments/tests/ui_test.ts +++ b/client/actions/assignments/tests/ui_test.ts @@ -297,86 +297,6 @@ describe('actions.assignments.ui', () => { }); }); - describe('showRemoveAssignmentModal', () => { - it('locks only Assignment and displays the confirmation dialog', (done) => ( - store.test(done, assignmentsUi.showRemoveAssignmentModal(data.assignments[0])) - .then((item) => { - expect(item).toEqual(data.assignments[0]); - - expect(planningApi.locks.lockItem.callCount).toBe(1); - expect(planningApi.locks.lockItem.args[0]).toEqual([ - data.assignments[0], - 'remove_assignment' - ]); - - expect(store.dispatch.callCount).toBe(1); - expect(store.dispatch.args[0]).toEqual([{ - type: 'SHOW_MODAL', - modalType: 'CONFIRMATION', - modalProps: jasmine.objectContaining( - {body: 'This will also remove other linked assignments (if any, for story updates). ' - + 'Are you sure?'} - ), - }]); - - done(); - }) - ).catch(done.fail)); - - it('returns Promise.reject on locking error', (done) => { - restoreSinonStub(planningApi.locks.lockItem); - sinon.stub(planningApi.locks, 'lockItem').returns(Promise.reject(errorMessage)); - - return store.test(done, assignmentsUi.showRemoveAssignmentModal(data.assignments[0])) - .then(() => { /* no-op */ }, (error) => { - expect(error).toEqual(errorMessage); - done(); - }) - .catch(done.fail); - }); - }); - - describe('_removeAssignment', () => { - beforeEach(() => { - sinon.stub(assignmentsApi, 'removeAssignment').callsFake( - (item) => Promise.resolve(item) - ); - }); - - afterEach(() => { - restoreSinonStub(assignmentsApi.removeAssignment); - }); - - it('Executes api.removeAssignment and notifies user of success', (done) => ( - store.test(done, assignmentsUi.removeAssignment(data.assignments[0])) - .then(() => { - expect(assignmentsApi.removeAssignment.callCount).toBe(1); - expect(assignmentsApi.removeAssignment.args[0]).toEqual([data.assignments[0]]); - - expect(services.notify.success.callCount).toBe(1); - expect(services.notify.success.args[0]).toEqual(['Assignment removed']); - - done(); - }) - ).catch(done.fail)); - - it('Notifies user if removeAssignment fails', (done) => { - restoreSinonStub(assignmentsApi.removeAssignment); - sinon.stub(assignmentsApi, 'removeAssignment').returns(Promise.reject(errorMessage)); - - return store.test(done, assignmentsUi.removeAssignment(data.assignments[0])) - .then(() => { /* no-op */ }, (error) => { - expect(error).toEqual(errorMessage); - - expect(services.notify.error.callCount).toBe(1); - expect(services.notify.error.args[0]).toEqual(['Failed!']); - - done(); - }) - .catch(done.fail); - }); - }); - describe('openArchivePreview', () => { beforeEach(() => { sinon.stub(assignmentsUi, 'closePreview'); diff --git a/client/actions/assignments/ui.ts b/client/actions/assignments/ui.ts index d2a5ed2e6..064d49186 100644 --- a/client/actions/assignments/ui.ts +++ b/client/actions/assignments/ui.ts @@ -858,7 +858,6 @@ const loadDefaultListSort = () => ( * @param {string} priorityPrefix - The prefix for the priority field * @param {boolean} disableDeskSelection - If true, disables the Desk input field * @param {boolean} disableUserSelection - If true, disables the User input field - * @param {Function} setCoverageDefaultDesk - Callback function to set default desk for coverages */ const showEditCoverageAssignmentModal = ({ field, @@ -867,7 +866,6 @@ const showEditCoverageAssignmentModal = ({ priorityPrefix, disableDeskSelection, disableUserSelection, - setCoverageDefaultDesk, }) => ( (dispatch) => { dispatch(showModal({ @@ -879,7 +877,6 @@ const showEditCoverageAssignmentModal = ({ priorityPrefix, disableDeskSelection, disableUserSelection, - setCoverageDefaultDesk, }, })); } diff --git a/client/actions/planning/ui.ts b/client/actions/planning/ui.ts index 033a995cf..35c30ee8b 100644 --- a/client/actions/planning/ui.ts +++ b/client/actions/planning/ui.ts @@ -514,27 +514,6 @@ const saveFromAuthoring = (original, updates) => ( } ); -/** - * Action to update the values of a single Coverage so the Assignment is placed in the workflow - * @param {object} original - Original Planning item - * @param {object} updatedCoverage - Coverage to update (along with any coverage fields to update as well) - * @param {number} index - index of the Coverage in the coverages[] array - */ -const removeAssignment = (original, updatedCoverage, index) => ( - (dispatch, getState, {notify}) => { - const updates = {coverages: cloneDeep(original.coverages)}; - const coverage = cloneDeep(updatedCoverage); - - updates.coverages[index] = coverage; - - return dispatch(planningApis.save(original, updates)) - .then((savedItem) => { - notify.success(gettext('Removed assignment from coverage.')); - return dispatch(self.updateItemOnSave(savedItem)); - }); - } -); - const updateItemOnSave = (savedItem) => ( (dispatch) => { const modifiedItem = planningUtils.modifyForClient(savedItem); @@ -575,7 +554,6 @@ const self = { saveFromAuthoring, scheduleRefetch, assignToAgenda, - removeAssignment, _modifyPlanningFeatured, modifyPlanningFeatured, openFeaturedPlanningModal, diff --git a/client/components/Assignments/AssignmentItem/AssignmentItem_test.tsx b/client/components/Assignments/AssignmentItem/AssignmentItem_test.tsx index d61202109..b5cf6d274 100644 --- a/client/components/Assignments/AssignmentItem/AssignmentItem_test.tsx +++ b/client/components/Assignments/AssignmentItem/AssignmentItem_test.tsx @@ -34,7 +34,6 @@ describe('assignments', () => { revertAssignment, editAssignmentPriority, startWorking, - removeAssignment, onDoubleClick, completeAssignment, ] = Array(7).fill(() => true); @@ -58,7 +57,6 @@ describe('assignments', () => { editAssignmentPriority={editAssignmentPriority} completeAssignment={completeAssignment} startWorking={startWorking} - removeAssignment={removeAssignment} revertAssignment={revertAssignment} privileges={privileges} session={session} @@ -92,7 +90,6 @@ describe('assignments', () => { editAssignmentPriority = sinon.spy(); completeAssignment = sinon.spy(); startWorking = sinon.spy(); - removeAssignment = sinon.spy(); onDoubleClick = sinon.spy(); revertAssignment = sinon.spy(); }); @@ -142,64 +139,6 @@ describe('assignments', () => { 'Priority: {{ name }}' ); }); - - it('ActionMenu executes prop functions', () => { - const executeItemAction = (actionLabel) => { - const wrapper = getMountedWrapper(); - const menu = new helpers.actionMenu(wrapper, true); - - menu.invokeAction(actionLabel); - }; - - lockedItems = null; - - expect(reassign.callCount).toBe(0); - executeItemAction('Reassign'); - expect(reassign.callCount).toBe(1); - expect(reassign.args[0][0]).toEqual(assignment); - - expect(editAssignmentPriority.callCount).toBe(0); - executeItemAction('Edit Priority'); - expect(editAssignmentPriority.callCount).toBe(1); - expect(editAssignmentPriority.args[0][0]).toEqual(assignment); - - expect(removeAssignment.callCount).toBe(0); - executeItemAction('Remove Assignment'); - expect(removeAssignment.callCount).toBe(1); - expect(removeAssignment.args[0][0]).toEqual(assignment); - - assignment.assigned_to.state = 'in_progress'; - expect(completeAssignment.callCount).toBe(0); - executeItemAction('Complete Assignment'); - expect(completeAssignment.callCount).toBe(1); - expect(completeAssignment.args[0][0]).toEqual(assignment); - - assignment.assigned_to = { - user: 'ident1', - state: 'assigned', - }; - assignment.planning.g2_content_type = 'text'; - expect(startWorking.callCount).toBe(0); - executeItemAction('Start Working'); - expect(startWorking.callCount).toBe(1); - expect(startWorking.args[0][0]).toEqual(assignment); - - assignment.item_ids = ['item1']; - expect(onDoubleClick.callCount).toBe(0); - executeItemAction('Open Coverage'); - expect(onDoubleClick.callCount).toBe(1); - expect(onDoubleClick.args[0]).toEqual([assignment]); - - assignment.assigned_to = { - user: 'ident1', - state: 'completed', - }; - assignment.planning.g2_content_type = 'live_video'; - expect(revertAssignment.callCount).toBe(0); - executeItemAction('Revert Availability'); - expect(revertAssignment.callCount).toBe(1); - expect(revertAssignment.args[0][0]).toEqual(assignment); - }); }); }); }); diff --git a/client/components/Assignments/AssignmentPopup/index.tsx b/client/components/Assignments/AssignmentPopup/index.tsx index b5d28d727..30784bbc6 100644 --- a/client/components/Assignments/AssignmentPopup/index.tsx +++ b/client/components/Assignments/AssignmentPopup/index.tsx @@ -7,6 +7,8 @@ import {gettext} from '../../../utils'; import {ButtonList} from '../../UI'; import {Popup, Header, Footer, Content} from '../../UI/Popup'; import {AssignmentEditor} from '../AssignmentEditor'; +import * as actions from '../../../actions'; +import {planningApi} from '../../../superdeskApi'; import './style.scss'; @@ -35,7 +37,9 @@ export class AssignmentPopup extends React.Component { onSubmit() { this.props.onChange(this.props.field, this.state.diff); - this.props.setCoverageDefaultDesk(this.state.diff); + + planningApi.redux.store.dispatch(actions.users.setCoverageDefaultDesk(this.state.diff)); + this.props.onClose(); } @@ -131,7 +135,6 @@ AssignmentPopup.propTypes = { popupContainer: PropTypes.func, onPopupOpen: PropTypes.func, onPopupClose: PropTypes.func, - setCoverageDefaultDesk: PropTypes.func, }; AssignmentPopup.defaultProps = {priorityPrefix: ''}; diff --git a/client/components/Assignments/EditCoverageAssignmentModal.tsx b/client/components/Assignments/EditCoverageAssignmentModal.tsx index 0367175ea..5158e1563 100644 --- a/client/components/Assignments/EditCoverageAssignmentModal.tsx +++ b/client/components/Assignments/EditCoverageAssignmentModal.tsx @@ -10,6 +10,8 @@ import * as selectors from '../../selectors'; import {Modal} from '../'; import {Button} from '../UI'; import {AssignmentEditor} from './AssignmentEditor'; +import {planningApi} from '../../superdeskApi'; +import * as actions from '../../actions'; export class EditCoverageAssignmentModalComponent extends React.Component { constructor(props) { @@ -36,7 +38,9 @@ export class EditCoverageAssignmentModalComponent extends React.Component { onSubmit() { this.setState({submitting: true}, () => { this.props.modalProps.onChange(this.props.modalProps.field, this.state.diff); - this.props.modalProps.setCoverageDefaultDesk(this.state.diff); + + planningApi.redux.store.dispatch(actions.users.setCoverageDefaultDesk(this.state.diff)); + this.props.handleHide(); }); } @@ -125,7 +129,6 @@ EditCoverageAssignmentModalComponent.propTypes = { priorityPrefix: PropTypes.string, disableDeskSelection: PropTypes.bool, disableUserSelection: PropTypes.bool, - setCoverageDefaultDesk: PropTypes.func, }), users: PropTypes.array, desks: PropTypes.array, diff --git a/client/components/Coverages/CoverageAddAdvancedModal.tsx b/client/components/Coverages/CoverageAddAdvancedModal.tsx index d160136bc..e75f3d0ec 100644 --- a/client/components/Coverages/CoverageAddAdvancedModal.tsx +++ b/client/components/Coverages/CoverageAddAdvancedModal.tsx @@ -1,4 +1,5 @@ import React from 'react'; +import {connect} from 'react-redux'; import {get} from 'lodash'; import {IG2ContentType, IPlanningCoverageItem, IPlanningNewsCoverageStatus} from '../../interfaces'; @@ -11,10 +12,17 @@ import {getVocabularyItemFieldTranslated} from '../../utils/vocabularies'; import Modal from '../Modal'; import {SelectInput} from '../UI/Form'; import {superdeskApi} from '../../superdeskApi'; +import * as actions from '../../actions'; const isInvalid = (coverage) => coverage.user && !coverage.desk; -interface IProps { +interface IReduxDispatchProps { + setCoverageAddAdvancedMode(enable: boolean): void; +} + +type IReduxStateProps = {}; + +interface IOwnProps { field: string; value: Array>; coverageAddAdvancedMode: boolean; @@ -25,10 +33,11 @@ interface IProps { onChange(field: string, value: Array>): void; createCoverage(qcode: IG2ContentType['qcode']): DeepPartial; - setCoverageAddAdvancedMode(enable: boolean): void; close(event?: React.MouseEvent): void; } +type IProps = IOwnProps & IReduxStateProps & IReduxDispatchProps; + interface ICoverageSelector { id: number; enabled: boolean; @@ -50,7 +59,7 @@ interface IState { isDirty: boolean; } -export class CoverageAddAdvancedModal extends React.Component { +class CoverageAddAdvancedModalComponent extends React.Component { id: number; constructor(props) { @@ -366,3 +375,12 @@ export class CoverageAddAdvancedModal extends React.Component { ); } } + +const mapDispatchToProps = (dispatch): IReduxDispatchProps => ({ + setCoverageAddAdvancedMode: (value) => dispatch(actions.users.setCoverageAddAdvancedMode(value)), +}); + +export const CoverageAddAdvancedModal = connect( + null, + mapDispatchToProps +)(CoverageAddAdvancedModalComponent); diff --git a/client/components/Coverages/CoverageAddButton/AddCoveragesWrapper.tsx b/client/components/Coverages/CoverageAddButton/AddCoveragesWrapper.tsx index c26ba1f51..dd07c8432 100644 --- a/client/components/Coverages/CoverageAddButton/AddCoveragesWrapper.tsx +++ b/client/components/Coverages/CoverageAddButton/AddCoveragesWrapper.tsx @@ -9,7 +9,6 @@ import {planningUtils, onEventCapture} from '../../../utils'; import {getVocabularyItemFieldTranslated} from '../../../utils/vocabularies'; import {getUserInterfaceLanguageFromCV} from '../../../utils/users'; import * as selectors from '../../../selectors'; -import * as actions from '../../../actions'; import {CoveragesMenuPopup} from './CoveragesMenuPopup'; import {CoverageAddAdvancedModal} from '../CoverageAddAdvancedModal'; @@ -23,7 +22,6 @@ interface IProps { onChange(field: string, value: Array>): void; createCoverage(qcode: IG2ContentType['qcode']): DeepPartial; - setCoverageAddAdvancedMode(enable: boolean): void; onOpen?(): void; onAdd( qcode: IG2ContentType['qcode'], @@ -65,10 +63,6 @@ const mapStateToProps = (state) => ({ coverageAddAdvancedMode: selectors.general.coverageAddAdvancedMode(state), }); -const mapDispatchToProps = (dispatch) => ({ - setCoverageAddAdvancedMode: (advancedMode) => dispatch(actions.users.setCoverageAddAdvancedMode(advancedMode)), -}); - function getCoverageTypesFromProps( language: IProps['language'], contentTypes: IProps['contentTypes'], @@ -189,7 +183,6 @@ class AddCoveragesWrapperComponent extends React.Component { desks={this.props.desks} coverageAddAdvancedMode={this.props.coverageAddAdvancedMode} - setCoverageAddAdvancedMode={this.props.setCoverageAddAdvancedMode} /> )} @@ -199,5 +192,4 @@ class AddCoveragesWrapperComponent extends React.Component { export const AddCoveragesWrapper = connect( mapStateToProps, - mapDispatchToProps )(AddCoveragesWrapperComponent); diff --git a/client/components/Coverages/CoverageArrayInput.tsx b/client/components/Coverages/CoverageArrayInput.tsx index 874a3cb3f..4855e850d 100644 --- a/client/components/Coverages/CoverageArrayInput.tsx +++ b/client/components/Coverages/CoverageArrayInput.tsx @@ -4,10 +4,9 @@ import {isEmpty} from 'lodash'; import { EDITOR_TYPE, - IAssignmentItem, IAssignmentPriority, ICoverageFormProfile, - ICoverageProvider, ICoverageScheduledUpdate, IEventItem, IFile, + ICoverageProvider, IEventItem, IFile, IG2ContentType, IGenre, IKeyword, @@ -23,7 +22,6 @@ import * as selectors from '../../selectors'; import {InputArray} from '../UI/Form'; import {CoverageEditor} from './CoverageEditor'; import {CoverageAddButton} from './CoverageAddButton'; -import * as actions from '../../actions'; interface IProps { @@ -63,10 +61,7 @@ interface IProps { popupContainer(): HTMLElement; onPopupOpen(): void; onPopupClose(): void; - setCoverageDefaultDesk(coverage: IPlanningCoverageItem): void; - setCoverageAddAdvancedMode(enabled: boolean): Promise; createUploadLink(file: IFile): void; - onRemoveAssignment(assignemnt: IAssignmentItem): Promise; uploadFiles(files: Array>): Promise>; notifyValidationErrors(errors: Array): void; } @@ -89,10 +84,6 @@ const mapStateToProps = (state) => ({ defaultDesk: selectors.general.defaultDesk(state), }); -const mapDispatchToProps = (dispatch) => ({ - onRemoveAssignment: (assignment) => dispatch(actions.assignments.ui.showRemoveAssignmentModal(assignment)), -}); - class CoverageArrayInputComponent extends React.Component { constructor(props) { super(props); @@ -165,7 +156,6 @@ class CoverageArrayInputComponent extends React.Component { popupContainer, onPopupOpen, onPopupClose, - setCoverageDefaultDesk, preferredCoverageDesks, item, navigation, @@ -188,7 +178,7 @@ class CoverageArrayInputComponent extends React.Component { event ); - const {desks, users, coverageAddAdvancedMode, setCoverageAddAdvancedMode} = this.props; + const {desks, users, coverageAddAdvancedMode} = this.props; const language = this.props.item.language; return ( @@ -202,7 +192,6 @@ class CoverageArrayInputComponent extends React.Component { onChange={onChange} addButtonText={addButtonText} addButtonComponent={CoverageAddButton} - onRemoveAssignment={this.props.onRemoveAssignment} addButtonProps={{ contentTypes, defaultDesk, @@ -217,7 +206,6 @@ class CoverageArrayInputComponent extends React.Component { desks, users, coverageAddAdvancedMode, - setCoverageAddAdvancedMode, language, editorType, }} @@ -233,7 +221,6 @@ class CoverageArrayInputComponent extends React.Component { popupContainer={popupContainer} onPopupOpen={onPopupOpen} onPopupClose={onPopupClose} - setCoverageDefaultDesk={setCoverageDefaultDesk} contentTypes={contentTypes} defaultDesk={defaultDesk} newsCoverageStatus={newsCoverageStatus} @@ -249,4 +236,4 @@ class CoverageArrayInputComponent extends React.Component { } } -export const CoverageArrayInput = connect(mapStateToProps, mapDispatchToProps)(CoverageArrayInputComponent); +export const CoverageArrayInput = connect(mapStateToProps)(CoverageArrayInputComponent); diff --git a/client/components/Coverages/CoverageEditor/CoverageForm.tsx b/client/components/Coverages/CoverageEditor/CoverageForm.tsx index 73ec1dac9..185a778a7 100644 --- a/client/components/Coverages/CoverageEditor/CoverageForm.tsx +++ b/client/components/Coverages/CoverageEditor/CoverageForm.tsx @@ -4,7 +4,7 @@ import {get, forEach} from 'lodash'; import moment from 'moment'; import {appConfig} from 'appConfig'; -import {superdeskApi, planningApi} from '../../../superdeskApi'; +import {superdeskApi} from '../../../superdeskApi'; import {IArticle, IDesk, IVocabularyItem} from 'superdesk-api'; import { EDITOR_TYPE, @@ -57,12 +57,6 @@ interface IProps { onFieldFocus(): void; onPopupOpen(): void; onPopupClose(): void; - onRemoveAssignment( - coverage: IPlanningCoverageItem, - index: number, - scheduledUpdate: any, - scheduledUpdateIndex: number - ): void; uploadFiles(files: Array>): Promise>; createUploadLink(file: IFile): void; removeFile(file: IFile): Promise; @@ -76,9 +70,6 @@ interface IProps { keywords: Array; preferredCoverageDesks: {[key: string]: string}; planningAllowScheduledUpdates: boolean; - - // Redux Dispatches - setCoverageDefaultDesk(coverage: IPlanningCoverageItem): void; } interface IState { @@ -97,10 +88,6 @@ const mapStateToProps = (state) => ({ formProfile: selectors.forms.coverageProfile(state), }); -const mapDispatchToProps = (dispatch) => ({ - setCoverageDefaultDesk: (coverage) => dispatch(actions.users.setCoverageDefaultDesk(coverage)), -}); - export class CoverageFormComponent extends React.Component { fullFilePath: string; xmpFullFilePath: string; @@ -423,8 +410,6 @@ export class CoverageFormComponent extends React.Component { field: 'flags.no_content_linking', }, scheduled_updates: { - onRemoveAssignment: this.props.onRemoveAssignment, - setCoverageDefaultDesk: this.props.setCoverageDefaultDesk, onRemoveScheduledUpdate: this.onRemoveScheduledUpdate, onScheduleChanged: this.onScheduleChanged, onScheduledUpdateClose: this.onScheduledUpdateClose, @@ -472,4 +457,4 @@ export class CoverageFormComponent extends React.Component { } } -export const CoverageForm = connect(mapStateToProps, mapDispatchToProps)(CoverageFormComponent); +export const CoverageForm = connect(mapStateToProps)(CoverageFormComponent); diff --git a/client/components/Coverages/CoverageEditor/CoverageFormHeader.tsx b/client/components/Coverages/CoverageEditor/CoverageFormHeader.tsx index 11b971be9..4a227954f 100644 --- a/client/components/Coverages/CoverageEditor/CoverageFormHeader.tsx +++ b/client/components/Coverages/CoverageEditor/CoverageFormHeader.tsx @@ -12,7 +12,6 @@ import {StateLabel} from '../../StateLabel'; import * as actions from '../../../actions'; import {ASSIGNMENTS} from '../../../constants/assignments'; import * as selectors from '../../../selectors'; -import {planningUtils} from '../../../utils'; import {Button} from 'superdesk-ui-framework/react'; interface IProps { @@ -24,8 +23,6 @@ interface IProps { addNewsItemToPlanning?: IArticle; onChange(field: string, value: any): void; onFocus?(): void; - onRemoveAssignment?(): Promise; - setCoverageDefaultDesk(coverage: IPlanningCoverageItem | ICoverageScheduledUpdate): void; showEditCoverageAssignmentModal(props: { field: string; value: IPlanningCoverageItem | ICoverageScheduledUpdate; @@ -33,7 +30,6 @@ interface IProps { disableUserSelection: boolean; priorityPrefix: string; onChange(field: string, value: any): void; - setCoverageDefaultDesk(coverage: IPlanningCoverageItem | ICoverageScheduledUpdate): void; }): void; lockedItems: ILockedItems; } @@ -48,7 +44,7 @@ const mapStateToProps = (state) => ({ lockedItems: selectors.locks.getLockedItems(state), }); -export class CoverageFormHeaderComponent extends React.PureComponent { +class CoverageFormHeaderComponent extends React.PureComponent { constructor(props) { super(props); this.showAssignmentModal = this.showAssignmentModal.bind(this); @@ -63,7 +59,6 @@ export class CoverageFormHeaderComponent extends React.PureComponent { onChange: this.props.onChange, disableDeskSelection: !!this.props.addNewsItemToPlanning, disableUserSelection: !!this.props.addNewsItemToPlanning, - setCoverageDefaultDesk: this.props.setCoverageDefaultDesk, priorityPrefix: 'assigned_to.', }); } @@ -75,7 +70,6 @@ export class CoverageFormHeaderComponent extends React.PureComponent { users, desks, addNewsItemToPlanning, - onRemoveAssignment, readOnly, lockedItems, } = this.props; @@ -194,19 +188,24 @@ export class CoverageFormHeaderComponent extends React.PureComponent { expand /> - {onRemoveAssignment != null && ( - -