}
    if ($duree_occupation > $config["eleve"]) {
        $color = "#f88";
    }
    if ($duree_occupation >= $config["faible"] && $duree_occupation <= $config["eleve"]) {
        $color = "#ff4";
    }
    $planning->addDayLabel($_occupation["date"], $_occupation["total"] . " mn", null, $color);
}
// Congés du personnel
/** @var CPlageConge $_plage */
foreach ($kine->loadBackRefs("plages_conge") as $_plage) {
    $planning->addUnavailability($_plage->date_debut, $_plage->date_fin);
}
// Activité du compte
if ($kine->deb_activite) {
    $deb = CMbDT::date("-1 DAY", $kine->deb_activite);
    $planning->addUnavailability(CMbDT::date("-1 WEEK", $deb), $deb);
}
if ($kine->fin_activite) {
    $fin = CMbDT::date("+1 DAY", $kine->fin_activite);
    $planning->addUnavailability($fin, CMbDT::date("+1 WEEK", $fin));
}
// Heure courante
$planning->showNow();
$planning->rearrange(true);
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("planning", $planning);
$smarty->assign("date", CMbDT::dateTime());
$smarty->display("inc_vw_week.tpl");
示例#2
0
        $event->plage["locked"] = $_plage->locked;
        $event->plage["_affected"] = $_plage->_affected;
        $event->plage["_nb_patients"] = $_plage->_nb_patients;
        $event->plage["_total"] = $_plage->_total;
        $event->plage["color"] = $_plage->color;
        $event->plage["list_class"] = "list";
        $event->plage["add_class"] = "clock";
        $event->plage["list_title"] = "Voir le contenu de la plage";
        $event->plage["add_title"] = "Planifier une consultation dans cette plage";
        $event->_disponibilities = $_plage->_disponibilities;
        //Ajout de l'évènement au planning
        $planning->addEvent($event);
    }
}
$planning->allow_superposition = false;
$planning->rearrange();
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("planning", $planning);
$smarty->assign("show_payees", $show_payees);
$smarty->assign("show_annulees", $show_annulees);
$smarty->assign("chirSel", $chirSel);
$smarty->assign("canEditPlage", $canEditPlage);
$smarty->assign("plageSel", $plageSel);
$smarty->assign("today", $today);
$smarty->assign("debut", $debut);
$smarty->assign("fin", $fin);
$smarty->assign("prec", $prec);
$smarty->assign("suiv", $suiv);
$smarty->assign("plageconsult_id", $plageconsult_id);
$smarty->assign("count_si_desistement", $count_si_desistement);