/**
 * constant js
 *
 * @since 1.4.3.2 & 1.4.3.3
 */
const CONSTANT = {};

CONSTANT.DEVICE_TYPE = {
    WEB: 4,
};
CONSTANT.SORT_TYPE = {
    NAME: 0,
    START_DATE_DESC: 1,
    START_DATE_ASC: 2,
    TYPE: 3,
    LAST_EDIT_DATE: 4,
};

CONSTANT.PAGE_NAME = {
    DASHBOARD: 'dashboard',
    OPERATION_LIST: 'workList',
    REPORT_LIST: 'reportList',
    DEFAULT: 'index.html',
    LOGIN: './login.html',
};

CONSTANT.URL_TREE_NAME = {
    OPERATION_LIST: 'index.html',
    DASHBOARD: 'dashboard.html',
    REPORT_FORM: 'reportForm.html',
    REPORT_LIST: 'reportList.html',
    MESSAGE_DETAIL: 'pushMessageDetail.html',
    MESSAGE_LIST: 'pushMessageList.html',
    SEND_MESSAGE: 'sendMessage.html',
    SETTING: 'accountSetting.html',
    PICKUP: 'pickup.html',
    PDF_PRINT: 'pdfPrint.html',
};

CONSTANT.URL_TREE_PASS = {
    1: [CONSTANT.URL_TREE_NAME.DASHBOARD, CONSTANT.URL_TREE_NAME.PICKUP, CONSTANT.URL_TREE_NAME.REPORT_LIST, CONSTANT.URL_TREE_NAME.REPORT_FORM],
    2: [CONSTANT.URL_TREE_NAME.DASHBOARD, CONSTANT.URL_TREE_NAME.PICKUP, CONSTANT.URL_TREE_NAME.REPORT_FORM],
    3: [CONSTANT.URL_TREE_NAME.DASHBOARD, CONSTANT.URL_TREE_NAME.MESSAGE_LIST, CONSTANT.URL_TREE_NAME.MESSAGE_DETAIL],
    4: [CONSTANT.URL_TREE_NAME.DASHBOARD, CONSTANT.URL_TREE_NAME.SEND_MESSAGE],
    5: [CONSTANT.URL_TREE_NAME.OPERATION_LIST, CONSTANT.URL_TREE_NAME.REPORT_LIST, CONSTANT.URL_TREE_NAME.REPORT_FORM],
    6: [CONSTANT.URL_TREE_NAME.OPERATION_LIST, CONSTANT.URL_TREE_NAME.REPORT_LIST, CONSTANT.URL_TREE_NAME.PDF_PRINT],
};

CONSTANT.PAGE_TAB = {
    DASHBOARD: 'dashboard',
    OPERATION_LIST: 'operationList',
};

CONSTANT.REPORT_TYPE = {
    REPORT: '0',
    ROUTINE: '1',
    ANSWER: '2',
    WORKFLOW: '3',
};

CONSTANT.REPORT_TYPE_INT = {
    REPORT: 0,
    ROUTINE: 1,
    ANSWER: 2,
    WORKFLOW: 3,
};

CONSTANT.ADD_REPORT_FLG = {
    UNABLE: '0',
    ABLE: '1',
};

CONSTANT.REPLY_NO = {
    REPORT: '0',
    ANSWER: '1',
};

