Skip to content

Commit

Permalink
Merge branch 'Demo_branch' of https://github.com/catenax-ng/tx-demand…
Browse files Browse the repository at this point in the history
…-capacity-mgmt into Demo_branch
  • Loading branch information
OSousa117 committed Oct 26, 2023
2 parents bf6e97e + 4d2ae90 commit f510fe5
Show file tree
Hide file tree
Showing 4 changed files with 147 additions and 144 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import React from 'react';
import Button from 'react-bootstrap/Button';
import Form from 'react-bootstrap/Form';
import { FaSearch } from 'react-icons/fa';

type DemandsSearchProps = {
searchQuery: string;
Expand All @@ -40,7 +41,7 @@ const DemandsSearch: React.FC<DemandsSearchProps> = ({ searchQuery, setSearchQue
value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)}
/>
<Button variant="outline-secondary">Search</Button>
<Button variant="outline-secondary"><FaSearch size={18} /></Button>
</Form>

);
Expand Down
54 changes: 28 additions & 26 deletions demand-capacity-mgmt-frontend/src/components/dcm/AppComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@
*/

import React from 'react';
import {Route, Routes} from "react-router-dom";
import { Route, Routes } from "react-router-dom";
import CapacityGroupsProvider from '../../contexts/CapacityGroupsContextProvider';
import DemandContextProvider from '../../contexts/DemandContextProvider';
import EventsContextProvider from '../../contexts/EventsContextProvider';
import FavoritesContextProvider from "../../contexts/FavoritesContextProvider";
import AuthenticatedRoute from "../../util/AuthenticatedRoute";
import QuickAcessItems from '../common/QuickAcessItems';
import AlertsPage from '../pages/AlertsPage';
Expand All @@ -34,32 +35,31 @@ import Home from "../pages/CapacityGroupPage";
import DownStatusPage from '../pages/DownStatusPage';
import ErrorPage from '../pages/ErrorPage';
import EventsPage from "../pages/EventsPage";
import FavoritesPage from "../pages/FavoritesPage";
import TodoListPage from '../pages/TodoListPage';
import UpStatusPage from '../pages/UpStatusPage';
import Layout from './Layout';
import FavoritesPage from "../pages/FavoritesPage";
import FavoritesContextProvider from "../../contexts/FavoritesContextProvider";


const AppComponent: React.FC = () => {
return (
<Routes>
<Route path="/login" element={<AuthenticationComponent/>}/>
<Route path="*" element={<ErrorPage/>}/>
<Route path="/login" element={<AuthenticationComponent />} />
<Route path="*" element={<ErrorPage />} />

<Route path="/" element={

<AuthenticatedRoute>
<FavoritesContextProvider>
<DemandContextProvider>
<Layout>
<Home/>
<QuickAcessItems/>
<Home />
<QuickAcessItems />
</Layout></DemandContextProvider>
</FavoritesContextProvider>
</AuthenticatedRoute>

}/>
} />

<Route path="/details/:id" element={
<AuthenticatedRoute>
Expand All @@ -68,91 +68,93 @@ const AppComponent: React.FC = () => {
<Layout>
<CapacityGroupsProvider>
<EventsContextProvider>
<CapacityGroupDetailsPage/>
<CapacityGroupDetailsPage />
</EventsContextProvider>
</CapacityGroupsProvider>
</Layout></DemandContextProvider>
</FavoritesContextProvider>
</AuthenticatedRoute>
}/>
} />
<Route path="/alerts" element={
<AuthenticatedRoute>
<FavoritesContextProvider>
<DemandContextProvider>
<Layout>
<EventsContextProvider>
<AlertsPage/>
<AlertsPage />
</EventsContextProvider>
</Layout>
</DemandContextProvider>
</FavoritesContextProvider>
</AuthenticatedRoute>
}/>
} />
<Route path="/up" element={
<AuthenticatedRoute>
<FavoritesContextProvider>
<DemandContextProvider>
<Layout>
<EventsContextProvider>
<UpStatusPage/>
<UpStatusPage />
</EventsContextProvider>
</Layout>
</DemandContextProvider>
</FavoritesContextProvider>
</AuthenticatedRoute>
}/>
} />
<Route path="/down" element={
<AuthenticatedRoute>
<FavoritesContextProvider>
<DemandContextProvider>
<Layout>
<EventsContextProvider>
<DownStatusPage/>
<DownStatusPage />
</EventsContextProvider>
</Layout>
</DemandContextProvider>
</FavoritesContextProvider>
</AuthenticatedRoute>
}/>
} />
<Route path="/todo" element={
<AuthenticatedRoute>
<FavoritesContextProvider>
<DemandContextProvider>
<Layout>
<EventsContextProvider>
<TodoListPage/>
<TodoListPage />
</EventsContextProvider>
</Layout>
</DemandContextProvider>
</FavoritesContextProvider>
</AuthenticatedRoute>
}/>
} />

<Route path="/events" element={
<AuthenticatedRoute>
<FavoritesContextProvider>
<DemandContextProvider>
<Layout>
<EventsContextProvider>
<EventsPage/>
<EventsPage />
</EventsContextProvider>
</Layout>
</DemandContextProvider>
</FavoritesContextProvider>
</AuthenticatedRoute>
}/>
} />

<Route path="/favorites" element={
<AuthenticatedRoute>
<DemandContextProvider>
<Layout>
<FavoritesContextProvider>
<FavoritesPage/>
</FavoritesContextProvider>
</Layout>
<FavoritesContextProvider>
<Layout>

<FavoritesPage />

</Layout>
</FavoritesContextProvider>
</DemandContextProvider>
</AuthenticatedRoute>
}/>
} />
</Routes>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ const EditForm: React.FC<EditFormProps> = ({ theDemand, onCloseModal }) => {

<Button variant="primary" type="submit">
<div style={{ display: "flex", justifyContent: "center" }}>
<FiSave size={23} /> Save Changes
<FiSave size={23} style={{ margin: " 0 12 0 0px" }} /> Save Changes
</div>
</Button>
</Form>
Expand Down
Loading

0 comments on commit f510fe5

Please sign in to comment.