func (VS *Server) selectServiceDeliveryHTML(c *gin.Context, villages []Village, idService bson.ObjectId, isService bool) []SelectServiceHTML {
	var selectVillages []SelectServiceHTML
	var selectVillage SelectServiceHTML
	var services []Service
	for _, village := range villages {
		if !isService {
			services = VS.getAllServicesFromSpecificVillage(c, village.ID, "h_view", "selectServiceDeliveryHTML", "services = VS.getAllServicesFromSpecificVillage")
		} else {
			services = VS.getAllServicesFromSpecificVillageExceptItself(c, village.ID, idService, "h_view", "selectServiceDeliveryHTML", "services = VS.getAllServicesFromSpecificVillageExceptItself")
		}
		selectVillage.VillageName = village.Name
		selectVillage.Services = VS.servicesToHTML(c, services)
		selectVillages = append(selectVillages, selectVillage)
		services = nil
	}
	return selectVillages
}
// Returns an array of Villages and his services to select the service we want to make the delivery
// If the cond is true, removes from the array the service to avoid to make a delivery to itself
Returns an array of Villages and his services to select the service we want to make the delivery
If the cond is true, removes from the array the service to avoid to make a delivery to itself
// Returns an array of Villages and his services to select the service we want to make the delivery // If the cond is true removes from the array the service to avoid to make a delivery to itself
func (VS *Server) selectServiceDeliveryHTML(c *gin.Context, villages []Village, idService bson.ObjectId, isService bool) []SelectServiceHTML {
	var selectVillages []SelectServiceHTML
	var selectVillage SelectServiceHTML
	var services []Service
	for _, village := range villages {
		if !isService {
			services = VS.getAllServicesFromSpecificVillage(c, village.ID, "h_view", "selectServiceDeliveryHTML", "services = VS.getAllServicesFromSpecificVillage")
		} else {
			services = VS.getAllServicesFromSpecificVillageExceptItself(c, village.ID, idService, "h_view", "selectServiceDeliveryHTML", "services = VS.getAllServicesFromSpecificVillageExceptItself")
		}
		selectVillage.VillageName = village.Name
		selectVillage.Services = VS.servicesToHTML(c, services)
		selectVillages = append(selectVillages, selectVillage)
		services = nil
	}
	return selectVillages
}
func ( VS * Server ) selectServiceDeliveryHTML ( c * gin . Context , villages [ ] Village , idService bson . ObjectId , isService bool ) [ ] SelectServiceHTML { var selectVillages [ ] SelectServiceHTML var selectVillage SelectServiceHTML var services [ ] Service for _ , village := range villages { if ! isService { services = VS . getAllServicesFromSpecificVillage ( c , village . ID , " " , " " , " " ) } else { services = VS . getAllServicesFromSpecificVillageExceptItself ( c , village . ID , idService , " " , " " , " " ) } selectVillage . VillageName = village . Name selectVillage . Services = VS . servicesToHTML ( c , services ) selectVillages = append ( selectVillages , selectVillage ) services = nil } return selectVillages }
Returns an array of Villages and his services to select the service we want to make the delivery
If the cond is true, removes from the array the service to avoid to make a delivery to itself
Returns an array of Villages and his services to select the service we want to make the delivery If the cond is true removes from the array the service to avoid to make a delivery to itself