39462-vm/frontend/src/pages/obligations/obligations-view.tsx
2026-04-04 18:02:49 +00:00

23 lines
779 B
TypeScript

import React, { ReactElement } from 'react';
import LayoutAuthenticated from '../../layouts/Authenticated';
import { fetch } from '../../stores/obligations/obligationsSlice';
import EntityRecordViewPage from '../../components/EntityPage/EntityRecordViewPage';
const ObligationsView = () => (
<EntityRecordViewPage
singularLabel="Obligation"
pluralLabel="Obligations"
stateKey="obligations"
recordKey="obligations"
fetchRecord={fetch}
listHref="/obligations/obligations-list"
editHref={(id) => `/obligations/obligations-edit/?id=${id ?? ''}`}
/>
);
ObligationsView.getLayout = function getLayout(page: ReactElement) {
return <LayoutAuthenticated permission={'READ_OBLIGATIONS'}>{page}</LayoutAuthenticated>;
};
export default ObligationsView;