Search in sources :

Example 1 with CommissioningDelay

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();
}
Also used : CommissioningDelay(com.autentia.tnt.businessobject.CommissioningDelay)

Example 2 with CommissioningDelay

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;
}
Also used : CommissioningDelay(com.autentia.tnt.businessobject.CommissioningDelay)

Example 3 with CommissioningDelay

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;
}
Also used : ArrayList(java.util.ArrayList) CommissioningDelay(com.autentia.tnt.businessobject.CommissioningDelay) SimpleDateFormat(java.text.SimpleDateFormat) CommissioningChange(com.autentia.tnt.businessobject.CommissioningChange)

Aggregations

CommissioningDelay (com.autentia.tnt.businessobject.CommissioningDelay)3 CommissioningChange (com.autentia.tnt.businessobject.CommissioningChange)1 SimpleDateFormat (java.text.SimpleDateFormat)1 ArrayList (java.util.ArrayList)1