Created
October 1, 2019 21:03
-
-
Save voipnorm/8a7ae028cdb0a92875f2de3fec68cfc3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xapi.event.on('UserInterface Message Prompt Response', (event) => { | |
switch(event.FeedbackId){ | |
case 'roomfeedback_step1': | |
switch(event.OptionId){ | |
case '1': | |
xapi.command("UserInterface Message TextInput Display", { | |
Duration: 0 | |
, FeedbackId: "roomfeedback_step2_cleanliness" | |
, InputType: "SingleLine" | |
, KeyboardState: "Open" | |
, Placeholder: "Details on cleanliness issue" | |
, SubmitText: "Submit" | |
, Text: "Please leave optional comment about the cleanliness issue or just hit Submit if its obvious that the room needs cleaning!" | |
, Title: "Cleanliness Details" | |
}).catch((error) => { console.error(error); }); | |
break; | |
case '2': | |
xapi.command("UserInterface Message Prompt Display", { | |
Title: "A/V Issue reporting" | |
, Text: 'Please select what the problem seems to be' | |
, FeedbackId: 'roomfeedback_step2' | |
, 'Option.1':'Call did not connect' | |
, 'Option.2':'Audio was bad' | |
, 'Option.3': 'Video was bad' | |
}).catch((error) => { console.error(error); }); | |
break; | |
case '3': | |
xapi.command("UserInterface Message TextInput Display", { | |
Duration: 0 | |
, FeedbackId: "roomfeedback_step2_other" | |
, InputType: "SingleLine" | |
, KeyboardState: "Open" | |
, Placeholder: "Describe issue here" | |
, SubmitText: "Next" | |
, Text: "Please enter a short description of the issue" | |
, Title: "Issue info" | |
}).catch((error) => { console.error(error); }); | |
break; | |
} | |
break; | |
case 'roomfeedback_step2': | |
systemInfo.short_description = 'AV issue'; | |
raiseTicket('There is an audio/video issue in ' + systemInfo.systemName); | |
break; | |
case 'reportissue': | |
switch(event.OptionId){ | |
case '1': | |
raiseTicket(systemInfo.systemName + ' is having audio or video issues'); | |
break; | |
case '2': | |
raiseTicket(systemInfo.systemName + ' needs cleaning'); | |
break; | |
case '3': | |
raiseTicket(systemInfo.systemName + ' Just has someone complaining for no reason'); | |
break; | |
} | |
break; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment