#' Tender Evaluation Strategy Scenario Analysis
#'
#' Compare and test different tender evaluation strategies
#'
#' @import shiny
#' @import shinydashboard
#' @import rintrojs
#' @import rhandsontable
#' @import plotly
#'
#' @name tessa-module
#' @seealso \code{\link{select-strategy-module}}
NULL
#' @describeIn tessa-module Tender Evaluation Strategy Scenario Analysis UI
#' @param id Namespace ID of the module
tessaUI <- function(id) {
ns <- NS(id)
dashboardPage(
dashboardHeader(
title = "Tender Evaluation Scenario Tool (TEST)",
titleWidth = 400,
.list = list(
introJsUI(ns("intro")),
reportMenuUI(ns("report"))
)
),
dashboardSidebar(disable = T),
dashboardBody(
includeCSS(system.file("tender_evaluation/www/styles.css",package = "tessa")),
includeScript(system.file("tender_evaluation/www/messageHandler.js"), package = "tessa"),
rintrojs::introjsUI(),
fluidRow(
column(
width = 4,
box(
width = NULL,
title = list("Tender Evaluation Strategy"),
status = "primary",
selectStrategyUI(id = ns("strategy"))
),
box(
width = NULL,
title = "Strategy Description",
status = "primary",
selectStrategyDescriptionUI(id = ns("strategy"))
)
),
column(
width = 8,
fluidRow(
column(
width = 6,
visPanelUI(id = ns("vis_panel"))
),
column(
width = 6,
resultsTableUI(id = ns("results"), width = NULL),
scoringInputUI(id = ns("scoring"), width = NULL)
)
),
fluidRow(
infoBoxesUI(ns("infoboxes"))
),
fluidRow(
tabBox(
width = 12,
tabPanel(
title = "Criteria",
criteriaTableUI(id = ns("criteria"))
),
tabPanel(
title = "Scenario Config",
scenarioTableUI(id = ns("scenarios"))
),
tabPanel(
title = "Summary Data",
summaryTableUI(id = ns("summary"))
)
)
)
)
)
)
)
}
#' @describeIn tessa-module Tender Evaluation Strategy Scenario Analysis
#' Server Module
#' @param input shiny input variable
#' @export
tessa <- function(input, output, session) {
data("toaster")
ns <- session$ns
strategy <- callModule(
module = selectStrategy,
id = "strategy",
defaults = toaster
)
scoring <- callModule(
module = scoringInput,
id = "scoring"
)
criteria <- callModule(
module = criteriaTable,
id = "criteria",
defaults = toaster,
scoring = scoring
)
scenarios <- callModule(
module = scenarioTable,
id = "scenarios",
defaults = toaster,
criteria = criteria,
scoring = scoring
)
summary_table <- callModule(
module = summaryTable,
id = "summary",
criteria = criteria,
scenarios = scenarios,
scoring = scoring
)
results <- callModule(
module = resultsTable,
id = "results",
defaults = toaster,
strategy = strategy,
criteria = criteria,
technical = summary_table,
scoring = scoring
)
vis_panel <- callModule(
module = visPanel,
id = "vis_panel",
criteria = criteria,
results = results,
strategy = strategy
)
infoboxes <- callModule(
module = infoBoxes,
id = "infoboxes",
criteria = criteria,
results = results
)
intro <- callModule(
module = introJs,
id = "intro"
)
report <- callModule(
module = reportModule,
id = "report",
strategy = strategy,
results = results,
criteria = criteria
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.