v.1.2.7 #36

Merged
yaso_meth merged 26 commits from v.1.2.7 into main 2026-06-01 12:23:48 +00:00
Showing only changes of commit 379633d7f5 - Show all commits
@@ -1,3 +1,4 @@
import 'package:ken_logger/ken_logger.dart';
import 'package:mzansi_innovation_hub/mih_objects/app_user.dart'; import 'package:mzansi_innovation_hub/mih_objects/app_user.dart';
import 'package:mzansi_innovation_hub/mih_objects/business.dart'; import 'package:mzansi_innovation_hub/mih_objects/business.dart';
import 'package:mzansi_innovation_hub/mih_providers/mzansi_profile_provider.dart'; import 'package:mzansi_innovation_hub/mih_providers/mzansi_profile_provider.dart';
@@ -23,12 +24,11 @@ class MihDataHelperServices {
} }
Future<void> getBusinessData(MzansiProfileProvider profileProvider) async { Future<void> getBusinessData(MzansiProfileProvider profileProvider) async {
AppUser? user = profileProvider.user;
String logoUrl; String logoUrl;
String signatureUrl; String signatureUrl;
Business? responseBusiness = await MihBusinessDetailsServices() Business? responseBusiness = await MihBusinessDetailsServices()
.getBusinessDetailsByUser(profileProvider); .getBusinessDetailsByUser(profileProvider);
if (responseBusiness != null && user!.type == "business") { if (responseBusiness != null) {
logoUrl = await MihFileApi.getMinioFileUrl( logoUrl = await MihFileApi.getMinioFileUrl(
profileProvider.business!.logo_path, profileProvider.business!.logo_path,
); );
@@ -58,9 +58,7 @@ class MihDataHelperServices {
if (profileProvider.userConsent == null) { if (profileProvider.userConsent == null) {
await getUserConsentStatus(profileProvider); await getUserConsentStatus(profileProvider);
} }
if (profileProvider.user != null && if (profileProvider.user != null && profileProvider.business == null) {
profileProvider.user!.type == "business" &&
profileProvider.business == null) {
await getBusinessData(profileProvider); await getBusinessData(profileProvider);
} }
} }