Add pricing system with tiers, seasons, and calculator (v0.2.0)
All checks were successful
Create Release Package / build-release (push) Successful in 1m19s
All checks were successful
Create Release Package / build-release (push) Successful in 1m19s
- Create PricingTier enum for short/mid/long-term pricing - Add Season class for seasonal pricing with date ranges - Implement Calculator for price calculations with breakdown - Add pricing meta box to Room post type - Create Seasons admin page for managing seasonal pricing - Add Pricing settings tab with tier thresholds - Support weekend surcharges and configurable weekend days - Add price column to room list admin Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -191,3 +191,135 @@
|
||||
vertical-align: middle;
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
/* Price column */
|
||||
.column-price {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.bnb-no-price {
|
||||
color: #646970;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* Pricing Meta Box */
|
||||
.bnb-pricing-table h4 {
|
||||
margin: 0 0 10px 0;
|
||||
padding: 0;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: #1d2327;
|
||||
}
|
||||
|
||||
.bnb-pricing-table tr:first-child th,
|
||||
.bnb-pricing-table tr:first-child td {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.bnb-price-input-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.bnb-price-input-wrapper input {
|
||||
width: 100px !important;
|
||||
}
|
||||
|
||||
.bnb-price-unit {
|
||||
color: #646970;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
/* Seasons Page */
|
||||
.bnb-seasons-description {
|
||||
background: #fff;
|
||||
border: 1px solid #c3c4c7;
|
||||
border-left: 4px solid #72aee6;
|
||||
padding: 12px 15px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
.bnb-seasons-description p {
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.bnb-no-seasons {
|
||||
background: #fff;
|
||||
border: 1px solid #c3c4c7;
|
||||
border-radius: 4px;
|
||||
padding: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.bnb-no-seasons p {
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.bnb-no-seasons .button {
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
/* Season List Columns */
|
||||
.column-name {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.column-dates {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.column-modifier {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.column-priority {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.column-status {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.bnb-modifier-visual {
|
||||
font-size: 12px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.bnb-status-active {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
color: #00a32a;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.bnb-status-active::before {
|
||||
content: "\f147";
|
||||
font-family: dashicons;
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
.bnb-status-inactive {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
color: #646970;
|
||||
}
|
||||
|
||||
.bnb-status-inactive::before {
|
||||
content: "\f460";
|
||||
font-family: dashicons;
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
/* Season Form */
|
||||
.bnb-season-form {
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
.bnb-season-form .form-table th {
|
||||
width: 180px;
|
||||
}
|
||||
|
||||
.bnb-season-form input[type="text"].small-text {
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user