[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant-backoffice] branch master updated: add select by order i
From: |
gnunet |
Subject: |
[taler-merchant-backoffice] branch master updated: add select by order id |
Date: |
Tue, 13 Apr 2021 21:03:51 +0200 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository merchant-backoffice.
The following commit(s) were added to refs/heads/master by this push:
new fb5a844 add select by order id
fb5a844 is described below
commit fb5a844be86c40e0fea2985092724e69f7a39374
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Tue Apr 13 16:03:38 2021 -0300
add select by order id
---
.../src/paths/instance/orders/list/index.tsx | 34 ++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/packages/frontend/src/paths/instance/orders/list/index.tsx
b/packages/frontend/src/paths/instance/orders/list/index.tsx
index d846c27..e7baff4 100644
--- a/packages/frontend/src/paths/instance/orders/list/index.tsx
+++ b/packages/frontend/src/paths/instance/orders/list/index.tsx
@@ -52,6 +52,9 @@ export default function ({ onUnauthorized, onLoadError,
onCreate, onSelect, onNo
const [notif, setNotif] = useState<Notification | undefined>(undefined)
+ const [orderId, setOrderId] = useState<string | undefined>(undefined)
+ const [errorOrderId, setErrorOrderId] = useState<string |
undefined>(undefined)
+
if (result.clientError && result.isUnauthorized) return onUnauthorized()
if (result.clientError && result.isNotfound) return onNotFound()
if (result.loading) return <Loading />
@@ -62,9 +65,40 @@ export default function ({ onUnauthorized, onLoadError,
onCreate, onSelect, onNo
const isNotWiredActive = filter.wired === 'no' ? "is-active" : ''
const isAllActive = filter.paid === undefined && filter.refunded ===
undefined && filter.wired === undefined ? 'is-active' : ''
+ async function testIfOrderExistAndSelect() {
+ if (!orderId) {
+ setErrorOrderId('place an order id here')
+ return;
+ }
+ try {
+ const r = await getPaymentURL(orderId)
+ onSelect(orderId)
+ setErrorOrderId(undefined)
+ } catch {
+ setErrorOrderId('order not found')
+ }
+ }
+
return <section class="section is-main-section">
<NotificationCard notification={notif} />
+ <div class="level">
+ <div class="level-left">
+ <div class="level-item">
+ <div class="field has-addons">
+ <div class="control">
+ <input class={errorOrderId ? "input is-danger" : "input"}
type="text" value={orderId} onChange={e => setOrderId(e.currentTarget.value)}
placeholder="go to order id" />
+ {errorOrderId && <p class="help is-danger">{errorOrderId}</p>}
+ </div>
+ <div class="control">
+ <a class="button" onClick={testIfOrderExistAndSelect}>
+ <span class="icon"><i class="mdi mdi-arrow-right" /></span>
+ </a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
<div class="columns">
<div class="column">
<div class="tabs">
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant-backoffice] branch master updated: add select by order id,
gnunet <=