JSFiddle - React, Tailwind, and code Playground

by David Kyle

JavaScript

var content = {
  UnexpectedError: createStandardMessage("An unexpected error has occurred: <b>{0}</b>.  If you're seeing this message, please contact application support and report this issue.", 3, formatMessage),
  NoResponse: createStandardMessage("No response was received from the server while loading: <b>{0}</b>.", 3, formatMessage),
  ShiftScheduleConflict: createStandardMessage("The time range conflicts with shift: <b>{0}</b>.", 3, formatMessage),
  ShiftScheduleEvaluationTimeConflict: createStandardMessage("The target evaluation time should be during the shift.", 3, formatMessage),
  ShiftScheduleIncrementConflict: createStandardMessage("The target evaluation time should be in 5 minutes increment.", 3, formatMessage),
  RequiredFieldsConflict: createStandardMessage("Please make sure that all required fields are filled in.", 3, formatMessage)
};

function createStandardMessage(text, severity, detail) {
	return {
  	Text: text,
    Severity: severity,
    WithDetail: detail
  };
}