Esempio n. 1
0
def confirm_in(account_id, current_date, create_time, callback):
    content = yield deal_confirm_in(account_id, create_time, callback)
    yield push_message(account_id, content)

    insert_replace_status_by_user_date(account_id,
                                       current_date,
                                       status="in_done",
                                       process="sign_in_done")
Esempio n. 2
0
def direct_sign_in(account_id, current_date, sign_time, _):
    """
    Handle the user's direct check-in.

    :param account_id: user account id.
    :param current_date: current date by local time.
    :param sign_time: Time when the user clicks to check-in.
    :param _: no use
    """
    content = yield deal_sign_in(account_id, current_date, sign_time)

    yield push_message(account_id, content)
Esempio n. 3
0
def sign_out(account_id, current_date, _, __):
    """
    Handle the user's check-out.

    :param account_id: user account id.
    :param current_date: current date by local time.
    :param _: no use
    :param __: no use
    """

    content = yield sign_out_content(account_id, current_date)

    yield push_message(account_id, content)
Esempio n. 4
0
def confirm_in(account_id, current_date, create_time, callback):
    """
    This function is triggered when the user clicks confirm check-in.
    Update user's input reminder status, progress.

    :param account_id: user account id.
    :param current_date: current date by local time.
    :param create_time: Time the request arrived at the server.
    :param callback: User triggered callback.
    :return: None
    """

    content = yield deal_confirm_in(account_id, create_time, callback)
    yield push_message(account_id, content)

    insert_replace_status_by_user_date(account_id,
                                       current_date,
                                       status="in_done",
                                       process="sign_in_done")
Esempio n. 5
0
def sign_in(account_id, current_date, _, __):
    content = yield sign_in_content(account_id, current_date)

    yield push_message(account_id, content)
Esempio n. 6
0
def to_first(account_id, _, __, ___):
    content = to_first_content()
    yield push_message(account_id, content)
Esempio n. 7
0
def to_first(account_id, _, __, ___):
    content = make_text("Please select \"Record\" on the bottom of "
                        "the menu each time when you clock in and clock out.")
    yield push_message(account_id, content)
def direct_sign_out(account_id, current_date, sign_time, _):
    content = yield deal_sign_out(account_id, current_date, sign_time)

    yield push_message(account_id, content)