Files

1 line
19 KiB
JavaScript
Raw Permalink Normal View History

Hotel Raxa - Advanced Booking System Implementation 🏨 Hotel Booking Enhancements: - Implemented Eagle Booking Advanced Pricing add-on - Added Booking.com-style rate management system - Created professional calendar interface for pricing - Integrated deals and discounts functionality 💰 Advanced Pricing Features: - Dynamic pricing models (per room, per person, per adult) - Base rates, adult rates, and child rates management - Length of stay discounts and early bird deals - Mobile rates and secret deals implementation - Seasonal promotions and flash sales 📅 Availability Management: - Real-time availability tracking - Stop sell and restriction controls - Closed to arrival/departure functionality - Minimum/maximum stay requirements - Automatic sold-out management 💳 Payment Integration: - Maintained Redsys payment gateway integration - Seamless integration with existing Eagle Booking - No modifications to core Eagle Booking plugin 🛠️ Technical Implementation: - Custom database tables for advanced pricing - WordPress hooks and filters integration - AJAX-powered admin interface - Data migration from existing Eagle Booking - Professional calendar view for revenue management 📊 Admin Interface: - Booking.com-style management dashboard - Visual rate and availability calendar - Bulk operations for date ranges - Statistics and analytics dashboard - Modal dialogs for quick editing 🔧 Code Quality: - WordPress coding standards compliance - Secure database operations with prepared statements - Proper input validation and sanitization - Error handling and logging - Responsive admin interface 🤖 Generated with Claude Code (https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-11 07:43:22 +02:00
function collapse(e){var t,e=e.target,n=e.parentNode.getElementsByClassName("collapsible");n.length&&("none"===(n=n[0]).style.display?(t=n.parentNode.getElementsByClassName("ellipsis")[0],n.parentNode.removeChild(t),n.style.display=""):(n.style.display="none",(t=document.createElement("span")).className="ellipsis",t.innerHTML=" &hellip; ",n.parentNode.insertBefore(t,n)),e.innerHTML="-"===e.innerHTML?"+":"-")}function addCollapser(e){var t;"LI"===e.nodeName&&((t=document.createElement("div")).className="collapser",t.innerHTML="-",t.addEventListener("click",collapse,!1),e.insertBefore(t,e.firstChild))}function jsonView(e,t){if(this.debug=!1,-1!==e.indexOf("#"))this.idType="id",this.id=e.replace("#","");else{if(-1===e.indexOf("."))return void(this.debug&&console.log("Can't find that element"));this.idType="class",this.id=e.replace(".","")}if(this.data=document.getElementById(this.id).innerHTML,-1!==t.indexOf("#"))this.targetType="id",this.target=t.replace("#","");else{if(-1===e.indexOf("."))return void(this.debug&&console.log("Can't find the target element"));this.targetType="class",this.target=t.replace(".","")}/^\<pre.*\>(.*)\<\/pre\>$/.test(this.data)&&(this.debug&&console.log("JSONView: data is wrapped in <pre>...</pre>, stripping HTML..."),this.data=this.data.replace(/<(?:.|\s)*?>/g,""));var e=/^[\s\u200B\uFEFF]*([\w$\[\]\.]+)[\s\u200B\uFEFF]*\([\s\u200B\uFEFF]*([\[{][\s\S]*[\]}])[\s\u200B\uFEFF]*\);?[\s\u200B\uFEFF]*$/,t=/^\s*([\[\{].*[\}\]])\s*$/.test(this.data),n=e.test(this.data);if(this.debug&&console.log("JSONView: is_json="+t+" is_jsonp="+n),t||n){function a(){}this.debug&&console.log("JSONView: sexytime!"),a.prototype={htmlEncode:function(e){return null!=e?e.toString().replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):""},decorateWithSpan:function(e,t){return'<span class="'+t+'">'+this.htmlEncode(e)+"</span>"},valueToHTML:function(e){var t=typeof e,n="";return null===e?n+=this.decorateWithSpan("null","null"):e&&e.constructor===Array?n+=this.arrayToHTML(e):"object"==t?n+=this.objectToHTML(e):"number"==t?n+=this.decorateWithSpan(e,"num"):"string"==t?/^(http|https):\/\/[^\s]+$/.test(e)?n+='<a href="'+e+'">'+this.htmlEncode(e)+"</a>":n+=this.decorateWithSpan('"'+e+'"',"string"):"boolean"==t&&(n+=this.decorateWithSpan(e,"bool")),n},arrayToHTML:function(e){var t,n='[<ul class="array collapsible">',a=!1;for(t in e)a=!0,n=(n+="<li>")+this.valueToHTML(e[t])+"</li>";return n+="</ul>]",n=a?n:"[ ]"},objectToHTML:function(e){var t,n='{<ul class="obj collapsible">',a=!1;for(t in e)a=!0,n=(n=(n+="<li>")+'<span class="prop">'+this.htmlEncode(t)+"</span>: ")+this.valueToHTML(e[t])+"</li>";return n+="</ul>}",n=a?n:"{ }"},jsonToHTML:function(e,t,n){var a="";return t?a=a+'<div class="callback">'+t+' (</div><div id="json">':a+='<div id="json">',a=a+this.valueToHTML(e)+"</div>",t&&(a+='<div class="callback">)</div>'),this.toHTML(a,n)},errorPage:function(e,t,n){var a='<div id="error">Error parsing JSON: '+e.message+"</div>",a=(a+="<h1>"+e.stack+":</h1>")+('<div id="json">'+this.htmlEncode(t)+"</div>");return this.toHTML(a,n+" - Error")},toHTML:function(e){return e}},this.jsonFormatter=new a;var t="",n="",r="",e=e.exec(this.data),n=e&&3===e.length?(this.debug&&console.log("THIS IS JSONp"),r=e[1],e[2]):(this.debug&&console.log("Vanilla JSON"),this.data);this.debug&&console.log(n);try{var i=JSON.parse(n);if(!i)throw"There was no object!";t=this.jsonFormatter.jsonToHTML(i,r)}catch(e){this.debug&&console.log(e),t=this.jsonFormatter.errorPage(e,this.data)}for(var o,e="<style type=\"text/css\">.jsonViewOutput .prop{font-weight:700;}.jsonViewOutput .null{color:red;}.jsonViewOutput .string{color:green;}.jsonViewOutput .collapser{position:absolute;left:-1em;cursor:pointer;}.jsonViewOutput li{position:relative;}.jsonViewOutput li:after{content:',';}.jsonViewOutput li:last-child:after{content:'';}.jsonViewOutput #error{-moz-border-radius:8px;border:1px solid #970000;background-color:#F7E8E8;margin:.5em;padding:.5em;}.jsonViewOutput .errormessage{font-family:monospace;}.jsonViewOutput #json{font-family:monosp