Add guest management and GDPR privacy compliance (v0.4.0)
All checks were successful
Create Release Package / build-release (push) Successful in 1m26s

- Create Guest CPT with personal info, address, ID/passport tracking
- Add guest-booking integration with AJAX search and linking
- Implement GDPR compliance via WordPress Privacy API (export/erasure)
- Update EmailNotifier to use Guest CPT data with new placeholders
- Add CSS styles for guest search, linked display, and privacy UI

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-31 14:59:43 +01:00
parent c66af8e299
commit aab3a4d1aa
9 changed files with 2858 additions and 71 deletions

View File

@@ -688,3 +688,403 @@
gap: 10px;
}
}
/* ==========================================================================
Guest Management Styles
========================================================================== */
/* Guest Search Container */
.bnb-guest-search-container {
margin-bottom: 15px;
padding: 12px;
background: #f6f7f7;
border: 1px solid #c3c4c7;
border-radius: 4px;
}
.bnb-guest-search-container label {
display: block;
margin-bottom: 8px;
font-weight: 600;
}
.bnb-guest-search-container input[type="text"] {
width: 100%;
max-width: 300px;
}
/* Guest Search Results */
.bnb-guest-results {
margin-top: 10px;
max-height: 200px;
overflow-y: auto;
border: 1px solid #c3c4c7;
border-radius: 4px;
background: #fff;
}
.bnb-guest-result {
padding: 10px 12px;
border-bottom: 1px solid #f0f0f1;
cursor: pointer;
transition: background 0.15s ease;
}
.bnb-guest-result:last-child {
border-bottom: none;
}
.bnb-guest-result:hover {
background: #f0f6fc;
}
.bnb-guest-result-name {
font-weight: 600;
color: #1d2327;
}
.bnb-guest-result-email {
font-size: 12px;
color: #646970;
margin-top: 2px;
}
.bnb-guest-result-meta {
font-size: 11px;
color: #a7aaad;
margin-top: 4px;
}
.bnb-guest-no-results {
padding: 15px;
text-align: center;
color: #646970;
font-style: italic;
}
.bnb-guest-create-new {
padding: 10px 12px;
background: #f0f6fc;
border-top: 1px solid #c3c4c7;
cursor: pointer;
}
.bnb-guest-create-new:hover {
background: #d4e4f7;
}
.bnb-guest-create-new .dashicons {
color: #2271b1;
margin-right: 5px;
vertical-align: text-bottom;
}
/* Guest Linked Display */
.bnb-guest-linked {
padding: 12px 15px;
background: #d4edda;
border: 1px solid #c3e6cb;
border-radius: 4px;
margin-bottom: 15px;
}
.bnb-guest-linked-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 8px;
}
.bnb-guest-linked-name {
font-size: 14px;
font-weight: 600;
color: #155724;
}
.bnb-guest-linked-name .dashicons {
font-size: 16px;
width: 16px;
height: 16px;
margin-right: 5px;
vertical-align: text-bottom;
}
.bnb-guest-linked-details {
font-size: 13px;
color: #155724;
}
.bnb-guest-linked-details div {
margin-top: 4px;
}
.bnb-guest-linked-actions {
display: flex;
gap: 8px;
margin-top: 10px;
}
/* Guest Admin Columns */
.column-email,
.column-phone,
.column-country,
.column-bookings {
width: 120px;
}
.column-bookings a {
text-decoration: none;
}
/* Guest Status Badges */
.bnb-guest-status {
display: inline-block;
padding: 3px 8px;
border-radius: 3px;
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
}
.bnb-guest-status-active {
background: #d4edda;
color: #155724;
}
.bnb-guest-status-inactive {
background: #f6f7f7;
color: #646970;
}
.bnb-guest-status-blocked {
background: #f8d7da;
color: #721c24;
}
/* Booking History Table in Guest */
.bnb-booking-history {
width: 100%;
border-collapse: collapse;
font-size: 12px;
}
.bnb-booking-history th,
.bnb-booking-history td {
padding: 8px 10px;
text-align: left;
border-bottom: 1px solid #f0f0f1;
}
.bnb-booking-history th {
background: #f6f7f7;
font-weight: 600;
color: #1d2327;
}
.bnb-booking-history tr:hover td {
background: #f9f9f9;
}
.bnb-booking-history-empty {
padding: 20px;
text-align: center;
color: #646970;
font-style: italic;
}
.bnb-booking-stats {
display: flex;
gap: 20px;
padding: 12px 0;
border-bottom: 1px solid #c3c4c7;
margin-bottom: 15px;
}
.bnb-booking-stat {
text-align: center;
}
.bnb-booking-stat-value {
font-size: 20px;
font-weight: 600;
color: #135e96;
}
.bnb-booking-stat-label {
font-size: 11px;
color: #646970;
text-transform: uppercase;
}
/* ==========================================================================
GDPR / Privacy Styles
========================================================================== */
/* Consent Status */
.bnb-consent-status {
display: flex;
flex-direction: column;
gap: 8px;
}
.bnb-consent-item {
display: flex;
align-items: center;
gap: 8px;
}
.bnb-consent-item .dashicons {
font-size: 16px;
width: 16px;
height: 16px;
}
.bnb-consent-granted {
color: #00a32a;
}
.bnb-consent-not-granted {
color: #646970;
}
.bnb-consent-date {
font-size: 11px;
color: #646970;
margin-left: 24px;
}
/* Consent Checkboxes in Guest Form */
.bnb-consent-checkbox {
display: flex;
align-items: flex-start;
gap: 8px;
margin: 10px 0;
}
.bnb-consent-checkbox input[type="checkbox"] {
margin-top: 3px;
}
.bnb-consent-checkbox label {
font-weight: normal;
cursor: pointer;
}
.bnb-consent-checkbox-description {
font-size: 12px;
color: #646970;
margin-left: 24px;
margin-top: 2px;
}
/* Privacy Settings Section */
.bnb-privacy-settings {
margin-top: 20px;
}
.bnb-privacy-section {
background: #fff;
border: 1px solid #c3c4c7;
border-radius: 4px;
margin-bottom: 20px;
}
.bnb-privacy-section-header {
padding: 12px 15px;
background: #f6f7f7;
border-bottom: 1px solid #c3c4c7;
font-weight: 600;
}
.bnb-privacy-section-content {
padding: 15px;
}
.bnb-privacy-notice {
display: flex;
align-items: flex-start;
gap: 10px;
padding: 12px 15px;
background: #f0f6fc;
border-left: 4px solid #72aee6;
margin-bottom: 15px;
}
.bnb-privacy-notice .dashicons {
color: #72aee6;
flex-shrink: 0;
}
.bnb-privacy-notice p {
margin: 0;
}
/* Privacy Actions in Guest Profile */
.bnb-privacy-actions {
margin-top: 20px;
padding-top: 15px;
border-top: 1px solid #f0f0f1;
}
.bnb-privacy-actions h4 {
margin: 0 0 10px 0;
font-size: 13px;
}
.bnb-privacy-actions-buttons {
display: flex;
gap: 10px;
flex-wrap: wrap;
}
.bnb-privacy-action-button {
display: inline-flex;
align-items: center;
gap: 5px;
}
.bnb-privacy-action-button .dashicons {
font-size: 16px;
width: 16px;
height: 16px;
}
/* Anonymized Data Display */
.bnb-anonymized {
font-style: italic;
color: #a7aaad;
}
.bnb-anonymized-badge {
display: inline-flex;
align-items: center;
gap: 5px;
padding: 2px 8px;
background: #f0f0f1;
border-radius: 3px;
font-size: 11px;
color: #646970;
}
.bnb-anonymized-badge .dashicons {
font-size: 14px;
width: 14px;
height: 14px;
}
/* Data Retention Settings */
.bnb-retention-settings {
display: flex;
align-items: center;
gap: 10px;
}
.bnb-retention-settings input[type="number"] {
width: 80px;
}
.bnb-retention-description {
font-size: 12px;
color: #646970;
margin-top: 5px;
}