Commit 55280429 authored by Sai Srinivas's avatar Sai Srinivas
Browse files

20-08-2025 By Sai Srinivas

Test Cases CRM
parent 6ace5c45
...@@ -9,10 +9,17 @@ import '../Utils/BackgroundLocationService.dart'; ...@@ -9,10 +9,17 @@ import '../Utils/BackgroundLocationService.dart';
class LogoutNotifier extends ChangeNotifier{ class LogoutNotifier extends ChangeNotifier{
bool _logoutButtonClicked = true;
bool _isLoading = false; bool _isLoading = false;
bool get isLoading => _isLoading; bool get isLoading => _isLoading;
bool get logoutButtonClicked => _logoutButtonClicked;
set logoutButtonClicked(bool val){
_logoutButtonClicked = val;
notifyListeners();
}
Future<void> LogoutApiFunction(HomescreenNotifier prov,BuildContext context) async { Future<void> LogoutApiFunction(HomescreenNotifier prov,BuildContext context) async {
// print("lohi"); // print("lohi");
try { try {
...@@ -22,6 +29,7 @@ class LogoutNotifier extends ChangeNotifier{ ...@@ -22,6 +29,7 @@ class LogoutNotifier extends ChangeNotifier{
if (data.error == 0) { if (data.error == 0) {
_isLoading = false; _isLoading = false;
_logoutButtonClicked = false;
await BackgroundLocationService.stopLocationService(); await BackgroundLocationService.stopLocationService();
SharedpreferencesService().clearPreferences(); SharedpreferencesService().clearPreferences();
Navigator.push(context, Navigator.push(context,
......
...@@ -32,6 +32,12 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier { ...@@ -32,6 +32,12 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier {
final GlobalKey webViewKey = GlobalKey(); final GlobalKey webViewKey = GlobalKey();
var dl = DownloadManager(); var dl = DownloadManager();
TextEditingController sourceSearchController = TextEditingController();
TextEditingController referenceSearchController = TextEditingController();
TextEditingController teamSearchController = TextEditingController();
TextEditingController segmentSearchController = TextEditingController();
TextEditingController productSearchController = TextEditingController();
TextEditingController addProductPriceController = TextEditingController(); TextEditingController addProductPriceController = TextEditingController();
TextEditingController addQuantityController = TextEditingController(); TextEditingController addQuantityController = TextEditingController();
TextEditingController addTotalAmountController = TextEditingController(); TextEditingController addTotalAmountController = TextEditingController();
...@@ -708,6 +714,10 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier { ...@@ -708,6 +714,10 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier {
void resetForm() { void resetForm() {
checkDropdownReset(); checkDropdownReset();
_productRows.clear(); _productRows.clear();
sourceSearchController.clear();
referenceSearchController.clear();
teamSearchController.clear();
segmentSearchController.clear();
addProductPriceController.clear(); addProductPriceController.clear();
addQuantityController.clear(); addQuantityController.clear();
addTotalAmountController.clear(); addTotalAmountController.clear();
......
...@@ -524,7 +524,7 @@ class crmLeadDetailsProvider extends ChangeNotifier { ...@@ -524,7 +524,7 @@ class crmLeadDetailsProvider extends ChangeNotifier {
context: context, context: context,
builder: builder:
(BuildContext context) => Container( (BuildContext context) => Container(
height: 216, height: 250,
padding: const EdgeInsets.only(top: 6.0), padding: const EdgeInsets.only(top: 6.0),
margin: EdgeInsets.only( margin: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom, bottom: MediaQuery.of(context).viewInsets.bottom,
...@@ -635,7 +635,7 @@ class crmLeadDetailsProvider extends ChangeNotifier { ...@@ -635,7 +635,7 @@ class crmLeadDetailsProvider extends ChangeNotifier {
// } // }
String raw = data.map((row) => row.join('\t')).join('\n'); String raw = data.map((row) => row.join('\t')).join('\n');
print('Clipboard data: $raw'); print('Clipboard data: $raw');
await Clipboard.setData(ClipboardData(text: raw)); await Clipboard.setData(ClipboardData(text: leadDetails.copyMessage!));
ScaffoldMessenger.of( ScaffoldMessenger.of(
context, context,
).showSnackBar(SnackBar(content: Text("Copied to Clipboard"))); ).showSnackBar(SnackBar(content: Text("Copied to Clipboard")));
......
...@@ -9,6 +9,7 @@ import '../../services/api_calling.dart'; ...@@ -9,6 +9,7 @@ import '../../services/api_calling.dart';
import '../HomeScreenNotifier.dart'; import '../HomeScreenNotifier.dart';
class crmProspectDetailsProvider extends ChangeNotifier { class crmProspectDetailsProvider extends ChangeNotifier {
bool _addContactSelected = false;
List<Leads> _leadsList = []; List<Leads> _leadsList = [];
List<Contacts> _contactsList = []; List<Contacts> _contactsList = [];
List<Orders> _ordersList = []; List<Orders> _ordersList = [];
...@@ -21,6 +22,13 @@ class crmProspectDetailsProvider extends ChangeNotifier { ...@@ -21,6 +22,13 @@ class crmProspectDetailsProvider extends ChangeNotifier {
bool _showMoreDetails = false; bool _showMoreDetails = false;
bool get addContactSelected => _addContactSelected;
set addContactSelected(bool value){
_addContactSelected = value;
notifyListeners();
}
TextEditingController nameController = TextEditingController(); TextEditingController nameController = TextEditingController();
TextEditingController designationController = TextEditingController(); TextEditingController designationController = TextEditingController();
TextEditingController mobileNumberController = TextEditingController(); TextEditingController mobileNumberController = TextEditingController();
...@@ -336,6 +344,7 @@ class crmProspectDetailsProvider extends ChangeNotifier { ...@@ -336,6 +344,7 @@ class crmProspectDetailsProvider extends ChangeNotifier {
if (data != null) { if (data != null) {
if (data.error == "0") { if (data.error == "0") {
Navigator.pop(context, true); Navigator.pop(context, true);
_addContactSelected = false;
resetAll(); resetAll();
_isLoading = false; _isLoading = false;
notifyListeners(); notifyListeners();
...@@ -381,6 +390,7 @@ class crmProspectDetailsProvider extends ChangeNotifier { ...@@ -381,6 +390,7 @@ class crmProspectDetailsProvider extends ChangeNotifier {
if (data != null) { if (data != null) {
if (data.error == "0") { if (data.error == "0") {
_isLoading = false; _isLoading = false;
_addContactSelected = false;
Navigator.pop(context, true); Navigator.pop(context, true);
resetAll(); resetAll();
_isLoading = false; _isLoading = false;
...@@ -404,7 +414,7 @@ class crmProspectDetailsProvider extends ChangeNotifier { ...@@ -404,7 +414,7 @@ class crmProspectDetailsProvider extends ChangeNotifier {
context: context, context: context,
builder: builder:
(BuildContext context) => Container( (BuildContext context) => Container(
height: 216, height: 250,
padding: const EdgeInsets.only(top: 6.0), padding: const EdgeInsets.only(top: 6.0),
margin: EdgeInsets.only( margin: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom, bottom: MediaQuery.of(context).viewInsets.bottom,
......
...@@ -133,6 +133,11 @@ import '../../screens/LoginScreen.dart'; ...@@ -133,6 +133,11 @@ import '../../screens/LoginScreen.dart';
import 'crmLeadDetailsProvider.dart'; import 'crmLeadDetailsProvider.dart';
class Editproductlistprovider extends ChangeNotifier { class Editproductlistprovider extends ChangeNotifier {
bool _editProductDetailsClicked = false;
bool _editContactDetailsClicked = false;
bool _followupDetailsClicked = false;
bool _appointmentDetailsClicked = false;
bool _quotationDetailsClicked = false;
TextEditingController addEditProductPriceController = TextEditingController(); TextEditingController addEditProductPriceController = TextEditingController();
TextEditingController addEditQuantityController = TextEditingController(); TextEditingController addEditQuantityController = TextEditingController();
TextEditingController addEditTotalAmountController = TextEditingController(); TextEditingController addEditTotalAmountController = TextEditingController();
...@@ -151,6 +156,15 @@ class Editproductlistprovider extends ChangeNotifier { ...@@ -151,6 +156,15 @@ class Editproductlistprovider extends ChangeNotifier {
String? qtyError; String? qtyError;
String? priceError; String? priceError;
String? productError; String? productError;
bool get editProductDetailsClicked => _editProductDetailsClicked;
bool get editContactDetailsClicked => _editContactDetailsClicked;
bool get followupDetailsClicked => _followupDetailsClicked;
bool get appointmentDetailsClicked => _appointmentDetailsClicked;
bool get quotationDetailsClicked => _quotationDetailsClicked;
List<Products> get productsList => _productsList; List<Products> get productsList => _productsList;
List<LeadProducts> get leadProductsList => _leadProductsList; List<LeadProducts> get leadProductsList => _leadProductsList;
...@@ -169,6 +183,30 @@ class Editproductlistprovider extends ChangeNotifier { ...@@ -169,6 +183,30 @@ class Editproductlistprovider extends ChangeNotifier {
bool get submitLoading => _submitLoading; bool get submitLoading => _submitLoading;
set editProductDetailsClicked(bool value){
_editProductDetailsClicked = value;
notifyListeners();
}
set editContactDetailsClicked(bool value){
_editContactDetailsClicked = value;
notifyListeners();
}
set followupDetailsClicked(bool value){
_followupDetailsClicked = value;
notifyListeners();
}
set appointmentDetailsClicked(bool value){
_appointmentDetailsClicked = value;
notifyListeners();
}
set quotationDetailsClicked(bool value){
_quotationDetailsClicked = value;
notifyListeners();
}
set selectedProducts(Products? value) { set selectedProducts(Products? value) {
_selectedProducts = value; _selectedProducts = value;
_selectedAddEditProductId = value!.id!; _selectedAddEditProductId = value!.id!;
...@@ -438,6 +476,11 @@ class Editproductlistprovider extends ChangeNotifier { ...@@ -438,6 +476,11 @@ class Editproductlistprovider extends ChangeNotifier {
void resetForm() { void resetForm() {
checkDropdownReset(); checkDropdownReset();
_editProductDetailsClicked = false;
_editContactDetailsClicked = false;
_followupDetailsClicked = false;
_appointmentDetailsClicked = false;
_quotationDetailsClicked = false;
addEditProductPriceController.clear(); addEditProductPriceController.clear();
addEditQuantityController.clear(); addEditQuantityController.clear();
addEditTotalAmountController.clear(); addEditTotalAmountController.clear();
......
...@@ -339,7 +339,7 @@ class followUpUpdateProvider extends ChangeNotifier { ...@@ -339,7 +339,7 @@ class followUpUpdateProvider extends ChangeNotifier {
context: context, context: context,
builder: builder:
(BuildContext context) => Container( (BuildContext context) => Container(
height: 216, height: 250,
padding: const EdgeInsets.only(top: 6.0), padding: const EdgeInsets.only(top: 6.0),
margin: EdgeInsets.only( margin: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom, bottom: MediaQuery.of(context).viewInsets.bottom,
......
...@@ -665,7 +665,7 @@ class Requestionlistprovider extends ChangeNotifier { ...@@ -665,7 +665,7 @@ class Requestionlistprovider extends ChangeNotifier {
context: context, context: context,
builder: builder:
(BuildContext context) => Container( (BuildContext context) => Container(
height: 216, height: 250,
padding: const EdgeInsets.only(top: 6.0), padding: const EdgeInsets.only(top: 6.0),
margin: EdgeInsets.only( margin: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom, bottom: MediaQuery.of(context).viewInsets.bottom,
......
...@@ -947,7 +947,7 @@ class Paymentreceiptsprovider extends ChangeNotifier { ...@@ -947,7 +947,7 @@ class Paymentreceiptsprovider extends ChangeNotifier {
context: context, context: context,
builder: builder:
(BuildContext context) => Container( (BuildContext context) => Container(
height: 216, height: 250,
padding: const EdgeInsets.only(top: 6.0), padding: const EdgeInsets.only(top: 6.0),
margin: EdgeInsets.only( margin: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom, bottom: MediaQuery.of(context).viewInsets.bottom,
......
...@@ -1874,7 +1874,7 @@ String? productsEmptyError ; ...@@ -1874,7 +1874,7 @@ String? productsEmptyError ;
context: context, context: context,
builder: builder:
(BuildContext context) => Container( (BuildContext context) => Container(
height: 216, height: 250,
padding: const EdgeInsets.only(top: 6.0), padding: const EdgeInsets.only(top: 6.0),
margin: EdgeInsets.only( margin: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom, bottom: MediaQuery.of(context).viewInsets.bottom,
......
...@@ -596,7 +596,7 @@ class Addpaymentprovider extends ChangeNotifier{ ...@@ -596,7 +596,7 @@ class Addpaymentprovider extends ChangeNotifier{
context: context, context: context,
builder: builder:
(BuildContext context) => Container( (BuildContext context) => Container(
height: 216, height: 250,
padding: const EdgeInsets.only(top: 6.0), padding: const EdgeInsets.only(top: 6.0),
margin: EdgeInsets.only( margin: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom, bottom: MediaQuery.of(context).viewInsets.bottom,
......
...@@ -140,6 +140,7 @@ PreferredSizeWidget appbar2New(BuildContext context, title, reset, widget,int co ...@@ -140,6 +140,7 @@ PreferredSizeWidget appbar2New(BuildContext context, title, reset, widget,int co
children: [ children: [
InkResponse( InkResponse(
onTap: () { onTap: () {
HapticFeedback.selectionClick();
reset(); reset();
Navigator.pop(context, true); Navigator.pop(context, true);
}, },
...@@ -150,6 +151,7 @@ PreferredSizeWidget appbar2New(BuildContext context, title, reset, widget,int co ...@@ -150,6 +151,7 @@ PreferredSizeWidget appbar2New(BuildContext context, title, reset, widget,int co
flex: 4, flex: 4,
child: InkResponse( child: InkResponse(
onTap: () { onTap: () {
HapticFeedback.selectionClick();
reset(); reset();
Navigator.pop(context, true); Navigator.pop(context, true);
}, },
......
...@@ -229,6 +229,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -229,6 +229,7 @@ class _MyHomePageState extends State<MyHomePage> {
flex: 4, flex: 4,
child: InkResponse( child: InkResponse(
onTap: () { onTap: () {
HapticFeedback.selectionClick();
_showProfileBottomSheet( _showProfileBottomSheet(
context, context,
); );
...@@ -585,6 +586,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -585,6 +586,7 @@ class _MyHomePageState extends State<MyHomePage> {
return Expanded( return Expanded(
child: InkResponse( child: InkResponse(
onTap: () async { onTap: () async {
HapticFeedback.selectionClick();
var res; var res;
switch (filteredItems[ic]['name']) { switch (filteredItems[ic]['name']) {
case "Attendance": case "Attendance":
...@@ -738,6 +740,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -738,6 +740,7 @@ class _MyHomePageState extends State<MyHomePage> {
), ),
InkResponse( InkResponse(
onTap: () async { onTap: () async {
HapticFeedback.selectionClick();
var res = await Navigator.push( var res = await Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
...@@ -848,6 +851,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -848,6 +851,7 @@ class _MyHomePageState extends State<MyHomePage> {
itemBuilder: (context, ci) { itemBuilder: (context, ci) {
return InkResponse( return InkResponse(
onTap: () async { onTap: () async {
HapticFeedback.selectionClick();
var res; var res;
switch (filteredItems[ci]['name']) { switch (filteredItems[ci]['name']) {
case "Attendance": case "Attendance":
...@@ -1267,6 +1271,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -1267,6 +1271,7 @@ class _MyHomePageState extends State<MyHomePage> {
itemBuilder: (context, ci) { itemBuilder: (context, ci) {
return InkResponse( return InkResponse(
onTap: () async { onTap: () async {
HapticFeedback.selectionClick();
var res; var res;
switch (coreFilteredItems[ci]['name']) { switch (coreFilteredItems[ci]['name']) {
case "Gen Tracker": case "Gen Tracker":
...@@ -1709,6 +1714,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -1709,6 +1714,7 @@ class _MyHomePageState extends State<MyHomePage> {
Spacer(), Spacer(),
InkResponse( InkResponse(
onTap: () { onTap: () {
HapticFeedback.selectionClick();
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
...@@ -1867,6 +1873,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -1867,6 +1873,7 @@ class _MyHomePageState extends State<MyHomePage> {
SizedBox(height: 10), SizedBox(height: 10),
InkWell( InkWell(
onTap: () { onTap: () {
HapticFeedback.selectionClick();
// LoginApiFunction(); // LoginApiFunction();
var f = FocusScope.of(context); var f = FocusScope.of(context);
...@@ -1969,9 +1976,10 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -1969,9 +1976,10 @@ class _MyHomePageState extends State<MyHomePage> {
), ),
SizedBox(height: 20), SizedBox(height: 20),
InkWell( InkWell(
onTap: () { onTap:logout.logoutButtonClicked?null: () {
HapticFeedback.selectionClick();
// LoginApiFunction(); // LoginApiFunction();
logout.logoutButtonClicked = true;
var f = FocusScope.of(context); var f = FocusScope.of(context);
if (!f.hasPrimaryFocus) { if (!f.hasPrimaryFocus) {
...@@ -2008,6 +2016,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -2008,6 +2016,7 @@ class _MyHomePageState extends State<MyHomePage> {
InkWell( InkWell(
onTap: () { onTap: () {
HapticFeedback.selectionClick();
// LoginApiFunction(); // LoginApiFunction();
var f = FocusScope.of(context); var f = FocusScope.of(context);
......
...@@ -174,6 +174,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -174,6 +174,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
children: [ children: [
InkResponse( InkResponse(
onTap: () { onTap: () {
HapticFeedback.selectionClick();
provider.resetAll(); provider.resetAll();
editProvider.resetForm(); editProvider.resetForm();
Navigator.pop(context, true); Navigator.pop(context, true);
...@@ -188,6 +189,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -188,6 +189,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
flex: 4, flex: 4,
child: InkResponse( child: InkResponse(
onTap: () { onTap: () {
HapticFeedback.selectionClick();
provider.resetAll(); provider.resetAll();
editProvider.resetForm(); editProvider.resetForm();
Navigator.pop(context, true); Navigator.pop(context, true);
...@@ -285,6 +287,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -285,6 +287,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
flex: 1, flex: 1,
child: InkResponse( child: InkResponse(
onTap: () async { onTap: () async {
HapticFeedback.selectionClick();
var res = await Navigator.push( var res = await Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
...@@ -326,6 +329,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -326,6 +329,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
flex: 1, flex: 1,
child: InkResponse( child: InkResponse(
onTap: () async { onTap: () async {
HapticFeedback.mediumImpact();
provider.copyToClipboard(context); provider.copyToClipboard(context);
}, },
child: Container( child: Container(
...@@ -677,6 +681,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -677,6 +681,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
InkResponse( InkResponse(
onTap: () async { onTap: () async {
HapticFeedback.selectionClick();
provider.showMoreDetails = provider.showMoreDetails =
!provider.showMoreDetails; !provider.showMoreDetails;
}, },
...@@ -747,7 +752,9 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -747,7 +752,9 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
if (productsNotEmpty) ...[ if (productsNotEmpty) ...[
Expanded( Expanded(
child: InkResponse( child: InkResponse(
onTap: () async { onTap:editProvider.editProductDetailsClicked?null: () async {
HapticFeedback.selectionClick();
editProvider.editProductDetailsClicked = true;
editProvider.resetForm(); editProvider.resetForm();
await editProvider await editProvider
.crmLeadDetailsEditProductsViewAPIFunction( .crmLeadDetailsEditProductsViewAPIFunction(
...@@ -794,7 +801,12 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -794,7 +801,12 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
itemCount: provider.leadProducts.length, itemCount: provider.leadProducts.length,
itemBuilder: (context, lp) { itemBuilder: (context, lp) {
return InkResponse( return InkResponse(
onTap: () async {
onTap:
editProvider.editProductDetailsClicked
? null : () async {
// var res = await Navigator.push( // var res = await Navigator.push(
// context, // context,
// MaterialPageRoute( // MaterialPageRoute(
...@@ -804,6 +816,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -804,6 +816,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
// ), // ),
// ), // ),
// ); // );
editProvider.editProductDetailsClicked = true;
await editProvider await editProvider
.crmLeadDetailsEditProductsViewAPIFunction( .crmLeadDetailsEditProductsViewAPIFunction(
context, context,
...@@ -978,7 +991,9 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -978,7 +991,9 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
), ),
] else ...[ ] else ...[
InkResponse( InkResponse(
onTap: () async { onTap:editProvider.editProductDetailsClicked?null: () async {
HapticFeedback.selectionClick();
editProvider.editProductDetailsClicked = true;
editProvider.resetForm(); editProvider.resetForm();
await editProvider await editProvider
.crmLeadDetailsEditProductsViewAPIFunction( .crmLeadDetailsEditProductsViewAPIFunction(
...@@ -1040,7 +1055,8 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -1040,7 +1055,8 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
if (contactsNotEmpty) ...[ if (contactsNotEmpty) ...[
Expanded( Expanded(
child: InkResponse( child: InkResponse(
onTap: () { onTap: editProvider.editContactDetailsClicked?null: () {HapticFeedback.selectionClick();
editProvider.editContactDetailsClicked = true;
_showAddContactSheet(context); _showAddContactSheet(context);
}, },
child: Padding( child: Padding(
...@@ -1072,7 +1088,8 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -1072,7 +1088,8 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
itemCount: provider.contactDetails.length, itemCount: provider.contactDetails.length,
itemBuilder: (context, lp) { itemBuilder: (context, lp) {
return InkResponse( return InkResponse(
onTap: () async { onTap:editProvider.editContactDetailsClicked?null: () async {HapticFeedback.selectionClick();
editProvider.editContactDetailsClicked = true;
provider.editNameController.text = provider.editNameController.text =
provider.contactDetails[lp].name ?? provider.contactDetails[lp].name ??
""; "";
...@@ -1152,7 +1169,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -1152,7 +1169,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
Expanded( Expanded(
flex: 2, flex: 2,
child: InkResponse( child: InkResponse(
onTap: () { onTap: () {HapticFeedback.selectionClick();
launch( launch(
'tel://${provider.contactDetails[lp].mob1}', 'tel://${provider.contactDetails[lp].mob1}',
); );
...@@ -1206,7 +1223,8 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -1206,7 +1223,8 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
), ),
] else ...[ ] else ...[
InkResponse( InkResponse(
onTap: () async { onTap:editProvider.editContactDetailsClicked?null: () async {HapticFeedback.selectionClick();
editProvider.editContactDetailsClicked = true;
_showAddContactSheet(context); _showAddContactSheet(context);
}, },
child: Container( child: Container(
...@@ -1257,7 +1275,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -1257,7 +1275,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
if (followupNotEmpty) ...[ if (followupNotEmpty) ...[
Expanded( Expanded(
child: InkResponse( child: InkResponse(
onTap: () async { onTap: () async {HapticFeedback.selectionClick();
var res = await Navigator.push( var res = await Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
...@@ -1611,7 +1629,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -1611,7 +1629,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
), ),
] else ...[ ] else ...[
InkResponse( InkResponse(
onTap: () async { onTap: () async {HapticFeedback.selectionClick();
var res = await Navigator.push( var res = await Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
...@@ -1674,7 +1692,8 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -1674,7 +1692,8 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
if (appointmentNotEmpty) ...[ if (appointmentNotEmpty) ...[
Expanded( Expanded(
child: InkResponse( child: InkResponse(
onTap: () { onTap:editProvider.appointmentDetailsClicked?null: () {HapticFeedback.selectionClick();
editProvider.appointmentDetailsClicked = true;
_showAddAppointmentSheet(context); _showAddAppointmentSheet(context);
}, },
child: Padding( child: Padding(
...@@ -2006,7 +2025,8 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -2006,7 +2025,8 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
), ),
] else ...[ ] else ...[
InkResponse( InkResponse(
onTap: () { onTap: editProvider.appointmentDetailsClicked?null:() {HapticFeedback.selectionClick();
editProvider.appointmentDetailsClicked = true;
_showAddAppointmentSheet(context); _showAddAppointmentSheet(context);
}, },
child: Container( child: Container(
...@@ -2335,7 +2355,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -2335,7 +2355,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
), ),
] else ...[ ] else ...[
InkResponse( InkResponse(
onTap: () async { onTap: () async {HapticFeedback.selectionClick();
var res = await Navigator.push( var res = await Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
...@@ -2401,8 +2421,9 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -2401,8 +2421,9 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
return StatefulBuilder( return StatefulBuilder(
builder: (context, setState) { builder: (context, setState) {
return SafeArea( return SafeArea(
child: Consumer<crmLeadDetailsProvider>( child: Consumer2<crmLeadDetailsProvider,Editproductlistprovider>(
builder: (context, provider, child) { builder: (context, provider,editProvider, child) {
editProvider.appointmentDetailsClicked = false;
return Container( return Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
bottom: 15, bottom: 15,
...@@ -2431,7 +2452,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -2431,7 +2452,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
), ),
TextWidget(context, "Appointment Date"), TextWidget(context, "Appointment Date"),
GestureDetector( GestureDetector(
onTap: () { onTap: () {HapticFeedback.selectionClick();
provider.showDatePickerDialog(context); provider.showDatePickerDialog(context);
}, },
child: Row( child: Row(
...@@ -2551,7 +2572,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -2551,7 +2572,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
onTap: onTap:
provider.isLoading provider.isLoading
? null ? null
: () { : () {HapticFeedback.selectionClick();
provider.isLoading = true; provider.isLoading = true;
provider provider
.crmLeadDetailsAddAppointmentAPIFunction( .crmLeadDetailsAddAppointmentAPIFunction(
...@@ -2601,7 +2622,11 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -2601,7 +2622,11 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
context, context,
listen: false, listen: false,
); );
final editProvider = Provider.of<Editproductlistprovider>(
context,
listen: false,
);
editProvider.appointmentDetailsClicked = false;
provider.crmLeadDetailsAPIFunction(context, widget.leadId, widget.mode); provider.crmLeadDetailsAPIFunction(context, widget.leadId, widget.mode);
}); });
}); });
...@@ -2620,8 +2645,9 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -2620,8 +2645,9 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
return StatefulBuilder( return StatefulBuilder(
builder: (context, setState) { builder: (context, setState) {
return SafeArea( return SafeArea(
child: Consumer<crmLeadDetailsProvider>( child: Consumer2<crmLeadDetailsProvider,Editproductlistprovider>(
builder: (context, provider, child) { builder: (context, provider,editProvider, child) {
editProvider.editContactDetailsClicked = false;
return Container( return Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
bottom: 15, bottom: 15,
...@@ -2749,7 +2775,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -2749,7 +2775,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
onTap: onTap:
provider.isLoading provider.isLoading
? null ? null
: () { : () {HapticFeedback.selectionClick();
provider.isLoading = true; provider.isLoading = true;
provider provider
.crmLeadDetailsAddContactAPIFunction( .crmLeadDetailsAddContactAPIFunction(
...@@ -2802,7 +2828,11 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -2802,7 +2828,11 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
context, context,
listen: false, listen: false,
); );
final editProvider = Provider.of<Editproductlistprovider>(
context,
listen: false,
);
editProvider.editContactDetailsClicked = false;
provider.crmLeadDetailsAPIFunction(context, widget.leadId, widget.mode); provider.crmLeadDetailsAPIFunction(context, widget.leadId, widget.mode);
}); });
}); });
...@@ -2820,9 +2850,11 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -2820,9 +2850,11 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
builder: (context) { builder: (context) {
return StatefulBuilder( return StatefulBuilder(
builder: (context, setState) { builder: (context, setState) {
return SafeArea( return SafeArea(
child: Consumer<crmLeadDetailsProvider>( child: Consumer2<crmLeadDetailsProvider,Editproductlistprovider>(
builder: (context, provider, child) { builder: (context, provider,editProvider, child) {
editProvider.editContactDetailsClicked = false;
return Container( return Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
bottom: 15, bottom: 15,
...@@ -2952,7 +2984,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -2952,7 +2984,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
onTap: onTap:
provider.isLoading provider.isLoading
? null ? null
: () { : () {HapticFeedback.selectionClick();
provider.isLoading = true; provider.isLoading = true;
provider provider
.crmLeadDetailsEditContactAPIFunction( .crmLeadDetailsEditContactAPIFunction(
...@@ -3005,6 +3037,11 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -3005,6 +3037,11 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
context, context,
listen: false, listen: false,
); );
final editprovider = Provider.of<Editproductlistprovider>(
context,
listen: false,
);
editprovider.editContactDetailsClicked = false;
provider.crmLeadDetailsAPIFunction(context, widget.leadId, widget.mode); provider.crmLeadDetailsAPIFunction(context, widget.leadId, widget.mode);
}); });
}); });
...@@ -3060,7 +3097,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -3060,7 +3097,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
...List.generate(assetnames.length, (index) { ...List.generate(assetnames.length, (index) {
return ListTile( return ListTile(
onTap: () { onTap: () {HapticFeedback.selectionClick();
Navigator.pop(context, true); Navigator.pop(context, true);
switch (index) { switch (index) {
case 0: case 0:
...@@ -3166,6 +3203,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -3166,6 +3203,7 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
child: Consumer2<crmLeadDetailsProvider, Editproductlistprovider>( child: Consumer2<crmLeadDetailsProvider, Editproductlistprovider>(
builder: (context, provider, editProvider, child) { builder: (context, provider, editProvider, child) {
void updatedAmountfun(value) { void updatedAmountfun(value) {
editProvider.editProductDetailsClicked = false;
final price = final price =
double.tryParse( double.tryParse(
editProvider.addEditProductPriceController.text, editProvider.addEditProductPriceController.text,
...@@ -3411,7 +3449,11 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> { ...@@ -3411,7 +3449,11 @@ class _LeadDetailsByModeState extends State<LeadDetailsByMode> {
context, context,
listen: false, listen: false,
); );
final editProvider = Provider.of<Editproductlistprovider>(
context,
listen: false,
);
editProvider.editProductDetailsClicked = false;
provider.crmLeadDetailsAPIFunction(context, widget.leadId, widget.mode); provider.crmLeadDetailsAPIFunction(context, widget.leadId, widget.mode);
}); });
}); });
......
...@@ -129,6 +129,7 @@ class _LeadlistbymodeState extends State<Leadlistbymode> { ...@@ -129,6 +129,7 @@ class _LeadlistbymodeState extends State<Leadlistbymode> {
children: [ children: [
InkResponse( InkResponse(
onTap: () async { onTap: () async {
HapticFeedback.selectionClick();
_showFilterSheetNew(context); _showFilterSheetNew(context);
}, },
child: SvgPicture.asset( child: SvgPicture.asset(
...@@ -166,6 +167,7 @@ class _LeadlistbymodeState extends State<Leadlistbymode> { ...@@ -166,6 +167,7 @@ class _LeadlistbymodeState extends State<Leadlistbymode> {
} }
return InkResponse( return InkResponse(
onTap: () async { onTap: () async {
HapticFeedback.selectionClick();
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
...@@ -242,6 +244,7 @@ class _LeadlistbymodeState extends State<Leadlistbymode> { ...@@ -242,6 +244,7 @@ class _LeadlistbymodeState extends State<Leadlistbymode> {
flex: 1, flex: 1,
child: InkResponse( child: InkResponse(
onTap: () { onTap: () {
HapticFeedback.selectionClick();
launch( launch(
'tel://${crmLists[index].mob1}', 'tel://${crmLists[index].mob1}',
); );
...@@ -1258,7 +1261,6 @@ class _LeadlistbymodeState extends State<Leadlistbymode> { ...@@ -1258,7 +1261,6 @@ class _LeadlistbymodeState extends State<Leadlistbymode> {
provider.selectedSourceValue = provider.selectedSourceValue =
source.name!; source.name!;
} else { } else {
provider.selectedSourceId = provider.selectedSourceId =
null; null;
provider.selectedSourceValue = provider.selectedSourceValue =
...@@ -1721,18 +1723,26 @@ class _LeadlistbymodeState extends State<Leadlistbymode> { ...@@ -1721,18 +1723,26 @@ class _LeadlistbymodeState extends State<Leadlistbymode> {
Expanded( Expanded(
child: Text( child: Text(
headings[jj], headings[jj],
textAlign: TextAlign.center, textAlign:
TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontFamily: fontFamily:
"JakartaRegular", "JakartaRegular",
color: AppColors.semi_black, color:
AppColors
.semi_black,
), ),
), ),
), ),
if (_isFilterSelected(provider, jj))...[ if (_isFilterSelected(
provider,
jj,
)) ...[
Container( Container(
margin: EdgeInsets.only(left: 5), margin: EdgeInsets.only(
left: 5,
),
width: 8, width: 8,
height: 8, height: 8,
decoration: BoxDecoration( decoration: BoxDecoration(
...@@ -1740,7 +1750,7 @@ class _LeadlistbymodeState extends State<Leadlistbymode> { ...@@ -1740,7 +1750,7 @@ class _LeadlistbymodeState extends State<Leadlistbymode> {
shape: BoxShape.circle, shape: BoxShape.circle,
), ),
), ),
] ],
], ],
), ),
), ),
...@@ -1791,7 +1801,9 @@ class _LeadlistbymodeState extends State<Leadlistbymode> { ...@@ -1791,7 +1801,9 @@ class _LeadlistbymodeState extends State<Leadlistbymode> {
onChanged: (bool? value) { onChanged: (bool? value) {
setState(() { setState(() {
provider.selectedLeadStatus = provider.selectedLeadStatus =
value == true ? status : null; value == true
? status
: null;
}); });
}, },
contentPadding: contentPadding:
...@@ -1829,7 +1841,9 @@ class _LeadlistbymodeState extends State<Leadlistbymode> { ...@@ -1829,7 +1841,9 @@ class _LeadlistbymodeState extends State<Leadlistbymode> {
onChanged: (bool? value) { onChanged: (bool? value) {
setState(() { setState(() {
provider.selectedOpenStatus = provider.selectedOpenStatus =
value == true ? status : null; value == true
? status
: null;
}); });
}, },
contentPadding: contentPadding:
...@@ -1894,7 +1908,8 @@ class _LeadlistbymodeState extends State<Leadlistbymode> { ...@@ -1894,7 +1908,8 @@ class _LeadlistbymodeState extends State<Leadlistbymode> {
), ),
), ),
value: value:
provider.selectedSource == provider
.selectedSource ==
source, source,
onChanged: (bool? value) { onChanged: (bool? value) {
setState(() { setState(() {
...@@ -1904,7 +1919,8 @@ class _LeadlistbymodeState extends State<Leadlistbymode> { ...@@ -1904,7 +1919,8 @@ class _LeadlistbymodeState extends State<Leadlistbymode> {
} else { } else {
provider.selectedSource = provider.selectedSource =
null; null;
provider.referencesList provider
.referencesList
.clear(); .clear();
provider.selectedReference = provider.selectedReference =
null; null;
...@@ -1913,8 +1929,7 @@ class _LeadlistbymodeState extends State<Leadlistbymode> { ...@@ -1913,8 +1929,7 @@ class _LeadlistbymodeState extends State<Leadlistbymode> {
provider.selectedReferenceValue = provider.selectedReferenceValue =
null; null;
} }
provider provider.crmLeadListSourceOnReferenceAPIFunction(
.crmLeadListSourceOnReferenceAPIFunction(
context, context,
widget.mode, widget.mode,
provider provider
......
...@@ -403,6 +403,7 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> { ...@@ -403,6 +403,7 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> {
flex: 1, flex: 1,
child: InkResponse( child: InkResponse(
onTap: () async { onTap: () async {
HapticFeedback.selectionClick();
_showTransferAccountSheet( _showTransferAccountSheet(
context, context,
provider.accountDetails.id!, provider.accountDetails.id!,
...@@ -424,6 +425,7 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> { ...@@ -424,6 +425,7 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> {
flex: 1, flex: 1,
child: InkResponse( child: InkResponse(
onTap: () async { onTap: () async {
HapticFeedback.selectionClick();
editProvider.checkDropDownValues(); editProvider.checkDropDownValues();
prefill(); prefill();
await _showEditAccountSheet( await _showEditAccountSheet(
...@@ -669,9 +671,7 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> { ...@@ -669,9 +671,7 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> {
), ),
), ),
Expanded( Expanded(
child: InkResponse( child: subHeadings4[j] == "Lead Age"
child:
subHeadings4[j] == "Lead Age"
? Tooltip( ? Tooltip(
triggerMode: triggerMode:
TooltipTriggerMode TooltipTriggerMode
...@@ -709,7 +709,6 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> { ...@@ -709,7 +709,6 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> {
), ),
), ),
), ),
),
], ],
), ),
); );
...@@ -720,6 +719,7 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> { ...@@ -720,6 +719,7 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> {
InkResponse( InkResponse(
onTap: () async { onTap: () async {
HapticFeedback.selectionClick();
provider.showMoreDetails = provider.showMoreDetails =
!provider.showMoreDetails; !provider.showMoreDetails;
}, },
...@@ -786,6 +786,7 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> { ...@@ -786,6 +786,7 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> {
Expanded( Expanded(
child: InkResponse( child: InkResponse(
onTap: () async { onTap: () async {
HapticFeedback.selectionClick();
await addleadProvider await addleadProvider
.crmProspectDetailsAddLeadsViewAPIFunction( .crmProspectDetailsAddLeadsViewAPIFunction(
context, context,
...@@ -823,6 +824,7 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> { ...@@ -823,6 +824,7 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> {
itemBuilder: (context, index) { itemBuilder: (context, index) {
return InkResponse( return InkResponse(
onTap: () async { onTap: () async {
HapticFeedback.selectionClick();
var res = await Navigator.push( var res = await Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
...@@ -1092,6 +1094,7 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> { ...@@ -1092,6 +1094,7 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> {
] else ...[ ] else ...[
InkResponse( InkResponse(
onTap: () async { onTap: () async {
HapticFeedback.selectionClick();
await addleadProvider await addleadProvider
.crmProspectDetailsAddLeadsViewAPIFunction( .crmProspectDetailsAddLeadsViewAPIFunction(
context, context,
...@@ -1143,7 +1146,9 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> { ...@@ -1143,7 +1146,9 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> {
if (contactNotEmpty) ...[ if (contactNotEmpty) ...[
Expanded( Expanded(
child: InkResponse( child: InkResponse(
onTap: () { onTap:provider.addContactSelected?null: () {
HapticFeedback.selectionClick();
provider.addContactSelected = true;
_showAddContactSheet( _showAddContactSheet(
context, context,
provider.accountDetails.id!, provider.accountDetails.id!,
...@@ -1178,7 +1183,9 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> { ...@@ -1178,7 +1183,9 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> {
itemCount: provider.contactList.length, itemCount: provider.contactList.length,
itemBuilder: (context, lp) { itemBuilder: (context, lp) {
return InkResponse( return InkResponse(
onTap: () async { onTap:provider.addContactSelected?null: () async {
provider.addContactSelected = true;
HapticFeedback.selectionClick();
provider.editNameController.text = provider.editNameController.text =
provider.contactList[lp].name ?? ""; provider.contactList[lp].name ?? "";
provider.editDesignationController.text = provider.editDesignationController.text =
...@@ -1300,7 +1307,9 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> { ...@@ -1300,7 +1307,9 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> {
), ),
] else ...[ ] else ...[
InkResponse( InkResponse(
onTap: () { onTap:provider.addContactSelected?null: () {
HapticFeedback.selectionClick();
provider.addContactSelected = true;
_showAddContactSheet( _showAddContactSheet(
context, context,
provider.accountDetails.id!, provider.accountDetails.id!,
...@@ -1899,6 +1908,7 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> { ...@@ -1899,6 +1908,7 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> {
return SafeArea( return SafeArea(
child: Consumer<crmProspectDetailsProvider>( child: Consumer<crmProspectDetailsProvider>(
builder: (context, provider, child) { builder: (context, provider, child) {
provider.addContactSelected = false;
return Container( return Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
bottom: 15, bottom: 15,
...@@ -2082,7 +2092,7 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> { ...@@ -2082,7 +2092,7 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> {
listen: false, listen: false,
); );
editProvider.crmLeadListViewAPIFunction(context, widget.mode); editProvider.crmLeadListViewAPIFunction(context, widget.mode);
provider.addContactSelected = false;
editProvider.crmProspectDetailsEditAccountViewAPIFunction( editProvider.crmProspectDetailsEditAccountViewAPIFunction(
context, context,
widget.leadId, widget.leadId,
...@@ -2107,6 +2117,7 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> { ...@@ -2107,6 +2117,7 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> {
return SafeArea( return SafeArea(
child: Consumer<crmProspectDetailsProvider>( child: Consumer<crmProspectDetailsProvider>(
builder: (context, provider, child) { builder: (context, provider, child) {
provider.addContactSelected = false;
return Container( return Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
bottom: 15, bottom: 15,
...@@ -2293,7 +2304,7 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> { ...@@ -2293,7 +2304,7 @@ class ProspectDetailsByModeState extends State<ProspectDetailsByMode> {
listen: false, listen: false,
); );
editProvider.crmLeadListViewAPIFunction(context, widget.mode); editProvider.crmLeadListViewAPIFunction(context, widget.mode);
provider.addContactSelected = false;
editProvider.crmProspectDetailsEditAccountViewAPIFunction( editProvider.crmProspectDetailsEditAccountViewAPIFunction(
context, context,
widget.leadId, widget.leadId,
......
...@@ -19,6 +19,7 @@ import 'ProspectDetailsByMode.dart'; ...@@ -19,6 +19,7 @@ import 'ProspectDetailsByMode.dart';
class ProspectListByMode extends StatefulWidget { class ProspectListByMode extends StatefulWidget {
final pageTitleName; final pageTitleName;
final mode; final mode;
const ProspectListByMode({super.key, this.pageTitleName, this.mode}); const ProspectListByMode({super.key, this.pageTitleName, this.mode});
@override @override
...@@ -97,6 +98,7 @@ class _ProspectListByModeState extends State<ProspectListByMode> { ...@@ -97,6 +98,7 @@ class _ProspectListByModeState extends State<ProspectListByMode> {
children: [ children: [
InkResponse( InkResponse(
onTap: () async { onTap: () async {
HapticFeedback.selectionClick();
_showFilterSheet(context); _showFilterSheet(context);
}, },
child: SvgPicture.asset( child: SvgPicture.asset(
...@@ -106,7 +108,7 @@ class _ProspectListByModeState extends State<ProspectListByMode> { ...@@ -106,7 +108,7 @@ class _ProspectListByModeState extends State<ProspectListByMode> {
), ),
], ],
), ),
0xFFFFFFFF 0xFFFFFFFF,
), ),
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
body: body:
...@@ -136,18 +138,15 @@ class _ProspectListByModeState extends State<ProspectListByMode> { ...@@ -136,18 +138,15 @@ class _ProspectListByModeState extends State<ProspectListByMode> {
// if(crmLists[index].aid=="1726"){ // if(crmLists[index].aid=="1726"){
return InkResponse( return InkResponse(
onTap: () async { onTap: () async {
HapticFeedback.selectionClick();
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: builder:
(context) => ProspectDetailsByMode( (context) => ProspectDetailsByMode(
pageTitleName: pageTitleName: widget.pageTitleName,
widget.pageTitleName,
mode: widget.mode, mode: widget.mode,
leadId: leadId: provider.accountList[index].aid,
provider
.accountList[index]
.aid,
), ),
), ),
); );
...@@ -199,7 +198,7 @@ class _ProspectListByModeState extends State<ProspectListByMode> { ...@@ -199,7 +198,7 @@ class _ProspectListByModeState extends State<ProspectListByMode> {
), ),
), ),
Text( Text(
crmLists[index].mob1??"-", crmLists[index].mob1 ?? "-",
maxLines: 1, maxLines: 1,
style: TextStyle( style: TextStyle(
fontFamily: "JakartaMedium", fontFamily: "JakartaMedium",
...@@ -216,6 +215,7 @@ class _ProspectListByModeState extends State<ProspectListByMode> { ...@@ -216,6 +215,7 @@ class _ProspectListByModeState extends State<ProspectListByMode> {
flex: 1, flex: 1,
child: InkResponse( child: InkResponse(
onTap: () { onTap: () {
HapticFeedback.selectionClick();
launch( launch(
'tel://${crmLists[index].mob1}', 'tel://${crmLists[index].mob1}',
); );
...@@ -349,21 +349,16 @@ class _ProspectListByModeState extends State<ProspectListByMode> { ...@@ -349,21 +349,16 @@ class _ProspectListByModeState extends State<ProspectListByMode> {
int selectedIndex = isSelected.indexWhere( int selectedIndex = isSelected.indexWhere(
(element) => element == true, (element) => element == true,
); );
List<String> headings = [ List<String> headings = ["Mobile Number", "Company Name"];
"Mobile Number", if (widget.mode != "executive") {
"Company Name",
];
if(widget.mode!="executive"){
headings.add("Employee"); headings.add("Employee");
} }
return Container( return Container(
height: MediaQuery.of(context).size.height * 0.3,
height: MediaQuery.of(context).size.height*0.3,
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Padding( Padding(
padding: EdgeInsets.only(left: 15), padding: EdgeInsets.only(left: 15),
child: Text( child: Text(
...@@ -377,11 +372,13 @@ class _ProspectListByModeState extends State<ProspectListByMode> { ...@@ -377,11 +372,13 @@ class _ProspectListByModeState extends State<ProspectListByMode> {
), ),
const SizedBox(height: 20), const SizedBox(height: 20),
Expanded( Expanded(
flex:4, flex: 4,
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border( border: Border(
top: BorderSide(color: const Color(0xFFA5DAF9)), top: BorderSide(
color: const Color(0xFFA5DAF9),
),
bottom: BorderSide( bottom: BorderSide(
color: const Color(0xFFA5DAF9), color: const Color(0xFFA5DAF9),
), ),
...@@ -393,11 +390,13 @@ class _ProspectListByModeState extends State<ProspectListByMode> { ...@@ -393,11 +390,13 @@ class _ProspectListByModeState extends State<ProspectListByMode> {
Expanded( Expanded(
flex: 3, flex: 3,
child: Column( child: Column(
children: List.generate(headings.length, (jj) { children: List.generate(headings.length, (
jj,
) {
return Expanded( return Expanded(
child: InkResponse( child: InkResponse(
onTap: () { onTap: () {
HapticFeedback.selectionClick();
setState(() { setState(() {
// Reset all to false // Reset all to false
isSelected = List.generate( isSelected = List.generate(
...@@ -409,7 +408,8 @@ class _ProspectListByModeState extends State<ProspectListByMode> { ...@@ -409,7 +408,8 @@ class _ProspectListByModeState extends State<ProspectListByMode> {
}); });
}, },
child: Container( child: Container(
padding: const EdgeInsets.symmetric( padding:
const EdgeInsets.symmetric(
vertical: 7.5, vertical: 7.5,
horizontal: 10, horizontal: 10,
), ),
...@@ -418,12 +418,10 @@ class _ProspectListByModeState extends State<ProspectListByMode> { ...@@ -418,12 +418,10 @@ class _ProspectListByModeState extends State<ProspectListByMode> {
left: left:
isSelected[jj] isSelected[jj]
? BorderSide( ? BorderSide(
color: color:
AppColors AppColors
.app_blue, .app_blue,
width: 5.0, width: 5.0,
) )
: const BorderSide( : const BorderSide(
color: color:
...@@ -451,7 +449,8 @@ class _ProspectListByModeState extends State<ProspectListByMode> { ...@@ -451,7 +449,8 @@ class _ProspectListByModeState extends State<ProspectListByMode> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontFamily: "JakartaRegular", fontFamily:
"JakartaRegular",
color: AppColors.semi_black, color: AppColors.semi_black,
), ),
), ),
...@@ -472,12 +471,12 @@ class _ProspectListByModeState extends State<ProspectListByMode> { ...@@ -472,12 +471,12 @@ class _ProspectListByModeState extends State<ProspectListByMode> {
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.center, CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment:
MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
if (selectedIndex == 0) ...[ if (selectedIndex == 0) ...[
SizedBox(height: 10,), SizedBox(height: 10),
textControllerWidget( textControllerWidget(
context, context,
provider.mobileNumberController, provider.mobileNumberController,
...@@ -490,7 +489,7 @@ class _ProspectListByModeState extends State<ProspectListByMode> { ...@@ -490,7 +489,7 @@ class _ProspectListByModeState extends State<ProspectListByMode> {
.digitsOnly, .digitsOnly,
), ),
] else if (selectedIndex == 1) ...[ ] else if (selectedIndex == 1) ...[
SizedBox(height: 10,), SizedBox(height: 10),
textControllerWidget( textControllerWidget(
context, context,
provider.companyNameController, provider.companyNameController,
...@@ -501,17 +500,23 @@ class _ProspectListByModeState extends State<ProspectListByMode> { ...@@ -501,17 +500,23 @@ class _ProspectListByModeState extends State<ProspectListByMode> {
false, false,
null, null,
), ),
]else if (widget.mode != "executive") ...[ ] else if (widget.mode !=
"executive") ...[
...provider.employeesList.map(( ...provider.employeesList.map((
employee, employee,
) { ) {
return SizedBox( return SizedBox(
height: 35, height: 35,
child: CheckboxListTile( child: CheckboxListTile(
activeColor: AppColors.app_blue, activeColor:
controlAffinity: ListTileControlAffinity.leading, AppColors.app_blue,
controlAffinity:
ListTileControlAffinity
.leading,
checkboxShape: CircleBorder( checkboxShape: CircleBorder(
side: BorderSide(width:0.5 ) side: BorderSide(
width: 0.5,
),
), ),
title: Text( title: Text(
employee.name!, employee.name!,
...@@ -520,7 +525,8 @@ class _ProspectListByModeState extends State<ProspectListByMode> { ...@@ -520,7 +525,8 @@ class _ProspectListByModeState extends State<ProspectListByMode> {
), ),
), ),
value: value:
provider.selectedEmployees == provider
.selectedEmployees ==
employee, employee,
onChanged: (bool? value) { onChanged: (bool? value) {
setState(() { setState(() {
...@@ -532,8 +538,7 @@ class _ProspectListByModeState extends State<ProspectListByMode> { ...@@ -532,8 +538,7 @@ class _ProspectListByModeState extends State<ProspectListByMode> {
provider.selectedEmployeeValue = provider.selectedEmployeeValue =
employee.name!; employee.name!;
} }
provider provider.crmProspectListAPIFunction(
.crmProspectListAPIFunction(
context, context,
widget.mode, widget.mode,
provider provider
...@@ -541,12 +546,12 @@ class _ProspectListByModeState extends State<ProspectListByMode> { ...@@ -541,12 +546,12 @@ class _ProspectListByModeState extends State<ProspectListByMode> {
); );
}); });
}, },
contentPadding: EdgeInsets.zero, contentPadding:
EdgeInsets.zero,
), ),
); );
}).toList(), }).toList(),
] ],
], ],
), ),
), ),
...@@ -562,6 +567,7 @@ class _ProspectListByModeState extends State<ProspectListByMode> { ...@@ -562,6 +567,7 @@ class _ProspectListByModeState extends State<ProspectListByMode> {
), ),
child: InkResponse( child: InkResponse(
onTap: () { onTap: () {
HapticFeedback.selectionClick();
provider.crmProspectListAPIFunction( provider.crmProspectListAPIFunction(
context, context,
widget.mode, widget.mode,
......
...@@ -174,6 +174,55 @@ class _AddleadproductscreenState extends State<Addleadproductscreen> { ...@@ -174,6 +174,55 @@ class _AddleadproductscreenState extends State<Addleadproductscreen> {
value!.id.toString(), value!.id.toString(),
); );
}, },
dropdownSearchData: DropdownSearchData(
searchInnerWidgetHeight: 50,
searchController:
provider
.productSearchController,
searchInnerWidget: Padding(
padding: const EdgeInsets.all(
8,
),
child: TextFormField(
controller:
provider
.productSearchController,
decoration: InputDecoration(
isDense: true,
contentPadding:
const EdgeInsets.symmetric(
horizontal: 10,
vertical: 8,
),
hintText:
'Search Product...',
border: OutlineInputBorder(
borderRadius:
BorderRadius.circular(
8,
),
),
),
),
),
searchMatchFn: (
item,
searchValue,
) {
return item.value?.name
?.toLowerCase()
.contains(
searchValue
.toLowerCase(),
) ??
false;
},
),
onMenuStateChange: (isOpen) {
if (!isOpen) {
provider.productSearchController.clear();
}
},
buttonStyleData: ddtheme.buttonStyleData, buttonStyleData: ddtheme.buttonStyleData,
iconStyleData: ddtheme.iconStyleData, iconStyleData: ddtheme.iconStyleData,
menuItemStyleData: ddtheme.menuItemStyleData, menuItemStyleData: ddtheme.menuItemStyleData,
...@@ -242,7 +291,7 @@ class _AddleadproductscreenState extends State<Addleadproductscreen> { ...@@ -242,7 +291,7 @@ class _AddleadproductscreenState extends State<Addleadproductscreen> {
FloatingActionButtonLocation.centerFloat, FloatingActionButtonLocation.centerFloat,
floatingActionButton: InkWell( floatingActionButton: InkWell(
onTap: () { onTap: () {
HapticFeedback.selectionClick();
if (provider.selectedProducts != null) { if (provider.selectedProducts != null) {
final productData = { final productData = {
......
...@@ -30,6 +30,7 @@ class Addleadsprospectsscreen extends StatefulWidget { ...@@ -30,6 +30,7 @@ class Addleadsprospectsscreen extends StatefulWidget {
class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> { class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> {
Dropdowntheme ddtheme = Dropdowntheme(); Dropdowntheme ddtheme = Dropdowntheme();
List<FocusNode> focusNodes = List.generate(20, (index) => FocusNode());
int _currentStep = 0; int _currentStep = 0;
final _formKey = GlobalKey<FormState>(); final _formKey = GlobalKey<FormState>();
Map _source = {ConnectivityResult.mobile: true}; Map _source = {ConnectivityResult.mobile: true};
...@@ -44,6 +45,7 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> { ...@@ -44,6 +45,7 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> {
_nameController.dispose(); _nameController.dispose();
_emailController.dispose(); _emailController.dispose();
_addressController.dispose(); _addressController.dispose();
focusNodes.map((e) => e.dispose(),);
super.dispose(); super.dispose();
} }
...@@ -290,6 +292,9 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> { ...@@ -290,6 +292,9 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> {
TextInputType.name, TextInputType.name,
false, false,
null, null,
focusNodes[0],
focusNodes[1],
TextInputAction.next
), ),
errorWidget(context, provider.companynameError), errorWidget(context, provider.companynameError),
...@@ -302,6 +307,9 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> { ...@@ -302,6 +307,9 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> {
TextInputType.name, TextInputType.name,
false, false,
null, null,
focusNodes[1],
focusNodes[2],
TextInputAction.next
), ),
errorWidget(context, provider.nameError), errorWidget(context, provider.nameError),
...@@ -314,8 +322,8 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> { ...@@ -314,8 +322,8 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> {
TextInputType.phone, TextInputType.phone,
false, false,
FilteringTextInputFormatter.digitsOnly, FilteringTextInputFormatter.digitsOnly,
null, focusNodes[2],
null, focusNodes[3],
TextInputAction.done, TextInputAction.done,
10, 10,
), ),
...@@ -329,7 +337,10 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> { ...@@ -329,7 +337,10 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> {
provider.onChangemailId, provider.onChangemailId,
TextInputType.emailAddress, TextInputType.emailAddress,
false, false,
null, null,focusNodes[3],
focusNodes[4],
TextInputAction.next,
), ),
errorWidget(context, provider.mailIdError), errorWidget(context, provider.mailIdError),
...@@ -342,6 +353,9 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> { ...@@ -342,6 +353,9 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> {
TextInputType.text, TextInputType.text,
false, false,
null, null,
focusNodes[4],
null,
TextInputAction.done,
), ),
errorWidget(context, provider.designationError), errorWidget(context, provider.designationError),
], ],
...@@ -374,9 +388,9 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> { ...@@ -374,9 +388,9 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> {
TextInputType.phone, TextInputType.phone,
false, false,
FilteringTextInputFormatter.digitsOnly, FilteringTextInputFormatter.digitsOnly,
null, focusNodes[5],
null, focusNodes[6],
TextInputAction.done, TextInputAction.next,
10, 10,
), ),
...@@ -391,6 +405,9 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> { ...@@ -391,6 +405,9 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> {
TextInputType.phone, TextInputType.phone,
false, false,
FilteringTextInputFormatter.digitsOnly, FilteringTextInputFormatter.digitsOnly,
focusNodes[6],
null,
TextInputAction.done,
), ),
errorWidget(context, provider.TelephoneError), errorWidget(context, provider.TelephoneError),
TextWidget(context, "Source"), TextWidget(context, "Source"),
...@@ -448,6 +465,55 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> { ...@@ -448,6 +465,55 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> {
} }
}, },
isExpanded: true, isExpanded: true,
dropdownSearchData: DropdownSearchData(
searchInnerWidgetHeight: 50,
searchController:
provider
.sourceSearchController,
searchInnerWidget: Padding(
padding: const EdgeInsets.all(
8,
),
child: TextFormField(
controller:
provider
.sourceSearchController,
decoration: InputDecoration(
isDense: true,
contentPadding:
const EdgeInsets.symmetric(
horizontal: 10,
vertical: 8,
),
hintText:
'Search Source...',
border: OutlineInputBorder(
borderRadius:
BorderRadius.circular(
8,
),
),
),
),
),
searchMatchFn: (
item,
searchValue,
) {
return item.value?.name
?.toLowerCase()
.contains(
searchValue
.toLowerCase(),
) ??
false;
},
),
onMenuStateChange: (isOpen) {
if (!isOpen) {
provider.sourceSearchController.clear();
}
},
buttonStyleData: ddtheme.buttonStyleData, buttonStyleData: ddtheme.buttonStyleData,
iconStyleData: ddtheme.iconStyleData, iconStyleData: ddtheme.iconStyleData,
menuItemStyleData: menuItemStyleData:
...@@ -505,6 +571,55 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> { ...@@ -505,6 +571,55 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> {
} }
}, },
isExpanded: true, isExpanded: true,
dropdownSearchData: DropdownSearchData(
searchInnerWidgetHeight: 50,
searchController:
provider
.referenceSearchController,
searchInnerWidget: Padding(
padding: const EdgeInsets.all(
8,
),
child: TextFormField(
controller:
provider
.referenceSearchController,
decoration: InputDecoration(
isDense: true,
contentPadding:
const EdgeInsets.symmetric(
horizontal: 10,
vertical: 8,
),
hintText:
'Search Reference...',
border: OutlineInputBorder(
borderRadius:
BorderRadius.circular(
8,
),
),
),
),
),
searchMatchFn: (
item,
searchValue,
) {
return item.value?.name
?.toLowerCase()
.contains(
searchValue
.toLowerCase(),
) ??
false;
},
),
onMenuStateChange: (isOpen) {
if (!isOpen) {
provider.referenceSearchController.clear();
}
},
buttonStyleData: ddtheme.buttonStyleData, buttonStyleData: ddtheme.buttonStyleData,
iconStyleData: ddtheme.iconStyleData, iconStyleData: ddtheme.iconStyleData,
menuItemStyleData: menuItemStyleData:
...@@ -571,6 +686,55 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> { ...@@ -571,6 +686,55 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> {
} }
}, },
isExpanded: true, isExpanded: true,
dropdownSearchData: DropdownSearchData(
searchInnerWidgetHeight: 50,
searchController:
provider
.teamSearchController,
searchInnerWidget: Padding(
padding: const EdgeInsets.all(
8,
),
child: TextFormField(
controller:
provider
.teamSearchController,
decoration: InputDecoration(
isDense: true,
contentPadding:
const EdgeInsets.symmetric(
horizontal: 10,
vertical: 8,
),
hintText:
'Search Team...',
border: OutlineInputBorder(
borderRadius:
BorderRadius.circular(
8,
),
),
),
),
),
searchMatchFn: (
item,
searchValue,
) {
return item.value?.name
?.toLowerCase()
.contains(
searchValue
.toLowerCase(),
) ??
false;
},
),
onMenuStateChange: (isOpen) {
if (!isOpen) {
provider.teamSearchController.clear();
}
},
buttonStyleData: ddtheme.buttonStyleData, buttonStyleData: ddtheme.buttonStyleData,
iconStyleData: ddtheme.iconStyleData, iconStyleData: ddtheme.iconStyleData,
menuItemStyleData: menuItemStyleData:
...@@ -627,6 +791,55 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> { ...@@ -627,6 +791,55 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> {
} }
}, },
isExpanded: true, isExpanded: true,
dropdownSearchData: DropdownSearchData(
searchInnerWidgetHeight: 50,
searchController:
provider
.segmentSearchController,
searchInnerWidget: Padding(
padding: const EdgeInsets.all(
8,
),
child: TextFormField(
controller:
provider
.segmentSearchController,
decoration: InputDecoration(
isDense: true,
contentPadding:
const EdgeInsets.symmetric(
horizontal: 10,
vertical: 8,
),
hintText:
'Search Segment...',
border: OutlineInputBorder(
borderRadius:
BorderRadius.circular(
8,
),
),
),
),
),
searchMatchFn: (
item,
searchValue,
) {
return item.value?.name
?.toLowerCase()
.contains(
searchValue
.toLowerCase(),
) ??
false;
},
),
onMenuStateChange: (isOpen) {
if (!isOpen) {
provider.segmentSearchController.clear();
}
},
buttonStyleData: ddtheme.buttonStyleData, buttonStyleData: ddtheme.buttonStyleData,
iconStyleData: ddtheme.iconStyleData, iconStyleData: ddtheme.iconStyleData,
menuItemStyleData: menuItemStyleData:
...@@ -1251,6 +1464,9 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> { ...@@ -1251,6 +1464,9 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> {
TextInputType.streetAddress, TextInputType.streetAddress,
false, false,
null, null,
focusNodes[7],
null,
TextInputAction.done,
), ),
errorWidget(context, provider.addressError), errorWidget(context, provider.addressError),
...@@ -1303,6 +1519,7 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> { ...@@ -1303,6 +1519,7 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> {
if (_currentStep == 2) ...[ if (_currentStep == 2) ...[
InkResponse( InkResponse(
onTap: () { onTap: () {
HapticFeedback.selectionClick();
if (provider.validateStep3()) { if (provider.validateStep3()) {
if(provider.productRows.isNotEmpty){ if(provider.productRows.isNotEmpty){
provider.crmAddNewLeadsAndProspectsAPIFunction( provider.crmAddNewLeadsAndProspectsAPIFunction(
...@@ -1356,6 +1573,7 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> { ...@@ -1356,6 +1573,7 @@ class _AddleadsprospectsscreenState extends State<Addleadsprospectsscreen> {
] else ...[ ] else ...[
InkResponse( InkResponse(
onTap: () { onTap: () {
HapticFeedback.selectionClick();
setState(() { setState(() {
if (_currentStep == 0) { if (_currentStep == 0) {
if (provider.validateStep1()) { if (provider.validateStep1()) {
......
...@@ -4,6 +4,7 @@ import 'package:connectivity_plus/connectivity_plus.dart'; ...@@ -4,6 +4,7 @@ import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:dotted_line/dotted_line.dart'; import 'package:dotted_line/dotted_line.dart';
import 'package:dropdown_button2/dropdown_button2.dart'; import 'package:dropdown_button2/dropdown_button2.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:generp/Notifiers/crmProvider/appointmentCalendarProvider.dart'; import 'package:generp/Notifiers/crmProvider/appointmentCalendarProvider.dart';
import 'package:generp/Utils/app_colors.dart'; import 'package:generp/Utils/app_colors.dart';
...@@ -222,6 +223,7 @@ class _AppointmentcalendarState extends State<Appointmentcalendar> { ...@@ -222,6 +223,7 @@ class _AppointmentcalendarState extends State<Appointmentcalendar> {
itemBuilder: (context, index) { itemBuilder: (context, index) {
return InkResponse( return InkResponse(
onTap: () async { onTap: () async {
HapticFeedback.selectionClick();
await Navigator.push( await Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
...@@ -309,6 +311,7 @@ class _AppointmentcalendarState extends State<Appointmentcalendar> { ...@@ -309,6 +311,7 @@ class _AppointmentcalendarState extends State<Appointmentcalendar> {
flex: 1, flex: 1,
child: InkResponse( child: InkResponse(
onTap: () { onTap: () {
HapticFeedback.selectionClick();
launch( launch(
'tel://${provider.appointmentList[index].mob1}', 'tel://${provider.appointmentList[index].mob1}',
); );
...@@ -474,6 +477,7 @@ class _AppointmentcalendarState extends State<Appointmentcalendar> { ...@@ -474,6 +477,7 @@ class _AppointmentcalendarState extends State<Appointmentcalendar> {
return InkResponse( return InkResponse(
onTap: () { onTap: () {
HapticFeedback.selectionClick();
final formattedDate = DateFormat('yyyy-MM-dd').format(date); final formattedDate = DateFormat('yyyy-MM-dd').format(date);
print(formattedDate); print(formattedDate);
provider.setSelectedDate(date); provider.setSelectedDate(date);
......
...@@ -103,7 +103,11 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -103,7 +103,11 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
InkResponse( InkResponse(
onTap: () => Navigator.pop(context, true), onTap: () {
HapticFeedback.selectionClick();
Navigator.pop(context, true);
},
child: SvgPicture.asset( child: SvgPicture.asset(
"assets/svg/appbar_back_button.svg", "assets/svg/appbar_back_button.svg",
height: 25, height: 25,
...@@ -111,7 +115,10 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -111,7 +115,10 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
), ),
SizedBox(width: 10), SizedBox(width: 10),
InkResponse( InkResponse(
onTap: () => Navigator.pop(context, true), onTap: () {
HapticFeedback.selectionClick();
Navigator.pop(context, true);
},
child: Text( child: Text(
"CRM", "CRM",
style: TextStyle( style: TextStyle(
...@@ -129,6 +136,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -129,6 +136,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
preferredSize: Size.fromHeight(50), preferredSize: Size.fromHeight(50),
child: InkResponse( child: InkResponse(
onTap: () { onTap: () {
HapticFeedback.selectionClick();
print("Tap"); print("Tap");
Navigator.push( Navigator.push(
context, context,
...@@ -256,6 +264,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -256,6 +264,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
return InkResponse( return InkResponse(
onTap: () async { onTap: () async {
HapticFeedback.selectionClick();
if (provider.allLeads[jndex].filter!.pageName != if (provider.allLeads[jndex].filter!.pageName !=
"") { "") {
if (provider.allLeads[jndex].filter!.pageName! if (provider.allLeads[jndex].filter!.pageName!
...@@ -306,7 +315,9 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -306,7 +315,9 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
await Navigator.push( await Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => Followuplistontype(type: "Visit"), builder:
(context) =>
Followuplistontype(type: "Visit"),
settings: RouteSettings( settings: RouteSettings(
name: "Generatedquoteslist", name: "Generatedquoteslist",
), ),
...@@ -317,7 +328,9 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -317,7 +328,9 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
await Navigator.push( await Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => Followuplistontype(type: "Phone"), builder:
(context) =>
Followuplistontype(type: "Phone"),
settings: RouteSettings( settings: RouteSettings(
name: "Generatedquoteslist", name: "Generatedquoteslist",
), ),
...@@ -487,7 +500,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -487,7 +500,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
// }, // },
// ), // ),
Container( Container(
height: MediaQuery.of(context).size.height * 0.22, height: MediaQuery.of(context).size.height * 0.25,
margin: EdgeInsets.symmetric(horizontal: 10), margin: EdgeInsets.symmetric(horizontal: 10),
child: Row( child: Row(
children: [ children: [
...@@ -495,8 +508,6 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -495,8 +508,6 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
child: Column( child: Column(
children: [ children: [
Expanded( Expanded(
child: InkResponse(
onTap: () {},
child: Container( child: Container(
padding: EdgeInsets.symmetric(horizontal: 5), padding: EdgeInsets.symmetric(horizontal: 5),
decoration: BoxDecoration( decoration: BoxDecoration(
...@@ -509,6 +520,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -509,6 +520,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
flex: 2, flex: 2,
child: InkResponse( child: InkResponse(
onTap: () { onTap: () {
HapticFeedback.selectionClick();
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
...@@ -538,7 +550,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -538,7 +550,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
), ),
), ),
Text( Text(
"Details,\nFollowup", "Appointments,\nFollowups",
// "Product and \nservice orders", // "Product and \nservice orders",
style: TextStyle( style: TextStyle(
color: AppColors.grey_semi, color: AppColors.grey_semi,
...@@ -559,10 +571,8 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -559,10 +571,8 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
), ),
), ),
), ),
),
SizedBox(height: 10), SizedBox(height: 10),
Expanded( Expanded(
child: InkResponse(
child: Container( child: Container(
padding: EdgeInsets.symmetric(horizontal: 5), padding: EdgeInsets.symmetric(horizontal: 5),
decoration: BoxDecoration( decoration: BoxDecoration(
...@@ -575,6 +585,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -575,6 +585,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
flex: 2, flex: 2,
child: InkResponse( child: InkResponse(
onTap: () { onTap: () {
HapticFeedback.selectionClick();
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
...@@ -626,7 +637,6 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -626,7 +637,6 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
), ),
), ),
), ),
),
], ],
), ),
), ),
...@@ -634,6 +644,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -634,6 +644,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
Expanded( Expanded(
child: InkResponse( child: InkResponse(
onTap: () async { onTap: () async {
HapticFeedback.selectionClick();
await Navigator.push( await Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
...@@ -719,6 +730,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -719,6 +730,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
Spacer(), Spacer(),
InkResponse( InkResponse(
onTap: () async { onTap: () async {
HapticFeedback.selectionClick();
await Navigator.push( await Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
...@@ -773,6 +785,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -773,6 +785,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
final longitude = location.lng; final longitude = location.lng;
return InkResponse( return InkResponse(
onTap: () async { onTap: () async {
HapticFeedback.selectionClick();
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
...@@ -835,6 +848,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -835,6 +848,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
Expanded( Expanded(
child: InkResponse( child: InkResponse(
onTap: () async { onTap: () async {
HapticFeedback.selectionClick();
await Navigator.push( await Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
...@@ -884,6 +898,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -884,6 +898,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
SizedBox(height: 10), SizedBox(height: 10),
InkResponse( InkResponse(
onTap: () { onTap: () {
HapticFeedback.selectionClick();
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
...@@ -951,6 +966,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -951,6 +966,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
Spacer(), Spacer(),
InkResponse( InkResponse(
onTap: () async { onTap: () async {
HapticFeedback.selectionClick();
await Navigator.push( await Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
...@@ -1009,6 +1025,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -1009,6 +1025,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
]; ];
return InkResponse( return InkResponse(
onTap: () async { onTap: () async {
HapticFeedback.selectionClick();
await Navigator.push( await Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
...@@ -1071,6 +1088,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -1071,6 +1088,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
"${provider.pendingTasksLists[index].appdate}", "${provider.pendingTasksLists[index].appdate}",
textAlign: TextAlign.right, textAlign: TextAlign.right,
maxLines: 1, maxLines: 1,
style: TextStyle( style: TextStyle(
color: AppColors.grey_semi, color: AppColors.grey_semi,
fontFamily: "JakartaRegular", fontFamily: "JakartaRegular",
...@@ -1117,7 +1135,8 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> { ...@@ -1117,7 +1135,8 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
child: Text( child: Text(
"${provider.pendingTasksLists[index].anote}", "${provider.pendingTasksLists[index].anote}",
textAlign: TextAlign.right, textAlign: TextAlign.right,
maxLines: 1, maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
color: AppColors.semi_black, color: AppColors.semi_black,
fontFamily: "JakartaRegular", fontFamily: "JakartaRegular",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment