Browse Source

新增是否能编辑报告的权限判断

loki.wu 8 months ago
parent
commit
eedb465247
1 changed files with 4 additions and 3 deletions
  1. 4 3
      lib/ecg_list/widgets/build_record_view.dart

+ 4 - 3
lib/ecg_list/widgets/build_record_view.dart

@@ -210,9 +210,10 @@ class ReportRecord extends StatelessWidget {
   Widget _buildSmailCardButtons() {
     return Row(
       children: [
-        textButton('修改', () {
-          onEditReport?.call(currReport.reportCode ?? '');
-        }),
+        if (currReport.canEditReport)
+          textButton('修改', () {
+            onEditReport?.call(currReport.reportCode ?? '');
+          }),
         const SizedBox(
           width: 15,
         ),