def to_first(account_id, ____, __, ___): fmt = _("Please select \"Record\" on the bottom of " "the menu each time when you clock in and clock out.") content = make_i18n_text("Please select \"Record\" on the bottom of the " "menu each time when you clock in and clock out.", "to_first", fmt) yield push_message(account_id, content)
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)
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)
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")
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)