Clarify CEO dashboard revenue labels
This commit is contained in:
parent
5667b847d5
commit
20ef8be015
@ -78,6 +78,16 @@ export class McsCeoDashboardV2 extends Component {
|
|||||||
const width = Math.max(0, Math.min(100, (value || 0) / max * 100));
|
const width = Math.max(0, Math.min(100, (value || 0) / max * 100));
|
||||||
return `width: ${width}%;`;
|
return `width: ${width}%;`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
revenueLabel(key) {
|
||||||
|
return {
|
||||||
|
target: "Target",
|
||||||
|
contracted: "Contracted",
|
||||||
|
invoiced: "Invoiced This Month",
|
||||||
|
collected: "Collected This Month",
|
||||||
|
forecast: "Forecast",
|
||||||
|
}[key] || key;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
McsCeoDashboardV2.template = "mcs_operating_system.CeoDashboardV2";
|
McsCeoDashboardV2.template = "mcs_operating_system.CeoDashboardV2";
|
||||||
|
|||||||
@ -53,7 +53,7 @@
|
|||||||
<div class="o_mcs_revenue_bars">
|
<div class="o_mcs_revenue_bars">
|
||||||
<t t-foreach="['target', 'contracted', 'invoiced', 'collected', 'forecast']" t-as="key" t-key="key">
|
<t t-foreach="['target', 'contracted', 'invoiced', 'collected', 'forecast']" t-as="key" t-key="key">
|
||||||
<div class="o_mcs_bar_row">
|
<div class="o_mcs_bar_row">
|
||||||
<span class="o_mcs_bar_label" t-esc="key"/>
|
<span class="o_mcs_bar_label" t-esc="this.revenueLabel(key)"/>
|
||||||
<div class="o_mcs_bar_track">
|
<div class="o_mcs_bar_track">
|
||||||
<div class="o_mcs_bar_fill" t-att-style="this.barStyle(state.data.revenue[key], state.data.revenue.target)"/>
|
<div class="o_mcs_bar_fill" t-att-style="this.barStyle(state.data.revenue[key], state.data.revenue.target)"/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user