Sophisticated Calendar

this is the calc

PHP:
$duration = '{fab_leave_tracking___duration}';
$select_part = '{fab_leave_tracking___select_part}';

if ($duration = "1") {
    return  "full_day";
}

if ($duration = "0.5") {
    return  "half_day";
}

if ($duration = "0.5" || $select_part = "First half") {
    return  "first_half";
}
if ($duration = "0.5" || $select_part = "Second half") {
    return  "secound_half";
}
 
this is the calc

PHP:
$duration = '{fab_leave_tracking___duration}';
$select_part = '{fab_leave_tracking___select_part}';

if ($duration = "1") {
    return  "full_day";
}

if ($duration = "0.5") {
    return  "half_day";
}

if ($duration = "0.5" || $select_part = "First half") {
    return  "first_half";
}
if ($duration = "0.5" || $select_part = "Second half") {
    return  "secound_half";
}
 
All done well! thank you for the support

This is how to


This my calc element (get values from 2 elemnt and base on the user selection store at the DB)

PHP:
$duration = '{fab_leave_tracking___duration_raw}';
$select_part = '{fab_leave_tracking___select_part_raw}';

//return  $duration;

if ($duration == '1') {
    return  "full_day";
}

if ($select_part == "Second half") {
    return  "secound_half";
}
if ($select_part = "First half") {
    return  "first_half";
}


add custom.css at
/plugins/fabrik_visualization/fullcalendar/views/fullcalendar/tmpl/bootstrap/

My CSS (get the element and change the coloors)

CSS:
.leave_time_statusfirst-half
    {
background:linear-gradient(to right, rgba(255,0,0,1)50%, rgba(255,255,255,1)50%)
    }
.leave_time_statussecound-half
    {
    background:linear-gradient(to right, rgba(255,255,255,1) 50%, rgba(255, 0,0,1) 50%)
    }
.leave_time_statusfull-day
    {
    background: rgba(255,0,0,1)
    }
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top