Index: sources/gui/qml/pages/posttreatment/PostTreatmentDisconnectStack.qml =================================================================== diff -u -r952d633ac2d84a05dff3355cf864064b21a5ee7e -r7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2 --- sources/gui/qml/pages/posttreatment/PostTreatmentDisconnectStack.qml (.../PostTreatmentDisconnectStack.qml) (revision 952d633ac2d84a05dff3355cf864064b21a5ee7e) +++ sources/gui/qml/pages/posttreatment/PostTreatmentDisconnectStack.qml (.../PostTreatmentDisconnectStack.qml) (revision 7fb13d9e1a453a37ab4dea5536e0f19ed6e272d2) @@ -22,28 +22,14 @@ property int subStepIndex: PostTreatmentDisconnectStack.Step.DisconnectPatient - onVisibleChanged: { - if (visible) { - _headerBar.activeStack = stackView - } - else { - stackView.initialItem = null - } - } - signal goToNextStep() function initStack() { page ( _postTreatmentDisconnectPatient ) } - function goToDrain() { - page ( _postTreatmentDrainConsumables ) - } - function continueClicked() { switch ( _root.subStepIndex ) { case PostTreatmentDisconnectStack.Step.DisconnectPatient: vPostTreatmentAdjustmentPatientDisconnectionConfirm.doConfirm() - startNavigationTimer(_postTreatmentDrainConsumables) // TODO remove later with integration break case PostTreatmentDisconnectStack.Step.DrainConsumable: goToNextStep () @@ -79,4 +65,25 @@ PostTreatmentDrainConsumables { id: _postTreatmentDrainConsumables onVisibleChanged : if (visible) { _root.subStepIndex = PostTreatmentDisconnectStack.Step.DrainConsumable } } + + // Confirm Patient Disconnection + Connections { target: vPostTreatmentAdjustmentPatientDisconnectionConfirm + function onAdjustmentTriggered ( vValue ) { + if ( vPostTreatmentAdjustmentPatientDisconnectionConfirm.adjustment_Accepted ) { + _postTreatmentDisconnectPatient.reasonText = "" + page ( _postTreatmentDrainConsumables ) + } else { + _postTreatmentDisconnectPatient.reasonText = vPostTreatmentAdjustmentPatientDisconnectionConfirm.text() + } + } + } + + onVisibleChanged: { + if (visible) { + _headerBar.activeStack = stackView + } + else { + stackView.initialItem = null + } + } }