import { useBackend } from '../backend'; import { Button, LabeledList, Section, Table } from '../components'; import { NtosWindow } from '../layouts'; import { filter } from 'common/collections'; import { Fragment } from 'inferno'; export const NtosDigitalWarrant = (props, context) => { const { act, data } = useBackend(context); const { warrantname, warrantcharges, warrantauth, type, allwarrants } = data; let body = ; if (warrantauth) { body = ; } return ( {body} ); }; const AllWarrants = (props, context) => { const { act, data } = useBackend(context); const { allwarrants } = data; return (
); }; const WarrantList = (props, context) => { const { act, data } = useBackend(context); const { type } = props; const { allwarrants } = data; const ourWarrants = filter((w) => w.arrestsearch === type)(allwarrants); return ( {type === 'arrest' ? 'Name' : 'Location'} {type === 'arrest' ? 'Charges' : 'Reason'} Authorized By Edit {(ourWarrants.length && ourWarrants.map((warrant) => ( {warrant.warrantname} {warrant.charges} {warrant.auth}
); }; const ActiveWarrant = (props, context) => { const { act, data } = useBackend(context); const { warrantname, warrantcharges, warrantauth, type } = data; const isArrest = type === 'arrest'; const warrantnameLabel = type === 'arrest' ? 'Name' : 'Location'; const warrantchargesLabel = type === 'arrest' ? 'Charges' : 'Reason'; return (
}>
); };