style(portal): tokenise quote/RFQ/delivery/cert templates with new system
Swap legacy Bootstrap classes for the new o_fp_* token system: - Quote-list 'New Quote Request' CTA: btn-primary -> o_fp_btn_primary - Quote list+detail state badges: complex conditional -> macro call - RFQ form Cancel/Submit: btn-link/primary -> o_fp_btn_ghost/primary - RFQ 'Add Part' button: btn-outline-secondary -> o_fp_btn_secondary - Process-type chips (cert+detail): badge text-bg-light -> o_fp_doc_chip - 'Delivered' badge in deliveries list: o_fp_badge o_fp_badge_shipped - CoC download button on certs: btn-outline-success -> o_fp_btn_secondary Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -27,8 +27,8 @@
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="d-flex justify-content-end mb-3">
|
<div class="d-flex justify-content-end mb-3">
|
||||||
<a href="/my/quote_requests/new" class="btn btn-primary">
|
<a href="/my/quote_requests/new" class="o_fp_btn_primary">
|
||||||
<i class="fa fa-plus me-1"/>New Quote Request
|
<i class="fa fa-plus"/> New Quote Request
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -69,14 +69,10 @@
|
|||||||
<span t-else="" class="text-muted">--</span>
|
<span t-else="" class="text-muted">--</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-end">
|
<td class="text-end">
|
||||||
<span t-attf-class="badge #{
|
<t t-call="fusion_plating_portal.fp_portal_status_badge">
|
||||||
'text-bg-secondary' if qr.state == 'new' else
|
<t t-set="state" t-value="qr.state"/>
|
||||||
'text-bg-info' if qr.state == 'under_review' else
|
<t t-set="label" t-value="dict(qr._fields['state']._description_selection(qr.env)).get(qr.state)"/>
|
||||||
'text-bg-primary' if qr.state == 'quoted' else
|
</t>
|
||||||
'text-bg-success' if qr.state == 'accepted' else
|
|
||||||
'text-bg-danger' if qr.state == 'declined' else
|
|
||||||
'text-bg-warning'}"
|
|
||||||
t-out="dict(qr._fields['state']._description_selection(qr.env)).get(qr.state)"/>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -113,14 +109,10 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<h6 class="text-muted small text-uppercase">Status</h6>
|
<h6 class="text-muted small text-uppercase">Status</h6>
|
||||||
<span t-attf-class="badge #{
|
<t t-call="fusion_plating_portal.fp_portal_status_badge">
|
||||||
'text-bg-secondary' if quote_request.state == 'new' else
|
<t t-set="state" t-value="quote_request.state"/>
|
||||||
'text-bg-info' if quote_request.state == 'under_review' else
|
<t t-set="label" t-value="dict(quote_request._fields['state']._description_selection(quote_request.env)).get(quote_request.state)"/>
|
||||||
'text-bg-primary' if quote_request.state == 'quoted' else
|
</t>
|
||||||
'text-bg-success' if quote_request.state == 'accepted' else
|
|
||||||
'text-bg-danger' if quote_request.state == 'declined' else
|
|
||||||
'text-bg-warning'} fs-6"
|
|
||||||
t-out="dict(quote_request._fields['state']._description_selection(quote_request.env)).get(quote_request.state)"/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 text-md-end">
|
<div class="col-md-6 text-md-end">
|
||||||
<t t-if="quote_request.state == 'quoted' and quote_request.quoted_price">
|
<t t-if="quote_request.state == 'quoted' and quote_request.quoted_price">
|
||||||
@@ -213,7 +205,7 @@
|
|||||||
<div class="mb-4" t-if="quote_request.process_type_ids">
|
<div class="mb-4" t-if="quote_request.process_type_ids">
|
||||||
<h6 class="text-muted small text-uppercase">Requested Processes</h6>
|
<h6 class="text-muted small text-uppercase">Requested Processes</h6>
|
||||||
<span t-foreach="quote_request.process_type_ids" t-as="pt"
|
<span t-foreach="quote_request.process_type_ids" t-as="pt"
|
||||||
class="badge text-bg-light border me-1" t-out="pt.name"/>
|
class="o_fp_doc_chip me-1" t-out="pt.name"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-4" t-if="quote_request.part_description">
|
<div class="mb-4" t-if="quote_request.part_description">
|
||||||
@@ -356,7 +348,7 @@
|
|||||||
<div id="fp_parts_container">
|
<div id="fp_parts_container">
|
||||||
<!-- Part rows will be added by JS -->
|
<!-- Part rows will be added by JS -->
|
||||||
</div>
|
</div>
|
||||||
<button type="button" class="btn btn-outline-secondary mb-3" id="fp_add_part_btn">
|
<button type="button" class="o_fp_btn_secondary mb-3" id="fp_add_part_btn">
|
||||||
<i class="fa fa-plus me-1"/> ADD ANOTHER PART
|
<i class="fa fa-plus me-1"/> ADD ANOTHER PART
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@@ -416,9 +408,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="d-flex justify-content-between mt-4">
|
<div class="d-flex justify-content-between mt-4">
|
||||||
<a href="/my/quote_requests" class="btn btn-link">Cancel</a>
|
<a href="/my/quote_requests" class="o_fp_btn_ghost">Cancel</a>
|
||||||
<button type="submit" class="btn btn-primary btn-lg" id="fp_submit_rfq">
|
<button type="submit" class="o_fp_btn_primary o_fp_btn_lg" id="fp_submit_rfq">
|
||||||
<i class="fa fa-paper-plane me-1"/>SUBMIT RFQ
|
<i class="fa fa-paper-plane"/> SUBMIT RFQ
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@@ -706,7 +698,9 @@
|
|||||||
t-options='{"widget": "date"}'/>
|
t-options='{"widget": "date"}'/>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-end">
|
<td class="text-end">
|
||||||
<span class="badge text-bg-success">Delivered</span>
|
<span class="o_fp_badge o_fp_badge_shipped">
|
||||||
|
<span class="o_fp_badge_dot"/>Delivered
|
||||||
|
</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -751,12 +745,12 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span t-foreach="cj.process_type_ids" t-as="pt"
|
<span t-foreach="cj.process_type_ids" t-as="pt"
|
||||||
class="badge text-bg-light border me-1" t-out="pt.name"/>
|
class="o_fp_doc_chip me-1" t-out="pt.name"/>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-end">
|
<td class="text-end">
|
||||||
<a t-att-href="'/my/jobs/%s/coc' % cj.id"
|
<a t-att-href="'/my/jobs/%s/coc' % cj.id"
|
||||||
class="btn btn-sm btn-outline-success">
|
class="o_fp_btn_secondary o_fp_btn_sm">
|
||||||
<i class="fa fa-download me-1"/>CoC
|
<i class="fa fa-download"/> CoC
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user