func (VS *Server) showDeliveriesService(deliveryType DeliveryType) gin.HandlerFunc {
	return func(c *gin.Context) {
		service, b := VS.getOurService(c, "h_records", "showDeliveriesService", "service, b := VS.getOurService")
		if !b {
			return
		}
		var dPack []Delivery
		if deliveryType == Received {
			dPack = VS.getAllDeliveriesByServiceReceiverIDSent(c, service.ID, true)
		} else {
			dPack = VS.getAllDeliveriesSentByServiceID(c, service.ID, false)
		}
		dPackHTML := VS.deliveryToHTML(c, dPack)
		render(c, gin.H{
			"deliveryType": deliveryType,
			"dPack":        dPackHTML,
			"serviceType":  service.TypeID,
		}, "deliveries-service.html")
	}
}
// This handler shows the Deliveries send or received (depend on the deliveryType) from the service given
This handler shows the Deliveries send or received (depend on the deliveryType) from the service given
// This handler shows the Deliveries send or received ( depend on the deliveryType ) from the service given
func (VS *Server) showDeliveriesService(deliveryType DeliveryType) gin.HandlerFunc {
	return func(c *gin.Context) {
		service, b := VS.getOurService(c, "h_records", "showDeliveriesService", "service, b := VS.getOurService")
		if !b {
			return
		}
		var dPack []Delivery
		if deliveryType == Received {
			dPack = VS.getAllDeliveriesByServiceReceiverIDSent(c, service.ID, true)
		} else {
			dPack = VS.getAllDeliveriesSentByServiceID(c, service.ID, false)
		}
		dPackHTML := VS.deliveryToHTML(c, dPack)
		render(c, gin.H{
			"deliveryType": deliveryType,
			"dPack":        dPackHTML,
			"serviceType":  service.TypeID,
		}, "deliveries-service.html")
	}
}
func ( VS * Server ) showDeliveriesService ( deliveryType DeliveryType ) gin . HandlerFunc { return func ( c * gin . Context ) { service , b := VS . getOurService ( c , " " , " " , " " ) if ! b { return } var dPack [ ] Delivery if deliveryType == Received { dPack = VS . getAllDeliveriesByServiceReceiverIDSent ( c , service . ID , true ) } else { dPack = VS . getAllDeliveriesSentByServiceID ( c , service . ID , false ) } dPackHTML := VS . deliveryToHTML ( c , dPack ) render ( c , gin . H { " " : deliveryType , " " : dPackHTML , " " : service . TypeID , } , " " ) } }
This handler shows the Deliveries send or received (depend on the deliveryType) from the service given
This handler shows the Deliveries send or received ( depend on the deliveryType ) from the service given