def query_security(account_id, __, ___):
    """
    This function deals with user query security related problems.

    :param account_id: user account id.
    """
    status, __, type, message = get_user_status(account_id)
    if status == "wait_in":
        set_user_status(account_id, status="none")

    fmt = _("Here are FAQs about security.")
    text = make_i18n_text("Here are FAQs about security.", "query_security", fmt)

    fmt = _("Send a question")
    replay = create_quick_replay_item("transfer_security", "query_security",
                                      "Send a question", fmt)

    labels = ["See more", "See more", "See more", "See more"]

    fmt = _("See more")
    i18n_label_fmts = [fmt, fmt, fmt, fmt]

    titles = [
        "I lost my access card.",
        "My access card has been damaged.",
        "Can visitors enter the office?",
        "I can’t remember my computer password."
    ]
    
    i18n_title_fmts = [
        _("I lost my access card."),
        _("My access card has been damaged."),
        _("Can visitors enter the office?"),
        _("I con’t remember my computer password.")
    ]
    texts = [
        "Contact the Security Team to reissue your access card.",
        "Contact the Security Team to reissue your access card.",
        "Contact the Security Team in advance to gain access.",
        "Contact the Security Team to change your computer password."
    ]

    fmt = _("Contact the Security Team to reissue your access card.")
    i18n_text_fmts = [
        fmt,
        fmt,
        _("Contact the Security Team in advance to gain access."),
        _("Contact the Security Team to change your computer password.")
    ]

    carousel = create_carousel("query_security", labels,
                               POST_BACK_URLS["security"], texts, titles,
                               CAROUSEL["security"],
                               fmt_labels=i18n_label_fmts,
                               fmt_texts=i18n_text_fmts,
                               fmt_titles=i18n_title_fmts)

    carousel["quickReply"] = replay

    yield push_messages(account_id, [text, carousel])
Beispiel #2
0
def query_welfare(account_id, __, ___):
    """
    This function deals with user query welfare related problems.

    :param account_id: user account id.
    """
    fmt = _("Here are FAQs about welfare and work support.")
    text = make_i18n_text("Here are FAQs about welfare and work support.",
                          "query_welfare", fmt)

    fmt = _("Send a question")
    replay = create_quick_replay_item("transfer_welfare", "query_welfare",
                                      "Send a question", fmt)

    labels = ["See more", "See more", "See more", "See more"]

    fmt = _("See more")
    i18n_label_fmts = [fmt, fmt, fmt, fmt]

    titles = [
        "The types of in-house welfare.",
        "What kinds of in-house clubs are there?", "Can I use a company car?",
        "How can I receive office supplies?"
    ]

    i18n_title_fmts = [
        _("The types of in-house welfare."),
        _("What kinds of in-house clubs are there?"),
        _("Can I use a company car?"),
        _("How can I receive office supplies?")
    ]

    texts = [
        "Welfare includes the four main insurances, checkup, etc.",
        "A variety of club activities such as sports are supported.",
        "Contact the Work Support Team to request a company car.",
        "Visit the Work Support Team to receive office supplies."
    ]

    i18n_text_fmts = [
        _("Welfare includes the four main insurances, checkup, etc."),
        _("A variety of club activities such as sports are supported."),
        _("Contact the Work Support Team to request a company car."),
        _("Visit the Work Support Team to receive office supplies.")
    ]

    carousel = create_carousel("query_welfare",
                               labels,
                               POST_BACK_URLS["welfare"],
                               texts,
                               titles,
                               CAROUSEL["welfare"],
                               fmt_labels=i18n_label_fmts,
                               fmt_texts=i18n_text_fmts,
                               fmt_titles=i18n_title_fmts)

    carousel["quickReply"] = replay

    yield push_messages(account_id, [text, carousel])
