func (VS *Server) toViewAssignment(c *gin.Context, assignments Assignment) AssignmentHTML {
	var a AssignmentHTML
	a.ID = assignments.ID
	item := VS.getStockByID(c, assignments.IDStock, "h_view", "toViewAssignment", "a.Item = VS.getItemByID")
	itemHTML := VS.stockToHTML(c, item)
	a.Item = itemHTML.VideoOrItemName
	a.PhotoItem = itemHTML.Photo
	a.IsBack = assignments.IsBack
	a.Date = strconv.Itoa(time.Unix(assignments.Date, 0).Day()) + " / " + time.Unix(assignments.Date, 0).Month().String()
	a.Manager = VS.getUserByID(c, assignments.IDManager, "h_view", "toViewAssignment", "a.Manager = VS.getUserByID(c").Name
	a.Service = VS.getServiceByID(c, assignments.IDService, "h_view", "toViewAssignment", "a.Service = VS.getServiceByID", true).Name
	worker := VS.getUserByID(c, assignments.IDWorker, "h_view", "toViewAssignment", "aHTML.Name =  v.getVillageByID")
	a.WorkerPhoto = "/local/users/" + worker.Username + "/" + worker.Photo
	a.Worker = worker.Name
	return a
}
// This method takes an Assignments and returns an AssignmentsHTML
This method takes an Assignments and returns an AssignmentsHTML
// This method takes an Assignments and returns an AssignmentsHTML
func (VS *Server) toViewAssignment(c *gin.Context, assignments Assignment) AssignmentHTML {
	var a AssignmentHTML
	a.ID = assignments.ID
	item := VS.getStockByID(c, assignments.IDStock, "h_view", "toViewAssignment", "a.Item = VS.getItemByID")
	itemHTML := VS.stockToHTML(c, item)
	a.Item = itemHTML.VideoOrItemName
	a.PhotoItem = itemHTML.Photo
	a.IsBack = assignments.IsBack
	a.Date = strconv.Itoa(time.Unix(assignments.Date, 0).Day()) + " / " + time.Unix(assignments.Date, 0).Month().String()
	a.Manager = VS.getUserByID(c, assignments.IDManager, "h_view", "toViewAssignment", "a.Manager = VS.getUserByID(c").Name
	a.Service = VS.getServiceByID(c, assignments.IDService, "h_view", "toViewAssignment", "a.Service = VS.getServiceByID", true).Name
	worker := VS.getUserByID(c, assignments.IDWorker, "h_view", "toViewAssignment", "aHTML.Name =  v.getVillageByID")
	a.WorkerPhoto = "/local/users/" + worker.Username + "/" + worker.Photo
	a.Worker = worker.Name
	return a
}
func ( VS * Server ) toViewAssignment ( c * gin . Context , assignments Assignment ) AssignmentHTML { var a AssignmentHTML a . ID = assignments . ID item := VS . getStockByID ( c , assignments . IDStock , " " , " " , " " ) itemHTML := VS . stockToHTML ( c , item ) a . Item = itemHTML . VideoOrItemName a . PhotoItem = itemHTML . Photo a . IsBack = assignments . IsBack a . Date = strconv . Itoa ( time . Unix ( assignments . Date , 0 ) . Day ( ) ) + " " + time . Unix ( assignments . Date , 0 ) . Month ( ) . String ( ) a . Manager = VS . getUserByID ( c , assignments . IDManager , " " , " " , " " ) . Name a . Service = VS . getServiceByID ( c , assignments . IDService , " " , " " , " " , true ) . Name worker := VS . getUserByID ( c , assignments . IDWorker , " " , " " , " " ) a . WorkerPhoto = " " + worker . Username + " " + worker . Photo a . Worker = worker . Name return a }
This method takes an Assignments and returns an AssignmentsHTML
This method takes an Assignments and returns an AssignmentsHTML