import { Fragment } from 'inferno'; import { useBackend } from '../backend'; import { Box, Button, Flex, Input, LabeledList, Section, Tabs } from '../components'; import { ComplexModal, modalOpen } from '../interfaces/common/ComplexModal'; import { Window } from '../layouts'; import { LoginInfo } from './common/LoginInfo'; import { LoginScreen } from './common/LoginScreen'; import { TemporaryNotice } from './common/TemporaryNotice'; const doEdit = (context, field) => { modalOpen(context, 'edit', { field: field.edit, value: field.value, }); }; export const SecurityRecords = (_properties, context) => { const { data } = useBackend(context); const { authenticated, screen } = data; if (!authenticated) { return ( ); } let body; if (screen === 2) { // List Records body = ; } else if (screen === 3) { // Record Maintenance body = ; } else if (screen === 4) { // View Records body = ; } return (
{body}
); }; const SecurityRecordsList = (_properties, context) => { const { act, data } = useBackend(context); const { records } = data; return ( act('search', { t1: value })} /> {records.map((record, i) => ( ); }; const SecurityRecordsViewSecurity = (_properties, context) => { const { act, data } = useBackend(context); const { security } = data; if (!security || !security.fields) { return ( Security records lost!