Add "Historial" page and update navigation to support new view
Introduced the `HistoryPage` component for viewing request history. Updated navigation and dynamic header title logic to include the new "history" view. Adjusted `App.js` to handle the new view state and display `HistoryPage`.
This commit is contained in:
@@ -6,6 +6,7 @@ import RequestTable from './components/Requests/RequestTable';
|
|||||||
import RequestForm from './components/Requests/RequestForm';
|
import RequestForm from './components/Requests/RequestForm';
|
||||||
import ScheduledPage from './components/Scheduled/ScheduledPage';
|
import ScheduledPage from './components/Scheduled/ScheduledPage';
|
||||||
import NewRequestPage from './components/Requests/NewRequestPage';
|
import NewRequestPage from './components/Requests/NewRequestPage';
|
||||||
|
import HistoryPage from './components/History/HistoryPage';
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
|
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
|
||||||
@@ -21,6 +22,8 @@ function App() {
|
|||||||
? 'Solicitudes Programadas'
|
? 'Solicitudes Programadas'
|
||||||
: activeView === 'create'
|
: activeView === 'create'
|
||||||
? 'Nueva Solicitud'
|
? 'Nueva Solicitud'
|
||||||
|
: activeView === 'history'
|
||||||
|
? 'Historial'
|
||||||
: 'Dashboard';
|
: 'Dashboard';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -37,6 +40,8 @@ function App() {
|
|||||||
<ScheduledPage />
|
<ScheduledPage />
|
||||||
) : activeView === 'create' ? (
|
) : activeView === 'create' ? (
|
||||||
<NewRequestPage />
|
<NewRequestPage />
|
||||||
|
) : activeView === 'history' ? (
|
||||||
|
<HistoryPage />
|
||||||
) : (
|
) : (
|
||||||
<section className="content-wrapper">
|
<section className="content-wrapper">
|
||||||
<DashboardCards />
|
<DashboardCards />
|
||||||
|
|||||||
27
src/components/History/HistoryPage.js
Normal file
27
src/components/History/HistoryPage.js
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import '../../styles/components.css';
|
||||||
|
import RequestTable from '../Requests/RequestTable';
|
||||||
|
|
||||||
|
const HistoryPage = () => {
|
||||||
|
return (
|
||||||
|
<section className="content-wrapper">
|
||||||
|
<div className="card" style={{ marginBottom: 24 }}>
|
||||||
|
<div className="form-header">
|
||||||
|
<h3>
|
||||||
|
<i className="fas fa-history"></i>
|
||||||
|
Historial de Solicitudes
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<p style={{ color: 'var(--gray)' }}>
|
||||||
|
Consulta el registro de ejecuciones recientes y su estado.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="content-grid">
|
||||||
|
<RequestTable />
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default HistoryPage;
|
||||||
Reference in New Issue
Block a user