use of com.autentia.tnt.businessobject.CommissioningDelay in project TNTConcept by autentia.
the class CommissioningBean method hideAddDelay.
public void hideAddDelay() {
showAddDelayPanel = false;
commissioningDelay = new CommissioningDelay();
FacesUtils.renderResponse();
}
use of com.autentia.tnt.businessobject.CommissioningDelay in project TNTConcept by autentia.
the class CommissioningBean method detail.
/**
* Go to detail page
*
* @return forward to DETAIL page
*/
public String detail() {
Integer id = Integer.parseInt(FacesUtils.getRequestParameter(ROW_ID));
commissioning = manager.getEntityById(id);
commissioningDelay = new CommissioningDelay();
commissioningDelay.setOriginalDate(commissioning.getDeliveryDate());
commissioningDelay.setStatus(commissioning.getStatus());
return SpringUtils.isAclPermissionGranted(commissioning, BasePermission.WRITE) ? NavigationResults.EDIT : NavigationResults.DETAIL;
}
use of com.autentia.tnt.businessobject.CommissioningDelay in project TNTConcept by autentia.
the class CommissioningManager method getCommissioningDelaysChanges.
private List<CommissioningChange> getCommissioningDelaysChanges(final Commissioning commissioning) {
final List<CommissioningChange> changes = new ArrayList<CommissioningChange>();
final SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy hh:mm:ss");
for (CommissioningDelay delay : commissioning.getCommissioningDelays()) {
if (!commissioning.getChanges().getCommissioningDelays().contains(delay)) {
changes.add(getChange("commissioningDelay.delayedToDate", "", sdf.format(delay.getDelayedToDate()), commissioning));
}
}
for (CommissioningDelay delay : commissioning.getChanges().getCommissioningDelays()) {
if (!commissioning.getCommissioningDelays().contains(delay)) {
changes.add(getChange("commissioningDelay.delayedToDate", sdf.format(delay.getDelayedToDate()), "", commissioning));
}
}
return changes;
}
Aggregations