Merge pull request #242 from yaso-meth/QOL--New-User-UX-Enhancement
QOL--New-User-UX-Enhancement
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:country_code_picker/country_code_picker.dart';
|
||||||
import 'package:file_picker/file_picker.dart';
|
import 'package:file_picker/file_picker.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
||||||
@@ -185,6 +186,20 @@ class _PackageToolOneState extends State<PackageToolOne> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
|
CountryCodePicker(
|
||||||
|
padding: EdgeInsetsGeometry.all(0),
|
||||||
|
onChanged: (selectedCode) {
|
||||||
|
debugPrint("Selected Country Code: $selectedCode");
|
||||||
|
},
|
||||||
|
initialSelection: '+27',
|
||||||
|
showDropDownButton: false,
|
||||||
|
pickerStyle: PickerStyle.bottomSheet,
|
||||||
|
dialogBackgroundColor:
|
||||||
|
MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
barrierColor:
|
||||||
|
MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
Center(
|
Center(
|
||||||
child: MihButton(
|
child: MihButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
@@ -305,7 +320,7 @@ class _PackageToolOneState extends State<PackageToolOne> {
|
|||||||
"registration_no",
|
"registration_no",
|
||||||
"logo_name",
|
"logo_name",
|
||||||
"logo_path",
|
"logo_path",
|
||||||
"contact_no",
|
"+27812345679",
|
||||||
"bus_email",
|
"bus_email",
|
||||||
"app_id",
|
"app_id",
|
||||||
"gps_location",
|
"gps_location",
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 5.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_dropdwn_field.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_dropdwn_field.dart';
|
||||||
@@ -186,17 +187,77 @@ class _MihAccessRequestState extends State<MihAccessRequest> {
|
|||||||
patientAccessList: accessRequestList,
|
patientAccessList: accessRequestList,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return Center(
|
return Padding(
|
||||||
child: Text(
|
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
"No Request have been made.",
|
child: Column(
|
||||||
style: TextStyle(
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
fontSize: 25,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
const SizedBox(height: 50),
|
||||||
|
Icon(
|
||||||
|
MihIcons.accessControl,
|
||||||
|
size: 165,
|
||||||
color: MzansiInnovationHub.of(context)!
|
color: MzansiInnovationHub.of(context)!
|
||||||
.theme
|
.theme
|
||||||
.messageTextColor()),
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Text(
|
||||||
|
"No Access has been granted to your MIH Profile",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 25,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// const SizedBox(height: 10),
|
||||||
|
// Center(
|
||||||
|
// child: RichText(
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
// text: TextSpan(
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 20,
|
||||||
|
// fontWeight: FontWeight.normal,
|
||||||
|
// color: MzansiInnovationHub.of(context)!
|
||||||
|
// .theme
|
||||||
|
// .secondaryColor(),
|
||||||
|
// ),
|
||||||
|
// children: [
|
||||||
|
// TextSpan(text: "Press "),
|
||||||
|
// WidgetSpan(
|
||||||
|
// alignment: PlaceholderAlignment.middle,
|
||||||
|
// child: Icon(
|
||||||
|
// Icons.menu,
|
||||||
|
// size: 20,
|
||||||
|
// color: MzansiInnovationHub.of(context)!
|
||||||
|
// .theme
|
||||||
|
// .secondaryColor(),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// TextSpan(
|
||||||
|
// text: " to add your first loyalty card."),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
// return Center(
|
||||||
|
// child: Text(
|
||||||
|
// "No Request have been made.",
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 25,
|
||||||
|
// color: MzansiInnovationHub.of(context)!
|
||||||
|
// .theme
|
||||||
|
// .messageTextColor()),
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
// return Expanded(
|
// return Expanded(
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_mzansi_calendar_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_mzansi_calendar_services.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart';
|
||||||
@@ -83,21 +84,79 @@ class _PatientAccessRequestState extends State<Appointments> {
|
|||||||
}
|
}
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.only(top: 35.0),
|
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
child: Align(
|
child: Column(
|
||||||
alignment: Alignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
child: Text(
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
const SizedBox(height: 50),
|
||||||
|
Icon(
|
||||||
|
MihIcons.calendar,
|
||||||
|
size: 165,
|
||||||
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Text(
|
||||||
"No Appointments for $selectedDay",
|
"No Appointments for $selectedDay",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 25,
|
fontSize: 25,
|
||||||
color: MzansiInnovationHub.of(context)!.theme.messageTextColor(),
|
fontWeight: FontWeight.bold,
|
||||||
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Center(
|
||||||
|
child: RichText(
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
softWrap: true,
|
text: TextSpan(
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
color:
|
||||||
|
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
),
|
),
|
||||||
|
children: [
|
||||||
|
TextSpan(text: "Press "),
|
||||||
|
WidgetSpan(
|
||||||
|
alignment: PlaceholderAlignment.middle,
|
||||||
|
child: Icon(
|
||||||
|
Icons.menu,
|
||||||
|
size: 20,
|
||||||
|
color: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text:
|
||||||
|
" to add an appointment or select a different date"),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
// return Expanded(
|
||||||
|
// child: Padding(
|
||||||
|
// padding: const EdgeInsets.only(top: 35.0),
|
||||||
|
// child: Align(
|
||||||
|
// alignment: Alignment.center,
|
||||||
|
// child: Text(
|
||||||
|
// "No Appointments for $selectedDay",
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 25,
|
||||||
|
// color: MzansiInnovationHub.of(context)!.theme.messageTextColor(),
|
||||||
|
// ),
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
// softWrap: true,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
void addAppointmentWindow(double width) {
|
void addAppointmentWindow(double width) {
|
||||||
|
|||||||
@@ -306,7 +306,8 @@ class _MihSignInState extends State<MihSignIn> {
|
|||||||
passwordMode: true,
|
passwordMode: true,
|
||||||
autofillHints: const [AutofillHints.password],
|
autofillHints: const [AutofillHints.password],
|
||||||
validator: (value) {
|
validator: (value) {
|
||||||
return MihValidationServices().validatePassword(value);
|
// return MihValidationServices().validatePassword(value);
|
||||||
|
return null;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
|
|||||||
@@ -230,7 +230,9 @@ class _MihBusinessHomeState extends State<MihBusinessHome>
|
|||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
// const SizedBox(height: 20),
|
// const SizedBox(height: 20),
|
||||||
Padding(
|
Visibility(
|
||||||
|
visible: !widget.isBusinessUserNew,
|
||||||
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: width / 20),
|
padding: EdgeInsets.symmetric(horizontal: width / 20),
|
||||||
child: MihSearchBar(
|
child: MihSearchBar(
|
||||||
controller: searchController,
|
controller: searchController,
|
||||||
@@ -239,7 +241,8 @@ class _MihBusinessHomeState extends State<MihBusinessHome>
|
|||||||
prefixAltIcon: MihIcons.mzansiAi,
|
prefixAltIcon: MihIcons.mzansiAi,
|
||||||
fillColor:
|
fillColor:
|
||||||
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
hintColor: MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
hintColor:
|
||||||
|
MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
onPrefixIconTap: () {
|
onPrefixIconTap: () {
|
||||||
Navigator.of(context).pushNamed(
|
Navigator.of(context).pushNamed(
|
||||||
'/mzansi-ai',
|
'/mzansi-ai',
|
||||||
@@ -255,6 +258,7 @@ class _MihBusinessHomeState extends State<MihBusinessHome>
|
|||||||
searchFocusNode: _searchFocusNode,
|
searchFocusNode: _searchFocusNode,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
ValueListenableBuilder(
|
ValueListenableBuilder(
|
||||||
valueListenable: searchPackageName,
|
valueListenable: searchPackageName,
|
||||||
|
|||||||
@@ -213,6 +213,18 @@ class _MihPersonalHomeState extends State<MihPersonalHome>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void autoNavToProfile() {
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
|
Navigator.of(context).pushNamed(
|
||||||
|
'/mzansi-profile',
|
||||||
|
arguments: AppProfileUpdateArguments(
|
||||||
|
widget.signedInUser,
|
||||||
|
widget.propicFile,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
super.dispose();
|
super.dispose();
|
||||||
@@ -229,17 +241,11 @@ class _MihPersonalHomeState extends State<MihPersonalHome>
|
|||||||
searchController.addListener(searchPackage);
|
searchController.addListener(searchPackage);
|
||||||
if (widget.isUserNew) {
|
if (widget.isUserNew) {
|
||||||
personalPackagesMap = setNerUserPersonalPackage();
|
personalPackagesMap = setNerUserPersonalPackage();
|
||||||
|
autoNavToProfile();
|
||||||
} else {
|
} else {
|
||||||
personalPackagesMap = setPersonalPackagesMap();
|
personalPackagesMap = setPersonalPackagesMap();
|
||||||
}
|
}
|
||||||
searchPackage();
|
searchPackage();
|
||||||
//Scrolling Banner message
|
|
||||||
// _marqueeController = AnimationController(
|
|
||||||
// vsync: this,
|
|
||||||
// duration: const Duration(seconds: 12),
|
|
||||||
// );
|
|
||||||
// _scrollController = ScrollController();
|
|
||||||
// WidgetsBinding.instance.addPostFrameCallback((_) => _startMarquee());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -275,7 +281,9 @@ class _MihPersonalHomeState extends State<MihPersonalHome>
|
|||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
// const SizedBox(height: 20),
|
// const SizedBox(height: 20),
|
||||||
Padding(
|
Visibility(
|
||||||
|
visible: !widget.isUserNew,
|
||||||
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: width / 20),
|
padding: EdgeInsets.symmetric(horizontal: width / 20),
|
||||||
child: MihSearchBar(
|
child: MihSearchBar(
|
||||||
controller: searchController,
|
controller: searchController,
|
||||||
@@ -284,7 +292,8 @@ class _MihPersonalHomeState extends State<MihPersonalHome>
|
|||||||
prefixAltIcon: MihIcons.mzansiAi,
|
prefixAltIcon: MihIcons.mzansiAi,
|
||||||
fillColor:
|
fillColor:
|
||||||
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
hintColor: MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
hintColor:
|
||||||
|
MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
onPrefixIconTap: () {
|
onPrefixIconTap: () {
|
||||||
Navigator.of(context).pushNamed(
|
Navigator.of(context).pushNamed(
|
||||||
'/mzansi-ai',
|
'/mzansi-ai',
|
||||||
@@ -300,6 +309,7 @@ class _MihPersonalHomeState extends State<MihPersonalHome>
|
|||||||
searchFocusNode: _searchFocusNode,
|
searchFocusNode: _searchFocusNode,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
ValueListenableBuilder(
|
ValueListenableBuilder(
|
||||||
valueListenable: searchPackageName,
|
valueListenable: searchPackageName,
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import 'dart:async';
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_dropdwn_field.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_dropdwn_field.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_numeric_stepper.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_numeric_stepper.dart';
|
||||||
@@ -653,6 +654,7 @@ class _AiChatState extends State<AiChat> {
|
|||||||
},
|
},
|
||||||
child: Chat(
|
child: Chat(
|
||||||
messages: _messages,
|
messages: _messages,
|
||||||
|
emptyState: noMessagescDisplay(),
|
||||||
// onAttachmentPressed: _handleAttachmentPressed,
|
// onAttachmentPressed: _handleAttachmentPressed,
|
||||||
// onMessageTap: _handleMessageTap,
|
// onMessageTap: _handleMessageTap,
|
||||||
// onPreviewDataFetched: _handlePreviewDataFetched,
|
// onPreviewDataFetched: _handlePreviewDataFetched,
|
||||||
@@ -794,4 +796,63 @@ class _AiChatState extends State<AiChat> {
|
|||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget? noMessagescDisplay() {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
const SizedBox(height: 50),
|
||||||
|
Icon(
|
||||||
|
MihIcons.mzansiAi,
|
||||||
|
size: 165,
|
||||||
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Text(
|
||||||
|
"Mzansi AI is here to help",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 25,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Center(
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
text: TextSpan(
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
color:
|
||||||
|
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
children: [
|
||||||
|
TextSpan(
|
||||||
|
text:
|
||||||
|
"Send us a message and we'll try our best to assist you"),
|
||||||
|
// WidgetSpan(
|
||||||
|
// alignment: PlaceholderAlignment.middle,
|
||||||
|
// child: Icon(
|
||||||
|
// Icons.menu,
|
||||||
|
// size: 20,
|
||||||
|
// color: MzansiInnovationHub.of(context)!
|
||||||
|
// .theme
|
||||||
|
// .secondaryColor(),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// TextSpan(text: " to add your first loyalty card."),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_objects/bookmarked_business.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_objects/bookmarked_business.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_search_bar.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_search_bar.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart';
|
||||||
@@ -143,56 +144,24 @@ class _MihFavouriteBusinessesState extends State<MihFavouriteBusinesses> {
|
|||||||
children: [
|
children: [
|
||||||
const SizedBox(height: 50),
|
const SizedBox(height: 50),
|
||||||
Icon(
|
Icon(
|
||||||
Icons
|
MihIcons.iDontKnow,
|
||||||
.search_off_rounded, // A different icon for "no results"
|
size: 165,
|
||||||
size: 150,
|
|
||||||
color: MzansiInnovationHub.of(context)!
|
color: MzansiInnovationHub.of(context)!
|
||||||
.theme
|
.theme
|
||||||
.secondaryColor(),
|
.secondaryColor(),
|
||||||
),
|
),
|
||||||
Padding(
|
const SizedBox(height: 10),
|
||||||
padding: const EdgeInsets.symmetric(
|
Text(
|
||||||
horizontal: 10.0),
|
"Let's Try Refining Your Search",
|
||||||
child: SizedBox(
|
|
||||||
width: 500,
|
|
||||||
child: Text(
|
|
||||||
"No businesses found for '${businessSearchController.text}'", // Specific message for no search results
|
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18,
|
fontSize: 25,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
} else if (businesses.isEmpty) {
|
|
||||||
// Initial empty state
|
|
||||||
return Column(
|
|
||||||
children: [
|
|
||||||
const SizedBox(height: 50),
|
|
||||||
Icon(
|
|
||||||
Icons.business_center_rounded,
|
|
||||||
size: 150,
|
|
||||||
color: MzansiInnovationHub.of(context)!
|
color: MzansiInnovationHub.of(context)!
|
||||||
.theme
|
.theme
|
||||||
.secondaryColor(),
|
.secondaryColor(),
|
||||||
),
|
),
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(
|
|
||||||
horizontal: 10.0),
|
|
||||||
child: SizedBox(
|
|
||||||
width: 500,
|
|
||||||
child: Text(
|
|
||||||
"No favourites yet, use Mzansi Search to find and bookmark businesses you like",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 18,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@@ -206,31 +175,68 @@ class _MihFavouriteBusinessesState extends State<MihFavouriteBusinesses> {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// This block handles the case where there are no bookmarked businesses initially
|
// This block handles the case where there are no bookmarked businesses initially
|
||||||
return Column(
|
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(height: 50),
|
const SizedBox(height: 50),
|
||||||
Icon(
|
Icon(
|
||||||
Icons.business_center_rounded,
|
MihIcons.businessProfile,
|
||||||
size: 150,
|
size: 165,
|
||||||
color: MzansiInnovationHub.of(context)!
|
color: MzansiInnovationHub.of(context)!
|
||||||
.theme
|
.theme
|
||||||
.secondaryColor(),
|
.secondaryColor(),
|
||||||
),
|
),
|
||||||
Padding(
|
const SizedBox(height: 10),
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
Text(
|
||||||
child: SizedBox(
|
"No Businesses added to your Favourites",
|
||||||
width: 500,
|
|
||||||
child: Text(
|
|
||||||
"No favourites yet, use Mzansi Search to find and bookmark businesses you like",
|
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18,
|
fontSize: 25,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
|
color: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Center(
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
text: TextSpan(
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
color: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
children: [
|
||||||
|
TextSpan(text: "Use the Mzansi Search"),
|
||||||
|
// WidgetSpan(
|
||||||
|
// alignment:
|
||||||
|
// PlaceholderAlignment.middle,
|
||||||
|
// child: Icon(
|
||||||
|
// Icons.search,
|
||||||
|
// size: 20,
|
||||||
|
// color:
|
||||||
|
// MzansiInnovationHub.of(context)!
|
||||||
|
// .theme
|
||||||
|
// .secondaryColor(),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
TextSpan(
|
||||||
|
text: " to find Businesses of Mzansi"),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else if (snapshot.hasError) {
|
} else if (snapshot.hasError) {
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: MihDropdownField(
|
child: MihDropdownField(
|
||||||
controller: businessTypeController,
|
controller: businessTypeController,
|
||||||
hintText: "Business Type Filter",
|
hintText: "Business Type",
|
||||||
dropdownOptions: options,
|
dropdownOptions: options,
|
||||||
requiredText: true,
|
requiredText: true,
|
||||||
editable: true,
|
editable: true,
|
||||||
@@ -282,7 +282,9 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
|
|||||||
],
|
],
|
||||||
);
|
);
|
||||||
} else if (!snapshot.hasData) {
|
} else if (!snapshot.hasData) {
|
||||||
return Column(
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
@@ -295,18 +297,74 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
|
|||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
Text(
|
Text(
|
||||||
"People Of Mzansi!",
|
"Search for People Of Mzansi!",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
overflow: TextOverflow.visible,
|
overflow: TextOverflow.visible,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 25,
|
fontSize: 25,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
color:
|
color: MzansiInnovationHub.of(context)!
|
||||||
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Center(
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
text: TextSpan(
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
color: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
children: [
|
||||||
|
TextSpan(text: "Press "),
|
||||||
|
WidgetSpan(
|
||||||
|
alignment: PlaceholderAlignment.middle,
|
||||||
|
child: Icon(
|
||||||
|
Icons.swap_horiz_rounded,
|
||||||
|
size: 20,
|
||||||
|
color: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
TextSpan(text: " to search for Businesses of Mzansi"),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
// return Column(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
// children: [
|
||||||
|
// const SizedBox(height: 50),
|
||||||
|
// Icon(
|
||||||
|
// MihIcons.personalProfile,
|
||||||
|
// size: 165,
|
||||||
|
// color:
|
||||||
|
// MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
// ),
|
||||||
|
// const SizedBox(height: 10),
|
||||||
|
// Text(
|
||||||
|
// "People Of Mzansi!",
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
// overflow: TextOverflow.visible,
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 25,
|
||||||
|
// fontWeight: FontWeight.bold,
|
||||||
|
// color:
|
||||||
|
// MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// );
|
||||||
} else if (snapshot.connectionState == ConnectionState.done &&
|
} else if (snapshot.connectionState == ConnectionState.done &&
|
||||||
snapshot.hasData &&
|
snapshot.hasData &&
|
||||||
snapshot.requireData!.isEmpty) {
|
snapshot.requireData!.isEmpty) {
|
||||||
@@ -400,7 +458,9 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
|
|||||||
],
|
],
|
||||||
);
|
);
|
||||||
} else if (!snapshot.hasData) {
|
} else if (!snapshot.hasData) {
|
||||||
return Column(
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
@@ -413,17 +473,77 @@ class _MihSearchMzansiState extends State<MihSearchMzansi> {
|
|||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
Text(
|
Text(
|
||||||
"Businesses Of Mzansi!",
|
"Search for Business Of Mzansi!",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
overflow: TextOverflow.visible,
|
overflow: TextOverflow.visible,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 25,
|
fontSize: 25,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
color:
|
color: MzansiInnovationHub.of(context)!
|
||||||
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Center(
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
text: TextSpan(
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
color: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
children: [
|
||||||
|
TextSpan(text: "Press "),
|
||||||
|
WidgetSpan(
|
||||||
|
alignment: PlaceholderAlignment.middle,
|
||||||
|
child: Icon(
|
||||||
|
Icons.swap_horiz_rounded,
|
||||||
|
size: 20,
|
||||||
|
color: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
TextSpan(text: " to search for People of Mzansi"),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Center(
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
text: TextSpan(
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
color: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
children: [
|
||||||
|
TextSpan(text: "Press "),
|
||||||
|
WidgetSpan(
|
||||||
|
alignment: PlaceholderAlignment.middle,
|
||||||
|
child: Icon(
|
||||||
|
Icons.filter_list_rounded,
|
||||||
|
size: 20,
|
||||||
|
color: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
TextSpan(text: " to filter business types"),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return Center(
|
return Center(
|
||||||
|
|||||||
@@ -40,7 +40,8 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _makePhoneCall(String phoneNumber) async {
|
Future<void> _makePhoneCall(String phoneNumber) async {
|
||||||
final Uri url = Uri(scheme: 'tel', path: phoneNumber);
|
String formattedNumber = phoneNumber.replaceAll("-", "");
|
||||||
|
final Uri url = Uri(scheme: 'tel', path: formattedNumber);
|
||||||
if (await canLaunchUrl(url)) {
|
if (await canLaunchUrl(url)) {
|
||||||
await launchUrl(url);
|
await launchUrl(url);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ class _MzansiSetupBusinessProfileTileState
|
|||||||
arguments: widget.signedInUser,
|
arguments: widget.signedInUser,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
appName: "Setup Business",
|
appName: "Set Up Business",
|
||||||
appIcon: Icon(
|
appIcon: Icon(
|
||||||
MihIcons.profileSetup,
|
MihIcons.businessSetup,
|
||||||
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
),
|
),
|
||||||
iconSize: widget.packageSize,
|
iconSize: widget.packageSize,
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
|
import 'package:country_code_picker/country_code_picker.dart';
|
||||||
import 'package:file_picker/file_picker.dart';
|
import 'package:file_picker/file_picker.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_floating_menu.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_packages/mzansi_profile/business_profile/components/mih_business_info_card.dart';
|
import 'package:mzansi_innovation_hub/mih_packages/mzansi_profile/business_profile/components/mih_business_info_card.dart';
|
||||||
@@ -44,6 +43,7 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
|||||||
final typeController = TextEditingController();
|
final typeController = TextEditingController();
|
||||||
final practiceNoController = TextEditingController();
|
final practiceNoController = TextEditingController();
|
||||||
final vatNoController = TextEditingController();
|
final vatNoController = TextEditingController();
|
||||||
|
final countryCodeController = TextEditingController();
|
||||||
final contactController = TextEditingController();
|
final contactController = TextEditingController();
|
||||||
final emailController = TextEditingController();
|
final emailController = TextEditingController();
|
||||||
final locationController = TextEditingController();
|
final locationController = TextEditingController();
|
||||||
@@ -65,7 +65,8 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
|||||||
practiceNoController.text,
|
practiceNoController.text,
|
||||||
vatNoController.text,
|
vatNoController.text,
|
||||||
emailController.text,
|
emailController.text,
|
||||||
contactController.text,
|
getNumberWithCountryCode(),
|
||||||
|
// contactController.text,
|
||||||
locationController.text,
|
locationController.text,
|
||||||
fileNameController.text,
|
fileNameController.text,
|
||||||
websiteController.text,
|
websiteController.text,
|
||||||
@@ -196,6 +197,34 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setContactNumberControllers() {
|
||||||
|
if (widget.arguments.business!.contact_no[0] == "+") {
|
||||||
|
List<String> contactDetails =
|
||||||
|
widget.arguments.business!.contact_no.split("-");
|
||||||
|
setState(() {
|
||||||
|
countryCodeController.text = contactDetails[0];
|
||||||
|
contactController.text = contactDetails[1];
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
setState(() {
|
||||||
|
countryCodeController.text = "+27";
|
||||||
|
contactController.text = widget.arguments.business!.contact_no;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String getNumberWithCountryCode() {
|
||||||
|
String numberWithoutBeginingZero = "";
|
||||||
|
if (contactController.text[0] == "0") {
|
||||||
|
numberWithoutBeginingZero = contactController.text
|
||||||
|
.replaceAll(" ", "")
|
||||||
|
.substring(1, contactController.text.length);
|
||||||
|
} else {
|
||||||
|
numberWithoutBeginingZero = contactController.text.replaceAll("-", " ");
|
||||||
|
}
|
||||||
|
return "${countryCodeController.text}-$numberWithoutBeginingZero";
|
||||||
|
}
|
||||||
|
|
||||||
void editBizProfileWindow(double width) {
|
void editBizProfileWindow(double width) {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
@@ -204,6 +233,7 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
|||||||
windowTitle: 'Edit Profile',
|
windowTitle: 'Edit Profile',
|
||||||
onWindowTapClose: () {
|
onWindowTapClose: () {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
|
resetControllers();
|
||||||
},
|
},
|
||||||
windowBody: MihSingleChildScroll(
|
windowBody: MihSingleChildScroll(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
@@ -284,17 +314,6 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
|||||||
return MihValidationServices().isEmpty(value);
|
return MihValidationServices().isEmpty(value);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
// MihDropdownField(
|
|
||||||
// controller: typeController,
|
|
||||||
// hintText: "Business Type",
|
|
||||||
// dropdownOptions: const ["Doctors Office", "Other"],
|
|
||||||
// editable: true,
|
|
||||||
// enableSearch: true,
|
|
||||||
// validator: (value) {
|
|
||||||
// return MihValidationServices().isEmpty(value);
|
|
||||||
// },
|
|
||||||
// requiredText: true,
|
|
||||||
// ),
|
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
MihTextFormField(
|
MihTextFormField(
|
||||||
fillColor: MzansiInnovationHub.of(context)!
|
fillColor: MzansiInnovationHub.of(context)!
|
||||||
@@ -313,7 +332,43 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
MihTextFormField(
|
Container(
|
||||||
|
width: 300,
|
||||||
|
alignment: Alignment.topLeft,
|
||||||
|
child: const Text(
|
||||||
|
"Contact Number:",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 18,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
CountryCodePicker(
|
||||||
|
padding: EdgeInsetsGeometry.all(0),
|
||||||
|
onChanged: (selectedCode) {
|
||||||
|
setState(() {
|
||||||
|
countryCodeController.text =
|
||||||
|
selectedCode.toString();
|
||||||
|
});
|
||||||
|
debugPrint(
|
||||||
|
"Selected Country Code: ${countryCodeController.text}");
|
||||||
|
},
|
||||||
|
initialSelection: countryCodeController.text,
|
||||||
|
showDropDownButton: false,
|
||||||
|
pickerStyle: PickerStyle.bottomSheet,
|
||||||
|
dialogBackgroundColor:
|
||||||
|
MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.primaryColor(),
|
||||||
|
barrierColor: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.primaryColor(),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: MihTextFormField(
|
||||||
fillColor: MzansiInnovationHub.of(context)!
|
fillColor: MzansiInnovationHub.of(context)!
|
||||||
.theme
|
.theme
|
||||||
.secondaryColor(),
|
.secondaryColor(),
|
||||||
@@ -321,30 +376,18 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
|||||||
.theme
|
.theme
|
||||||
.primaryColor(),
|
.primaryColor(),
|
||||||
controller: contactController,
|
controller: contactController,
|
||||||
|
numberMode: true,
|
||||||
multiLineInput: false,
|
multiLineInput: false,
|
||||||
requiredText: true,
|
requiredText: true,
|
||||||
hintText: "Contact Number",
|
hintText: null,
|
||||||
validator: (value) {
|
|
||||||
return MihValidationServices().isEmpty(value);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
MihTextFormField(
|
|
||||||
fillColor: MzansiInnovationHub.of(context)!
|
|
||||||
.theme
|
|
||||||
.secondaryColor(),
|
|
||||||
inputColor: MzansiInnovationHub.of(context)!
|
|
||||||
.theme
|
|
||||||
.primaryColor(),
|
|
||||||
controller: websiteController,
|
|
||||||
multiLineInput: false,
|
|
||||||
requiredText: false,
|
|
||||||
hintText: "Business Website",
|
|
||||||
validator: (value) {
|
validator: (value) {
|
||||||
return MihValidationServices()
|
return MihValidationServices()
|
||||||
.validateWebsite(value, false);
|
.isEmpty(value);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
MihTextFormField(
|
MihTextFormField(
|
||||||
height: 250,
|
height: 250,
|
||||||
@@ -394,6 +437,23 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10.0),
|
const SizedBox(height: 10.0),
|
||||||
|
MihTextFormField(
|
||||||
|
fillColor: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
inputColor: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.primaryColor(),
|
||||||
|
controller: websiteController,
|
||||||
|
multiLineInput: false,
|
||||||
|
requiredText: false,
|
||||||
|
hintText: "Business Website",
|
||||||
|
validator: (value) {
|
||||||
|
return MihValidationServices()
|
||||||
|
.validateWebsite(value, false);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
MihTextFormField(
|
MihTextFormField(
|
||||||
fillColor: MzansiInnovationHub.of(context)!
|
fillColor: MzansiInnovationHub.of(context)!
|
||||||
.theme
|
.theme
|
||||||
@@ -403,10 +463,11 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
|||||||
.primaryColor(),
|
.primaryColor(),
|
||||||
controller: regController,
|
controller: regController,
|
||||||
multiLineInput: false,
|
multiLineInput: false,
|
||||||
requiredText: true,
|
requiredText: false,
|
||||||
hintText: "Registration No.",
|
hintText: "Registration No.",
|
||||||
validator: (value) {
|
validator: (value) {
|
||||||
return MihValidationServices().isEmpty(value);
|
// return MihValidationServices().isEmpty(value);
|
||||||
|
return null;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
@@ -419,8 +480,7 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
|||||||
.primaryColor(),
|
.primaryColor(),
|
||||||
controller: practiceNoController,
|
controller: practiceNoController,
|
||||||
multiLineInput: false,
|
multiLineInput: false,
|
||||||
requiredText:
|
requiredText: false,
|
||||||
typeController.text == "Doctors Office",
|
|
||||||
hintText: "Practice Number",
|
hintText: "Practice Number",
|
||||||
validator: (validateValue) {
|
validator: (validateValue) {
|
||||||
return null;
|
return null;
|
||||||
@@ -436,10 +496,11 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
|||||||
.primaryColor(),
|
.primaryColor(),
|
||||||
controller: vatNoController,
|
controller: vatNoController,
|
||||||
multiLineInput: false,
|
multiLineInput: false,
|
||||||
requiredText: true,
|
requiredText: false,
|
||||||
hintText: "VAT Number",
|
hintText: "VAT Number",
|
||||||
validator: (value) {
|
validator: (value) {
|
||||||
return MihValidationServices().isEmpty(value);
|
// return MihValidationServices().isEmpty(value);
|
||||||
|
return null;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
@@ -547,6 +608,34 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void resetControllers() {
|
||||||
|
setState(() {
|
||||||
|
fileNameController.text =
|
||||||
|
widget.arguments.business!.logo_path.split("/").last;
|
||||||
|
regController.text = widget.arguments.business!.registration_no;
|
||||||
|
nameController.text = widget.arguments.business!.Name;
|
||||||
|
typeController.text = widget.arguments.business!.type;
|
||||||
|
practiceNoController.text = widget.arguments.business!.practice_no;
|
||||||
|
vatNoController.text = widget.arguments.business!.vat_no;
|
||||||
|
emailController.text = widget.arguments.business!.bus_email;
|
||||||
|
locationController.text = widget.arguments.business!.gps_location;
|
||||||
|
websiteController.text = widget.arguments.business!.website;
|
||||||
|
ratingController.text = widget.arguments.business!.rating;
|
||||||
|
missionVisionController.text = widget.arguments.business!.mission_vision;
|
||||||
|
});
|
||||||
|
setContactNumberControllers();
|
||||||
|
if (AppEnviroment.getEnv() == "Prod") {
|
||||||
|
env = "Prod";
|
||||||
|
} else {
|
||||||
|
env = "Dev";
|
||||||
|
}
|
||||||
|
missionVisionController.addListener(() {
|
||||||
|
setState(() {
|
||||||
|
_counter.value = missionVisionController.text.characters.length;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
super.dispose();
|
super.dispose();
|
||||||
@@ -568,31 +657,7 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
setState(() {
|
resetControllers();
|
||||||
fileNameController.text =
|
|
||||||
widget.arguments.business!.logo_path.split("/").last;
|
|
||||||
regController.text = widget.arguments.business!.registration_no;
|
|
||||||
nameController.text = widget.arguments.business!.Name;
|
|
||||||
typeController.text = widget.arguments.business!.type;
|
|
||||||
practiceNoController.text = widget.arguments.business!.practice_no;
|
|
||||||
vatNoController.text = widget.arguments.business!.vat_no;
|
|
||||||
contactController.text = widget.arguments.business!.contact_no;
|
|
||||||
emailController.text = widget.arguments.business!.bus_email;
|
|
||||||
locationController.text = widget.arguments.business!.gps_location;
|
|
||||||
websiteController.text = widget.arguments.business!.website;
|
|
||||||
ratingController.text = widget.arguments.business!.rating;
|
|
||||||
missionVisionController.text = widget.arguments.business!.mission_vision;
|
|
||||||
});
|
|
||||||
if (AppEnviroment.getEnv() == "Prod") {
|
|
||||||
env = "Prod";
|
|
||||||
} else {
|
|
||||||
env = "Dev";
|
|
||||||
}
|
|
||||||
missionVisionController.addListener(() {
|
|
||||||
setState(() {
|
|
||||||
_counter.value = missionVisionController.text.characters.length;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -733,33 +798,33 @@ class _MihBusinessDetailsState extends State<MihBusinessDetails> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
// Positioned(
|
||||||
right: 5,
|
// right: 5,
|
||||||
bottom: 10,
|
// bottom: 10,
|
||||||
child: MihFloatingMenu(
|
// child: MihFloatingMenu(
|
||||||
animatedIcon: AnimatedIcons.menu_close,
|
// animatedIcon: AnimatedIcons.menu_close,
|
||||||
children: [
|
// children: [
|
||||||
SpeedDialChild(
|
// SpeedDialChild(
|
||||||
child: Icon(
|
// child: Icon(
|
||||||
Icons.edit,
|
// Icons.edit,
|
||||||
color: MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
// color: MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
),
|
// ),
|
||||||
label: "Edit Profile",
|
// label: "Edit Profile",
|
||||||
labelBackgroundColor:
|
// labelBackgroundColor:
|
||||||
MzansiInnovationHub.of(context)!.theme.successColor(),
|
// MzansiInnovationHub.of(context)!.theme.successColor(),
|
||||||
labelStyle: TextStyle(
|
// labelStyle: TextStyle(
|
||||||
color: MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
// color: MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
fontWeight: FontWeight.bold,
|
// fontWeight: FontWeight.bold,
|
||||||
),
|
// ),
|
||||||
backgroundColor:
|
// backgroundColor:
|
||||||
MzansiInnovationHub.of(context)!.theme.successColor(),
|
// MzansiInnovationHub.of(context)!.theme.successColor(),
|
||||||
onTap: () {
|
// onTap: () {
|
||||||
editBizProfileWindow(width);
|
// editBizProfileWindow(width);
|
||||||
},
|
// },
|
||||||
)
|
// )
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business_review.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business_review.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
|
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_packages/mzansi_profile/business_profile/components/mih_review_business_window.dart';
|
import 'package:mzansi_innovation_hub/mih_packages/mzansi_profile/business_profile/components/mih_review_business_window.dart';
|
||||||
@@ -60,25 +61,99 @@ class _MihBusinessReviewsState extends State<MihBusinessReviews> {
|
|||||||
List<BusinessReview> reviews = asyncSnapshot.data!;
|
List<BusinessReview> reviews = asyncSnapshot.data!;
|
||||||
print("Reviews: ${reviews.length}");
|
print("Reviews: ${reviews.length}");
|
||||||
if (reviews.isEmpty) {
|
if (reviews.isEmpty) {
|
||||||
return Column(
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
|
child: Column(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(height: 50),
|
const SizedBox(height: 50),
|
||||||
|
Stack(
|
||||||
|
alignment: AlignmentDirectional.center,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 10.0),
|
||||||
|
child: Icon(
|
||||||
|
MihIcons.mihRing,
|
||||||
|
size: 165,
|
||||||
|
color: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
Icon(
|
Icon(
|
||||||
Icons.star_rate_rounded,
|
Icons.star_rate_rounded,
|
||||||
size: 150,
|
size: 150,
|
||||||
color:
|
color: MzansiInnovationHub.of(context)!
|
||||||
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
.theme
|
||||||
),
|
.secondaryColor(),
|
||||||
Text(
|
|
||||||
"No reviews yet, be the first the review\n${widget.business.Name}",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 18,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Text(
|
||||||
|
"No reviews yet, be the first the review ${widget.business.Name}",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 25,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// const SizedBox(height: 10),
|
||||||
|
// Center(
|
||||||
|
// child: RichText(
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
// text: TextSpan(
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 20,
|
||||||
|
// fontWeight: FontWeight.normal,
|
||||||
|
// color: MzansiInnovationHub.of(context)!
|
||||||
|
// .theme
|
||||||
|
// .secondaryColor(),
|
||||||
|
// ),
|
||||||
|
// children: [
|
||||||
|
// TextSpan(text: "Press "),
|
||||||
|
// WidgetSpan(
|
||||||
|
// alignment: PlaceholderAlignment.middle,
|
||||||
|
// child: Icon(
|
||||||
|
// Icons.menu,
|
||||||
|
// size: 20,
|
||||||
|
// color: MzansiInnovationHub.of(context)!
|
||||||
|
// .theme
|
||||||
|
// .secondaryColor(),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// TextSpan(text: " to add your first loyalty card"),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
// return Column(
|
||||||
|
// children: [
|
||||||
|
// const SizedBox(height: 50),
|
||||||
|
// Icon(
|
||||||
|
// Icons.star_rate_rounded,
|
||||||
|
// size: 150,
|
||||||
|
// color:
|
||||||
|
// MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
// ),
|
||||||
|
// Text(
|
||||||
|
// "No reviews yet, be the first the review\n${widget.business.Name}",
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 18,
|
||||||
|
// fontWeight: FontWeight.bold,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// );
|
||||||
} else {
|
} else {
|
||||||
int descriptionDisplayCOunt = 75;
|
int descriptionDisplayCOunt = 75;
|
||||||
return ListView.separated(
|
return ListView.separated(
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_search_bar.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_search_bar.dart';
|
||||||
@@ -24,7 +25,7 @@ class _MihBusinessUserSearchState extends State<MihBusinessUserSearch> {
|
|||||||
final TextEditingController searchController = TextEditingController();
|
final TextEditingController searchController = TextEditingController();
|
||||||
late Future<List<AppUser>> userSearchResults;
|
late Future<List<AppUser>> userSearchResults;
|
||||||
final FocusNode _searchFocusNode = FocusNode();
|
final FocusNode _searchFocusNode = FocusNode();
|
||||||
|
bool hasSearchedBefore = false;
|
||||||
String userSearch = "";
|
String userSearch = "";
|
||||||
String errorCode = "";
|
String errorCode = "";
|
||||||
String errorBody = "";
|
String errorBody = "";
|
||||||
@@ -49,6 +50,7 @@ class _MihBusinessUserSearchState extends State<MihBusinessUserSearch> {
|
|||||||
if (searchController.text != "") {
|
if (searchController.text != "") {
|
||||||
setState(() {
|
setState(() {
|
||||||
userSearch = searchController.text;
|
userSearch = searchController.text;
|
||||||
|
hasSearchedBefore = true;
|
||||||
userSearchResults = fetchUsers(userSearch);
|
userSearchResults = fetchUsers(userSearch);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -61,16 +63,95 @@ class _MihBusinessUserSearchState extends State<MihBusinessUserSearch> {
|
|||||||
arguments: widget.arguments,
|
arguments: widget.arguments,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return Center(
|
if (hasSearchedBefore && userSearch.isNotEmpty) {
|
||||||
child: Text(
|
return Column(
|
||||||
"Enter Username or Email to search",
|
children: [
|
||||||
|
const SizedBox(height: 50),
|
||||||
|
Icon(
|
||||||
|
MihIcons.iDontKnow,
|
||||||
|
size: 165,
|
||||||
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Text(
|
||||||
|
"Let's Try Refining Your Search",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 25,
|
fontSize: 25,
|
||||||
color: MzansiInnovationHub.of(context)!.theme.messageTextColor()),
|
fontWeight: FontWeight.bold,
|
||||||
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
const SizedBox(height: 50),
|
||||||
|
Icon(
|
||||||
|
MihIcons.personalProfile,
|
||||||
|
size: 165,
|
||||||
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Text(
|
||||||
|
"Search for a Member of Mzansi to add to your team",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 25,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Center(
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
text: TextSpan(
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
color:
|
||||||
|
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
children: [
|
||||||
|
TextSpan(
|
||||||
|
text: "You can search using their Username or Email"),
|
||||||
|
// WidgetSpan(
|
||||||
|
// alignment: PlaceholderAlignment.middle,
|
||||||
|
// child: Icon(
|
||||||
|
// Icons.menu,
|
||||||
|
// size: 20,
|
||||||
|
// color: MzansiInnovationHub.of(context)!
|
||||||
|
// .theme
|
||||||
|
// .secondaryColor(),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// TextSpan(text: " to add your first loyalty card"),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
// return Center(
|
||||||
|
// child: Text(
|
||||||
|
// "Enter Username or Email to search",
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 25,
|
||||||
|
// color: MzansiInnovationHub.of(context)!.theme.messageTextColor()),
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import 'package:mzansi_innovation_hub/mih_services/mih_my_business_user_services
|
|||||||
import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_dropdwn_field.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_form.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_form.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_alert.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_alert.dart';
|
||||||
@@ -39,7 +38,6 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
|
|||||||
PlatformFile? userPicFile;
|
PlatformFile? userPicFile;
|
||||||
PlatformFile? userSignatureFile;
|
PlatformFile? userSignatureFile;
|
||||||
final fileNameController = TextEditingController();
|
final fileNameController = TextEditingController();
|
||||||
final titleDropdownController = TextEditingController();
|
|
||||||
final titleTextController = TextEditingController();
|
final titleTextController = TextEditingController();
|
||||||
final fnameController = TextEditingController();
|
final fnameController = TextEditingController();
|
||||||
final lnameController = TextEditingController();
|
final lnameController = TextEditingController();
|
||||||
@@ -49,7 +47,7 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
|
|||||||
late String env;
|
late String env;
|
||||||
|
|
||||||
bool isFormFilled() {
|
bool isFormFilled() {
|
||||||
if (titleDropdownController.text.isEmpty) {
|
if (titleTextController.text.isEmpty) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
@@ -93,7 +91,7 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
|
|||||||
int statusCode = await MihMyBusinessUserServices().updateBusinessUser(
|
int statusCode = await MihMyBusinessUserServices().updateBusinessUser(
|
||||||
widget.arguments.signedInUser.app_id,
|
widget.arguments.signedInUser.app_id,
|
||||||
widget.arguments.businessUser!.business_id,
|
widget.arguments.businessUser!.business_id,
|
||||||
titleDropdownController.text,
|
titleTextController.text,
|
||||||
accessController.text,
|
accessController.text,
|
||||||
signtureController.text,
|
signtureController.text,
|
||||||
context,
|
context,
|
||||||
@@ -171,7 +169,6 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
|
|||||||
void dispose() {
|
void dispose() {
|
||||||
super.dispose();
|
super.dispose();
|
||||||
fileNameController.dispose();
|
fileNameController.dispose();
|
||||||
titleDropdownController.dispose();
|
|
||||||
titleTextController.dispose();
|
titleTextController.dispose();
|
||||||
fnameController.dispose();
|
fnameController.dispose();
|
||||||
lnameController.dispose();
|
lnameController.dispose();
|
||||||
@@ -189,7 +186,6 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
|
|||||||
widget.arguments.signedInUser.pro_pic_path.split("/").last;
|
widget.arguments.signedInUser.pro_pic_path.split("/").last;
|
||||||
signtureController.text =
|
signtureController.text =
|
||||||
widget.arguments.businessUser!.sig_path.split("/").last;
|
widget.arguments.businessUser!.sig_path.split("/").last;
|
||||||
titleDropdownController.text = widget.arguments.businessUser!.title;
|
|
||||||
titleTextController.text = widget.arguments.businessUser!.title;
|
titleTextController.text = widget.arguments.businessUser!.title;
|
||||||
fnameController.text = widget.arguments.signedInUser.fname;
|
fnameController.text = widget.arguments.signedInUser.fname;
|
||||||
lnameController.text = widget.arguments.signedInUser.lname;
|
lnameController.text = widget.arguments.signedInUser.lname;
|
||||||
@@ -252,18 +248,6 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
MihDropdownField(
|
|
||||||
controller: titleDropdownController,
|
|
||||||
hintText: "Title",
|
|
||||||
dropdownOptions: const ["Doctor", "Assistant", "Other"],
|
|
||||||
editable: true,
|
|
||||||
enableSearch: true,
|
|
||||||
validator: (value) {
|
|
||||||
return MihValidationServices().isEmpty(value);
|
|
||||||
},
|
|
||||||
requiredText: true,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
MihTextFormField(
|
MihTextFormField(
|
||||||
fillColor:
|
fillColor:
|
||||||
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
@@ -272,7 +256,8 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
|
|||||||
controller: titleTextController,
|
controller: titleTextController,
|
||||||
multiLineInput: false,
|
multiLineInput: false,
|
||||||
requiredText: true,
|
requiredText: true,
|
||||||
hintText: "Other Title",
|
readOnly: false,
|
||||||
|
hintText: "Title",
|
||||||
validator: (value) {
|
validator: (value) {
|
||||||
return MihValidationServices().isEmpty(value);
|
return MihValidationServices().isEmpty(value);
|
||||||
},
|
},
|
||||||
@@ -329,7 +314,7 @@ class _MihMyBusinessUserState extends State<MihMyBusinessUser> {
|
|||||||
child: const Text(
|
child: const Text(
|
||||||
"Signature:",
|
"Signature:",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 15,
|
fontSize: 18,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:country_code_picker/country_code_picker.dart';
|
||||||
import 'package:http/http.dart';
|
import 'package:http/http.dart';
|
||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
|
||||||
@@ -14,7 +15,6 @@ 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_header.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_layout_builder.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_layout_builder.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_dropdwn_field.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_form.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_form.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_text_form_field.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_text_form_field.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_error_message.dart';
|
||||||
@@ -52,6 +52,7 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
|||||||
final titleController = TextEditingController();
|
final titleController = TextEditingController();
|
||||||
final signtureController = TextEditingController();
|
final signtureController = TextEditingController();
|
||||||
final accessController = TextEditingController();
|
final accessController = TextEditingController();
|
||||||
|
final countryCodeController = TextEditingController();
|
||||||
final contactController = TextEditingController();
|
final contactController = TextEditingController();
|
||||||
final emailController = TextEditingController();
|
final emailController = TextEditingController();
|
||||||
final locationController = TextEditingController();
|
final locationController = TextEditingController();
|
||||||
@@ -125,7 +126,8 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
|||||||
practiceNoController.text,
|
practiceNoController.text,
|
||||||
vatNoController.text,
|
vatNoController.text,
|
||||||
emailController.text,
|
emailController.text,
|
||||||
contactController.text,
|
getNumberWithCountryCode(),
|
||||||
|
// "${countryCodeController.text}-${contactController.text}",
|
||||||
locationController.text,
|
locationController.text,
|
||||||
logonameController.text,
|
logonameController.text,
|
||||||
websiteController.text,
|
websiteController.text,
|
||||||
@@ -142,6 +144,18 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String getNumberWithCountryCode() {
|
||||||
|
String numberWithoutBeginingZero = "";
|
||||||
|
if (contactController.text[0] == "0") {
|
||||||
|
numberWithoutBeginingZero = contactController.text
|
||||||
|
.replaceAll(" ", "")
|
||||||
|
.substring(1, contactController.text.length);
|
||||||
|
} else {
|
||||||
|
numberWithoutBeginingZero = contactController.text.replaceAll("-", " ");
|
||||||
|
}
|
||||||
|
return "${countryCodeController.text}-$numberWithoutBeginingZero";
|
||||||
|
}
|
||||||
|
|
||||||
void internetConnectionPopUp() {
|
void internetConnectionPopUp() {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
@@ -320,17 +334,6 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
|||||||
return MihValidationServices().isEmpty(value);
|
return MihValidationServices().isEmpty(value);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
// MihDropdownField(
|
|
||||||
// controller: typeController,
|
|
||||||
// hintText: "Business Type",
|
|
||||||
// dropdownOptions: const ["Doctors Office", "Other"],
|
|
||||||
// editable: true,
|
|
||||||
// enableSearch: true,
|
|
||||||
// validator: (value) {
|
|
||||||
// return MihValidationServices().isEmpty(value);
|
|
||||||
// },
|
|
||||||
// requiredText: true,
|
|
||||||
// ),
|
|
||||||
const SizedBox(height: 10.0),
|
const SizedBox(height: 10.0),
|
||||||
MihTextFormField(
|
MihTextFormField(
|
||||||
fillColor: MzansiInnovationHub.of(context)!
|
fillColor: MzansiInnovationHub.of(context)!
|
||||||
@@ -348,7 +351,43 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10.0),
|
const SizedBox(height: 10.0),
|
||||||
MihTextFormField(
|
Container(
|
||||||
|
width: 300,
|
||||||
|
alignment: Alignment.topLeft,
|
||||||
|
child: const Text(
|
||||||
|
"Contact Number:",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 18,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
CountryCodePicker(
|
||||||
|
padding: EdgeInsetsGeometry.all(0),
|
||||||
|
onChanged: (selectedCode) {
|
||||||
|
setState(() {
|
||||||
|
countryCodeController.text =
|
||||||
|
selectedCode.toString();
|
||||||
|
});
|
||||||
|
debugPrint(
|
||||||
|
"Selected Country Code: ${countryCodeController.text}");
|
||||||
|
},
|
||||||
|
initialSelection: countryCodeController.text,
|
||||||
|
showDropDownButton: false,
|
||||||
|
pickerStyle: PickerStyle.bottomSheet,
|
||||||
|
dialogBackgroundColor:
|
||||||
|
MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.primaryColor(),
|
||||||
|
barrierColor: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.primaryColor(),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: MihTextFormField(
|
||||||
fillColor: MzansiInnovationHub.of(context)!
|
fillColor: MzansiInnovationHub.of(context)!
|
||||||
.theme
|
.theme
|
||||||
.secondaryColor(),
|
.secondaryColor(),
|
||||||
@@ -356,29 +395,16 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
|||||||
.theme
|
.theme
|
||||||
.primaryColor(),
|
.primaryColor(),
|
||||||
controller: contactController,
|
controller: contactController,
|
||||||
|
numberMode: true,
|
||||||
multiLineInput: false,
|
multiLineInput: false,
|
||||||
requiredText: true,
|
requiredText: true,
|
||||||
hintText: "Contact Number",
|
hintText: null,
|
||||||
validator: (value) {
|
validator: (value) {
|
||||||
return MihValidationServices().isEmpty(value);
|
return MihValidationServices().isEmpty(value);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10.0),
|
),
|
||||||
MihTextFormField(
|
],
|
||||||
fillColor: MzansiInnovationHub.of(context)!
|
|
||||||
.theme
|
|
||||||
.secondaryColor(),
|
|
||||||
inputColor: MzansiInnovationHub.of(context)!
|
|
||||||
.theme
|
|
||||||
.primaryColor(),
|
|
||||||
controller: websiteController,
|
|
||||||
multiLineInput: false,
|
|
||||||
requiredText: false,
|
|
||||||
hintText: "Business Website",
|
|
||||||
validator: (value) {
|
|
||||||
return MihValidationServices()
|
|
||||||
.validateWebsite(value, false);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10.0),
|
const SizedBox(height: 10.0),
|
||||||
MihTextFormField(
|
MihTextFormField(
|
||||||
@@ -429,6 +455,23 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10.0),
|
const SizedBox(height: 10.0),
|
||||||
|
MihTextFormField(
|
||||||
|
fillColor: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
inputColor: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.primaryColor(),
|
||||||
|
controller: websiteController,
|
||||||
|
multiLineInput: false,
|
||||||
|
requiredText: false,
|
||||||
|
hintText: "Business Website",
|
||||||
|
validator: (value) {
|
||||||
|
return MihValidationServices()
|
||||||
|
.validateWebsite(value, false);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10.0),
|
||||||
|
|
||||||
MihTextFormField(
|
MihTextFormField(
|
||||||
fillColor: MzansiInnovationHub.of(context)!
|
fillColor: MzansiInnovationHub.of(context)!
|
||||||
@@ -439,10 +482,11 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
|||||||
.primaryColor(),
|
.primaryColor(),
|
||||||
controller: regController,
|
controller: regController,
|
||||||
multiLineInput: false,
|
multiLineInput: false,
|
||||||
requiredText: true,
|
requiredText: false,
|
||||||
hintText: "Registration No.",
|
hintText: "Registration No.",
|
||||||
validator: (value) {
|
validator: (value) {
|
||||||
return MihValidationServices().isEmpty(value);
|
// return MihValidationServices().isEmpty(value);
|
||||||
|
return null;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10.0),
|
const SizedBox(height: 10.0),
|
||||||
@@ -472,10 +516,11 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
|||||||
.primaryColor(),
|
.primaryColor(),
|
||||||
controller: vatNoController,
|
controller: vatNoController,
|
||||||
multiLineInput: false,
|
multiLineInput: false,
|
||||||
requiredText: true,
|
requiredText: false,
|
||||||
hintText: "VAT Number",
|
hintText: "VAT Number",
|
||||||
validator: (value) {
|
validator: (value) {
|
||||||
return MihValidationServices().isEmpty(value);
|
// return MihValidationServices().isEmpty(value);
|
||||||
|
return null;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10.0),
|
const SizedBox(height: 10.0),
|
||||||
@@ -553,17 +598,32 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
|||||||
.theme
|
.theme
|
||||||
.secondaryColor()),
|
.secondaryColor()),
|
||||||
const SizedBox(height: 10.0),
|
const SizedBox(height: 10.0),
|
||||||
MihDropdownField(
|
MihTextFormField(
|
||||||
|
fillColor: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
inputColor: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.primaryColor(),
|
||||||
controller: titleController,
|
controller: titleController,
|
||||||
|
multiLineInput: false,
|
||||||
|
requiredText: true,
|
||||||
hintText: "Title",
|
hintText: "Title",
|
||||||
dropdownOptions: const ["Doctor", "Assistant", "Other"],
|
|
||||||
editable: true,
|
|
||||||
enableSearch: true,
|
|
||||||
validator: (value) {
|
validator: (value) {
|
||||||
return MihValidationServices().isEmpty(value);
|
return MihValidationServices().isEmpty(value);
|
||||||
},
|
},
|
||||||
requiredText: true,
|
|
||||||
),
|
),
|
||||||
|
// MihDropdownField(
|
||||||
|
// controller: titleController,
|
||||||
|
// hintText: "Title",
|
||||||
|
// dropdownOptions: const ["Doctor", "Assistant", "Other"],
|
||||||
|
// editable: true,
|
||||||
|
// enableSearch: true,
|
||||||
|
// validator: (value) {
|
||||||
|
// return MihValidationServices().isEmpty(value);
|
||||||
|
// },
|
||||||
|
// requiredText: true,
|
||||||
|
// ),
|
||||||
const SizedBox(height: 10.0),
|
const SizedBox(height: 10.0),
|
||||||
MihTextFormField(
|
MihTextFormField(
|
||||||
fillColor: MzansiInnovationHub.of(context)!
|
fillColor: MzansiInnovationHub.of(context)!
|
||||||
@@ -575,6 +635,7 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
|||||||
controller: fnameController,
|
controller: fnameController,
|
||||||
multiLineInput: false,
|
multiLineInput: false,
|
||||||
requiredText: true,
|
requiredText: true,
|
||||||
|
readOnly: true,
|
||||||
hintText: "First Name",
|
hintText: "First Name",
|
||||||
validator: (value) {
|
validator: (value) {
|
||||||
return MihValidationServices().isEmpty(value);
|
return MihValidationServices().isEmpty(value);
|
||||||
@@ -591,23 +652,40 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
|||||||
controller: lnameController,
|
controller: lnameController,
|
||||||
multiLineInput: false,
|
multiLineInput: false,
|
||||||
requiredText: true,
|
requiredText: true,
|
||||||
|
readOnly: true,
|
||||||
hintText: "Surname",
|
hintText: "Surname",
|
||||||
validator: (value) {
|
validator: (value) {
|
||||||
return MihValidationServices().isEmpty(value);
|
return MihValidationServices().isEmpty(value);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const SizedBox(height: 15.0),
|
const SizedBox(height: 15.0),
|
||||||
MihDropdownField(
|
MihTextFormField(
|
||||||
|
fillColor: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
inputColor: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.primaryColor(),
|
||||||
controller: accessController,
|
controller: accessController,
|
||||||
|
multiLineInput: false,
|
||||||
|
requiredText: true,
|
||||||
|
readOnly: true,
|
||||||
hintText: "Access Type",
|
hintText: "Access Type",
|
||||||
dropdownOptions: const ["Full", "Partial"],
|
|
||||||
editable: true,
|
|
||||||
enableSearch: true,
|
|
||||||
validator: (value) {
|
validator: (value) {
|
||||||
return MihValidationServices().isEmpty(value);
|
return MihValidationServices().isEmpty(value);
|
||||||
},
|
},
|
||||||
requiredText: true,
|
|
||||||
),
|
),
|
||||||
|
// MihDropdownField(
|
||||||
|
// controller: accessController,
|
||||||
|
// hintText: "Access Type",
|
||||||
|
// dropdownOptions: const ["Full", "Partial"],
|
||||||
|
// editable: false,
|
||||||
|
// enableSearch: true,
|
||||||
|
// validator: (value) {
|
||||||
|
// return MihValidationServices().isEmpty(value);
|
||||||
|
// },
|
||||||
|
// requiredText: true,
|
||||||
|
// ),
|
||||||
const SizedBox(height: 20.0),
|
const SizedBox(height: 20.0),
|
||||||
Center(
|
Center(
|
||||||
child: MihButton(
|
child: MihButton(
|
||||||
@@ -674,6 +752,7 @@ class _ProfileBusinessAddState extends State<ProfileBusinessAdd> {
|
|||||||
fnameController.text = widget.signedInUser.fname;
|
fnameController.text = widget.signedInUser.fname;
|
||||||
lnameController.text = widget.signedInUser.lname;
|
lnameController.text = widget.signedInUser.lname;
|
||||||
accessController.text = "Full";
|
accessController.text = "Full";
|
||||||
|
countryCodeController.text = "+27";
|
||||||
});
|
});
|
||||||
if (AppEnviroment.getEnv() == "Prod") {
|
if (AppEnviroment.getEnv() == "Prod") {
|
||||||
env = "Prod";
|
env = "Prod";
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class _MzansiSetupProfileTileState extends State<MzansiSetupProfileTile> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
appName: "Setup Profile",
|
appName: "Set Up Profile",
|
||||||
appIcon: Icon(
|
appIcon: Icon(
|
||||||
MihIcons.profileSetup,
|
MihIcons.profileSetup,
|
||||||
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_floating_menu.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_file_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_file_services.dart';
|
||||||
@@ -41,6 +39,7 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
|
|||||||
final ValueNotifier<int> _counter = ValueNotifier<int>(0);
|
final ValueNotifier<int> _counter = ValueNotifier<int>(0);
|
||||||
PlatformFile? proPic;
|
PlatformFile? proPic;
|
||||||
late ImageProvider<Object>? propicPreview;
|
late ImageProvider<Object>? propicPreview;
|
||||||
|
late bool originalProfileTypeIsBusiness;
|
||||||
late bool businessUser;
|
late bool businessUser;
|
||||||
late String oldProPicName;
|
late String oldProPicName;
|
||||||
late String env;
|
late String env;
|
||||||
@@ -125,13 +124,18 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
|
|||||||
context,
|
context,
|
||||||
);
|
);
|
||||||
if (responseCode == 200) {
|
if (responseCode == 200) {
|
||||||
|
bool stayOnPersonalSide = true;
|
||||||
|
if (originalProfileTypeIsBusiness == false && businessUser == true) {
|
||||||
|
stayOnPersonalSide = false;
|
||||||
|
}
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
Navigator.of(context).pushNamed(
|
Navigator.of(context).pushNamed(
|
||||||
'/',
|
'/',
|
||||||
arguments: AuthArguments(
|
arguments: AuthArguments(
|
||||||
true,
|
stayOnPersonalSide,
|
||||||
|
// true,
|
||||||
false,
|
false,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -302,7 +306,7 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
|
|||||||
controller: purposeController,
|
controller: purposeController,
|
||||||
multiLineInput: true,
|
multiLineInput: true,
|
||||||
requiredText: true,
|
requiredText: true,
|
||||||
hintText: "Your Purpose",
|
hintText: "Your Personal Mission",
|
||||||
validator: (value) {
|
validator: (value) {
|
||||||
return MihValidationServices()
|
return MihValidationServices()
|
||||||
.validateLength(purposeController.text, 256);
|
.validateLength(purposeController.text, 256);
|
||||||
@@ -423,6 +427,11 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
|
|||||||
usernameController.text = widget.arguments.signedInUser.username;
|
usernameController.text = widget.arguments.signedInUser.username;
|
||||||
purposeController.text = widget.arguments.signedInUser.purpose;
|
purposeController.text = widget.arguments.signedInUser.purpose;
|
||||||
businessUser = isBusinessUser();
|
businessUser = isBusinessUser();
|
||||||
|
if (businessUser) {
|
||||||
|
originalProfileTypeIsBusiness = true;
|
||||||
|
} else {
|
||||||
|
originalProfileTypeIsBusiness = false;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -513,7 +522,7 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
|
|||||||
child: Text(
|
child: Text(
|
||||||
widget.arguments.signedInUser.purpose.isNotEmpty
|
widget.arguments.signedInUser.purpose.isNotEmpty
|
||||||
? widget.arguments.signedInUser.purpose
|
? widget.arguments.signedInUser.purpose
|
||||||
: "No purpose added yet",
|
: "No Personal Mission added yet",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
@@ -553,33 +562,33 @@ class _MihPersonalProfileState extends State<MihPersonalProfile> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
// Positioned(
|
||||||
right: 5,
|
// right: 5,
|
||||||
bottom: 10,
|
// bottom: 10,
|
||||||
child: MihFloatingMenu(
|
// child: MihFloatingMenu(
|
||||||
animatedIcon: AnimatedIcons.menu_close,
|
// animatedIcon: AnimatedIcons.menu_close,
|
||||||
children: [
|
// children: [
|
||||||
SpeedDialChild(
|
// SpeedDialChild(
|
||||||
child: Icon(
|
// child: Icon(
|
||||||
Icons.edit,
|
// Icons.edit,
|
||||||
color: MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
// color: MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
),
|
// ),
|
||||||
label: "Edit Profile",
|
// label: "Edit Profile",
|
||||||
labelBackgroundColor:
|
// labelBackgroundColor:
|
||||||
MzansiInnovationHub.of(context)!.theme.successColor(),
|
// MzansiInnovationHub.of(context)!.theme.successColor(),
|
||||||
labelStyle: TextStyle(
|
// labelStyle: TextStyle(
|
||||||
color: MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
// color: MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
fontWeight: FontWeight.bold,
|
// fontWeight: FontWeight.bold,
|
||||||
),
|
// ),
|
||||||
backgroundColor:
|
// backgroundColor:
|
||||||
MzansiInnovationHub.of(context)!.theme.successColor(),
|
// MzansiInnovationHub.of(context)!.theme.successColor(),
|
||||||
onTap: () {
|
// onTap: () {
|
||||||
editProfileWindow(width);
|
// editProfileWindow(width);
|
||||||
},
|
// },
|
||||||
)
|
// )
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ class _MihPersonalProfileViewState extends State<MihPersonalProfileView> {
|
|||||||
child: Text(
|
child: Text(
|
||||||
widget.user.purpose.isNotEmpty
|
widget.user.purpose.isNotEmpty
|
||||||
? widget.user.purpose
|
? widget.user.purpose
|
||||||
: "No purpose added yet",
|
: "No Personal Mission added yet",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_banner_ad.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_banner_ad.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_mzansi_wallet_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_mzansi_wallet_services.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart';
|
||||||
@@ -21,6 +22,8 @@ class BuildLoyaltyCardList extends StatefulWidget {
|
|||||||
final List<MIHLoyaltyCard> cardList;
|
final List<MIHLoyaltyCard> cardList;
|
||||||
final int navIndex;
|
final int navIndex;
|
||||||
final MihBannerAd? bannerAd;
|
final MihBannerAd? bannerAd;
|
||||||
|
final bool favouritesMode;
|
||||||
|
final TextEditingController searchText;
|
||||||
final void Function()? onCardViewClose;
|
final void Function()? onCardViewClose;
|
||||||
|
|
||||||
const BuildLoyaltyCardList({
|
const BuildLoyaltyCardList({
|
||||||
@@ -28,6 +31,8 @@ class BuildLoyaltyCardList extends StatefulWidget {
|
|||||||
required this.signedInUser,
|
required this.signedInUser,
|
||||||
required this.cardList,
|
required this.cardList,
|
||||||
required this.navIndex,
|
required this.navIndex,
|
||||||
|
required this.favouritesMode,
|
||||||
|
required this.searchText,
|
||||||
this.bannerAd,
|
this.bannerAd,
|
||||||
this.onCardViewClose,
|
this.onCardViewClose,
|
||||||
});
|
});
|
||||||
@@ -502,11 +507,7 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
|
|||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
left: getHorizontalPaddingSize(size),
|
left: getHorizontalPaddingSize(size),
|
||||||
right: getHorizontalPaddingSize(size),
|
right: getHorizontalPaddingSize(size),
|
||||||
//bottom: height / 5,
|
|
||||||
//top: 20,
|
|
||||||
),
|
),
|
||||||
// physics: ,
|
|
||||||
// shrinkWrap: true,
|
|
||||||
itemCount: widget.cardList.length,
|
itemCount: widget.cardList.length,
|
||||||
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
|
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
|
||||||
mainAxisSpacing: 0,
|
mainAxisSpacing: 0,
|
||||||
@@ -526,41 +527,148 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
// return ListView.separated(
|
} else {
|
||||||
// shrinkWrap: true,
|
if (!widget.favouritesMode) {
|
||||||
// physics: const NeverScrollableScrollPhysics(),
|
if (widget.searchText.text.isNotEmpty) {
|
||||||
// separatorBuilder: (BuildContext context, int index) {
|
return Column(
|
||||||
// return Divider(
|
children: [
|
||||||
// color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
const SizedBox(height: 50),
|
||||||
// );
|
Icon(
|
||||||
// },
|
MihIcons.iDontKnow,
|
||||||
// itemCount: widget.cardList.length,
|
size: 165,
|
||||||
// itemBuilder: (context, index) {
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
// return ListTile(
|
),
|
||||||
// title: MihCardDisplay(
|
const SizedBox(height: 10),
|
||||||
// shopName: widget.cardList[index].shop_name, height: 200),
|
Text(
|
||||||
|
"Let's Try Refining Your Search",
|
||||||
// onTap: () {
|
textAlign: TextAlign.center,
|
||||||
// viewCardWindow(index);
|
overflow: TextOverflow.visible,
|
||||||
// },
|
style: TextStyle(
|
||||||
// );
|
fontSize: 25,
|
||||||
// },
|
fontWeight: FontWeight.bold,
|
||||||
// );
|
color:
|
||||||
|
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
const SizedBox(height: 50),
|
||||||
|
Icon(
|
||||||
|
MihIcons.mzansiWallet,
|
||||||
|
size: 165,
|
||||||
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Text(
|
||||||
|
"No Cards added to your Mzansi Wallet",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 25,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color:
|
||||||
|
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Center(
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
text: TextSpan(
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
color: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
children: [
|
||||||
|
TextSpan(text: "Press "),
|
||||||
|
WidgetSpan(
|
||||||
|
alignment: PlaceholderAlignment.middle,
|
||||||
|
child: Icon(
|
||||||
|
Icons.menu,
|
||||||
|
size: 20,
|
||||||
|
color: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
TextSpan(text: " to add your first loyalty card"),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.only(top: 25.0),
|
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
child: SizedBox(
|
child: Column(
|
||||||
height: size.height,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
child: const Align(
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
alignment: Alignment.topCenter,
|
children: [
|
||||||
child: Text(
|
const SizedBox(height: 50),
|
||||||
"No Cards Available",
|
Icon(
|
||||||
style: TextStyle(fontSize: 25, color: Colors.grey),
|
MihIcons.mzansiWallet,
|
||||||
|
size: 165,
|
||||||
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Text(
|
||||||
|
"No Favourite Cards in your Mzansi Wallet",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 25,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color:
|
||||||
|
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Center(
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
text: TextSpan(
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
color: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
children: [
|
||||||
|
TextSpan(text: "Press "),
|
||||||
|
WidgetSpan(
|
||||||
|
alignment: PlaceholderAlignment.middle,
|
||||||
|
child: Icon(
|
||||||
|
Icons.menu,
|
||||||
|
size: 20,
|
||||||
|
color: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text:
|
||||||
|
" when viewing loyalty card to add it to your favorites"),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,8 @@ class _MihCardFavouritesState extends State<MihCardFavourites> {
|
|||||||
signedInUser: widget.signedInUser,
|
signedInUser: widget.signedInUser,
|
||||||
navIndex: 0,
|
navIndex: 0,
|
||||||
bannerAd: _bannerAd,
|
bannerAd: _bannerAd,
|
||||||
|
favouritesMode: true,
|
||||||
|
searchText: TextEditingController(),
|
||||||
onCardViewClose: () {
|
onCardViewClose: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
_bannerAd = MihBannerAd();
|
_bannerAd = MihBannerAd();
|
||||||
|
|||||||
@@ -372,6 +372,8 @@ class _MihCardsState extends State<MihCards> {
|
|||||||
signedInUser: widget.signedInUser,
|
signedInUser: widget.signedInUser,
|
||||||
navIndex: 0,
|
navIndex: 0,
|
||||||
bannerAd: _bannerAd,
|
bannerAd: _bannerAd,
|
||||||
|
favouritesMode: false,
|
||||||
|
searchText: cardSearchController,
|
||||||
onCardViewClose: () {
|
onCardViewClose: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
_bannerAd = MihBannerAd();
|
_bannerAd = MihBannerAd();
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_service_calls.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_service_calls.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart';
|
||||||
@@ -35,6 +36,7 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
|
|||||||
TextEditingController _mihPatientSearchController = TextEditingController();
|
TextEditingController _mihPatientSearchController = TextEditingController();
|
||||||
final FocusNode _focusNode = FocusNode();
|
final FocusNode _focusNode = FocusNode();
|
||||||
final FocusNode _searchFocusNode = FocusNode();
|
final FocusNode _searchFocusNode = FocusNode();
|
||||||
|
bool hasSearchedBefore = false;
|
||||||
String _mihPatientSearchString = "";
|
String _mihPatientSearchString = "";
|
||||||
String baseUrl = AppEnviroment.baseApiUrl;
|
String baseUrl = AppEnviroment.baseApiUrl;
|
||||||
late Future<List<Patient>> _mihPatientSearchResults;
|
late Future<List<Patient>> _mihPatientSearchResults;
|
||||||
@@ -125,33 +127,97 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
|
|||||||
personalSelected: widget.personalSelected,
|
personalSelected: widget.personalSelected,
|
||||||
);
|
);
|
||||||
} else if (patientsList.isEmpty && searchString != "") {
|
} else if (patientsList.isEmpty && searchString != "") {
|
||||||
return Padding(
|
return Column(
|
||||||
padding: const EdgeInsets.only(top: 35.0),
|
children: [
|
||||||
child: Center(
|
const SizedBox(height: 50),
|
||||||
child: Text(
|
Icon(
|
||||||
"No ID or Medical Aid No. matches a Patient",
|
MihIcons.iDontKnow,
|
||||||
|
size: 165,
|
||||||
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Text(
|
||||||
|
"Let's Try Refining Your Search",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 25,
|
fontSize: 25,
|
||||||
color:
|
fontWeight: FontWeight.bold,
|
||||||
MzansiInnovationHub.of(context)!.theme.messageTextColor()),
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
textAlign: TextAlign.center,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
],
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.only(top: 35.0),
|
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
child: Center(
|
child: Column(
|
||||||
child: Text(
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
"Enter ID or Medical Aid No. of Patient",
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
const SizedBox(height: 50),
|
||||||
|
Icon(
|
||||||
|
MihIcons.patientProfile,
|
||||||
|
size: 165,
|
||||||
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Text(
|
||||||
|
"Search for a Patient of Mzansi to add to your Patient List",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 25,
|
fontSize: 25,
|
||||||
color:
|
fontWeight: FontWeight.bold,
|
||||||
MzansiInnovationHub.of(context)!.theme.messageTextColor()),
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
textAlign: TextAlign.center,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Center(
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
text: TextSpan(
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
color:
|
||||||
|
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
children: [
|
||||||
|
TextSpan(
|
||||||
|
text:
|
||||||
|
"You can search using their teamtient ID or Medical Aid No."),
|
||||||
|
// WidgetSpan(
|
||||||
|
// alignment: PlaceholderAlignment.middle,
|
||||||
|
// child: Icon(
|
||||||
|
// Icons.menu,
|
||||||
|
// size: 20,
|
||||||
|
// color: MzansiInnovationHub.of(context)!
|
||||||
|
// .theme
|
||||||
|
// .secondaryColor(),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// TextSpan(text: " to add your first loyalty card"),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
// return Padding(
|
||||||
|
// padding: const EdgeInsets.only(top: 35.0),
|
||||||
|
// child: Center(
|
||||||
|
// child: Text(
|
||||||
|
// "Enter ID or Medical Aid No. of Patient",
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 25,
|
||||||
|
// color:
|
||||||
|
// MzansiInnovationHub.of(context)!.theme.messageTextColor()),
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,6 +227,7 @@ class _MihPatientSearchState extends State<MihPatientSearch> {
|
|||||||
_mihPatientSearchString = _mihPatientSearchController.text;
|
_mihPatientSearchString = _mihPatientSearchController.text;
|
||||||
_mihPatientSearchResults =
|
_mihPatientSearchResults =
|
||||||
MIHApiCalls.fetchPatients(_mihPatientSearchString);
|
MIHApiCalls.fetchPatients(_mihPatientSearchString);
|
||||||
|
hasSearchedBefore = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_service_calls.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_service_calls.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart';
|
||||||
@@ -11,7 +12,6 @@ import 'package:mzansi_innovation_hub/mih_components/mih_objects/business_user.d
|
|||||||
import 'package:mzansi_innovation_hub/mih_components/mih_objects/patient_access.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_objects/patient_access.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_packages/patient_profile/pat_manager/list_builders/build_my_patient_list_list.dart';
|
import 'package:mzansi_innovation_hub/mih_packages/patient_profile/pat_manager/list_builders/build_my_patient_list_list.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
|
|
||||||
class MyPatientList extends StatefulWidget {
|
class MyPatientList extends StatefulWidget {
|
||||||
final AppUser signedInUser;
|
final AppUser signedInUser;
|
||||||
@@ -35,6 +35,7 @@ class _MyPatientListState extends State<MyPatientList> {
|
|||||||
late Future<List<PatientAccess>> _myPatientList;
|
late Future<List<PatientAccess>> _myPatientList;
|
||||||
TextEditingController _myPatientSearchController = TextEditingController();
|
TextEditingController _myPatientSearchController = TextEditingController();
|
||||||
final FocusNode _searchFocusNode = FocusNode();
|
final FocusNode _searchFocusNode = FocusNode();
|
||||||
|
bool hasSearchedBefore = false;
|
||||||
String _myPatientIdSearchString = "";
|
String _myPatientIdSearchString = "";
|
||||||
String baseUrl = AppEnviroment.baseApiUrl;
|
String baseUrl = AppEnviroment.baseApiUrl;
|
||||||
|
|
||||||
@@ -114,19 +115,99 @@ class _MyPatientListState extends State<MyPatientList> {
|
|||||||
businessUser: widget.businessUser,
|
businessUser: widget.businessUser,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return Padding(
|
if (hasSearchedBefore && _myPatientIdSearchString.isNotEmpty) {
|
||||||
padding: const EdgeInsets.only(top: 35.0),
|
return Column(
|
||||||
child: Center(
|
children: [
|
||||||
child: Text(
|
const SizedBox(height: 50),
|
||||||
"No Patients matching search",
|
Icon(
|
||||||
|
MihIcons.iDontKnow,
|
||||||
|
size: 165,
|
||||||
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Text(
|
||||||
|
"Let's Try Refining Your Search",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 25,
|
fontSize: 25,
|
||||||
color: MzansiInnovationHub.of(context)!.theme.messageTextColor()),
|
fontWeight: FontWeight.bold,
|
||||||
textAlign: TextAlign.center,
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
const SizedBox(height: 50),
|
||||||
|
Icon(
|
||||||
|
MihIcons.patientProfile,
|
||||||
|
size: 165,
|
||||||
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Text(
|
||||||
|
"You dont have access to any Patients Profile",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 25,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Center(
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
text: TextSpan(
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
color:
|
||||||
|
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
children: [
|
||||||
|
TextSpan(text: "Press "),
|
||||||
|
WidgetSpan(
|
||||||
|
alignment: PlaceholderAlignment.middle,
|
||||||
|
child: Icon(
|
||||||
|
Icons.search,
|
||||||
|
size: 20,
|
||||||
|
color: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text:
|
||||||
|
" to use Patient Search to request access to their profile."),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
// return Padding(
|
||||||
|
// padding: const EdgeInsets.only(top: 35.0),
|
||||||
|
// child: Center(
|
||||||
|
// child: Text(
|
||||||
|
// "No Patients matching search",
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 25,
|
||||||
|
// color: MzansiInnovationHub.of(context)!.theme.messageTextColor()),
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
}
|
||||||
|
|
||||||
List<PatientAccess> filterAccessResults(
|
List<PatientAccess> filterAccessResults(
|
||||||
List<PatientAccess> patAccList, String query) {
|
List<PatientAccess> patAccList, String query) {
|
||||||
@@ -143,6 +224,7 @@ class _MyPatientListState extends State<MyPatientList> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
_myPatientList = MIHApiCalls.getPatientAccessListOfBusiness(
|
_myPatientList = MIHApiCalls.getPatientAccessListOfBusiness(
|
||||||
widget.business!.business_id);
|
widget.business!.business_id);
|
||||||
|
hasSearchedBefore = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_mzansi_calendar_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_mzansi_calendar_services.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart';
|
||||||
@@ -170,21 +171,79 @@ class _WaitingRoomState extends State<WaitingRoom> {
|
|||||||
}
|
}
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.only(top: 35.0),
|
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
child: Align(
|
child: Column(
|
||||||
alignment: Alignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
child: Text(
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
const SizedBox(height: 50),
|
||||||
|
Icon(
|
||||||
|
MihIcons.calendar,
|
||||||
|
size: 165,
|
||||||
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Text(
|
||||||
"No Appointments for $selectedDay",
|
"No Appointments for $selectedDay",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 25,
|
fontSize: 25,
|
||||||
color: MzansiInnovationHub.of(context)!.theme.messageTextColor(),
|
fontWeight: FontWeight.bold,
|
||||||
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Center(
|
||||||
|
child: RichText(
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
softWrap: true,
|
text: TextSpan(
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
color:
|
||||||
|
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
),
|
),
|
||||||
|
children: [
|
||||||
|
TextSpan(text: "Press "),
|
||||||
|
WidgetSpan(
|
||||||
|
alignment: PlaceholderAlignment.middle,
|
||||||
|
child: Icon(
|
||||||
|
Icons.menu,
|
||||||
|
size: 20,
|
||||||
|
color: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text:
|
||||||
|
" to add an appointment or select a different date"),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
// return Expanded(
|
||||||
|
// child: Padding(
|
||||||
|
// padding: const EdgeInsets.only(top: 35.0),
|
||||||
|
// child: Align(
|
||||||
|
// alignment: Alignment.center,
|
||||||
|
// child: Text(
|
||||||
|
// "No Appointments for $selectedDay",
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 25,
|
||||||
|
// color: MzansiInnovationHub.of(context)!.theme.messageTextColor(),
|
||||||
|
// ),
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
// softWrap: true,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
void appointmentTypeSelection(double width) {
|
void appointmentTypeSelection(double width) {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import 'dart:async';
|
|||||||
import 'package:fl_downloader/fl_downloader.dart';
|
import 'package:fl_downloader/fl_downloader.dart';
|
||||||
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_claim_statement_generation_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_claim_statement_generation_services.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_file_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_file_services.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.dart';
|
||||||
@@ -349,11 +350,74 @@ class _BuildClaimStatementFileListState
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return const Center(
|
return Padding(
|
||||||
child: Text(
|
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
"No Documents Available",
|
child: Column(
|
||||||
style: TextStyle(fontSize: 25, color: Colors.grey),
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
const SizedBox(height: 50),
|
||||||
|
Stack(
|
||||||
|
alignment: AlignmentDirectional.center,
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
MihIcons.mihRing,
|
||||||
|
size: 165,
|
||||||
|
color:
|
||||||
|
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
Icon(
|
||||||
|
Icons.file_open_outlined,
|
||||||
|
size: 110,
|
||||||
|
color:
|
||||||
|
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Text(
|
||||||
|
"No Claims or Statements have been added to this profile.",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 25,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Visibility(
|
||||||
|
visible: widget.business != null,
|
||||||
|
child: Center(
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
text: TextSpan(
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
color: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
children: [
|
||||||
|
TextSpan(text: "Press "),
|
||||||
|
WidgetSpan(
|
||||||
|
alignment: PlaceholderAlignment.middle,
|
||||||
|
child: Icon(
|
||||||
|
Icons.menu,
|
||||||
|
size: 20,
|
||||||
|
color: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
TextSpan(text: " to generate the first document"),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import 'dart:convert';
|
|||||||
import 'package:fl_downloader/fl_downloader.dart';
|
import 'package:fl_downloader/fl_downloader.dart';
|
||||||
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_file_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_file_services.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_delete_message.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_delete_message.dart';
|
||||||
@@ -400,13 +401,82 @@ class _BuildFilesListState extends State<BuildFilesList> {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return const Center(
|
return Padding(
|
||||||
child: Text(
|
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
"No Documents Available",
|
child: Column(
|
||||||
style: TextStyle(fontSize: 25, color: Colors.grey),
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
const SizedBox(height: 50),
|
||||||
|
Stack(
|
||||||
|
alignment: AlignmentDirectional.center,
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
MihIcons.mihRing,
|
||||||
|
size: 165,
|
||||||
|
color:
|
||||||
|
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
Icon(
|
||||||
|
Icons.file_present,
|
||||||
|
size: 110,
|
||||||
|
color:
|
||||||
|
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Text(
|
||||||
|
"No Documents have been added to this profile.",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 25,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Center(
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
text: TextSpan(
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
color:
|
||||||
|
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
children: [
|
||||||
|
TextSpan(text: "Press "),
|
||||||
|
WidgetSpan(
|
||||||
|
alignment: PlaceholderAlignment.middle,
|
||||||
|
child: Icon(
|
||||||
|
Icons.menu,
|
||||||
|
size: 20,
|
||||||
|
color: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
TextSpan(text: " to add "),
|
||||||
|
widget.business != null
|
||||||
|
? TextSpan(text: " or generate a the first document")
|
||||||
|
: TextSpan(text: " the first document"),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
// return const Center(
|
||||||
|
// child: Text(
|
||||||
|
// "No Documents Available",
|
||||||
|
// style: TextStyle(fontSize: 25, color: Colors.grey),
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import 'dart:convert';
|
|||||||
|
|
||||||
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_text_form_field.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_text_form_field.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_delete_message.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_delete_message.dart';
|
||||||
@@ -281,13 +282,83 @@ class _BuildNotesListState extends State<BuildNotesList> {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return const Center(
|
return Padding(
|
||||||
child: Text(
|
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
"No Notes Available",
|
child: Column(
|
||||||
style: TextStyle(fontSize: 25, color: Colors.grey),
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
const SizedBox(height: 50),
|
||||||
|
Stack(
|
||||||
|
alignment: AlignmentDirectional.center,
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
MihIcons.mihRing,
|
||||||
|
size: 165,
|
||||||
|
color:
|
||||||
|
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
Icon(
|
||||||
|
Icons.article_outlined,
|
||||||
|
size: 110,
|
||||||
|
color:
|
||||||
|
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Text(
|
||||||
|
"No Notes have been added to this profile.",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 25,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Visibility(
|
||||||
|
visible: widget.business != null,
|
||||||
|
child: Center(
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
text: TextSpan(
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
color: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
children: [
|
||||||
|
TextSpan(text: "Press "),
|
||||||
|
WidgetSpan(
|
||||||
|
alignment: PlaceholderAlignment.middle,
|
||||||
|
child: Icon(
|
||||||
|
Icons.menu,
|
||||||
|
size: 20,
|
||||||
|
color: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
TextSpan(text: " to add the first note"),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
// return const Center(
|
||||||
|
// child: Text(
|
||||||
|
// "No Notes Available",
|
||||||
|
// style: TextStyle(fontSize: 25, color: Colors.grey),
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ dependencies:
|
|||||||
google_mobile_ads: ^6.0.0
|
google_mobile_ads: ^6.0.0
|
||||||
redacted: ^1.0.13
|
redacted: ^1.0.13
|
||||||
custom_rating_bar: ^3.0.0
|
custom_rating_bar: ^3.0.0
|
||||||
|
country_code_picker: ^3.3.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
Reference in New Issue
Block a user