func (VS *Server) showReports(c *gin.Context) {
	user := VS.getUserFomCookie(c, "h_comunication", "showReports", "user := VS.getUserFomCookie")
	var reports []Report
	if user.Role == Admin {
		reports = VS.getReportsFromSystem(c, "h_comunication", "showReports", "reports = VS.getReportsFromSystem")
	} else {
		reports = VS.getReportsByUser(c, user.ID, "h_comunication", "showReports", "reports = VS.getReportsFromSystem")
	}
	reportsHTML := VS.reportsToHTML(c, user, reports)
	JSON, err := json.Marshal(reportsHTML)
	VS.checkOperation(c, "h_date", "showUsers", "JSON, err := json.Marshal(uHTML)", err)
	render(c, gin.H{
		"reports": reportsHTML,
		"JSON":    string(JSON),
	}, "reports.html")
}
// This handler shows the Reports of the user
This handler shows the Reports of the user
// This handler shows the Reports of the user
func (VS *Server) showReports(c *gin.Context) {
	user := VS.getUserFomCookie(c, "h_comunication", "showReports", "user := VS.getUserFomCookie")
	var reports []Report
	if user.Role == Admin {
		reports = VS.getReportsFromSystem(c, "h_comunication", "showReports", "reports = VS.getReportsFromSystem")
	} else {
		reports = VS.getReportsByUser(c, user.ID, "h_comunication", "showReports", "reports = VS.getReportsFromSystem")
	}
	reportsHTML := VS.reportsToHTML(c, user, reports)
	JSON, err := json.Marshal(reportsHTML)
	VS.checkOperation(c, "h_date", "showUsers", "JSON, err := json.Marshal(uHTML)", err)
	render(c, gin.H{
		"reports": reportsHTML,
		"JSON":    string(JSON),
	}, "reports.html")
}
func ( VS * Server ) showReports ( c * gin . Context ) { user := VS . getUserFomCookie ( c , " " , " " , " " ) var reports [ ] Report if user . Role == Admin { reports = VS . getReportsFromSystem ( c , " " , " " , " " ) } else { reports = VS . getReportsByUser ( c , user . ID , " " , " " , " " ) } reportsHTML := VS . reportsToHTML ( c , user , reports ) JSON , err := json . Marshal ( reportsHTML ) VS . checkOperation ( c , " " , " " , " " , err ) render ( c , gin . H { " " : reportsHTML , " " : string ( JSON ) , } , " " ) }
This handler shows the Reports of the user
This handler shows the Reports of the user