change base Url

This commit is contained in:
Vaibhav 2024-09-11 18:32:52 +05:30
parent 67ed0ce21c
commit 11b3b130d9
6 changed files with 436 additions and 425 deletions

View File

@ -64,7 +64,7 @@ class MarkLeaveProvider extends ChangeNotifier{
"date": date, "date": date,
"time": time, "time": time,
"reason": reason, "reason": reason,
"leaveType":leaveType, "leaveType":'$leaveType Leave',
}); });
setLoading(false); setLoading(false);
if (response.statusCode == 200) { if (response.statusCode == 200) {

View File

@ -12,7 +12,7 @@ class SelectTaskProvider extends ChangeNotifier {
} }
final _apiClient = ApiClient(); final _apiClient = ApiClient();
List<Tasks> tasksList=[]; List<Tasks> tasksList = [];
bool _isLoading = false; bool _isLoading = false;
@ -30,7 +30,10 @@ class SelectTaskProvider extends ChangeNotifier {
setLoading(false); setLoading(false);
if (response.statusCode == 200) { if (response.statusCode == 200) {
final data = SelectTaskKycResponse.fromJson(response.data); final data = SelectTaskKycResponse.fromJson(response.data);
tasksList = data.tasks ?? []; tasksList = data!.tasks!
.where(
(element) => element.taskStatus!.toLowerCase() != "completed")
.toList();
notifyListeners(); notifyListeners();
} }
} catch (e) { } catch (e) {

View File

@ -15,12 +15,13 @@ class AddSalesProductScreen extends StatefulWidget {
final String pdRdId; final String pdRdId;
final String? inventoryId; final String? inventoryId;
const AddSalesProductScreen( const AddSalesProductScreen({
{super.key, super.key,
required this.distributorType, required this.distributorType,
required this.tradeName, required this.tradeName,
required this.pdRdId, required this.pdRdId,
this.inventoryId}); this.inventoryId,
});
@override @override
State<AddSalesProductScreen> createState() => _AddSalesProductScreenState(); State<AddSalesProductScreen> createState() => _AddSalesProductScreenState();
@ -34,34 +35,24 @@ class _AddSalesProductScreenState extends State<AddSalesProductScreen> {
@override @override
void initState() { void initState() {
super.initState();
salesTaskProvider = Provider.of<AddSalesProvider>(context, listen: false); salesTaskProvider = Provider.of<AddSalesProvider>(context, listen: false);
WidgetsBinding.instance.addPostFrameCallback((timeStamp) { dateController.text = DateFormat('dd/MM/yyyy').format(DateTime.now());
WidgetsBinding.instance.addPostFrameCallback((_) {
salesTaskProvider.getTask(); salesTaskProvider.getTask();
}); });
super.initState();
} }
@override @override
void dispose() { void dispose() {
searchController.dispose();
dateController.dispose();
if (mounted) { if (mounted) {
salesTaskProvider.resetProducts(); salesTaskProvider.resetProducts();
} }
super.dispose(); super.dispose();
} }
datePicker() async {
final DateTime? picked = await showDatePicker(
context: context,
initialDate: DateTime.now(),
firstDate: DateTime(2000),
lastDate: DateTime(2101),
);
if (picked != null) {
setState(
() => dateController.text = DateFormat('dd/MM/yyyy').format(picked));
}
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return PopScope( return PopScope(
@ -74,17 +65,22 @@ class _AddSalesProductScreenState extends State<AddSalesProductScreen> {
IconButton( IconButton(
onPressed: () => Navigator.pop(context), onPressed: () => Navigator.pop(context),
icon: Image.asset('assets/Back_attendance.png'), icon: Image.asset('assets/Back_attendance.png'),
padding: const EdgeInsets.only(right: 20)) padding: const EdgeInsets.only(right: 20),
)
], ],
title: Text('${widget.distributorType}\n${widget.tradeName}', title: Text(
'${widget.distributorType}\n${widget.tradeName}',
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: const TextStyle( style: const TextStyle(
fontSize: 20, fontSize: 20,
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
fontFamily: 'Anek')), fontFamily: 'Anek',
),
),
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
elevation: 0), elevation: 0,
),
drawer: const CommonDrawer(), drawer: const CommonDrawer(),
bottomNavigationBar: Consumer<AddSalesProvider>( bottomNavigationBar: Consumer<AddSalesProvider>(
builder: (context, value, child) => Column( builder: (context, value, child) => Column(
@ -100,140 +96,40 @@ class _AddSalesProductScreenState extends State<AddSalesProductScreen> {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
FloatingActionButton.extended( FloatingActionButton.extended(
onPressed: () { onPressed: () => _showProductSelectionBottomSheet(context),
showModalBottomSheet(
isScrollControlled: true,
constraints: BoxConstraints(
maxHeight: MediaQuery.of(context)
.size
.height *
0.9),
context: context,
builder: (BuildContext context) {
return Consumer<AddSalesProvider>(
builder:
(context, value, child) =>
StatefulBuilder(builder:
(context,
setState) {
return Column(
children: [
Padding(
padding:
const EdgeInsets
.all(
18.0),
child: TextField(
controller: searchController,
decoration: const InputDecoration(labelText: 'Search by name or SKU', border: OutlineInputBorder(), prefixIcon: Icon(Icons.search)),
onChanged: (val) {
value.filterProducts(
val);
setState(
() {});
})),
Expanded(
child: ListView
.builder(
itemCount: searchController.text.isEmpty
? value.tasksList.length
: value.searchList.length,
itemBuilder: (context, index) {
bool isAlreadySelected = value.selectedProducts.any((selectedProduct) => selectedProduct.SKU == value.tasksList[index].SKU);
final data = searchController.text.isEmpty ? value.tasksList[index] : value.searchList[index];
return Card(
child: ListTile(
title: Text(data.ProductName ?? '', style: TextStyle(color: isAlreadySelected ? Colors.grey : Colors.black)),
subtitle: Text(data.SKU ?? '', style: TextStyle(color: isAlreadySelected ? Colors.grey : Colors.black)),
onTap: isAlreadySelected
? null
: () {
setState(() => value.selectedProducts.add(data));
Navigator.pop(context);
}));
}))
]);
}));
},
).whenComplete(() => setState(() {}));
},
backgroundColor: Colors.white, backgroundColor: Colors.white,
icon: const Icon(Icons.add, icon: const Icon(Icons.add, color: Colors.black),
color: Colors.black), label: const Text('Add Products', style: TextStyle(color: Colors.black)),
label: const Text('Add Products', ),
style:
TextStyle(color: Colors.black))),
if (value.selectedProducts.isNotEmpty) ...[ if (value.selectedProducts.isNotEmpty) ...[
const SizedBox(height: 16.0), const SizedBox(height: 16.0),
Consumer<AddSalesProvider>(
builder: (context, value, child) =>
CommonElevatedButton( CommonElevatedButton(
borderRadius: 30, borderRadius: 30,
width: double.infinity, width: double.infinity,
height: kToolbarHeight - 10, height: kToolbarHeight - 10,
text: 'SUBMIT', text: 'SUBMIT',
backgroundColor: backgroundColor: const Color(0xff004791),
const Color(0xff004791), onPressed: () => _submitProducts(value),
onPressed: () { ),
if (formKey.currentState! ],
.validate()) {
if (value.selectedProducts
.isNotEmpty &&
value.selectedProducts.every((product) =>
product.SKU!
.isNotEmpty &&
product.ProductName!
.isNotEmpty &&
product.SalesAmount !=
null &&
product.QuantitySold !=
null)) {
value.submitProducts(
distributorType: widget
.distributorType,
pdRdId: widget.pdRdId,
inventoryId:
widget.inventoryId,
date: dateController
.text
.trim(),
tradeName:
widget.tradeName);
} else {
ScaffoldMessenger.of(
context)
.showSnackBar(
const SnackBar(
content: Text(
'Please fill out all product details, including sale and inventory.')),
);
}
}
}))
]
]))),
], ],
), ),
), ),
body: ),
Consumer<AddSalesProvider>(builder: (context, value, child) { ],
return Stack(children: [ ),
Column(children: [ ),
GestureDetector( body: Consumer<AddSalesProvider>(
onTap: () => datePicker(), builder: (context, value, child) {
child: AbsorbPointer( return Stack(
child: Padding( children: [
Column(
children: [
Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Form(
key: formKey,
child: TextFormField( child: TextFormField(
controller: dateController, controller: dateController,
validator: (value) { readOnly: true,
if (value!.isEmpty) {
return 'Please select a date';
}
return null;
},
decoration: const InputDecoration( decoration: const InputDecoration(
labelText: 'Date', labelText: 'Date',
fillColor: Colors.white, fillColor: Colors.white,
@ -243,9 +139,6 @@ class _AddSalesProductScreenState extends State<AddSalesProductScreen> {
), ),
), ),
), ),
),
),
),
if (value.selectedProducts.isNotEmpty) if (value.selectedProducts.isNotEmpty)
Expanded( Expanded(
child: ListView.builder( child: ListView.builder(
@ -254,8 +147,7 @@ class _AddSalesProductScreenState extends State<AddSalesProductScreen> {
return ProductBlock( return ProductBlock(
onUpdate: (updatedProduct) { onUpdate: (updatedProduct) {
setState(() { setState(() {
value.selectedProducts[index] = value.selectedProducts[index] = updatedProduct;
updatedProduct;
}); });
}, },
onRemove: () { onRemove: () {
@ -263,21 +155,120 @@ class _AddSalesProductScreenState extends State<AddSalesProductScreen> {
value.selectedProducts.removeAt(index); value.selectedProducts.removeAt(index);
}); });
}, },
product: value.selectedProducts[index]); product: value.selectedProducts[index],
}))
]),
(value.isLoading)
? Container(
color: Colors.black12,
child:
const Center(child: CircularProgressIndicator()))
: const SizedBox()
]);
}))),
); );
},
),
),
],
),
if (value.isLoading)
Container(
color: Colors.black12,
child: const Center(child: CircularProgressIndicator()),
),
],
);
},
),
),
),
);
}
void _showProductSelectionBottomSheet(BuildContext context) {
showModalBottomSheet(
isScrollControlled: true,
context: context,
builder: (BuildContext context) {
return Consumer<AddSalesProvider>(
builder: (context, value, child) => StatefulBuilder(
builder: (context, setState) {
return Column(
children: [
Padding(
padding: const EdgeInsets.all(18.0),
child: TextField(
controller: searchController,
decoration: const InputDecoration(
labelText: 'Search by name or SKU',
border: OutlineInputBorder(),
prefixIcon: Icon(Icons.search),
),
onChanged: (val) {
value.filterProducts(val);
setState(() {});
},
),
),
Expanded(
child: ListView.builder(
itemCount: searchController.text.isEmpty
? value.tasksList.length
: value.searchList.length,
itemBuilder: (context, index) {
final data = searchController.text.isEmpty
? value.tasksList[index]
: value.searchList[index];
bool isAlreadySelected = value.selectedProducts
.any((selectedProduct) => selectedProduct.SKU == data.SKU);
return Card(
child: ListTile(
title: Text(
data.ProductName ?? '',
style: TextStyle(color: isAlreadySelected ? Colors.grey : Colors.black),
),
subtitle: Text(
data.SKU ?? '',
style: TextStyle(color: isAlreadySelected ? Colors.grey : Colors.black),
),
onTap: isAlreadySelected
? null
: () {
setState(() => value.selectedProducts.add(data));
Navigator.pop(context);
},
),
);
},
),
),
],
);
},
),
);
},
).whenComplete(() => setState(() {}));
}
void _submitProducts(AddSalesProvider value) {
if (formKey.currentState!.validate()) {
if (value.selectedProducts.isNotEmpty &&
value.selectedProducts.every((product) =>
product.SKU!.isNotEmpty &&
product.ProductName!.isNotEmpty &&
product.SalesAmount != null &&
product.QuantitySold != null)) {
value.submitProducts(
distributorType: widget.distributorType,
pdRdId: widget.pdRdId,
inventoryId: widget.inventoryId,
date: dateController.text.trim(),
tradeName: widget.tradeName,
);
} else {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text('Please fill out all product details, including sale and inventory.'),
),
);
}
}
} }
} }
// The ProductBlock class remains unchanged
class ProductBlock extends StatefulWidget { class ProductBlock extends StatefulWidget {
final SalesProduct product; final SalesProduct product;
final ValueChanged<SalesProduct> onUpdate; final ValueChanged<SalesProduct> onUpdate;
@ -304,9 +295,8 @@ class _ProductBlockState extends State<ProductBlock> {
void initState() { void initState() {
super.initState(); super.initState();
saleAmountController.text = (widget.product.SalesAmount ?? '').toString(); saleAmountController.text = (widget.product.SalesAmount ?? '').toString();
commentController.text = (widget.product.comments?? '').toString(); commentController.text = (widget.product.comments ?? '').toString();
quantitySoldController.text = quantitySoldController.text = (widget.product.QuantitySold ?? '').toString();
(widget.product.QuantitySold ?? '').toString();
} }
void validateInput() { void validateInput() {
@ -326,7 +316,7 @@ class _ProductBlockState extends State<ProductBlock> {
if (quantitySoldError == null && salesAmountError == null) { if (quantitySoldError == null && salesAmountError == null) {
int quantitySold = int.parse(quantitySoldController.text); int quantitySold = int.parse(quantitySoldController.text);
int salesAmount = int.parse(saleAmountController.text); int salesAmount = int.parse(saleAmountController.text);
String comments =commentController.text; String comments = commentController.text;
widget.onUpdate(SalesProduct( widget.onUpdate(SalesProduct(
SKU: widget.product.SKU, SKU: widget.product.SKU,
@ -346,17 +336,21 @@ class _ProductBlockState extends State<ProductBlock> {
return Card( return Card(
color: Colors.white, color: Colors.white,
margin: const EdgeInsets.all(8), margin: const EdgeInsets.all(8),
child: Stack(children: [ child: Stack(
children: [
Padding( Padding(
padding: const EdgeInsets.all(16), padding: const EdgeInsets.all(16),
child: child: Column(
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('Product: ${widget.product.ProductName}', Text('Product: ${widget.product.ProductName}',
style: const TextStyle(fontSize: 16)), style: const TextStyle(fontSize: 16)),
Text('SKU: ${widget.product.SKU}', Text('SKU: ${widget.product.SKU}',
style: const TextStyle(fontSize: 15)), style: const TextStyle(fontSize: 15)),
const SizedBox(height: 8), const SizedBox(height: 8),
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextField( TextField(
controller: saleAmountController, controller: saleAmountController,
onTapOutside: (event) => FocusScope.of(context).unfocus(), onTapOutside: (event) => FocusScope.of(context).unfocus(),
@ -365,10 +359,12 @@ class _ProductBlockState extends State<ProductBlock> {
labelText: 'Sales amount', labelText: 'Sales amount',
errorText: saleAmountController.text.isEmpty errorText: saleAmountController.text.isEmpty
? 'Sales amount cannot be empty.' ? 'Sales amount cannot be empty.'
: null), : null,
),
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
enabled: true, enabled: true,
onChanged: (_) => validateInput()), onChanged: (_) => validateInput(),
),
TextField( TextField(
controller: quantitySoldController, controller: quantitySoldController,
onTapOutside: (event) => FocusScope.of(context).unfocus(), onTapOutside: (event) => FocusScope.of(context).unfocus(),
@ -377,19 +373,25 @@ class _ProductBlockState extends State<ProductBlock> {
labelText: 'Quantity sold', labelText: 'Quantity sold',
errorText: quantitySoldController.text.isEmpty errorText: quantitySoldController.text.isEmpty
? 'Quantity sold cannot be empty.' ? 'Quantity sold cannot be empty.'
: null), : null,
),
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
enabled: true, enabled: true,
onChanged: (_) => validateInput()), onChanged: (_) => validateInput(),
),
TextField( TextField(
controller: commentController, controller: commentController,
onTapOutside: (event) => FocusScope.of(context).unfocus(), onTapOutside: (event) => FocusScope.of(context).unfocus(),
decoration: const InputDecoration( decoration: const InputDecoration(
labelText: 'Comments',), labelText: 'Comments',
),
enabled: true, enabled: true,
onChanged: (_) => validateInput()) onChanged: (_) => validateInput(),
]), ),
]), ],
),
],
),
), ),
Positioned( Positioned(
top: 0, top: 0,
@ -399,25 +401,19 @@ class _ProductBlockState extends State<ProductBlock> {
Icons.delete_outlined, Icons.delete_outlined,
color: Colors.red, color: Colors.red,
), ),
onPressed: widget.onRemove)), onPressed: widget.onRemove,
])); ),
),
],
),
);
}
@override
void dispose() {
saleAmountController.dispose();
quantitySoldController.dispose();
commentController.dispose();
super.dispose();
} }
} }
class ProductModel {
final String sku;
final String productName;
final int? sale;
final int? inventory;
final String? comments;
final String? date;
ProductModel({
required this.sku,
required this.productName,
this.sale,
this.inventory,
this.comments,
this.date,
});
}

