更新
This commit is contained in:
@@ -69,10 +69,8 @@ def _truthy(value: Any) -> bool:
|
||||
|
||||
|
||||
def prescription_status(row: Any) -> tuple[str, str]:
|
||||
"""Return the admin-equivalent combined status label and visual kind."""
|
||||
"""Return the admin audit-column status; void state has its own column."""
|
||||
|
||||
if _int(first_value(row, "void_status", "is_void"), 0) == 1:
|
||||
return "已作废", "danger"
|
||||
if _truthy(first_value(row, "business_prescription_audit_rejected", default=False)):
|
||||
return "已驳回", "danger"
|
||||
status = _int(first_value(row, "audit_status", "status", default=0), 0)
|
||||
@@ -718,6 +716,7 @@ class PrescriptionsPage(QWidget):
|
||||
current_user=self.current_user,
|
||||
parent=self,
|
||||
)
|
||||
dialog.diagnosis_requested.connect(self._open_diagnosis)
|
||||
if dialog.exec() == QDialog.DialogCode.Accepted:
|
||||
self._save_prescription(dialog.payload(), None)
|
||||
|
||||
@@ -739,6 +738,7 @@ class PrescriptionsPage(QWidget):
|
||||
current_user=self.current_user,
|
||||
parent=self,
|
||||
)
|
||||
dialog.diagnosis_requested.connect(self._open_diagnosis)
|
||||
if dialog.exec() == QDialog.DialogCode.Accepted:
|
||||
self._save_prescription(
|
||||
dialog.payload(),
|
||||
|
||||
Reference in New Issue
Block a user