aboutsummaryrefslogtreecommitdiff
path: root/packages/exchange-backoffice-ui
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-05-17 09:57:53 -0300
committerSebastian <sebasjm@gmail.com>2023-05-17 09:58:08 -0300
commitc850c406821064d4d69420392b32853a41cdb91e (patch)
treec4e5bc7cf8f16da7cab1cb57b4abb60eb5b5803b /packages/exchange-backoffice-ui
parentacf0dda83f3974187cacf58e7d81c2115f6d950d (diff)
downloadwallet-core-c850c406821064d4d69420392b32853a41cdb91e.tar.xz
version id
Diffstat (limited to 'packages/exchange-backoffice-ui')
-rw-r--r--packages/exchange-backoffice-ui/src/Dashborad.tsx31
-rw-r--r--packages/exchange-backoffice-ui/src/declaration.d.ts2
-rw-r--r--packages/exchange-backoffice-ui/src/handlers/FormProvider.tsx2
3 files changed, 29 insertions, 6 deletions
diff --git a/packages/exchange-backoffice-ui/src/Dashborad.tsx b/packages/exchange-backoffice-ui/src/Dashborad.tsx
index 80df4127a..4fdb7415a 100644
--- a/packages/exchange-backoffice-ui/src/Dashborad.tsx
+++ b/packages/exchange-backoffice-ui/src/Dashborad.tsx
@@ -157,6 +157,9 @@ function classNames(...classes: string[]) {
*
* 4.- tooltip are not placed correctly: the arrow should point the question mark
* and the text area should be bigger
+ *
+ * 5.- date field should have the calendar icon clickable so the user can select date without
+ * writing text with the correct format
*/
export function Dashboard({
@@ -165,19 +168,16 @@ export function Dashboard({
children?: ComponentChildren;
}): VNode {
const [sidebarOpen, setSidebarOpen] = useState(false);
- const [selectedForm, setSelectedForm] = useState(7);
+ const [selectedForm, setSelectedForm] = useState(0);
function changeForm(next: number) {
setSelectedForm(next);
}
const logRef = useRef<HTMLPreElement>(null);
const storedValue = {
- fullName: "the logged fullName",
+ fullName: "loggedIn_user_fullname",
when: {
t_ms: new Date().getTime(),
},
- originOfAssets: {
- currency: "usd",
- },
};
function showFormOnSidebar(v: any) {
if (!logRef.current) return;
@@ -188,6 +188,16 @@ export function Dashboard({
showFormOnSidebar(storedValue);
});
+ const GIT_HASH =
+ typeof __GIT_HASH__ !== "undefined" ? __GIT_HASH__ : undefined;
+ const VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : undefined;
+
+ const versionText = VERSION
+ ? GIT_HASH
+ ? `Version ${VERSION} (${GIT_HASH.substring(0, 8)})`
+ : VERSION
+ : "";
+
const showingFrom = navigation[selectedForm];
return (
<>
@@ -531,6 +541,17 @@ export function Dashboard({
</div>
</div>
</main>
+
+ <footer class="bg-white">
+ <div class="mx-auto px-4 py-2 md:flex md:items-center md:justify-between lg:px-8">
+ <div class="mt-8 md:order-1 md:mt-0">
+ <p class="text-center text-xs leading-5 text-gray-500">
+ Copyright &copy; 2014&mdash;2023 Taler Systems SA.
+ {versionText}
+ </p>
+ </div>
+ </div>
+ </footer>
</div>
</div>
</>
diff --git a/packages/exchange-backoffice-ui/src/declaration.d.ts b/packages/exchange-backoffice-ui/src/declaration.d.ts
new file mode 100644
index 000000000..c1e9addbc
--- /dev/null
+++ b/packages/exchange-backoffice-ui/src/declaration.d.ts
@@ -0,0 +1,2 @@
+declare const __VERSION__: string;
+declare const __GIT_HASH__: string;
diff --git a/packages/exchange-backoffice-ui/src/handlers/FormProvider.tsx b/packages/exchange-backoffice-ui/src/handlers/FormProvider.tsx
index 4397fc197..d8877333c 100644
--- a/packages/exchange-backoffice-ui/src/handlers/FormProvider.tsx
+++ b/packages/exchange-backoffice-ui/src/handlers/FormProvider.tsx
@@ -51,7 +51,7 @@ export function FormProvider<T>({
const value = useRef(initialValue ?? {});
useEffect(() => {
return function onUnload() {
- value.current = {};
+ value.current = initialValue ?? {};
};
});
return (