Skip to content

Commit

Permalink
Merge pull request #819 from NewtonMutugi/feat/new-reporting-layer
Browse files Browse the repository at this point in the history
Added Tafsiri Self service tool
  • Loading branch information
NewtonMutugi authored Jul 18, 2024
2 parents 181c94b + b07a589 commit 20c4174
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 19 deletions.
7 changes: 5 additions & 2 deletions src/containers/DefaultLayout/DefaultHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const DefaultHeader = () => {
setCookie('metabase.SESSION', sessionId, { path: '/' });
}
}
}, []);
}, []);
const login = async () => {
const res = await getUserType();
if (user && !user.expired) {
Expand Down Expand Up @@ -62,7 +62,7 @@ const DefaultHeader = () => {
const clearCacheData = async () => {
await localStorage.clear();
if (localStorage.length === 0){
alert('Complete Cache Cleared');
alert('Complete Cache Cleared');
window.location.reload();
}
};
Expand Down Expand Up @@ -212,6 +212,9 @@ const Adhoc = () => {
>
<strong>Superset</strong>
</DropdownItem>
<DropdownItem disabled={false} tag={Link} to="/tafsiri">
<strong>TAFSIRI</strong>
</DropdownItem>
</DropdownMenu>
</UncontrolledDropdown>
);
Expand Down
86 changes: 69 additions & 17 deletions src/routes.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,73 @@
import Loadable from 'react-loadable';
import withTracker from './withTracker';
import Loading from './views/Shared/Loading';
import { LOADING_DELAY } from "./constants";
import { LOADING_DELAY } from './constants';

const Home = Loadable({ loader: () => import('./views/Home/Home'), loading: Loading, delay: LOADING_DELAY });
const RR = Loadable({ loader: () => import('./views/RR/RR'), loading: Loading, delay: LOADING_DELAY });
const HTS = Loadable({ loader: () => import('./views/HTS/HTS'), loading: Loading, delay: LOADING_DELAY });
const CT = Loadable({ loader: () => import('./views/CT/CT'), loading: Loading, delay: LOADING_DELAY });
const SD = Loadable({ loader: () => import('./views/ServiceDesk/ServiceDesk'), loading: Loading, delay: LOADING_DELAY });
const OperationalHIS = Loadable({ loader: () => import('./views/Operational&HIS/OperationalHIS'), loading: Loading, delay: LOADING_DELAY });
const PMTCTRRI = Loadable({ loader: () => import('./views/PMTCTRRI/PMTCTRRI'), loading: Loading, delay: LOADING_DELAY,});
const GIS = Loadable({ loader: () => import('./views/GIS/GIS'), loading: Loading, delay: LOADING_DELAY });
const HRH = Loadable({ loader: () => import('./views/HRH/HRH'), loading: Loading, delay: LOADING_DELAY });
const Resources = Loadable({ loader: () => import('./views/Resources/Resources'), loading: Loading, delay: LOADING_DELAY });
const Organizations = Loadable({ loader: () => import('./views/Administration/Organizations/Organizations'), loading: Loading, delay: LOADING_DELAY });
const Profile = Loadable({ loader: () => import('./views/Users/Profile'), loading: Loading, delay: LOADING_DELAY });
const Tafsiri = Loadable({ loader: () => import('./views/Tafsiri/Tafsiri'), loading: Loading, delay: LOADING_DELAY });
const Home = Loadable({
loader: () => import('./views/Home/Home'),
loading: Loading,
delay: LOADING_DELAY,
});
const RR = Loadable({
loader: () => import('./views/RR/RR'),
loading: Loading,
delay: LOADING_DELAY,
});
const HTS = Loadable({
loader: () => import('./views/HTS/HTS'),
loading: Loading,
delay: LOADING_DELAY,
});
const CT = Loadable({
loader: () => import('./views/CT/CT'),
loading: Loading,
delay: LOADING_DELAY,
});
const SD = Loadable({
loader: () => import('./views/ServiceDesk/ServiceDesk'),
loading: Loading,
delay: LOADING_DELAY,
});
const OperationalHIS = Loadable({
loader: () => import('./views/Operational&HIS/OperationalHIS'),
loading: Loading,
delay: LOADING_DELAY,
});
const PMTCTRRI = Loadable({
loader: () => import('./views/PMTCTRRI/PMTCTRRI'),
loading: Loading,
delay: LOADING_DELAY,
});
const GIS = Loadable({
loader: () => import('./views/GIS/GIS'),
loading: Loading,
delay: LOADING_DELAY,
});
const HRH = Loadable({
loader: () => import('./views/HRH/HRH'),
loading: Loading,
delay: LOADING_DELAY,
});
const Resources = Loadable({
loader: () => import('./views/Resources/Resources'),
loading: Loading,
delay: LOADING_DELAY,
});
const Organizations = Loadable({
loader: () => import('./views/Administration/Organizations/Organizations'),
loading: Loading,
delay: LOADING_DELAY,
});
const Profile = Loadable({
loader: () => import('./views/Users/Profile'),
loading: Loading,
delay: LOADING_DELAY,
});
const Tafsiri = Loadable({
loader: () => import('./views/Tafsiri/Tafsiri'),
loading: Loading,
delay: LOADING_DELAY,
});

const routes = [
{
Expand Down Expand Up @@ -112,9 +164,9 @@ const routes = [
path: '/tafsiri',
exact: true,
name: 'TAFSIRI',
private: false,
component: withTracker(Tafsiri)
}
private: true,
component: withTracker(Tafsiri),
},
];

export default routes;

0 comments on commit 20c4174

Please sign in to comment.