$(document).ready(function () {
    $("#btnClosePanel").on('click', function () {
        IndexLibrary.ClosePanel(null);
    })
    IndexLibrary.NotifyLoad();
});

function SaveWorkType() {
    IndexLibrary.GetExtensionConfig()
        .then(async function (config) {
            var baseAPIUrl = config.apiBaseUrl;
            var workType = $("#txtWorkTypeName").val();
            var workTypeColor = $("#workTypeColor").val();
            var isDefault = $("#chkIsDefault").is(':checked');
            var isEffortIncluded = $("#chkIsEffortIncluded").is(':checked');
            await IndexLibrary.SaveWorkType(workType, workTypeColor, isDefault, isEffortIncluded, baseAPIUrl);
        });
}