{"id":22,"date":"2025-12-07T15:17:38","date_gmt":"2025-12-07T15:17:38","guid":{"rendered":"https:\/\/app.zhr.pl\/?page_id=22"},"modified":"2025-12-07T15:17:38","modified_gmt":"2025-12-07T15:17:38","slug":"kalendarz-rezerwacji","status":"publish","type":"page","link":"https:\/\/app.zhr.pl\/index.php\/kalendarz-rezerwacji\/","title":{"rendered":"Kalendarz rezerwacji"},"content":{"rendered":"    <div class=\"room-hourly-calendar-wrapper\">\n        <div class=\"mb-3\">\n            <label for=\"calendar-building\" class=\"form-label\">Wybierz budynek:<\/label>\n            <select id=\"calendar-building\" class=\"form-select\">\n                                    <option value=\"7\">\n                        OKR\u0118G                    <\/option>\n                            <\/select>\n        <\/div>\n        \n        <div class=\"mb-3\">\n            <label for=\"calendar-date\" class=\"form-label\">Wybierz dat\u0119:<\/label>\n            <input type=\"date\" id=\"calendar-date\" class=\"form-control\" value=\"2026-09-06\">\n        <\/div>\n        \n        <div id=\"calendar-results\" class=\"mt-4\">\n            <p class=\"text-muted\">Wybierz budynek i dat\u0119, aby zobaczy\u0107 dost\u0119pno\u015b\u0107.<\/p>\n        <\/div>\n    <\/div>\n    \n    <script>\n    jQuery(document).ready(function($) {\n        function loadCalendar() {\n            var buildingId = $('#calendar-building').val();\n            var date = $('#calendar-date').val();\n            \n            if (!buildingId || !date) return;\n            \n            $('#calendar-results').html('<p class=\"text-muted\">\u0141adowanie...<\/p>');\n            \n            $.ajax({\n                url: roomHourly.ajaxUrl,\n                type: 'POST',\n                data: {\n                    action: 'room_hourly_get_calendar',\n                    building_id: buildingId,\n                    date: date,\n                    nonce: roomHourly.nonce\n                },\n                success: function(response) {\n                    if (response.success) {\n                        $('#calendar-results').html(response.data.html);\n                    } else {\n                        $('#calendar-results').html('<div class=\"alert alert-danger\">' + response.data.message + '<\/div>');\n                    }\n                },\n                error: function() {\n                    $('#calendar-results').html('<div class=\"alert alert-danger\">B\u0142\u0105d \u0142adowania kalendarza.<\/div>');\n                }\n            });\n        }\n        \n        $('#calendar-building, #calendar-date').on('change', loadCalendar);\n        loadCalendar();\n    });\n    <\/script>\n    \n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-22","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/app.zhr.pl\/index.php\/wp-json\/wp\/v2\/pages\/22","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/app.zhr.pl\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/app.zhr.pl\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/app.zhr.pl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/app.zhr.pl\/index.php\/wp-json\/wp\/v2\/comments?post=22"}],"version-history":[{"count":1,"href":"https:\/\/app.zhr.pl\/index.php\/wp-json\/wp\/v2\/pages\/22\/revisions"}],"predecessor-version":[{"id":23,"href":"https:\/\/app.zhr.pl\/index.php\/wp-json\/wp\/v2\/pages\/22\/revisions\/23"}],"wp:attachment":[{"href":"https:\/\/app.zhr.pl\/index.php\/wp-json\/wp\/v2\/media?parent=22"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}