changes
This commit is contained in:
@@ -6,8 +6,25 @@ export class FusionApprovalCard extends Component {
|
||||
static template = "fusion_accounting.ApprovalCard";
|
||||
static props = ["approval", "onApprove", "onReject"];
|
||||
|
||||
get confidencePercent() {
|
||||
return Math.round((this.props.approval.confidence || 0) * 100);
|
||||
get toolLabel() {
|
||||
const name = this.props.approval.tool_name || "";
|
||||
// Short labels for common tools
|
||||
const labels = {
|
||||
create_payroll_journal_entry: "Payroll JE",
|
||||
create_vendor_bill: "Vendor Bill",
|
||||
register_bill_payment: "Bill Payment",
|
||||
create_expense_entry: "Expense",
|
||||
register_hst_payment: "HST Payment",
|
||||
apply_payment: "Payment",
|
||||
send_followup: "Follow-up",
|
||||
flag_entry: "Flag",
|
||||
};
|
||||
return labels[name] || name.replace(/_/g, " ").replace(/\b\w/g, c => c.toUpperCase());
|
||||
}
|
||||
|
||||
formatAmount(val) {
|
||||
if (!val) return "";
|
||||
return Number(val).toLocaleString("en-CA", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
||||
}
|
||||
|
||||
approve() {
|
||||
|
||||
Reference in New Issue
Block a user