Skip to content

Commit

Permalink
Merge branch 'develop' into feature/multiple-events-in-planning
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkLark86 committed Dec 3, 2024
2 parents 5f59352 + f690905 commit b0869f7
Show file tree
Hide file tree
Showing 47 changed files with 1,450 additions and 884 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,22 @@ jobs:
- run: npm ci
- run: npm run test
- run: npm run lint

extension:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
- name: install
working-directory: client/planning-extension
run: npm ci
- name: compile
working-directory: client/planning-extension
run: npm run compile
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ Below sections include the config options that can be defined in settings.py.
* PLANNING_JSON_ASSIGNED_INFO_EXTENDED
* Defaults to `false`
* If `true`, it will add to planning JSON output additional info for coverages like assigned desk name/email and assigned user name/email.
* ASSIGNMENT_MANUAL_REASSIGNMENT_ONLY
* Default: False (preserves the current behavior where automatic user assignment occurs)
* If true, Disables automatic user assignment for coverage, ensuring that assignments are updated only through explicit manual reassignment

### Authoring Config
* PLANNING_CHECK_FOR_ASSIGNMENT_ON_PUBLISH
Expand Down
2 changes: 1 addition & 1 deletion client/apps/Planning/PlanningListSubNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class PlanningListSubNavComponent extends React.Component<IProps, IState> {

return (
<div ref={this.onContainerMounted}>
<SubNav className="subnav-event-planning" zIndex={1}>
<SubNav className="subnav-event-planning">
<ButtonGroup align="inline">
<FilterSubnavDropdown viewSize={this.state.viewSize} />

Expand Down
4 changes: 2 additions & 2 deletions client/apps/Planning/PlanningSubNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class PlanningSubNavComponent extends React.PureComponent<IProps> {
{this.props.withArchiveItem !== true ? null : (
<ArchiveItem item={this.props.archiveItem} />
)}
<SubNav zIndex={3}>
<SubNav>
<MultiSelectActions />
<SearchBox
label={gettext('Search planning')}
Expand All @@ -110,7 +110,7 @@ export class PlanningSubNavComponent extends React.PureComponent<IProps> {
privileges={this.props.privileges}
/>
</SubNav>
<SubNav zIndex={2}>
<SubNav>
<ButtonGroup align="inline">
<NavButton
icon="filter-large"
Expand Down
2 changes: 1 addition & 1 deletion client/components/Assignments/FiltersBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const FiltersBar = ({
const {gettext} = superdeskApi.localization;

return (
<SubNav zIndex={2}>
<SubNav>
<StretchBar>
{!showDeskSelection ? (
<Fragment>
Expand Down
2 changes: 1 addition & 1 deletion client/components/Assignments/SubNavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class SubNavBar extends React.PureComponent<IProps> {
const {gettext} = superdeskApi.localization;

return (
<SubNav zIndex={3}>
<SubNav>
{assignmentListSingleGroupView && (
<ButtonGroup align="start">
<Tooltip
Expand Down
2 changes: 2 additions & 0 deletions client/components/ContentProfiles/FieldTab/FieldEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export class FieldEditor extends React.Component<IProps, IState> {
'schema.required': {enabled: !(this.props.disableRequired || this.props.systemRequired)},
'schema.read_only': {enabled: this.props.item.name === 'related_plannings'},
'schema.planning_auto_publish': {enabled: this.props.item.name === 'related_plannings'},
'schema.cancel_plan_with_event': {enabled: this.props.item.name === 'related_plannings'},
'schema.field_type': {enabled: fieldType != null},
'schema.minlength': {enabled: !disableMinMax},
'schema.maxlength': {enabled: !disableMinMax},
Expand Down Expand Up @@ -190,6 +191,7 @@ export class FieldEditor extends React.Component<IProps, IState> {
'schema.languages': {enabled: true, index: 12},
'schema.default_language': {enabled: true, index: 13},
'schema.planning_auto_publish': {enabled: true, index: 14},
'schema.cancel_plan_with_event': {enabled: true, index: 14},
'schema.default_value': {enabled: true, index: 11},
},
{
Expand Down
1 change: 0 additions & 1 deletion client/components/Coverages/CoverageIcons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ export class CoverageIcons extends React.PureComponent<IProps> {
return (
<WithPopover
placement="auto-end"
zIndex={1051}
component={() => (
<div className="coverages-popup">
<Spacer v gap="16">
Expand Down
2 changes: 1 addition & 1 deletion client/components/Events/EventItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class EventItemComponent extends React.Component<IProps, IState> {

return (
<div>
<Menu zIndex={1050} items={itemActions}>
<Menu items={itemActions}>
{
(toggle) => (
<div
Expand Down
2 changes: 1 addition & 1 deletion client/components/Planning/PlanningItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class PlanningItemComponent extends React.Component<IProps, IState> {

return (
<div>
<Menu zIndex={1050} items={itemActions}>
<Menu items={itemActions}>
{
(toggle) => (
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ export default class PlanningTemplatesModal extends React.Component<IProps, ISta
>
<Dropdown
maxHeight={300}
append
zIndex={2001}
items={calendarDropdownItems.sort((cal1, cal2) => cal1.label.localeCompare(cal2.label))}
>
{dropdownLabel}
Expand Down
1 change: 0 additions & 1 deletion client/components/fields/editor/CustomVocabularies.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ class CustomVocabulariesComponent extends React.PureComponent<IProps> {
);
}}
tabindex={0}
zIndex={1051}
/>
</Row>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ export class EventsRelatedArticlesModal extends React.Component<IProps, IState>
>
<Dropdown
maxHeight={300}
append
zIndex={2001}
items={[
{
type: 'group',
Expand Down
1 change: 0 additions & 1 deletion client/components/fields/editor/base/numberSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ export class EditorFieldNumberSelect extends React.PureComponent<IProps> {
value={values}
onChange={this.onChangeMultiple}
allowMultiple={true}
zIndex={1051}
/>
);
}
Expand Down
1 change: 0 additions & 1 deletion client/components/fields/editor/base/treeSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ export class EditorFieldTreeSelect<T> extends React.PureComponent<IEditorFieldTr
label={this.props.label}
tabindex={0}
info={this.props.info}
zIndex={1051}
sortable={this.props.sortable}
/>
</Row>
Expand Down
11 changes: 11 additions & 0 deletions client/components/fields/resources/profiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ registerEditorField(
true
);

registerEditorField(
'schema.cancel_plan_with_event',
EditorFieldCheckbox,
() => ({
label: superdeskApi.localization.gettext('Cancel planning items with Event'),
field: 'schema.cancel_plan_with_event',
}),
null,
true
);

registerEditorField(
'schema.planning_auto_publish',
EditorFieldCheckbox,
Expand Down
3 changes: 3 additions & 0 deletions client/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,7 @@ export interface IProfileSchemaTypeList extends IBaseProfileSchemaType<'list'> {
mandatory_in_list?: {[key: string]: any};
vocabularies?: Array<IVocabulary['_id']>;
planning_auto_publish?: boolean;
cancel_plan_with_event?: boolean;
}

export interface IProfileSchemaTypeInteger extends IBaseProfileSchemaType<'integer'> {}
Expand Down Expand Up @@ -1171,6 +1172,7 @@ export interface IEventFormProfile {
reference: IProfileEditorField;
slugline: IProfileEditorField;
subject: IProfileEditorField;
related_plannings: IProfileEditorField;
};
name: 'event';
schema: {
Expand All @@ -1194,6 +1196,7 @@ export interface IEventFormProfile {
reference: IProfileSchemaTypeString;
slugline: IProfileSchemaTypeString;
subject: IProfileSchemaTypeList;
related_plannings: IProfileSchemaTypeList;
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class AssignmentsCountTracker extends React.PureComponent<{}, {loading: t
{menuId: 'MENU_ITEM_PLANNING_ASSIGNMENTS', badgeValue: itemsCount.toString()},
);

return null;
return <></>;
}
}
</LiveAssignmentsHOC>
Expand Down
7 changes: 0 additions & 7 deletions client/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,6 @@
justify-content: flex-end;
}

// Fix second subnav's z-index in Planning page
#sd-planning-react-container {
.subnav + .subnav {
z-index: 1002 !important;
}
}

// Fix react-bootstrap OverlayTrigger's Tooltip inside Modals
.tooltip {
z-index: 10000 !important;
Expand Down
Loading

0 comments on commit b0869f7

Please sign in to comment.