From 34e0325f37b0190163efd62bb765529eec932328 Mon Sep 17 00:00:00 2001 From: Matt DiMeglio Date: Sun, 10 Aug 2025 10:14:56 -0400 Subject: [PATCH] fix formatting --- app/incidents.jsx | 298 +++++++++++++++++++++++----------------------- 1 file changed, 149 insertions(+), 149 deletions(-) diff --git a/app/incidents.jsx b/app/incidents.jsx index dcd1768..b8eb1e5 100644 --- a/app/incidents.jsx +++ b/app/incidents.jsx @@ -6,8 +6,8 @@ import { Platform, Linking, View, ScrollView, Text, TouchableOpacity } from 'rea import { StatusBar } from 'expo-status-bar'; import { SafeAreaView } from 'react-native-safe-area-context'; import { - PageHeader, - PageFooter, + PageHeader, + PageFooter, } from '@/components/generalHelpers.jsx'; import { Ionicons } from '@expo/vector-icons'; import { AccidentAndEmergency } from "healthicons-react-native/dist/outline"; @@ -20,41 +20,41 @@ export default function Incidents() { const callFeed = useCallFeed(); const { - departments, - callIconMap, - callDetails, - callColorSelector, - formatCallTimePast, - formatCallDateTime + departments, + callIconMap, + callDetails, + callColorSelector, + formatCallTimePast, + formatCallDateTime } = callFeed; const sortedAndFilteredCalls = callDetails - .sort((a, b) => new Date(b.timestamp) - new Date(a.timestamp)) - .filter((item, index, self) => { - return index === self.findIndex(i => { - return `${i?.data?.Incident?.IncID}${i?.data?.Response?.ServiceName}` === `${item?.data?.Incident?.IncID}${item?.data?.Response?.ServiceName}` - }); + .sort((a, b) => new Date(b.timestamp) - new Date(a.timestamp)) + .filter((item, index, self) => { + return index === self.findIndex(i => { + return `${i?.data?.Incident?.IncID}${i?.data?.Response?.ServiceName}` === `${item?.data?.Incident?.IncID}${item?.data?.Response?.ServiceName}` }); + }); const { - departmentTypeMap, - accountDetails, - deptList, - setDeptList, - selectedDepartment, - setSelectedDepartment, - updateSelectedDepartment, - selectedDepartmentColorPicker, + departmentTypeMap, + accountDetails, + deptList, + setDeptList, + selectedDepartment, + setSelectedDepartment, + updateSelectedDepartment, + selectedDepartmentColorPicker, } = departments; return ( - - @@ -88,11 +88,11 @@ export default function Incidents() { - - - - {sortedAndFilteredCalls?.length ? ( - sortedAndFilteredCalls?.map((callItem, index) => { + + + + {sortedAndFilteredCalls?.length ? ( + sortedAndFilteredCalls?.map((callItem, index) => { const { data: call, timestamp } = callItem; const { Incident, Address, Response } = call; const { @@ -115,8 +115,8 @@ export default function Incidents() { } = Response; const SelectedIcon = callIconMap[IncNature] || AccidentAndEmergency; return ( - { router.push({ @@ -127,14 +127,14 @@ export default function Incidents() { }) }} > - {formatCallDateTime(IncDate)} @@ -159,9 +159,9 @@ export default function Incidents() { name="lock-closed-outline" color='red' style={{ - shadowColor: 'black', + shadowColor: 'black', shadowOffset: 0, - shadowOpacity: 1, + shadowOpacity: 1, shadowRadius: 10 }} /> @@ -169,53 +169,53 @@ export default function Incidents() { - {LocationName ? ( - - {`${LocationName}`} - + + {`${LocationName}`} + ) : ( - {`${StreetAddress}`} {AddressApartment ? ( - {` - ${AddressApartment}`} - ) : null } - @@ -223,26 +223,26 @@ export default function Incidents() { )} - {`${IncNature}`} - {`${IncNatureCodeDesc}`} @@ -250,14 +250,14 @@ export default function Incidents() { - - - + + + @@ -277,82 +277,82 @@ export default function Incidents() { ) })) : ( - There are no Calls - ) } + There are no Calls + )} - - - + + - - + + > - {deptList?.map((item) => { - return ( - - { - actionSheetRef.current?.hide(); - return updateSelectedDepartment( - selectedDepartment?.deptId, - item?.deptId - ) - }} - > - - - {item?.dept} - - {item?.primary ? : null} - - {`${item?.deptAbv} - ${departmentTypeMap[item?.type]}`} - - - ); - })} + {deptList?.map((item) => { + return ( + + { + actionSheetRef.current?.hide(); + return updateSelectedDepartment( + selectedDepartment?.deptId, + item?.deptId + ) + }} + > + + + {item?.dept} + + {item?.primary ? : null} + + {`${item?.deptAbv} - ${departmentTypeMap[item?.type]}`} + + + ); + })} - + ) } \ No newline at end of file