Resolve "Broken Monitoring set-up"
Closes #900 (closed) Closes #885 (closed)
I fixed three closely connected issues with the monitoring setup:
- Opening the monitoring setup, canceling it and opening it again did not correctly trigger edit mode.
- Cause was an Observable completing too early, see https://gitlab.com/recoverycat/rcc-client/-/merge_requests/773/diffs#95a0d18fe47f0d041098cb675e7a63792493a25d_151_151
- Switching to preview mode triggered ExpressionChangedAfterItHasBeenCheckedError
- I turned some complex getters into values that get updated only when need be (since getters are prone to the above error and the same object was created 160+ times :D)
- I added ChangeDetectorRef, since ultimately some dynamic component (a querywidget) was added when an observable emitted, which can happen outside the CD-loop.
- A faulty SymptomCheckConfig-check prevented a template from being stored at the end of the monitoring setup.
You can see the bugs on qa.hcp.recoverycat.de (for now)
- Open monitoring setup, select template, navigate back to home; open monitoring setup again, pick template => questions are not editable
- Switch to preview mode, check console.
- Goto Templates (Vorlage) via main menu, click a template, switch to preview, try to save => nothing happens (check sonsole)
Edited by James Jenkinson