fix(pl): include pending recharge applies in approval menu badge
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
c8174ab3f2
commit
a86ded9ea6
2 files changed
+3
-2
No files matched your search
@@ -164,7 +164,7 @@ def count_recharge_approval_pending(db: Session, tenant_no: str, user_id: str) -
|
||||
.filter(
|
||||
PlVehicleRechargeApply.tenant_no == tenant_no,
|
||||
PlVehicleRechargeApply.del_flag == 0,
|
||||
PlVehicleRechargeApply.status == "in_approval",
|
||||
PlVehicleRechargeApply.status.in_(("in_approval", "pending")),
|
||||
BxWorkflowNode.tenant_no == tenant_no,
|
||||
BxWorkflowNode.del_flag == 0,
|
||||
BxWorkflowNode.approver_id == user_id,
|
||||
|
||||
@@ -75,6 +75,7 @@ def test_recharge_approval_badge_counts_current_approver_pending(monkeypatch):
|
||||
add_apply("a3", status="in_approval", current_node="node-other")
|
||||
add_apply("a4", status="rejected", current_node="node-me")
|
||||
add_apply("a5", status="draft", current_node=None)
|
||||
add_apply("a6", status="pending", current_node="node-me")
|
||||
db.commit()
|
||||
|
||||
monkeypatch.setattr(
|
||||
@@ -89,4 +90,4 @@ def test_recharge_approval_badge_counts_current_approver_pending(monkeypatch):
|
||||
user_id="u-me",
|
||||
menu_codes=[MENU_CODE_RECHARGE_APPROVAL],
|
||||
)
|
||||
assert counts[MENU_CODE_RECHARGE_APPROVAL] == 2
|
||||
assert counts[MENU_CODE_RECHARGE_APPROVAL] == 3
|
||||
Reference in new issue
Block a user