feat(fusion_accounting_followup): partner_card + aging_bucket_strip + risk_badge components
Made-with: Cursor
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { Component } from "@odoo/owl";
|
||||
|
||||
export class AgingBucketStrip extends Component {
|
||||
static template = "fusion_accounting_followup.AgingBucketStrip";
|
||||
static props = {
|
||||
aging: { type: Object },
|
||||
};
|
||||
|
||||
bucketWidth(bucket) {
|
||||
const total = this.props.aging.total_amount || 1;
|
||||
return ((bucket.amount / total) * 100).toFixed(2) + "%";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates xml:space="preserve">
|
||||
|
||||
<t t-name="fusion_accounting_followup.AgingBucketStrip">
|
||||
<div class="mt-2">
|
||||
<div class="fu-aging-strip">
|
||||
<div t-foreach="props.aging.buckets" t-as="b" t-key="b.name"
|
||||
class="bucket" t-att-data-name="b.name"
|
||||
t-att-style="'width: ' + bucketWidth(b)"
|
||||
t-att-title="b.name + ': $' + (b.amount or 0).toFixed(2)"/>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between text-muted" style="font-size: 0.7rem;">
|
||||
<span>Current</span>
|
||||
<span>30</span>
|
||||
<span>60</span>
|
||||
<span>90</span>
|
||||
<span>120+</span>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
Reference in New Issue
Block a user