1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00

reorganized react components

This commit is contained in:
Sylvain 2021-04-08 10:46:09 +02:00
parent a55dd4dc71
commit 6da577d4ae
14 changed files with 83 additions and 82 deletions

View File

@ -2,12 +2,12 @@ import React, { useState } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { react2angular } from 'react2angular'; import { react2angular } from 'react2angular';
import moment from 'moment'; import moment from 'moment';
import { IApplication } from '../models/application'; import '../../lib/i18n';
import '../lib/i18n'; import { Loader } from '../base/loader';
import { PaymentSchedule } from '../models/payment-schedule'; import { FabModal } from '../base/fab-modal';
import { Loader } from './base/loader'; import { IFablab } from '../../models/fablab';
import { FabModal } from './base/fab-modal'; import { PaymentSchedule } from '../../models/payment-schedule';
import { IFablab } from '../models/fablab'; import { IApplication } from '../../models/application';
declare var Application: IApplication; declare var Application: IApplication;
declare var Fablab: IFablab; declare var Fablab: IFablab;

View File

@ -1,13 +1,13 @@
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { IApplication } from '../models/application';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { Loader } from './base/loader';
import { react2angular } from 'react2angular'; import { react2angular } from 'react2angular';
import PaymentScheduleAPI from '../api/payment-schedule';
import { PaymentSchedulesTable } from './payment-schedules-table'; import { PaymentSchedulesTable } from './payment-schedules-table';
import { FabButton } from './base/fab-button'; import { FabButton } from '../base/fab-button';
import { User } from '../models/user'; import { Loader } from '../base/loader';
import { PaymentSchedule } from '../models/payment-schedule'; import { User } from '../../models/user';
import { PaymentSchedule } from '../../models/payment-schedule';
import { IApplication } from '../../models/application';
import PaymentScheduleAPI from '../../api/payment-schedule';
declare var Application: IApplication; declare var Application: IApplication;

View File

@ -1,14 +1,14 @@
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { IApplication } from '../models/application';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { Loader } from './base/loader';
import { react2angular } from 'react2angular'; import { react2angular } from 'react2angular';
import PaymentScheduleAPI from '../api/payment-schedule'; import { DocumentFilters } from '../document-filters';
import { DocumentFilters } from './document-filters';
import { PaymentSchedulesTable } from './payment-schedules-table'; import { PaymentSchedulesTable } from './payment-schedules-table';
import { FabButton } from './base/fab-button'; import { FabButton } from '../base/fab-button';
import { User } from '../models/user'; import { Loader } from '../base/loader';
import { PaymentSchedule } from '../models/payment-schedule'; import { User } from '../../models/user';
import { PaymentSchedule } from '../../models/payment-schedule';
import { IApplication } from '../../models/application';
import PaymentScheduleAPI from '../../api/payment-schedule';
declare var Application: IApplication; declare var Application: IApplication;

View File

@ -1,20 +1,21 @@
import React, { ReactEventHandler, ReactNode, useState } from 'react'; import React, { ReactEventHandler, ReactNode, useState } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { Loader } from './base/loader'; import { Loader } from '../base/loader';
import moment from 'moment'; import moment from 'moment';
import { IFablab } from '../models/fablab';
import _ from 'lodash'; import _ from 'lodash';
import { PaymentSchedule, PaymentScheduleItem, PaymentScheduleItemState } from '../models/payment-schedule'; import { FabButton } from '../base/fab-button';
import { FabButton } from './base/fab-button'; import { FabModal } from '../base/fab-modal';
import { FabModal } from './base/fab-modal'; import { StripeElements } from '../stripe/stripe-elements';
import PaymentScheduleAPI from '../api/payment-schedule'; import { StripeConfirm } from '../stripe/stripe-confirm';
import { StripeElements } from './stripe-elements'; import { StripeCardUpdate } from '../stripe/stripe-card-update';
import { StripeConfirm } from './stripe-confirm'; import { User, UserRole } from '../../models/user';
import stripeLogo from '../../../images/powered_by_stripe.png'; import { IFablab } from '../../models/fablab';
import mastercardLogo from '../../../images/mastercard.png'; import { PaymentSchedule, PaymentScheduleItem, PaymentScheduleItemState } from '../../models/payment-schedule';
import visaLogo from '../../../images/visa.png'; import PaymentScheduleAPI from '../../api/payment-schedule';
import { StripeCardUpdate } from './stripe-card-update';
import { User, UserRole } from '../models/user'; import stripeLogo from '../../../../images/powered_by_stripe.png';
import mastercardLogo from '../../../../images/mastercard.png';
import visaLogo from '../../../../images/visa.png';
declare var Fablab: IFablab; declare var Fablab: IFablab;

