-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(monitoraggio-caricamenti): WIP page monitoraggio caricamenti 202…
…41001
- Loading branch information
1 parent
3095f5b
commit 44f526d
Showing
10 changed files
with
834 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
116 changes: 116 additions & 0 deletions
116
fe-piattaforma/src/pages/administrator/MonitoraggioCaricamenti/dataReports.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
import React, { lazy, useEffect } from 'react'; | ||
import { Container } from 'design-react-kit'; | ||
import { | ||
Route, | ||
Routes, | ||
useLocation, | ||
useNavigate, | ||
useParams, | ||
} from 'react-router-dom'; | ||
import PageTitle from '../../../components/PageTitle/pageTitle'; | ||
import { useAppSelector } from '../../../redux/hooks'; | ||
import { selectDevice } from '../../../redux/features/app/appSlice'; | ||
import { LocationIndex } from '../../../components'; | ||
import { MenuRoutes } from '../../../utils/common'; | ||
const Monitoring = lazy(() => import('./monitoring')); | ||
// const Users = lazy(() => import('./Entities/Users/users')); | ||
// const Authorities = lazy(() => import('./Entities/Authorities/authorities')); | ||
import ProtectedComponent from '../../../hoc/AuthGuard/ProtectedComponent/ProtectedComponent'; | ||
|
||
interface PageTitleMockI { | ||
[key: string]: { | ||
title: string; | ||
textCta?: string; | ||
iconCta?: string; | ||
}; | ||
} | ||
|
||
export const PageTitleMock: PageTitleMockI = { | ||
'/report-dati/monitoraggio-caricamenti-massivi': { | ||
title: 'Monitoraggio dei caricamenti massivi', | ||
textCta: 'Monitoraggio dei caricamenti massivi', | ||
iconCta: 'it-plus', | ||
} | ||
}; | ||
|
||
const tabs = [ | ||
{ | ||
label: 'Programmi', | ||
path: '/report-dati/monitoraggio-caricamenti-massivi', | ||
id: 'tab-dashboard', | ||
} | ||
]; | ||
|
||
const DataReports = () => { | ||
//const [activeTab, setActiveTab] = useState(tabs.at(0)); | ||
const location = useLocation(); | ||
const navigate = useNavigate(); | ||
const { entityId } = useParams(); | ||
|
||
const updateActiveTab = () => { | ||
if (location.pathname.split('/').length <= 2 && tabs.at(0)?.path) { | ||
navigate(tabs.at(0)?.path ?? '', { | ||
replace: false, | ||
}); | ||
} | ||
/* setActiveTab( | ||
tabs.at(tabs.findIndex((tab) => tab.path === location.pathname) || 0) | ||
); */ | ||
}; | ||
|
||
useEffect(() => { | ||
updateActiveTab(); | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, [location]); | ||
|
||
const device = useAppSelector(selectDevice); | ||
|
||
const noDetailRoute = MenuRoutes.find( | ||
(x) => x.id === 'tab-dashboard' | ||
)?.subRoutes?.some((y) => y.path === location.pathname); | ||
|
||
return ( | ||
<> | ||
{/* | ||
<div className='mb-5 mt-3'> | ||
<TabGroup arrayTabs={tabs} activeTab={activeTab?.id} /> | ||
</div> | ||
*/} | ||
{device.mediaIsPhone && noDetailRoute && ( | ||
<div className='mt-2 px-3'> | ||
<LocationIndex | ||
title='Area amministrativa' | ||
routes={ | ||
MenuRoutes.find((x) => x.id === 'tab-dashboard')?.subRoutes || [] | ||
} | ||
/> | ||
</div> | ||
)} | ||
|
||
{location?.pathname && | ||
location?.pathname !== '/report-dati/questionari' && | ||
!entityId ? ( | ||
<PageTitle {...PageTitleMock[location?.pathname]} /> | ||
) : null} | ||
|
||
<Container> | ||
<Routes>{DataReportsRoutes}</Routes> | ||
</Container> | ||
{/* <ManageUsers /> */} | ||
</> | ||
); | ||
}; | ||
|
||
export default DataReports; | ||
|
||
const DataReportsRoutes = [ | ||
<Route | ||
key='monitoring' | ||
path='monitoraggio-caricamenti-massivi' | ||
element={ | ||
<ProtectedComponent visibleTo={['tab.dshb']}> | ||
<Monitoring /> | ||
</ProtectedComponent> | ||
} | ||
/> | ||
]; |
64 changes: 64 additions & 0 deletions
64
fe-piattaforma/src/pages/administrator/MonitoraggioCaricamenti/monitoring.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
.custom-accordion { | ||
span { | ||
color: #5C6F82; | ||
} | ||
} | ||
|
||
.results { | ||
font-family: Titillium Web; | ||
font-size: 24px; | ||
font-weight: 400; | ||
line-height: 36px; | ||
text-align: left; | ||
color: #0066CC; | ||
} | ||
|
||
.statisticheValue { | ||
font-size: 28px; | ||
font-weight: 600; | ||
line-height: 40px; | ||
text-align: left; | ||
color: white; | ||
width: 32px; | ||
height: 40px; | ||
gap: 0px; | ||
opacity: 0px; | ||
padding-left: 15px; | ||
position: relative; | ||
top: -2px; // Adjust this value as needed to move it upwards | ||
} | ||
|
||
.statisticheDescrizione { | ||
color: white; | ||
font-size: 22px; | ||
font-weight: 300; | ||
line-height: 24px; | ||
text-align: left; | ||
padding-left: 10px; | ||
position: relative; | ||
top: -2px; // Adjust this value as needed to move it upwards | ||
} | ||
|
||
.square { | ||
width: 275px; | ||
height: 80px; | ||
padding: 20px 0px 0px 0px; | ||
gap: 10px; | ||
border-radius: 10px; // All four corners rounded | ||
opacity: 0px; | ||
background: #435A70; | ||
} | ||
|
||
.square-container { | ||
display: flex; | ||
justify-content: space-between; | ||
width: Fixed (1,184px)px; | ||
height: Hug (80px)px; | ||
top: 1167px; | ||
left: 50px; | ||
gap: 30px; | ||
opacity: 0px; | ||
margin-bottom: 50px; | ||
margin-top: 20px; | ||
} | ||
|
Oops, something went wrong.