feat: initial WooDoo plugin – WooCommerce & Odoo 19 integration
- Odoo JSON-RPC client (no Composer, uses wp_remote_post) - Admin settings page under WooCommerce with connection test - Customer linking: search Odoo partners from WP user profile - My Account: Odoo Invoices tab with PDF proxy download - My Account: Book a Meeting tab (slot calculator + calendar.event) - WC order → Odoo sale.order auto-sync on processing status - Products matched by SKU; partner auto-created from billing info - Uninstall cleanup (options, user meta, order meta, DB table) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
189
assets/css/woodoo.css
Normal file
189
assets/css/woodoo.css
Normal file
@@ -0,0 +1,189 @@
|
||||
/* =========================================================
|
||||
WooDoo Frontend Styles
|
||||
========================================================= */
|
||||
|
||||
/* ── Shared ──────────────────────────────────────────────── */
|
||||
.woodoo-notice {
|
||||
padding: 12px 16px;
|
||||
border-radius: 4px;
|
||||
margin: 12px 0;
|
||||
font-size: .9rem;
|
||||
}
|
||||
.woodoo-notice.woodoo-success { background: #ecfdf5; border: 1px solid #6ee7b7; color: #065f46; }
|
||||
.woodoo-notice.woodoo-error { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
|
||||
.woodoo-empty { color: #6b7280; font-style: italic; }
|
||||
.woodoo-section { margin-bottom: 2rem; }
|
||||
.woodoo-section h3 { font-size: 1.15rem; margin-bottom: .5rem; }
|
||||
.woodoo-desc { color: #6b7280; margin-bottom: 1rem; font-size: .9rem; }
|
||||
|
||||
/* ── Buttons ─────────────────────────────────────────────── */
|
||||
.woodoo-btn {
|
||||
display: inline-block;
|
||||
padding: 8px 16px;
|
||||
border-radius: 4px;
|
||||
font-size: .875rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
text-decoration: none;
|
||||
transition: opacity .15s;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.woodoo-btn:hover { opacity: .85; text-decoration: none; }
|
||||
.woodoo-btn--primary { background: #2271b1; color: #fff; }
|
||||
.woodoo-btn--sm { padding: 4px 10px; font-size: .8rem; }
|
||||
.woodoo-btn--outline { background: transparent; border: 1px solid #d1d5db; color: #374151; }
|
||||
.woodoo-btn:disabled { opacity: .5; cursor: not-allowed; }
|
||||
|
||||
/* ── Badges ──────────────────────────────────────────────── */
|
||||
.woodoo-badge {
|
||||
display: inline-block;
|
||||
padding: 2px 8px;
|
||||
border-radius: 999px;
|
||||
font-size: .75rem;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.woodoo-badge--green { background: #d1fae5; color: #065f46; }
|
||||
.woodoo-badge--red { background: #fee2e2; color: #991b1b; }
|
||||
.woodoo-badge--orange { background: #fed7aa; color: #92400e; }
|
||||
.woodoo-badge--blue { background: #dbeafe; color: #1e40af; }
|
||||
.woodoo-badge--grey { background: #f3f4f6; color: #6b7280; }
|
||||
|
||||
/* ── Table ───────────────────────────────────────────────── */
|
||||
.woodoo-table-wrap { overflow-x: auto; }
|
||||
.woodoo-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: .875rem;
|
||||
}
|
||||
.woodoo-table th,
|
||||
.woodoo-table td {
|
||||
padding: 10px 12px;
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.woodoo-table th { background: #f9fafb; font-weight: 600; }
|
||||
.woodoo-table tr:last-child td { border-bottom: none; }
|
||||
.woodoo-table .woodoo-amount { text-align: right; font-variant-numeric: tabular-nums; }
|
||||
.woodoo-table .woodoo-inv-number { font-weight: 600; }
|
||||
.woodoo-overdue { color: #dc2626; font-weight: 600; }
|
||||
|
||||
/* ── Pagination ──────────────────────────────────────────── */
|
||||
.woodoo-pagination {
|
||||
margin-top: 1rem;
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.woodoo-pagination a,
|
||||
.woodoo-pagination .woodoo-page-current {
|
||||
padding: 4px 10px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #d1d5db;
|
||||
font-size: .875rem;
|
||||
text-decoration: none;
|
||||
}
|
||||
.woodoo-pagination .woodoo-page-current {
|
||||
background: #2271b1;
|
||||
color: #fff;
|
||||
border-color: #2271b1;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* ── Calendar / Booking ──────────────────────────────────── */
|
||||
.woodoo-booking-form .woodoo-field {
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
.woodoo-booking-form label {
|
||||
display: block;
|
||||
font-weight: 600;
|
||||
margin-bottom: 6px;
|
||||
font-size: .9rem;
|
||||
}
|
||||
.woodoo-booking-form input[type="date"],
|
||||
.woodoo-booking-form textarea {
|
||||
width: 100%;
|
||||
max-width: 320px;
|
||||
padding: 8px 10px;
|
||||
border: 1px solid #d1d5db;
|
||||
border-radius: 4px;
|
||||
font-size: .9rem;
|
||||
}
|
||||
.woodoo-booking-form textarea { max-width: 480px; resize: vertical; }
|
||||
|
||||
.woodoo-slots-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
.woodoo-slot {
|
||||
padding: 8px 14px;
|
||||
border: 2px solid #d1d5db;
|
||||
border-radius: 6px;
|
||||
font-size: .875rem;
|
||||
cursor: pointer;
|
||||
background: #fff;
|
||||
transition: border-color .15s, background .15s;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.woodoo-slot:hover { border-color: #2271b1; background: #eff6ff; }
|
||||
.woodoo-slot.selected{ border-color: #2271b1; background: #dbeafe; font-weight: 600; }
|
||||
|
||||
.woodoo-selected-slot-display {
|
||||
margin-bottom: 1rem;
|
||||
padding: 10px 14px;
|
||||
background: #eff6ff;
|
||||
border: 1px solid #bfdbfe;
|
||||
border-radius: 4px;
|
||||
font-size: .9rem;
|
||||
}
|
||||
|
||||
/* ── Meeting Cards ───────────────────────────────────────── */
|
||||
.woodoo-meetings-grid {
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
}
|
||||
.woodoo-meeting-card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
padding: 14px 16px;
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
}
|
||||
.woodoo-meeting-card__date {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
min-width: 44px;
|
||||
background: #2271b1;
|
||||
color: #fff;
|
||||
border-radius: 6px;
|
||||
padding: 6px 8px;
|
||||
text-align: center;
|
||||
}
|
||||
.woodoo-meeting-card__day { font-size: 1.4rem; font-weight: 700; line-height: 1; }
|
||||
.woodoo-meeting-card__month { font-size: .7rem; text-transform: uppercase; }
|
||||
.woodoo-meeting-card__info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
|
||||
.woodoo-meeting-card__time { font-size: .85rem; color: #6b7280; }
|
||||
.woodoo-meeting-card__video { font-size: .85rem; font-weight: 600; }
|
||||
.woodoo-meeting-card__loc { font-size: .85rem; color: #6b7280; }
|
||||
|
||||
/* ── Admin styles (woodoo-admin.css shares this file via enqueueing) ── */
|
||||
.woodoo-settings .woodoo-tab { padding: 16px 0; }
|
||||
.woodoo-info-box {
|
||||
background: #fff8e1;
|
||||
border: 1px solid #ffe082;
|
||||
border-radius: 4px;
|
||||
padding: 12px 16px;
|
||||
margin-top: 12px;
|
||||
font-size: .875rem;
|
||||
}
|
||||
.woodoo-info-box ul { margin: .5rem 0 0 1.2rem; }
|
||||
.woodoo-info-box li { margin-bottom: 4px; }
|
||||
.woodoo-order-meta { border-top: 1px solid #e5e7eb; padding-top: 10px; }
|
||||
Reference in New Issue
Block a user