prevents parent assets from being bulk deleted#16315
prevents parent assets from being bulk deleted#16315Godmartinz wants to merge 9 commits intogrokability:developfrom
Conversation
PR Summary
|
|
I've escaped the asset tags and added an |
…r command" This reverts commit 784aec3.
|
You might need to add some logic to the individual delete buttons on the rows as well - down to help out, just let me know |
|
Dont think its possible to delete single assets via the GUI, the delete button is disabled. but I will look into the api EDIT: i take that back, you are right |
|
singular parent asset deletion has been handled as well #16380 |
|
Looks like we have some failing tests here - can you check that out? |
|
@Godmartinz Can you look into those failing tests? |
|
@snipe tests fixed 👍 |
|
I still don't really love the format of the error messaging on this. With a lot of results, that could end up looking pretty unwieldy. Can we chat about how we might be able to handle that? (Also a test is still failing.) |
|
Can we revisit this one soon? We still have a failing test, and I'd like to figure out how that messaging should maybe look. |
| //if assets are checked out, return a list of asset tags that would need to be checked in first. | ||
| $assetTags = $assignedAssets->pluck('asset_tag')->implode(', '); | ||
| return redirect($bulk_back_url)->with('error', trans_choice('admin/hardware/message.delete.assigned_to_error', $assignedAssets->count(), ['asset_tag' => $assetTags] )); | ||
| return redirect($bulk_back_url)->with('error-unescaped', $combinedErrorMessage); |
There was a problem hiding this comment.
Since we're escaping those tags as we're compiling the messages, we don't need to use the error-unescaped notification class.
|
I think I'd prefer messaging like: |
This adds prevention from deleting parent assets, assets that have other assets assigned to them. A error message will appear with the parent asset's tag that can be used to navigate and check in all attached assets.
#16261