method isAvailable documentation in bbn\Appui\Planning

Checks if the staff is available on the given period

function(string $id_staff, string $start, string $end) { $set = $this->class_cfg['tables']['staff_events']; $sef = $this->class_cfg['arch']['staff_events']; $ecfg = $this->getEvents()->getClassCfg(); $et = $ecfg['tables']['events']; $ef = $ecfg['arch']['events']; return !$this->db->rselect([ 'table' => $set, 'fields' => [$this->db->colFullName($sef['id_event'], $set)], 'join' => [[ 'table' => $et, 'on' => [ 'conditions' => [[ 'field' => $this->db->colFullName($ef['id'], $et), 'exp' => $this->db->colFullName($sef['id_event'], $set) ], [ 'field' => $this->db->colFullName($ef['start'], $et), 'operator' => '<=', 'value' => $start ], [ 'field' => $this->db->colFullName($ef['end'], $et), 'operator' => '>=', 'value' => $end ]] ] ]], 'where' => [ 'conditions' => [[ 'field' => $this->db->colFullName($sef['id_staff'], $set), 'value' => $id_staff ], [ 'field' => $this->db->colFullName($sef['status'], $set), 'value' => 'accepted' ]] ] ]); }

Checks if the staff is available on the given period BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.