Beispiel #1
0
        $plage->_ref_chir->loadRefsFwd();
        $plage->multicountOperations();
        $nbIntervNonPlacees += $plage->_count_operations - $plage->_count_operations_placees;
        $plage->loadAffectationsPersonnel();
        $plage->fin = min($plage->fin, $max);
        $plage->debut = max($plage->debut, $min);
        $plage->updateFormFields();
        $plage->makeView();
        if ($plage->debut >= $plage->fin) {
            unset($listPlages[$keyDate][$plage->_id]);
        }
    }
    // Remplissage du tableau de visualisation
    foreach ($listPlages[$keyDate] as $plage) {
        $plage->debut = CMbDT::timeGetNearestMinsWithInterval($plage->debut, CPlageOp::$minutes_interval);
        $plage->fin = CMbDT::timeGetNearestMinsWithInterval($plage->fin, CPlageOp::$minutes_interval);
        $plage->_nbQuartHeure = CMbDT::timeCountIntervals($plage->debut, $plage->fin, "00:" . CPlageOp::$minutes_interval . ":00");
        for ($time = $plage->debut; $time < $plage->fin; $time = CMbDT::time("+" . CPlageOp::$minutes_interval . " minutes", $time)) {
            $affichages["{$keyDate}-{$time}"] = "full";
        }
        $affichages["{$keyDate}-{$plage->debut}"] = $plage->_id;
    }
    // Ajout des interventions hors plage
    foreach ($horsPlages as $_op) {
        if ($_op->salle_id) {
            $affichages["{$keyDate}-HorsPlage"][$_op->_id] = $_op;
        }
    }
}
//Création du template
$smarty = new CSmartyDP();