MIH Profile Links

This commit is contained in:
2026-05-27 15:36:56 +02:00
parent 33d07b1617
commit 052f937027
30 changed files with 2240 additions and 499 deletions
@@ -17,7 +17,8 @@ class MzansiAiProvider extends ChangeNotifier {
}) {
ollamaProvider = OllamaProvider(
baseUrl: "${AppEnviroment.baseAiUrl}/api",
model: AppEnviroment.getEnv() == "Prod" ? "qwen3.5:9b" : "qwen3.5:0.8b",
model:
AppEnviroment.getEnv() == "Prod" ? "mzansiai:latest" : "qwen3.5:0.8b",
think: false,
// systemPrompt: "---INSTRUCTION START---\n"
// // "Respond concisely. Do not include any <think> tags or internal monologues./n"
@@ -3,6 +3,7 @@ import 'package:geolocator/geolocator.dart';
import 'package:mzansi_innovation_hub/mih_objects/app_user.dart';
import 'package:mzansi_innovation_hub/mih_objects/bookmarked_business.dart';
import 'package:mzansi_innovation_hub/mih_objects/business.dart';
import 'package:mzansi_innovation_hub/mih_objects/profile_link.dart';
class MzansiDirectoryProvider extends ChangeNotifier {
int toolIndex;
@@ -20,6 +21,8 @@ class MzansiDirectoryProvider extends ChangeNotifier {
AppUser? selectedUser;
String searchTerm;
String businessTypeFilter;
List<ProfileLink> personalLinks = [];
List<ProfileLink> businessLinks = [];
MzansiDirectoryProvider({
this.toolIndex = 0,
@@ -116,4 +119,14 @@ class MzansiDirectoryProvider extends ChangeNotifier {
this.businessTypeFilter = businessTypeFilter;
notifyListeners();
}
void setPersonalLinks({required List<ProfileLink> personalLinks}) {
this.personalLinks = personalLinks;
notifyListeners();
}
void setBusinessLinks({required List<ProfileLink> businessLinks}) {
this.businessLinks = businessLinks;
notifyListeners();
}
}
@@ -25,6 +25,7 @@ class MzansiProfileProvider extends ChangeNotifier {
List<AppUser> userSearchResults = [];
bool hideBusinessUserDetails;
List<ProfileLink> personalLinks = [];
List<ProfileLink> businessLinks = [];
MzansiProfileProvider({
this.personalHome = true,
@@ -156,4 +157,30 @@ class MzansiProfileProvider extends ChangeNotifier {
this.personalLinks = personalLinks;
notifyListeners();
}
void setBusinessLinks({required List<ProfileLink> businessLinks}) {
this.businessLinks = businessLinks;
notifyListeners();
}
void deleteProfileLink({required int linkId}) {
personalLinks.removeWhere((link) => link.idprofile_links == linkId);
businessLinks.removeWhere((link) => link.idprofile_links == linkId);
notifyListeners();
}
void editProfileLink({required ProfileLink updatedLink}) {
int personalIndex = personalLinks.indexWhere(
(link) => link.idprofile_links == updatedLink.idprofile_links);
int businessIndex = businessLinks.indexWhere(
(link) => link.idprofile_links == updatedLink.idprofile_links);
if (personalIndex != -1) {
personalLinks[personalIndex] = updatedLink;
}
if (businessIndex != -1) {
businessLinks[personalIndex] = updatedLink;
}
notifyListeners();
}
}