A lava template for displaying if check in is set up correctly for a group. This should make it very obvious to staff if their group isn’t set up with check in ready.

Screen_Shot_2023-04-24_at_12.44.03_PM.png


Lava Template

Download the lava template file here: checkInLocations.lava

  • Upload this somewhere in asset manager where it can be referenced. You can access asset manager at /admin/cms/asset-manager.
  • For us, the file path is ~/Content/Lava/checkInLocations.lava”

Alternatively, here is the code: 

//- Check-In Active Lava
<style>
    .label{
        margin: 0 3px;
    }
    a.label:hover, a.label:focus {
        color: black !important;
    }
    hr{
        margin: 3px 0;
    }
    .label I{
        margin-right: 3px;
    }
</style>
<div class="col-md-12">
<dl>
    <dt style="font-weight:600;margin-bottom:0;">Check-In Locations</dt>
    {% assign locations = Group.GroupLocations %}
    {% assign locationsSize = locations | Size %}
    {% if locationsSize > 0 %}
        <div style="display: flex;flex-direction: row;flex-wrap: wrap;gap: 5px;">
        {% for GroupLocation in Group.GroupLocations %} 
        {% assign canEditLocation = GroupLocation.Location.Id | HasRightsTo:'Edit','Rock.Model.Location' %}
        {% assign scheduleSize = GroupLocation.Schedules | Where:'IsActive', 'true', 'equal'| Size %}
        {% capture campus %}
            {% if GroupLocation.Location.CampusId %}
                {% campus id:'{{ GroupLocation.Location.CampusId }}' %}
                    {{ campus.Name }}
                {% endcampus %}
            {% endif %}
        {% endcapture %}
        <div style="margin-bottom:5px;line-height:1.75;flex:1 0 30%;" class="well">
            <strong>{{ campus }}</strong>
            {% if scheduleSize > 0 %}
                <span class="label label-success">Check-In Ready</span>
            {% endif %}<br>
            {% if canEditLocation == true %}
                <a href="/admin/checkin/named-locations?LocationId={{ GroupLocation.Location.Id }}" target="_blank"
            {% else %}
                <span 
            {% endif %}
             class="label label-campus"><i class="far fa-map-marker-check"></i> {{ GroupLocation.Location.Name }}
             {% if canEditLocation == true %}
                </a>
             {% else %}
                </span>
             {% endif %}
                {% if scheduleSize > 0 %}
                    {% for schedule in GroupLocation.Schedules %}
                        {% assign canEditSchedule = schedule.Id | HasRightsTo:'Edit','Rock.Model.Schedule' %}
                        {% if schedule.IsActive == true %}
                                {% assign openOffset = schedule.CheckInStartOffsetMinutes | Times: -1 %}
                                {% assign openTime = schedule.NextStartDateTime | DateAdd: openOffset,'m' | Date: 'yyyy-MM-ddTHH:mm:ss.fffzzz' %}
                                {% assign closeOffset = schedule.CheckInEndOffsetMinutes %}
                                {% assign closeTime = schedule.NextStartDateTime | DateAdd: closeOffset,'m' | Date: 'yyyy-MM-ddTHH:mm:ss.fffzzz' %}
                                {% assign endTime = schedule.NextStartDateTime | DateAdd: schedule.DurationInMinutes, 'm' | Date: 'yyyy-MM-ddTHH:mm:ss.fffzzz' %}
                                {% assign endOffset = schedule.NextStartDateTime | DateDiff: endTime, 'm' %}
                                
                                //- Find out if check in closes at the offset time or when the schedule closes
                                {% if endOffset < closeOffset %}
                                    {% assign checkInCloseOffset = endOffset %}
                                    {% assign checkInClose = endTime %}
                                {% elseif closeOffset < endOffset %}
                                    {% assign checkInCloseOffset = closeOffset %}
                                    {% assign checkInClose = closeTime %}
                                {% else %}
                                    {% assign checkInCloseOffset = closeOffset %}
                                    {% assign checkInClose = closeTime %}
                                {% endif %}
                                
                                {% capture nextUpSummary %}
                                    <strong>Next Start:</strong> {{ schedule.NextStartDateTime | HumanizeDateTime }} {{ schedule.NextStartDateTime | Date:'dddd, MMMM d, yyyy h:mmtt' }}
                                {% endcapture %}
                                {% capture opensSummary %}
                                    <strong>Opens:</strong> {{ schedule.CheckInStartOffsetMinutes }} Minutes Before Start at {{ openTime | Date:'h:mmtt' }}
                                {% endcapture %}
                                {% capture closesSummary %}
                                    <strong>Closes:</strong> {{ checkInCloseOffset }} Minutes After Start at {{ checkInClose | Date:'h:mmtt' }}
                                {% endcapture %}
                                {% capture friendlySummary %}
                                    <strong>Occurs</strong> {{ schedule.FriendlyScheduleText }}
                                {% endcapture %}
                                
                                {% if canEditSchedule == true %}
                                    <a href="/page/308?ScheduleId={{ schedule.Id }}" target="_blank"
                                {% else %}
                                    <span
                                {% endif %}
                                {% if schedule.IsCheckInActive == true %}
                                    class="label label-type required-indicator" title="<strong>Check-In Currently Open</strong><br><hr>{{ closesSummary }}<br><hr>{{ friendlySummary }}" 
                                {% else %}
                                    class="label label-type" title="{{ nextUpSummary }}<br><hr>{{ opensSummary }}<br><hr>{{ closesSummary }}<br><hr>{{ friendlySummary }}"
                                {% endif %}
                                    data-toggle="tooltip" data-placement="bottom" data-html="true"><i class="fal fa-calendar-check"></i> {{ schedule }}
                                {% if canEditSchedule == true %}
                                    </a>
                                {% else %}
                                    </span>
                                {% endif %}
                        {% endif %}
                    {% endfor %}
                {% endif %}
                {% if scheduleSize == 0 %}
                    <span class="label label-danger">Schedule Missing or Inactive</span>
                {% endif %}
        </div>
        {% endfor %}
        </div>
    {% else %}
    <span class="label label-danger">Location and Schedule Missing</span><br>
    {% endif %}
</dl>
</div>


Add to Group Type

We’re going to include the lava template in each group type that you may use check in on. For us, we have a few group types that do check in, so we do this for each. 

  • Go to Admin Tools > General Settings > Group Types and then click on the name of the group type you want to add this to (repeat the steps below for each). We’d recommend doing this at least for event groups and volunteer serving team groups.
  • Scroll to the Display Options at the bottom, focusing on the Group View Lava template. Anything we place here will show up on the staff view of the group page.
  • Between the opening div with a class of row, and the first child div, use a lava include to include the file that was uploaded. If the upload path of that file was the same as ours, it would be: {% include "~/Content/Lava/checkInLocations.lava" %}

template.png

  • After saving, all groups of this type should have a Check-In locations summary like the examples below. Schedules have tooltips so you can read when they will be next active.

example1.png

  • Schedules with a red dot are currently open for check in. If someone tells me check in isn’t working on their group, I check this first to see if it should be. If there’s no red dot, we set something up wrong. 

example2.png

  • Each “well (bootstrap term)” is a location + schedules group, so if one campus has multiple locations set up, they are currently broken out into individual locations, not grouped by campus. Here’s an example from our 5th grade check in group.

example3.png

The locations and schedules are clickable if the person has rights to edit them, making it fast to adjust settings on the location or schedule. You may need to modify page paths in the lava template to reflect your setup.


If you make any helpful modifications to the template, we’d love to know. Send me an email at zack.dutra@baysideonline.com.