{"id":1969,"date":"2026-05-13T09:59:39","date_gmt":"2026-05-13T09:59:39","guid":{"rendered":"https:\/\/webthly.com\/mr-klinika\/?page_id=1969"},"modified":"2026-05-13T10:19:18","modified_gmt":"2026-05-13T10:19:18","slug":"smjene","status":"publish","type":"page","link":"https:\/\/webthly.com\/mr-klinika\/smjene\/","title":{"rendered":"Smjene"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"1969\" class=\"elementor elementor-1969\">\n\t\t\t\t<div class=\"elementor-element elementor-element-0b9420d e-flex e-con-boxed e-con e-parent\" data-id=\"0b9420d\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-9d23e99 elementor-widget elementor-widget-html\" data-id=\"9d23e99\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<!-- STRANICA ZA SMJENE V1.1 - SA DEMO PODACIMA ZA KLIJENTA -->\r\n<div class=\"shifts-wrapper\" style=\"font-family: 'Inter', sans-serif; padding: 20px; max-width: 800px; margin: 0 auto; color: #1e293b;\">\r\n    \r\n    <div style=\"text-align: center; margin-bottom: 40px;\">\r\n        <h2 style=\"font-weight: 800; color: #1e293b; margin-bottom: 10px;\">Raspored Smjena<\/h2>\r\n        <div style=\"display: inline-block; padding: 5px 15px; background: #f1f5f9; border-radius: 20px; font-size: 0.9rem; color: #64748b;\">\r\n            Sestre: Milica, Irena, Zorana\r\n        <\/div>\r\n    <\/div>\r\n\r\n    <!-- PRIKAZ ZA DANAS -->\r\n    <div style=\"background: white; border-radius: 20px; padding: 25px; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05); border: 1px solid #e2e8f0; margin-bottom: 30px;\">\r\n        <h3 style=\"margin-top: 0; font-size: 1.1rem; border-bottom: 2px solid #f1f5f9; padding-bottom: 10px; margin-bottom: 20px;\">\r\n            \ud83d\udcc5 Danas: <span id=\"today-date-label\" style=\"color: #ea1c82;\">...<\/span>\r\n        <\/h3>\r\n        <div id=\"today-display\" style=\"display: grid; grid-template-columns: 1fr 1fr; gap: 20px;\">\r\n            <div style=\"background: #fdf2f8; padding: 15px; border-radius: 12px; border-left: 4px solid #ea1c82;\">\r\n                <div style=\"font-size: 0.75rem; font-weight: 700; color: #ea1c82; text-transform: uppercase;\">Prva Smjena<\/div>\r\n                <div id=\"today-s1\" style=\"font-weight: 700; margin-top: 5px; color: #1e293b;\">Milica, Irena<\/div>\r\n            <\/div>\r\n            <div style=\"background: #f8fafc; padding: 15px; border-radius: 12px; border-left: 4px solid #64748b;\">\r\n                <div style=\"font-size: 0.75rem; font-weight: 700; color: #64748b; text-transform: uppercase;\">Druga Smjena<\/div>\r\n                <div id=\"today-s2\" style=\"font-weight: 700; margin-top: 5px; color: #1e293b;\">Zorana<\/div>\r\n            <\/div>\r\n        <\/div>\r\n    <\/div>\r\n\r\n    <!-- FORMA ZA SUTRA -->\r\n    <div style=\"background: white; border-radius: 20px; padding: 25px; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05); border: 2px solid #ea1c82;\">\r\n        <h3 style=\"margin-top: 0; font-size: 1.1rem; margin-bottom: 5px;\">\ud83d\udcdd Popuni smjene za sutra<\/h3>\r\n        <p id=\"tomorrow-date-label\" style=\"font-size: 0.9rem; color: #64748b; margin-bottom: 25px;\">...<\/p>\r\n\r\n        <form id=\"shift-form\">\r\n            <div style=\"margin-bottom: 25px;\">\r\n                <label style=\"display: block; font-weight: 700; margin-bottom: 10px; color: #ea1c82;\">Ko radi PRVU smjenu? (Ozna\u010di dvije)<\/label>\r\n                <div style=\"display: flex; gap: 10px; flex-wrap: wrap;\">\r\n                    <label class=\"check-btn\"><input type=\"checkbox\" name=\"shift1\" value=\"Milica\"> Milica<\/label>\r\n                    <label class=\"check-btn\"><input type=\"checkbox\" name=\"shift1\" value=\"Irena\"> Irena<\/label>\r\n                    <label class=\"check-btn\"><input type=\"checkbox\" name=\"shift1\" value=\"Zorana\"> Zorana<\/label>\r\n                <\/div>\r\n            <\/div>\r\n\r\n            <div style=\"margin-bottom: 30px;\">\r\n                <label style=\"display: block; font-weight: 700; margin-bottom: 10px; color: #64748b;\">Ko radi DRUGU smjenu? (Ozna\u010di jednu)<\/label>\r\n                <div style=\"display: flex; gap: 10px; flex-wrap: wrap;\">\r\n                    <label class=\"check-btn secondary\"><input type=\"checkbox\" name=\"shift2\" value=\"Milica\"> Milica<\/label>\r\n                    <label class=\"check-btn secondary\"><input type=\"checkbox\" name=\"shift2\" value=\"Irena\"> Irena<\/label>\r\n                    <label class=\"check-btn secondary\"><input type=\"checkbox\" name=\"shift2\" value=\"Zorana\"> Zorana<\/label>\r\n                <\/div>\r\n            <\/div>\r\n\r\n            <button type=\"submit\" id=\"save-btn\" style=\"width: 100%; padding: 15px; background: #ea1c82; color: white; border: none; border-radius: 12px; font-weight: 700; font-size: 1rem; cursor: pointer; box-shadow: 0 4px 12px rgba(234, 28, 130, 0.3);\">\r\n                Sa\u010duvaj raspored za sutra\r\n            <\/button>\r\n        <\/form>\r\n    <\/div>\r\n<\/div>\r\n\r\n<style>\r\n    .check-btn {\r\n        background: #f1f5f9;\r\n        padding: 10px 20px;\r\n        border-radius: 10px;\r\n        cursor: pointer;\r\n        display: flex;\r\n        align-items: center;\r\n        gap: 10px;\r\n        font-weight: 600;\r\n        transition: 0.2s;\r\n        border: 2px solid transparent;\r\n        user-select: none;\r\n    }\r\n    .check-btn input { width: 18px; height: 18px; accent-color: #ea1c82; cursor: pointer; }\r\n    .check-btn:hover { background: #e2e8f0; }\r\n    .check-btn:has(input:checked) {\r\n        background: #fdf2f8;\r\n        border-color: #ea1c82;\r\n        color: #ea1c82;\r\n    }\r\n    .check-btn.secondary:has(input:checked) {\r\n        background: #f8fafc;\r\n        border-color: #64748b;\r\n        color: #1e293b;\r\n    }\r\n<\/style>\r\n\r\n<script>\r\n(function() {\r\n    const DB_URL = \"https:\/\/mr-klinika-default-rtdb.europe-west1.firebasedatabase.app\/shifts\";\r\n    const shiftForm = document.getElementById('shift-form');\r\n    \r\n    const now = new Date();\r\n    const offset = now.getTimezoneOffset() * 60000;\r\n    const today = new Date(now - offset);\r\n    const tomorrow = new Date(today);\r\n    tomorrow.setDate(tomorrow.getDate() + 1);\r\n\r\n    const todayISO = today.toISOString().split('T')[0];\r\n    const tomorrowISO = tomorrow.toISOString().split('T')[0];\r\n\r\n    document.getElementById('today-date-label').innerText = todayISO.split('-').reverse().join('.');\r\n    document.getElementById('tomorrow-date-label').innerText = \"Datum: \" + tomorrowISO.split('-').reverse().join('.');\r\n\r\n    async function loadShifts() {\r\n        try {\r\n            const res = await fetch(`${DB_URL}.json`);\r\n            const data = await res.json();\r\n            \r\n            \/\/ Ako postoje podaci u bazi za danas, pregazi demo tekst\r\n            if (data && data[todayISO]) {\r\n                document.getElementById('today-s1').innerText = (data[todayISO].s1 || []).join(', ');\r\n                document.getElementById('today-s2').innerText = (data[todayISO].s2 || []).join(', ');\r\n            } \r\n            \/\/ Ako nema u bazi, ostaje hardkodovano: Milica, Irena \/ Zorana\r\n\r\n            if (data && data[tomorrowISO]) {\r\n                data[tomorrowISO].s1.forEach(name => {\r\n                    const cb = document.querySelector(`input[name=\"shift1\"][value=\"${name}\"]`);\r\n                    if(cb) cb.checked = true;\r\n                });\r\n                data[tomorrowISO].s2.forEach(name => {\r\n                    const cb = document.querySelector(`input[name=\"shift2\"][value=\"${name}\"]`);\r\n                    if(cb) cb.checked = true;\r\n                });\r\n            }\r\n        } catch (e) { console.error(e); }\r\n    }\r\n\r\n    shiftForm.onsubmit = async (e) => {\r\n        e.preventDefault();\r\n        const s1 = Array.from(document.querySelectorAll('input[name=\"shift1\"]:checked')).map(cb => cb.value);\r\n        const s2 = Array.from(document.querySelectorAll('input[name=\"shift2\"]:checked')).map(cb => cb.value);\r\n\r\n        if (s1.length !== 2 || s2.length !== 1) {\r\n            alert(\"Gre\u0161ka: Prva smjena mora imati ta\u010dno 2 osobe, a druga ta\u010dno 1 osobu.\");\r\n            return;\r\n        }\r\n\r\n        const saveBtn = document.getElementById('save-btn');\r\n        saveBtn.innerText = \"\u010cuvanje...\";\r\n        saveBtn.disabled = true;\r\n\r\n        try {\r\n            await fetch(`${DB_URL}\/${tomorrowISO}.json`, {\r\n                method: 'PUT',\r\n                body: JSON.stringify({ s1, s2 })\r\n            });\r\n            alert(\"Uspje\u0161no sa\u010duvano za sutra!\");\r\n            location.reload();\r\n        } catch (e) {\r\n            alert(\"Gre\u0161ka pri \u010duvanju.\");\r\n        } finally {\r\n            saveBtn.innerText = \"Sa\u010duvaj raspored za sutra\";\r\n            saveBtn.disabled = false;\r\n        }\r\n    };\r\n\r\n    loadShifts();\r\n})();\r\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Raspored Smjena Sestre: Milica, Irena, Zorana \ud83d\udcc5 Danas: &#8230; Prva Smjena Milica, Irena Druga Smjena Zorana \ud83d\udcdd Popuni smjene za sutra &#8230; Ko radi PRVU [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"footnotes":""},"class_list":["post-1969","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Smjene -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webthly.com\/mr-klinika\/smjene\/\" \/>\n<meta property=\"og:locale\" content=\"bs_BA\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Smjene -\" \/>\n<meta property=\"og:description\" content=\"Raspored Smjena Sestre: Milica, Irena, Zorana \ud83d\udcc5 Danas: &#8230; Prva Smjena Milica, Irena Druga Smjena Zorana \ud83d\udcdd Popuni smjene za sutra &#8230; Ko radi PRVU [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webthly.com\/mr-klinika\/smjene\/\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-13T10:19:18+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/webthly.com\\\/mr-klinika\\\/smjene\\\/\",\"url\":\"https:\\\/\\\/webthly.com\\\/mr-klinika\\\/smjene\\\/\",\"name\":\"Smjene -\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/webthly.com\\\/mr-klinika\\\/#website\"},\"datePublished\":\"2026-05-13T09:59:39+00:00\",\"dateModified\":\"2026-05-13T10:19:18+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/webthly.com\\\/mr-klinika\\\/smjene\\\/#breadcrumb\"},\"inLanguage\":\"bs-BA\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/webthly.com\\\/mr-klinika\\\/smjene\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/webthly.com\\\/mr-klinika\\\/smjene\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/webthly.com\\\/mr-klinika\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Smjene\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/webthly.com\\\/mr-klinika\\\/#website\",\"url\":\"https:\\\/\\\/webthly.com\\\/mr-klinika\\\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/webthly.com\\\/mr-klinika\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"bs-BA\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Smjene -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webthly.com\/mr-klinika\/smjene\/","og_locale":"bs_BA","og_type":"article","og_title":"Smjene -","og_description":"Raspored Smjena Sestre: Milica, Irena, Zorana \ud83d\udcc5 Danas: &#8230; Prva Smjena Milica, Irena Druga Smjena Zorana \ud83d\udcdd Popuni smjene za sutra &#8230; Ko radi PRVU [&hellip;]","og_url":"https:\/\/webthly.com\/mr-klinika\/smjene\/","article_modified_time":"2026-05-13T10:19:18+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/webthly.com\/mr-klinika\/smjene\/","url":"https:\/\/webthly.com\/mr-klinika\/smjene\/","name":"Smjene -","isPartOf":{"@id":"https:\/\/webthly.com\/mr-klinika\/#website"},"datePublished":"2026-05-13T09:59:39+00:00","dateModified":"2026-05-13T10:19:18+00:00","breadcrumb":{"@id":"https:\/\/webthly.com\/mr-klinika\/smjene\/#breadcrumb"},"inLanguage":"bs-BA","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webthly.com\/mr-klinika\/smjene\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webthly.com\/mr-klinika\/smjene\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webthly.com\/mr-klinika\/"},{"@type":"ListItem","position":2,"name":"Smjene"}]},{"@type":"WebSite","@id":"https:\/\/webthly.com\/mr-klinika\/#website","url":"https:\/\/webthly.com\/mr-klinika\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webthly.com\/mr-klinika\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"bs-BA"}]}},"_links":{"self":[{"href":"https:\/\/webthly.com\/mr-klinika\/wp-json\/wp\/v2\/pages\/1969","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webthly.com\/mr-klinika\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/webthly.com\/mr-klinika\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/webthly.com\/mr-klinika\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webthly.com\/mr-klinika\/wp-json\/wp\/v2\/comments?post=1969"}],"version-history":[{"count":10,"href":"https:\/\/webthly.com\/mr-klinika\/wp-json\/wp\/v2\/pages\/1969\/revisions"}],"predecessor-version":[{"id":1988,"href":"https:\/\/webthly.com\/mr-klinika\/wp-json\/wp\/v2\/pages\/1969\/revisions\/1988"}],"wp:attachment":[{"href":"https:\/\/webthly.com\/mr-klinika\/wp-json\/wp\/v2\/media?parent=1969"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}