Copy function for devices / platforms
As we discussed on the presentation of the sms for the datahub vc, we want to have a copy function, so that user can reuse an existing platform / device for another instance (think of multiple devices to measure wind for example; one that we want to put on the zeitlow station, one on the boeken station; both share a lot of entries, but differ in inventory number, pid, or serial number for example).
Currently we only have a button for this functionality, but no page/dialog, nor even an idea on how to deal with it.
So here is my suggestion:
- clicking on the copy button will open the very same page as for editing a device/platform
- the loading will be done as usual from the database of the entity you clicked on
- all of the ids will be reset to null (for devices/platforms, but also for nested elements (attachments, properties, custom fields))
- the ids for contacts must stay
- the created_at & created_by fields must be cleared
- the mask must be in edit mode (as for complete new devices/platforms) from the very beginning
One thing that is still missing in this idea, is how to treat the user to change inventory numbers, pids, etc - so the reduce the risk of inserting the complete same entry over and over again. (But basically this must be enforced by the backend). But maybe we can show a hint for users of this copy function: So that they know what they must change.