|
@@ -319,20 +319,36 @@ class _ScrollableImageListState extends State<ScrollableImageList> {
|
|
|
return description;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ String _translateLocationDescription(RemedicalInfoDTO remedicalInfo) {
|
|
|
+ String description = '';
|
|
|
+
|
|
|
+ try {
|
|
|
+ description = _getLocationDescription(
|
|
|
+ remedicalInfo.imageLocation?.quadrant,
|
|
|
+ remedicalInfo.imageLocation?.position);
|
|
|
+ } on Exception catch (e) {
|
|
|
+ logger.e("Picture translation exception" + e.toString());
|
|
|
+ } catch (e) {
|
|
|
+ logger.e("Picture translation exception" + e.toString());
|
|
|
+ }
|
|
|
+ return description;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
- String _getLanguageValue(String code) {
|
|
|
- return measureLanguage.t('application', code);
|
|
|
+ String _getLanguageValue(String type, String code) {
|
|
|
+ return measureLanguage.t(type, code);
|
|
|
}
|
|
|
|
|
|
String _getDescription(String application, String applicationCategory) {
|
|
|
String description = '';
|
|
|
if ([application, applicationCategory].contains('FromSonopost')) {
|
|
|
- description = _getLanguageValue('FromSonopost');
|
|
|
+ description = _getLanguageValue('application', 'FromSonopost');
|
|
|
} else {
|
|
|
if (application.isNotEmpty || applicationCategory.isNotEmpty) {
|
|
|
- description = _getLanguageValue(applicationCategory) +
|
|
|
+ description = _getLanguageValue('application', applicationCategory) +
|
|
|
"-" +
|
|
|
- _getLanguageValue(application);
|
|
|
+ _getLanguageValue('application', application);
|
|
|
} else {
|
|
|
description = '';
|
|
|
}
|
|
@@ -340,6 +356,18 @@ class _ScrollableImageListState extends State<ScrollableImageList> {
|
|
|
return description;
|
|
|
}
|
|
|
|
|
|
+ String _getLocationDescription(String? quadrant, String? position) {
|
|
|
+ String description = '';
|
|
|
+ if (quadrant != '' || quadrant != '') {
|
|
|
+ description = _getLanguageValue('location', quadrant ?? '') +
|
|
|
+ "-" +
|
|
|
+ _getLanguageValue('location', position ?? '');
|
|
|
+ } else {
|
|
|
+ description = '';
|
|
|
+ }
|
|
|
+ return description;
|
|
|
+ }
|
|
|
+
|
|
|
FWidget _buildImageList(List<RemedicalInfoDTO> remedicalItemList) {
|
|
|
return FContainer(
|
|
|
key: widget.globalKey,
|
|
@@ -360,6 +388,7 @@ class _ScrollableImageListState extends State<ScrollableImageList> {
|
|
|
},
|
|
|
serialNo: index + 1,
|
|
|
description: _translateDescription(item),
|
|
|
+ locationDescription: _translateLocationDescription(item),
|
|
|
);
|
|
|
|
|
|
String originalImageUrl = item.terminalImages!.originImageUrl ?? "";
|