Undebate Self Service Portal- Web portal where election administrators of democratically run organizations create undebates for their candidates and voters
[x] On the Invitation page, there should be one button for "Generate", and another button for "Send". But maybe there are better names.
[x] create a separate sendModeratorInvitation method in app/components/get-election-info and emit the send-moderator-invite api call
[ ] After the generate step, the list of dates of generation should be shown. (It's possible to generate again, if for example the admin decides to change a question).
[x] After the generation step, make the viewer visible (as an iFrame or as a link) I'm not sure needs) the admin will be able to review it.
[ ] extract reasonsNotReadyForModeratorRecorder out of app/socket-apis/create-moderator-recorder and make it available to the UI, probably through election status methods. In the UI, use this check to enable/disable the generate button, and display the error messages if there are any.
[x] The "Send" button is active after there is a generated recorder.
[ ] Show the list of sent dates of invitations. [invitations might get sent more than once]. this is electionObj.moderator.invitations and the date is encoded in the _id use ObjectId(_id).getTimestamp() to get the date