Skip to content

Commit

Permalink
Merge pull request #153 from AppQuality/develop
Browse files Browse the repository at this point in the history
new release
  • Loading branch information
d-beezee authored Jul 2, 2024
2 parents f8780b8 + 2054795 commit 31f81c7
Show file tree
Hide file tree
Showing 52 changed files with 595 additions and 892 deletions.
17 changes: 8 additions & 9 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import AdminPayments from "src/pages/Payments";
import Create from "src/pages/Popups/Create";
import List from "src/pages/Popups/List";
import Update from "src/pages/Popups/Update";
import CampaignPreselection from "src/pages/campaigns/preselectionForm";
import NewPreselectionForm from "src/pages/preselectionForms/new";
import EditPreselectionForm from "src/pages/preselectionForms/edit";
import { setupStore } from "src/store";
import { PageTemplate } from "./features/PageTemplate";
import SentryWrapper from "./features/SentryWrapper";
import Jotform from "./pages/Jotform";
import Prospect from "./pages/Prospect";
import UxDashboard from "./pages/UxDashboard";
import AgreementsList from "./pages/agreements/list";
Expand All @@ -23,7 +23,7 @@ import Campaigns from "./pages/campaigns";
import NewCampaign from "./pages/campaigns/new";
import NewCampaignSuccess from "./pages/campaigns/new/Success";
import EditCampaign from "./pages/campaigns/edit";
import CampaignPreselectionList from "./pages/campaigns/preselectionFormList";
import CampaignPreselectionList from "./pages/preselectionForms";
import SelectionPage from "./pages/campaigns/selection";

const SentryRoute = Sentry.withSentryRouting(Route);
Expand All @@ -49,17 +49,16 @@ function App() {
path="/backoffice/payments"
component={AdminPayments}
/>
<SentryRoute path="/backoffice/jotform" component={Jotform} />
<SentryRoute
path="/backoffice/campaigns/preselection-forms/new"
component={CampaignPreselection}
path="/backoffice/preselection-forms/new"
component={NewPreselectionForm}
/>
<SentryRoute
path="/backoffice/campaigns/preselection-forms/:id"
component={CampaignPreselection}
path="/backoffice/preselection-forms/:id"
component={EditPreselectionForm}
/>
<SentryRoute
path="/backoffice/campaigns/preselection-forms"
path="/backoffice/preselection-forms"
component={CampaignPreselectionList}
/>
<SentryRoute
Expand Down
10 changes: 7 additions & 3 deletions src/features/AuthorizedOnlyContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { Container } from "@appquality/appquality-design-system";
import React from "react";
import ErrorUnauthorized from "src/features/ErrorUnauthorized/ErrorUnauthorized";
import useUserData from "src/pages/Jotform/useUserData";
import { useGetUsersMeQuery } from "src/services/tryberApi";

export const AuthorizedOnlyContainer: React.FC<{
excludeRule: boolean;
children: React.ReactNode;
isFluid?: boolean;
}> = ({ children, excludeRule, isFluid }) => {
const { isFetching, isError, isLoading } = useUserData();
const { isError, isFetching, isLoading } = useGetUsersMeQuery({
fields: "role",
});
if (isLoading || isFetching) return <Container>loading...</Container>;
if (isError) return <Container>there was an error</Container>;
if (excludeRule)
Expand All @@ -23,7 +25,9 @@ export const AuthorizedOnlyContainer: React.FC<{
export const OpsUserContainer: React.FC<{ children: React.ReactNode }> = ({
children,
}) => {
const { data } = useUserData();
const { data } = useGetUsersMeQuery({
fields: "role",
});
return (
<AuthorizedOnlyContainer
excludeRule={data?.role === "tester" || data?.role === "subscriber"}
Expand Down
61 changes: 0 additions & 61 deletions src/pages/Jotform/CufConfigurator/CufConfigurator.tsx

This file was deleted.

51 changes: 0 additions & 51 deletions src/pages/Jotform/CufConfigurator/CufConfiguratorCard.tsx

This file was deleted.

43 changes: 0 additions & 43 deletions src/pages/Jotform/CufConfigurator/CufTextField.tsx

This file was deleted.

43 changes: 0 additions & 43 deletions src/pages/Jotform/CufConfigurator/FocusError.tsx

This file was deleted.

10 changes: 0 additions & 10 deletions src/pages/Jotform/CufConfigurator/FormTitleCard.tsx

This file was deleted.

This file was deleted.

75 changes: 0 additions & 75 deletions src/pages/Jotform/CufConfigurator/useSubmitValues.ts

This file was deleted.

Loading

0 comments on commit 31f81c7

Please sign in to comment.