Skip to content

Commit

Permalink
♻️ Use the new PaymentCell component
Browse files Browse the repository at this point in the history
Co-authored-by: David García Garzón <david.garcia@somenergia.coop>
  • Loading branch information
javikalsan and vokimon committed Feb 12, 2024
1 parent 72da180 commit 1eb93d2
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions frontend/src/pages/InvoicesPage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,6 @@ export default function InvoicesPage() {
services: t('INVOICES.CONCEPT_OPTION_SERVICES'),
}

const state_options = {
paid: <><DoneIcon style={{ color: '#96B633', verticalAlign: 'middle'}} /> {t('INVOICES.PAID_STATUS_OPTION_PAID')}</>,
open: <><ClearIcon style={{ color: 'red', verticalAlign: 'middle'}} /> {t('INVOICES.PAID_STATUS_OPTION_OPEN')}</>,
draft: <><RestartAltIcon style={{ color: '#FFC300', verticalAlign: 'middle'}}/> {t('INVOICES.PAID_STATUS_OPTION_DRAFT')}</>,
}

const columns = [
{
id: 'invoice_number', // TODO: can we name it contract?
Expand Down Expand Up @@ -139,7 +133,7 @@ export default function InvoicesPage() {
label: t('INVOICES.COLUMN_PAID_STATUS'),
searchable: false,
numeric: false,
view: (row) => format.enumeration(row.state, state_options),
view: (row) => <PaymentCell payment_status={row.payment_status} />,
},
]
const actions = []
Expand Down

0 comments on commit 1eb93d2

Please sign in to comment.