From 97ce2672a25d49d6784fbbdea484a75c1b5026e4 Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Fri, 25 Apr 2025 12:32:18 +0200 Subject: [PATCH 1/3] java compile version update --- Frontend/android/app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Frontend/android/app/build.gradle b/Frontend/android/app/build.gradle index 1ac145e8..1e8a0c5a 100644 --- a/Frontend/android/app/build.gradle +++ b/Frontend/android/app/build.gradle @@ -36,8 +36,8 @@ android { compileSdkVersion 35 compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { From 62b092baf858acca9f9a62db5ef0cda23d68051e Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Fri, 25 Apr 2025 14:19:20 +0200 Subject: [PATCH 2/3] circle avatar to handle null --- .../package_tools/package_tool_one.dart | 2 + .../assets/images/i-dont-know-dark.png | Bin 0 -> 6002 bytes ...-dont-know-2.png => i-dont-know-light.png} | Bin .../mih_circle_avatar.dart | 24 +++- .../mih_home/components/mih_app_drawer.dart | 105 ++++++++---------- .../lib/mih_packages/mih_home/mih_home.dart | 2 + .../mih_home/mih_profile_getter.dart | 15 +-- 7 files changed, 78 insertions(+), 70 deletions(-) create mode 100644 Frontend/lib/mih_components/mih_package_components/assets/images/i-dont-know-dark.png rename Frontend/lib/mih_components/mih_package_components/assets/images/{i-dont-know-2.png => i-dont-know-light.png} (100%) diff --git a/Frontend/lib/mih_components/mih_package_components/Example/package_tools/package_tool_one.dart b/Frontend/lib/mih_components/mih_package_components/Example/package_tools/package_tool_one.dart index ea56d9f5..04adcb92 100644 --- a/Frontend/lib/mih_components/mih_package_components/Example/package_tools/package_tool_one.dart +++ b/Frontend/lib/mih_components/mih_package_components/Example/package_tools/package_tool_one.dart @@ -125,6 +125,8 @@ class _PackageToolOneState extends State { userSelectedfile: file, frameColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(), + backgroundColor: + MzanziInnovationHub.of(context)!.theme.primaryColor(), onChange: (selectedImage) { setState(() { file = selectedImage; diff --git a/Frontend/lib/mih_components/mih_package_components/assets/images/i-dont-know-dark.png b/Frontend/lib/mih_components/mih_package_components/assets/images/i-dont-know-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..a9e5cff94257df633d4beb44f1514c99bcae750b GIT binary patch literal 6002 zcmcgwcT`i|vOg3hAclYiqzH(D!Y81DAfZbU5eRwK6lY5AL1nzm(uK8d^7m zrC(x~Q0UsH#q-bEE)V;e?@NoP8{40=#Jq%=4d1b-%2P0>NPQJl^Fi7BOPu?&AVyj7 zj>R?g0zt&tuODNKjbpEPo$Pfn|Gdfnhkb$6IeRCRq9e1MO4sK2YaHI}##{(%ZOuq# z+~2cF;?Y9**t3Be_jXGd5bi(zsSD9cfIbtc9TlrTquhN%*FLKGigMl0*mTHlG;iw& zQ^u2?D9_}0M3Mv=wgihRw%*d=eygB|v-_iu&S5>U)jD`Yd#;r}BbCopsAuQA_dv*! z#=8GZSADY7hgP{(a&+qmK;{H_3H6dCp7npsz2t25gNr# z3E<^K#1}GarkNSGee`ml!o}$yY5lsN;CQ*C-l=rJVoUC!uDUb1R$6ulj8tj$FMKNMz7ZN^BAOwv;pW~JNouG@ zPh2Sc)ym`#=+TEEi=H;HqmsD~$=&Z&mXqYnC=Xwu=bTD2&pZ`$D2vQH?={LYIjq1` znAj0dX7`!!WZStYEOw7?pe%B-ORc^k*qHWypLaLTfMIjHI&go6o~450=(#iG&i+Tr zGeuTl&yK)r&+D<;9}?fn#tEsacxgYzt=)>Za%qC2C+z|MQ#XqM+x&YMl#FS7s(ZY& zB}3M3HSf*a7Cl_%NSu{@Ks>FS5TQ4|FxQ;6F(YGJny(YKJeTgf&Mgh|l<2yBd}aw@ zJxbZ2lf@QRsuqDQ&s``E2Y!dO$)WeTB3z>g3n)UFjn2yZw1vTIGv88zB_g4!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|H&=?2K_I&2N3@!{r}8W|B~DOE8YE*|G&@(j1u(k zzYV7To=yDBLsQL74vZw-=563;M8Ll8w~d-Qs*yIJ|H_Ma`Pvw#E=prV>;Y9;T%&Q=leeao`DwEfQ { late ImageProvider? imagePreview; + ImageProvider? getAvatar() { + Color dark = const Color(0XFF3A4454); + if (widget.imageFile == null) { + if (widget.backgroundColor == dark) { + print("here in light icon"); + return const AssetImage( + 'lib/mih_components/mih_package_components/assets/images/i-dont-know-light.png'); + } else { + print("here in dark icon"); + return const AssetImage( + 'lib/mih_components/mih_package_components/assets/images/i-dont-know-dark.png'); + } + } else { + return widget.imageFile; + } + } + @override void initState() { super.initState(); + print("Avatar started"); setState(() { - imagePreview = widget.imageFile; + imagePreview = getAvatar(); }); } @@ -51,7 +71,7 @@ class _MihCircleAvatarState extends State { children: [ CircleAvatar( radius: widget.width / 2.2, - backgroundColor: widget.frameColor, + backgroundColor: widget.backgroundColor, backgroundImage: imagePreview, ), FittedBox( diff --git a/Frontend/lib/mih_packages/mih_home/components/mih_app_drawer.dart b/Frontend/lib/mih_packages/mih_home/components/mih_app_drawer.dart index a7c92dd5..39df30a0 100644 --- a/Frontend/lib/mih_packages/mih_home/components/mih_app_drawer.dart +++ b/Frontend/lib/mih_packages/mih_home/components/mih_app_drawer.dart @@ -41,63 +41,56 @@ class _MIHAppDrawerState extends State { // onChange: (newProPic) {}, // ), //print(widget.propicFile); - ImageProvider logoFrame = - MzanziInnovationHub.of(context)!.theme.logoFrame(); - if (widget.propicFile != null) { - return GestureDetector( - onTap: () { - Navigator.of(context).pop(); - Navigator.of(context).pushNamed( - '/mzansi-profile', - arguments: AppProfileUpdateArguments( - widget.signedInUser, widget.propicFile), - ); - }, - child: MihCircleAvatar( - imageFile: widget.propicFile, - width: 60, - editable: false, - fileNameController: proPicController, - onChange: (_) {}, - userSelectedfile: null, - frameColor: MzanziInnovationHub.of(context)!.theme.primaryColor(), - ), - // MIHProfilePicture( - // profilePictureFile: widget.propicFile, - // proPicController: proPicController, - // proPic: null, - // width: 60, - // radius: 27, - // drawerMode: true, - // editable: false, - // frameColor: MzanziInnovationHub.of(context)!.theme.primaryColor(), - // onChange: (newProPic) {}, - // ), - - // Stack( - // alignment: Alignment.center, - // fit: StackFit.loose, - // children: [ - // CircleAvatar( - // backgroundColor: - // MzanziInnovationHub.of(context)!.theme.primaryColor(), - // backgroundImage: widget.propicFile, - // //'https://media.licdn.com/dms/image/D4D03AQGd1-QhjtWWpA/profile-displayphoto-shrink_400_400/0/1671698053061?e=2147483647&v=beta&t=a3dJI5yxs5-KeXjj10LcNCFuC9IOfa8nNn3k_Qyr0CA'), - // radius: 27, - // ), - // SizedBox( - // width: 60, - // child: Image(image: logoFrame), - // ) - // ], - // ), - ); - } else { - return SizedBox( + return GestureDetector( + onTap: () { + Navigator.of(context).pop(); + Navigator.of(context).pushNamed( + '/mzansi-profile', + arguments: + AppProfileUpdateArguments(widget.signedInUser, widget.propicFile), + ); + }, + child: MihCircleAvatar( + imageFile: widget.propicFile, width: 60, - child: Image(image: logoFrame), - ); - } + editable: false, + fileNameController: proPicController, + onChange: (_) {}, + userSelectedfile: null, + frameColor: MzanziInnovationHub.of(context)!.theme.primaryColor(), + backgroundColor: + MzanziInnovationHub.of(context)!.theme.secondaryColor(), + ), + // MIHProfilePicture( + // profilePictureFile: widget.propicFile, + // proPicController: proPicController, + // proPic: null, + // width: 60, + // radius: 27, + // drawerMode: true, + // editable: false, + // frameColor: MzanziInnovationHub.of(context)!.theme.primaryColor(), + // onChange: (newProPic) {}, + // ), + + // Stack( + // alignment: Alignment.center, + // fit: StackFit.loose, + // children: [ + // CircleAvatar( + // backgroundColor: + // MzanziInnovationHub.of(context)!.theme.primaryColor(), + // backgroundImage: widget.propicFile, + // //'https://media.licdn.com/dms/image/D4D03AQGd1-QhjtWWpA/profile-displayphoto-shrink_400_400/0/1671698053061?e=2147483647&v=beta&t=a3dJI5yxs5-KeXjj10LcNCFuC9IOfa8nNn3k_Qyr0CA'), + // radius: 27, + // ), + // SizedBox( + // width: 60, + // child: Image(image: logoFrame), + // ) + // ], + // ), + ); } @override diff --git a/Frontend/lib/mih_packages/mih_home/mih_home.dart b/Frontend/lib/mih_packages/mih_home/mih_home.dart index b4628fdd..003b6b02 100644 --- a/Frontend/lib/mih_packages/mih_home/mih_home.dart +++ b/Frontend/lib/mih_packages/mih_home/mih_home.dart @@ -109,6 +109,8 @@ class _MihHomeState extends State { userSelectedfile: null, // frameColor: frameColor, frameColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(), + backgroundColor: + MzanziInnovationHub.of(context)!.theme.primaryColor(), onChange: (_) {}, ), // MIHProfilePicture( diff --git a/Frontend/lib/mih_packages/mih_home/mih_profile_getter.dart b/Frontend/lib/mih_packages/mih_home/mih_profile_getter.dart index 95fb57c2..0d203d96 100644 --- a/Frontend/lib/mih_packages/mih_home/mih_profile_getter.dart +++ b/Frontend/lib/mih_packages/mih_home/mih_profile_getter.dart @@ -35,17 +35,6 @@ class _MIHProfileGetterState extends State { ImageProvider? propicFile; int _selcetedIndex = 0; - ImageProvider? isPictureAvailable(String url) { - if (url == "") { - return const AssetImage( - 'lib/mih_components/mih_package_components/assets/images/i-dont-know-2.png'); - } else if (url != "") { - return NetworkImage(url); - } else { - return null; - } - } - bool isUserNew(AppUser signedInUser) { if (signedInUser.fname == "") { return true; @@ -249,7 +238,9 @@ class _MIHProfileGetterState extends State { business: snapshot.data!.business, patient: snapshot.data!.patient, notifications: snapshot.data!.notifi, - propicFile: isPictureAvailable(snapshot.data!.profilePicUrl), + propicFile: snapshot.data!.profilePicUrl != "" + ? NetworkImage(snapshot.data!.profilePicUrl) + : null, isUserNew: isUserNew(snapshot.requireData.signedInUser), isBusinessUser: isBusinessUser(snapshot.requireData.signedInUser), isBusinessUserNew: isBusinessUserNew(snapshot.data!.businessUser), From 3159129cdf6e73e910d4b5f8658a64634884e8c9 Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Fri, 25 Apr 2025 15:33:28 +0200 Subject: [PATCH 3/3] set up business --- .../mih_apis/mih_business_details_apis.dart | 42 ++ Frontend/lib/mih_apis/mih_file_api.dart | 7 +- .../mih_apis/mih_my_business_user_apis.dart | 39 +- .../package_tools/package_tool_one.dart | 1 + .../mih_image_display.dart | 22 +- .../package_tools/mih_business_details.dart | 20 +- .../package_tools/mih_business_profile.dart | 16 +- .../package_tools/mih_my_business_user.dart | 42 +- .../profile_business_add.dart | 362 ++++++++++++------ .../package_tools/mih_personal_profile.dart | 2 + Frontend/lib/mih_router/routeGenerator.dart | 2 +- 11 files changed, 398 insertions(+), 157 deletions(-) rename Frontend/lib/mih_packages/mzansi_profile/{manage_business => business_profile}/profile_business_add.dart (56%) diff --git a/Frontend/lib/mih_apis/mih_business_details_apis.dart b/Frontend/lib/mih_apis/mih_business_details_apis.dart index eec80814..0f47ab40 100644 --- a/Frontend/lib/mih_apis/mih_business_details_apis.dart +++ b/Frontend/lib/mih_apis/mih_business_details_apis.dart @@ -1,5 +1,6 @@ import 'dart:convert'; +import 'package:http/http.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart'; import 'package:flutter/material.dart'; import 'package:mzansi_innovation_hub/mih_env/env.dart'; @@ -7,6 +8,47 @@ import '../mih_components/mih_pop_up_messages/mih_error_message.dart'; import 'package:supertokens_flutter/http.dart' as http; class MihBusinessDetailsApi { + Future createBusinessDetails( + String appId, + String busineName, + String businessType, + String businessRegistrationNo, + String businessPracticeNo, + String businessVatNo, + String businessEmail, + String businessPhoneNumber, + String businessLocation, + String businessLogoFilename, + BuildContext context, + ) async { + showDialog( + context: context, + builder: (context) { + return const Mihloadingcircle(); + }, + ); + var response = await http.post( + Uri.parse("${AppEnviroment.baseApiUrl}/business/insert/"), + headers: { + "Content-Type": "application/json; charset=UTF-8" + }, + body: jsonEncode({ + "Name": busineName, + "type": businessType, + "registration_no": businessRegistrationNo, + "logo_name": businessLogoFilename, + "logo_path": "$appId/business_files/$businessLogoFilename", + "contact_no": businessPhoneNumber, + "bus_email": businessEmail, + "gps_location": businessLocation, + "practice_no": businessPracticeNo, + "vat_no": businessVatNo, + }), + ); + Navigator.of(context).pop(); + return response; + } + Future updateBusinessDetails( String business_id, String business_name, diff --git a/Frontend/lib/mih_apis/mih_file_api.dart b/Frontend/lib/mih_apis/mih_file_api.dart index 1823d987..cbc4f060 100644 --- a/Frontend/lib/mih_apis/mih_file_api.dart +++ b/Frontend/lib/mih_apis/mih_file_api.dart @@ -42,10 +42,13 @@ class MihFileApi { var decodedData = jsonDecode(response.body); fileUrl = decodedData['minioURL']; } else { - internetConnectionPopUp(context); + // internetConnectionPopUp(context); + print("Error: ${response.statusCode}"); + print("Error: ${response.body}"); } } catch (e) { - internetConnectionPopUp(context); + // internetConnectionPopUp(context); + print("Error getting url"); } finally { // Navigator.of(context).pop(); // Always pop loading dialog } diff --git a/Frontend/lib/mih_apis/mih_my_business_user_apis.dart b/Frontend/lib/mih_apis/mih_my_business_user_apis.dart index ca85baae..32ef9484 100644 --- a/Frontend/lib/mih_apis/mih_my_business_user_apis.dart +++ b/Frontend/lib/mih_apis/mih_my_business_user_apis.dart @@ -7,8 +7,45 @@ import '../mih_components/mih_pop_up_messages/mih_error_message.dart'; import 'package:supertokens_flutter/http.dart' as http; class MihMyBusinessUserApi { + Future createBusinessUser( + String business_id, + String app_id, + String signatureFilename, + String title, + String access, + BuildContext context, + ) async { + showDialog( + context: context, + builder: (context) { + return const Mihloadingcircle(); + }, + ); + var response = await http.post( + Uri.parse("${AppEnviroment.baseApiUrl}/business-user/insert/"), + headers: { + "Content-Type": "application/json; charset=UTF-8" + }, + body: jsonEncode({ + "business_id": business_id, + "app_id": app_id, + "signature": signatureFilename, + "sig_path": "$business_id/business_files/$signatureFilename", + "title": title, + "access": access, + }), + ); + Navigator.of(context).pop(); + if (response.statusCode == 201) { + return 201; + } else { + internetConnectionPopUp(context); + return 500; + } + } + /// This function updates the business user details. - Future updateBusinessDetails( + Future updateBusinessUser( String app_id, String business_id, String bUserTitle, diff --git a/Frontend/lib/mih_components/mih_package_components/Example/package_tools/package_tool_one.dart b/Frontend/lib/mih_components/mih_package_components/Example/package_tools/package_tool_one.dart index 04adcb92..6543496c 100644 --- a/Frontend/lib/mih_components/mih_package_components/Example/package_tools/package_tool_one.dart +++ b/Frontend/lib/mih_components/mih_package_components/Example/package_tools/package_tool_one.dart @@ -144,6 +144,7 @@ class _PackageToolOneState extends State { MihImageDisplay( imageFile: imagePreview, width: 300, + height: 200, editable: true, fileNameController: _imagefileController, userSelectedfile: imageFile, diff --git a/Frontend/lib/mih_components/mih_package_components/mih_image_display.dart b/Frontend/lib/mih_components/mih_package_components/mih_image_display.dart index c7e75f81..f2412283 100644 --- a/Frontend/lib/mih_components/mih_package_components/mih_image_display.dart +++ b/Frontend/lib/mih_components/mih_package_components/mih_image_display.dart @@ -7,6 +7,7 @@ import 'package:mzansi_innovation_hub/main.dart'; class MihImageDisplay extends StatefulWidget { final ImageProvider? imageFile; final double width; + final double height; final bool editable; final TextEditingController fileNameController; final onChange; @@ -15,6 +16,7 @@ class MihImageDisplay extends StatefulWidget { super.key, required this.imageFile, required this.width, + required this.height, required this.editable, required this.fileNameController, required this.userSelectedfile, @@ -28,11 +30,28 @@ class MihImageDisplay extends StatefulWidget { class _MihImageDisplayState extends State { late ImageProvider? imagePreview; + ImageProvider? getImage() { + Color dark = const Color(0XFF3A4454); + if (widget.imageFile == null) { + if (MzanziInnovationHub.of(context)!.theme.secondaryColor() == dark) { + print("here in light icon"); + return const AssetImage( + 'lib/mih_components/mih_package_components/assets/images/i-dont-know-dark.png'); + } else { + print("here in dark icon"); + return const AssetImage( + 'lib/mih_components/mih_package_components/assets/images/i-dont-know-light.png'); + } + } else { + return widget.imageFile; + } + } + @override void initState() { super.initState(); setState(() { - imagePreview = widget.imageFile; + imagePreview = getImage(); }); } @@ -42,6 +61,7 @@ class _MihImageDisplayState extends State { // color: Colors.white, alignment: Alignment.center, width: widget.width, + height: widget.height, child: Stack( alignment: Alignment.center, children: [ diff --git a/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_business_details.dart b/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_business_details.dart index ed3a9568..211bd1d8 100644 --- a/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_business_details.dart +++ b/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_business_details.dart @@ -277,6 +277,8 @@ class _MihBusinessDetailsState extends State { userSelectedfile: imageFile, frameColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(), + backgroundColor: + MzanziInnovationHub.of(context)!.theme.primaryColor(), onChange: (selectedfile) { setState(() { imageFile = selectedfile; @@ -286,7 +288,23 @@ class _MihBusinessDetailsState extends State { } else if (snapshot.hasError) { return Text("Error: ${snapshot.error}"); } else { - return const Text("Error loading image"); + return MihCircleAvatar( + imageFile: null, + width: 150, + editable: true, + fileNameController: fileNameController, + userSelectedfile: imageFile, + frameColor: + MzanziInnovationHub.of(context)!.theme.secondaryColor(), + backgroundColor: + MzanziInnovationHub.of(context)!.theme.primaryColor(), + onChange: (selectedfile) { + setState(() { + imageFile = selectedfile; + }); + }, + ); + // return const Text("Error loading image"); } }, ), diff --git a/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_business_profile.dart b/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_business_profile.dart index bab86b4a..c18edbf6 100644 --- a/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_business_profile.dart +++ b/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_business_profile.dart @@ -257,20 +257,6 @@ class _MihBusinessProfileState extends State { ); } - ImageProvider? isPictureAvailable(String url) { - print("logo Url: $url"); - if (url == "") { - return const AssetImage( - 'lib/mih_components/mih_package_components/assets/images/i-dont-know-2.png'); - } else if (url != "") { - return NetworkImage(url); - } else { - return const AssetImage( - 'lib/mih_components/mih_package_components/assets/images/i-dont-know-2.png'); - // return null; - } - } - @override void dispose() { nameController.dispose(); @@ -321,7 +307,7 @@ class _MihBusinessProfileState extends State { setState(() { logoUri = value; }); - logoPreview = isPictureAvailable(logoUri); + logoPreview = NetworkImage(logoUri); }); super.initState(); } diff --git a/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_my_business_user.dart b/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_my_business_user.dart index eef5bbef..2d8bcab3 100644 --- a/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_my_business_user.dart +++ b/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_my_business_user.dart @@ -55,8 +55,6 @@ class _MihMyBusinessUserState extends State { Future uploadFile() async { if (userSignatureFile != null) { - print(userSignatureFile!.name); - print(userSignatureFile!.bytes); int uploadStatusCode = 0; uploadStatusCode = await MihFileApi.uploadFile( widget.arguments.signedInUser.app_id, @@ -86,10 +84,8 @@ class _MihMyBusinessUserState extends State { } Future submitForm() async { - print("Here 1"); if (isFormFilled()) { - print("Here 1"); - int statusCode = await MihMyBusinessUserApi().updateBusinessDetails( + int statusCode = await MihMyBusinessUserApi().updateBusinessUser( widget.arguments.signedInUser.app_id, widget.arguments.businessUser!.business_id, titleDropdownController.text, @@ -98,9 +94,7 @@ class _MihMyBusinessUserState extends State { context, ); if (statusCode == 200) { - print("Here 1"); bool successfullyUploadedFile = await uploadFile(); - print("Here 4"); if (successfullyUploadedFile) { Navigator.of(context).pop(); Navigator.of(context).pop(); @@ -259,12 +253,26 @@ class _MihMyBusinessUserState extends State { userSelectedfile: userPicFile, frameColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(), + backgroundColor: + MzanziInnovationHub.of(context)!.theme.primaryColor(), onChange: (_) {}, ); } else if (snapshot.hasError) { return Text("Error: ${snapshot.error}"); } else { - return const Text("Error loading image"); + return MihCircleAvatar( + imageFile: null, + width: 150, + editable: false, + fileNameController: fileNameController, + userSelectedfile: userPicFile, + frameColor: + MzanziInnovationHub.of(context)!.theme.secondaryColor(), + backgroundColor: + MzanziInnovationHub.of(context)!.theme.primaryColor(), + onChange: (_) {}, + ); + // return const Text("Error loading image"); } }, ), @@ -319,7 +327,7 @@ class _MihMyBusinessUserState extends State { width: 300, alignment: Alignment.topLeft, child: const Text( - "Signature", + "Signature:", style: TextStyle( fontSize: 15, fontWeight: FontWeight.bold, @@ -352,6 +360,7 @@ class _MihMyBusinessUserState extends State { return MihImageDisplay( imageFile: NetworkImage(snapshot.data.toString()), width: 300, + height: 200, editable: true, fileNameController: signtureController, userSelectedfile: userSignatureFile, @@ -364,7 +373,20 @@ class _MihMyBusinessUserState extends State { } else if (snapshot.hasError) { return Text("Error: ${snapshot.error}"); } else { - return const Text("Error loading image"); + return MihImageDisplay( + imageFile: null, + width: 300, + height: 200, + editable: true, + fileNameController: signtureController, + userSelectedfile: userSignatureFile, + onChange: (selectedFile) { + setState(() { + userSignatureFile = selectedFile; + }); + }, + ); + // return const Text("Error loading image"); } }, ), diff --git a/Frontend/lib/mih_packages/mzansi_profile/manage_business/profile_business_add.dart b/Frontend/lib/mih_packages/mzansi_profile/business_profile/profile_business_add.dart similarity index 56% rename from Frontend/lib/mih_packages/mzansi_profile/manage_business/profile_business_add.dart rename to Frontend/lib/mih_packages/mzansi_profile/business_profile/profile_business_add.dart index 79d908c0..48849a27 100644 --- a/Frontend/lib/mih_packages/mzansi_profile/manage_business/profile_business_add.dart +++ b/Frontend/lib/mih_packages/mzansi_profile/business_profile/profile_business_add.dart @@ -1,28 +1,26 @@ import 'dart:convert'; +import 'package:http/http.dart'; +import 'package:mzansi_innovation_hub/main.dart'; +import 'package:mzansi_innovation_hub/mih_apis/mih_business_details_apis.dart'; +import 'package:mzansi_innovation_hub/mih_apis/mih_file_api.dart'; +import 'package:mzansi_innovation_hub/mih_apis/mih_location_api.dart'; +import 'package:mzansi_innovation_hub/mih_apis/mih_my_business_user_apis.dart'; +import 'package:mzansi_innovation_hub/mih_components/mih_inputs_and_buttons/mih_button.dart'; +import 'package:mzansi_innovation_hub/mih_components/mih_inputs_and_buttons/mih_dropdown_input.dart'; +import 'package:mzansi_innovation_hub/mih_components/mih_inputs_and_buttons/mih_text_input.dart'; +import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_action.dart'; +import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_body.dart'; +import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_header.dart'; +import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_layout_builder.dart'; +import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_error_message.dart'; +import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_success_message.dart'; +import 'package:mzansi_innovation_hub/mih_env/env.dart'; +import 'package:mzansi_innovation_hub/mih_objects/app_user.dart'; import 'package:mzansi_innovation_hub/mih_objects/arguments.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import '../../../main.dart'; -import 'package:supertokens_flutter/http.dart' as http; -import 'package:supertokens_flutter/supertokens.dart'; import 'package:file_picker/file_picker.dart'; -import 'package:http/http.dart' as http2; - -import '../../../mih_apis/mih_location_api.dart'; -import '../../../mih_components/mih_inputs_and_buttons/mih_button.dart'; -import '../../../mih_components/mih_inputs_and_buttons/mih_dropdown_input.dart'; -import '../../../mih_components/mih_inputs_and_buttons/mih_file_input.dart'; -import '../../../mih_components/mih_inputs_and_buttons/mih_text_input.dart'; -import '../../../mih_components/mih_layout/mih_action.dart'; -import '../../../mih_components/mih_layout/mih_body.dart'; -import '../../../mih_components/mih_layout/mih_header.dart'; -import '../../../mih_components/mih_layout/mih_layout_builder.dart'; -import '../../../mih_components/mih_pop_up_messages/mih_error_message.dart'; -import '../../../mih_components/mih_pop_up_messages/mih_loading_circle.dart'; -import '../../../mih_components/mih_pop_up_messages/mih_success_message.dart'; -import '../../../mih_env/env.dart'; -import '../../../mih_objects/app_user.dart'; class ProfileBusinessAdd extends StatefulWidget { //final BusinessUserScreenArguments arguments; @@ -56,48 +54,80 @@ class _ProfileBusinessAddState extends State { final practiceNoController = TextEditingController(); final vatNoController = TextEditingController(); - late PlatformFile selectedLogo; - late PlatformFile selectedSignature; + ImageProvider? logoPreview; + ImageProvider? signaturePreview; + PlatformFile? selectedLogo; + PlatformFile? selectedSignature; final ValueNotifier busType = ValueNotifier(""); - Future uploadSelectedFile( - PlatformFile file, TextEditingController controller) async { - var token = await SuperTokens.getAccessToken(); - var request = http2.MultipartRequest( - 'POST', Uri.parse("${AppEnviroment.baseApiUrl}/minio/upload/file/")); - request.headers['accept'] = 'application/json'; - request.headers['Authorization'] = 'Bearer $token'; - request.headers['Content-Type'] = 'multipart/form-data'; - request.fields['app_id'] = widget.signedInUser.app_id; - request.fields['folder'] = "business_files"; - request.files.add(await http2.MultipartFile.fromBytes('file', file.bytes!, - filename: file.name.replaceAll(RegExp(r' '), '-'))); - var response1 = await request.send(); - if (response1.statusCode == 200) { + // Future uploadSelectedFile( + // PlatformFile file, TextEditingController controller) async { + // var token = await supertokens.getaccesstoken(); + // var request = http2.multipartrequest( + // 'post', uri.parse("${appenviroment.baseapiurl}/minio/upload/file/")); + // request.headers['accept'] = 'application/json'; + // request.headers['authorization'] = 'bearer $token'; + // request.headers['content-type'] = 'multipart/form-data'; + // request.fields['app_id'] = widget.signedinuser.app_id; + // request.fields['folder'] = "business_files"; + // request.files.add(await http2.multipartfile.frombytes('file', file.bytes!, + // filename: file.name.replaceall(regexp(r' '), '-'))); + // var response1 = await request.send(); + // if (response1.statuscode == 200) { + // } else { + // internetconnectionpopup(); + // } + // } + + Future uploadFile(String id, PlatformFile? selectedFile) async { + print("Inside uploud file method"); + int uploadStatusCode = 0; + uploadStatusCode = await MihFileApi.uploadFile( + id, + "business_files", + selectedFile, + context, + ); + print("Status code: $uploadStatusCode"); + if (uploadStatusCode == 200) { + return true; } else { - internetConnectionPopUp(); + return false; } } Future createBusinessUserAPICall(String business_id) async { - var response = await http.post( - Uri.parse("$baseAPI/business-user/insert/"), - headers: { - "Content-Type": "application/json; charset=UTF-8" - }, - body: jsonEncode({ - "business_id": business_id, - "app_id": widget.signedInUser.app_id, - "signature": signtureController.text, - "sig_path": - "${widget.signedInUser.app_id}/business_files/${signtureController.text}", - "title": titleController.text, - "access": accessController.text, - }), + print("Inside create bus user method"); + int statusCode = await MihMyBusinessUserApi().createBusinessUser( + business_id, + widget.signedInUser.app_id, + signtureController.text, + titleController.text, + accessController.text, + context, ); - if (response.statusCode == 201) { - uploadSelectedFile(selectedSignature, signtureController); + // var response = await http.post( + // Uri.parse("$baseAPI/business-user/insert/"), + // headers: { + // "Content-Type": "application/json; charset=UTF-8" + // }, + // body: jsonEncode({ + // "business_id": business_id, + // "app_id": widget.signedInUser.app_id, + // "signature": signtureController.text, + // "sig_path": + // "${widget.signedInUser.app_id}/business_files/${signtureController.text}", + // "title": titleController.text, + // "access": accessController.text, + // }), + // ); + print("Status code: $statusCode"); + if (statusCode == 201) { + // uploadSelectedFile(selectedSignature, signtureController); + // bool successfullyUploadedFile = + // await uploadFile(business_id, selectedSignature); + // if (successfullyUploadedFile) { Navigator.of(context).pop(); Navigator.of(context).popAndPushNamed( '/', @@ -106,44 +136,58 @@ class _ProfileBusinessAddState extends State { String message = "Your business profile is now live! You can now start connecting with customers and growing your business."; successPopUp(message); + // } else { + // internetConnectionPopUp(); + // } } else { internetConnectionPopUp(); } } Future createBusinessProfileAPICall() async { - showDialog( - context: context, - builder: (context) { - return const Mihloadingcircle(); - }, - ); - - var response = await http.post( - Uri.parse("$baseAPI/business/insert/"), - headers: { - "Content-Type": "application/json; charset=UTF-8" - }, - body: jsonEncode({ - "Name": nameController.text, - "type": typeController.text, - "registration_no": regController.text, - "logo_name": logonameController.text, - "logo_path": - "${widget.signedInUser.app_id}/business_files/${logonameController.text}", - "contact_no": contactController.text, - "bus_email": emailController.text, - "gps_location": locationController.text, - "practice_no": practiceNoController.text, - "vat_no": vatNoController.text, - }), + print("Inside create business profile method"); + Response response = await MihBusinessDetailsApi().createBusinessDetails( + widget.signedInUser.app_id, + nameController.text, + typeController.text, + regController.text, + practiceNoController.text, + vatNoController.text, + emailController.text, + contactController.text, + locationController.text, + logonameController.text, + context, ); + // var response = await http.post( + // Uri.parse("$baseAPI/business/insert/"), + // headers: { + // "Content-Type": "application/json; charset=UTF-8" + // }, + // body: jsonEncode({ + // "Name": nameController.text, + // "type": typeController.text, + // "registration_no": regController.text, + // "logo_name": logonameController.text, + // "logo_path": + // "${widget.signedInUser.app_id}/business_files/${logonameController.text}", + // "contact_no": contactController.text, + // "bus_email": emailController.text, + // "gps_location": locationController.text, + // "practice_no": practiceNoController.text, + // "vat_no": vatNoController.text, + // }), + // ); + print(response.body); if (response.statusCode == 201) { var businessResponse = jsonDecode(response.body); + // bool successfullyUploadedFile = + // await uploadFile(widget.signedInUser.app_id, selectedSignature); + // if (successfullyUploadedFile) { createBusinessUserAPICall(businessResponse['business_id']); - - Navigator.of(context).pop(); - // uploadSelectedFile(selectedLogo, logonameController); + // } else { + // internetConnectionPopUp(); + // } } else { internetConnectionPopUp(); } @@ -174,11 +218,11 @@ class _ProfileBusinessAddState extends State { if (nameController.text.isEmpty || typeController.text.isEmpty || regController.text.isEmpty || - logonameController.text.isEmpty || + // logonameController.text.isEmpty || fnameController.text.isEmpty || lnameController.text.isEmpty || titleController.text.isEmpty || - signtureController.text.isEmpty || + // signtureController.text.isEmpty || accessController.text.isEmpty || contactController.text.isEmpty || emailController.text.isEmpty) { @@ -189,9 +233,10 @@ class _ProfileBusinessAddState extends State { } void submitForm() { - if (!validEmail()) { + if (!isEmailValid()) { emailError(); } else if (isFieldsFilled()) { + print("Inside submit method"); createBusinessProfileAPICall(); } else { showDialog( @@ -212,12 +257,18 @@ class _ProfileBusinessAddState extends State { ); } - bool validEmail() { + bool isEmailValid() { String text = emailController.text; var regex = RegExp(r'^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$'); return regex.hasMatch(text); } + // bool validEmail() { + // String text = emailController.text; + // var regex = RegExp(r'^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$'); + // return regex.hasMatch(text); + // } + void typeSelected() { if (typeController.text.isNotEmpty) { busType.value = typeController.text; @@ -280,6 +331,33 @@ class _ProfileBusinessAddState extends State { .theme .secondaryColor()), const SizedBox(height: 10.0), + // MihCircleAvatar( + // imageFile: logoPreview, + // width: 150, + // editable: true, + // fileNameController: logonameController, + // userSelectedfile: selectedLogo, + // frameColor: + // MzanziInnovationHub.of(context)!.theme.secondaryColor(), + // backgroundColor: + // MzanziInnovationHub.of(context)!.theme.primaryColor(), + // onChange: (selectedfile) { + // setState(() { + // selectedLogo = selectedfile; + // }); + // }, + // ), + // const SizedBox(height: 10.0), + // Visibility( + // visible: true, + // child: MIHTextField( + // controller: logonameController, + // hintText: "Selected Logo File Name", + // editable: false, + // required: true, + // ), + // ), + // const SizedBox(height: 10.0), MIHTextField( controller: regController, hintText: "Registration No.", @@ -339,27 +417,27 @@ class _ProfileBusinessAddState extends State { required: true, ), const SizedBox(height: 10.0), - MIHFileField( - controller: logonameController, - hintText: "Logo", - editable: false, - required: true, - onPressed: () async { - FilePickerResult? result = - await FilePicker.platform.pickFiles( - type: FileType.custom, - allowedExtensions: ['jpg', 'png', 'pdf'], - ); - if (result == null) return; - final selectedFile = result.files.first; - setState(() { - selectedLogo = selectedFile; - }); - setState(() { - logonameController.text = selectedFile.name; - }); - }, - ), + // MIHFileField( + // controller: logonameController, + // hintText: "Logo", + // editable: false, + // required: true, + // onPressed: () async { + // FilePickerResult? result = + // await FilePicker.platform.pickFiles( + // type: FileType.custom, + // allowedExtensions: ['jpg', 'png', 'pdf'], + // ); + // if (result == null) return; + // final selectedFile = result.files.first; + // setState(() { + // selectedLogo = selectedFile; + // }); + // setState(() { + // logonameController.text = selectedFile.name; + // }); + // }, + // ), const SizedBox(height: 10.0), Row( children: [ @@ -441,27 +519,59 @@ class _ProfileBusinessAddState extends State { required: true, ), const SizedBox(height: 10.0), - MIHFileField( - controller: signtureController, - hintText: "Signature", - editable: false, - required: true, - onPressed: () async { - FilePickerResult? result = - await FilePicker.platform.pickFiles( - type: FileType.custom, - allowedExtensions: ['jpg', 'png', 'pdf'], - ); - if (result == null) return; - final selectedFile = result.files.first; - setState(() { - selectedSignature = selectedFile; - }); - setState(() { - signtureController.text = selectedFile.name; - }); - }, - ), + // const SizedBox(height: 10), + // Container( + // width: 300, + // alignment: Alignment.topLeft, + // child: const Text( + // "Signature:", + // style: TextStyle( + // fontSize: 15, + // fontWeight: FontWeight.bold, + // ), + // ), + // ), + // MihImageDisplay( + // imageFile: signaturePreview, + // width: 300, + // editable: true, + // fileNameController: signtureController, + // userSelectedfile: selectedSignature, + // onChange: (selectedFile) { + // setState(() { + // selectedSignature = selectedFile; + // }); + // }, + // ), + // const SizedBox(height: 10.0), + // MIHTextField( + // controller: signtureController, + // hintText: "Selected Signature File Name", + // editable: false, + // required: true, + // ), + const SizedBox(height: 10.0), + // MIHFileField( + // controller: signtureController, + // hintText: "Signature", + // editable: false, + // required: true, + // onPressed: () async { + // FilePickerResult? result = + // await FilePicker.platform.pickFiles( + // type: FileType.custom, + // allowedExtensions: ['jpg', 'png', 'pdf'], + // ); + // if (result == null) return; + // final selectedFile = result.files.first; + // setState(() { + // selectedSignature = selectedFile; + // }); + // setState(() { + // signtureController.text = selectedFile.name; + // }); + // }, + // ), const SizedBox(height: 15.0), MIHDropdownField( controller: accessController, diff --git a/Frontend/lib/mih_packages/mzansi_profile/personal_profile/package_tools/mih_personal_profile.dart b/Frontend/lib/mih_packages/mzansi_profile/personal_profile/package_tools/mih_personal_profile.dart index ae7a9eac..b5f8e968 100644 --- a/Frontend/lib/mih_packages/mzansi_profile/personal_profile/package_tools/mih_personal_profile.dart +++ b/Frontend/lib/mih_packages/mzansi_profile/personal_profile/package_tools/mih_personal_profile.dart @@ -232,6 +232,8 @@ class _MihPersonalProfileState extends State { fileNameController: proPicController, userSelectedfile: proPic, frameColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(), + backgroundColor: + MzanziInnovationHub.of(context)!.theme.primaryColor(), onChange: (selectedImage) { setState(() { proPic = selectedImage; diff --git a/Frontend/lib/mih_router/routeGenerator.dart b/Frontend/lib/mih_router/routeGenerator.dart index 05331d43..b95680d6 100644 --- a/Frontend/lib/mih_router/routeGenerator.dart +++ b/Frontend/lib/mih_router/routeGenerator.dart @@ -24,7 +24,7 @@ import '../mih_objects/arguments.dart'; import '../mih_packages/authentication/forgot_password.dart'; import '../mih_packages/authentication/reset_password.dart'; import '../mih_packages/patient_profile/pat_profile/components/full_screen_file.dart'; -import '../mih_packages/mzansi_profile/manage_business/profile_business_add.dart'; +import '../mih_packages/mzansi_profile/business_profile/profile_business_add.dart'; class RouteGenerator { static Route generateRoute(RouteSettings settings) {