Beispiel #3
0
def query_leave(account_id, __, ___):
    """
    This function deals with the problems related to leave query.

    :param account_id: user account id.
    """
    fmt = _("Here are FAQs about HR and leave.")
    text = make_i18n_text("Here are FAQs about HR and leave.", "query_leave",
                          fmt)

    fmt = _("Send a question")
    replay = create_quick_replay_item("transfer_leave", "query_leave",
                                      "Send a question", fmt)

    labels = ["See more", "See more", "See more", "See more"]

    fmt = _("See more")
    i18n_label_fmts = [fmt, fmt, fmt, fmt]

    titles = [
        "The types of leave.", "How many days of leave I have?",
        "To request a leave.", "To cancel my leave."
    ]

    i18n_title_fmts = [
        _("The types of leave."),
        _("How many days of leave I have?"),
        _("To request a leave."),
        _("To cancel my leave.")
    ]

    texts = [
        "Types of leave are classified in the Labor Standards Act.",
        "The remaining days of your leave are on in-house browser.",
        "You can request a leave via the in-house browser.",
        "You can cancel your leave request via the in-house browser."
    ]

    i18n_text_fmts = [
        _("Types of leave are classified in the Labor Standards Act."),
        _("The remaining days of your leave are on in-house browser."),
        _("You can request a leave via the in-house browser."),
        _("You can cancel your leave request via the in-house browser.")
    ]

    carousel = create_carousel("query_leave",
                               labels,
                               POST_BACK_URLS["leave"],
                               texts,
                               titles,
                               CAROUSEL["leave"],
                               fmt_labels=i18n_label_fmts,
                               fmt_texts=i18n_text_fmts,
                               fmt_titles=i18n_title_fmts)

    carousel["quickReply"] = replay

    yield push_messages(account_id, [text, carousel])
Beispiel #4
0
def query_leave(account_id, __, ___):
    """
    This function deals with the problems related to leave query.

    :param account_id: user account id.
    """
    text = make_text("Here are FAQs about HR and leave.")

    replay = create_quick_replay_item("transfer_leave",
                                      "Ask a charge")

    labels = ["more", "more", "more", "more"]

    """
    replay = create_quick_replay_item("transfer_leave",
                                      "Ask a person in charge")
    labels = ["See more", "See more", "See more", "See more"]
    titles = [
        "I would like to know the types of leave.",
        "I would like to know how many days of leave I have.",
        "I would like to request a leave.",
        "I would like to cancel my leave request."
    ]
    """
    titles = [
        "I would  of leave.",
        "I would leave I have.",
        "I would a leave.",
        "I would leave request."
    ]
    """
    texts = [
        "Leave including annual leave, paid leave, etc. "
        "is granted according to the Labor Standards Act.",
        "You can check the remaining days of your leave via "
        "the in-house browser.",
        "You can request a leave via the in-house browser.",
        "You can cancel your leave request via the in-house browser."
    ]
    """
    texts = [
        "Leave including to the Labor Standards Act.",
        "You can check the remain browser.",
        "You can request a leave via the in-house browser.",
        "You can cancel your leave in-house browser."
    ]

    carousel = create_carousel(labels, POST_BACK_URLS["leave"],
                    texts, CAROUSEL["leave"], titles)

    carousel["quickReply"] = replay

    yield push_messages(account_id, [text, carousel])
Beispiel #5
0
def query_welfare(account_id, __, ___):
    """
    This function deals with user query welfare related problems.

    :param account_id: user account id.
    """
    text = make_text("Here are FAQs about welfare and work support.")

    replay = create_quick_replay_item("transfer_welfare", "Ask a charge")
    labels = ["more", "more", "more", "more"]
    """
    labels = ["See more", "See more", "See more", "See more"]
    replay = create_quick_replay_item("transfer_welfare",
                                      "Ask a person in charge")
    titles = [
        "I would like to know the types of in-house welfare.",
        "What kinds of in-house clubs are there?",
        "Can I use a company car?",
        "How can I receive office supplies?"
    ]
    """

    titles = [
        "I would welfare.", "What clubs are there?", "Can I company car?",
        "How can office supplies?"
    ]
    """
    texts = [
        "In-house welfare includes the four main insurances, "
        "medical checkup, in-house clubs, etc.",
        "The company is supporting a variety of club activities "
        "such as sports, self-development, etc.",
        "Contact the Work Support Team to request a company car.",
        "Visit the Work Support Team to receive office supplies."
    ]
    """
    texts = [
        "In-house welfare in-house clubs, etc.",
        "The company is self-development, etc.",
        "Contact the to request a company car.",
        "Visit the  to receive office supplies."
    ]

    carousel = create_carousel(labels, POST_BACK_URLS["welfare"], texts,
                               CAROUSEL["welfare"], titles)

    carousel["quickReply"] = replay

    yield push_messages(account_id, [text, carousel])