made some changes in the bin sensors to open a new dialog when the component being removed is the last one for a device so users can remove the device from the bin along with the component

This commit is contained in:
csawatzky 2026-04-14 15:29:59 -06:00
parent da5ef99a3e
commit 0556fe2d8b
5 changed files with 121 additions and 17 deletions

View file

@ -269,7 +269,7 @@ export default function Bin(props: Props) {
resp.data.devices.forEach((dev: any) => {
let device = Device.create(dev);
if (attachedDevIds.includes(device.id())) {
devs.push(Device.create(dev));
devs.push(device);
}
});
setDevices(devs);
@ -674,6 +674,8 @@ export default function Bin(props: Props) {
userID={user.id()}
components={components}
setComponents={setComponents}
componentDevices={componentDevices}
setComponentDevices={setComponentDevices}
updateBinStatus={updateStatus}
/>
</Grid>