[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant-backoffice] 01/06: h collide
From: |
gnunet |
Subject: |
[taler-merchant-backoffice] 01/06: h collide |
Date: |
Thu, 24 Jun 2021 18:59:48 +0200 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository merchant-backoffice.
commit 8a6e70ec50aaec0d0885a4c85950a086c544e922
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Thu Jun 24 13:56:51 2021 -0300
h collide
---
.../src/components/picker/DurationPicker.tsx | 40 +++++++++++-----------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/packages/frontend/src/components/picker/DurationPicker.tsx
b/packages/frontend/src/components/picker/DurationPicker.tsx
index 2d51f2d..1c301c9 100644
--- a/packages/frontend/src/components/picker/DurationPicker.tsx
+++ b/packages/frontend/src/components/picker/DurationPicker.tsx
@@ -35,36 +35,36 @@ export interface Props {
// inspiration taken from https://github.com/flurmbo/react-duration-picker
export function DurationPicker({ days, hours, minutes, seconds, onChange,
value }: Props): VNode {
- const s = 1000
- const m = s * 60
- const h = m * 60
- const d = h * 24
+ const ss = 1000
+ const ms = ss * 60
+ const hs = ms * 60
+ const ds = hs * 24
const i18n = useTranslator()
return <div class="rdp-picker">
{days && <DurationColumn unit={i18n`days`} max={99}
- value={Math.floor(value / d)}
- onDecrease={value >= d ? () => onChange(value - d) : undefined}
- onIncrease={value < 99 * d ? () => onChange(value + d) : undefined}
- onChange={diff => onChange(value + diff * d)}
+ value={Math.floor(value / ds)}
+ onDecrease={value >= ds ? () => onChange(value - ds) : undefined}
+ onIncrease={value < 99 * ds ? () => onChange(value + ds) : undefined}
+ onChange={diff => onChange(value + diff * ds)}
/>}
{hours && <DurationColumn unit={i18n`hours`} max={23} min={1}
- value={Math.floor(value / h) % 24}
- onDecrease={value >= h ? () => onChange(value - h) : undefined}
- onIncrease={value < 99 * d ? () => onChange(value + h) : undefined}
- onChange={diff => onChange(value + diff * h)}
+ value={Math.floor(value / hs) % 24}
+ onDecrease={value >= hs ? () => onChange(value - hs) : undefined}
+ onIncrease={value < 99 * ds ? () => onChange(value + hs) : undefined}
+ onChange={diff => onChange(value + diff * hs)}
/>}
{minutes && <DurationColumn unit={i18n`minutes`} max={59} min={1}
- value={Math.floor(value / m) % 60}
- onDecrease={value >= m ? () => onChange(value - m) : undefined}
- onIncrease={value < 99 * d ? () => onChange(value + m) : undefined}
- onChange={diff => onChange(value + diff * m)}
+ value={Math.floor(value / ms) % 60}
+ onDecrease={value >= ms ? () => onChange(value - ms) : undefined}
+ onIncrease={value < 99 * ds ? () => onChange(value + ms) : undefined}
+ onChange={diff => onChange(value + diff * ms)}
/>}
{seconds && <DurationColumn unit={i18n`seconds`} max={59}
- value={Math.floor(value / s) % 60}
- onDecrease={value >= s ? () => onChange(value - s) : undefined}
- onIncrease={value < 99 * d ? () => onChange(value + s) : undefined}
- onChange={diff => onChange(value + diff * s)}
+ value={Math.floor(value / ss) % 60}
+ onDecrease={value >= ss ? () => onChange(value - ss) : undefined}
+ onIncrease={value < 99 * ds ? () => onChange(value + ss) : undefined}
+ onChange={diff => onChange(value + diff * ss)}
/>}
</div>
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-merchant-backoffice] branch master updated (f4e5ed9 -> edf1742), gnunet, 2021/06/24
- [taler-merchant-backoffice] 03/06: missing shipping, gnunet, 2021/06/24
- [taler-merchant-backoffice] 06/06: places holder for transaction, gnunet, 2021/06/24
- [taler-merchant-backoffice] 01/06: h collide,
gnunet <=
- [taler-merchant-backoffice] 02/06: fix loop render, gnunet, 2021/06/24
- [taler-merchant-backoffice] 04/06: fix mixed up fields, gnunet, 2021/06/24
- [taler-merchant-backoffice] 05/06: split QR and added into reserve details, gnunet, 2021/06/24