CONSTANT.URL = {
    CMS: {
        API: {
            ALL_OPERATION_LIST: 'operationListWeb/getOperationList',
            AUTH_SESSION: 'getSession/checkAuthUser',
            OPERATION_VIEW_LOG: 'operationViewLog/saveLog',
            PASSWORD_CHANGE: 'passwordChangeWeb/',
            LOGIN: 'webClientLogin/',
            LOGOUT: 'logoutWeb/',
            DASHBOARD: 'dashboard/',
            DASHBOARD_SETTING: 'dashboardSetting/',
            SAVE_DASHBOARD_SETTING: 'saveDashboardSetting/',
            PUSH_MESSAGE_TEMPLATE: 'pushMessageTemplate/',
            OPERATION_SELECT: 'operationSelect/',
            NEW_REPORT: 'newReport/',
            WORKING_FLOW: 'workingFlow/',
            WARNING_WITH_REPORT: 'warningWithReport/',
            PUSH_MESSAGE_DETAIL: 'pushMessageDetail/',
            PUSH_MESSAGE_LIST: 'pushMessageList/',
            SEND_PUSH_MESSAGE: 'sendPushMessage/',
            IS_QUICK_REPORT: 'getOperationData/isQuickReport',
        },
        HTML: {
            BASE: 'html/',
            TASK_REPORT_LIST: 'getTaskReport/',
            LIST_REPORT_FORM: 'listReportForm/showReport',
            REPORT_LIST: 'reportList',
            QUICK_REPORT_PRINT: 'quickReportPrintWeb/',
        },
    },
    WEB: {
        BASE: 'http://127.0.0.1:5500/abweb/html/',
        OPERATION_LIST: 'index',
    },
};

CONSTANT.HTTP_STATUS = {
    FORBIDDEN: '403',
    UNAUTHORIZED: '401',
    OK: '200',
    SERVER_ERROR: '500',
};

CONSTANT.LANG = {
    SAVE_NAME: 'lang',
    JAPAN: 'ja',
    KOREA: 'ko',
    ENGLISH: 'en',
};

CONSTANT.KEYS = {
    userInfo_loginId: 'loginId',
    // Local: UserInfo_Account Path: String
    userInfo_accountPath: 'accountPath',
    // Local: UserInfo_Account Information Storage Flag: Char (Y: Yes, N: No)
    userInfo_rememberLogin: 'rememberLogin',
    // Local: UserInfo_Last login date and time: Datetime
    userInfo_lastLoginTime: 'lastLoginTime',
    // Local: UserInfo_Password Skip Date and Time: Datetime
    userInfo_pwdSkipDt: 'pwdSkipDt',
    // Local: User Options (userOpt)_Video Repeated Flag: Interger (0: No Repeated, 1: Repeated)
    // Session/local:UserInfo_Session ID:String
    userInfo_sid: 'sid',
    userInfo_sid_local: 'sid_local',
    userInfo_sid_preview: 'sidPreview',
    // Session: Enterprise Option (serviceOpt)_Forced password change on first login: Integer (0: None, 1: Urgent, 2: Forced)
    serviceOpt_force_pw_change_on_login: 'force_pw_change_on_login',
    // Session: Enterprise Option (serviceOpt)_Forced password change on periodic login: Integer (0: None, 1: Urgent, 2: Forced)
    serviceOpt_force_pw_change_periodically: 'force_pw_change_periodically',
    // Session: Enterprise Options (serviceOpt)_Using Memo Marking Data Backup: Char (Y: Yes, N: No)
    userInfo_userName: 'userInfo_userName',
    // Local:Session ID: String
    userInfo_sid_bak: 'sid_bak',
    // Session: Notification Information (pushInfo)_Number of new arrivals: Interger
    pushInfo_newMsgNumber: 'pushInfo_newMsgNumber',
    conf_apiUrl: 'conf_apiUrl',
    conf_apiLoginUrl: 'conf_apiLoginUrl',
    conf_checkApiUrl: 'conf_checkApiUrl',
    conf_apiResourceDlUrl: 'conf_apiResourceDlUrl',
    // Session :ABookCheck:Char (Y: Yes, N: No)
    serviceOpt_abook_check: 'abook_check',
    // Session :Chat Function:Char (Y: Yes, N: No)
    serviceOpt_chat_function: 'chat_function',
    // Session: Enterprise Option (serviceOpt)_Any push message: Char (Y: Yes, N: No)
    serviceOpt_usable_push_message: 'usable_push_message',
    // Local
    IsJumpBack: 'IsJumpBack',
    // Local:
    JumpQueue: 'JumpQueue',
};
