|
|
|
@ -213,13 +213,6 @@ class Data extends Component {
@@ -213,13 +213,6 @@ class Data extends Component {
|
|
|
|
|
</div> |
|
|
|
|
), |
|
|
|
|
}, |
|
|
|
|
// { |
|
|
|
|
// title: 'Статус', |
|
|
|
|
// dataIndex: 'status_title', |
|
|
|
|
// key: 'status_title', |
|
|
|
|
// sortOrder: sortedInfo.columnKey === 'status_title' && sortedInfo.order, |
|
|
|
|
// sorter: (a, b) => this.sortString(a.status_title, b.status_title), |
|
|
|
|
// }, |
|
|
|
|
{ |
|
|
|
|
title: 'Початок', |
|
|
|
|
dataIndex: 'start_date', |
|
|
|
@ -242,65 +235,11 @@ class Data extends Component {
@@ -242,65 +235,11 @@ class Data extends Component {
|
|
|
|
|
sorter: (a, b) => this.sortDate(a.end_date, b.end_date), |
|
|
|
|
sortOrder: sortedInfo.columnKey === 'end_date' && sortedInfo.order, |
|
|
|
|
}, |
|
|
|
|
// { |
|
|
|
|
// title: 'Котроль', |
|
|
|
|
// dataIndex: 'controll_date', |
|
|
|
|
// key: 'controll_date', |
|
|
|
|
// render: (date) => { |
|
|
|
|
// return date ? moment(date).format('DD-MM-YYYY') : ''; |
|
|
|
|
// }, |
|
|
|
|
// sorter: (a, b) => this.sortDate(a.controll_date, b.controll_date), |
|
|
|
|
// sortOrder: sortedInfo.columnKey === 'controll_date' && sortedInfo.order, |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// title: 'Виконано', |
|
|
|
|
// dataIndex: 'done_date', |
|
|
|
|
// key: 'done_date', |
|
|
|
|
// render: (value, record) => { |
|
|
|
|
// return value ? moment(value).format('DD-MM-YYYY') : '' |
|
|
|
|
// }, |
|
|
|
|
// sorter: (a, b) => this.sortDate(a.done_date, b.done_date), |
|
|
|
|
// sortOrder: sortedInfo.columnKey === 'done_date' && sortedInfo.order, |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// title: 'Якість', |
|
|
|
|
// dataIndex: 'quality', |
|
|
|
|
// key: 'quality', |
|
|
|
|
// sorter: (a, b) => { |
|
|
|
|
// if (a.quality < b.quality) |
|
|
|
|
// return -1; |
|
|
|
|
// if (a.quality > b.quality) |
|
|
|
|
// return 1; |
|
|
|
|
// return 0; |
|
|
|
|
// }, |
|
|
|
|
// sortOrder: sortedInfo.columnKey === 'quality' && sortedInfo.order, |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// title: 'Хто створив', |
|
|
|
|
// dataIndex: 'user_created', |
|
|
|
|
// key: 'user_created', |
|
|
|
|
// sorter: true, |
|
|
|
|
// render: (user_id) => { |
|
|
|
|
// let index = _.findIndex(users, ['id', user_id]); |
|
|
|
|
// if(~index){ |
|
|
|
|
// return users[index].name |
|
|
|
|
// } |
|
|
|
|
// return user_id; |
|
|
|
|
// }, |
|
|
|
|
// sortOrder: sortedInfo.columnKey === 'user_created' && sortedInfo.order, |
|
|
|
|
// }, |
|
|
|
|
{ |
|
|
|
|
title: 'Хто створив', |
|
|
|
|
dataIndex: 'user_created_title', |
|
|
|
|
key: 'user_created_title', |
|
|
|
|
sorter: (a, b) => this.sortString(a.user_created_title, b.user_created_title), |
|
|
|
|
// render: (user_id) => { |
|
|
|
|
// let index = _.findIndex(users, ['id', user_id]); |
|
|
|
|
// if(~index){ |
|
|
|
|
// return users[index].name |
|
|
|
|
// } |
|
|
|
|
// return user_id; |
|
|
|
|
// }, |
|
|
|
|
sortOrder: sortedInfo.columnKey === 'user_created_title' && sortedInfo.order, |
|
|
|
|
render: (text, record) => ( |
|
|
|
|
<div style={{ |
|
|
|
@ -313,20 +252,6 @@ class Data extends Component {
@@ -313,20 +252,6 @@ class Data extends Component {
|
|
|
|
|
</div> |
|
|
|
|
), |
|
|
|
|
}, |
|
|
|
|
// { |
|
|
|
|
// title: 'Кому виконувати', |
|
|
|
|
// dataIndex: 'user_done', |
|
|
|
|
// key: 'user_done', |
|
|
|
|
// sorter: true, |
|
|
|
|
// render: (user_id) => { |
|
|
|
|
// let index = _.findIndex(users, ['id', user_id]); |
|
|
|
|
// if(~index){ |
|
|
|
|
// return users[index].name |
|
|
|
|
// } |
|
|
|
|
// return user_id; |
|
|
|
|
// }, |
|
|
|
|
// sortOrder: sortedInfo.columnKey === 'user_done' && sortedInfo.order, |
|
|
|
|
// }, |
|
|
|
|
{ |
|
|
|
|
title: 'Виконавець', |
|
|
|
|
dataIndex: 'user_done_title', |
|
|
|
@ -344,13 +269,6 @@ class Data extends Component {
@@ -344,13 +269,6 @@ class Data extends Component {
|
|
|
|
|
</div> |
|
|
|
|
), |
|
|
|
|
}, |
|
|
|
|
// { |
|
|
|
|
// title: 'Заявка', |
|
|
|
|
// dataIndex: 'base', |
|
|
|
|
// key: 'base', |
|
|
|
|
// sorter: (a, b) => this.sortString(a.base, b.base), |
|
|
|
|
// sortOrder: sortedInfo.columnKey === 'base' && sortedInfo.order, |
|
|
|
|
// }, |
|
|
|
|
{ |
|
|
|
|
title: '', |
|
|
|
|
key: 'action', |
|
|
|
@ -361,25 +279,7 @@ class Data extends Component {
@@ -361,25 +279,7 @@ class Data extends Component {
|
|
|
|
|
{record.documents && record.documents.length ? <i style={{color: 'rgba(162,162,162,.65)'}} className="fal fa-paperclip"></i> : null} |
|
|
|
|
{record.documents && record.documents.length ? <span style={{padding: '2px'}}> </span> : null} |
|
|
|
|
{record.comments && record.comments.length ? <i style={{color: 'rgba(162,162,162,.65)'}} className="fal fa-comment"></i> : null} |
|
|
|
|
{/* {record.comments && record.comments.length ? <span style={{padding: '2px'}}> </span> : null} */} |
|
|
|
|
{/* {profile && profile.favorites && profile.favorites.indexOf(record.id) > -1 ? <i className="fas fa-star"></i> : null} */} |
|
|
|
|
</span> |
|
|
|
|
// <span> |
|
|
|
|
// {this.getCheckPermissionsTask('update', record) ? <a className="lnr lnr-pencil" href='javascript:;' onClick={() => { |
|
|
|
|
// this.props.setItemTask(record); |
|
|
|
|
// this.props.showModal(true); |
|
|
|
|
// }}></a> : null} |
|
|
|
|
// <span style={{padding: '10px'}}> </span> |
|
|
|
|
|
|
|
|
|
// {this.getCheckPermissionsTask('destroy', record) ? <Popconfirm |
|
|
|
|
// title="Ви справді хочете видалити цю задачу?" |
|
|
|
|
// onConfirm={() => { |
|
|
|
|
// this.props.deleteTask(record.id) |
|
|
|
|
// }} |
|
|
|
|
// > |
|
|
|
|
// <a className="lnr lnr-trash" href="javascript:;"></a> |
|
|
|
|
// </Popconfirm> : null} |
|
|
|
|
// </span> |
|
|
|
|
), |
|
|
|
|
} |
|
|
|
|
]; |
|
|
|
@ -400,31 +300,7 @@ class Data extends Component {
@@ -400,31 +300,7 @@ class Data extends Component {
|
|
|
|
|
key: 'status_title', |
|
|
|
|
sortOrder: sortedInfo.columnKey === 'status_title' && sortedInfo.order, |
|
|
|
|
sorter: (a, b) => this.sortString(a.status_title, b.status_title), |
|
|
|
|
}, |
|
|
|
|
// { |
|
|
|
|
// title: 'Дії', |
|
|
|
|
// key: 'action', |
|
|
|
|
// width: 100, |
|
|
|
|
// // fixed: 'right', |
|
|
|
|
// render: (text, record) => ( |
|
|
|
|
// <span> |
|
|
|
|
// {this.getCheckPermissionsTask('update', record) ? <a className="lnr lnr-pencil" href='javascript:;' onClick={() => { |
|
|
|
|
// this.props.setItemTask(record); |
|
|
|
|
// this.props.showModal(true); |
|
|
|
|
// }}></a> : null} |
|
|
|
|
// <span style={{padding: '10px'}}> </span> |
|
|
|
|
|
|
|
|
|
// {this.getCheckPermissionsTask('destroy', record) ? <Popconfirm |
|
|
|
|
// title="Ви справді хочете видалити цю задачу?" |
|
|
|
|
// onConfirm={() => { |
|
|
|
|
// this.props.deleteTask(record.id) |
|
|
|
|
// }} |
|
|
|
|
// > |
|
|
|
|
// <a className="lnr lnr-trash" href="javascript:;"></a> |
|
|
|
|
// </Popconfirm> : null} |
|
|
|
|
// </span> |
|
|
|
|
// ), |
|
|
|
|
// } |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|