View File

@ -2,9 +2,9 @@ import React from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { react2angular } from 'react2angular'; import { react2angular } from 'react2angular';
import Switch from 'react-switch'; import Switch from 'react-switch';
import { IApplication } from '../models/application'; import '../../lib/i18n';
import { Loader } from './base/loader'; import { Loader } from '../base/loader';
import '../lib/i18n'; import { IApplication } from '../../models/application';
declare var Application: IApplication; declare var Application: IApplication;

View File

@ -1,13 +1,13 @@
import React, { ReactNode, useEffect, useState } from 'react'; import React, { ReactNode, useEffect, useState } from 'react';
import { Loader } from './base/loader';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import SettingAPI from '../api/setting';
import { SettingName } from '../models/setting';
import { FabInput } from './base/fab-input';
import { enableMapSet } from 'immer'; import { enableMapSet } from 'immer';
import { useImmer } from 'use-immer'; import { useImmer } from 'use-immer';
import PayzenAPI from '../api/payzen'; import { HtmlTranslate } from '../base/html-translate';
import { HtmlTranslate } from './base/html-translate'; import { FabInput } from '../base/fab-input';
import { Loader } from '../base/loader';
import { SettingName } from '../../models/setting';
import SettingAPI from '../../api/setting';
import PayzenAPI from '../../api/payzen';
enableMapSet(); enableMapSet();

View File

@ -1,14 +1,14 @@
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { Loader } from './base/loader';
import { react2angular } from 'react2angular'; import { react2angular } from 'react2angular';
import { IApplication } from '../models/application';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import SettingAPI from '../api/setting';
import { SettingName } from '../models/setting';
import { useImmer } from 'use-immer'; import { useImmer } from 'use-immer';
import { FabInput } from './base/fab-input'; import { FabInput } from '../base/fab-input';
import { FabButton } from './base/fab-button'; import { FabButton } from '../base/fab-button';
import { HtmlTranslate } from './base/html-translate'; import { Loader } from '../base/loader';
import { HtmlTranslate } from '../base/html-translate';
import { SettingName } from '../../models/setting';
import { IApplication } from '../../models/application';
import SettingAPI from '../../api/setting';
declare var Application: IApplication; declare var Application: IApplication;

View File

@ -11,10 +11,10 @@ import { useTranslation } from 'react-i18next';
import { FabModal, ModalSize } from './base/fab-modal'; import { FabModal, ModalSize } from './base/fab-modal';
import { User } from '../models/user'; import { User } from '../models/user';
import { Gateway } from '../models/gateway'; import { Gateway } from '../models/gateway';
import { StripeKeysForm } from './stripe-keys-form'; import { StripeKeysForm } from './stripe/stripe-keys-form';
import { SettingBulkResult, SettingName } from '../models/setting'; import { SettingBulkResult, SettingName } from '../models/setting';
import SettingAPI from '../api/setting'; import SettingAPI from '../api/setting';
import { PayZenKeysForm } from './payzen-keys-form'; import { PayZenKeysForm } from './payzen/payzen-keys-form';
declare var Application: IApplication; declare var Application: IApplication;

View File

@ -1,9 +1,9 @@
import React, { FormEvent } from 'react'; import React, { FormEvent } from 'react';
import { CardElement, useElements, useStripe } from '@stripe/react-stripe-js'; import { CardElement, useElements, useStripe } from '@stripe/react-stripe-js';
import { SetupIntent } from "@stripe/stripe-js"; import { SetupIntent } from "@stripe/stripe-js";
import PaymentAPI from '../api/payment'; import { PaymentConfirmation } from '../../models/payment';
import { PaymentConfirmation } from '../models/payment'; import { User } from '../../models/user';
import { User } from '../models/user'; import PaymentAPI from '../../api/payment';
interface StripeCardUpdateProps { interface StripeCardUpdateProps {
onSubmit: () => void, onSubmit: () => void,

View File

@ -1,8 +1,8 @@
import React, { memo, useEffect, useState } from 'react'; import React, { memo, useEffect, useState } from 'react';
import { Elements } from '@stripe/react-stripe-js'; import { Elements } from '@stripe/react-stripe-js';
import { loadStripe } from "@stripe/stripe-js"; import { loadStripe } from "@stripe/stripe-js";
import SettingAPI from '../api/setting'; import { SettingName } from '../../models/setting';
import { SettingName } from '../models/setting'; import SettingAPI from '../../api/setting';
// initial request to the API // initial request to the API
const stripePublicKey = SettingAPI.get(SettingName.StripePublicKey); const stripePublicKey = SettingAPI.get(SettingName.StripePublicKey);

View File

@ -1,10 +1,10 @@
import React, { FormEvent } from 'react'; import React, { FormEvent } from 'react';
import { CardElement, useElements, useStripe } from '@stripe/react-stripe-js'; import { CardElement, useElements, useStripe } from '@stripe/react-stripe-js';
import { SetupIntent } from "@stripe/stripe-js"; import { SetupIntent } from "@stripe/stripe-js";
import PaymentAPI from '../api/payment';
import { CartItems, PaymentConfirmation } from '../models/payment';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { User } from '../models/user'; import { CartItems, PaymentConfirmation } from '../../models/payment';
import { User } from '../../models/user';
import PaymentAPI from '../../api/payment';
interface StripeFormProps { interface StripeFormProps {
onSubmit: () => void, onSubmit: () => void,

View File

@ -1,11 +1,11 @@
import React, { ReactNode, useEffect, useRef, useState } from 'react'; import React, { ReactNode, useEffect, useRef, useState } from 'react';
import { Loader } from './base/loader';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import SettingAPI from '../api/setting'; import { HtmlTranslate } from '../base/html-translate';
import { SettingName } from '../models/setting'; import { FabInput } from '../base/fab-input';
import { FabInput } from './base/fab-input'; import { Loader } from '../base/loader';
import StripeAPI from '../api/stripe'; import { SettingName } from '../../models/setting';
import { HtmlTranslate } from './base/html-translate'; import StripeAPI from '../../api/stripe';
import SettingAPI from '../../api/setting';
interface StripeKeysFormProps { interface StripeKeysFormProps {

View File

@ -1,27 +1,27 @@
import React, { ReactNode, useEffect, useState } from 'react'; import React, { ReactNode, useEffect, useState } from 'react';
import { react2angular } from 'react2angular'; import { react2angular } from 'react2angular';
import { Loader } from './base/loader';
import { IApplication } from '../models/application';
import { StripeElements } from './stripe-elements';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { FabModal, ModalSize } from './base/fab-modal';
import { SetupIntent } from '@stripe/stripe-js'; import { SetupIntent } from '@stripe/stripe-js';
import { WalletInfo } from './wallet-info'; import WalletLib from '../../lib/wallet';
import { User } from '../models/user'; import { StripeElements } from './stripe-elements';
import CustomAssetAPI from '../api/custom-asset';
import { CustomAssetName } from '../models/custom-asset';
import { PaymentSchedule } from '../models/payment-schedule';
import { IFablab } from '../models/fablab';
import WalletLib from '../lib/wallet';
import { StripeForm } from './stripe-form'; import { StripeForm } from './stripe-form';
import { CartItems, PaymentConfirmation } from '../models/payment'; import { WalletInfo } from '../wallet-info';
import WalletAPI from '../api/wallet'; import { FabModal, ModalSize } from '../base/fab-modal';
import PriceAPI from '../api/price'; import { HtmlTranslate } from '../base/html-translate';
import { HtmlTranslate } from './base/html-translate'; import { Loader } from '../base/loader';
import { IApplication } from '../../models/application';
import { CustomAssetName } from '../../models/custom-asset';
import { IFablab } from '../../models/fablab';
import { CartItems, PaymentConfirmation } from '../../models/payment';
import { PaymentSchedule } from '../../models/payment-schedule';
import { User } from '../../models/user';
import CustomAssetAPI from '../../api/custom-asset';
import PriceAPI from '../../api/price';
import WalletAPI from '../../api/wallet';
import stripeLogo from '../../../images/powered_by_stripe.png'; import stripeLogo from '../../../../images/powered_by_stripe.png';
import mastercardLogo from '../../../images/mastercard.png'; import mastercardLogo from '../../../../images/mastercard.png';
import visaLogo from '../../../images/visa.png'; import visaLogo from '../../../../images/visa.png';
declare var Application: IApplication; declare var Application: IApplication;
declare var Fablab: IFablab; declare var Fablab: IFablab;