Skip to content

Commit

Permalink
fix: content tweaks in rates re-calc popover
Browse files Browse the repository at this point in the history
  • Loading branch information
abouolia committed Jan 14, 2024
1 parent 2b03ac7 commit 1e4b29f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 21 deletions.
24 changes: 14 additions & 10 deletions packages/webapp/src/components/ExchangeRate/ExchangeRateInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
ControlGroup,
Intent,
Popover,
Position,
Spinner,
} from '@blueprintjs/core';
import { FlagIcon } from '../Tags';
Expand Down Expand Up @@ -106,31 +107,30 @@ export function ExchangeRateInputGroup({
const popoverConfirmContent = (
<PopoverContent>
<p>
Are you want to re-calculate item prices based on this exchange rate
Are you want to re-calculate item prices based on this exchange rate.
</p>
<div
style={{
display: 'flex',
justifyContent: 'flex-end',
marginTop: 15,
}}
>
<Button
intent={Intent.WARNING}
className={Classes.POPOVER_DISMISS}
style={{ marginRight: 10 }}
onClick={handleCancelBtn}
onClick={handleRecalcConfirmBtn}
small
minimal
>
Cancel
Calculate
</Button>
<Button
intent={Intent.WARNING}
className={Classes.POPOVER_DISMISS}
onClick={handleRecalcConfirmBtn}
style={{ marginRight: 10 }}
onClick={handleCancelBtn}
small
minimal
>
Re-calculate
Cancel
</Button>
</div>
</PopoverContent>
Expand All @@ -144,7 +144,11 @@ export function ExchangeRateInputGroup({
</ExchangeRatePrepend>

{withPopoverRecalcConfirm ? (
<Popover isOpen={isOpen} content={popoverConfirmContent}>
<Popover
isOpen={isOpen}
content={popoverConfirmContent}
position={Position.RIGHT}
>
{exchangeRateField}
</Popover>
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ import { Button, Classes, Intent } from '@blueprintjs/core';
*/
function InvoiceExchangeRateChangeDialog({
dialogName,
payload: { initialFormValues },
isOpen,
onConfirm,
// #withDialogActions
closeDialog,
}) {
Expand All @@ -23,6 +21,7 @@ function InvoiceExchangeRateChangeDialog({
return (
<Dialog
name={dialogName}
title={'Kindly take care of new rates'}
autoFocus={true}
canEscapeKeyClose={true}
isOpen={isOpen}
Expand All @@ -31,18 +30,13 @@ function InvoiceExchangeRateChangeDialog({
<DialogSuspense>
<div className={Classes.DIALOG_BODY}>
<p>
You have changed customer's currency after adding items to the
Invoice.
</p>

<p>
The item rates have been adjusted to the new currency using exchange
rate feeds.
The item rates have been <strong>adjusted</strong> to the new
currency using realtime exchange rate.
</p>

<p style={{ marginBottom: '30px' }}>
Before saving the transaction, ensure that the item rates align with
the current exchange rate of the newly selected currency.
Make sure to check that the item rates match the current exchange
rate of the newly selected currency before saving the transaction.
</p>
</div>

Expand Down

0 comments on commit 1e4b29f

Please sign in to comment.