Rearrange and move prominent action icons to the front

This commit is contained in:
Kailash Nadh 2018-11-05 23:07:10 +05:30
parent d09a16d514
commit ec7d398c21

View file

@ -117,19 +117,6 @@ class Campaigns extends React.PureComponent {
render: (text, record) => {
return (
<div className="actions">
<Tooltip title="Preview campaign" placement="bottom">
<a role="button" onClick={() => {
this.handlePreview(record)
}}><Icon type="search" /></a>
</Tooltip>
<Tooltip title="Clone campaign" placement="bottom">
<a role="button" onClick={() => {
let r = { ...record, lists: record.lists.map((i) => { return i.id }) }
this.handleToggleCloneForm(r)
}}><Icon type="copy" /></a>
</Tooltip>
{ ( record.status === cs.CampaignStatusPaused ) &&
<Popconfirm title="Are you sure?" onConfirm={() => this.handleUpdateStatus(record, cs.CampaignStatusRunning)}>
<Tooltip title="Resume campaign" placement="bottom"><a role="button"><Icon type="rocket" /></a></Tooltip>
@ -161,6 +148,19 @@ class Campaigns extends React.PureComponent {
</Popconfirm>
}
<Tooltip title="Preview campaign" placement="bottom">
<a role="button" onClick={() => {
this.handlePreview(record)
}}><Icon type="search" /></a>
</Tooltip>
<Tooltip title="Clone campaign" placement="bottom">
<a role="button" onClick={() => {
let r = { ...record, lists: record.lists.map((i) => { return i.id }) }
this.handleToggleCloneForm(r)
}}><Icon type="copy" /></a>
</Tooltip>
{ ( record.status === cs.CampaignStatusDraft || record.status === cs.CampaignStatusScheduled ) &&
<Popconfirm title="Are you sure?" onConfirm={() => this.handleDeleteRecord(record)}>
<Tooltip title="Delete campaign" placement="bottom"><a role="button"><Icon type="delete" /></a></Tooltip>