fix(portal): 5 hotfixes - /my route, button sizing, clickable cards, state sync, SO doc
1. /my now serves the FP dashboard (stock Odoo home was leaking through because parent route declared ['/my', '/my/home'] but my override only listed /my/home). 2. Button padding bumped to .5rem 1rem + font 1rem so o_fp_btn matches Odoo's standard Bootstrap button rhythm. Ghost button drops its custom padding override. 3. .o_fp_job_card on /my/home + /my/jobs is now an <a> wrapping the whole card area — full row is the click target, not just the WO number. Inner <a> on job.name dropped to avoid nested anchors; focus-visible outline added for keyboard nav. 4. fp.job.write() now mirrors state -> fp.portal.job.state via new _FP_JOB_STATE_TO_PORTAL_STATE map (confirmed->received, in_progress->in_progress, done->ready_to_ship). Fixes the bug where completed backend jobs left the portal stuck on 'in_progress'. 'on_hold' and 'cancelled' intentionally not mirrored — manager choice what to surface. 5. Sales Order Confirmation now surfaces in the 'From You' group on the job detail page, pulled via job.x_fc_job_id.sale_order_id -> /report/pdf/sale.report_saleorder/<id>. Falls back to the upload placeholder when no SO is linked. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,12 +9,13 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: $fp-space-2;
|
||||
padding: .55rem 1.1rem;
|
||||
// Match Odoo's standard Bootstrap button rhythm (38px tall).
|
||||
padding: .5rem 1rem;
|
||||
border-radius: $fp-radius-button;
|
||||
font-family: $fp-font;
|
||||
font-size: .85rem;
|
||||
font-weight: 600;
|
||||
line-height: 1.1;
|
||||
font-size: 1rem;
|
||||
font-weight: 500;
|
||||
line-height: 1.4;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
@@ -60,7 +61,6 @@
|
||||
background: transparent;
|
||||
color: $fp-teal;
|
||||
font-weight: 500;
|
||||
padding: .45rem .85rem;
|
||||
&:hover { background: rgba(46, 175, 147, .08); color: $fp-teal-dark; }
|
||||
}
|
||||
|
||||
@@ -83,6 +83,6 @@
|
||||
&:hover { color: $fp-teal-dark; }
|
||||
}
|
||||
|
||||
// Size modifiers
|
||||
.o_fp_btn_sm { padding: .35rem .75rem; font-size: .76rem; }
|
||||
.o_fp_btn_lg { padding: .75rem 1.4rem; font-size: .95rem; }
|
||||
// Size modifiers — match Bootstrap btn-sm / btn-lg sizing
|
||||
.o_fp_btn_sm { padding: .25rem .5rem; font-size: .875rem; }
|
||||
.o_fp_btn_lg { padding: .5rem 1rem; font-size: 1.25rem; }
|
||||
|
||||
@@ -98,6 +98,26 @@
|
||||
margin-bottom: $fp-space-3;
|
||||
box-shadow: $fp-shadow-card;
|
||||
|
||||
// Works for both <div> and <a> wrappers. When rendered as an anchor
|
||||
// the whole card becomes a click target (jobs list + dashboard).
|
||||
display: block;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
transition: box-shadow .15s ease, transform .08s ease, border-color .15s ease;
|
||||
|
||||
&:hover,
|
||||
&:focus-visible {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
box-shadow: $fp-shadow-card-hover;
|
||||
border-color: $fp-aqua;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
&:focus-visible {
|
||||
outline: 2px solid $fp-teal;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.o_fp_job_header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
Reference in New Issue
Block a user