Skip to content

Commit

Permalink
🚧 Just a funny addition, future requirements
Browse files Browse the repository at this point in the history
I added this action to the invoices to test whether
two actiosn look good on ListView. They do.

For sure at some point someone will ask for this feature.
At least the ui part is done.
  • Loading branch information
vokimon committed May 21, 2024
1 parent bd10020 commit 84ba21a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions frontend/src/pages/InvoicesPage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import RoomServiceIcon from '@mui/icons-material/RoomService'
import RequestQuoteIcon from '@mui/icons-material/RequestQuote'
import StorefrontIcon from '@mui/icons-material/Storefront'
import PictureAsPdfIcon from '@mui/icons-material/PictureAsPdf'
import CreditCardIcon from '@mui/icons-material/CreditCard'
import DownloadIcon from '@mui/icons-material/Download'
import RestartAltIcon from '@mui/icons-material/RestartAlt'
import DoneIcon from '@mui/icons-material/Done'
Expand Down Expand Up @@ -218,6 +219,25 @@ export default function InvoicesPage() {
},
]
const itemActions = [
{
title: t('INVOICES.TOOLTIP_PAY_INVOICE'),
icon: <CreditCardIcon />,
view: (invoice) => (
<Tooltip title={t('INVOICES.TOOLTIP_PAY_INVOICE')}
>
<IconButton
disabled={!isPaymentEnabled || invoice.payment_status!=="open"}
onClick={(ev)=>{
messages.warn(t("INVOICES.PAYMENT_NOT_YET_AVAILABLE"))
ev.stopPropagation()
}}
size={isSm?"large":"small"}
>
<CreditCardIcon fontSize='inherit'/>
</IconButton>
</Tooltip>
),
},
{
title: t('INVOICES.TOOLTIP_PDF'),
icon: <PictureAsPdfIcon />,
Expand Down

0 comments on commit 84ba21a

Please sign in to comment.