Skip to content

Commit

Permalink
fix: display progress bar on the dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
RitvikSardana committed Apr 1, 2024
1 parent 06ebaed commit e4a2622
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion education/education/doctype/fee_schedule/fee_schedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ frappe.ui.form.on("Fee Schedule", {
info.total_unpaid ? "orange" : "green"
);
}
if (frm.doc.doc === "In Process") {
if (frm.doc.status === "In Process") {
frm.dashboard.add_progress("Fee Creation Status", "0");
}
if (
Expand Down
6 changes: 3 additions & 3 deletions education/education/doctype/fee_schedule/fee_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def create_fees(self):

frappe.publish_realtime(
"fee_schedule_progress",
{"progress": "0", "reload": 1},
{"progress": 0, "reload": 1},
user=frappe.session.user,
)

Expand Down Expand Up @@ -139,7 +139,7 @@ def generate_fees(fee_schedule):
created_records += 1
frappe.publish_realtime(
"fee_schedule_progress",
{"progress": str(int(created_records * 100 / total_records))},
{"progress": int(created_records * 100 / total_records)},
user=frappe.session.user,
)

Expand All @@ -163,7 +163,7 @@ def generate_fees(fee_schedule):

frappe.publish_realtime(
"fee_schedule_progress",
{"progress": "100", "reload": 1},
{"progress": 100, "reload": 1},
user=frappe.session.user,
)

Expand Down

0 comments on commit e4a2622

Please sign in to comment.