Skip to content

Commit 2e31a25

Browse files
committed
Small changes
1 parent 21fb8fb commit 2e31a25

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

client/api/coverages.ts

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
import {coverageProfiles} from '../selectors/coverageProfiles';
21
import {PLANNING, WORKFLOW_STATE} from '../constants';
3-
import {ICoverageScheduledUpdate, ICoverageType, IPlanningAPI, IPlanningCoverageItem} from '../interfaces';
4-
import {planningApi, superdeskApi} from '../superdeskApi';
5-
6-
function getCoverageEditorProfile(type: ICoverageType) {
7-
return coverageProfiles(planningApi.redux.store.getState()).find((x) => x.content_type === type);
8-
}
2+
import {ICoverageScheduledUpdate, IPlanningAPI, IPlanningCoverageItem} from '../interfaces';
3+
import {superdeskApi} from '../superdeskApi';
94

105
function cancelCoverageOrScheduledUpdate<T extends IPlanningCoverageItem | ICoverageScheduledUpdate>(
116
item: T,
@@ -67,7 +62,6 @@ function cancelScheduledUpdate(
6762
}
6863

6964
export const coverages: IPlanningAPI['coverages'] = {
70-
getEditorProfile: getCoverageEditorProfile,
7165
cancelCoverage: cancelCoverage,
7266
cancelScheduledUpdate: cancelScheduledUpdate,
7367
};

client/components/ContentProfiles/CoverageProfileModal.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ interface IProps {
3232
closeModal(): void;
3333
}
3434

35+
const coverageType: Array<ICoverageType> = [
36+
'text', 'picture', 'video', 'audio', 'infographics', 'liveBlog', 'liveVideo'
37+
];
38+
3539
export class CoverageProfilesModal extends React.Component<IProps, IState> {
3640
constructor(props) {
3741
super(props);
@@ -183,9 +187,6 @@ export class CoverageProfilesModal extends React.Component<IProps, IState> {
183187
render() {
184188
const {gettext} = superdeskApi.localization;
185189
const {selectedType} = this.state;
186-
const coverageType: ICoverageType[] = [
187-
'text', 'picture', 'video', 'audio', 'infographics', 'liveBlog', 'liveVideo'
188-
];
189190
const propsMap: Record<ICoverageType, {label: string; icon: string;}> = {
190191
text: {
191192
label: gettext('Text'),

client/interfaces.ts

-1
Original file line numberDiff line numberDiff line change
@@ -2257,7 +2257,6 @@ export interface IPlanningAPI {
22572257
getById(assignmentId: IAssignmentItem['_id']): Promise<IAssignmentItem>;
22582258
};
22592259
coverages: {
2260-
getEditorProfile(type: ICoverageType): ICoverageFormProfile;
22612260
cancelCoverage(
22622261
items: Array<IPlanningCoverageItem | ICoverageScheduledUpdate>,
22632262
itemToCancel: IPlanningCoverageItem | ICoverageScheduledUpdate,

0 commit comments

Comments
 (0)