Release v0.6.1 - Bug fixes and enhancements
All checks were successful
Create Release Package / build-release (push) Successful in 1m1s

New Features:
- Auto-update system with configurable check frequency
- Updates tab in settings with manual check button
- Localhost development mode bypasses license validation
- Extended general settings (address, contact, social media)
- Pricing settings split into subtabs
- Guest ID/passport encryption using AES-256-CBC
- Guest auto-creation from booking form

Bug Fixes:
- Fixed Booking admin issues with auto-draft status
- Fixed guest dropdown loading in booking form
- Fixed booking history display on Guest edit page
- Fixed service pricing meta box (Gutenberg hiding meta boxes)

Changes:
- Admin submenu reordered for better organization
- Booking title shows guest name and dates (room removed)
- Service, Guest, Booking use classic editor (not Gutenberg)
- Settings tabs flush with content (no gap)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-03 15:18:27 +01:00
parent c17dd53c5a
commit 13ba264431
11 changed files with 1699 additions and 173 deletions

View File

@@ -54,7 +54,8 @@
/* Settings Tabs */
.nav-tab-wrapper {
margin-bottom: 20px;
margin-bottom: 0;
border-bottom: 1px solid #c3c4c7;
}
.tab-content {
@@ -64,6 +65,57 @@
padding: 20px;
}
/* Settings Subtabs */
.wp-bnb-subtabs {
display: flex;
gap: 0;
margin-bottom: 20px;
border-bottom: 1px solid #c3c4c7;
}
.wp-bnb-subtab {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 10px 16px;
text-decoration: none;
color: #50575e;
background: #f6f7f7;
border: 1px solid #c3c4c7;
border-bottom: none;
margin-bottom: -1px;
margin-right: -1px;
font-size: 13px;
transition: background 0.15s ease, color 0.15s ease;
}
.wp-bnb-subtab:first-child {
border-top-left-radius: 4px;
}
.wp-bnb-subtab:last-child {
border-top-right-radius: 4px;
margin-right: 0;
}
.wp-bnb-subtab:hover {
background: #fff;
color: #135e96;
}
.wp-bnb-subtab.active {
background: #fff;
color: #1d2327;
font-weight: 600;
border-bottom-color: #fff;
}
.wp-bnb-subtab .dashicons {
font-size: 16px;
width: 16px;
height: 16px;
}
/* Form Tables */
.form-table th {
width: 200px;

View File

@@ -91,6 +91,91 @@
}
}
/**
* Initialize update check functionality.
*/
function initUpdateCheck() {
var $checkBtn = $('#wp-bnb-check-updates');
var $spinner = $('#wp-bnb-update-spinner');
var $message = $('#wp-bnb-update-message');
var $latestVersion = $('#wp-bnb-latest-version');
var $lastCheck = $('#wp-bnb-update-last-check');
if (!$checkBtn.length) {
return;
}
$checkBtn.on('click', function(e) {
e.preventDefault();
// Disable button and show spinner.
$checkBtn.prop('disabled', true);
$spinner.addClass('is-active');
$message.hide();
$.ajax({
url: wpBnbAdmin.ajaxUrl,
type: 'POST',
data: {
action: 'wp_bnb_check_updates',
nonce: wpBnbAdmin.nonce
},
success: function(response) {
$spinner.removeClass('is-active');
$checkBtn.prop('disabled', false);
if (response.success) {
var data = response.data;
// Update last check time.
$lastCheck.text(wpBnbAdmin.i18n.justNow || 'Just now');
// Update version display.
if (data.update_available) {
$latestVersion.html(
'<span style="color: #00a32a; font-weight: 600;">' +
data.latest_version +
'</span> ' +
'<span class="dashicons dashicons-yes" style="color: #00a32a;"></span> ' +
'<em>' + (wpBnbAdmin.i18n.updateAvailable || 'Update available!') + '</em>'
);
showUpdateMessage('success', data.message);
} else {
$latestVersion.html(
data.latest_version +
' <span style="color: #646970;">' +
(wpBnbAdmin.i18n.upToDate || '(You are up to date)') +
'</span>'
);
showUpdateMessage('success', data.message);
}
} else {
showUpdateMessage('error', response.data.message || wpBnbAdmin.i18n.error);
}
},
error: function() {
$spinner.removeClass('is-active');
$checkBtn.prop('disabled', false);
showUpdateMessage('error', wpBnbAdmin.i18n.error);
}
});
});
/**
* Show an update message.
*
* @param {string} type Message type (success or error).
* @param {string} message Message text.
*/
function showUpdateMessage(type, message) {
$message
.removeClass('success error')
.addClass(type)
.text(message)
.fadeIn();
}
}
/**
* Initialize room gallery functionality.
*/
@@ -768,7 +853,7 @@
return;
}
$pricingTypeInputs.on('change', function() {
function updatePriceRowVisibility() {
var pricingType = $('input[name="bnb_service_pricing_type"]:checked').val();
if (pricingType === 'included') {
@@ -784,7 +869,12 @@
$priceDescription.text(wpBnbAdmin.i18n.perBookingDescription || 'This price will be charged once for the booking.');
}
}
});
}
$pricingTypeInputs.on('change', updatePriceRowVisibility);
// Set initial visibility state on page load.
updatePriceRowVisibility();
}
/**
@@ -937,6 +1027,7 @@
// Initialize on document ready.
$(document).ready(function() {
initLicenseManagement();
initUpdateCheck();
initRoomGallery();
initPricingSettings();
initSeasonForm();