/**
 * common js of top page.
 * top page is dashboard and operationList.
 *
 * @since cms:1.4.3.2&1.4.3.3 web:1.0
 */

var TOP = {};

$(document).ready(function () {
    //Check if user is logged in
    COMMON.checkAuth(false);

    //setting msg of html
    TOP.init();
});

/**
 * show page
 */
TOP.init = function () {
    const urlParameterList = COMMON.getUrlParameter();
    if (urlParameterList && urlParameterList.pageId == CONSTANT.PAGE_NAME.OPERATION_LIST) {
        //index with param page
        HEADER.goOperationList();
    } else {
        //go homepage by dashboard setting
        HEADER.goToHomePage();
    }
    COMMON.closeLoading();
};
