[x] When creating a rent a query should be run that checks if the device is already in use somewhere else.
[x] The search endpoints should be updated with an aditional arguement wheter you want all or just available
[x] this can be nicely by just using the exsting json and providing optional keys
[x] the existing searchwithdevicetype method in the device resource should be merged into the search method with the devicetype beeing another queryParam
[x] the search options should be a DTO in the backend and an interface in the frontend
the current implementation of the availability check is incredibly weird
two speperate implementations exist: one in the Rent repo one in the Device repo
i cleaned up the one in the device repo (was mapping to rentDTO and using unnecessary sql
[x] please remove the unneeded isDeviceAlreadyInUse method in the rent repo
[x] the filtering of search results in the device repo is incredibly weird and inefficient
- [ ] two ifs check for the same type_id > 0 condition
[x] the availabilty check is not included in the sql query but done later on by looping over the result and creating a new query to filter out every singel entry