Commit 55093ef8 authored by Roman's avatar Roman

fix(Actions) - change the default style name for list button + lint

parent 07b7bd5b
......@@ -60,7 +60,7 @@ class CustomersList extends Component {
}, {
type: 'import',
label: 'Import',
actionStyle: 'default',
actionStyle: 'primary',
showIcon: true,
onClick: this.onClickImprt,
actionSize: 'xsmall',
......
......@@ -33,7 +33,7 @@ class CycleData extends Component {
reloadCycleData: () => {},
baseFilter: {},
showConfirmAllButton: true,
isCycleConfirmed:false,
isCycleConfirmed: false,
currency: '',
invoicesNum: 0,
};
......@@ -234,16 +234,16 @@ class CycleData extends Component {
return moment.unix(sentDate).format(globalSetting.datetimeFormat);
};
downloadTaxURL = (billrunKey) =>
downloadTaxURL = billrunKey =>
`${getConfig('serverUrl')}/api/report?action=taxationReport&report={"billrun_key":"${billrunKey}"}&type=csv`;
parseTaxDownload = (entity) => {
const { billrunKey } = this.props
const downloadUrl = this.downloadTaxURL( billrunKey );
const { billrunKey } = this.props;
const downloadUrl = this.downloadTaxURL(billrunKey);
return (
<form method="post" action={downloadUrl} target="_blank">
<Button className={entity.actionClass} bsStyle={entity.actionStyle} bsSize={entity.actionSize} type="submit">
{entity.label}
{entity.label}
</Button>
</form>
);
......@@ -252,24 +252,22 @@ class CycleData extends Component {
getListActions = () => {
const { showConfirmAllButton, isCycleConfirmed } = this.props;
return [{
label: 'Confirm All',
actionStyle: 'default',
show :showConfirmAllButton,
showIcon: false,
onClick: this.onClickConfirmAll,
actionSize: 'xsmall',
actionClass: 'btn-primary',
},
{
label: 'Download Taxation compliance report',
actionStyle: 'default',
show : isCycleConfirmed,
showIcon: false,
renderFunc : this.parseTaxDownload,
actionSize: 'xsmall',
actionClass: 'btn-primary',
}
];
label: 'Confirm All',
actionStyle: 'primary',
show: showConfirmAllButton,
showIcon: false,
onClick: this.onClickConfirmAll,
actionSize: 'xsmall',
actionClass: 'btn-primary',
}, {
label: 'Download Taxation compliance report',
actionStyle: 'primary',
show: isCycleConfirmed,
showIcn: false,
renderFunc: this.parseTaxDownload,
actionSize: 'xsmall',
actionClass: 'btn-primary',
}];
}
onCloseConfirmationModal = () => {
......@@ -314,7 +312,7 @@ class CycleData extends Component {
{ id: 'attributes.lastname', title: 'Customer Last Name', sort: true, parser: this.parseCycleDataLastName },
{ id: 'totals.after_vat_rounded', title: 'Invoice Total', sort: true, parser: this.parseCycleDataInvoiceTotal },
{ id: 'subss', title: '# of Subscribers', parser: this.parseCycleDataSubscriptionNum },
{ id: 'invoice_id', title: 'Invoice ID', 'sort': true, parser: this.parseCycleDataInvoiceId },
{ id: 'invoice_id', title: 'Invoice ID', sort: true, parser: this.parseCycleDataInvoiceId },
{ id: 'download', title: 'Invoice', parser: this.parseCycleDataDownload },
{ id: 'confirm', title: 'Confirm', parser: this.parseCycleDataConfirm },
{ id: 'email_sent', title: 'Email Sent', sort: true, parser: this.parseCycleDataEmailSent, display: displayEmailSent },
......
......@@ -244,7 +244,7 @@ class EntityList extends Component {
const defaultActions = [{
type: 'refresh',
label: 'Refresh',
actionStyle: 'default',
actionStyle: 'primary',
showIcon: true,
onClick: this.onClickRefresh,
actionSize: 'xsmall',
......@@ -252,7 +252,7 @@ class EntityList extends Component {
}, {
type: 'add',
label: 'Add New',
actionStyle: 'default',
actionStyle: 'primary',
showIcon: true,
onClick: this.onClickNew,
actionSize: 'xsmall',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment