Skip to content

Commit

Permalink
Merge branch 'main' into ncomont-feat-errors-in-footer
Browse files Browse the repository at this point in the history
  • Loading branch information
ncomont committed Dec 5, 2023
2 parents aa31eaf + 24ce258 commit 2104ec6
Show file tree
Hide file tree
Showing 28 changed files with 1,223 additions and 885 deletions.
28 changes: 14 additions & 14 deletions LICENSE_REPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@
Name | Version | License | URL | VendorUrl | VendorName
--- | --- | --- | --- | --- | ---
@0no-co/graphql.web | 1.0.4 | MIT | https://github.com/0no-co/graphql.web | Unknown | 0no.co
@fastify/accepts | 4.2.0 | MIT | https://github.com/fastify/fastify-accepts.git | https://github.com/fastify/fastify-accepts#readme | allevo
@fastify/cors | 8.4.1 | MIT | https://github.com/fastify/fastify-cors.git | https://github.com/fastify/fastify-cors#readme | Tomas Della Vedova - @delvedor
@fastify/accepts | 4.3.0 | MIT | https://github.com/fastify/fastify-accepts.git | https://github.com/fastify/fastify-accepts#readme | allevo
@fastify/cors | 8.4.2 | MIT | https://github.com/fastify/fastify-cors.git | https://github.com/fastify/fastify-cors#readme | Tomas Della Vedova - @delvedor
@fastify/reply-from | 9.4.0 | MIT | https://github.com/fastify/fastify-reply-from.git | https://github.com/fastify/fastify-reply-from#readme | Matteo Collina
@fastify/secure-session | 7.1.0 | MIT | https://github.com/fastify/fastify-secure-session.git | https://github.com/fastify/fastify-secure-session#readme | Matteo Collina
@fastify/sensible | 5.5.0 | MIT | https://github.com/fastify/fastify-sensible.git | https://github.com/fastify/fastify-sensible#readme | Tomas Della Vedova - @delvedor
@fastify/static | 6.12.0 | MIT | https://github.com/fastify/fastify-static.git | https://github.com/fastify/fastify-static | Tommaso Allevi - @allevo
@fastify/view | 8.2.0 | MIT | https://github.com/fastify/point-of-view.git | https://github.com/fastify/point-of-view#readme | Tomas Della Vedova - @delvedor
@formatjs/intl | 2.9.9 | MIT | [email protected]:formatjs/formatjs.git | https://formatjs.io/ | Long Ho
@sentry/react | 7.81.1 | MIT | git://github.com/getsentry/sentry-javascript.git | https://github.com/getsentry/sentry-javascript/tree/master/packages/react | Sentry
@sentry/react | 7.85.0 | MIT | git://github.com/getsentry/sentry-javascript.git | https://github.com/getsentry/sentry-javascript/tree/master/packages/react | Sentry
@testing-library/react | 14.1.2 | MIT | https://github.com/testing-library/react-testing-library | https://github.com/testing-library/react-testing-library#readme | Kent C. Dodds
@testing-library/user-event | 14.5.1 | MIT | https://github.com/testing-library/user-event | https://github.com/testing-library/user-event#readme | Giorgio Polvara
@types/accepts | 1.3.7 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped.git | https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/accepts | Unknown
@types/iban | 0.0.35 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped.git | https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/iban | Unknown
@types/mustache | 4.2.5 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped.git | https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mustache | Unknown
@types/react | 18.2.38 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped.git | https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react | Unknown
@types/react | 18.2.42 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped.git | https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react | Unknown
@types/react-dom | 18.2.17 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped.git | https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom | Unknown
@types/react-native | 0.72.7 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped.git | https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-native | Unknown
@types/react-native | 0.72.8 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped.git | https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-native | Unknown
@types/uuid | 9.0.7 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped.git | https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/uuid | Unknown
@urql/exchange-graphcache | 6.3.3 | MIT | https://github.com/urql-graphql/urql.git | https://formidable.com/open-source/urql/docs/graphcache | urql GraphQL Contributors
@vitejs/plugin-legacy | 4.1.1 | MIT | https://github.com/vitejs/vite.git | https://github.com/vitejs/vite/tree/main/packages/plugin-legacy#readme | Evan You
@urql/exchange-graphcache | 6.4.0 | MIT | https://github.com/urql-graphql/urql.git | https://formidable.com/open-source/urql/docs/graphcache | urql GraphQL Contributors
@vitejs/plugin-legacy | 5.2.0 | MIT | https://github.com/vitejs/vite.git | https://github.com/vitejs/vite/tree/main/packages/plugin-legacy#readme | Evan You
@vitejs/plugin-react-swc | 3.5.0 | MIT | https://github.com/vitejs/vite-plugin-react-swc.git | https://github.com/ArnaudBarre | Arnaud Barré
core-js | 3.33.3 | MIT | https://github.com/zloirock/core-js.git | http://zloirock.ru | Denis Pushkarev
dayjs | 1.11.10 | MIT | https://github.com/iamkun/dayjs.git | https://day.js.org/ | iamkun
Expand All @@ -38,8 +38,8 @@ jsdom | 22.1.0 | MIT | https://github.com/jsdom/jsdom.git | Unknown | Unknown
libphonenumber-js | 1.10.51 | MIT | https://gitlab.com/catamphetamine/libphonenumber-js.git | https://gitlab.com/catamphetamine/libphonenumber-js#readme | catamphetamine
mustache | 4.2.0 | MIT | https://github.com/janl/mustache.js.git | https://github.com/janl/mustache.js | mustache.js Authors
nanoid | 3.3.7 | MIT | https://github.com/ai/nanoid.git | Unknown | Andrey Sitnik
nanoid | 5.0.3 | MIT | https://github.com/ai/nanoid.git | Unknown | Andrey Sitnik
node-mailjet | 6.0.4 | MIT | https://github.com/mailjet/mailjet-apiv3-nodejs.git | https://github.com/mailjet/mailjet-apiv3-nodejs#readme | Mailjet
nanoid | 5.0.4 | MIT | https://github.com/ai/nanoid.git | Unknown | Andrey Sitnik
node-mailjet | 6.0.5 | MIT | https://github.com/mailjet/mailjet-apiv3-nodejs.git | https://github.com/mailjet/mailjet-apiv3-nodejs#readme | Mailjet
pathe | 1.1.1 | MIT | https://github.com/unjs/pathe.git | Unknown | Unknown
pino-pretty | 10.2.3 | MIT | ssh://[email protected]/pinojs/pino-pretty.git | https://github.com/pinojs/pino-pretty#readme | James Sumners
react | 18.2.0 | MIT | https://github.com/facebook/react.git | https://reactjs.org/ | Unknown
Expand All @@ -49,13 +49,13 @@ react-native-web | 0.19.9 | MIT | git://github.com/necolas/react-native-web.git
react-ux-form | 1.5.0 | MIT | https://github.com/swan-io/react-ux-form.git | https://github.com/swan-io/react-ux-form#readme | Mathieu Acthernoene
rifm | 0.12.1 | MIT | https://github.com/istarkov/rifm.git | Unknown | istarkov
shx | 0.3.4 | MIT | https://github.com/shelljs/shx.git | https://github.com/shelljs/shx#readme | Unknown
ts-pattern | 5.0.5 | MIT | ssh://[email protected]/gvergnaud/ts-pattern.git | https://github.com/gvergnaud/ts-pattern#readme | Gabriel Vergnaud
ts-pattern | 5.0.6 | MIT | ssh://[email protected]/gvergnaud/ts-pattern.git | https://github.com/gvergnaud/ts-pattern#readme | Gabriel Vergnaud
urql | 4.0.6 | MIT | https://github.com/urql-graphql/urql.git | https://formidable.com/open-source/urql/docs/ | urql GraphQL Contributors
uuid | 8.3.2 | MIT | https://github.com/uuidjs/uuid.git | Unknown | Unknown
uuid | 9.0.1 | MIT | https://github.com/uuidjs/uuid.git | Unknown | Unknown
valienv | 0.5.0 | MIT | https://github.com/zoontek/valienv.git | https://github.com/zoontek/valienv#readme | Mathieu Acthernoene
vite | 4.5.0 | MIT | https://github.com/vitejs/vite.git | https://github.com/vitejs/vite/tree/main/#readme | Evan You
vitest | 0.34.6 | MIT | https://github.com/vitest-dev/vitest.git | https://github.com/vitest-dev/vitest#readme | Anthony Fu
vite | 5.0.5 | MIT | https://github.com/vitejs/vite.git | https://vitejs.dev/ | Evan You
vitest | 1.0.1 | MIT | https://github.com/vitest-dev/vitest.git | https://github.com/vitest-dev/vitest#readme | Anthony Fu
wonka | 6.3.4 | MIT | https://github.com/0no-co/wonka | Unknown | 0no.co
@juggle/resize-observer | 3.4.0 | Apache-2.0 | ssh://[email protected]/juggle/resize-observer.git | https://juggle.studio/resize-observer/ | Juggle
@opentelemetry/api | 1.7.0 | Apache-2.0 | https://github.com/open-telemetry/opentelemetry-js.git | https://github.com/open-telemetry/opentelemetry-js/tree/main/api | OpenTelemetry Authors
Expand All @@ -72,5 +72,5 @@ wonka | 6.3.4 | MIT | https://github.com/0no-co/wonka | Unknown | 0no.co
picocolors | 1.0.0 | ISC | https://github.com/alexeyraspopov/picocolors.git | Unknown | Alexey Raspopov
type-fest | 0.21.3 | (MIT OR CC0-1.0) | https://github.com/sindresorhus/type-fest.git | https://sindresorhus.com | Sindre Sorhus
type-fest | 0.20.2 | (MIT OR CC0-1.0) | https://github.com/sindresorhus/type-fest.git | https://sindresorhus.com | Sindre Sorhus
type-fest | 1.4.0 | (MIT OR CC0-1.0) | https://github.com/sindresorhus/type-fest.git | https://sindresorhus.com | Sindre Sorhus
type-fest | 4.8.2 | (MIT OR CC0-1.0) | https://github.com/sindresorhus/type-fest.git | https://sindresorhus.com | Sindre Sorhus
type-fest | 3.13.1 | (MIT OR CC0-1.0) | https://github.com/sindresorhus/type-fest.git | https://sindresorhus.com | Sindre Sorhus
type-fest | 4.8.3 | (MIT OR CC0-1.0) | https://github.com/sindresorhus/type-fest.git | https://sindresorhus.com | Sindre Sorhus
24 changes: 12 additions & 12 deletions clients/banking/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,37 +21,37 @@
"@0no-co/graphql.web": "1.0.4",
"@formatjs/intl": "2.9.9",
"@juggle/resize-observer": "3.4.0",
"@sentry/react": "7.81.1",
"@sentry/react": "7.85.0",
"@swan-io/boxed": "1.2.0",
"@swan-io/chicane": "1.4.1",
"@swan-io/lake": "4.0.2",
"@swan-io/shared-business": "4.0.2",
"@urql/exchange-graphcache": "6.3.3",
"@swan-io/lake": "4.0.4",
"@swan-io/shared-business": "4.0.4",
"@urql/exchange-graphcache": "6.4.0",
"core-js": "3.33.3",
"dayjs": "1.11.10",
"iban": "0.0.14",
"libphonenumber-js": "1.10.51",
"nanoid": "5.0.3",
"nanoid": "5.0.4",
"react": "18.2.0",
"react-atomic-state": "1.2.7",
"react-dom": "18.2.0",
"react-native-web": "0.19.9",
"react-ux-form": "1.5.0",
"rifm": "0.12.1",
"ts-pattern": "5.0.5",
"ts-pattern": "5.0.6",
"urql": "4.0.6",
"wonka": "6.3.4"
},
"devDependencies": {
"@types/iban": "0.0.35",
"@types/react": "18.2.38",
"@types/react": "18.2.42",
"@types/react-dom": "18.2.17",
"@types/react-native": "0.72.7",
"@vitejs/plugin-legacy": "4.1.1",
"@types/react-native": "0.72.8",
"@vitejs/plugin-legacy": "5.2.0",
"@vitejs/plugin-react-swc": "3.5.0",
"jsdom": "22.1.0",
"type-fest": "4.8.2",
"vite": "4.5.0",
"vitest": "0.34.6"
"type-fest": "4.8.3",
"vite": "5.0.5",
"vitest": "1.0.1"
}
}
130 changes: 74 additions & 56 deletions clients/banking/src/components/AccountArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,13 +237,15 @@ export const AccountArea = ({ accountMembershipId }: Props) => {
hasTransactions,
identificationStatus,
accountHolderType: account?.holder.info.__typename,
verificationStatus: account?.holder.verificationStatus,
isIndividual,
requireFirstTransfer,
isLegalRepresentative: accountMembership?.legalRepresentative ?? false,
account,
})
.returnType<AccountActivationTag>()
// if payment level limitations have been lifted, no need for activation
.with({ verificationStatus: "Refused", isLegalRepresentative: true }, () => "refused")
.with(
{ account: { paymentLevel: "Unlimited", paymentAccountType: "PaymentService" } },
() => "none",
Expand Down Expand Up @@ -402,54 +404,57 @@ export const AccountArea = ({ accountMembershipId }: Props) => {
paymentMenuIsVisible,
cardMenuIsVisible,
memberMenuIsVisible,
}) => [
{
matchRoutes: ["AccountTransactionsArea"],
iconActive: "apps-list-filled",
icon: "apps-list-regular",
name: t("navigation.history"),
to: Router.AccountTransactionsListRoot({ accountMembershipId }),
hidden: !historyMenuIsVisible,
},
{
matchRoutes: ["AccountDetailsArea"],
iconActive: "building-bank-filled",
icon: "building-bank-regular",
name: t("navigation.account"),
to: Router.AccountDetailsIban({ accountMembershipId }),
hidden: !detailsMenuIsVisible,
},
{
matchRoutes: ["AccountPaymentsArea"],
iconActive: "arrow-swap-filled",
icon: "arrow-swap-regular",
name: t("navigation.transfer"),
to: Router.AccountPaymentsRoot({ accountMembershipId }),
hidden: !paymentMenuIsVisible,
},
{
matchRoutes: ["AccountCardsArea"],
iconActive: "payment-filled",
icon: "payment-regular",
name: t("navigation.cards"),
to: Router.AccountCardsList({ accountMembershipId }),
hidden: !cardMenuIsVisible,
},
{
matchRoutes: ["AccountMembersArea"],
iconActive: "people-filled",
icon: "people-regular",
name: t("navigation.members"),
to: Router.AccountMembersList({ accountMembershipId }),
hidden: !memberMenuIsVisible,
hasNotifications: Option.fromNullable(accountMembership.account)
.map(
({ accountMembershipsWithBindingUserError }) =>
accountMembershipsWithBindingUserError.totalCount > 0,
)
.getWithDefault(false),
},
],
}) =>
holder?.verificationStatus === "Refused"
? []
: [
{
matchRoutes: ["AccountTransactionsArea"],
iconActive: "apps-list-filled",
icon: "apps-list-regular",
name: t("navigation.history"),
to: Router.AccountTransactionsListRoot({ accountMembershipId }),
hidden: !historyMenuIsVisible,
},
{
matchRoutes: ["AccountDetailsArea"],
iconActive: "building-bank-filled",
icon: "building-bank-regular",
name: t("navigation.account"),
to: Router.AccountDetailsIban({ accountMembershipId }),
hidden: !detailsMenuIsVisible,
},
{
matchRoutes: ["AccountPaymentsArea"],
iconActive: "arrow-swap-filled",
icon: "arrow-swap-regular",
name: t("navigation.transfer"),
to: Router.AccountPaymentsRoot({ accountMembershipId }),
hidden: !paymentMenuIsVisible,
},
{
matchRoutes: ["AccountCardsArea"],
iconActive: "payment-filled",
icon: "payment-regular",
name: t("navigation.cards"),
to: Router.AccountCardsList({ accountMembershipId }),
hidden: !cardMenuIsVisible,
},
{
matchRoutes: ["AccountMembersArea"],
iconActive: "people-filled",
icon: "people-regular",
name: t("navigation.members"),
to: Router.AccountMembersList({ accountMembershipId }),
hidden: !memberMenuIsVisible,
hasNotifications: Option.fromNullable(accountMembership.account)
.map(
({ accountMembershipsWithBindingUserError }) =>
accountMembershipsWithBindingUserError.totalCount > 0,
)
.getWithDefault(false),
},
],
)
.getWithDefault([]);

Expand Down Expand Up @@ -673,14 +678,14 @@ export const AccountArea = ({ accountMembershipId }: Props) => {
const indexUrl: string = historyMenuIsVisible
? Router.AccountTransactionsListRoot({ accountMembershipId })
: detailsMenuIsVisible
? Router.AccountDetailsIban({ accountMembershipId })
: paymentMenuIsVisible
? Router.AccountPaymentsRoot({ accountMembershipId })
: cardMenuIsVisible
? Router.AccountCardsList({ accountMembershipId })
: memberMenuIsVisible
? Router.AccountMembersList({ accountMembershipId })
: "";
? Router.AccountDetailsIban({ accountMembershipId })
: paymentMenuIsVisible
? Router.AccountPaymentsRoot({ accountMembershipId })
: cardMenuIsVisible
? Router.AccountCardsList({ accountMembershipId })
: memberMenuIsVisible
? Router.AccountMembersList({ accountMembershipId })
: "";

if (accountMembership.user?.id !== user?.id) {
return <Redirect to={Router.ProjectRootRedirect()} />;
Expand All @@ -690,6 +695,19 @@ export const AccountArea = ({ accountMembershipId }: Props) => {
accountMembership.statusInfo.status !== "BindingUserError" &&
accountMembership.canManageAccountMembership;

if (holder?.verificationStatus === "Refused") {
return (
<AccountActivationPage
requireFirstTransfer={requireFirstTransfer}
accentColor={accentColor}
accountMembershipId={accountMembershipId}
additionalInfo={additionalInfo}
accountVisible={accountVisible}
projectName={projectName}
refetchAccountAreaQuery={refetchAccountAreaQuery}
/>
);
}
return (
<Suspense fallback={<LoadingView color={colors.current[500]} />}>
{match(route)
Expand Down
Loading

0 comments on commit 2104ec6

Please sign in to comment.