Merge pull request #85 from yaso-meth/FIX--Add-business-error-fix

FIX--Add-business-error-fix
This commit is contained in:
yaso-meth
2025-02-24 11:52:16 +02:00
committed by GitHub
3 changed files with 19 additions and 9 deletions

View File

@@ -15,13 +15,13 @@ abstract class AppEnviroment {
case Enviroment.dev:
{
//================= Android Dev Urls =================
// baseApiUrl = "http://10.0.2.2:8080";
// baseFileUrl = "http://10.0.2.2:9000";
// baseAiUrl = "http://10.0.2.2:11434";
baseApiUrl = "http://10.0.2.2:8080";
baseFileUrl = "http://10.0.2.2:9000";
baseAiUrl = "http://10.0.2.2:11434";
//================= Web Dev Urls =================
baseApiUrl = "http://localhost:8080";
baseFileUrl = "http://localhost:9000";
baseAiUrl = "http://localhost:11434";
// baseApiUrl = "http://localhost:8080";
// baseFileUrl = "http://localhost:9000";
// baseAiUrl = "http://localhost:11434";
whatsappAccessToken =
"EAAPINXuNFdYBOzBjTcvZA2iPXEHbHRF9uNXyP3ihkPRUcBqKNru5g9NKRRKkFaiaITEzO3BMo6CjdUmlDH4qYTW2mzDrZB4Q21ZCEZBgECZCu27vfaOXJZCYQLNxwoXkrZBRYv8ZAP37f69r3z9JxLQxdxn9gwqA3oNZAlBBRapJQzxOr6pZBTdI3bbjbu17ZBIwRcF4JCqPDCNLEZCI3bmHwEd2i2niNMYZD";
//fingerPrintPluginKey = 'h5X7a5j14iUZCobI1ZeX';

View File

@@ -1,5 +1,6 @@
import 'dart:convert';
import 'package:Mzansi_Innovation_Hub/mih_objects/arguments.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import '../../main.dart';
@@ -97,7 +98,11 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
);
if (response.statusCode == 201) {
uploadSelectedFile(selectedSignature, signtureController);
Navigator.of(context).pushNamed('/');
// Navigator.of(context).pushNamed('/');
Navigator.of(context).popAndPushNamed(
'/',
arguments: AuthArguments(false, false),
);
String message =
"Your business profile is now live! You can now start connecting with customers and growing your business.";
successPopUp(message);
@@ -136,7 +141,9 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
if (response.statusCode == 201) {
var businessResponse = jsonDecode(response.body);
createBusinessUserAPICall(businessResponse['business_id']);
uploadSelectedFile(selectedLogo, logonameController);
Navigator.of(context).pop();
// uploadSelectedFile(selectedLogo, logonameController);
} else {
internetConnectionPopUp();
}