View File

@ -1,4 +1,3 @@
import 'package:cheminova/provider/markleave_provider.dart';
import 'package:cheminova/screens/Attendance_success.dart'; import 'package:cheminova/screens/Attendance_success.dart';
import 'package:cheminova/widgets/common_drawer.dart'; import 'package:cheminova/widgets/common_drawer.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -7,6 +6,7 @@ import 'package:geocoding/geocoding.dart';
import 'package:geolocator/geolocator.dart'; import 'package:geolocator/geolocator.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../provider/markleave_provider.dart';
import '../widgets/common_app_bar.dart'; import '../widgets/common_app_bar.dart';
import '../widgets/common_elevated_button.dart'; import '../widgets/common_elevated_button.dart';
import '../widgets/common_text_form_field.dart'; import '../widgets/common_text_form_field.dart';
@ -22,7 +22,7 @@ class _OnLeaveScreenState extends State<OnLeaveScreen> {
late MarkLeaveProvider _markLeaveProvider; late MarkLeaveProvider _markLeaveProvider;
final dateController = TextEditingController( final dateController = TextEditingController(
text: DateFormat('dd/MM/yyyy').format(DateTime.now())); text: DateFormat('yyyy/MM/dd').format(DateTime.now()));
final timeController = final timeController =
TextEditingController(text: DateFormat('hh:mm a').format(DateTime.now())); TextEditingController(text: DateFormat('hh:mm a').format(DateTime.now()));
@ -43,7 +43,8 @@ class _OnLeaveScreenState extends State<OnLeaveScreen> {
return GestureDetector( return GestureDetector(
onTap: () => onLeaveTypeSelected(leaveType), onTap: () => onLeaveTypeSelected(leaveType),
child: Container(margin: const EdgeInsets.only(bottom: 10), child: Container(
margin: const EdgeInsets.only(bottom: 10),
width: 120, width: 120,
padding: const EdgeInsets.symmetric(vertical: 5.0), padding: const EdgeInsets.symmetric(vertical: 5.0),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -62,6 +63,7 @@ class _OnLeaveScreenState extends State<OnLeaveScreen> {
), ),
); );
} }
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -106,17 +108,17 @@ class _OnLeaveScreenState extends State<OnLeaveScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ChangeNotifierProvider<MarkLeaveProvider>( return ChangeNotifierProvider<MarkLeaveProvider>(
create: (_) => _markLeaveProvider, create: (_) => _markLeaveProvider,
builder: (context, child) => builder: (context, child) => CommonBackground(
CommonBackground( child: Scaffold(
child: Scaffold(backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: CommonAppBar( appBar: CommonAppBar(
actions: [ actions: [
IconButton( IconButton(
onPressed: () onPressed: () {
{
Navigator.pop(context); Navigator.pop(context);
}, },
icon: Image.asset('assets/Back_attendance.png'), padding: const EdgeInsets.only(right: 20), icon: Image.asset('assets/Back_attendance.png'),
padding: const EdgeInsets.only(right: 20),
), ),
], ],
title: const Text('On Leave', title: const Text('On Leave',
@ -124,7 +126,9 @@ class _OnLeaveScreenState extends State<OnLeaveScreen> {
fontSize: 28, fontSize: 28,
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
fontFamily: 'Anek')), backgroundColor: Colors.transparent, elevation: 0, fontFamily: 'Anek')),
backgroundColor: Colors.transparent,
elevation: 0,
), ),
drawer: const CommonDrawer(), drawer: const CommonDrawer(),
body: Padding( body: Padding(
@ -137,8 +141,8 @@ class _OnLeaveScreenState extends State<OnLeaveScreen> {
children: <Widget>[ children: <Widget>[
const SizedBox(height: 16), const SizedBox(height: 16),
Container( Container(
padding: padding: const EdgeInsets.all(20.0)
const EdgeInsets.all(20.0).copyWith(top: 30, bottom: 30), .copyWith(top: 30, bottom: 30),
margin: const EdgeInsets.symmetric(horizontal: 30.0), margin: const EdgeInsets.symmetric(horizontal: 30.0),
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all(color: Colors.white), border: Border.all(color: Colors.white),
@ -165,8 +169,9 @@ class _OnLeaveScreenState extends State<OnLeaveScreen> {
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
fontFamily: 'Anek')), fontFamily: 'Anek')),
const SizedBox(height:3 ), const SizedBox(height: 3),
Wrap(direction: Axis.horizontal, Wrap(
direction: Axis.horizontal,
children: [ children: [
buildLeaveTypeOption('Sick'), buildLeaveTypeOption('Sick'),
const SizedBox(width: 10), const SizedBox(width: 10),
@ -186,25 +191,34 @@ class _OnLeaveScreenState extends State<OnLeaveScreen> {
Align( Align(
alignment: Alignment.center, alignment: Alignment.center,
child: Consumer<MarkLeaveProvider>( child: Consumer<MarkLeaveProvider>(
builder: (context, value, child) =>CommonElevatedButton( builder: (context, value, child) =>
CommonElevatedButton(
borderRadius: 30, borderRadius: 30,
width: double.infinity, width: double.infinity,
height: kToolbarHeight - 10, height: kToolbarHeight - 10,
text: 'ON LEAVE', text: 'ON LEAVE',
backgroundColor: const Color(0xff00784C), backgroundColor:
const Color(0xff00784C),
onPressed: () { onPressed: () {
value value
.markLeave( .markLeave(
dateController.text.trim(), dateController.text
timeController.text.trim(), .trim(),
locationController.text.trim(), timeController.text
notesController.text.trim(), selectedLeaveType) .trim(),
locationController.text
.trim(),
notesController.text
.trim(),
selectedLeaveType)
.then( .then(
(result) { (result) {
var (status, message) = result; var (status, message) =
result;
ScaffoldMessenger.of(context) ScaffoldMessenger.of(context)
.showSnackBar(SnackBar( .showSnackBar(SnackBar(
content: Text(message))); content:
Text(message)));
if (status) { if (status) {
Navigator.pushReplacement( Navigator.pushReplacement(
context, context,
@ -217,17 +231,15 @@ class _OnLeaveScreenState extends State<OnLeaveScreen> {
// Navigator.push(context, MaterialPageRoute(builder:(context) => const AttendanceSuccess(),)); // Navigator.push(context, MaterialPageRoute(builder:(context) => const AttendanceSuccess(),));
}), }),
) )),
),
], ],
), ),
), ),
], ],
), ),
), ),
),), ),
) ),
); ));
} }
} }

