{"id":525,"date":"2017-11-27T15:55:01","date_gmt":"2017-11-27T15:55:01","guid":{"rendered":"https:\/\/demo.harutheme.com\/clarivo\/?page_id=525"},"modified":"2026-11-09T14:42:10","modified_gmt":"2026-11-09T14:42:10","slug":"events","status":"publish","type":"page","link":"https:\/\/blueskypharmacies.ca\/stage\/events\/","title":{"rendered":"Events"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_row css=&#8221;.vc_custom_1515732051439{padding-bottom: 8% !important;}&#8221;][vc_column][vc_row_inner][vc_column_inner]\n        <div class=\" \">\n                <div class=\"timetable-shortcode-wrap style_1 \">\n                <div class=\"departments\">\n            <select name=\"department\" id=\"department\">\n                <option value=\"\">Select Department<\/option>\n                                <option value=\"531\">Gynaecological Clinic<\/option>\n                                <option value=\"530\">Outpatient Rehabilitation<\/option>\n                                <option value=\"529\">Laryngological Clinic<\/option>\n                                <option value=\"528\">Laboratory Analysis<\/option>\n                                <option value=\"519\">Outpatient Surgery<\/option>\n                                <option value=\"99\">Cardiac Clinic<\/option>\n                            <\/select>\n        <\/div>\n        <div class=\"timetable-content\">\n                                                                                            <\/div>\n    <\/div>\n<script>\n    !function($){\n        $(document).ready(function() {\n            $('.timetable-shortcode-wrap').find('select[name=\"department\"]').select2();\n\n            \/\/ @SEE: https:\/\/stackoverflow.com\/questions\/33392774\/filtering-fullcalendar-events-on-client-side\n            $('.timetable-content').fullCalendar({\n                header: { \/\/ Viewmore: https:\/\/fullcalendar.io\/docs\/display\/header\/\n                    left: 'prev,next today',\n                    center: 'title',\n                    right: 'month,agendaWeek,listWeek,agendaDay' \/\/ Viewmore: https:\/\/fullcalendar.io\/docs\/views\/Available_Views\/\n                },\n                defaultView: \"month\", \/\/ listWeek\n                eventSources: [\n                    {\n                        events: [\n                            {\"title\":\"Outpatient Surgery\",\"url\":\"https:\\\/\\\/blueskypharmacies.ca\\\/stage\\\/department\\\/\",\"start\":\"2017-11-27 00:00\",\"end\":\"2017-11-27 03:00\",\"tooltip\":\"<div class=\\\"appointment-tooltip\\\">\\n                                                <div class=\\\"appointment-info\\\">\\n                                                    <p class=\\\"appointment-doctor\\\">Outpatient Surgery<\\\/p>\\n                                                    <p class=\\\"appointment-doctor\\\">Dr.Ralph Ramirez<\\\/p>\\n                                                    <p class=\\\"appointment-start\\\"><label>Start:<\\\/label>2017-11-27 00:00<\\\/p>\\n                                                    <p class=\\\"appointment-end\\\"><label>End:<\\\/label>2017-11-27 03:00<\\\/p>\\n                                                <\\\/div>\\n                                            <\\\/div>\"},{\"title\":\"Cardiac Clinic\",\"url\":\"https:\\\/\\\/blueskypharmacies.ca\\\/stage\\\/department\\\/\",\"start\":\"2017-11-30 00:00\",\"end\":\"2017-11-30 01:00\",\"tooltip\":\"<div class=\\\"appointment-tooltip\\\">\\n                                                <div class=\\\"appointment-info\\\">\\n                                                    <p class=\\\"appointment-doctor\\\">Cardiac Clinic<\\\/p>\\n                                                    <p class=\\\"appointment-doctor\\\">Dr.Emily Hamard<\\\/p>\\n                                                    <p class=\\\"appointment-start\\\"><label>Start:<\\\/label>2017-11-30 00:00<\\\/p>\\n                                                    <p class=\\\"appointment-end\\\"><label>End:<\\\/label>2017-11-30 01:00<\\\/p>\\n                                                <\\\/div>\\n                                            <\\\/div>\"},{\"title\":\"Cardiac Clinic\",\"url\":\"https:\\\/\\\/blueskypharmacies.ca\\\/stage\\\/department\\\/\",\"start\":\"2017-11-29 00:00\",\"end\":\"2017-11-30 03:00\",\"tooltip\":\"<div class=\\\"appointment-tooltip\\\">\\n                                                <div class=\\\"appointment-info\\\">\\n                                                    <p class=\\\"appointment-doctor\\\">Cardiac Clinic<\\\/p>\\n                                                    <p class=\\\"appointment-doctor\\\">Dr.Emily Hamard<\\\/p>\\n                                                    <p class=\\\"appointment-start\\\"><label>Start:<\\\/label>2017-11-29 00:00<\\\/p>\\n                                                    <p class=\\\"appointment-end\\\"><label>End:<\\\/label>2017-11-30 03:00<\\\/p>\\n                                                <\\\/div>\\n                                            <\\\/div>\"},{\"title\":\"Outpatient Surgery\",\"url\":\"https:\\\/\\\/blueskypharmacies.ca\\\/stage\\\/department\\\/\",\"start\":\"2017-12-01 00:00\",\"end\":\"2017-12-02 00:00\",\"tooltip\":\"<div class=\\\"appointment-tooltip\\\">\\n                                                <div class=\\\"appointment-info\\\">\\n                                                    <p class=\\\"appointment-doctor\\\">Outpatient Surgery<\\\/p>\\n                                                    <p class=\\\"appointment-doctor\\\">Dr.Mina Fletcher<\\\/p>\\n                                                    <p class=\\\"appointment-start\\\"><label>Start:<\\\/label>2017-12-01 00:00<\\\/p>\\n                                                    <p class=\\\"appointment-end\\\"><label>End:<\\\/label>2017-12-02 00:00<\\\/p>\\n                                                <\\\/div>\\n                                            <\\\/div>\"},{\"title\":\"Outpatient Surgery\",\"url\":\"https:\\\/\\\/blueskypharmacies.ca\\\/stage\\\/department\\\/\",\"start\":\"2017-12-02 00:00\",\"end\":\"2017-12-05 00:00\",\"tooltip\":\"<div class=\\\"appointment-tooltip\\\">\\n                                                <div class=\\\"appointment-info\\\">\\n                                                    <p class=\\\"appointment-doctor\\\">Outpatient Surgery<\\\/p>\\n                                                    <p class=\\\"appointment-doctor\\\">Dr.Mary Lou<\\\/p>\\n                                                    <p class=\\\"appointment-start\\\"><label>Start:<\\\/label>2017-12-02 00:00<\\\/p>\\n                                                    <p class=\\\"appointment-end\\\"><label>End:<\\\/label>2017-12-05 00:00<\\\/p>\\n                                                <\\\/div>\\n                                            <\\\/div>\"}                        ]\n                    }\n                ],\n                timeFormat: 'HH:mm', \/\/ https:\/\/fullcalendar.io\/wiki\/Upgrading-to-v2\/\n                views: {\n                    basic: {\n                        \/\/ options apply to basicWeek and basicDay views\n                        displayEventEnd: true\n                    },\n                    agenda: {\n                        \/\/ options apply to agendaWeek and agendaDay views\n                        displayEventEnd: true\n                    },\n                    week: {\n                        \/\/ options apply to basicWeek and agendaWeek views\n                        displayEventEnd: true\n                    },\n                    day: {\n                        \/\/ options apply to basicDay and agendaDay views\n                        displayEventEnd: true\n                    }\n                },\n                eventMouseover: function (event, element, view) { \/\/ See: http:\/\/stackoverflow.com\/questions\/9802179\/tooltip-for-fullcalendar-in-year-view\n                    tooltip = event.tooltip;\n\n                    $(\"body\").append(tooltip);\n                    $(this).mouseover(function (e) {\n                        $(this).css('z-index', 10000);\n                        $('.appointment-tooltip').fadeIn('500');\n                        $('.appointment-tooltip').fadeTo('10', 1.9);\n                    }).mousemove(function (e) {\n                        $('.appointment-tooltip').css('top', e.pageY + 10);\n                        $('.appointment-tooltip').css('left', e.pageX + 20);\n                    });\n                },\n                eventMouseout: function (event, element, view) {\n                    $(this).css('z-index', 8);\n                    $('.appointment-tooltip').remove();\n                }\n            });\n\n            $('#department').change(function() {\n                $(\".timetable-content\").fullCalendar('removeEvents'); \/\/ Remove the old filtered events\n\n                var idDepartment = $('#department option:selected').val();\/\/filter based on the select value\n\n                $.ajax({\n                    type: \"POST\",\n                    url: haru_framework_ajax_url,\n                    data : {\n                        action: 'haru_ajax_get_appointment',\n                        department: idDepartment\n                    },\n                    success: function(data){\n                        if (data) {\n                            var items = $.parseJSON(data);\n\n                            $.each(items,function(index,value){ \/\/ For each event, I will compare the value with the filter, if true, render it.\n                                $(\".timetable-content\").fullCalendar('renderEvent', value, true);\n                            })\n                        }\n                    }\n                });\n            });\n        });\n    }(jQuery);\n<\/script>        <\/div>  \n\n        [\/vc_column_inner][\/vc_row_inner][\/vc_column][\/vc_row]<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>[vc_row css=&#8221;.vc_custom_1515732051439{padding-bottom: 8% !important;}&#8221;][vc_column][vc_row_inner][vc_column_inner][\/vc_column_inner][\/vc_row_inner][\/vc_column][\/vc_row]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-525","page","type-page","status-publish","hentry","clearfix"],"_links":{"self":[{"href":"https:\/\/blueskypharmacies.ca\/stage\/wp-json\/wp\/v2\/pages\/525","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blueskypharmacies.ca\/stage\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blueskypharmacies.ca\/stage\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blueskypharmacies.ca\/stage\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blueskypharmacies.ca\/stage\/wp-json\/wp\/v2\/comments?post=525"}],"version-history":[{"count":1,"href":"https:\/\/blueskypharmacies.ca\/stage\/wp-json\/wp\/v2\/pages\/525\/revisions"}],"predecessor-version":[{"id":1483,"href":"https:\/\/blueskypharmacies.ca\/stage\/wp-json\/wp\/v2\/pages\/525\/revisions\/1483"}],"wp:attachment":[{"href":"https:\/\/blueskypharmacies.ca\/stage\/wp-json\/wp\/v2\/media?parent=525"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}