Sha256: fe68f10d7700c9904cf4676702f1bfee77e1732c4dfc33cf65bac826a7e1ffa4

Contents?: true

Size: 970 Bytes

Versions: 68

Compression:

Stored size: 970 Bytes

Contents

import React from 'react';
import PropTypes from 'prop-types';
import { sprintf, translate as __ } from 'foremanReact/common/I18n';
import TasksTablePage from './';

export const SubTasksPage = props => {
  const parentTaskID = props.match.params.id;
  const getBreadcrumbs = actionName => ({
    breadcrumbItems: [
      { caption: __('Tasks'), url: `/foreman_tasks/tasks` },
      {
        caption: actionName,
        url: `/foreman_tasks/tasks/${parentTaskID}`,
      },
      { caption: __('Sub tasks') },
    ],
  });
  const createHeader = actionName =>
    actionName ? sprintf(__('Sub tasks of %s'), actionName) : __('Sub tasks');
  return (
    <TasksTablePage
      getBreadcrumbs={getBreadcrumbs}
      parentTaskID={parentTaskID}
      createHeader={createHeader}
      {...props}
    />
  );
};

SubTasksPage.propTypes = {
  match: PropTypes.shape({
    params: PropTypes.object,
  }),
};

SubTasksPage.defaultProps = {
  match: {
    params: {},
  },
};

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
foreman-tasks-10.0.2 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js
foreman-tasks-10.0.1 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js
foreman-tasks-10.0.0 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js
foreman-tasks-9.2.3 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js
foreman-tasks-9.2.2 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js
foreman-tasks-9.2.1 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js
foreman-tasks-9.2.0 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js
foreman-tasks-9.1.1 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js
foreman-tasks-9.0.4 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js
foreman-tasks-9.1.0 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js
foreman-tasks-9.0.2 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js
foreman-tasks-9.0.1 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js
foreman-tasks-8.3.3 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js
foreman-tasks-9.0.0 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js
foreman-tasks-8.2.1 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js
foreman-tasks-8.1.4 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js
foreman-tasks-8.3.2 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js
foreman-tasks-8.3.1 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js
foreman-tasks-8.1.3 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js
foreman-tasks-8.3.0 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js