update to stores, VersionID 21.2

pull/317/head
haroon amjad 1 month ago
parent f7d415b7eb
commit 4329aa05ad

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 13 KiB

@ -208,8 +208,8 @@ class ApiClientImp implements ApiClient {
body['TokenID'] = "@dm!n";
}
body['TokenID'] = "@dm!n";
// body['PatientID'] = 1624918;
// body['TokenID'] = "@dm!n";
// body['PatientID'] = 1018977;
// body['PatientTypeID'] = 1;
// body['PatientOutSA'] = 0;
// body['SessionID'] = "45786230487560q";

@ -4,7 +4,7 @@ import 'package:hmg_patient_app_new/core/enums.dart';
class ApiConsts {
static const maxSmallScreen = 660;
static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.preProd;
static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.prod;
// static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT

@ -22,7 +22,6 @@ class PenguinMethodChannel {
"baseURL": "https://eagleiq.hmg.com",
"dataURL": "https://eagleiq.hmg.com",
"positionURL": "https://eagleiq.hmg.com",
"dataServiceName": "api",
"positionServiceName": "pe",
"clientID": "HMG",

@ -345,7 +345,7 @@ class ContactUsViewModel extends ChangeNotifier {
}
} else if (apiResponse.messageStatus == 1) {
cocItemsList = apiResponse.data!;
cocItemsList.sort((a, b) => a.date!.compareTo(b.date!));
cocItemsList.sort((a, b) => b.date!.compareTo(a.date!));
isCOCItemsListLoading = false;
notifyListeners();
if (onSuccess != null) {

@ -1,6 +1,7 @@
class GetPharmacyInvoicesResponseModel {
String? setupId;
int? projectID;
int? pharmacyProjectID;
int? patientID;
int? appointmentNo;
String? appointmentDate;
@ -24,6 +25,7 @@ class GetPharmacyInvoicesResponseModel {
GetPharmacyInvoicesResponseModel(
{this.setupId,
this.projectID,
this.pharmacyProjectID,
this.patientID,
this.appointmentNo,
this.appointmentDate,
@ -46,6 +48,7 @@ class GetPharmacyInvoicesResponseModel {
GetPharmacyInvoicesResponseModel.fromJson(Map<String, dynamic> json) {
setupId = json['SetupId'];
projectID = json['ProjectID'];
pharmacyProjectID = json['PharmacyProjectID'];
patientID = json['PatientID'];
appointmentNo = json['AppointmentNo'];
appointmentDate = json['AppointmentDate'];
@ -71,6 +74,7 @@ class GetPharmacyInvoicesResponseModel {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupId'] = this.setupId;
data['ProjectID'] = this.projectID;
data['PharmacyProjectID'] = this.pharmacyProjectID;
data['PatientID'] = this.patientID;
data['AppointmentNo'] = this.appointmentNo;
data['AppointmentDate'] = this.appointmentDate;

@ -98,7 +98,7 @@ Future<void> callAppStateInitializations() async {
PlatformDispatcher.instance.onError = (error, stack) {
if (!kDebugMode) {
FirebaseCrashlytics.instance.recordError(error, stack,
fatal: false,
fatal: true,
printDetails: true,
reason:
"${appState.isAuthenticated ? "Authenticated User ID: ${appState.getAuthenticatedUser()!.patientId} - ${appState.getAuthenticatedUser()!.mobileNumber}" : "Unauthenticated User"} - Uncaught asynchronous error");

@ -510,7 +510,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
applePayInsertRequest.voipToken = await Utils.getStringFromPrefs(CacheConst.voipToken);
applePayInsertRequest.doctorID = 0;
applePayInsertRequest.projectID = "12";
applePayInsertRequest.serviceID = ServiceTypeEnum.appointmentPayment.getIdFromServiceEnum().toString();
applePayInsertRequest.serviceID = ServiceTypeEnum.liveCareAppointment.getIdFromServiceEnum().toString();
applePayInsertRequest.channelID = 3;
applePayInsertRequest.patientID = appState.getAuthenticatedUser()!.patientId.toString();
applePayInsertRequest.patientTypeID = appState.getAuthenticatedUser()!.patientType;

@ -77,7 +77,7 @@ class LakumWalletDetails extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
LocaleKeys.transactions.tr(context: context).toText16(isBold: true),
if (transactions.isNotEmpty) "${transactions.length} Records".toText12(color: AppColors.greyTextColor),
// if (transactions.isNotEmpty) "${transactions.length} Records".toText12(color: AppColors.greyTextColor),
],
),
SizedBox(height: 12.h),
@ -142,8 +142,8 @@ class LakumWalletDetails extends StatelessWidget {
),
Utils.buildImgWithAssets(
icon: AppAssets.lakumLogoWhite,
width: 80.h,
height: 80.h,
width: 110.h,
height: 100.h,
),
],
),

@ -83,27 +83,19 @@ class _FamilyCardsState extends State<FamilyCards> {
false, // Don't show files option, only camera and gallery
(base64String, file) async {
try {
print('=== Starting image processing ===');
print('File path: ${file.path}');
print('File exists: ${await file.exists()}');
print('Original file size: ${await file.length() / 1024} KB');
// Compress and resize the image
print('Calling compressAndResizeImage...');
final compressedFile = await ImageCompressionHelper.compressAndResizeImage(file);
File finalFile;
String finalBase64;
if (compressedFile == null) {
print('⚠️ Compression failed - using original file as fallback');
// Fallback: use original image if compression fails
final originalSize = await file.length();
final maxSize = 1048576; // 1MB
if (originalSize > maxSize) {
print('❌ Original file is too large: ${originalSize / 1024} KB');
if (mounted) {
Utils.showToast(
LocaleKeys.imageSizeTooLarge.tr(context: context),
@ -111,8 +103,6 @@ class _FamilyCardsState extends State<FamilyCards> {
}
return;
}
print('✅ Using original file (${originalSize / 1024} KB)');
finalFile = file;
var bytes = await file.readAsBytes();
finalBase64 = base64.encode(bytes);
@ -120,10 +110,8 @@ class _FamilyCardsState extends State<FamilyCards> {
// Check compressed file size
final fileSize = await compressedFile.length();
final maxSize = 1048576; // 1MB
print('✅ Compression successful: ${fileSize / 1024} KB');
if (fileSize > maxSize) {
print('❌ Compressed file still too large');
if (mounted) {
Utils.showToast(
LocaleKeys.imageSizeTooLarge.tr(context: context),
@ -137,22 +125,16 @@ class _FamilyCardsState extends State<FamilyCards> {
finalBase64 = base64.encode(bytes);
}
print('Converting to base64... Length: ${finalBase64.length}');
if (mounted) {
setState(() {
_selectedImage = finalFile;
});
print('📤 Starting upload...');
// Upload the image
_uploadImage(finalBase64);
}
print('=== Image processing complete ===');
} catch (e, stackTrace) {
print('❌ Error in _pickImage: $e');
print('Stack trace: $stackTrace');
if (mounted) {
Utils.showToast(
LocaleKeys.failedToProcessImage.tr(context: context),
@ -901,6 +883,7 @@ class _FamilyCardsState extends State<FamilyCards> {
: Expanded(
child: CustomButton(
height: 40.h,
fontSize: 14.f,
text: LocaleKeys.acceptLbl.tr(),
onPressed: () {
navigationService.pop();
@ -917,6 +900,7 @@ class _FamilyCardsState extends State<FamilyCards> {
Expanded(
child: CustomButton(
height: 40.h,
fontSize: 14.f,
text: profile.status == FamilyFileEnum.active.toInt ? LocaleKeys.removeMember.tr() : LocaleKeys.rejectView.tr(),
onPressed: () {
navigationService.pop();

Loading…
Cancel
Save