View File

@ -146,13 +146,13 @@ class VisitDealersScreenState extends State<VisitDealersScreen> {
CommonTextFormField( CommonTextFormField(
title: 'Meeting Summary:', title: 'Meeting Summary:',
fillColor: Colors.white, fillColor: Colors.white,
maxLines: 4, maxLines: 3,
controller: meetingSummaryController), controller: meetingSummaryController),
const SizedBox(height: 15), const SizedBox(height: 15),
CommonTextFormField( CommonTextFormField(
title: 'Follow-up Actions:', title: 'Follow-up Actions:',
fillColor: Colors.white, fillColor: Colors.white,
maxLines: 4, maxLines: 3,
controller: followUpActionsController), controller: followUpActionsController),
const SizedBox(height: 15), const SizedBox(height: 15),
CommonTextFormField( CommonTextFormField(

View File

@ -21,6 +21,6 @@ class ApiUrls {
static const String kycSelectTaskUrl = '${baseUrl}task/task/type/Collect KYC'; static const String kycSelectTaskUrl = '${baseUrl}task/task/type/Collect KYC';
static const String updateTaskInventoryUrl = '${baseUrl}task/update-task-status/'; static const String updateTaskInventoryUrl = '${baseUrl}task/update-task-status/';
static const String getProductsManual = '${baseUrl}productmanual/getall'; static const String getProductsManual = '${baseUrl}productmanual/getall';
static const String salesTaskUrl = '${baseUrl}product/getAll/user/?category=Bottle'; static const String salesTaskUrl = '${baseUrl}product/getAll/user/';
static const String postSalesTaskUrl = '${baseUrl}sales/add-SC'; static const String postSalesTaskUrl = '${baseUrl}sales/add-SC';
} }