{"id":125,"date":"2019-01-17T14:23:51","date_gmt":"2019-01-17T14:23:51","guid":{"rendered":"https:\/\/listeo.staging.wpengine.com\/?page_id=841"},"modified":"2019-01-17T14:23:51","modified_gmt":"2019-01-17T14:23:51","slug":"my-bookings","status":"publish","type":"page","link":"https:\/\/sodybos.info\/index.php\/my-bookings\/","title":{"rendered":"My Bookings"},"content":{"rendered":"<link rel=\"stylesheet\" href=\"https:\/\/sodybos.info\/wp-content\/plugins\/listeo-core\/templates\/booking\/bookings-modern.css?ver=1784015446\">\n\n<div class=\"lstb-bookings lstb-list-view\" data-role=\"user\">\n\n\t<!-- Filter \/ tabs bar -->\n\t<div class=\"lstb-bar\">\n\n\t\t<!-- Status tabs -->\n\t\t<div class=\"lstb-tabs\">\n\t\t\t\t\t\t\t\t<button type=\"button\" class=\"lstb-tab is-active\" data-tab=\"all\">\n\t\t\t\t\t\tAll\t\t\t\t\t\t<span class=\"lstb-tab-count\">0<\/span>\n\t\t\t\t\t<\/button>\n\t\t\t\t\t\t\t\t\t\t\t\t<button type=\"button\" class=\"lstb-tab\" data-tab=\"pending\">\n\t\t\t\t\t\tPending\t\t\t\t\t\t<span class=\"lstb-tab-count\">0<\/span>\n\t\t\t\t\t<\/button>\n\t\t\t\t\t\t\t\t\t\t\t\t<button type=\"button\" class=\"lstb-tab\" data-tab=\"approved\">\n\t\t\t\t\t\tApproved\t\t\t\t\t\t<span class=\"lstb-tab-count\">0<\/span>\n\t\t\t\t\t<\/button>\n\t\t\t\t\t\t\t\t\t\t\t\t<button type=\"button\" class=\"lstb-tab\" data-tab=\"cancelled\">\n\t\t\t\t\t\tCancelled\t\t\t\t\t\t<span class=\"lstb-tab-count\">0<\/span>\n\t\t\t\t\t<\/button>\n\t\t\t\t\t\t\t\t\t<\/div>\n\n\t\t<!-- Filters (JS hooks must match bookings.js) -->\n\t\t<div class=\"lstb-filters\">\n\n\t\t\t<!-- Date Range -->\n\t\t\t<div id=\"booking-date-range-enabler\" class=\"lstb-datepick\">\n\t\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M8 2v4\"><\/path><path d=\"M16 2v4\"><\/path><rect width=\"18\" height=\"18\" x=\"3\" y=\"4\" rx=\"2\"><\/rect><path d=\"M3 10h18\"><\/path><\/svg>\n\t\t\t\t<span>Pick a Date<\/span>\n\t\t\t<\/div>\n\t\t\t<div id=\"booking-date-range\" class=\"lstb-datepick\" style=\"display:none;\">\n\t\t\t\t<span><\/span>\n\t\t\t<\/div>\n\n\t\t\t\t\t\t\t<input type=\"hidden\" id=\"dashboard_type\" name=\"dashboard_type\" value=\"user\">\n\t\t\t\n\t\t\t<!-- Status value consumed by bookings.js. Driven by the tabs above. -->\n\t\t\t<input type=\"hidden\" id=\"listing_status\" value=\"show_all\">\n\n\t\t\t\t\t<\/div>\n\t<\/div>\n\n\t\t<div class=\"dashboard-list-box lstb-listbox\">\n\n\t\t<i class=\"fa fa-circle-o-notch fa-spin booking-loading-icon\" style=\"display:none;\"><\/i>\n\n\t\t\t\t<ul id=\"no-bookings-information\" class=\"lstb-empty\" style=\"display:none;\">\n\t\t\tWe haven&#039;t found any bookings for that criteria\t\t<\/ul>\n\n\t\t\t\t\t<ul class=\"lstb-empty\">\n\t\t\t\tYou don&#039;t have any bookings yet\t\t\t<\/ul>\n\t\t\n\t<\/div>\n\n\t<div class=\"pagination-container\">\n\t\t<nav class=\"pagination margin-top-30\"><ul class=\"pagination\"><\/ul><\/nav>\t<\/div>\n\n\t<\/div>\n\n<script>\n( function () {\n\tvar root = document.currentScript ? document.currentScript.previousElementSibling : null;\n\t\/\/ Fallback: grab the last rendered list view.\n\tif ( ! root || ! root.classList || ! root.classList.contains( 'lstb-bookings' ) ) {\n\t\tvar nodes = document.querySelectorAll( '.lstb-list-view' );\n\t\troot = nodes.length ? nodes[ nodes.length - 1 ] : null;\n\t}\n\tif ( ! root ) {\n\t\treturn;\n\t}\n\n\t\/\/ Owner tabs are plain ?status= links (handled by a full reload); only the\n\t\/\/ guest view filters client-side here.\n\tif ( root.getAttribute( 'data-role' ) !== 'user' ) {\n\t\treturn;\n\t}\n\n\tvar tabs = root.querySelectorAll( '.lstb-tab' );\n\n\tfunction setActive( tab ) {\n\t\ttabs.forEach( function ( t ) { t.classList.remove( 'is-active' ); } );\n\t\ttab.classList.add( 'is-active' );\n\t}\n\n\tvar emptyBox = root.querySelector( '#no-bookings-information' );\n\n\ttabs.forEach( function ( tab ) {\n\t\ttab.addEventListener( 'click', function () {\n\t\t\tsetActive( tab );\n\t\t\tvar group = tab.getAttribute( 'data-tab' );\n\t\t\tvar cards = root.querySelectorAll( '#booking-requests > .lstb-card' );\n\t\t\tvar visible = 0;\n\t\t\tcards.forEach( function ( card ) {\n\t\t\t\tvar g = card.getAttribute( 'data-status-group' );\n\t\t\t\tvar show = ( group === 'all' || g === group );\n\t\t\t\tcard.style.display = show ? '' : 'none';\n\t\t\t\tif ( show ) { visible++; }\n\t\t\t} );\n\t\t\t\/\/ Show the \"no bookings match\" box when the active filter is empty.\n\t\t\tif ( emptyBox ) {\n\t\t\t\temptyBox.style.display = visible ? 'none' : '';\n\t\t\t}\n\t\t} );\n\t} );\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":"template-dashboard.php","meta":{"footnotes":""},"class_list":["post-125","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/sodybos.info\/index.php\/wp-json\/wp\/v2\/pages\/125","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sodybos.info\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sodybos.info\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sodybos.info\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sodybos.info\/index.php\/wp-json\/wp\/v2\/comments?post=125"}],"version-history":[{"count":0,"href":"https:\/\/sodybos.info\/index.php\/wp-json\/wp\/v2\/pages\/125\/revisions"}],"wp:attachment":[{"href":"https:\/\/sodybos.info\/index.php\/wp-json\/wp\/v2\/media?parent=125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}