fix imports
This commit is contained in:
parent
66460e5650
commit
e6a95d246d
@ -28,3 +28,4 @@ our_configure=build-system/taler-build-scripts/configure
|
|||||||
copy_configure "$our_configure" ./configure
|
copy_configure "$our_configure" ./configure
|
||||||
copy_configure "$our_configure" ./packages/taler-wallet-cli/configure
|
copy_configure "$our_configure" ./packages/taler-wallet-cli/configure
|
||||||
copy_configure "$our_configure" ./packages/demobank-ui/configure
|
copy_configure "$our_configure" ./packages/demobank-ui/configure
|
||||||
|
copy_configure "$our_configure" ./packages/merchant-backoffice-ui/configure
|
||||||
|
17
packages/merchant-backoffice-ui/Makefile
Normal file
17
packages/merchant-backoffice-ui/Makefile
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# This Makefile has been placed in the public domain
|
||||||
|
|
||||||
|
# Settings from "./configure"
|
||||||
|
include .config.mk
|
||||||
|
|
||||||
|
all:
|
||||||
|
@echo run \'make install\' to install
|
||||||
|
|
||||||
|
spa_dir=$(prefix)/share/taler/demobank-ui
|
||||||
|
|
||||||
|
install:
|
||||||
|
pnpm install --frozen-lockfile --filter @gnu-taler/demobank-ui...
|
||||||
|
pnpm run check
|
||||||
|
pnpm run build
|
||||||
|
install -d $(spa_dir)
|
||||||
|
install ./dist/* $(spa_dir)
|
||||||
|
|
@ -15,8 +15,8 @@
|
|||||||
*/
|
*/
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import Router, { route, Route } from "preact-router";
|
import Router, { route, Route } from "preact-router";
|
||||||
import InstanceCreatePage from "./paths/admin/create";
|
import InstanceCreatePage from "./paths/admin/create/index.js";
|
||||||
import InstanceListPage from './paths/admin/list';
|
import InstanceListPage from './paths/admin/list/index.js';
|
||||||
|
|
||||||
|
|
||||||
export enum AdminPaths {
|
export enum AdminPaths {
|
||||||
|
@ -20,13 +20,13 @@
|
|||||||
*/
|
*/
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import Router, { Route, route } from "preact-router";
|
import Router, { Route, route } from "preact-router";
|
||||||
import { useBackendContext } from "./context/backend";
|
import { useBackendContext } from "./context/backend.js";
|
||||||
import { useBackendInstancesTestForAdmin } from "./hooks/backend";
|
import { useBackendInstancesTestForAdmin } from "./hooks/backend.js";
|
||||||
import { InstanceRoutes } from "./InstanceRoutes";
|
import { InstanceRoutes } from "./InstanceRoutes.js";
|
||||||
import LoginPage from "./paths/login";
|
import LoginPage from "./paths/login/index.js";
|
||||||
import { INSTANCE_ID_LOOKUP } from "./utils/constants";
|
import { INSTANCE_ID_LOOKUP } from "./utils/constants.js";
|
||||||
import { NotYetReadyAppMenu, Menu, NotificationCard } from "./components/menu";
|
import { NotYetReadyAppMenu, NotificationCard } from "./components/menu/index.js";
|
||||||
import { useTranslator } from "./i18n";
|
import { useTranslator } from "./i18n/index.js";
|
||||||
import { createHashHistory } from "history";
|
import { createHashHistory } from "history";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
|
|
||||||
|
@ -22,39 +22,39 @@
|
|||||||
import { Fragment, FunctionComponent, h, VNode } from "preact";
|
import { Fragment, FunctionComponent, h, VNode } from "preact";
|
||||||
import { Route, route, Router } from "preact-router";
|
import { Route, route, Router } from "preact-router";
|
||||||
import { useCallback, useEffect, useMemo, useState } from "preact/hooks";
|
import { useCallback, useEffect, useMemo, useState } from "preact/hooks";
|
||||||
import { Loading } from "./components/exception/loading";
|
import { Loading } from "./components/exception/loading.js";
|
||||||
import { Menu, NotificationCard } from "./components/menu";
|
import { Menu, NotificationCard } from "./components/menu/index.js";
|
||||||
import { useBackendContext } from "./context/backend";
|
import { useBackendContext } from "./context/backend.js";
|
||||||
import { InstanceContextProvider } from "./context/instance";
|
import { InstanceContextProvider } from "./context/instance.js";
|
||||||
import {
|
import {
|
||||||
useBackendDefaultToken,
|
useBackendDefaultToken,
|
||||||
useBackendInstanceToken,
|
useBackendInstanceToken,
|
||||||
useLocalStorage,
|
useLocalStorage,
|
||||||
} from "./hooks";
|
} from "./hooks/index.js";
|
||||||
import { HttpError } from "./hooks/backend";
|
import { HttpError } from "./hooks/backend.js";
|
||||||
import { Translate, useTranslator } from "./i18n";
|
import { Translate, useTranslator } from "./i18n/index.js";
|
||||||
import InstanceCreatePage from "./paths/admin/create";
|
import InstanceCreatePage from "./paths/admin/create/index.js";
|
||||||
import InstanceListPage from "./paths/admin/list";
|
import InstanceListPage from "./paths/admin/list/index.js";
|
||||||
import OrderCreatePage from "./paths/instance/orders/create";
|
import OrderCreatePage from "./paths/instance/orders/create/index.js";
|
||||||
import OrderDetailsPage from "./paths/instance/orders/details";
|
import OrderDetailsPage from "./paths/instance/orders/details/index.js";
|
||||||
import OrderListPage from "./paths/instance/orders/list";
|
import OrderListPage from "./paths/instance/orders/list/index.js";
|
||||||
import ProductCreatePage from "./paths/instance/products/create";
|
import ProductCreatePage from "./paths/instance/products/create/index.js";
|
||||||
import ProductListPage from "./paths/instance/products/list";
|
import ProductListPage from "./paths/instance/products/list/index.js";
|
||||||
import ProductUpdatePage from "./paths/instance/products/update";
|
import ProductUpdatePage from "./paths/instance/products/update/index.js";
|
||||||
import TransferListPage from "./paths/instance/transfers/list";
|
import TransferListPage from "./paths/instance/transfers/list/index.js";
|
||||||
import TransferCreatePage from "./paths/instance/transfers/create";
|
import TransferCreatePage from "./paths/instance/transfers/create/index.js";
|
||||||
import ReservesCreatePage from "./paths/instance/reserves/create";
|
import ReservesCreatePage from "./paths/instance/reserves/create/index.js";
|
||||||
import ReservesDetailsPage from "./paths/instance/reserves/details";
|
import ReservesDetailsPage from "./paths/instance/reserves/details/index.js";
|
||||||
import ReservesListPage from "./paths/instance/reserves/list";
|
import ReservesListPage from "./paths/instance/reserves/list/index.js";
|
||||||
import ListKYCPage from "./paths/instance/kyc/list";
|
import ListKYCPage from "./paths/instance/kyc/list/index.js";
|
||||||
import InstanceUpdatePage, {
|
import InstanceUpdatePage, {
|
||||||
Props as InstanceUpdatePageProps,
|
Props as InstanceUpdatePageProps,
|
||||||
AdminUpdate as InstanceAdminUpdatePage,
|
AdminUpdate as InstanceAdminUpdatePage,
|
||||||
} from "./paths/instance/update";
|
} from "./paths/instance/update/index.js";
|
||||||
import LoginPage from "./paths/login";
|
import LoginPage from "./paths/login/index.js";
|
||||||
import NotFoundPage from "./paths/notfound";
|
import NotFoundPage from "./paths/notfound/index.js";
|
||||||
import { Notification } from "./utils/types";
|
import { Notification } from "./utils/types.js";
|
||||||
import { useInstanceKYCDetails } from "./hooks/instance";
|
import { useInstanceKYCDetails } from "./hooks/instance.js";
|
||||||
import { format } from "date-fns";
|
import { format } from "date-fns";
|
||||||
|
|
||||||
export enum InstancePaths {
|
export enum InstancePaths {
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { ComponentChildren, h } from "preact";
|
import { ComponentChildren, h } from "preact";
|
||||||
import { LoadingModal } from "../modal";
|
import { LoadingModal } from "../modal.js";
|
||||||
import { useAsync } from "../../hooks/async";
|
import { useAsync } from "../../hooks/async.js";
|
||||||
import { Translate } from "../../i18n";
|
import { Translate } from "../../i18n";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
@ -21,10 +21,10 @@
|
|||||||
|
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { useBackendContext } from "../../context/backend";
|
import { useBackendContext } from "../../context/backend.js";
|
||||||
import { useInstanceContext } from "../../context/instance";
|
import { useInstanceContext } from "../../context/instance.js";
|
||||||
import { Translate, useTranslator } from "../../i18n";
|
import { Translate, useTranslator } from "../../i18n";
|
||||||
import { Notification } from "../../utils/types";
|
import { Notification } from "../../utils/types.js";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
withMessage?: Notification;
|
withMessage?: Notification;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
import { ComponentChildren, h, VNode } from "preact";
|
import { ComponentChildren, h, VNode } from "preact";
|
||||||
import { useField, InputProps } from "./useField";
|
import { useField, InputProps } from "./useField.js";
|
||||||
|
|
||||||
interface Props<T> extends InputProps<T> {
|
interface Props<T> extends InputProps<T> {
|
||||||
inputType?: 'text' | 'number' | 'multiline' | 'password';
|
inputType?: 'text' | 'number' | 'multiline' | 'password';
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
*/
|
*/
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { Translate, useTranslator } from "../../i18n";
|
import { Translate, useTranslator } from "../../i18n/index.js";
|
||||||
import { InputProps, useField } from "./useField";
|
import { InputProps, useField } from "./useField.js";
|
||||||
|
|
||||||
export interface Props<T> extends InputProps<T> {
|
export interface Props<T> extends InputProps<T> {
|
||||||
isValid?: (e: any) => boolean;
|
isValid?: (e: any) => boolean;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { InputProps, useField } from "./useField";
|
import { InputProps, useField } from "./useField.js";
|
||||||
|
|
||||||
interface Props<T> extends InputProps<T> {
|
interface Props<T> extends InputProps<T> {
|
||||||
name: T;
|
name: T;
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
import { ComponentChildren, h } from "preact";
|
import { ComponentChildren, h } from "preact";
|
||||||
import { useConfigContext } from "../../context/config";
|
import { useConfigContext } from "../../context/config.js";
|
||||||
import { Amount } from "../../declaration";
|
import { Amount } from "../../declaration.js";
|
||||||
import { InputWithAddon } from "./InputWithAddon";
|
import { InputWithAddon } from "./InputWithAddon.js";
|
||||||
import { InputProps } from "./useField";
|
import { InputProps } from "./useField.js";
|
||||||
|
|
||||||
export interface Props<T> extends InputProps<T> {
|
export interface Props<T> extends InputProps<T> {
|
||||||
expand?: boolean;
|
expand?: boolean;
|
||||||
|
@ -21,9 +21,9 @@
|
|||||||
import { format } from "date-fns";
|
import { format } from "date-fns";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { Translate, useTranslator } from "../../i18n";
|
import { Translate, useTranslator } from "../../i18n/index.js";
|
||||||
import { DatePicker } from "../picker/DatePicker";
|
import { DatePicker } from "../picker/DatePicker.js";
|
||||||
import { InputProps, useField } from "./useField";
|
import { InputProps, useField } from "./useField.js";
|
||||||
|
|
||||||
export interface Props<T> extends InputProps<T> {
|
export interface Props<T> extends InputProps<T> {
|
||||||
readonly?: boolean;
|
readonly?: boolean;
|
||||||
|
@ -21,10 +21,10 @@
|
|||||||
import { intervalToDuration, formatDuration } from "date-fns";
|
import { intervalToDuration, formatDuration } from "date-fns";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { Translate, useTranslator } from "../../i18n";
|
import { Translate, useTranslator } from "../../i18n/index.js";
|
||||||
import { SimpleModal } from "../modal";
|
import { SimpleModal } from "../modal/index.js";
|
||||||
import { DurationPicker } from "../picker/DurationPicker";
|
import { DurationPicker } from "../picker/DurationPicker.js";
|
||||||
import { InputProps, useField } from "./useField";
|
import { InputProps, useField } from "./useField.js";
|
||||||
|
|
||||||
export interface Props<T> extends InputProps<T> {
|
export interface Props<T> extends InputProps<T> {
|
||||||
expand?: boolean;
|
expand?: boolean;
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
import { ComponentChildren, h, VNode } from "preact";
|
import { ComponentChildren, h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { useGroupField } from "./useGroupField";
|
import { useGroupField } from "./useGroupField.js";
|
||||||
|
|
||||||
export interface Props<T> {
|
export interface Props<T> {
|
||||||
name: T;
|
name: T;
|
||||||
|
@ -20,10 +20,9 @@
|
|||||||
*/
|
*/
|
||||||
import { ComponentChildren, h, VNode } from "preact";
|
import { ComponentChildren, h, VNode } from "preact";
|
||||||
import { useRef, useState } from "preact/hooks";
|
import { useRef, useState } from "preact/hooks";
|
||||||
import emptyImage from "../../assets/empty.png";
|
import { Translate } from "../../i18n/index.js";
|
||||||
import { Translate } from "../../i18n";
|
import { MAX_IMAGE_SIZE as MAX_IMAGE_UPLOAD_SIZE } from "../../utils/constants.js";
|
||||||
import { MAX_IMAGE_SIZE as MAX_IMAGE_UPLOAD_SIZE } from "../../utils/constants";
|
import { InputProps, useField } from "./useField.js";
|
||||||
import { InputProps, useField } from "./useField";
|
|
||||||
|
|
||||||
export interface Props<T> extends InputProps<T> {
|
export interface Props<T> extends InputProps<T> {
|
||||||
expand?: boolean;
|
expand?: boolean;
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
import { Fragment, h } from "preact";
|
import { Fragment, h } from "preact";
|
||||||
import { useTranslator } from "../../i18n";
|
import { useTranslator } from "../../i18n/index.js";
|
||||||
import { Input } from "./Input";
|
import { Input } from "./Input.js";
|
||||||
|
|
||||||
export function InputLocation({name}:{name:string}) {
|
export function InputLocation({name}:{name:string}) {
|
||||||
const i18n = useTranslator()
|
const i18n = useTranslator()
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
import { ComponentChildren, h } from "preact";
|
import { ComponentChildren, h } from "preact";
|
||||||
import { InputWithAddon } from "./InputWithAddon";
|
import { InputWithAddon } from "./InputWithAddon.js";
|
||||||
import { InputProps } from "./useField";
|
import { InputProps } from "./useField.js";
|
||||||
|
|
||||||
export interface Props<T> extends InputProps<T> {
|
export interface Props<T> extends InputProps<T> {
|
||||||
readonly?: boolean;
|
readonly?: boolean;
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { InputArray } from "./InputArray";
|
import { InputArray } from "./InputArray.js";
|
||||||
import { PAYTO_REGEX } from "../../utils/constants";
|
import { PAYTO_REGEX } from "../../utils/constants.js";
|
||||||
import { InputProps } from "./useField";
|
import { InputProps } from "./useField.js";
|
||||||
|
|
||||||
export type Props<T> = InputProps<T>;
|
export type Props<T> = InputProps<T>;
|
||||||
|
|
||||||
|
@ -20,13 +20,13 @@
|
|||||||
*/
|
*/
|
||||||
import { h, VNode, Fragment } from "preact";
|
import { h, VNode, Fragment } from "preact";
|
||||||
import { useCallback, useState } from "preact/hooks";
|
import { useCallback, useState } from "preact/hooks";
|
||||||
import { Translate, Translator, useTranslator } from "../../i18n";
|
import { Translate, Translator, useTranslator } from "../../i18n.js";
|
||||||
import { COUNTRY_TABLE } from "../../utils/constants";
|
import { COUNTRY_TABLE } from "../../utils/constants.js";
|
||||||
import { FormErrors, FormProvider } from "./FormProvider";
|
import { FormErrors, FormProvider } from "./FormProvider.js";
|
||||||
import { Input } from "./Input";
|
import { Input } from "./Input.js";
|
||||||
import { InputGroup } from "./InputGroup";
|
import { InputGroup } from "./InputGroup.js";
|
||||||
import { InputSelector } from "./InputSelector";
|
import { InputSelector } from "./InputSelector.js";
|
||||||
import { InputProps, useField } from "./useField";
|
import { InputProps, useField } from "./useField.js";
|
||||||
|
|
||||||
export interface Props<T> extends InputProps<T> {
|
export interface Props<T> extends InputProps<T> {
|
||||||
isValid?: (e: any) => boolean;
|
isValid?: (e: any) => boolean;
|
||||||
@ -217,7 +217,7 @@ export function InputPaytoForm<T>({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const hasErrors = Object.keys(errors).some(
|
const hasErrors = Object.keys(errors).some(
|
||||||
(k) => (errors as any)[k] !== undefined
|
(k) => (errors as any)[k] !== undefined,
|
||||||
);
|
);
|
||||||
|
|
||||||
const submit = useCallback((): void => {
|
const submit = useCallback((): void => {
|
||||||
|
@ -21,11 +21,10 @@
|
|||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import emptyImage from "../../assets/empty.png";
|
import emptyImage from "../../assets/empty.png";
|
||||||
import { MerchantBackend, WithId } from "../../declaration";
|
import { MerchantBackend, WithId } from "../../declaration.js";
|
||||||
import { useInstanceProducts } from "../../hooks/product";
|
import { Translate, useTranslator } from "../../i18n/index.js";
|
||||||
import { Translate, useTranslator } from "../../i18n";
|
import { FormErrors, FormProvider } from "./FormProvider.js";
|
||||||
import { FormErrors, FormProvider } from "./FormProvider";
|
import { InputWithAddon } from "./InputWithAddon.js";
|
||||||
import { InputWithAddon } from "./InputWithAddon";
|
|
||||||
|
|
||||||
type Entity = MerchantBackend.Products.ProductDetail & WithId
|
type Entity = MerchantBackend.Products.ProductDetail & WithId
|
||||||
|
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
|
|
||||||
import { h, VNode } from 'preact';
|
import { h, VNode } from 'preact';
|
||||||
import { useState } from 'preact/hooks';
|
import { useState } from 'preact/hooks';
|
||||||
import { FormProvider } from "./FormProvider";
|
import { FormProvider } from "./FormProvider.js";
|
||||||
import { InputSecured } from './InputSecured';
|
import { InputSecured } from './InputSecured.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'Components/Form/InputSecured',
|
title: 'Components/Form/InputSecured',
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
*/
|
*/
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { Translate, useTranslator } from "../../i18n";
|
import { Translate, useTranslator } from "../../i18n/index.js";
|
||||||
import { InputProps, useField } from "./useField";
|
import { InputProps, useField } from "./useField.js";
|
||||||
|
|
||||||
export type Props<T> = InputProps<T>;
|
export type Props<T> = InputProps<T>;
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { InputProps, useField } from "./useField";
|
import { InputProps, useField } from "./useField.js";
|
||||||
|
|
||||||
interface Props<T> extends InputProps<T> {
|
interface Props<T> extends InputProps<T> {
|
||||||
readonly?: boolean;
|
readonly?: boolean;
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
import { addDays } from "date-fns";
|
import { addDays } from "date-fns";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { FormProvider } from "./FormProvider";
|
import { FormProvider } from "./FormProvider.js";
|
||||||
import { InputStock, Stock } from "./InputStock";
|
import { InputStock, Stock } from "./InputStock.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: "Components/Form/InputStock",
|
title: "Components/Form/InputStock",
|
||||||
|
@ -19,16 +19,16 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
import { Fragment, h } from "preact";
|
import { Fragment, h } from "preact";
|
||||||
import { MerchantBackend, Timestamp } from "../../declaration";
|
import { MerchantBackend, Timestamp } from "../../declaration.js";
|
||||||
import { InputProps, useField } from "./useField";
|
import { InputProps, useField } from "./useField.js";
|
||||||
import { FormProvider, FormErrors } from "./FormProvider";
|
import { FormProvider, FormErrors } from "./FormProvider.js";
|
||||||
import { useLayoutEffect, useState } from "preact/hooks";
|
import { useLayoutEffect, useState } from "preact/hooks";
|
||||||
import { Input } from "./Input";
|
import { Input } from "./Input.js";
|
||||||
import { InputGroup } from "./InputGroup";
|
import { InputGroup } from "./InputGroup.js";
|
||||||
import { InputNumber } from "./InputNumber";
|
import { InputNumber } from "./InputNumber.js";
|
||||||
import { InputDate } from "./InputDate";
|
import { InputDate } from "./InputDate.js";
|
||||||
import { Translate, useTranslator } from "../../i18n";
|
import { Translate, useTranslator } from "../../i18n";
|
||||||
import { InputLocation } from "./InputLocation";
|
import { InputLocation } from "./InputLocation.js";
|
||||||
|
|
||||||
export interface Props<T> extends InputProps<T> {
|
export interface Props<T> extends InputProps<T> {
|
||||||
alreadyExist?: boolean;
|
alreadyExist?: boolean;
|
||||||
|
@ -21,13 +21,13 @@
|
|||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useCallback, useState } from "preact/hooks";
|
import { useCallback, useState } from "preact/hooks";
|
||||||
import * as yup from 'yup';
|
import * as yup from 'yup';
|
||||||
import { MerchantBackend } from "../../declaration";
|
import { MerchantBackend } from "../../declaration.js";
|
||||||
import { Translate, useTranslator } from "../../i18n";
|
import { Translate, useTranslator } from "../../i18n";
|
||||||
import { TaxSchema as schema } from '../../schemas';
|
import { TaxSchema as schema } from "../../schemas.js";
|
||||||
import { FormErrors, FormProvider } from "./FormProvider";
|
import { FormErrors, FormProvider } from "./FormProvider.js";
|
||||||
import { Input } from "./Input";
|
import { Input } from "./Input.js";
|
||||||
import { InputGroup } from "./InputGroup";
|
import { InputGroup } from "./InputGroup.js";
|
||||||
import { InputProps, useField } from "./useField";
|
import { InputProps, useField } from "./useField.js";
|
||||||
|
|
||||||
export interface Props<T> extends InputProps<T> {
|
export interface Props<T> extends InputProps<T> {
|
||||||
isValid?: (e: any) => boolean;
|
isValid?: (e: any) => boolean;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
import { ComponentChildren, h, VNode } from "preact";
|
import { ComponentChildren, h, VNode } from "preact";
|
||||||
import { InputProps, useField } from "./useField";
|
import { InputProps, useField } from "./useField.js";
|
||||||
|
|
||||||
export interface Props<T> extends InputProps<T> {
|
export interface Props<T> extends InputProps<T> {
|
||||||
expand?: boolean;
|
expand?: boolean;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
import { ComponentChildren, h, VNode } from "preact";
|
import { ComponentChildren, h, VNode } from "preact";
|
||||||
import { useField, InputProps } from "./useField";
|
import { useField, InputProps } from "./useField.js";
|
||||||
|
|
||||||
interface Props<T> extends InputProps<T> {
|
interface Props<T> extends InputProps<T> {
|
||||||
inputType?: 'text' | 'number' | 'multiline' | 'password';
|
inputType?: 'text' | 'number' | 'multiline' | 'password';
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { ComponentChildren, VNode } from "preact";
|
import { ComponentChildren, VNode } from "preact";
|
||||||
import { useFormContext } from "./FormProvider";
|
import { useFormContext } from "./FormProvider.js";
|
||||||
|
|
||||||
interface Use<V> {
|
interface Use<V> {
|
||||||
error?: string;
|
error?: string;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { useFormContext } from "./FormProvider";
|
import { useFormContext } from "./FormProvider.js";
|
||||||
|
|
||||||
interface Use {
|
interface Use {
|
||||||
hasError?: boolean;
|
hasError?: boolean;
|
||||||
|
@ -20,17 +20,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { useBackendContext } from "../../context/backend";
|
import { useBackendContext } from "../../context/backend.js";
|
||||||
import { useTranslator } from "../../i18n";
|
import { useTranslator } from "../../i18n";
|
||||||
import { Entity } from "../../paths/admin/create/CreatePage";
|
import { Entity } from "../../paths/admin/create/CreatePage.js";
|
||||||
import { Input } from "../form/Input";
|
import { Input } from "../form/Input.js";
|
||||||
import { InputCurrency } from "../form/InputCurrency";
|
import { InputCurrency } from "../form/InputCurrency.js";
|
||||||
import { InputDuration } from "../form/InputDuration";
|
import { InputDuration } from "../form/InputDuration.js";
|
||||||
import { InputGroup } from "../form/InputGroup";
|
import { InputGroup } from "../form/InputGroup.js";
|
||||||
import { InputImage } from "../form/InputImage";
|
import { InputImage } from "../form/InputImage.js";
|
||||||
import { InputLocation } from "../form/InputLocation";
|
import { InputLocation } from "../form/InputLocation.js";
|
||||||
import { InputPaytoForm } from "../form/InputPaytoForm";
|
import { InputPaytoForm } from "../form/InputPaytoForm.js";
|
||||||
import { InputWithAddon } from "../form/InputWithAddon";
|
import { InputWithAddon } from "../form/InputWithAddon.js";
|
||||||
|
|
||||||
export function DefaultInstanceFormFields({
|
export function DefaultInstanceFormFields({
|
||||||
readonlyId,
|
readonlyId,
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import langIcon from '../../assets/icons/languageicon.svg';
|
import langIcon from '../../assets/icons/languageicon.svg';
|
||||||
import { useTranslationContext } from "../../context/translation";
|
import { useTranslationContext } from "../../context/translation.js";
|
||||||
import { strings as messages } from '../../i18n/strings'
|
import { strings as messages } from '../../i18n/strings'
|
||||||
|
|
||||||
type LangsNames = {
|
type LangsNames = {
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
import { h, VNode } from 'preact';
|
import { h, VNode } from 'preact';
|
||||||
import logo from '../../assets/logo.jpeg';
|
import logo from '../../assets/logo.jpeg';
|
||||||
import { LangSelector } from './LangSelector';
|
import { LangSelector } from "./LangSelector.js";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onMobileMenu: () => void;
|
onMobileMenu: () => void;
|
||||||
|
@ -21,12 +21,12 @@
|
|||||||
|
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { useCallback } from "preact/hooks";
|
import { useCallback } from "preact/hooks";
|
||||||
import { useBackendContext } from "../../context/backend";
|
import { useBackendContext } from "../../context/backend.js";
|
||||||
import { useConfigContext } from "../../context/config";
|
import { useConfigContext } from "../../context/config.js";
|
||||||
import { useInstanceContext } from "../../context/instance";
|
import { useInstanceContext } from "../../context/instance.js";
|
||||||
import { useInstanceKYCDetails } from "../../hooks/instance";
|
import { useInstanceKYCDetails } from "../../hooks/instance.js";
|
||||||
import { Translate } from "../../i18n";
|
import { Translate } from "../../i18n";
|
||||||
import { LangSelector } from "./LangSelector";
|
import { LangSelector } from "./LangSelector.js";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onLogout: () => void;
|
onLogout: () => void;
|
||||||
|
@ -17,11 +17,11 @@
|
|||||||
import { ComponentChildren, Fragment, h, VNode } from "preact";
|
import { ComponentChildren, Fragment, h, VNode } from "preact";
|
||||||
import Match from "preact-router/match";
|
import Match from "preact-router/match";
|
||||||
import { useEffect, useState } from "preact/hooks";
|
import { useEffect, useState } from "preact/hooks";
|
||||||
import { AdminPaths } from "../../AdminRoutes";
|
import { AdminPaths } from "../../AdminRoutes.js";
|
||||||
import { InstancePaths } from "../../InstanceRoutes";
|
import { InstancePaths } from "../../InstanceRoutes.js";
|
||||||
import { Notification } from "../../utils/types";
|
import { Notification } from "../../utils/types.js";
|
||||||
import { NavigationBar } from "./NavigationBar";
|
import { NavigationBar } from "./NavigationBar.js";
|
||||||
import { Sidebar } from "./SideBar";
|
import { Sidebar } from "./SideBar.js";
|
||||||
|
|
||||||
function getInstanceTitle(path: string, id: string): string {
|
function getInstanceTitle(path: string, id: string): string {
|
||||||
switch (path) {
|
switch (path) {
|
||||||
|
@ -22,12 +22,12 @@
|
|||||||
|
|
||||||
import { ComponentChildren, h, VNode } from "preact";
|
import { ComponentChildren, h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { useInstanceContext } from "../../context/instance";
|
import { useInstanceContext } from "../../context/instance.js";
|
||||||
import { Translate, useTranslator } from "../../i18n";
|
import { Translate, useTranslator } from "../../i18n";
|
||||||
import { DEFAULT_REQUEST_TIMEOUT } from "../../utils/constants";
|
import { DEFAULT_REQUEST_TIMEOUT } from "../../utils/constants.js";
|
||||||
import { Loading, Spinner } from "../exception/loading";
|
import { Loading, Spinner } from "../exception/loading.js";
|
||||||
import { FormProvider } from "../form/FormProvider";
|
import { FormProvider } from "../form/FormProvider.js";
|
||||||
import { Input } from "../form/Input";
|
import { Input } from "../form/Input.js";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
active?: boolean;
|
active?: boolean;
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { h } from 'preact';
|
import { h } from 'preact';
|
||||||
import { Notifications } from './index';
|
import { Notifications } from "./index.js";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { MessageType, Notification } from "../../utils/types";
|
import { MessageType, Notification } from "../../utils/types.js";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
notifications: Notification[];
|
notifications: Notification[];
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
import { h, FunctionalComponent } from 'preact';
|
import { h, FunctionalComponent } from 'preact';
|
||||||
import { useState } from 'preact/hooks';
|
import { useState } from 'preact/hooks';
|
||||||
import { DurationPicker as TestedComponent } from './DurationPicker';
|
import { DurationPicker as TestedComponent } from "./DurationPicker.js";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { h, VNode, FunctionalComponent } from 'preact';
|
import { h, VNode, FunctionalComponent } from 'preact';
|
||||||
import { InventoryProductForm as TestedComponent } from './InventoryProductForm';
|
import { InventoryProductForm as TestedComponent } from "./InventoryProductForm.js";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -15,12 +15,12 @@
|
|||||||
*/
|
*/
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { FormProvider, FormErrors } from "../form/FormProvider";
|
import { FormProvider, FormErrors } from "../form/FormProvider.js";
|
||||||
import { InputNumber } from "../form/InputNumber";
|
import { InputNumber } from "../form/InputNumber.js";
|
||||||
import { InputSearchProduct } from "../form/InputSearchProduct";
|
import { InputSearchProduct } from "../form/InputSearchProduct.js";
|
||||||
import { MerchantBackend, WithId } from "../../declaration";
|
import { MerchantBackend, WithId } from "../../declaration.js";
|
||||||
import { Translate, useTranslator } from "../../i18n";
|
import { Translate, useTranslator } from "../../i18n";
|
||||||
import { ProductMap } from "../../paths/instance/orders/create/CreatePage";
|
import { ProductMap } from "../../paths/instance/orders/create/CreatePage.js";
|
||||||
|
|
||||||
type Form = {
|
type Form = {
|
||||||
product: MerchantBackend.Products.ProductDetail & WithId,
|
product: MerchantBackend.Products.ProductDetail & WithId,
|
||||||
|
@ -16,18 +16,18 @@
|
|||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { useCallback, useEffect, useState } from "preact/hooks";
|
import { useCallback, useEffect, useState } from "preact/hooks";
|
||||||
import * as yup from 'yup';
|
import * as yup from 'yup';
|
||||||
import { FormErrors, FormProvider } from "../form/FormProvider";
|
import { FormErrors, FormProvider } from "../form/FormProvider.js";
|
||||||
import { Input } from "../form/Input";
|
import { Input } from "../form/Input.js";
|
||||||
import { InputCurrency } from "../form/InputCurrency";
|
import { InputCurrency } from "../form/InputCurrency.js";
|
||||||
import { InputImage } from "../form/InputImage";
|
import { InputImage } from "../form/InputImage.js";
|
||||||
import { InputNumber } from "../form/InputNumber";
|
import { InputNumber } from "../form/InputNumber.js";
|
||||||
import { InputTaxes } from "../form/InputTaxes";
|
import { InputTaxes } from "../form/InputTaxes.js";
|
||||||
import { MerchantBackend } from "../../declaration";
|
import { MerchantBackend } from "../../declaration.js";
|
||||||
import { useListener } from "../../hooks/listener";
|
import { useListener } from "../../hooks/listener.js";
|
||||||
import { Translate, useTranslator } from "../../i18n";
|
import { Translate, useTranslator } from "../../i18n";
|
||||||
import {
|
import {
|
||||||
NonInventoryProductSchema as schema
|
NonInventoryProductSchema as schema
|
||||||
} from '../../schemas';
|
} from "../../schemas.js";
|
||||||
|
|
||||||
|
|
||||||
type Entity = MerchantBackend.Product
|
type Entity = MerchantBackend.Product
|
||||||
|
@ -22,21 +22,21 @@
|
|||||||
import { h } from "preact";
|
import { h } from "preact";
|
||||||
import { useCallback, useEffect, useState } from "preact/hooks";
|
import { useCallback, useEffect, useState } from "preact/hooks";
|
||||||
import * as yup from "yup";
|
import * as yup from "yup";
|
||||||
import { useBackendContext } from "../../context/backend";
|
import { useBackendContext } from "../../context/backend.js";
|
||||||
import { MerchantBackend } from "../../declaration";
|
import { MerchantBackend } from "../../declaration.js";
|
||||||
import { useTranslator } from "../../i18n";
|
import { useTranslator } from "../../i18n";
|
||||||
import {
|
import {
|
||||||
ProductCreateSchema as createSchema,
|
ProductCreateSchema as createSchema,
|
||||||
ProductUpdateSchema as updateSchema,
|
ProductUpdateSchema as updateSchema,
|
||||||
} from "../../schemas";
|
} from "../../schemas.js";
|
||||||
import { FormProvider, FormErrors } from "../form/FormProvider";
|
import { FormProvider, FormErrors } from "../form/FormProvider.js";
|
||||||
import { Input } from "../form/Input";
|
import { Input } from "../form/Input.js";
|
||||||
import { InputCurrency } from "../form/InputCurrency";
|
import { InputCurrency } from "../form/InputCurrency.js";
|
||||||
import { InputImage } from "../form/InputImage";
|
import { InputImage } from "../form/InputImage.js";
|
||||||
import { InputNumber } from "../form/InputNumber";
|
import { InputNumber } from "../form/InputNumber.js";
|
||||||
import { InputStock, Stock } from "../form/InputStock";
|
import { InputStock, Stock } from "../form/InputStock.js";
|
||||||
import { InputTaxes } from "../form/InputTaxes";
|
import { InputTaxes } from "../form/InputTaxes.js";
|
||||||
import { InputWithAddon } from "../form/InputWithAddon";
|
import { InputWithAddon } from "../form/InputWithAddon.js";
|
||||||
|
|
||||||
type Entity = MerchantBackend.Products.ProductDetail & { product_id: string };
|
type Entity = MerchantBackend.Products.ProductDetail & { product_id: string };
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
import { Amounts } from "@gnu-taler/taler-util";
|
import { Amounts } from "@gnu-taler/taler-util";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import emptyImage from "../../assets/empty.png";
|
import emptyImage from "../../assets/empty.png";
|
||||||
import { MerchantBackend } from "../../declaration";
|
import { MerchantBackend } from "../../declaration.js";
|
||||||
import { Translate } from "../../i18n";
|
import { Translate } from "../../i18n";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
import { createContext, h, VNode } from 'preact'
|
import { createContext, h, VNode } from 'preact'
|
||||||
import { useCallback, useContext, useState } from 'preact/hooks'
|
import { useCallback, useContext, useState } from 'preact/hooks'
|
||||||
import { useBackendDefaultToken, useBackendURL } from '../hooks';
|
import { useBackendDefaultToken, useBackendURL } from "../hooks.js";
|
||||||
|
|
||||||
interface BackendContextType {
|
interface BackendContextType {
|
||||||
url: string;
|
url: string;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { cancelPendingRequest } from "./backend";
|
import { cancelPendingRequest } from "./backend.js";
|
||||||
|
|
||||||
export interface Options {
|
export interface Options {
|
||||||
slowTolerance: number,
|
slowTolerance: number,
|
||||||
|
@ -21,11 +21,11 @@
|
|||||||
|
|
||||||
import { useSWRConfig } from "swr";
|
import { useSWRConfig } from "swr";
|
||||||
import axios, { AxiosError, AxiosResponse } from "axios";
|
import axios, { AxiosError, AxiosResponse } from "axios";
|
||||||
import { MerchantBackend } from "../declaration";
|
import { MerchantBackend } from "../declaration.js";
|
||||||
import { useBackendContext } from "../context/backend";
|
import { useBackendContext } from "../context/backend.js";
|
||||||
import { useEffect, useState } from "preact/hooks";
|
import { useEffect, useState } from "preact/hooks";
|
||||||
import { DEFAULT_REQUEST_TIMEOUT } from "../utils/constants";
|
import { DEFAULT_REQUEST_TIMEOUT } from "../utils/constants.js";
|
||||||
import { axiosHandler, removeAxiosCancelToken } from "../utils/switchableAxios";
|
import { axiosHandler, removeAxiosCancelToken } from "../utils/switchableAxios.js";
|
||||||
|
|
||||||
export function useMatchMutate(): (
|
export function useMatchMutate(): (
|
||||||
re: RegExp,
|
re: RegExp,
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { StateUpdater, useCallback, useState } from "preact/hooks";
|
import { StateUpdater, useCallback, useState } from "preact/hooks";
|
||||||
import { ValueOrFunction } from '../utils/types';
|
import { ValueOrFunction } from "../utils/types.js";
|
||||||
|
|
||||||
|
|
||||||
const calculateRootPath = () => {
|
const calculateRootPath = () => {
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
import useSWR, { useSWRConfig } from "swr";
|
import useSWR, { useSWRConfig } from "swr";
|
||||||
import { useBackendContext } from "../context/backend";
|
import { useBackendContext } from "../context/backend.js";
|
||||||
import { useInstanceContext } from "../context/instance";
|
import { useInstanceContext } from "../context/instance.js";
|
||||||
import { MerchantBackend } from "../declaration";
|
import { MerchantBackend } from "../declaration.js";
|
||||||
import {
|
import {
|
||||||
fetcher,
|
fetcher,
|
||||||
HttpError,
|
HttpError,
|
||||||
@ -24,7 +24,7 @@ import {
|
|||||||
HttpResponseOk,
|
HttpResponseOk,
|
||||||
request,
|
request,
|
||||||
useMatchMutate,
|
useMatchMutate,
|
||||||
} from "./backend";
|
} from "./backend.js";
|
||||||
|
|
||||||
interface InstanceAPI {
|
interface InstanceAPI {
|
||||||
updateInstance: (
|
updateInstance: (
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { Notification } from '../utils/types';
|
import { Notification } from "../utils/types.js";
|
||||||
|
|
||||||
interface Result {
|
interface Result {
|
||||||
notifications: Notification[];
|
notifications: Notification[];
|
||||||
|
@ -15,10 +15,10 @@
|
|||||||
*/
|
*/
|
||||||
import { useEffect, useState } from "preact/hooks";
|
import { useEffect, useState } from "preact/hooks";
|
||||||
import useSWR, { useSWRConfig } from "swr";
|
import useSWR, { useSWRConfig } from "swr";
|
||||||
import { useBackendContext } from "../context/backend";
|
import { useBackendContext } from "../context/backend.js";
|
||||||
import { useInstanceContext } from "../context/instance";
|
import { useInstanceContext } from "../context/instance.js";
|
||||||
import { MerchantBackend } from "../declaration";
|
import { MerchantBackend } from "../declaration.js";
|
||||||
import { MAX_RESULT_SIZE, PAGE_SIZE } from "../utils/constants";
|
import { MAX_RESULT_SIZE, PAGE_SIZE } from "../utils/constants.js";
|
||||||
import {
|
import {
|
||||||
fetcher,
|
fetcher,
|
||||||
HttpError,
|
HttpError,
|
||||||
@ -27,7 +27,7 @@ import {
|
|||||||
HttpResponsePaginated,
|
HttpResponsePaginated,
|
||||||
request,
|
request,
|
||||||
useMatchMutate,
|
useMatchMutate,
|
||||||
} from "./backend";
|
} from "./backend.js";
|
||||||
|
|
||||||
export interface OrderAPI {
|
export interface OrderAPI {
|
||||||
//FIXME: add OutOfStockResponse on 410
|
//FIXME: add OutOfStockResponse on 410
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
import useSWR, { useSWRConfig } from "swr";
|
import useSWR, { useSWRConfig } from "swr";
|
||||||
import { useBackendContext } from "../context/backend";
|
import { useBackendContext } from "../context/backend.js";
|
||||||
import { useInstanceContext } from "../context/instance";
|
import { useInstanceContext } from "../context/instance.js";
|
||||||
import { MerchantBackend, WithId } from "../declaration";
|
import { MerchantBackend, WithId } from "../declaration.js";
|
||||||
import {
|
import {
|
||||||
fetcher,
|
fetcher,
|
||||||
HttpError,
|
HttpError,
|
||||||
@ -25,7 +25,7 @@ import {
|
|||||||
multiFetcher,
|
multiFetcher,
|
||||||
request,
|
request,
|
||||||
useMatchMutate
|
useMatchMutate
|
||||||
} from "./backend";
|
} from "./backend.js";
|
||||||
|
|
||||||
export interface ProductAPI {
|
export interface ProductAPI {
|
||||||
createProduct: (
|
createProduct: (
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
import useSWR, { useSWRConfig } from "swr";
|
import useSWR, { useSWRConfig } from "swr";
|
||||||
import { useBackendContext } from "../context/backend";
|
import { useBackendContext } from "../context/backend.js";
|
||||||
import { useInstanceContext } from "../context/instance";
|
import { useInstanceContext } from "../context/instance.js";
|
||||||
import { MerchantBackend } from "../declaration";
|
import { MerchantBackend } from "../declaration.js";
|
||||||
import {
|
import {
|
||||||
fetcher,
|
fetcher,
|
||||||
HttpError,
|
HttpError,
|
||||||
@ -24,7 +24,7 @@ import {
|
|||||||
HttpResponseOk,
|
HttpResponseOk,
|
||||||
request,
|
request,
|
||||||
useMatchMutate,
|
useMatchMutate,
|
||||||
} from "./backend";
|
} from "./backend.js";
|
||||||
|
|
||||||
export function useReservesAPI(): ReserveMutateAPI {
|
export function useReservesAPI(): ReserveMutateAPI {
|
||||||
const mutateAll = useMatchMutate();
|
const mutateAll = useMatchMutate();
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
You should have received a copy of the GNU General Public License along with
|
You should have received a copy of the GNU General Public License along with
|
||||||
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
import { MerchantBackend } from "../declaration";
|
import { MerchantBackend } from "../declaration.js";
|
||||||
import { useBackendContext } from "../context/backend";
|
import { useBackendContext } from "../context/backend.js";
|
||||||
import {
|
import {
|
||||||
request,
|
request,
|
||||||
HttpResponse,
|
HttpResponse,
|
||||||
@ -22,10 +22,10 @@ import {
|
|||||||
HttpResponseOk,
|
HttpResponseOk,
|
||||||
HttpResponsePaginated,
|
HttpResponsePaginated,
|
||||||
useMatchMutate,
|
useMatchMutate,
|
||||||
} from "./backend";
|
} from "./backend.js";
|
||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
import { useInstanceContext } from "../context/instance";
|
import { useInstanceContext } from "../context/instance.js";
|
||||||
import { MAX_RESULT_SIZE, PAGE_SIZE } from "../utils/constants";
|
import { MAX_RESULT_SIZE, PAGE_SIZE } from "../utils/constants.js";
|
||||||
import { useEffect, useState } from "preact/hooks";
|
import { useEffect, useState } from "preact/hooks";
|
||||||
|
|
||||||
async function transferFetcher<T>(
|
async function transferFetcher<T>(
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
import { ComponentChild, ComponentChildren, h, Fragment, VNode } from "preact";
|
import { ComponentChild, ComponentChildren, h, Fragment, VNode } from "preact";
|
||||||
|
|
||||||
import { useTranslationContext } from "../context/translation";
|
import { useTranslationContext } from "../context/translation.js";
|
||||||
|
|
||||||
export type Translator = (
|
export type Translator = (
|
||||||
stringSeq: TemplateStringsArray,
|
stringSeq: TemplateStringsArray,
|
||||||
|
@ -22,16 +22,15 @@
|
|||||||
import { h, VNode } from 'preact';
|
import { h, VNode } from 'preact';
|
||||||
import { route } from 'preact-router';
|
import { route } from 'preact-router';
|
||||||
import { useMemo } from "preact/hooks";
|
import { useMemo } from "preact/hooks";
|
||||||
import { ApplicationReadyRoutes } from "./ApplicationReadyRoutes";
|
import { ApplicationReadyRoutes } from "./ApplicationReadyRoutes.js";
|
||||||
import { Loading } from "./components/exception/loading";
|
import { Loading } from "./components/exception/loading.js";
|
||||||
import { NotificationCard, NotYetReadyAppMenu } from "./components/menu";
|
import { NotificationCard, NotYetReadyAppMenu } from "./components/menu/index.js";
|
||||||
import { BackendContextProvider, useBackendContext } from './context/backend';
|
import { BackendContextProvider, useBackendContext } from './context/backend.js';
|
||||||
import { ConfigContextProvider } from './context/config';
|
import { ConfigContextProvider } from './context/config.js';
|
||||||
import { FetchContextProvider } from './context/fetch';
|
import { TranslationProvider } from './context/translation.js';
|
||||||
import { TranslationProvider } from './context/translation';
|
import { useBackendConfig } from "./hooks/backend.js";
|
||||||
import { useBackendConfig } from "./hooks/backend";
|
import { useTranslator } from './i18n/index.js';
|
||||||
import { useTranslator } from './i18n';
|
import LoginPage from './paths/login/index.js';
|
||||||
import LoginPage from './paths/login';
|
|
||||||
import "./scss/main.scss";
|
import "./scss/main.scss";
|
||||||
|
|
||||||
export default function Application(): VNode {
|
export default function Application(): VNode {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { h, VNode, FunctionalComponent } from 'preact';
|
import { h, VNode, FunctionalComponent } from 'preact';
|
||||||
import { CreatePage as TestedComponent } from './CreatePage';
|
import { CreatePage as TestedComponent } from "./CreatePage.js";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -22,16 +22,16 @@
|
|||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import * as yup from "yup";
|
import * as yup from "yup";
|
||||||
import { AsyncButton } from "../../../components/exception/AsyncButton";
|
import { AsyncButton } from "../../../components/exception/AsyncButton.js";
|
||||||
import {
|
import {
|
||||||
FormErrors,
|
FormErrors,
|
||||||
FormProvider,
|
FormProvider,
|
||||||
} from "../../../components/form/FormProvider";
|
} from "../../../components/form/FormProvider.js";
|
||||||
import { SetTokenNewInstanceModal } from "../../../components/modal";
|
import { SetTokenNewInstanceModal } from "../../../components/modal.js";
|
||||||
import { MerchantBackend } from "../../../declaration";
|
import { MerchantBackend } from "../../../declaration.js";
|
||||||
import { Translate, useTranslator } from "../../../i18n";
|
import { Translate, useTranslator } from "../../../i18n";
|
||||||
import { DefaultInstanceFormFields } from "../../../components/instance/DefaultInstanceFormFields";
|
import { DefaultInstanceFormFields } from "../../../components/instance/DefaultInstanceFormFields.js";
|
||||||
import { INSTANCE_ID_REGEX, PAYTO_REGEX } from "../../../utils/constants";
|
import { INSTANCE_ID_REGEX, PAYTO_REGEX } from "../../../utils/constants.js";
|
||||||
import { Amounts } from "@gnu-taler/taler-util";
|
import { Amounts } from "@gnu-taler/taler-util";
|
||||||
|
|
||||||
export type Entity = MerchantBackend.Instances.InstanceConfigurationMessage & {
|
export type Entity = MerchantBackend.Instances.InstanceConfigurationMessage & {
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { CreatedSuccessfully } from "../../../components/notifications/CreatedSuccessfully";
|
import { CreatedSuccessfully } from "../../../components/notifications/CreatedSuccessfully.js";
|
||||||
import { Entity } from "./index";
|
import { Entity } from "./index.js";
|
||||||
|
|
||||||
export function InstanceCreatedSuccessfully({ entity, onConfirm }: { entity: Entity; onConfirm: () => void; }): VNode {
|
export function InstanceCreatedSuccessfully({ entity, onConfirm }: { entity: Entity; onConfirm: () => void; }): VNode {
|
||||||
return <CreatedSuccessfully onConfirm={onConfirm}>
|
return <CreatedSuccessfully onConfirm={onConfirm}>
|
||||||
|
@ -19,13 +19,13 @@
|
|||||||
*/
|
*/
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { NotificationCard } from "../../../components/menu";
|
import { NotificationCard } from "../../../components/menu.js";
|
||||||
import { MerchantBackend } from "../../../declaration";
|
import { MerchantBackend } from "../../../declaration.js";
|
||||||
import { useAdminAPI } from "../../../hooks/instance";
|
import { useAdminAPI } from "../../../hooks/instance.js";
|
||||||
import { useTranslator } from "../../../i18n";
|
import { useTranslator } from "../../../i18n";
|
||||||
import { Notification } from "../../../utils/types";
|
import { Notification } from "../../../utils/types.js";
|
||||||
import { CreatePage } from "./CreatePage";
|
import { CreatePage } from "./CreatePage.js";
|
||||||
import { InstanceCreatedSuccessfully } from "./InstanceCreatedSuccessfully";
|
import { InstanceCreatedSuccessfully } from "./InstanceCreatedSuccessfully.js";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onBack?: () => void;
|
onBack?: () => void;
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { StateUpdater, useEffect, useState } from "preact/hooks";
|
import { StateUpdater, useEffect, useState } from "preact/hooks";
|
||||||
import { MerchantBackend } from "../../../declaration";
|
import { MerchantBackend } from "../../../declaration.js";
|
||||||
import { Translate, useTranslator } from "../../../i18n";
|
import { Translate, useTranslator } from "../../../i18n";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { h } from 'preact';
|
import { h } from 'preact';
|
||||||
import { View } from './View';
|
import { View } from "./View.js";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { MerchantBackend } from "../../../declaration";
|
import { MerchantBackend } from "../../../declaration.js";
|
||||||
import { CardTable as CardTableActive } from './TableActive';
|
import { CardTable as CardTableActive } from "./TableActive.js";
|
||||||
import { useState } from 'preact/hooks';
|
import { useState } from 'preact/hooks';
|
||||||
import { Translate, useTranslator } from "../../../i18n";
|
import { Translate, useTranslator } from "../../../i18n";
|
||||||
|
|
||||||
|
@ -21,15 +21,15 @@
|
|||||||
|
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { Loading } from "../../../components/exception/loading";
|
import { Loading } from "../../../components/exception/loading.js";
|
||||||
import { NotificationCard } from "../../../components/menu";
|
import { NotificationCard } from "../../../components/menu.js";
|
||||||
import { DeleteModal, PurgeModal } from "../../../components/modal";
|
import { DeleteModal, PurgeModal } from "../../../components/modal.js";
|
||||||
import { MerchantBackend } from "../../../declaration";
|
import { MerchantBackend } from "../../../declaration.js";
|
||||||
import { HttpError } from "../../../hooks/backend";
|
import { HttpError } from "../../../hooks/backend.js";
|
||||||
import { useAdminAPI, useBackendInstances } from "../../../hooks/instance";
|
import { useAdminAPI, useBackendInstances } from "../../../hooks/instance.js";
|
||||||
import { useTranslator } from "../../../i18n";
|
import { useTranslator } from "../../../i18n";
|
||||||
import { Notification } from "../../../utils/types";
|
import { Notification } from "../../../utils/types.js";
|
||||||
import { View } from "./View";
|
import { View } from "./View.js";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onCreate: () => void;
|
onCreate: () => void;
|
||||||
|
@ -21,9 +21,9 @@
|
|||||||
|
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { FormProvider } from "../../../components/form/FormProvider";
|
import { FormProvider } from "../../../components/form/FormProvider.js";
|
||||||
import { Input } from "../../../components/form/Input";
|
import { Input } from "../../../components/form/Input.js";
|
||||||
import { MerchantBackend } from "../../../declaration";
|
import { MerchantBackend } from "../../../declaration.js";
|
||||||
import { useTranslator } from "../../../i18n";
|
import { useTranslator } from "../../../i18n";
|
||||||
|
|
||||||
type Entity = MerchantBackend.Instances.InstanceReconfigurationMessage;
|
type Entity = MerchantBackend.Instances.InstanceReconfigurationMessage;
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { h, VNode, FunctionalComponent } from "preact";
|
import { h, VNode, FunctionalComponent } from "preact";
|
||||||
import { DetailPage as TestedComponent } from "./DetailPage";
|
import { DetailPage as TestedComponent } from "./DetailPage.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: "Pages/Instance/Detail",
|
title: "Pages/Instance/Detail",
|
||||||
|
@ -15,12 +15,12 @@
|
|||||||
*/
|
*/
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { Loading } from "../../../components/exception/loading";
|
import { Loading } from "../../../components/exception/loading.js";
|
||||||
import { DeleteModal } from "../../../components/modal";
|
import { DeleteModal } from "../../../components/modal.js";
|
||||||
import { useInstanceContext } from "../../../context/instance";
|
import { useInstanceContext } from "../../../context/instance.js";
|
||||||
import { HttpError } from "../../../hooks/backend";
|
import { HttpError } from "../../../hooks/backend.js";
|
||||||
import { useInstanceAPI, useInstanceDetails } from "../../../hooks/instance";
|
import { useInstanceAPI, useInstanceDetails } from "../../../hooks/instance.js";
|
||||||
import { DetailPage } from "./DetailPage";
|
import { DetailPage } from "./DetailPage.js";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onUnauthorized: () => VNode;
|
onUnauthorized: () => VNode;
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { MerchantBackend } from "../../../../declaration";
|
import { MerchantBackend } from "../../../../declaration.js";
|
||||||
import { Translate, useTranslator } from "../../../../i18n";
|
import { Translate, useTranslator } from "../../../../i18n";
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
|
@ -20,10 +20,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { Loading } from "../../../../components/exception/loading";
|
import { Loading } from "../../../../components/exception/loading.js";
|
||||||
import { HttpError } from "../../../../hooks/backend";
|
import { HttpError } from "../../../../hooks/backend.js";
|
||||||
import { useInstanceKYCDetails } from "../../../../hooks/instance";
|
import { useInstanceKYCDetails } from "../../../../hooks/instance.js";
|
||||||
import { ListPage } from "./ListPage";
|
import { ListPage } from "./ListPage.js";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onUnauthorized: () => VNode;
|
onUnauthorized: () => VNode;
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { h, VNode, FunctionalComponent } from "preact";
|
import { h, VNode, FunctionalComponent } from "preact";
|
||||||
import { CreatePage as TestedComponent } from "./CreatePage";
|
import { CreatePage as TestedComponent } from "./CreatePage.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: "Pages/Order/Create",
|
title: "Pages/Order/Create",
|
||||||
|
@ -26,22 +26,22 @@ import { useEffect, useState } from "preact/hooks";
|
|||||||
import {
|
import {
|
||||||
FormProvider,
|
FormProvider,
|
||||||
FormErrors,
|
FormErrors,
|
||||||
} from "../../../../components/form/FormProvider";
|
} from "../../../../components/form/FormProvider.js";
|
||||||
import { Input } from "../../../../components/form/Input";
|
import { Input } from "../../../../components/form/Input.js";
|
||||||
import { InputCurrency } from "../../../../components/form/InputCurrency";
|
import { InputCurrency } from "../../../../components/form/InputCurrency.js";
|
||||||
import { InputDate } from "../../../../components/form/InputDate";
|
import { InputDate } from "../../../../components/form/InputDate.js";
|
||||||
import { InputGroup } from "../../../../components/form/InputGroup";
|
import { InputGroup } from "../../../../components/form/InputGroup.js";
|
||||||
import { InputLocation } from "../../../../components/form/InputLocation";
|
import { InputLocation } from "../../../../components/form/InputLocation.js";
|
||||||
import { ProductList } from "../../../../components/product/ProductList";
|
import { ProductList } from "../../../../components/product/ProductList.js";
|
||||||
import { useConfigContext } from "../../../../context/config";
|
import { useConfigContext } from "../../../../context/config.js";
|
||||||
import { Duration, MerchantBackend, WithId } from "../../../../declaration";
|
import { Duration, MerchantBackend, WithId } from "../../../../declaration.js";
|
||||||
import { Translate, useTranslator } from "../../../../i18n";
|
import { Translate, useTranslator } from "../../../../i18n";
|
||||||
import { OrderCreateSchema as schema } from "../../../../schemas/index";
|
import { OrderCreateSchema as schema } from "../../../../schemas/index.js";
|
||||||
import { rate } from "../../../../utils/amount";
|
import { rate } from "../../../../utils/amount.js";
|
||||||
import { InventoryProductForm } from "../../../../components/product/InventoryProductForm";
|
import { InventoryProductForm } from "../../../../components/product/InventoryProductForm.js";
|
||||||
import { NonInventoryProductFrom } from "../../../../components/product/NonInventoryProductForm";
|
import { NonInventoryProductFrom } from "../../../../components/product/NonInventoryProductForm.js";
|
||||||
import { InputNumber } from "../../../../components/form/InputNumber";
|
import { InputNumber } from "../../../../components/form/InputNumber.js";
|
||||||
import { InputBoolean } from "../../../../components/form/InputBoolean";
|
import { InputBoolean } from "../../../../components/form/InputBoolean.js";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onCreate: (d: MerchantBackend.Orders.PostOrderRequest) => void;
|
onCreate: (d: MerchantBackend.Orders.PostOrderRequest) => void;
|
||||||
|
@ -15,10 +15,10 @@
|
|||||||
*/
|
*/
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useEffect, useState } from "preact/hooks";
|
import { useEffect, useState } from "preact/hooks";
|
||||||
import { CreatedSuccessfully } from "../../../../components/notifications/CreatedSuccessfully";
|
import { CreatedSuccessfully } from "../../../../components/notifications/CreatedSuccessfully.js";
|
||||||
import { useOrderAPI } from "../../../../hooks/order";
|
import { useOrderAPI } from "../../../../hooks/order.js";
|
||||||
import { Translate } from "../../../../i18n";
|
import { Translate } from "../../../../i18n";
|
||||||
import { Entity } from "./index";
|
import { Entity } from "./index.js";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
entity: Entity;
|
entity: Entity;
|
||||||
|
@ -21,16 +21,16 @@
|
|||||||
|
|
||||||
import { Fragment, h, VNode } from 'preact';
|
import { Fragment, h, VNode } from 'preact';
|
||||||
import { useState } from 'preact/hooks';
|
import { useState } from 'preact/hooks';
|
||||||
import { Loading } from '../../../../components/exception/loading';
|
import { Loading } from "../../../../components/exception/loading.js";
|
||||||
import { NotificationCard } from '../../../../components/menu';
|
import { NotificationCard } from "../../../../components/menu.js";
|
||||||
import { MerchantBackend } from '../../../../declaration';
|
import { MerchantBackend } from "../../../../declaration.js";
|
||||||
import { HttpError } from '../../../../hooks/backend';
|
import { HttpError } from "../../../../hooks/backend.js";
|
||||||
import { useInstanceDetails } from '../../../../hooks/instance';
|
import { useInstanceDetails } from "../../../../hooks/instance.js";
|
||||||
import { useOrderAPI } from '../../../../hooks/order';
|
import { useOrderAPI } from "../../../../hooks/order.js";
|
||||||
import { useInstanceProducts } from '../../../../hooks/product';
|
import { useInstanceProducts } from "../../../../hooks/product.js";
|
||||||
import { Notification } from '../../../../utils/types';
|
import { Notification } from "../../../../utils/types.js";
|
||||||
import { CreatePage } from './CreatePage';
|
import { CreatePage } from "./CreatePage.js";
|
||||||
import { OrderCreatedSuccessfully } from './OrderCreatedSuccessfully';
|
import { OrderCreatedSuccessfully } from "./OrderCreatedSuccessfully.js";
|
||||||
|
|
||||||
export type Entity = {
|
export type Entity = {
|
||||||
request: MerchantBackend.Orders.PostOrderRequest,
|
request: MerchantBackend.Orders.PostOrderRequest,
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
|
|
||||||
import { addDays } from "date-fns";
|
import { addDays } from "date-fns";
|
||||||
import { h, VNode, FunctionalComponent } from "preact";
|
import { h, VNode, FunctionalComponent } from "preact";
|
||||||
import { MerchantBackend } from "../../../../declaration";
|
import { MerchantBackend } from "../../../../declaration.js";
|
||||||
import { DetailPage as TestedComponent } from "./DetailPage";
|
import { DetailPage as TestedComponent } from "./DetailPage.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: "Pages/Order/Detail",
|
title: "Pages/Order/Detail",
|
||||||
|
@ -23,21 +23,21 @@ import { AmountJson, Amounts } from "@gnu-taler/taler-util";
|
|||||||
import { format } from "date-fns";
|
import { format } from "date-fns";
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { FormProvider } from "../../../../components/form/FormProvider";
|
import { FormProvider } from "../../../../components/form/FormProvider.js";
|
||||||
import { Input } from "../../../../components/form/Input";
|
import { Input } from "../../../../components/form/Input.js";
|
||||||
import { InputCurrency } from "../../../../components/form/InputCurrency";
|
import { InputCurrency } from "../../../../components/form/InputCurrency.js";
|
||||||
import { InputDate } from "../../../../components/form/InputDate";
|
import { InputDate } from "../../../../components/form/InputDate.js";
|
||||||
import { InputDuration } from "../../../../components/form/InputDuration";
|
import { InputDuration } from "../../../../components/form/InputDuration.js";
|
||||||
import { InputGroup } from "../../../../components/form/InputGroup";
|
import { InputGroup } from "../../../../components/form/InputGroup.js";
|
||||||
import { InputLocation } from "../../../../components/form/InputLocation";
|
import { InputLocation } from "../../../../components/form/InputLocation.js";
|
||||||
import { TextField } from "../../../../components/form/TextField";
|
import { TextField } from "../../../../components/form/TextField.js";
|
||||||
import { ProductList } from "../../../../components/product/ProductList";
|
import { ProductList } from "../../../../components/product/ProductList.js";
|
||||||
import { useBackendContext } from "../../../../context/backend";
|
import { useBackendContext } from "../../../../context/backend.js";
|
||||||
import { MerchantBackend } from "../../../../declaration";
|
import { MerchantBackend } from "../../../../declaration.js";
|
||||||
import { Translate, useTranslator } from "../../../../i18n";
|
import { Translate, useTranslator } from "../../../../i18n";
|
||||||
import { mergeRefunds } from "../../../../utils/amount";
|
import { mergeRefunds } from "../../../../utils/amount.js";
|
||||||
import { RefundModal } from "../list/Table";
|
import { RefundModal } from "../list/Table.js";
|
||||||
import { Event, Timeline } from "./Timeline";
|
import { Event, Timeline } from "./Timeline.js";
|
||||||
|
|
||||||
type Entity = MerchantBackend.Orders.MerchantOrderStatusResponse;
|
type Entity = MerchantBackend.Orders.MerchantOrderStatusResponse;
|
||||||
type CT = MerchantBackend.ContractTerms;
|
type CT = MerchantBackend.ContractTerms;
|
||||||
|
@ -15,13 +15,13 @@
|
|||||||
*/
|
*/
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { Loading } from "../../../../components/exception/loading";
|
import { Loading } from "../../../../components/exception/loading.js";
|
||||||
import { NotificationCard } from "../../../../components/menu";
|
import { NotificationCard } from "../../../../components/menu.js";
|
||||||
import { HttpError } from "../../../../hooks/backend";
|
import { HttpError } from "../../../../hooks/backend.js";
|
||||||
import { useOrderDetails, useOrderAPI } from "../../../../hooks/order";
|
import { useOrderDetails, useOrderAPI } from "../../../../hooks/order.js";
|
||||||
import { useTranslator } from "../../../../i18n";
|
import { useTranslator } from "../../../../i18n";
|
||||||
import { Notification } from "../../../../utils/types";
|
import { Notification } from "../../../../utils/types.js";
|
||||||
import { DetailPage } from "./DetailPage";
|
import { DetailPage } from "./DetailPage.js";
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
oid: string;
|
oid: string;
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { h, VNode, FunctionalComponent } from "preact";
|
import { h, VNode, FunctionalComponent } from "preact";
|
||||||
import { ListPage as TestedComponent } from "./ListPage";
|
import { ListPage as TestedComponent } from "./ListPage.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: "Pages/Order/List",
|
title: "Pages/Order/List",
|
||||||
|
@ -22,10 +22,10 @@
|
|||||||
import { format } from 'date-fns';
|
import { format } from 'date-fns';
|
||||||
import { h, VNode } from 'preact';
|
import { h, VNode } from 'preact';
|
||||||
import { useState } from 'preact/hooks';
|
import { useState } from 'preact/hooks';
|
||||||
import { DatePicker } from '../../../../components/picker/DatePicker';
|
import { DatePicker } from "../../../../components/picker/DatePicker.js";
|
||||||
import { MerchantBackend, WithId } from '../../../../declaration';
|
import { MerchantBackend, WithId } from "../../../../declaration.js";
|
||||||
import { Translate, useTranslator } from '../../../../i18n';
|
import { Translate, useTranslator } from '../../../../i18n';
|
||||||
import { CardTable } from './Table';
|
import { CardTable } from "./Table.js";
|
||||||
|
|
||||||
export interface ListPageProps {
|
export interface ListPageProps {
|
||||||
errorOrderId: string | undefined,
|
errorOrderId: string | undefined,
|
||||||
|
@ -26,16 +26,16 @@ import { StateUpdater, useState } from "preact/hooks";
|
|||||||
import {
|
import {
|
||||||
FormErrors,
|
FormErrors,
|
||||||
FormProvider,
|
FormProvider,
|
||||||
} from "../../../../components/form/FormProvider";
|
} from "../../../../components/form/FormProvider.js";
|
||||||
import { Input } from "../../../../components/form/Input";
|
import { Input } from "../../../../components/form/Input.js";
|
||||||
import { InputCurrency } from "../../../../components/form/InputCurrency";
|
import { InputCurrency } from "../../../../components/form/InputCurrency.js";
|
||||||
import { InputGroup } from "../../../../components/form/InputGroup";
|
import { InputGroup } from "../../../../components/form/InputGroup.js";
|
||||||
import { InputSelector } from "../../../../components/form/InputSelector";
|
import { InputSelector } from "../../../../components/form/InputSelector.js";
|
||||||
import { ConfirmModal } from "../../../../components/modal";
|
import { ConfirmModal } from "../../../../components/modal.js";
|
||||||
import { useConfigContext } from "../../../../context/config";
|
import { useConfigContext } from "../../../../context/config.js";
|
||||||
import { MerchantBackend, WithId } from "../../../../declaration";
|
import { MerchantBackend, WithId } from "../../../../declaration.js";
|
||||||
import { Translate, useTranslator } from "../../../../i18n";
|
import { Translate, useTranslator } from "../../../../i18n";
|
||||||
import { mergeRefunds } from "../../../../utils/amount";
|
import { mergeRefunds } from "../../../../utils/amount.js";
|
||||||
|
|
||||||
type Entity = MerchantBackend.Orders.OrderHistoryEntry & WithId;
|
type Entity = MerchantBackend.Orders.OrderHistoryEntry & WithId;
|
||||||
interface Props {
|
interface Props {
|
||||||
|
@ -21,15 +21,15 @@
|
|||||||
|
|
||||||
import { h, VNode, Fragment } from 'preact';
|
import { h, VNode, Fragment } from 'preact';
|
||||||
import { useState } from 'preact/hooks';
|
import { useState } from 'preact/hooks';
|
||||||
import { Loading } from '../../../../components/exception/loading';
|
import { Loading } from "../../../../components/exception/loading.js";
|
||||||
import { NotificationCard } from '../../../../components/menu';
|
import { NotificationCard } from "../../../../components/menu.js";
|
||||||
import { MerchantBackend, WithId } from '../../../../declaration';
|
import { MerchantBackend, WithId } from "../../../../declaration.js";
|
||||||
import { HttpError } from '../../../../hooks/backend';
|
import { HttpError } from "../../../../hooks/backend.js";
|
||||||
import { InstanceOrderFilter, useInstanceOrders, useOrderAPI, useOrderDetails } from '../../../../hooks/order';
|
import { InstanceOrderFilter, useInstanceOrders, useOrderAPI, useOrderDetails } from "../../../../hooks/order.js";
|
||||||
import { useTranslator } from '../../../../i18n';
|
import { useTranslator } from '../../../../i18n';
|
||||||
import { Notification } from '../../../../utils/types';
|
import { Notification } from "../../../../utils/types.js";
|
||||||
import { RefundModal } from './Table';
|
import { RefundModal } from "./Table.js";
|
||||||
import { ListPage } from './ListPage';
|
import { ListPage } from "./ListPage.js";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onUnauthorized: () => VNode;
|
onUnauthorized: () => VNode;
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { h, VNode, FunctionalComponent } from 'preact';
|
import { h, VNode, FunctionalComponent } from 'preact';
|
||||||
import { CreatePage as TestedComponent } from './CreatePage';
|
import { CreatePage as TestedComponent } from "./CreatePage.js";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -20,10 +20,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { AsyncButton } from "../../../../components/exception/AsyncButton";
|
import { AsyncButton } from "../../../../components/exception/AsyncButton.js";
|
||||||
import { ProductForm } from "../../../../components/product/ProductForm";
|
import { ProductForm } from "../../../../components/product/ProductForm.js";
|
||||||
import { MerchantBackend } from "../../../../declaration";
|
import { MerchantBackend } from "../../../../declaration.js";
|
||||||
import { useListener } from "../../../../hooks/listener";
|
import { useListener } from "../../../../hooks/listener.js";
|
||||||
import { Translate, useTranslator } from "../../../../i18n";
|
import { Translate, useTranslator } from "../../../../i18n";
|
||||||
|
|
||||||
type Entity = MerchantBackend.Products.ProductAddDetail & { product_id: string}
|
type Entity = MerchantBackend.Products.ProductAddDetail & { product_id: string}
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { CreatedSuccessfully as Template } from "../../../../components/notifications/CreatedSuccessfully";
|
import { CreatedSuccessfully as Template } from "../../../../components/notifications/CreatedSuccessfully.js";
|
||||||
import { Entity } from "./index";
|
import { Entity } from "./index.js";
|
||||||
import emptyImage from "../../assets/empty.png";
|
import emptyImage from "../../assets/empty.png";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
@ -21,12 +21,12 @@
|
|||||||
|
|
||||||
import { Fragment, h, VNode } from 'preact';
|
import { Fragment, h, VNode } from 'preact';
|
||||||
import { useState } from 'preact/hooks';
|
import { useState } from 'preact/hooks';
|
||||||
import { NotificationCard } from '../../../../components/menu';
|
import { NotificationCard } from "../../../../components/menu.js";
|
||||||
import { MerchantBackend } from '../../../../declaration';
|
import { MerchantBackend } from "../../../../declaration.js";
|
||||||
import { useProductAPI } from '../../../../hooks/product';
|
import { useProductAPI } from "../../../../hooks/product.js";
|
||||||
import { useTranslator } from '../../../../i18n';
|
import { useTranslator } from '../../../../i18n';
|
||||||
import { Notification } from '../../../../utils/types';
|
import { Notification } from "../../../../utils/types.js";
|
||||||
import { CreatePage } from './CreatePage';
|
import { CreatePage } from "./CreatePage.js";
|
||||||
|
|
||||||
export type Entity = MerchantBackend.Products.ProductAddDetail
|
export type Entity = MerchantBackend.Products.ProductAddDetail
|
||||||
interface Props {
|
interface Props {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { h, VNode, FunctionalComponent } from 'preact';
|
import { h, VNode, FunctionalComponent } from 'preact';
|
||||||
import { CardTable as TestedComponent } from './Table';
|
import { CardTable as TestedComponent } from "./Table.js";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -25,10 +25,10 @@ import { StateUpdater, useState } from "preact/hooks";
|
|||||||
import {
|
import {
|
||||||
FormProvider,
|
FormProvider,
|
||||||
FormErrors,
|
FormErrors,
|
||||||
} from "../../../../components/form/FormProvider";
|
} from "../../../../components/form/FormProvider.js";
|
||||||
import { InputCurrency } from "../../../../components/form/InputCurrency";
|
import { InputCurrency } from "../../../../components/form/InputCurrency.js";
|
||||||
import { InputNumber } from "../../../../components/form/InputNumber";
|
import { InputNumber } from "../../../../components/form/InputNumber.js";
|
||||||
import { MerchantBackend, WithId } from "../../../../declaration";
|
import { MerchantBackend, WithId } from "../../../../declaration.js";
|
||||||
import emptyImage from "../../../../assets/empty.png";
|
import emptyImage from "../../../../assets/empty.png";
|
||||||
import { Translate, useTranslator } from "../../../../i18n";
|
import { Translate, useTranslator } from "../../../../i18n";
|
||||||
import { Amounts } from "@gnu-taler/taler-util";
|
import { Amounts } from "@gnu-taler/taler-util";
|
||||||
|
@ -21,14 +21,14 @@
|
|||||||
|
|
||||||
import { h, VNode } from 'preact';
|
import { h, VNode } from 'preact';
|
||||||
import { useState } from 'preact/hooks';
|
import { useState } from 'preact/hooks';
|
||||||
import { Loading } from '../../../../components/exception/loading';
|
import { Loading } from "../../../../components/exception/loading.js";
|
||||||
import { NotificationCard } from '../../../../components/menu';
|
import { NotificationCard } from "../../../../components/menu.js";
|
||||||
import { MerchantBackend, WithId } from '../../../../declaration';
|
import { MerchantBackend, WithId } from "../../../../declaration.js";
|
||||||
import { HttpError } from '../../../../hooks/backend';
|
import { HttpError } from "../../../../hooks/backend.js";
|
||||||
import { useInstanceProducts, useProductAPI } from "../../../../hooks/product";
|
import { useInstanceProducts, useProductAPI } from "../../../../hooks/product.js";
|
||||||
import { useTranslator } from '../../../../i18n';
|
import { useTranslator } from '../../../../i18n';
|
||||||
import { Notification } from '../../../../utils/types';
|
import { Notification } from "../../../../utils/types.js";
|
||||||
import { CardTable } from './Table';
|
import { CardTable } from "./Table.js";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onUnauthorized: () => VNode;
|
onUnauthorized: () => VNode;
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { h, VNode, FunctionalComponent } from 'preact';
|
import { h, VNode, FunctionalComponent } from 'preact';
|
||||||
import { UpdatePage as TestedComponent } from './UpdatePage';
|
import { UpdatePage as TestedComponent } from "./UpdatePage.js";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -20,10 +20,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { AsyncButton } from "../../../../components/exception/AsyncButton";
|
import { AsyncButton } from "../../../../components/exception/AsyncButton.js";
|
||||||
import { ProductForm } from "../../../../components/product/ProductForm";
|
import { ProductForm } from "../../../../components/product/ProductForm.js";
|
||||||
import { MerchantBackend, WithId } from "../../../../declaration";
|
import { MerchantBackend, WithId } from "../../../../declaration.js";
|
||||||
import { useListener } from "../../../../hooks/listener";
|
import { useListener } from "../../../../hooks/listener.js";
|
||||||
import { Translate, useTranslator } from "../../../../i18n";
|
import { Translate, useTranslator } from "../../../../i18n";
|
||||||
|
|
||||||
type Entity = MerchantBackend.Products.ProductDetail & { product_id: string }
|
type Entity = MerchantBackend.Products.ProductDetail & { product_id: string }
|
||||||
|
@ -21,14 +21,14 @@
|
|||||||
|
|
||||||
import { Fragment, h, VNode } from 'preact';
|
import { Fragment, h, VNode } from 'preact';
|
||||||
import { useState } from 'preact/hooks';
|
import { useState } from 'preact/hooks';
|
||||||
import { Loading } from '../../../../components/exception/loading';
|
import { Loading } from "../../../../components/exception/loading.js";
|
||||||
import { NotificationCard } from '../../../../components/menu';
|
import { NotificationCard } from "../../../../components/menu.js";
|
||||||
import { MerchantBackend } from '../../../../declaration';
|
import { MerchantBackend } from "../../../../declaration.js";
|
||||||
import { HttpError } from '../../../../hooks/backend';
|
import { HttpError } from "../../../../hooks/backend.js";
|
||||||
import { useProductAPI, useProductDetails } from '../../../../hooks/product';
|
import { useProductAPI, useProductDetails } from "../../../../hooks/product.js";
|
||||||
import { useTranslator } from '../../../../i18n';
|
import { useTranslator } from '../../../../i18n';
|
||||||
import { Notification } from '../../../../utils/types';
|
import { Notification } from "../../../../utils/types.js";
|
||||||
import { UpdatePage } from './UpdatePage';
|
import { UpdatePage } from "./UpdatePage.js";
|
||||||
|
|
||||||
export type Entity = MerchantBackend.Products.ProductAddDetail
|
export type Entity = MerchantBackend.Products.ProductAddDetail
|
||||||
interface Props {
|
interface Props {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { h, VNode, FunctionalComponent } from 'preact';
|
import { h, VNode, FunctionalComponent } from 'preact';
|
||||||
import { CreatePage as TestedComponent } from './CreatePage';
|
import { CreatePage as TestedComponent } from "./CreatePage.js";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -21,16 +21,16 @@
|
|||||||
|
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { StateUpdater, useEffect, useState } from "preact/hooks";
|
import { StateUpdater, useEffect, useState } from "preact/hooks";
|
||||||
import { FormErrors, FormProvider } from "../../../../components/form/FormProvider";
|
import { FormErrors, FormProvider } from "../../../../components/form/FormProvider.js";
|
||||||
import { Input } from "../../../../components/form/Input";
|
import { Input } from "../../../../components/form/Input.js";
|
||||||
import { InputCurrency } from "../../../../components/form/InputCurrency";
|
import { InputCurrency } from "../../../../components/form/InputCurrency.js";
|
||||||
import { ExchangeBackend, MerchantBackend } from "../../../../declaration";
|
import { ExchangeBackend, MerchantBackend } from "../../../../declaration.js";
|
||||||
import { Translate, useTranslator } from "../../../../i18n";
|
import { Translate, useTranslator } from "../../../../i18n";
|
||||||
import { AsyncButton } from "../../../../components/exception/AsyncButton";
|
import { AsyncButton } from "../../../../components/exception/AsyncButton.js";
|
||||||
import { canonicalizeBaseUrl, ExchangeKeysJson } from "@gnu-taler/taler-util"
|
import { canonicalizeBaseUrl, ExchangeKeysJson } from "@gnu-taler/taler-util"
|
||||||
import { PAYTO_WIRE_METHOD_LOOKUP, URL_REGEX } from "../../../../utils/constants";
|
import { PAYTO_WIRE_METHOD_LOOKUP, URL_REGEX } from "../../../../utils/constants.js";
|
||||||
import { request } from "../../../../hooks/backend";
|
import { request } from "../../../../hooks/backend.js";
|
||||||
import { InputSelector } from "../../../../components/form/InputSelector";
|
import { InputSelector } from "../../../../components/form/InputSelector.js";
|
||||||
|
|
||||||
type Entity = MerchantBackend.Tips.ReserveCreateRequest
|
type Entity = MerchantBackend.Tips.ReserveCreateRequest
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { h, VNode, FunctionalComponent } from 'preact';
|
import { h, VNode, FunctionalComponent } from 'preact';
|
||||||
import { CreatedSuccessfully as TestedComponent } from './CreatedSuccessfully';
|
import { CreatedSuccessfully as TestedComponent } from "./CreatedSuccessfully.js";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -15,10 +15,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { CreatedSuccessfully as Template } from "../../../../components/notifications/CreatedSuccessfully";
|
import { CreatedSuccessfully as Template } from "../../../../components/notifications/CreatedSuccessfully.js";
|
||||||
import { MerchantBackend } from "../../../../declaration";
|
import { MerchantBackend } from "../../../../declaration.js";
|
||||||
import { Translate } from "../../../../i18n";
|
import { Translate } from "../../../../i18n";
|
||||||
import { QR } from "../../../../components/exception/QR";
|
import { QR } from "../../../../components/exception/QR.js";
|
||||||
|
|
||||||
type Entity = { request: MerchantBackend.Tips.ReserveCreateRequest, response: MerchantBackend.Tips.ReserveCreateConfirmation };
|
type Entity = { request: MerchantBackend.Tips.ReserveCreateRequest, response: MerchantBackend.Tips.ReserveCreateConfirmation };
|
||||||
|
|
||||||
|
@ -21,13 +21,13 @@
|
|||||||
|
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { NotificationCard } from "../../../../components/menu";
|
import { NotificationCard } from "../../../../components/menu.js";
|
||||||
import { MerchantBackend } from "../../../../declaration";
|
import { MerchantBackend } from "../../../../declaration.js";
|
||||||
import { useReservesAPI } from "../../../../hooks/reserves";
|
import { useReservesAPI } from "../../../../hooks/reserves.js";
|
||||||
import { useTranslator } from "../../../../i18n";
|
import { useTranslator } from "../../../../i18n";
|
||||||
import { Notification } from "../../../../utils/types";
|
import { Notification } from "../../../../utils/types.js";
|
||||||
import { CreatedSuccessfully } from "./CreatedSuccessfully";
|
import { CreatedSuccessfully } from "./CreatedSuccessfully.js";
|
||||||
import { CreatePage } from "./CreatePage";
|
import { CreatePage } from "./CreatePage.js";
|
||||||
interface Props {
|
interface Props {
|
||||||
onBack: () => void;
|
onBack: () => void;
|
||||||
onConfirm: () => void;
|
onConfirm: () => void;
|
||||||
|
@ -23,17 +23,17 @@ import { Amounts } from "@gnu-taler/taler-util";
|
|||||||
import { format } from "date-fns";
|
import { format } from "date-fns";
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { QR } from "../../../../components/exception/QR";
|
import { QR } from "../../../../components/exception/QR.js";
|
||||||
import { FormProvider } from "../../../../components/form/FormProvider";
|
import { FormProvider } from "../../../../components/form/FormProvider.js";
|
||||||
import { Input } from "../../../../components/form/Input";
|
import { Input } from "../../../../components/form/Input.js";
|
||||||
import { InputCurrency } from "../../../../components/form/InputCurrency";
|
import { InputCurrency } from "../../../../components/form/InputCurrency.js";
|
||||||
import { InputDate } from "../../../../components/form/InputDate";
|
import { InputDate } from "../../../../components/form/InputDate.js";
|
||||||
import { TextField } from "../../../../components/form/TextField";
|
import { TextField } from "../../../../components/form/TextField.js";
|
||||||
import { ContinueModal, SimpleModal } from "../../../../components/modal";
|
import { ContinueModal, SimpleModal } from "../../../../components/modal.js";
|
||||||
import { MerchantBackend } from "../../../../declaration";
|
import { MerchantBackend } from "../../../../declaration.js";
|
||||||
import { useTipDetails } from "../../../../hooks/reserves";
|
import { useTipDetails } from "../../../../hooks/reserves.js";
|
||||||
import { Translate, useTranslator } from "../../../../i18n";
|
import { Translate, useTranslator } from "../../../../i18n";
|
||||||
import { TipInfo } from "./TipInfo";
|
import { TipInfo } from "./TipInfo.js";
|
||||||
|
|
||||||
type Entity = MerchantBackend.Tips.ReserveDetail;
|
type Entity = MerchantBackend.Tips.ReserveDetail;
|
||||||
type CT = MerchantBackend.ContractTerms;
|
type CT = MerchantBackend.ContractTerms;
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { h, VNode, FunctionalComponent } from "preact";
|
import { h, VNode, FunctionalComponent } from "preact";
|
||||||
import { DetailPage as TestedComponent } from "./DetailPage";
|
import { DetailPage as TestedComponent } from "./DetailPage.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: "Pages/Reserve/Detail",
|
title: "Pages/Reserve/Detail",
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
*/
|
*/
|
||||||
import { format } from "date-fns";
|
import { format } from "date-fns";
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { useBackendContext } from "../../../../context/backend";
|
import { useBackendContext } from "../../../../context/backend.js";
|
||||||
import { MerchantBackend } from "../../../../declaration";
|
import { MerchantBackend } from "../../../../declaration.js";
|
||||||
|
|
||||||
type Entity = MerchantBackend.Tips.TipDetails;
|
type Entity = MerchantBackend.Tips.TipDetails;
|
||||||
|
|
||||||
|
@ -20,10 +20,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { Loading } from "../../../../components/exception/loading";
|
import { Loading } from "../../../../components/exception/loading.js";
|
||||||
import { HttpError } from "../../../../hooks/backend";
|
import { HttpError } from "../../../../hooks/backend.js";
|
||||||
import { useReserveDetails } from "../../../../hooks/reserves";
|
import { useReserveDetails } from "../../../../hooks/reserves.js";
|
||||||
import { DetailPage } from "./DetailPage";
|
import { DetailPage } from "./DetailPage.js";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
rid: string;
|
rid: string;
|
||||||
|
@ -21,14 +21,14 @@
|
|||||||
|
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { FormErrors, FormProvider } from "../../../../components/form/FormProvider";
|
import { FormErrors, FormProvider } from "../../../../components/form/FormProvider.js";
|
||||||
import { Input } from "../../../../components/form/Input";
|
import { Input } from "../../../../components/form/Input.js";
|
||||||
import { InputCurrency } from "../../../../components/form/InputCurrency";
|
import { InputCurrency } from "../../../../components/form/InputCurrency.js";
|
||||||
import { ConfirmModal, ContinueModal } from "../../../../components/modal";
|
import { ConfirmModal, ContinueModal } from "../../../../components/modal.js";
|
||||||
import { MerchantBackend } from "../../../../declaration";
|
import { MerchantBackend } from "../../../../declaration.js";
|
||||||
import { useTranslator } from "../../../../i18n";
|
import { useTranslator } from "../../../../i18n";
|
||||||
import { AuthorizeTipSchema } from "../../../../schemas";
|
import { AuthorizeTipSchema } from "../../../../schemas.js";
|
||||||
import { CreatedSuccessfully } from "./CreatedSuccessfully";
|
import { CreatedSuccessfully } from "./CreatedSuccessfully.js";
|
||||||
import * as yup from 'yup';
|
import * as yup from 'yup';
|
||||||
|
|
||||||
interface AuthorizeTipModalProps {
|
interface AuthorizeTipModalProps {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user