Skip to content

Commit

Permalink
Update executeJobModal.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
and189 authored Nov 29, 2023
1 parent c898231 commit 02c8909
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/client/src/app/jobs/executeJobModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ export const ExecuteJobModal: React.FC<ExecuteJobModalProps> = ({ closeModal, de
const [selectedDevices, setSelectedDevices] = useState<Selection>();
const [search, setSearch] = useState('');

const filteredDevices = useMemo(() => {
return devices?.filter(device =>
device.deviceId?.includes(search) || device.origin?.includes(search)
) || [];
}, [devices, search]);
const filteredDevices = useMemo(() => {

Check failure on line 19 in packages/client/src/app/jobs/executeJobModal.tsx

View workflow job for this annotation

GitHub Actions / Nx Cloud - Main Job / Run

Insert `··`
return devices?.filter(device =>

Check failure on line 20 in packages/client/src/app/jobs/executeJobModal.tsx

View workflow job for this annotation

GitHub Actions / Nx Cloud - Main Job / Run

Replace `return·devices?.filter(device·=>⏎····device.deviceId?.includes(search)·||·device.origin?.includes(search)⏎··` with `··return·devices?.filter((device)·=>·device.deviceId?.includes(search)·||·device.origin?.includes(search)`
device.deviceId?.includes(search) || device.origin?.includes(search)
) || [];
}, [devices, search]);

Check failure on line 23 in packages/client/src/app/jobs/executeJobModal.tsx

View workflow job for this annotation

GitHub Actions / Nx Cloud - Main Job / Run

Replace `},·[devices,·search]);⏎` with `··},·[devices,·search]);`


const executeJob = async ({ deviceIds }: { deviceIds: string[] | number[] }) => {
const promise = fetch(`/api/job/execute/${jobId}/${deviceIds.join()}`, { method: 'POST' }).then(
Expand Down

0 comments on commit 02c8909

Please sign in to comment.