import SubJobIcon from '../../components/Icons/SubJobIcon'

export const SubJob = {
  name: 'subJob',
  label: 'Sub Job',
  prefix: 'SJB',
  icon: SubJobIcon,
  actions: [],
  columns: ['_id', 'printer', 'printer._id', 'job._id', 'state', 'createdAt'],
  filters: ['state', '_id', 'job._id', 'printer._id'],
  sorters: ['createdAt', 'state'],
  properties: [
    {
      name: '_id',
      label: 'ID',
      type: 'id',
      columnFixed: 'left',
      objectType: 'subJob',
      showCopy: true
    },
    {
      name: 'printer',
      label: 'Printer',
      type: 'object',
      columnFixed: 'left',
      objectType: 'printer'
    },
    {
      name: 'printer._id',
      label: 'Printer ID',
      type: 'id',
      columnFixed: 'left',
      showHyperlink: true,
      objectType: 'printer'
    },
    {
      name: 'job._id',
      label: 'Job ID',
      type: 'id',
      showHyperlink: true,
      objectType: 'job'
    },
    {
      name: 'state',
      label: 'State',
      type: 'state',
      objectType: 'subJob',
      showStatus: true,
      showProgress: true,
      showId: false,
      showQuantity: false,
      columnWidth: 150,
      readOnly: true
    },
    {
      name: 'createdAt',
      label: 'Created At',
      type: 'dateTime',
      readOnly: true
    }
  ]
}
