feat(portal): fix configurator 500, hide manual measurements, upgrade job card

1. Configurator step 2/3 500 fix: fp.coating.config was retired
   (Sub-11) but the controller still queried it -> KeyError. Swapped
   to fusion.plating.process.type (the real coating taxonomy on entech:
   Hard Chrome, EN Low Phos, Type I Anodize, etc). Step 2 template
   dropped dead refs (coat.process_type_id / spec_reference / thickness_*
   / certification_level), now shows code + process_family + description.
   Pricing helper relaxed: filters out rules keyed to the dead model
   and silently returns {'available': False} -> template shows 'Quote
   will be priced by EN Plating' instead of fake numbers.

2. Configurator step 1: manual measurements hidden per customer
   feedback. Length/Width/Height/Surface Area are kept as hidden 0s so
   the rest of the flow doesn't error; backend trimesh still auto-calcs
   surface area silently when STL is uploaded. Single file input split
   into two: separate Drawing (PDF) + 3D Model (STL/STP/STEP/IGES)
   uploads so customer can send both. Multi-upload session shape:
   attachment_ids list. Submit handler re-keys ALL uploads onto the
   new quote_request.

3. Job card upgraded: new fp_portal_job_card macro shared by dashboard
   + jobs list. Renders wrap div containing main anchor (whole card
   clickable -> detail page) + sibling actions footer (4 doc download
   quick-buttons: SO / WO / CoC / Packing + Repeat Order form).
   Forms-inside-anchor is invalid HTML so the footer lives as a
   sibling, not a child. Card now shows part name+number and ship-to
   address pulled inline from job.x_fc_job_id.sale_order_id chain.
   Same data also added to detail-page hero for consistency.

Version bump: 19.0.3.6.0 -> 19.0.3.7.0.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-05-17 12:34:06 -04:00
parent 153b980e2b
commit 2802fcf738
7 changed files with 393 additions and 256 deletions

View File

@@ -91,61 +91,131 @@
}
}
// Job card: outer wrap is a plain div so we can place an interactive
// actions footer (Repeat Order form, doc download links) as a SIBLING
// of the main anchor — forms inside anchors are invalid HTML and
// browser-buggy. Hover/lift effect lives on the wrap; click target is
// the inner .o_fp_job_card_main anchor only.
.o_fp_job_card {
@extend .o_fp_card;
padding: $fp-space-4;
border-radius: $fp-radius-tile;
margin-bottom: $fp-space-3;
box-shadow: $fp-shadow-card;
transition: box-shadow .15s ease, transform .08s ease, border-color .15s ease;
// Works for both <div> and <a> wrappers. When rendered as an anchor
// the whole card becomes a click target (jobs list + dashboard).
&:hover {
box-shadow: $fp-shadow-card-hover;
border-color: $fp-aqua;
transform: translateY(-1px);
}
}
.o_fp_job_card_main {
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;
align-items: center;
margin-bottom: $fp-space-3;
.o_fp_job_header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: .55rem;
gap: .65rem;
.o_fp_job_ref {
font-weight: 600;
color: $fp-text;
font-size: .98rem;
}
.o_fp_job_meta {
color: $fp-muted;
font-size: .8rem;
margin-left: .65rem;
}
.o_fp_job_ref {
font-weight: 600;
color: $fp-text;
font-size: .98rem;
}
.o_fp_job_docs {
display: flex;
flex-wrap: wrap;
gap: .35rem;
margin-top: $fp-space-3;
padding-top: .6rem;
border-top: 1px solid $fp-section-bg;
.o_fp_job_meta {
color: $fp-muted;
font-size: .8rem;
margin-left: .55rem;
}
}
// Part name / number row under the header
.o_fp_job_part {
color: $fp-text-body;
font-size: .78rem;
margin-bottom: .2rem;
.o_fp_job_part_icon { color: $fp-muted-light; margin-right: .3rem; }
}
// Shipping address row
.o_fp_job_ship {
color: $fp-muted;
font-size: .76rem;
margin-bottom: $fp-space-3;
.o_fp_job_ship_icon { color: $fp-muted-light; margin-right: .3rem; }
}
// Actions footer — siblings of the main anchor. Doc download chips on
// the left, Repeat Order on the right. Border-top visually separates.
.o_fp_job_card_actions {
display: flex;
align-items: center;
justify-content: space-between;
gap: $fp-space-3;
margin-top: $fp-space-3;
padding-top: .7rem;
border-top: 1px solid $fp-section-bg;
flex-wrap: wrap;
}
.o_fp_job_card_docs {
display: flex;
align-items: center;
gap: .4rem;
flex-wrap: wrap;
}
// Compact icon-only download chip. Tooltip via `title` attr.
.o_fp_doc_quick_btn {
display: inline-flex;
align-items: center;
gap: .25rem;
padding: .3rem .55rem;
background: $fp-section-bg;
color: $fp-teal;
border: 1px solid $fp-card-border;
border-radius: $fp-radius-chip;
font-size: .72rem;
font-weight: 500;
text-decoration: none;
transition: background .12s ease, color .12s ease;
&:hover {
background: $fp-mint;
color: $fp-teal-dark;
text-decoration: none;
}
&.o_fp_doc_quick_btn_pending {
background: $fp-card-bg;
color: $fp-muted-light;
border: 1px dashed $fp-card-border-dark;
cursor: not-allowed;
pointer-events: none;
}
}
// Legacy: kept for any place still rendering chips below the stepper.
.o_fp_job_docs {
display: flex;
flex-wrap: wrap;
gap: .35rem;
margin-top: $fp-space-3;
padding-top: .6rem;
border-top: 1px solid $fp-section-bg;
}
.o_fp_secondary_panels {
display: grid;
// Auto-fit so 5 panels arrange nicely as 3+2 / 2+2+1 / 1 column at