@@ -147,18 +147,37 @@ qx.Class.define("osparc.support.ConversationPage", {
147147 }
148148
149149 const extraContextLabel = this . getChildControl ( "conversation-extra-content" ) ;
150- const amISupporter = osparc . store . Products . getInstance ( ) . amIASupportUser ( ) ;
151- if ( conversation && amISupporter ) {
152- const extraContext = conversation . getExtraContext ( ) ;
153- if ( extraContext && Object . keys ( extraContext ) . length ) {
154- let extraContextText = `Ticket ID: ${ conversation . getConversationId ( ) } ` ;
155- const contextProjectId = conversation . getContextProjectId ( ) ;
156- if ( contextProjectId ) {
157- extraContextText += `<br>Project ID: ${ contextProjectId } ` ;
150+ if ( conversation ) {
151+ const amISupporter = osparc . store . Products . getInstance ( ) . amIASupportUser ( ) ;
152+ conversation . bind ( "extraContext" , extraContextLabel , "value" , {
153+ converter : extraContext => {
154+ let extraContextText = "" ;
155+ if ( extraContext && Object . keys ( extraContext ) . length ) {
156+ extraContextText = `Ticket ID: ${ conversation . getConversationId ( ) } ` ;
157+ const contextProjectId = conversation . getContextProjectId ( ) ;
158+ if ( contextProjectId && amISupporter ) {
159+ extraContextText += `<br>Project ID: ${ contextProjectId } ` ;
160+ }
161+ const appointment = conversation . getAppointment ( ) ;
162+ if ( appointment ) {
163+ extraContextText += "<br>Appointment: " ;
164+ if ( appointment === "requested" ) {
165+ // still pending
166+ extraContextText += appointment ;
167+ } else {
168+ // already set
169+ extraContextText += osparc . utils . Utils . formatDateAndTime ( appointment ) ;
170+ }
171+ }
172+ }
173+ return extraContextText ;
158174 }
159- extraContextLabel . setValue ( extraContextText ) ;
160- }
161- extraContextLabel . show ( ) ;
175+ } ) ;
176+ extraContextLabel . bind ( "value" , extraContextLabel , "visibility" , {
177+ converter : extraContext => {
178+ return extraContext ? "visible" : "excluded" ;
179+ }
180+ } ) ;
162181 } else {
163182 extraContextLabel . exclude ( ) ;
164183 }
0 commit comments