Make table of automated reportsSource:
Make a table to be rendered in a shiny app providing automated reports from a given user or registry as obtained from the shiny session object provided.
makeAutoReportTab( session, namespace = character(), type = "subscription", mapOrgId = NULL, includeReportId = FALSE )
A shiny session object
String naming namespace. Defaults to
character()in which case no namespace will be created. When this function is used by shiny modules namespace must be provided.
Character string defining the type of auto reports to tabulate. Must be one of
"bulletin". Default value set to
Data frame containing the two columns 'name' and 'id' corresponding to unique name and id of organizations. Default is NULL in which case the ids provided in auto report data will be used. In case mapOrgId is not NULL but no id match is found the id found in the auto report data will also be used
Logical if the unique report id should be added as the last column in the table. FALSE by default.
Each table record (line) represents a uniquely defined automated report.
For each line two shiny action buttons are provided to allow
for editing and deleting of each entry. For applications
implementing this table observing events on these action buttons may be used
to allow users to manage automated reports by GUI. The
action buttons for editing and deleting are provided with the static input
ids edit_button and del_button and upon clicking the
button part of their ids will change to the unique id of the
report. Hence, a GUI call for editing a report can be caught by
shiny::observeEvent("edit_button") and within this event the
report id is obtained by collecting the string after the double underscore,
Optionally, report id may be provided as the last column in the table to allow further development for registry specific purposes. Regardless, this column should normally be hidden in the GUI.
Take a look at the example shiny server function in rapRegTemplate on how this function may be implemented.