예제 #1
0
def create_comms_channel_action(headline_post):
    if headline_post.comms_channel:
        # No need to create an action, channel already exists
        return None
    return Button(
        ":speaking_head_in_silhouette: Create Comms Channel",
        HeadlinePost.CREATE_COMMS_CHANNEL_BUTTON,
        value=headline_post.incident.pk,
    )
예제 #2
0
def create_zoom_meeting(headline_post):
    if headline_post.incident.report_only:
        # Reports don't link to zoom meeting
        return None
    if headline_post.zoom_meeting:
        # No need to create an action, channel already exists
        return None
    return Button(
        ":telephone_receiver: Create Zoom Meeting",
        HeadlinePost.CREATE_ZOOM_MEETING_BUTTON,
        value=headline_post.incident.pk,
    )
예제 #3
0
def create_comms_channel_action(headline_post):
    if headline_post.incident.report_only:
        # Reports don't link to comms channels
        return None
    if headline_post.comms_channel:
        # No need to create an action, channel already exists
        return None
    return Button(
        ":slack: Create Incident Room",
        HeadlinePost.CREATE_COMMS_CHANNEL_BUTTON,
        value=headline_post.incident.pk,
    )
예제 #4
0
def close_incident_button(headline_post):
    return Button(
        ":white_check_mark: Close",
        HeadlinePost.CLOSE_INCIDENT_BUTTON,
        value=headline_post.incident.pk,
    )
예제 #5
0
def edit_incident_button(headline_post):
    return Button(
        ":pencil2: Edit",
        HeadlinePost.EDIT_INCIDENT_BUTTON,
        value=headline_post.incident.pk,
    )