更新睡眠报告
This commit is contained in:
@@ -8,6 +8,7 @@ import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||
import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
|
||||
import 'package:vbvs_app/pages/sleep_report/chart/TimeSeriesChart.dart';
|
||||
import 'package:EasyDartModule/EasyDartModule.dart' as es;
|
||||
|
||||
class BreatheStandardWidget extends StatefulWidget {
|
||||
var sleepReport;
|
||||
@@ -35,338 +36,336 @@ class _BreatheStandardWidgetState extends State<BreatheStandardWidget> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (widget.sleepReport == null ||
|
||||
widget.sleepReport is! Map ||
|
||||
widget.sleepReport.isEmpty) {
|
||||
return Container();
|
||||
}
|
||||
try {
|
||||
if (widget.sleepReport == null ||
|
||||
widget.sleepReport is! Map ||
|
||||
widget.sleepReport.isEmpty) {
|
||||
return Container();
|
||||
}
|
||||
|
||||
final startTime = widget.sleepReport['startTime'];
|
||||
final endTime = widget.sleepReport['endTime'];
|
||||
List<Map<String, dynamic>> data =
|
||||
(widget.sleepReport['brbc'] as List).cast<Map<String, dynamic>>();
|
||||
// final dataPoints = [
|
||||
// TimeSeriesPoint(12121, 50),
|
||||
// TimeSeriesPoint(1212, 120),
|
||||
// TimeSeriesPoint(121, 80),
|
||||
// TimeSeriesPoint(1212, 180),
|
||||
// TimeSeriesPoint(1212, 30),
|
||||
// TimeSeriesPoint(1212, 150),
|
||||
// ];
|
||||
final dataPoints = data.map((item) {
|
||||
final x = item['st'] as int;
|
||||
final y = (item['value'] as num).toDouble(); // 安全地转换为 double
|
||||
return TimeSeriesPoint(x, y);
|
||||
}).toList();
|
||||
final startTime = widget.sleepReport['startTime'];
|
||||
final endTime = widget.sleepReport['endTime'];
|
||||
List<Map<String, dynamic>> data =
|
||||
(widget.sleepReport['brbc'] as List).cast<Map<String, dynamic>>();
|
||||
final dataPoints = data.map((item) {
|
||||
final x = item['st'] as int;
|
||||
final y = (item['value'] as num).toDouble(); // 安全地转换为 double
|
||||
return TimeSeriesPoint(x, y);
|
||||
}).toList();
|
||||
|
||||
List<Map<String, dynamic>> brs =
|
||||
(widget.sleepReport['brs'] as List).cast<Map<String, dynamic>>();
|
||||
//307 平均呼吸
|
||||
//305 基准呼吸
|
||||
//308 最低呼吸
|
||||
//309 最高呼吸
|
||||
// 307 平均呼吸
|
||||
Map<String, dynamic>? avgBreath = brs.firstWhere(
|
||||
(element) => element['id'] == 307,
|
||||
orElse: () => {},
|
||||
);
|
||||
List<Map<String, dynamic>> brs =
|
||||
(widget.sleepReport['brs'] as List).cast<Map<String, dynamic>>();
|
||||
//307 平均呼吸
|
||||
//305 基准呼吸
|
||||
//308 最低呼吸
|
||||
//309 最高呼吸
|
||||
// 307 平均呼吸
|
||||
Map<String, dynamic>? avgBreath = brs.firstWhere(
|
||||
(element) => element['id'] == 307,
|
||||
orElse: () => {},
|
||||
);
|
||||
|
||||
// 305 基准呼吸
|
||||
Map<String, dynamic>? baseBreath = brs.firstWhere(
|
||||
(element) => element['id'] == 305,
|
||||
orElse: () => {},
|
||||
);
|
||||
Map<String, dynamic>? baseBreath = brs.firstWhere(
|
||||
(element) => element['id'] == 305,
|
||||
orElse: () => {},
|
||||
);
|
||||
|
||||
// 308 最低呼吸
|
||||
Map<String, dynamic>? minBreath = brs.firstWhere(
|
||||
(element) => element['id'] == 308,
|
||||
orElse: () => {},
|
||||
);
|
||||
Map<String, dynamic>? minBreath = brs.firstWhere(
|
||||
(element) => element['id'] == 308,
|
||||
orElse: () => {},
|
||||
);
|
||||
|
||||
// 309 最高呼吸
|
||||
Map<String, dynamic>? maxBreath = brs.firstWhere(
|
||||
(element) => element['id'] == 309,
|
||||
orElse: () => {},
|
||||
);
|
||||
Map<String, dynamic>? maxBreath = brs.firstWhere(
|
||||
(element) => element['id'] == 309,
|
||||
orElse: () => {},
|
||||
);
|
||||
|
||||
String range = baseBreath['range'] ?? '';
|
||||
int min = 0;
|
||||
int max = 0;
|
||||
String range = baseBreath['range'] ?? '';
|
||||
int min = 0;
|
||||
int max = 0;
|
||||
|
||||
if (range.isNotEmpty && range.contains('~')) {
|
||||
List<String> parts = range.split('~');
|
||||
if (parts.length == 2) {
|
||||
min = int.tryParse(parts[0]) ?? 0;
|
||||
max = int.tryParse(parts[1]) ?? 0;
|
||||
if (range.isNotEmpty && range.contains('~')) {
|
||||
List<String> parts = range.split('~');
|
||||
if (parts.length == 2) {
|
||||
min = int.tryParse(parts[0]) ?? 0;
|
||||
max = int.tryParse(parts[1]) ?? 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: themeController.currentColor.sc5,
|
||||
borderRadius: BorderRadius.circular(
|
||||
AppConstants().normal_container_radius), // 你可以按需调整圆角半径
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(26.rpx, 29.rpx, 26.rpx, 45.rpx),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Container(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"呼吸数据".tr,
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize: AppConstants().title_text_fontSize),
|
||||
),
|
||||
ClickableContainer(
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
14.rpx, 0.rpx, 14.rpx, 0), //
|
||||
borderRadius: 0.rpx, // 圆形点击区域
|
||||
onTap: () {
|
||||
showTipDialog(
|
||||
context,
|
||||
Container(
|
||||
child: Text(
|
||||
"呼吸数据介绍".tr,
|
||||
style: TextStyle(
|
||||
fontSize: 26.rpx,
|
||||
color: themeController.currentColor.sc3,
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: themeController.currentColor.sc5,
|
||||
borderRadius: BorderRadius.circular(
|
||||
AppConstants().normal_container_radius), // 你可以按需调整圆角半径
|
||||
),
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(26.rpx, 29.rpx, 26.rpx, 45.rpx),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Container(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"呼吸数据".tr,
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize: AppConstants().title_text_fontSize),
|
||||
),
|
||||
ClickableContainer(
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors.white, // 或设置为你需要的水波纹颜色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
14.rpx, 0.rpx, 14.rpx, 0), //
|
||||
borderRadius: 0.rpx, // 圆形点击区域
|
||||
onTap: () {
|
||||
showTipDialog(
|
||||
context,
|
||||
Container(
|
||||
child: Text(
|
||||
"呼吸数据介绍".tr,
|
||||
style: TextStyle(
|
||||
fontSize: 26.rpx,
|
||||
color: themeController.currentColor.sc3,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0, 0.rpx, 0.rpx, 0), // 外部 padding 移到内部
|
||||
width: 28.rpx,
|
||||
height: 28.rpx,
|
||||
child: SvgPicture.asset(
|
||||
'assets/img/icon/explain.svg',
|
||||
fit: BoxFit.cover,
|
||||
color: themeController.currentColor.sc4,
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0, 0.rpx, 0.rpx, 0), // 外部 padding 移到内部
|
||||
width: 28.rpx,
|
||||
height: 28.rpx,
|
||||
child: SvgPicture.asset(
|
||||
'assets/img/icon/explain.svg',
|
||||
fit: BoxFit.cover,
|
||||
color: themeController.currentColor.sc4,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 31.rpx,
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(0.rpx, 0.rpx, 30.rpx, 0.rpx),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
// 圆形小球容器
|
||||
Container(
|
||||
width: 14.rpx, // 圆球的直径
|
||||
height: 14.rpx,
|
||||
decoration: BoxDecoration(
|
||||
color: themeController.currentColor.sc2, // 小球的颜色
|
||||
shape: BoxShape.circle, // 设置为圆形
|
||||
),
|
||||
),
|
||||
SizedBox(width: 15.rpx), // 圆球和文字之间的间隔
|
||||
// 文字
|
||||
Text(
|
||||
'正常范围'.tr + "${range}",
|
||||
style: TextStyle(
|
||||
fontSize:
|
||||
AppConstants().smaller_text_fontSize, // 文字的大小
|
||||
color: themeController.currentColor.sc3, // 文字颜色
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Container(
|
||||
// color: Colors.red,
|
||||
width: double.infinity,
|
||||
// height: 300.rpx,
|
||||
child: TimeSeriesChart(
|
||||
startTime: startTime,
|
||||
endTime: endTime,
|
||||
yMin: 50,
|
||||
yMax: 150,
|
||||
dataPoints: dataPoints,
|
||||
actYMax: max.toDouble(),
|
||||
actYMin: min.toDouble(),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
30.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
SizedBox(
|
||||
height: 31.rpx,
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(0.rpx, 0.rpx, 30.rpx, 0.rpx),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
"${avgBreath['name']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize:
|
||||
AppConstants().normal_text_fontSize),
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
"${avgBreath['value']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc2,
|
||||
fontSize:
|
||||
AppConstants().normal_text_fontSize),
|
||||
),
|
||||
Text(
|
||||
"${avgBreath['unit']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize:
|
||||
AppConstants().small_text_fontSize),
|
||||
),
|
||||
].divide(SizedBox(
|
||||
width: 6.rpx,
|
||||
)),
|
||||
),
|
||||
],
|
||||
// 圆形小球容器
|
||||
Container(
|
||||
width: 14.rpx, // 圆球的直径
|
||||
height: 14.rpx,
|
||||
decoration: BoxDecoration(
|
||||
color: themeController.currentColor.sc2, // 小球的颜色
|
||||
shape: BoxShape.circle, // 设置为圆形
|
||||
),
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
"${baseBreath['name']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize:
|
||||
AppConstants().normal_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
"${baseBreath['value']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc2,
|
||||
fontSize:
|
||||
AppConstants().normal_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Text(
|
||||
"${baseBreath['unit']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize:
|
||||
AppConstants().small_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
].divide(SizedBox(
|
||||
width: 6.rpx,
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
"${minBreath['name']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize:
|
||||
AppConstants().normal_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
"${minBreath['value']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc2,
|
||||
fontSize:
|
||||
AppConstants().normal_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Text(
|
||||
"${minBreath['unit']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize:
|
||||
AppConstants().small_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
].divide(SizedBox(
|
||||
width: 6.rpx,
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
"${maxBreath['name']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize:
|
||||
AppConstants().normal_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
"${maxBreath['value']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc2,
|
||||
fontSize:
|
||||
AppConstants().normal_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Text(
|
||||
"${maxBreath['unit']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize:
|
||||
AppConstants().small_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
].divide(SizedBox(
|
||||
width: 6.rpx,
|
||||
)),
|
||||
),
|
||||
],
|
||||
SizedBox(width: 15.rpx), // 圆球和文字之间的间隔
|
||||
// 文字
|
||||
Text(
|
||||
'正常范围'.tr + "${range}",
|
||||
style: TextStyle(
|
||||
fontSize:
|
||||
AppConstants().smaller_text_fontSize, // 文字的大小
|
||||
color: themeController.currentColor.sc3, // 文字颜色
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(
|
||||
height: 18.rpx,
|
||||
)),
|
||||
Container(
|
||||
// color: Colors.red,
|
||||
width: double.infinity,
|
||||
// height: 300.rpx,
|
||||
child: TimeSeriesChart(
|
||||
startTime: startTime,
|
||||
endTime: endTime,
|
||||
yMin: 50,
|
||||
yMax: 150,
|
||||
dataPoints: dataPoints,
|
||||
actYMax: max.toDouble(),
|
||||
actYMin: min.toDouble(),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
30.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
"${avgBreath['name']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize:
|
||||
AppConstants().normal_text_fontSize),
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
"${avgBreath['value']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc2,
|
||||
fontSize: AppConstants()
|
||||
.normal_text_fontSize),
|
||||
),
|
||||
Text(
|
||||
"${avgBreath['unit']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize:
|
||||
AppConstants().small_text_fontSize),
|
||||
),
|
||||
].divide(SizedBox(
|
||||
width: 6.rpx,
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
"${baseBreath['name']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize:
|
||||
AppConstants().normal_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
"${baseBreath['value']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc2,
|
||||
fontSize: AppConstants()
|
||||
.normal_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Text(
|
||||
"${baseBreath['unit']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize:
|
||||
AppConstants().small_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
].divide(SizedBox(
|
||||
width: 6.rpx,
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
"${minBreath['name']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize:
|
||||
AppConstants().normal_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
"${minBreath['value']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc2,
|
||||
fontSize: AppConstants()
|
||||
.normal_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Text(
|
||||
"${minBreath['unit']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize:
|
||||
AppConstants().small_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
].divide(SizedBox(
|
||||
width: 6.rpx,
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
"${maxBreath['name']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize:
|
||||
AppConstants().normal_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
"${maxBreath['value']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc2,
|
||||
fontSize: AppConstants()
|
||||
.normal_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Text(
|
||||
"${maxBreath['unit']}",
|
||||
style: TextStyle(
|
||||
color: themeController.currentColor.sc3,
|
||||
fontSize:
|
||||
AppConstants().small_text_fontSize),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
].divide(SizedBox(
|
||||
width: 6.rpx,
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(
|
||||
height: 18.rpx,
|
||||
)),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
);
|
||||
} catch (e) {
|
||||
es.EasyDartModule.logger.error("打鼾监测绘制异常${e}");
|
||||
return Container();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user