diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/orders/OrderCRUDController.java b/libreplan-webapp/src/main/java/org/libreplan/web/orders/OrderCRUDController.java index 61af83208..1b4e66528 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/orders/OrderCRUDController.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/orders/OrderCRUDController.java @@ -29,6 +29,8 @@ import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.SortedSet; +import java.util.TreeSet; import javax.annotation.Resource; @@ -37,6 +39,8 @@ import org.apache.commons.logging.LogFactory; import org.hibernate.validator.InvalidValue; import org.libreplan.business.calendars.entities.BaseCalendar; import org.libreplan.business.common.exceptions.ValidationException; +import org.libreplan.business.externalcompanies.entities.DeadlineCommunication; +import org.libreplan.business.externalcompanies.entities.DeliverDateComparator; import org.libreplan.business.externalcompanies.entities.ExternalCompany; import org.libreplan.business.orders.entities.HoursGroup; import org.libreplan.business.orders.entities.Order; @@ -1499,4 +1503,10 @@ public class OrderCRUDController extends GenericForwardComposer { } } + public SortedSet getDeliverDates() { + if(getOrder() != null){ + return getOrder().getDeliveringDates(); + } + return new TreeSet(new DeliverDateComparator()); + } } diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/orders/OrderModel.java b/libreplan-webapp/src/main/java/org/libreplan/web/orders/OrderModel.java index 1eda280f7..fdaaa8c27 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/orders/OrderModel.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/orders/OrderModel.java @@ -44,6 +44,7 @@ import org.libreplan.business.common.entities.Configuration; import org.libreplan.business.common.entities.EntityNameEnum; import org.libreplan.business.common.exceptions.InstanceNotFoundException; import org.libreplan.business.externalcompanies.daos.IExternalCompanyDAO; +import org.libreplan.business.externalcompanies.entities.DeadlineCommunication; import org.libreplan.business.externalcompanies.entities.ExternalCompany; import org.libreplan.business.labels.daos.ILabelDAO; import org.libreplan.business.labels.entities.Label; @@ -273,12 +274,17 @@ public class OrderModel extends IntegrationEntityModel implements IOrderModel { forceLoadCriterionRequirements(order); forceLoadCalendar(this.getCalendar()); forceLoadCustomer(order.getCustomer()); + forceLoadDeliveringDates(order); forceLoadLabels(order); forceLoadMaterialAssignments(order); forceLoadTaskQualityForms(order); initOldCodes(); } + private void forceLoadDeliveringDates(Order order){ + order.getDeliveringDates().size(); + } + private void forceLoadLabels(OrderElement orderElement) { orderElement.getLabels().size(); for (OrderElement each : orderElement.getChildren()) { diff --git a/libreplan-webapp/src/main/webapp/orders/_edition.zul b/libreplan-webapp/src/main/webapp/orders/_edition.zul index 8519608da..80e790c41 100644 --- a/libreplan-webapp/src/main/webapp/orders/_edition.zul +++ b/libreplan-webapp/src/main/webapp/orders/_edition.zul @@ -62,108 +62,179 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +