Package attachments fixed

CR-20974-PDF-Results-In-Lab
haroon amjad 2 months ago
parent 884e97ddfd
commit ed9e8f1e52

@ -56,6 +56,7 @@ class LabResult {
List<FileNameWithExtensionList>? fileNameWithExtensionList;
String? verifiedOn;
dynamic verifiedOnDateTime;
bool? isPackage;
LabResult(
{this.accessionNo,
@ -187,6 +188,8 @@ class LabResult {
verifiedOn = json['VerifiedOn'];
verifiedOnDateTime = json['VerifiedOnDateTime'];
isPackage = json['IsPackage'];
}
Map<String, dynamic> toJson() {

@ -1,11 +1,13 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/lab/lab_view_model.dart';
import 'package:hmg_patient_app_new/features/lab/models/resp_models/lab_result.dart';
import 'package:hmg_patient_app_new/presentation/lab/lab_result_via_clinic/lab_order_result_item.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/date_range_selector/viewmodel/date_range_view_model.dart';
import 'package:provider/provider.dart';
import '../../../core/utils/size_utils.dart' show ResponsiveExtension;
@ -87,7 +89,24 @@ class _LabResultListState extends State<LabResultList> {
},
)
else
SizedBox.shrink()
SizedBox.shrink(),
CustomButton(
icon: AppAssets.document,
iconColor: AppColors.primaryRedColor,
iconSize: 16.h,
text: LocaleKeys.viewAttachment.tr(context: context),
onPressed: () async {
model.openLabResultsAttachmentSheet(labResult: labResults.first);
},
backgroundColor: AppColors.primaryRedColor.withAlpha(20),
borderColor: AppColors.primaryRedColor.withAlpha(0),
textColor: AppColors.primaryRedColor,
fontSize: 13.f,
fontWeight: FontWeight.w600,
borderRadius: 12.r,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 40.h,
),
],
),),

@ -162,7 +162,7 @@ class LabOrderResultItem extends StatelessWidget {
),
),
),
if (tests?.isLabTestAttachment ?? false)
if ((tests?.isLabTestAttachment ?? false) && !(tests?.isPackage ?? false))
Flexible(
flex: 2,
child: CustomButton(

Loading…
Cancel
Save