# Linked Project Devices and Synchronization ## Concept Circuit device rows may be linked to project devices. Manual rows may exist without a linked project device. A manual row can later be saved as a project device. ## Name vs Display Name Project devices and circuit list device rows use separate naming fields. ### ProjectDevice.name The technical or product-related name. Examples: - `E-Line Pro` - `Arbeitsplatzsteckdosen` - `Durchlauferhitzer 21 kW` This field may be synchronized to linked circuit list rows where a technical source name is shown. ### ProjectDevice.displayName A default display name used when inserting the device into a circuit list. Example: - `Lichtband` - `Arbeitsplatzsteckdosen` - `Handtrockner` ### CircuitDeviceRow.displayName The circuit-list-specific display name. Examples: - `Lichtband Seminarraum` - `Beleuchtung Flur` - `Steckdosen Arbeitsplatz Büro 2.14` When a project device is inserted, the row display name is prefilled from the project device. After insertion, `displayName` remains local and must not be synchronized automatically. ## Default Synchronization Rule By default, these fields may be synchronized from project device to linked circuit list rows: - `name` - `phaseType` - `connectionKind` - `costGroup` - `category` - `quantity` - `powerPerUnit` - `simultaneityFactor` - `cosPhi` - `totalPower` - `remark` Default excluded field: - `displayName` ## Synchronization Dialog When a project device is changed, the app should show a synchronization dialog. The dialog should display affected linked rows. For each affected row, show: - distribution board - section - circuit identifier - row display name - changed fields - current row value - new project device value - whether the row value was locally overridden The user can choose: - apply change to one linked row - apply change to all linked rows - exclude specific fields - disconnect selected linked rows from the project device - cancel synchronization The app must not silently overwrite locally edited values without user control. ## Local Overrides A linked circuit device row may override inherited values locally. The implementation should track overridden fields. If a field is locally overridden, the synchronization dialog should mark it clearly. The user may still choose to overwrite it. ## Disconnecting a Linked Device A linked device row can be disconnected from its source project device. After disconnecting: - the row remains in the circuit list - existing local values stay unchanged - future changes to the project device no longer affect this row ## Manual Row to Project Device Manual rows can be saved as project devices. When this action is used: - create a new project device from the row data - link the row to the new project device - preserve the existing circuit list display name - apply synchronization rules from that point onward