{"id":68,"date":"2026-03-19T12:57:01","date_gmt":"2026-03-19T12:57:01","guid":{"rendered":"https:\/\/webthly.com\/mr-klinika\/ad-agency-lite\/"},"modified":"2026-05-13T11:15:09","modified_gmt":"2026-05-13T11:15:09","slug":"webthly","status":"publish","type":"page","link":"https:\/\/webthly.com\/mr-klinika\/","title":{"rendered":"MR Klinika"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"68\" class=\"elementor elementor-68\">\n\t\t\t\t<div class=\"elementor-element elementor-element-99618bf e-flex e-con-boxed e-con e-parent\" data-id=\"99618bf\" 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-3281707 elementor-widget elementor-widget-html\" data-id=\"3281707\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<!-- DASHBOARD ZA PO\u010cETNU V4.4 - MOBILE OPTIMIZED -->\r\n<style>\r\n    \/* BAZNI STILOVI *\/\r\n    .dashboard-grid {\r\n        display: grid;\r\n        gap: 15px;\r\n        transition: all 0.3s ease;\r\n    }\r\n\r\n    \/* STANDARDNA MRE\u017dA *\/\r\n    .layout-standard { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }\r\n    .layout-large { grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); }\r\n    .layout-compact { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }\r\n\r\n    \/* LISTA STIL *\/\r\n    .layout-list { grid-template-columns: 1fr; }\r\n    .layout-list .doc-card { \r\n        flex-direction: row !important; \r\n        justify-content: space-between !important; \r\n        align-items: center !important; \r\n        padding: 10px 20px !important; \r\n        text-align: left !important; \r\n        min-height: 80px; \r\n    }\r\n    \r\n    \/* STIL ZA NAPOMENU *\/\r\n    .note-banner {\r\n        background: #fef9c3;\r\n        border: 2px solid #facc15;\r\n        border-radius: 12px;\r\n        padding: 15px;\r\n        margin-bottom: 20px;\r\n        display: none;\r\n        align-items: center;\r\n        justify-content: space-between;\r\n        animation: fadeIn 0.5s ease;\r\n    }\r\n    @keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }\r\n\r\n    \/* MOBILNE OPTIMIZACIJE *\/\r\n    @media (max-width: 600px) {\r\n        \/* 1. Smanjena napomena na mobitelu *\/\r\n        #note-content { font-size: 0.85rem !important; }\r\n        .note-banner { padding: 10px 12px; }\r\n        .note-banner span { font-size: 1.1rem !important; }\r\n\r\n        \/* 2. Popravka liste za mobitel *\/\r\n        .layout-list .doc-card { \r\n            padding: 10px !important; \r\n            gap: 8px;\r\n            min-height: 60px;\r\n        }\r\n        .layout-list .doc-name { font-size: 0.85rem !important; margin-bottom: 2px !important; }\r\n        .layout-list .doc-time { font-size: 0.75rem !important; }\r\n        .layout-list .doc-btn { \r\n            width: auto !important; \r\n            padding: 5px 12px !important; \r\n            font-size: 0.7rem !important; \r\n        }\r\n        .layout-list .doc-badge { width: 22px !important; height: 22px !important; font-size: 0.7rem !important; top: 5px !important; right: 5px !important; }\r\n        .layout-list .doc-meta { margin-bottom: 0 !important; }\r\n        \r\n        .layout-compact { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }\r\n    }\r\n<\/style>\r\n\r\n<div class=\"dashboard-wrapper\" style=\"font-family: 'Inter', sans-serif; padding: 15px; position: relative; min-height: 80vh;\">\r\n    <div style=\"max-width: 1200px; margin: 0 auto;\">\r\n        \r\n        <!-- HEADER -->\r\n        <div style=\"display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; flex-wrap: wrap; gap: 10px;\">\r\n            <h2 style=\"margin: 0; color: #1e293b; font-size: 1.4rem;\">Dana\u0161nji Raspored <span id=\"current-date-label\" style=\"font-size: 0.9rem; color: #64748b; font-weight: 400;\"><\/span><\/h2>\r\n            \r\n            <div style=\"display: flex; gap: 8px; align-items: center;\">\r\n                <button onclick=\"toggleNoteForm()\" style=\"width: 35px; height: 35px; background: #22c55e; color: white; border: none; border-radius: 8px; cursor: pointer; font-weight: 800; font-size: 1.2rem; display: flex; align-items: center; justify-content: center;\">+<\/button>\r\n                \r\n                <select id=\"layout-picker\" onchange=\"updateLayout()\" style=\"padding: 8px; border-radius: 8px; border: 1px solid #cbd5e1; font-size: 0.85rem; font-weight: 600;\">\r\n                    <option value=\"layout-standard\">Standard<\/option>\r\n                    <option value=\"layout-compact\">Manje kocke<\/option>\r\n                    <option value=\"layout-large\">Ve\u0107e kocke<\/option>\r\n                    <option value=\"layout-list\">Lista<\/option>\r\n                <\/select>\r\n                <button onclick=\"loadAllAppointments()\" style=\"padding: 8px 15px; background: #ea1c82; color: white; border: none; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 0.85rem;\">Osve\u017ei<\/button>\r\n            <\/div>\r\n        <\/div>\r\n\r\n        <!-- FORMA ZA UNOS NAPOMENE -->\r\n        <div id=\"note-form\" style=\"display: none; background: white; padding: 15px; border-radius: 12px; border: 1px solid #cbd5e1; margin-bottom: 20px; gap: 10px; flex-direction: column;\">\r\n            <textarea id=\"note-text\" placeholder=\"Upi\u0161ite napomenu za danas...\" style=\"width: 100%; padding: 10px; border-radius: 8px; border: 1px solid #cbd5e1; font-family: inherit;\"><\/textarea>\r\n            <div style=\"display: flex; gap: 10px;\">\r\n                <button onclick=\"saveNote()\" style=\"flex: 1; padding: 10px; background: #22c55e; color: white; border: none; border-radius: 8px; font-weight: 700; cursor: pointer;\">Sa\u010duvaj<\/button>\r\n                <button onclick=\"toggleNoteForm()\" style=\"padding: 10px; background: #94a3b8; color: white; border: none; border-radius: 8px; font-weight: 700; cursor: pointer;\">Odustani<\/button>\r\n            <\/div>\r\n        <\/div>\r\n\r\n        <!-- PRIKAZ NAPOMENE -->\r\n        <div id=\"note-display\" class=\"note-banner\">\r\n            <div style=\"display: flex; align-items: center; gap: 10px;\">\r\n                <span style=\"font-size: 1.5rem;\">\ud83d\udd14<\/span>\r\n                <div id=\"note-content\" style=\"font-weight: 600; color: #854d0e;\"><\/div>\r\n            <\/div>\r\n            <button onclick=\"deleteNote()\" style=\"background: none; border: none; color: #a16207; font-size: 1.2rem; cursor: pointer; font-weight: 800;\">\u2715<\/button>\r\n        <\/div>\r\n\r\n        <!-- MRE\u017dA DOKTORA -->\r\n        <div id=\"dashboard-list\" class=\"dashboard-grid layout-standard\">\r\n            <!-- Kartice -->\r\n        <\/div>\r\n    <\/div>\r\n\r\n    <!-- SMJENE DUGME -->\r\n    <a href=\"https:\/\/webthly.com\/mr-klinika\/smjene\/\" class=\"floating-smjene\" style=\"position: fixed; bottom: 30px; right: 30px; padding: 15px 25px; background: #ea1c82; color: white; text-decoration: none; border-radius: 50px; font-weight: 700; box-shadow: 0 8px 20px rgba(234, 28, 130, 0.3); z-index: 9999; display: flex; align-items: center; gap: 8px; transition: 0.2s;\">\r\n        <svg width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z\"><\/path><\/svg>\r\n        Smjene\r\n    <\/a>\r\n<\/div>\r\n\r\n<script>\r\n(function() {\r\n    const DB_URL = \"https:\/\/mr-klinika-default-rtdb.europe-west1.firebasedatabase.app\/\";\r\n    const dashboardList = document.getElementById('dashboard-list');\r\n    const layoutPicker = document.getElementById('layout-picker');\r\n    \r\n    const now = new Date();\r\n    const offset = now.getTimezoneOffset() * 60000;\r\n    const todayISO = new Date(now - offset).toISOString().split('T')[0];\r\n\r\n    window.toggleNoteForm = function() {\r\n        const form = document.getElementById('note-form');\r\n        form.style.display = form.style.display === 'none' ? 'flex' : 'none';\r\n    };\r\n\r\n    window.saveNote = async function() {\r\n        const text = document.getElementById('note-text').value;\r\n        if (!text) return alert(\"Upi\u0161ite tekst!\");\r\n        try {\r\n            await fetch(`${DB_URL}daily_note.json`, {\r\n                method: 'PUT',\r\n                body: JSON.stringify({ date: todayISO, text: text })\r\n            });\r\n            document.getElementById('note-text').value = '';\r\n            toggleNoteForm();\r\n            loadNote();\r\n        } catch (e) { console.error(e); }\r\n    };\r\n\r\n    window.deleteNote = async function() {\r\n        if(confirm(\"Obrisati napomenu?\")) {\r\n            await fetch(`${DB_URL}daily_note.json`, { method: 'DELETE' });\r\n            loadNote();\r\n        }\r\n    };\r\n\r\n    async function loadNote() {\r\n        const res = await fetch(`${DB_URL}daily_note.json`);\r\n        const note = await res.json();\r\n        const display = document.getElementById('note-display');\r\n        const content = document.getElementById('note-content');\r\n        if (note && note.date === todayISO) {\r\n            content.innerText = note.text;\r\n            display.style.display = 'flex';\r\n        } else {\r\n            display.style.display = 'none';\r\n        }\r\n    }\r\n\r\n    function addMinutes(time, mins) {\r\n        let [h, m] = time.split(':').map(Number);\r\n        m += mins;\r\n        while (m >= 60) { m -= 60; h++; }\r\n        return `${h.toString().padStart(2, '0')}:${m.toString().padStart(2, '0')}`;\r\n    }\r\n\r\n    window.updateLayout = function() {\r\n        dashboardList.className = 'dashboard-grid ' + layoutPicker.value;\r\n    };\r\n\r\n    async function loadAllAppointments() {\r\n        try {\r\n            loadNote();\r\n            document.getElementById('current-date-label').innerText = `(${todayISO.split('-').reverse().join('.')})`;\r\n            const response = await fetch(`${DB_URL}appointments.json`);\r\n            const allData = await response.json();\r\n            dashboardList.innerHTML = '';\r\n            if (!allData) return;\r\n            for (const rawId in allData) {\r\n                const dayData = allData[rawId][todayISO];\r\n                if (dayData && dayData.active) {\r\n                    const apps = dayData.appointments || [];\r\n                    let endTime = dayData.startTime || \"08:00\";\r\n                    let currentCalc = endTime;\r\n                    apps.forEach(a => {\r\n                        currentCalc = addMinutes(currentCalc, parseInt(a.duration));\r\n                        endTime = currentCalc;\r\n                    });\r\n                    renderDoctorCard({\r\n                        id: rawId.replace('dr-', ''),\r\n                        name: rawId.replace('dr-', '').replace(\/-\/g, ' ').toUpperCase(),\r\n                        filled: apps.length,\r\n                        time: apps.length > 0 ? `${dayData.startTime}-${endTime}` : \"Nema termina\"\r\n                    });\r\n                }\r\n            }\r\n        } catch (e) { console.error(e); }\r\n    }\r\n\r\n    function renderDoctorCard(doc) {\r\n        const card = document.createElement('div');\r\n        const color = doc.filled > 0 ? \"#f97316\" : \"#22c55e\";\r\n        const bg = doc.filled > 0 ? \"#fff7ed\" : \"#f0fdf4\";\r\n        card.className = \"doc-card\";\r\n        card.style = `background:${bg}; border:2px solid ${color}; border-radius:15px; padding:20px; display:flex; flex-direction:column; align-items:center; position:relative; transition:0.2s;`;\r\n        card.innerHTML = `\r\n            <div class=\"doc-badge\" style=\"position:absolute; top:12px; right:12px; background:${color}; color:white; width:30px; height:30px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:0.8rem;\">${doc.filled}<\/div>\r\n            <div class=\"doc-info-wrap\">\r\n                <div style=\"font-size:0.6rem; font-weight:700; color:${color}; text-transform:uppercase;\">Doktor<\/div>\r\n                <div class=\"doc-name\" style=\"font-size:1.1rem; font-weight:800; color:#1e293b; margin-bottom:10px;\">DR ${doc.name}<\/div>\r\n            <\/div>\r\n            <div class=\"doc-meta\" style=\"margin-bottom:15px;\">\r\n                <div class=\"hide-mobile\" style=\"font-size:0.7rem; color:#64748b;\">Danas:<\/div>\r\n                <div class=\"doc-time\" style=\"font-size:0.9rem; font-weight:700; color:#1e293b;\">${doc.time}<\/div>\r\n            <\/div>\r\n            <a href=\"\/mr-klinika\/dr-${doc.id.toLowerCase()}\" class=\"doc-btn\" style=\"width:100%; padding:8px; background:white; border:1px solid ${color}; color:${color}; text-decoration:none; border-radius:8px; font-weight:700; font-size:0.8rem; text-align:center;\">Profil<\/a>\r\n        `;\r\n        dashboardList.appendChild(card);\r\n    }\r\n    loadAllAppointments();\r\n    setInterval(loadAllAppointments, 30000);\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>Dana\u0161nji Raspored + StandardManje kockeVe\u0107e kockeLista Osve\u017ei Sa\u010duvaj Odustani \ud83d\udd14 \u2715 Smjene<\/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-68","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>MR Klinika - Interni unos pacijenata<\/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\/\" \/>\n<meta property=\"og:locale\" content=\"bs_BA\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MR Klinika - Interni unos pacijenata\" \/>\n<meta property=\"og:description\" content=\"Dana\u0161nji Raspored + StandardManje kockeVe\u0107e kockeLista Osve\u017ei Sa\u010duvaj Odustani \ud83d\udd14 \u2715 Smjene\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webthly.com\/mr-klinika\/\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-13T11:15:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webthly.com\/mr-klinika\/wp-content\/uploads\/sites\/3\/2026\/05\/EEE.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\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=\"4 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/webthly.com\\\/mr-klinika\\\/\",\"url\":\"https:\\\/\\\/webthly.com\\\/mr-klinika\\\/\",\"name\":\"MR Klinika - Interni unos pacijenata\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/webthly.com\\\/mr-klinika\\\/#website\"},\"datePublished\":\"2026-03-19T12:57:01+00:00\",\"dateModified\":\"2026-05-13T11:15:09+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/webthly.com\\\/mr-klinika\\\/#breadcrumb\"},\"inLanguage\":\"bs-BA\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/webthly.com\\\/mr-klinika\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/webthly.com\\\/mr-klinika\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/webthly.com\\\/mr-klinika\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MR Klinika\"}]},{\"@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":"MR Klinika - Interni unos pacijenata","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\/","og_locale":"bs_BA","og_type":"article","og_title":"MR Klinika - Interni unos pacijenata","og_description":"Dana\u0161nji Raspored + StandardManje kockeVe\u0107e kockeLista Osve\u017ei Sa\u010duvaj Odustani \ud83d\udd14 \u2715 Smjene","og_url":"https:\/\/webthly.com\/mr-klinika\/","article_modified_time":"2026-05-13T11:15:09+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/webthly.com\/mr-klinika\/wp-content\/uploads\/sites\/3\/2026\/05\/EEE.webp","type":"image\/webp"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"4 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/webthly.com\/mr-klinika\/","url":"https:\/\/webthly.com\/mr-klinika\/","name":"MR Klinika - Interni unos pacijenata","isPartOf":{"@id":"https:\/\/webthly.com\/mr-klinika\/#website"},"datePublished":"2026-03-19T12:57:01+00:00","dateModified":"2026-05-13T11:15:09+00:00","breadcrumb":{"@id":"https:\/\/webthly.com\/mr-klinika\/#breadcrumb"},"inLanguage":"bs-BA","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webthly.com\/mr-klinika\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webthly.com\/mr-klinika\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webthly.com\/mr-klinika\/"},{"@type":"ListItem","position":2,"name":"MR Klinika"}]},{"@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\/68","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=68"}],"version-history":[{"count":433,"href":"https:\/\/webthly.com\/mr-klinika\/wp-json\/wp\/v2\/pages\/68\/revisions"}],"predecessor-version":[{"id":2006,"href":"https:\/\/webthly.com\/mr-klinika\/wp-json\/wp\/v2\/pages\/68\/revisions\/2006"}],"wp:attachment":[{"href":"https:\/\/webthly.com\/mr-klinika\/wp-json\/wp\/v2\/media?parent=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}