// ReportForm function js

var RF = {};

RF.init = function (operationId, taskKey, replyNo, processKey, phaseNo) {
    // COMMON.checkAuth(true);
    RF.loadCommon();

    RF.initFormView();
};

RF.loadCommon = function () {
    $('#includedHeader').load('../html/common/header.html', function () {
        I18N.initi18n();
        HEADER.init();
    });
    $('#includedConfirmModal').load('../html/common/confirm-modal.html', function () {
        I18N.initi18n();
    });
};

RF.initFormView = function () {
    const urlParameterList = COMMON.getUrlParameter();
    const operationId = urlParameterList['operationId'];
    if (operationId) {
        let params = {};
        params.sid = COMMON.getSid();
        params.operationId = operationId;
        // params.taskKey = taskKey;
        // params.replyNo = replyNo;
        // params.processKey = processKey;
        // params.phaseNo = phaseNo;
        const url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.HTML.BASE + CONSTANT.URL.CMS.HTML.LIST_REPORT_FORM;
        $('#report-form').load(url, params);
    } else {
        COMMON.displayAlert('error');
        COMMON.avwScreenMove('taskList.html');
    }
};
