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

sai srinivas

finance module updated
parent a92809e3
...@@ -3,8 +3,11 @@ class TechnicianPendingComplaintsResponse { ...@@ -3,8 +3,11 @@ class TechnicianPendingComplaintsResponse {
int? error; int? error;
int? sessionExists; int? sessionExists;
TechnicianPendingComplaintsResponse( TechnicianPendingComplaintsResponse({
{this.list, this.error, this.sessionExists}); this.list,
this.error,
this.sessionExists,
});
TechnicianPendingComplaintsResponse.fromJson(Map<String, dynamic> json) { TechnicianPendingComplaintsResponse.fromJson(Map<String, dynamic> json) {
if (json['list'] != null) { if (json['list'] != null) {
...@@ -39,9 +42,10 @@ class TP_List { ...@@ -39,9 +42,10 @@ class TP_List {
String? compRegDatetime; String? compRegDatetime;
String? mobileNo; String? mobileNo;
String? contactName; String? contactName;
String? engineNo;
TP_List( TP_List({
{this.genId, this.genId,
this.address, this.address,
this.loc, this.loc,
this.complaintId, this.complaintId,
...@@ -51,6 +55,7 @@ class TP_List { ...@@ -51,6 +55,7 @@ class TP_List {
this.compRegDatetime, this.compRegDatetime,
this.mobileNo, this.mobileNo,
this.contactName, this.contactName,
this.engineNo,
}); });
TP_List.fromJson(Map<String, dynamic> json) { TP_List.fromJson(Map<String, dynamic> json) {
...@@ -64,6 +69,7 @@ class TP_List { ...@@ -64,6 +69,7 @@ class TP_List {
compRegDatetime = json['comp_reg_datetime']; compRegDatetime = json['comp_reg_datetime'];
mobileNo = json['mobile_no']; mobileNo = json['mobile_no'];
contactName = json['contact_name']; contactName = json['contact_name'];
engineNo = json['engine_number'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
...@@ -78,6 +84,7 @@ class TP_List { ...@@ -78,6 +84,7 @@ class TP_List {
data['comp_reg_datetime'] = this.compRegDatetime; data['comp_reg_datetime'] = this.compRegDatetime;
data['mobile_no'] = this.mobileNo; data['mobile_no'] = this.mobileNo;
data['contact_name'] = this.contactName; data['contact_name'] = this.contactName;
data['engine_number'] = this.engineNo;
return data; return data;
} }
} }
...@@ -18,7 +18,7 @@ PreferredSizeWidget appbar(BuildContext context, title) { ...@@ -18,7 +18,7 @@ PreferredSizeWidget appbar(BuildContext context, title) {
child: SvgPicture.asset("assets/svg/app_bar_back.svg", height: 25), child: SvgPicture.asset("assets/svg/app_bar_back.svg", height: 25),
), ),
InkResponse( InkResponse(
onTap: () => Navigator.pop(context,true), onTap: () => Navigator.pop(context, true),
child: Text( child: Text(
title, title,
style: TextStyle( style: TextStyle(
...@@ -40,7 +40,7 @@ PreferredSizeWidget appbar(BuildContext context, title) { ...@@ -40,7 +40,7 @@ PreferredSizeWidget appbar(BuildContext context, title) {
); );
} }
PreferredSizeWidget appbar2(BuildContext context, title,reset,widget) { PreferredSizeWidget appbar2(BuildContext context, title, reset, widget) {
return AppBar( return AppBar(
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
elevation: 2.0, elevation: 2.0,
...@@ -50,14 +50,14 @@ PreferredSizeWidget appbar2(BuildContext context, title,reset,widget) { ...@@ -50,14 +50,14 @@ PreferredSizeWidget appbar2(BuildContext context, title,reset,widget) {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
InkResponse( InkResponse(
onTap: (){ onTap: () {
reset(); reset();
Navigator.pop(context, true); Navigator.pop(context, true);
}, },
child: SvgPicture.asset("assets/svg/app_bar_back.svg", height: 25), child: SvgPicture.asset("assets/svg/app_bar_back.svg", height: 25),
), ),
Expanded( Expanded(
flex:4, flex: 4,
child: InkResponse( child: InkResponse(
onTap: () { onTap: () {
reset(); reset();
...@@ -77,7 +77,7 @@ PreferredSizeWidget appbar2(BuildContext context, title,reset,widget) { ...@@ -77,7 +77,7 @@ PreferredSizeWidget appbar2(BuildContext context, title,reset,widget) {
), ),
), ),
Spacer(), Spacer(),
widget widget,
], ],
), ),
), ),
...@@ -94,11 +94,10 @@ Future<bool> onBackPressed(BuildContext context) async { ...@@ -94,11 +94,10 @@ Future<bool> onBackPressed(BuildContext context) async {
return true; return true;
} }
Widget Emptywidget(BuildContext context){ Widget Emptywidget(BuildContext context) {
return SizedBox( return SizedBox(
height: MediaQuery.of(context).size.height*0.8, height: MediaQuery.of(context).size.height * 0.8,
child: Center( child: Center(child: Text("No Data Available")),
child: Text("No Data Available")),
); );
} }
...@@ -124,7 +123,7 @@ Widget textControllerWidget( ...@@ -124,7 +123,7 @@ Widget textControllerWidget(
inputtype, inputtype,
readonly, readonly,
inputFormatters, inputFormatters,
) { ) {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
...@@ -169,12 +168,13 @@ Widget textControllerWidget( ...@@ -169,12 +168,13 @@ Widget textControllerWidget(
], ],
); );
} }
Widget textControllerReadonlyWidget( Widget textControllerReadonlyWidget(
context, context,
controller, controller,
hintText, hintText,
Function(String)? onChanged, Function(String)? onChanged,
) { ) {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
...@@ -215,14 +215,15 @@ Widget textControllerReadonlyWidget( ...@@ -215,14 +215,15 @@ Widget textControllerReadonlyWidget(
], ],
); );
} }
class MyNavigatorObserver extends NavigatorObserver { class MyNavigatorObserver extends NavigatorObserver {
@override @override
void didPush(Route route, Route? previousRoute) { void didPush(Route route, Route? previousRoute) {
super.didPush(route, previousRoute); super.didPush(route, previousRoute);
// Called when a route has been pushed onto the navigator. // Called when a route has been pushed onto the navigator.
didPushed = "true"; didPushed = "true";
// print('Route pushed: ${route.settings.name}'); print('Route pushed: ${route.settings.name}');
// print('didPushed$didPushed'); print('didPushed$didPushed');
} }
@override @override
...@@ -230,7 +231,7 @@ class MyNavigatorObserver extends NavigatorObserver { ...@@ -230,7 +231,7 @@ class MyNavigatorObserver extends NavigatorObserver {
super.didPop(route, previousRoute); super.didPop(route, previousRoute);
didPopped = "true"; didPopped = "true";
// Called when a route has been popped off the navigator. // Called when a route has been popped off the navigator.
// print('Route popped: ${route.settings.name}'); print('Route popped: ${route.settings.name}');
// print('didPopped${didPopped}'); print('didPopped${didPopped}');
} }
} }
...@@ -57,7 +57,6 @@ Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async { ...@@ -57,7 +57,6 @@ Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
void main() async { void main() async {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
if (Platform.isAndroid) { if (Platform.isAndroid) {
await Firebase.initializeApp( await Firebase.initializeApp(
options: FirebaseOptions( options: FirebaseOptions(
...@@ -186,25 +185,28 @@ class MyApp extends StatelessWidget { ...@@ -186,25 +185,28 @@ class MyApp extends StatelessWidget {
ChangeNotifierProvider(create: (_) => Paymentdetailsprovider()), ChangeNotifierProvider(create: (_) => Paymentdetailsprovider()),
ChangeNotifierProvider(create: (_) => Generatordetailsprovider()), ChangeNotifierProvider(create: (_) => Generatordetailsprovider()),
ChangeNotifierProvider(create: (_) => Nearbygeneratorsprovider()), ChangeNotifierProvider(create: (_) => Nearbygeneratorsprovider()),
///finance ///finance
ChangeNotifierProvider(create: (_) => Dashboardprovider(),), ChangeNotifierProvider(create: (_) => Dashboardprovider()),
ChangeNotifierProvider(create: (_) => Requestionlistprovider(),), ChangeNotifierProvider(create: (_) => Requestionlistprovider()),
ChangeNotifierProvider(create: (_) => Requesitionlidtdetailsprovider(),), ChangeNotifierProvider(create: (_) => Requesitionlidtdetailsprovider()),
ChangeNotifierProvider(create: (_) => Paymentrequisitionpaymentslistprovider(),), ChangeNotifierProvider(
ChangeNotifierProvider(create: (_) => Paymentreceiptsprovider(),), create: (_) => Paymentrequisitionpaymentslistprovider(),
ChangeNotifierProvider(create: (_) => Commonpagesprovider(),), ),
ChangeNotifierProvider(create: (_) => Accountslistprovider(),), ChangeNotifierProvider(create: (_) => Paymentreceiptsprovider()),
ChangeNotifierProvider(create: (_) => Accountdetailsprovider(),), ChangeNotifierProvider(create: (_) => Commonpagesprovider()),
ChangeNotifierProvider(create: (_) => Accountledgerprovider(),), ChangeNotifierProvider(create: (_) => Accountslistprovider()),
ChangeNotifierProvider(create: (_) => Pagesdashboardprovider(),), ChangeNotifierProvider(create: (_) => Accountdetailsprovider()),
ChangeNotifierProvider(create: (_) => Paymentsprovider(),), ChangeNotifierProvider(create: (_) => Accountledgerprovider()),
ChangeNotifierProvider(create: (_) => Tpcagentsprovider(),), ChangeNotifierProvider(create: (_) => Pagesdashboardprovider()),
ChangeNotifierProvider(create: (_) => Addpaymentprovider(),), ChangeNotifierProvider(create: (_) => Paymentsprovider()),
ChangeNotifierProvider(create: (_) => Addorderprovider(),), ChangeNotifierProvider(create: (_) => Tpcagentsprovider()),
ChangeNotifierProvider(create: (_) => Editpaymentprovider(),), ChangeNotifierProvider(create: (_) => Addpaymentprovider()),
ChangeNotifierProvider(create: (_) => Crmdashboardprovider(),), ChangeNotifierProvider(create: (_) => Addorderprovider()),
ChangeNotifierProvider(create: (_) => Leadlistprovider(),), ChangeNotifierProvider(create: (_) => Editpaymentprovider()),
ChangeNotifierProvider(create: (_) => crmLeadDetailsProvider(),), ChangeNotifierProvider(create: (_) => Crmdashboardprovider()),
ChangeNotifierProvider(create: (_) => Leadlistprovider()),
ChangeNotifierProvider(create: (_) => crmLeadDetailsProvider()),
], ],
child: Builder( child: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
...@@ -213,7 +215,7 @@ class MyApp extends StatelessWidget { ...@@ -213,7 +215,7 @@ class MyApp extends StatelessWidget {
builder: (BuildContext context, Widget? child) { builder: (BuildContext context, Widget? child) {
final MediaQueryData data = MediaQuery.of(context); final MediaQueryData data = MediaQuery.of(context);
return MediaQuery( return MediaQuery(
data: data.copyWith(textScaleFactor: 1.0), data: data.copyWith(textScaler: TextScaler.linear(1.0)),
child: child ?? Container(), child: child ?? Container(),
); );
}, },
...@@ -271,7 +273,9 @@ class MyApp extends StatelessWidget { ...@@ -271,7 +273,9 @@ class MyApp extends StatelessWidget {
interactive: true, interactive: true,
radius: Radius.circular(6), radius: Radius.circular(6),
thickness: WidgetStatePropertyAll(10), thickness: WidgetStatePropertyAll(10),
thumbColor: WidgetStateProperty.all(AppColors.grey_semi.withOpacity(0.6)) thumbColor: WidgetStateProperty.all(
AppColors.grey_semi.withOpacity(0.6),
),
), ),
), ),
home: const Splash(), home: const Splash(),
......
...@@ -118,8 +118,8 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -118,8 +118,8 @@ class _MyHomePageState extends State<MyHomePage> {
"Whizzdom", "Whizzdom",
"Common", "Common",
"Finance", "Finance",
"Orders", // "Orders",
"CRM", // "CRM",
]; ];
final icons = [ final icons = [
"assets/svg/home_icons_1.svg", "assets/svg/home_icons_1.svg",
...@@ -131,8 +131,8 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -131,8 +131,8 @@ class _MyHomePageState extends State<MyHomePage> {
"assets/svg/home_icons_81.svg", "assets/svg/home_icons_81.svg",
"assets/svg/home_icons_9.svg", "assets/svg/home_icons_9.svg",
"assets/svg/home_icons_10.svg", "assets/svg/home_icons_10.svg",
"assets/svg/home_icons_11.svg", // "assets/svg/home_icons_11.svg",
"assets/svg/home_icons_12.svg", // "assets/svg/home_icons_12.svg",
]; ];
final requiredRoles = [ final requiredRoles = [
"430", "430",
...@@ -144,8 +144,8 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -144,8 +144,8 @@ class _MyHomePageState extends State<MyHomePage> {
"431", "431",
"430", "430",
"430", "430",
"430", // "430",
"430", // "430",
]; ];
final filteredItems = <Map<String, String>>[]; final filteredItems = <Map<String, String>>[];
...@@ -204,7 +204,8 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -204,7 +204,8 @@ class _MyHomePageState extends State<MyHomePage> {
flex: 2, flex: 2,
child: SizedBox( child: SizedBox(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment:
MainAxisAlignment.center,
children: [ children: [
SizedBox( SizedBox(
...@@ -217,7 +218,8 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -217,7 +218,8 @@ class _MyHomePageState extends State<MyHomePage> {
child: CachedNetworkImage( child: CachedNetworkImage(
cacheKey: profile.profileImage, cacheKey: profile.profileImage,
fit: BoxFit.cover, fit: BoxFit.cover,
imageUrl: "${profile.profileImage}", imageUrl:
"${profile.profileImage}",
useOldImageOnUrlChange: false, useOldImageOnUrlChange: false,
placeholder: placeholder:
(context, url) => (context, url) =>
...@@ -266,7 +268,8 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -266,7 +268,8 @@ class _MyHomePageState extends State<MyHomePage> {
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment:
MainAxisAlignment.center,
children: [ children: [
Text( Text(
"${profile.employeeName}", "${profile.employeeName}",
...@@ -341,7 +344,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -341,7 +344,7 @@ class _MyHomePageState extends State<MyHomePage> {
top: 0, top: 0,
bottom: 10, bottom: 10,
), ),
margin:EdgeInsets.only(top: 10), margin: EdgeInsets.only(top: 10),
child: GridView.builder( child: GridView.builder(
itemCount: filteredItems.length, itemCount: filteredItems.length,
gridDelegate: gridDelegate:
...@@ -401,7 +404,8 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -401,7 +404,8 @@ class _MyHomePageState extends State<MyHomePage> {
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: builder:
(context) => Gentrackerdashboard(), (context) =>
Gentrackerdashboard(),
), ),
); );
break; break;
...@@ -429,7 +433,8 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -429,7 +433,8 @@ class _MyHomePageState extends State<MyHomePage> {
res = await Navigator.push( res = await Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => InventoryScreen(), builder:
(context) => InventoryScreen(),
), ),
); );
break; break;
...@@ -443,7 +448,8 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -443,7 +448,8 @@ class _MyHomePageState extends State<MyHomePage> {
builder: builder:
(context) => WebWhizzdomScreen( (context) => WebWhizzdomScreen(
whizzdom_url: whizzdom_url:
homescreen.whizzdomPageUrl, homescreen
.whizzdomPageUrl,
), ),
), ),
); );
...@@ -455,7 +461,8 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -455,7 +461,8 @@ class _MyHomePageState extends State<MyHomePage> {
res = await Navigator.push( res = await Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => Commondashboard(), builder:
(context) => Commondashboard(),
), ),
); );
break; break;
...@@ -473,7 +480,8 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -473,7 +480,8 @@ class _MyHomePageState extends State<MyHomePage> {
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: builder:
(context) => Ordermoduledashboard(), (context) =>
Ordermoduledashboard(),
), ),
); );
case "CRM": case "CRM":
...@@ -498,10 +506,14 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -498,10 +506,14 @@ class _MyHomePageState extends State<MyHomePage> {
borderRadius: BorderRadius.circular(30), borderRadius: BorderRadius.circular(30),
), ),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
SvgPicture.asset(item['icon']!, height: 45), SvgPicture.asset(
item['icon']!,
height: 45,
),
SizedBox(height: 10), SizedBox(height: 10),
Text(item['name']!), Text(item['name']!),
], ],
......
...@@ -32,7 +32,6 @@ class Paymentrequestionlistdetails extends StatefulWidget { ...@@ -32,7 +32,6 @@ class Paymentrequestionlistdetails extends StatefulWidget {
class _PaymentrequestionlistdetailsState class _PaymentrequestionlistdetailsState
extends State<Paymentrequestionlistdetails> { extends State<Paymentrequestionlistdetails> {
Dropdowntheme ddtheme = Dropdowntheme(); Dropdowntheme ddtheme = Dropdowntheme();
TextEditingController approvedAmount = TextEditingController(); TextEditingController approvedAmount = TextEditingController();
TextEditingController remarks = TextEditingController(); TextEditingController remarks = TextEditingController();
...@@ -55,11 +54,9 @@ class _PaymentrequestionlistdetailsState ...@@ -55,11 +54,9 @@ class _PaymentrequestionlistdetailsState
bool isLevel2Finalized = false; bool isLevel2Finalized = false;
// Final decision on whether to show buttons // Final decision on whether to show buttons
bool shouldShowButtons = false; bool shouldShowButtons = false;
@override @override
void initState() { void initState() {
// TODO: implement initState // TODO: implement initState
...@@ -95,7 +92,9 @@ class _PaymentrequestionlistdetailsState ...@@ -95,7 +92,9 @@ class _PaymentrequestionlistdetailsState
if (widget.mode == "apr_lvl1") { if (widget.mode == "apr_lvl1") {
shouldShowButtons = !isLevel1Finalized; shouldShowButtons = !isLevel1Finalized;
} else if (widget.mode == "apr_lvl2") { } else if (widget.mode == "apr_lvl2") {
shouldShowButtons = !isLevel2Finalized && [ shouldShowButtons =
!isLevel2Finalized &&
[
"Requested", "Requested",
"Level 1 Approved", "Level 1 Approved",
"Level 1 approved", "Level 1 approved",
...@@ -109,7 +108,12 @@ class _PaymentrequestionlistdetailsState ...@@ -109,7 +108,12 @@ class _PaymentrequestionlistdetailsState
return WillPopScope( return WillPopScope(
child: Scaffold( child: Scaffold(
resizeToAvoidBottomInset: true, resizeToAvoidBottomInset: true,
appBar: appbar2(context, widget.pageName,provider.resetAll,SizedBox(width: 0,)), appBar: appbar2(
context,
widget.pageName,
provider.resetAll,
SizedBox(width: 0),
),
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
body: SafeArea( body: SafeArea(
child: Container( child: Container(
...@@ -199,8 +203,8 @@ class _PaymentrequestionlistdetailsState ...@@ -199,8 +203,8 @@ class _PaymentrequestionlistdetailsState
), ),
Divider(thickness: 0.5, color: Color(0xFFD7D7D7)), Divider(thickness: 0.5, color: Color(0xFFD7D7D7)),
...List.generate(provider.subHeadings.length, (j) { ...List.generate(provider.subHeadings.length, (j) {
if(provider.Headings[j] == if (provider.Headings[j] == "Attachment" &&
"Attachment"&&req_det.attachmentViewFileName==""){ req_det.attachmentViewFileName == "") {
return SizedBox.shrink(); return SizedBox.shrink();
} }
return Container( return Container(
...@@ -301,7 +305,8 @@ class _PaymentrequestionlistdetailsState ...@@ -301,7 +305,8 @@ class _PaymentrequestionlistdetailsState
), ),
), ),
), ),
floatingActionButton: (["admin", "self"].contains(widget.mode) || !shouldShowButtons) floatingActionButton:
(["admin", "self"].contains(widget.mode) || !shouldShowButtons)
? Container(height: 0) ? Container(height: 0)
: Container( : Container(
margin: EdgeInsets.symmetric(horizontal: 10), margin: EdgeInsets.symmetric(horizontal: 10),
...@@ -317,7 +322,11 @@ class _PaymentrequestionlistdetailsState ...@@ -317,7 +322,11 @@ class _PaymentrequestionlistdetailsState
Expanded( Expanded(
child: InkResponse( child: InkResponse(
onTap: () { onTap: () {
_showLevelRejectionSheet(context); print(provider.requestsDetails.id);
_showLevelRejectionSheet(
context,
provider.requestsDetails.id,
);
}, },
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
...@@ -340,15 +349,22 @@ class _PaymentrequestionlistdetailsState ...@@ -340,15 +349,22 @@ class _PaymentrequestionlistdetailsState
), ),
), ),
SizedBox(width: 10), SizedBox(width: 10),
if (["apr_lvl1", "apr_lvl2"].contains(widget.mode)) ...[ if ([
"apr_lvl1",
"apr_lvl2",
].contains(widget.mode)) ...[
Expanded( Expanded(
child: InkResponse( child: InkResponse(
onTap: () { onTap: () {
provider.approveRejectPaymentRequestAPIFunction( provider
.approveRejectPaymentRequestAPIFunction(
context,
provider.requestsDetails.id,
);
_showLevelApprovalSheet(
context, context,
provider.requestsDetails.id, provider.requestsDetails.id,
); );
_showLevelApprovalSheet(context);
}, },
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
...@@ -370,17 +386,20 @@ class _PaymentrequestionlistdetailsState ...@@ -370,17 +386,20 @@ class _PaymentrequestionlistdetailsState
), ),
), ),
), ),
] ] else if (widget.mode == "process") ...[
else if (widget.mode == "process") ...[
Expanded( Expanded(
child: InkResponse( child: InkResponse(
onTap: () { onTap: () {
provider.approveRejectPaymentRequestAPIFunction( provider
.approveRejectPaymentRequestAPIFunction(
context, context,
provider.requestsDetails.id, provider.requestsDetails.id,
); );
provider.preValues(); provider.preValues();
_showAddPaymentSheet(context); _showAddPaymentSheet(
context,
provider.requestsDetails.id,
);
}, },
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
...@@ -407,7 +426,8 @@ class _PaymentrequestionlistdetailsState ...@@ -407,7 +426,8 @@ class _PaymentrequestionlistdetailsState
), ),
), ),
), ),
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat, floatingActionButtonLocation:
FloatingActionButtonLocation.centerFloat,
// bottomNavigationBar: // bottomNavigationBar:
// (["admin", "self"].contains(widget.mode)) // (["admin", "self"].contains(widget.mode))
// ? Container(height: 0) // ? Container(height: 0)
...@@ -539,7 +559,7 @@ class _PaymentrequestionlistdetailsState ...@@ -539,7 +559,7 @@ class _PaymentrequestionlistdetailsState
); );
} }
Future<void> _showLevelApprovalSheet(BuildContext context) { Future<void> _showLevelApprovalSheet(BuildContext context, paymentID) {
return showModalBottomSheet( return showModalBottomSheet(
useSafeArea: true, useSafeArea: true,
isDismissible: true, isDismissible: true,
...@@ -561,7 +581,9 @@ class _PaymentrequestionlistdetailsState ...@@ -561,7 +581,9 @@ class _PaymentrequestionlistdetailsState
right: 15, right: 15,
top: 10, top: 10,
), ),
padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom,), padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom,
),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
...@@ -668,20 +690,26 @@ class _PaymentrequestionlistdetailsState ...@@ -668,20 +690,26 @@ class _PaymentrequestionlistdetailsState
}, },
dropdownSearchData: DropdownSearchData( dropdownSearchData: DropdownSearchData(
searchInnerWidgetHeight: 50, searchInnerWidgetHeight: 50,
searchController: provider.paymentAccountSearchController, searchController:
provider
.paymentAccountSearchController,
searchInnerWidget: Padding( searchInnerWidget: Padding(
padding: const EdgeInsets.all(8), padding: const EdgeInsets.all(8),
child: TextFormField( child: TextFormField(
controller: provider.paymentAccountSearchController, controller:
provider
.paymentAccountSearchController,
decoration: InputDecoration( decoration: InputDecoration(
isDense: true, isDense: true,
contentPadding: const EdgeInsets.symmetric( contentPadding:
const EdgeInsets.symmetric(
horizontal: 10, horizontal: 10,
vertical: 8, vertical: 8,
), ),
hintText: 'Search account...', hintText: 'Search account...',
border: OutlineInputBorder( border: OutlineInputBorder(
borderRadius: BorderRadius.circular(8), borderRadius:
BorderRadius.circular(8),
), ),
), ),
), ),
...@@ -689,21 +717,26 @@ class _PaymentrequestionlistdetailsState ...@@ -689,21 +717,26 @@ class _PaymentrequestionlistdetailsState
searchMatchFn: (item, searchValue) { searchMatchFn: (item, searchValue) {
return item.value?.name return item.value?.name
?.toLowerCase() ?.toLowerCase()
.contains(searchValue.toLowerCase()) ?? .contains(
searchValue.toLowerCase(),
) ??
false; false;
}, },
// Optional: clear search text when dropdown closes
// Optional: clear search text when dropdown closes
), ),
onMenuStateChange: (isOpen) { onMenuStateChange: (isOpen) {
if (!isOpen) { if (!isOpen) {
provider.paymentAccountSearchController.clear(); provider.paymentAccountSearchController
.clear();
} }
}, },
buttonStyleData: ddtheme.buttonStyleData, buttonStyleData: ddtheme.buttonStyleData,
iconStyleData: ddtheme.iconStyleData, iconStyleData: ddtheme.iconStyleData,
menuItemStyleData: ddtheme.menuItemStyleData, menuItemStyleData:
dropdownStyleData: ddtheme.dropdownStyleData, ddtheme.menuItemStyleData,
dropdownStyleData:
ddtheme.dropdownStyleData,
), ),
), ),
], ],
...@@ -715,7 +748,7 @@ class _PaymentrequestionlistdetailsState ...@@ -715,7 +748,7 @@ class _PaymentrequestionlistdetailsState
.paymentrequisitionApproveSubmitAPIFunction( .paymentrequisitionApproveSubmitAPIFunction(
context, context,
widget.mode, widget.mode,
provider.paymentsReqDetails.id, paymentID,
approvedAmount.text, approvedAmount.text,
remarks.text, remarks.text,
provider.selectedID, provider.selectedID,
...@@ -737,6 +770,8 @@ class _PaymentrequestionlistdetailsState ...@@ -737,6 +770,8 @@ class _PaymentrequestionlistdetailsState
child: Center( child: Center(
child: Text( child: Text(
"Submit", "Submit",
///approve
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white),
), ),
...@@ -756,7 +791,7 @@ class _PaymentrequestionlistdetailsState ...@@ -756,7 +791,7 @@ class _PaymentrequestionlistdetailsState
); );
} }
Future<void> _showLevelRejectionSheet(BuildContext context) { Future<void> _showLevelRejectionSheet(BuildContext context, paymentID) {
return showModalBottomSheet( return showModalBottomSheet(
useSafeArea: true, useSafeArea: true,
isDismissible: true, isDismissible: true,
...@@ -778,7 +813,9 @@ class _PaymentrequestionlistdetailsState ...@@ -778,7 +813,9 @@ class _PaymentrequestionlistdetailsState
right: 15, right: 15,
top: 10, top: 10,
), ),
padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom,), padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom,
),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
...@@ -829,7 +866,7 @@ class _PaymentrequestionlistdetailsState ...@@ -829,7 +866,7 @@ class _PaymentrequestionlistdetailsState
.paymentrequisitionRejectSubmitAPIFunction( .paymentrequisitionRejectSubmitAPIFunction(
context, context,
widget.mode, widget.mode,
provider.paymentsReqDetails.id, paymentID,
remarks.text, remarks.text,
); );
}, },
...@@ -849,6 +886,8 @@ class _PaymentrequestionlistdetailsState ...@@ -849,6 +886,8 @@ class _PaymentrequestionlistdetailsState
child: Center( child: Center(
child: Text( child: Text(
"Submit", "Submit",
///reject
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white),
), ),
...@@ -868,7 +907,7 @@ class _PaymentrequestionlistdetailsState ...@@ -868,7 +907,7 @@ class _PaymentrequestionlistdetailsState
); );
} }
Future<void> _showAddPaymentSheet(BuildContext context) { Future<void> _showAddPaymentSheet(BuildContext context, paymentID) {
return showModalBottomSheet( return showModalBottomSheet(
useSafeArea: true, useSafeArea: true,
isDismissible: true, isDismissible: true,
...@@ -890,7 +929,9 @@ class _PaymentrequestionlistdetailsState ...@@ -890,7 +929,9 @@ class _PaymentrequestionlistdetailsState
right: 15, right: 15,
top: 10, top: 10,
), ),
padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom,), padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom,
),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
...@@ -967,8 +1008,10 @@ class _PaymentrequestionlistdetailsState ...@@ -967,8 +1008,10 @@ class _PaymentrequestionlistdetailsState
}, },
buttonStyleData: ddtheme.buttonStyleData, buttonStyleData: ddtheme.buttonStyleData,
iconStyleData: ddtheme.iconStyleData, iconStyleData: ddtheme.iconStyleData,
menuItemStyleData: ddtheme.menuItemStyleData, menuItemStyleData:
dropdownStyleData: ddtheme.dropdownStyleData, ddtheme.menuItemStyleData,
dropdownStyleData:
ddtheme.dropdownStyleData,
), ),
), ),
], ],
...@@ -1138,7 +1181,7 @@ class _PaymentrequestionlistdetailsState ...@@ -1138,7 +1181,7 @@ class _PaymentrequestionlistdetailsState
.paymentrequisitionProcessSubmitAPIFunction( .paymentrequisitionProcessSubmitAPIFunction(
context, context,
widget.mode, widget.mode,
provider.paymentsReqDetails.id, paymentID,
paymentReferenceNumber.text, paymentReferenceNumber.text,
remarks.text, remarks.text,
provider.imagePath, provider.imagePath,
...@@ -1160,6 +1203,8 @@ class _PaymentrequestionlistdetailsState ...@@ -1160,6 +1203,8 @@ class _PaymentrequestionlistdetailsState
child: Center( child: Center(
child: Text( child: Text(
"Submit", "Submit",
///add payment
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white),
), ),
......
...@@ -55,7 +55,10 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> { ...@@ -55,7 +55,10 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
child: SvgPicture.asset("assets/svg/scanner.svg"), child: SvgPicture.asset("assets/svg/scanner.svg"),
), ),
), ),
body: SafeArea(child: provider.technician_complaint_list.isNotEmpty?Container( body: SafeArea(
child:
provider.technician_complaint_list.isNotEmpty
? Container(
child: ListView.builder( child: ListView.builder(
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
...@@ -80,7 +83,8 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> { ...@@ -80,7 +83,8 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Expanded( Expanded(
...@@ -152,16 +156,24 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> { ...@@ -152,16 +156,24 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
.complaintId, .complaintId,
); );
}, },
child: SvgPicture.asset("assets/svg/ic_more.svg",height: 30,), child: SvgPicture.asset(
"assets/svg/ic_more.svg",
height: 30,
),
), ),
), ),
], ],
), ),
Divider(thickness: 0.5, color: Color(0xFFD7D7D7)), Divider(
...List.generate(3, (j) { thickness: 0.5,
color: Color(0xFFD7D7D7),
),
...List.generate(4, (j) {
final textheads = [ final textheads = [
"Complaint ID", "Complaint ID",
"Product Name", "Product Name",
"Engine Number",
"Address", "Address",
]; ];
final textSubheads = [ final textSubheads = [
...@@ -171,12 +183,17 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> { ...@@ -171,12 +183,17 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
provider provider
.technician_complaint_list[index] .technician_complaint_list[index]
.productName, .productName,
provider
.technician_complaint_list[index]
.engineNo,
provider provider
.technician_complaint_list[index] .technician_complaint_list[index]
.address, .address,
]; ];
return Container( return Container(
padding: EdgeInsets.symmetric(vertical: 3), padding: EdgeInsets.symmetric(
vertical: 3,
),
child: Row( child: Row(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
...@@ -219,14 +236,16 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> { ...@@ -219,14 +236,16 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
); );
}, },
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment:
crossAxisAlignment: CrossAxisAlignment.center, MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [ children: [
Text( Text(
"View Details", "View Details",
style: TextStyle( style: TextStyle(
color: AppColors.app_blue, color: AppColors.app_blue,
fontFamily: "JakartaMedium" fontFamily: "JakartaMedium",
), ),
), ),
SizedBox(width: 5), SizedBox(width: 5),
...@@ -241,7 +260,9 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> { ...@@ -241,7 +260,9 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
); );
}, },
), ),
):Emptywidget(context),) )
: Emptywidget(context),
),
), ),
); );
}, },
...@@ -346,9 +367,10 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> { ...@@ -346,9 +367,10 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
leading: SvgPicture.asset( leading: SvgPicture.asset(
"assets/svg/${assetnames[index]}.svg", "assets/svg/${assetnames[index]}.svg",
), ),
title: Text(Headingnames[index],style: TextStyle( title: Text(
fontFamily: "JakartaMedium" Headingnames[index],
),), style: TextStyle(fontFamily: "JakartaMedium"),
),
trailing: SvgPicture.asset( trailing: SvgPicture.asset(
"assets/svg/arrow_right_new.svg", "assets/svg/arrow_right_new.svg",
), ),
......
...@@ -10,7 +10,7 @@ import '../../Utils/dropdownTheme.dart'; ...@@ -10,7 +10,7 @@ import '../../Utils/dropdownTheme.dart';
class Updatecomplaints extends StatefulWidget { class Updatecomplaints extends StatefulWidget {
final ComplaintID; final ComplaintID;
const Updatecomplaints({super.key,required this.ComplaintID}); const Updatecomplaints({super.key, required this.ComplaintID});
@override @override
State<Updatecomplaints> createState() => _UpdatecomplaintsState(); State<Updatecomplaints> createState() => _UpdatecomplaintsState();
...@@ -18,14 +18,17 @@ class Updatecomplaints extends StatefulWidget { ...@@ -18,14 +18,17 @@ class Updatecomplaints extends StatefulWidget {
class _UpdatecomplaintsState extends State<Updatecomplaints> { class _UpdatecomplaintsState extends State<Updatecomplaints> {
Dropdowntheme ddtheme = Dropdowntheme(); Dropdowntheme ddtheme = Dropdowntheme();
@override @override
void initState() { void initState() {
// TODO: implement initState // TODO: implement initState
super.initState(); super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
final provider = Provider.of<Pendingcomplaintsprovider>(context,listen: false); final provider = Provider.of<Pendingcomplaintsprovider>(
context,
listen: false,
);
provider.checkDropDownSelected(); provider.checkDropDownSelected();
},); });
} }
@override @override
...@@ -40,14 +43,19 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> { ...@@ -40,14 +43,19 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
}, },
child: Scaffold( child: Scaffold(
resizeToAvoidBottomInset: true, resizeToAvoidBottomInset: true,
appBar: appbar2(context, "Update Complaint",provider.resetAll,SizedBox(width: 0,)), appBar: appbar2(
context,
"Update Complaint",
provider.resetAll,
SizedBox(width: 0),
),
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
body: SafeArea( body: SafeArea(
child: Container( child: Container(
padding: EdgeInsets.symmetric(horizontal: 10,vertical: 10), padding: EdgeInsets.symmetric(horizontal: 10, vertical: 10),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(20) borderRadius: BorderRadius.circular(20),
), ),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
...@@ -77,15 +85,14 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> { ...@@ -77,15 +85,14 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
Expanded( Expanded(
child: Text( child: Text(
'Select Complaint Status', 'Select Complaint Status',
style: TextStyle( style: TextStyle(fontSize: 14),
fontSize: 14,
),
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
), ),
], ],
), ),
items: provider.CompletedStatus.map( items:
provider.CompletedStatus.map(
(complaintStatus) => (complaintStatus) =>
DropdownMenuItem<String>( DropdownMenuItem<String>(
value: complaintStatus['name'], value: complaintStatus['name'],
...@@ -96,7 +103,8 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> { ...@@ -96,7 +103,8 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
), ),
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
)).toList(), ),
).toList(),
value: provider.statusID, value: provider.statusID,
onChanged: (value) { onChanged: (value) {
if (value != null) { if (value != null) {
...@@ -114,10 +122,8 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> { ...@@ -114,10 +122,8 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
], ],
), ),
), ),
SizedBox(height: 5,), SizedBox(height: 5),
ErrorWidget(context, provider.statusError), ErrorWidget(context, provider.statusError),
if(provider.statusID!=null)...[
if(provider.statusID!="Pending")...[
Padding( Padding(
padding: const EdgeInsets.only(bottom: 5.0), padding: const EdgeInsets.only(bottom: 5.0),
child: Text( child: Text(
...@@ -134,51 +140,41 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> { ...@@ -134,51 +140,41 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColors.text_field_color, color: AppColors.text_field_color,
borderRadius: borderRadius: BorderRadius.circular(14),
BorderRadius.circular(14),
), ),
child: Padding( child: Padding(
padding: padding: const EdgeInsets.fromLTRB(10.0, 0.0, 10, 0),
const EdgeInsets.fromLTRB(
10.0, 0.0, 10, 0),
child: TextFormField( child: TextFormField(
controller: controller: provider.fsrNumberController,
provider.fsrNumberController, keyboardType: TextInputType.text,
keyboardType:
TextInputType.text,
onChanged: (value) { onChanged: (value) {
provider.fsrError = ""; provider.fsrError = "";
}, },
decoration: InputDecoration( decoration: InputDecoration(
hintText: "Enter FSR Number",
hintText:
"Enter FSR Number",
hintStyle: TextStyle( hintStyle: TextStyle(
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
color: Color(0xFFB4BEC0), color: Color(0xFFB4BEC0),
fontSize: 14 fontSize: 14,
), ),
enabledBorder: enabledBorder: InputBorder.none,
InputBorder.none, focusedBorder: InputBorder.none,
focusedBorder:
InputBorder.none,
), ),
), ),
), ),
), ),
SizedBox(height: 5,), SizedBox(height: 5),
ErrorWidget(context, provider.fsrError) ErrorWidget(context, provider.fsrError),
]
],
Row( Row(
children: [ children: [
Expanded( Expanded(
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
horizontal: 5.0,vertical: 3), horizontal: 5.0,
vertical: 3,
),
child: Text( child: Text(
"Select Time", "Select Time",
style: TextStyle( style: TextStyle(
...@@ -191,7 +187,8 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> { ...@@ -191,7 +187,8 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
Expanded( Expanded(
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
horizontal: 20.0), horizontal: 20.0,
),
child: Text( child: Text(
"Running Hours", "Running Hours",
style: TextStyle( style: TextStyle(
...@@ -201,7 +198,6 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> { ...@@ -201,7 +198,6 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
), ),
), ),
), ),
], ],
), ),
...@@ -211,8 +207,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> { ...@@ -211,8 +207,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColors.text_field_color, color: AppColors.text_field_color,
borderRadius: borderRadius: BorderRadius.circular(14),
BorderRadius.circular(14),
), ),
child: InkWell( child: InkWell(
onTap: () { onTap: () {
...@@ -221,31 +216,33 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> { ...@@ -221,31 +216,33 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
height: 45, height: 45,
margin: margin: EdgeInsets.only(
EdgeInsets.only( left: 15.0,
left: 15.0, right: 15.0), right: 15.0,
),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular( borderRadius: BorderRadius.circular(15.0),
15.0),
), ),
child: Row(children: [ child: Row(
children: [
Text( Text(
provider.selectedTime.hour provider.selectedTime.hour.toString() +
.toString() +
":" + ":" +
provider.selectedTime.minute provider.selectedTime.minute
.toString() ?? .toString() ??
"Enter in Time", "Enter in Time",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w400), fontWeight: FontWeight.w400,
),
),
],
),
), ),
]),
), ),
)),
), ),
SizedBox(width: 10,), ),
SizedBox(width: 10),
Expanded( Expanded(
child: Container( child: Container(
height: 50, height: 50,
...@@ -253,36 +250,31 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> { ...@@ -253,36 +250,31 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColors.text_field_color, color: AppColors.text_field_color,
borderRadius: borderRadius: BorderRadius.circular(14),
BorderRadius.circular(14),
), ),
child: Padding( child: Padding(
padding: padding: const EdgeInsets.fromLTRB(
const EdgeInsets.fromLTRB( 10.0,
10.0, 0.0, 10, 0), 0.0,
10,
0,
),
child: TextFormField( child: TextFormField(
controller: controller: provider.runningHoursController,
provider.runningHoursController, keyboardType: TextInputType.text,
keyboardType:
TextInputType.text,
onChanged: (value) { onChanged: (value) {
provider.runningHoursError = ""; provider.runningHoursError = "";
}, },
decoration: InputDecoration( decoration: InputDecoration(
hintText: "Enter Running Hours",
hintText:
"Enter Running Hours",
hintStyle: TextStyle( hintStyle: TextStyle(
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
color: Color(0xFFB4BEC0), color: Color(0xFFB4BEC0),
fontSize: 14 fontSize: 14,
), ),
enabledBorder: enabledBorder: InputBorder.none,
InputBorder.none, focusedBorder: InputBorder.none,
focusedBorder:
InputBorder.none,
), ),
), ),
), ),
), ),
...@@ -290,11 +282,15 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> { ...@@ -290,11 +282,15 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
], ],
), ),
Row( Row(
children: [ children: [
Expanded(child: SizedBox()), Expanded(child: SizedBox()),
SizedBox(width: 10,), SizedBox(width: 10),
Expanded(child: ErrorWidget(context, provider.runningHoursError)), Expanded(
child: ErrorWidget(
context,
provider.runningHoursError,
),
),
], ],
), ),
InkResponse( InkResponse(
...@@ -304,44 +300,53 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> { ...@@ -304,44 +300,53 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
child: Container( child: Container(
margin: EdgeInsets.symmetric(vertical: 10), margin: EdgeInsets.symmetric(vertical: 10),
height: 45, height: 45,
width: MediaQuery width: MediaQuery.of(context).size.width,
.of(context)
.size
.width,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xFFE6F6FF), color: Color(0xFFE6F6FF),
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
border: Border.all( border: Border.all(
color: AppColors.app_blue, width: 0.5) color: AppColors.app_blue,
width: 0.5,
),
), ),
child: Center( child: Center(
child: Text("Scan Document", style: TextStyle( child: Text(
color: AppColors.app_blue "Scan Document",
),), style: TextStyle(color: AppColors.app_blue),
), ),
), ),
), ),
if(provider.imagePicked==1 && provider.imagePath!=null)...[ ),
if (provider.imagePicked == 1 &&
provider.imagePath != null) ...[
Padding( Padding(
padding: const EdgeInsets.symmetric(vertical: 4.0), padding: const EdgeInsets.symmetric(vertical: 4.0),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Text("${provider.imagePath}",style: TextStyle( Text(
"${provider.imagePath}",
style: TextStyle(
color: AppColors.semi_black, color: AppColors.semi_black,
fontSize: 11, fontSize: 11,
fontWeight: FontWeight.w600 fontWeight: FontWeight.w600,
),), ),
),
InkResponse( InkResponse(
onTap: () { onTap: () {
provider.imagePicked = 0; provider.imagePicked = 0;
provider.imagePath = null; provider.imagePath = null;
provider.imageFilePath = null; provider.imageFilePath = null;
}, },
child: SvgPicture.asset("assets/svg/ic_close.svg",width: 15,height: 15,)) child: SvgPicture.asset(
"assets/svg/ic_close.svg",
width: 15,
height: 15,
),
),
], ],
), ),
) ),
], ],
Padding( Padding(
padding: const EdgeInsets.only(bottom: 5.0), padding: const EdgeInsets.only(bottom: 5.0),
...@@ -359,47 +364,39 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> { ...@@ -359,47 +364,39 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColors.text_field_color, color: AppColors.text_field_color,
borderRadius: borderRadius: BorderRadius.circular(14),
BorderRadius.circular(14),
), ),
child: Padding( child: Padding(
padding: padding: const EdgeInsets.fromLTRB(10.0, 0.0, 10, 0),
const EdgeInsets.fromLTRB(
10.0, 0.0, 10, 0),
child: TextFormField( child: TextFormField(
controller: controller: provider.feedbackController,
provider.feedbackController,
maxLines: 60, maxLines: 60,
keyboardType: keyboardType: TextInputType.text,
TextInputType.text,
decoration: InputDecoration( decoration: InputDecoration(
hintText: "Enter Feedback",
hintText:
"Enter Feedback",
hintStyle: TextStyle( hintStyle: TextStyle(
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
color: Color(0xFFB4BEC0), color: Color(0xFFB4BEC0),
fontSize: 14 fontSize: 14,
), ),
enabledBorder: enabledBorder: InputBorder.none,
InputBorder.none, focusedBorder: InputBorder.none,
focusedBorder:
InputBorder.none,
), ),
), ),
), ),
), ),
], ],
), ),
), ),
), ),
), ),
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat, floatingActionButtonLocation:
FloatingActionButtonLocation.centerFloat,
floatingActionButton: InkResponse( floatingActionButton: InkResponse(
onTap:provider.submitLoading?null: () { onTap:
provider.submitLoading
? null
: () {
provider.submitLoading = true; provider.submitLoading = true;
provider.UpdateComplaintAPIFunction( provider.UpdateComplaintAPIFunction(
context, context,
...@@ -407,7 +404,8 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> { ...@@ -407,7 +404,8 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
provider.feedbackController.text, provider.feedbackController.text,
provider.fsrNumberController.text, provider.fsrNumberController.text,
provider.runningHoursController.text, provider.runningHoursController.text,
provider.statusID); provider.statusID,
);
}, },
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
...@@ -423,32 +421,38 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> { ...@@ -423,32 +421,38 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
borderRadius: BorderRadius.circular(15.0), borderRadius: BorderRadius.circular(15.0),
), ),
child: Center( child: Center(
child:provider.submitLoading?CircularProgressIndicator.adaptive( child:
provider.submitLoading
? CircularProgressIndicator.adaptive(
valueColor: AlwaysStoppedAnimation<Color>( valueColor: AlwaysStoppedAnimation<Color>(
AppColors.white) AppColors.white,
): Text( ),
)
: Text(
"Submit", "Submit",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 15, fontSize: 15,
fontFamily: "JakartaMedium", fontFamily: "JakartaMedium",
color: Colors.white), color: Colors.white,
),
), ),
), ),
), ),
), ),
), ),
); );
},); },
);
} }
Widget ErrorWidget(context, text) { Widget ErrorWidget(context, text) {
if (text != null) if (text != null)
return Text(text!, style: TextStyle(color: Colors.red, fontSize: 12)); return Text(text!, style: TextStyle(color: Colors.red, fontSize: 12));
else else
return SizedBox(height: 10); return SizedBox(height: 10);
} }
Future<void> _showAttachmentSheet(BuildContext context) { Future<void> _showAttachmentSheet(BuildContext context) {
return showModalBottomSheet( return showModalBottomSheet(
useSafeArea: true, useSafeArea: true,
...@@ -465,15 +469,11 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> { ...@@ -465,15 +469,11 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
child: Consumer<Pendingcomplaintsprovider>( child: Consumer<Pendingcomplaintsprovider>(
builder: (context, provider, child) { builder: (context, provider, child) {
return Padding( return Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
bottom: bottom:
MediaQuery MediaQuery.of(
.of(
context, context,
) ).viewInsets.bottom, // This handles keyboard
.viewInsets
.bottom, // This handles keyboard
), ),
child: Container( child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
...@@ -494,11 +494,11 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> { ...@@ -494,11 +494,11 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
"Select Source", "Select Source",
style: TextStyle( style: TextStyle(
color: AppColors.app_blue, color: AppColors.app_blue,
fontSize: 16 fontSize: 16,
), ),
), ),
), ),
SizedBox(height: 15,), SizedBox(height: 15),
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.of(context).pop(false); Navigator.of(context).pop(false);
...@@ -513,8 +513,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> { ...@@ -513,8 +513,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.of(context).pop(false); Navigator.of(context).pop(false);
provider.imgFromCamera( provider.imgFromCamera();
);
}, },
child: Container( child: Container(
height: 35, height: 35,
...@@ -534,5 +533,4 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> { ...@@ -534,5 +533,4 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
}, },
); );
} }
} }
...@@ -51,8 +51,14 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -51,8 +51,14 @@ class _VisitdetailsState extends State<Visitdetails> {
children: [ children: [
Text("Customer Details"), Text("Customer Details"),
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 10, vertical: 5), margin: EdgeInsets.symmetric(
padding: EdgeInsets.symmetric(horizontal: 15, vertical: 10), horizontal: 10,
vertical: 5,
),
padding: EdgeInsets.symmetric(
horizontal: 15,
vertical: 10,
),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(20),
...@@ -67,13 +73,12 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -67,13 +73,12 @@ class _VisitdetailsState extends State<Visitdetails> {
"Mail ID", "Mail ID",
]; ];
final textSubheads = [ final textSubheads = [
customerDetails.aname??"-", customerDetails.aname ?? "-",
customerDetails.mob1??"-", customerDetails.mob1 ?? "-",
customerDetails.mob2??"-", customerDetails.mob2 ?? "-",
customerDetails.mail??"-", customerDetails.mail ?? "-",
]; ];
return Container( return Container(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
vertical: 6, vertical: 6,
horizontal: 0, horizontal: 0,
...@@ -94,9 +99,11 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -94,9 +99,11 @@ class _VisitdetailsState extends State<Visitdetails> {
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
Text(textheads[j].toString(), Text(
textheads[j].toString(),
maxLines: 2, maxLines: 2,
overflow: TextOverflow.ellipsis,), overflow: TextOverflow.ellipsis,
),
SizedBox( SizedBox(
// height:45, // height:45,
width: width:
...@@ -105,11 +112,11 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -105,11 +112,11 @@ class _VisitdetailsState extends State<Visitdetails> {
).size.width * ).size.width *
0.75, 0.75,
child: Text( child: Text(
textSubheads[j]==""?"-": textSubheads[j] == ""
textSubheads[j], ? "-"
: textSubheads[j],
maxLines: 2, maxLines: 2,
overflow: overflow: TextOverflow.ellipsis,
TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
color: Color(0xFF818181), color: Color(0xFF818181),
), ),
...@@ -128,8 +135,14 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -128,8 +135,14 @@ class _VisitdetailsState extends State<Visitdetails> {
Text("Generator Details"), Text("Generator Details"),
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 10, vertical: 5), margin: EdgeInsets.symmetric(
padding: EdgeInsets.symmetric(horizontal: 15, vertical: 10), horizontal: 10,
vertical: 5,
),
padding: EdgeInsets.symmetric(
horizontal: 15,
vertical: 10,
),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(20),
...@@ -159,7 +172,9 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -159,7 +172,9 @@ class _VisitdetailsState extends State<Visitdetails> {
"${complaintDetails.dateOfSupply}", "${complaintDetails.dateOfSupply}",
]; ];
return Container( return Container(
padding: EdgeInsets.symmetric(vertical: 3), padding: EdgeInsets.symmetric(
vertical: 3,
),
child: Column( child: Column(
children: [ children: [
Row( Row(
...@@ -175,7 +190,9 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -175,7 +190,9 @@ class _VisitdetailsState extends State<Visitdetails> {
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
Text(textheads[j].toString()), Text(
textheads[j].toString(),
),
SizedBox( SizedBox(
// height:45, // height:45,
width: width:
...@@ -184,12 +201,17 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -184,12 +201,17 @@ class _VisitdetailsState extends State<Visitdetails> {
).size.width * ).size.width *
0.8, 0.8,
child: Text( child: Text(
textSubheads[j]==""?"-": textSubheads[j], textSubheads[j] == ""
? "-"
: textSubheads[j],
maxLines: 2, maxLines: 2,
overflow: overflow:
TextOverflow.ellipsis, TextOverflow
.ellipsis,
style: TextStyle( style: TextStyle(
color: Color(0xFF818181), color: Color(
0xFF818181,
),
), ),
), ),
), ),
...@@ -211,8 +233,14 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -211,8 +233,14 @@ class _VisitdetailsState extends State<Visitdetails> {
Text("Complaint Details"), Text("Complaint Details"),
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 10, vertical: 5), margin: EdgeInsets.symmetric(
padding: EdgeInsets.symmetric(horizontal: 15, vertical: 10), horizontal: 10,
vertical: 5,
),
padding: EdgeInsets.symmetric(
horizontal: 15,
vertical: 10,
),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(20),
...@@ -221,7 +249,6 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -221,7 +249,6 @@ class _VisitdetailsState extends State<Visitdetails> {
children: [ children: [
Row( Row(
children: [ children: [
SvgPicture.asset("assetName"),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: List.generate(4, (j) { children: List.generate(4, (j) {
...@@ -238,7 +265,9 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -238,7 +265,9 @@ class _VisitdetailsState extends State<Visitdetails> {
"${complaintDetails.complaintType}", "${complaintDetails.complaintType}",
]; ];
return Container( return Container(
padding: EdgeInsets.symmetric(vertical: 3), padding: EdgeInsets.symmetric(
vertical: 3,
),
child: Column( child: Column(
children: [ children: [
Row( Row(
...@@ -254,7 +283,9 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -254,7 +283,9 @@ class _VisitdetailsState extends State<Visitdetails> {
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
Text(textheads[j].toString()), Text(
textheads[j].toString(),
),
SizedBox( SizedBox(
// height:45, // height:45,
width: width:
...@@ -263,12 +294,17 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -263,12 +294,17 @@ class _VisitdetailsState extends State<Visitdetails> {
).size.width * ).size.width *
0.8, 0.8,
child: Text( child: Text(
textSubheads[j]==""?"-": textSubheads[j], textSubheads[j] == ""
? "-"
: textSubheads[j],
maxLines: 2, maxLines: 2,
overflow: overflow:
TextOverflow.ellipsis, TextOverflow
.ellipsis,
style: TextStyle( style: TextStyle(
color: Color(0xFF818181), color: Color(
0xFF818181,
),
), ),
), ),
), ),
...@@ -320,8 +356,10 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -320,8 +356,10 @@ class _VisitdetailsState extends State<Visitdetails> {
child: Text( child: Text(
"Followup Details", "Followup Details",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(color: Colors.white, style: TextStyle(
fontFamily: "JakartaMedium"), color: Colors.white,
fontFamily: "JakartaMedium",
),
), ),
), ),
), ),
......
...@@ -391,7 +391,13 @@ class ApiCalling { ...@@ -391,7 +391,13 @@ class ApiCalling {
// return null; // return null;
// } // }
if (check_out_pic != null) { if (check_out_pic != null) {
res = await postImageNew(data, {}, employeeCheckOutUrl, check_out_pic,'check_out_pic'); res = await postImageNew(
data,
{},
employeeCheckOutUrl,
check_out_pic,
'check_out_pic',
);
res = jsonDecode(res); res = jsonDecode(res);
} else { } else {
res = await post(data, employeeCheckOutUrl, {}); res = await post(data, employeeCheckOutUrl, {});
...@@ -943,7 +949,13 @@ class ApiCalling { ...@@ -943,7 +949,13 @@ class ApiCalling {
// } // }
if (payment_proof != null) { if (payment_proof != null) {
res = await postImageNew(data, {}, technicianAddPaymentCollectionUrl, payment_proof,'payment_proof'); res = await postImageNew(
data,
{},
technicianAddPaymentCollectionUrl,
payment_proof,
'payment_proof',
);
res = jsonDecode(res); res = jsonDecode(res);
return TechnicianAddPaymentCollectionResponse.fromJson(res); return TechnicianAddPaymentCollectionResponse.fromJson(res);
} else { } else {
...@@ -1150,7 +1162,13 @@ class ApiCalling { ...@@ -1150,7 +1162,13 @@ class ApiCalling {
// print(fsr_file); // print(fsr_file);
var res; var res;
if (fsr_file != null) { if (fsr_file != null) {
res = await postImageNew(data, {}, technicianUpdateVisitUrl, fsr_file,'fsr_file'); res = await postImageNew(
data,
{},
technicianUpdateVisitUrl,
fsr_file,
'fsr_file',
);
res = jsonDecode(res); res = jsonDecode(res);
return UpdateComplaintResponse.fromJson(res); return UpdateComplaintResponse.fromJson(res);
} else { } else {
...@@ -1327,7 +1345,6 @@ class ApiCalling { ...@@ -1327,7 +1345,6 @@ class ApiCalling {
var res; var res;
if (attachment != null) { if (attachment != null) {
res = await postImageNew( res = await postImageNew(
data, data,
{}, {},
...@@ -1469,14 +1486,12 @@ class ApiCalling { ...@@ -1469,14 +1486,12 @@ class ApiCalling {
"attachment", "attachment",
); );
res = jsonDecode(res); res = jsonDecode(res);
} else { } else {
res = await post(data, addPaymentReceiptSubmitUrl, {}); res = await post(data, addPaymentReceiptSubmitUrl, {});
res = jsonDecode(res.body); res = jsonDecode(res.body);
// return addReceiptPaymentResponse.fromJson(res); // return addReceiptPaymentResponse.fromJson(res);
} }
return addReceiptPaymentResponse.fromJson(res); return addReceiptPaymentResponse.fromJson(res);
} catch (e) { } catch (e) {
debugPrint('hello bev=bug $e '); debugPrint('hello bev=bug $e ');
return null; return null;
...@@ -1665,6 +1680,7 @@ class ApiCalling { ...@@ -1665,6 +1680,7 @@ class ApiCalling {
"attachment", "attachment",
); );
res = jsonDecode(res); res = jsonDecode(res);
print(data);
return approveRejectPaymentRequestResponse.fromJson(res); return approveRejectPaymentRequestResponse.fromJson(res);
} else { } else {
res = await post(data, approveRejectPaymentRequestSubmitUrl, {}); res = await post(data, approveRejectPaymentRequestSubmitUrl, {});
...@@ -2091,12 +2107,10 @@ class ApiCalling { ...@@ -2091,12 +2107,10 @@ class ApiCalling {
} }
} }
static Future<AddOrderViewResponse?> addOrderViewAPI( static Future<AddOrderViewResponse?> addOrderViewAPI(
empId, empId,
session, session,
mode mode,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
...@@ -2121,7 +2135,7 @@ class ApiCalling { ...@@ -2121,7 +2135,7 @@ class ApiCalling {
static Future<addOrderAccontDetailsResponse?> addOrderAccountDetailsAPI( static Future<addOrderAccontDetailsResponse?> addOrderAccountDetailsAPI(
empId, empId,
session, session,
account_id account_id,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
...@@ -2147,13 +2161,13 @@ class ApiCalling { ...@@ -2147,13 +2161,13 @@ class ApiCalling {
empId, empId,
session, session,
mode, mode,
text text,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
'session_id': (session).toString(), 'session_id': (session).toString(),
'mode':mode.toString(), 'mode': mode.toString(),
'text': (text).toString(), 'text': (text).toString(),
}; };
final res = await post(data, ordersAddOrderTpcAgentListUrl, {}); final res = await post(data, ordersAddOrderTpcAgentListUrl, {});
...@@ -2206,64 +2220,56 @@ class ApiCalling { ...@@ -2206,64 +2220,56 @@ class ApiCalling {
loc, loc,
requested_tpc_amount, requested_tpc_amount,
tpc_agent_id, tpc_agent_id,
po po,
) async { ) async {
try { try {
Map<String, String> data = {
Map<String, String> data = { 'emp_id': empId.toString(),
'emp_id':empId.toString(), 'session_id': session.toString(),
'session_id':session.toString(), 'mode': mode.toString(),
'mode':mode.toString(), 'sales_person_emp_id': sales_person_emp_id.toString(),
'sales_person_emp_id':sales_person_emp_id.toString(), 'selected_acc_id': selected_acc_id.toString(),
'selected_acc_id':selected_acc_id.toString(), 'dispatch_state_id': dispatch_state_id.toString(),
'dispatch_state_id':dispatch_state_id.toString(), 'dispatch_district_id': dispatch_district_id.toString(),
'dispatch_district_id':dispatch_district_id.toString(), 'dispatch_sub_location_id': dispatch_sub_location_id.toString(),
'dispatch_sub_location_id':dispatch_sub_location_id.toString(), 'dispatch_pincode': dispatch_pincode.toString(),
'dispatch_pincode':dispatch_pincode.toString(), 'dispatch_address': dispatch_address.toString(),
'dispatch_address':dispatch_address.toString(), 'basic_amount': basic_amount.toString(),
'basic_amount':basic_amount.toString(), 'cgst_amount': cgst_amount.toString(),
'cgst_amount':cgst_amount.toString(), 'sgst_amount': sgst_amount.toString(),
'sgst_amount':sgst_amount.toString(), 'igst_amount': igst_amount.toString(),
'igst_amount':igst_amount.toString(), 'total_amount': total_amount.toString(),
'total_amount':total_amount.toString(), 'order_received_date': order_received_date.toString(),
'order_received_date':order_received_date.toString(), 'note': note.toString(),
'note':note.toString(), 'unloading': unloading.toString(),
'unloading':unloading.toString(), 'freight': freight.toString(),
'freight':freight.toString(), 'erection': erection.toString(),
'erection':erection.toString(), 'tpc_applicable': tpc_applicable.toString(),
'tpc_applicable':tpc_applicable.toString(), 'billing_name': billing_name.toString(),
'billing_name':billing_name.toString(), 'billing_gst_no': billing_gst_no.toString(),
'billing_gst_no':billing_gst_no.toString(), 'billing_pincode': billing_pincode.toString(),
'billing_pincode':billing_pincode.toString(), 'billing_address': billing_address.toString(),
'billing_address':billing_address.toString(), 'billing_state': billing_state.toString(),
'billing_state':billing_state.toString(), 'billing_district': billing_district.toString(),
'billing_district':billing_district.toString(), 'billing_sub_locality': billing_sub_locality.toString(),
'billing_sub_locality':billing_sub_locality.toString(), 'order_products': jsonEncode(order_products).toString(),
'order_products':jsonEncode(order_products).toString(), 'lead_id': lead_id.toString(),
'lead_id':lead_id.toString(), 'feedback': feedback.toString(),
'feedback':feedback.toString(), 'in_time': in_time.toString(),
'in_time':in_time.toString(), 'loc': loc.toString(),
'loc':loc.toString(), 'requested_tpc_amount': requested_tpc_amount.toString(),
'requested_tpc_amount':requested_tpc_amount.toString(), 'tpc_agent_id': tpc_agent_id.toString(),
'tpc_agent_id':tpc_agent_id.toString(),
}; };
var res; var res;
print(data); print(data);
if (po != null) { if (po != null) {
res = await postImageNew( res = await postImageNew(data, {}, ordersAddOrderSubmitUrl, po, "po");
data,
{},
ordersAddOrderSubmitUrl,
po,
"po",
);
res = jsonDecode(res); res = jsonDecode(res);
} else { } else {
res = await post(data, ordersAddOrderSubmitUrl, {}); res = await post(data, ordersAddOrderSubmitUrl, {});
res = jsonDecode(res.body); res = jsonDecode(res.body);
} }
return CommonResponse.fromJson(res); return CommonResponse.fromJson(res);
} catch (e) { } catch (e) {
debugPrint('hello bev=bug $e '); debugPrint('hello bev=bug $e ');
return null; return null;
...@@ -2273,7 +2279,7 @@ class ApiCalling { ...@@ -2273,7 +2279,7 @@ class ApiCalling {
static Future<ordersListByModeFilterResponse?> ordersListByModeFilterAPI( static Future<ordersListByModeFilterResponse?> ordersListByModeFilterAPI(
empId, empId,
session, session,
mode mode,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
...@@ -2300,7 +2306,7 @@ class ApiCalling { ...@@ -2300,7 +2306,7 @@ class ApiCalling {
session, session,
mode, mode,
teamemployee, teamemployee,
status status,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
...@@ -2328,7 +2334,7 @@ class ApiCalling { ...@@ -2328,7 +2334,7 @@ class ApiCalling {
static Future<ordersDetailsByModeResponse?> ordersDetailsByModeAPI( static Future<ordersDetailsByModeResponse?> ordersDetailsByModeAPI(
empId, empId,
session, session,
order_id order_id,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
...@@ -2351,8 +2357,7 @@ class ApiCalling { ...@@ -2351,8 +2357,7 @@ class ApiCalling {
} }
} }
static Future<CommonResponse?> static Future<CommonResponse?> ordersDetailsFeedbackSubmissionAPI(
ordersDetailsFeedbackSubmissionAPI(
empId, empId,
session, session,
order_id, order_id,
...@@ -2404,25 +2409,25 @@ class ApiCalling { ...@@ -2404,25 +2409,25 @@ class ApiCalling {
vehicle_number, vehicle_number,
driver_name, driver_name,
driver_mobile_no, driver_mobile_no,
crm_order_p_id crm_order_p_id,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
'session_id': (session).toString(), 'session_id': (session).toString(),
"status":status.toString(), "status": status.toString(),
"type":type.toString(), "type": type.toString(),
"order_id":order_id.toString(), "order_id": order_id.toString(),
"feedback":feedback.toString(), "feedback": feedback.toString(),
"tpc_applicable":tpc_applicable.toString(), "tpc_applicable": tpc_applicable.toString(),
"tpc_approved_amount":tpc_approved_amount.toString(), "tpc_approved_amount": tpc_approved_amount.toString(),
"sale_order_number":sale_order_number.toString(), "sale_order_number": sale_order_number.toString(),
"edit_company_name":edit_company_name.toString(), "edit_company_name": edit_company_name.toString(),
"invoice_number":invoice_number.toString(), "invoice_number": invoice_number.toString(),
"vehicle_number":vehicle_number.toString(), "vehicle_number": vehicle_number.toString(),
"driver_name":driver_name.toString(), "driver_name": driver_name.toString(),
"driver_mobile_no":driver_mobile_no.toString(), "driver_mobile_no": driver_mobile_no.toString(),
"crm_order_p_id":crm_order_p_id.toString() "crm_order_p_id": crm_order_p_id.toString(),
}; };
final res = await post(data, ordersOrderApproveRejectUrl, {}); final res = await post(data, ordersOrderApproveRejectUrl, {});
if (res != null) { if (res != null) {
...@@ -2443,14 +2448,14 @@ class ApiCalling { ...@@ -2443,14 +2448,14 @@ class ApiCalling {
empId, empId,
session, session,
order_id, order_id,
feedback feedback,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
'session_id': (session).toString(), 'session_id': (session).toString(),
"order_id":order_id.toString(), "order_id": order_id.toString(),
"feedback":feedback.toString(), "feedback": feedback.toString(),
}; };
final res = await post(data, ordersOrderLDeleteUrl, {}); final res = await post(data, ordersOrderLDeleteUrl, {});
if (res != null) { if (res != null) {
...@@ -2500,19 +2505,19 @@ class ApiCalling { ...@@ -2500,19 +2505,19 @@ class ApiCalling {
payment_date, payment_date,
payment_type, payment_type,
ref_no, ref_no,
attachment attachment,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
'session_id': (session).toString(), 'session_id': (session).toString(),
'account_id':account_id.toString(), 'account_id': account_id.toString(),
'description':description.toString(), 'description': description.toString(),
'selected_orders':jsonEncode(selected_orders).toString(), 'selected_orders': jsonEncode(selected_orders).toString(),
'payment_amount':payment_amount.toString(), 'payment_amount': payment_amount.toString(),
'payment_date':payment_date.toString(), 'payment_date': payment_date.toString(),
'payment_type':payment_type.toString(), 'payment_type': payment_type.toString(),
'ref_no':ref_no.toString(), 'ref_no': ref_no.toString(),
}; };
var res; var res;
print(data); print(data);
...@@ -2531,12 +2536,12 @@ class ApiCalling { ...@@ -2531,12 +2536,12 @@ class ApiCalling {
// return CommonResponse.fromJson(res); // return CommonResponse.fromJson(res);
} }
return CommonResponse.fromJson(res); return CommonResponse.fromJson(res);
} catch (e) { } catch (e) {
debugPrint('hello bev=bug $e '); debugPrint('hello bev=bug $e ');
return null; return null;
} }
} }
static Future<CommonResponse?> ordersEditPaymentDetailsAPI( static Future<CommonResponse?> ordersEditPaymentDetailsAPI(
empId, empId,
session, session,
...@@ -2545,34 +2550,34 @@ class ApiCalling { ...@@ -2545,34 +2550,34 @@ class ApiCalling {
payment_type, payment_type,
ref_no, ref_no,
payment_date, payment_date,
amount amount,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
'session_id': (session).toString(), 'session_id': (session).toString(),
'payment_id':payment_id.toString(), 'payment_id': payment_id.toString(),
'description':description.toString(), 'description': description.toString(),
'payment_type':payment_type.toString(), 'payment_type': payment_type.toString(),
'payment_date':payment_date.toString(), 'payment_date': payment_date.toString(),
'ref_no':ref_no.toString(), 'ref_no': ref_no.toString(),
'amount':amount.toString(), 'amount': amount.toString(),
}; };
var res = await post(data, ordersEditPaymentDetailsUrl, {}); var res = await post(data, ordersEditPaymentDetailsUrl, {});
if(res!=null) { if (res != null) {
return CommonResponse.fromJson(jsonDecode(res.body)); return CommonResponse.fromJson(jsonDecode(res.body));
}else{ } else {
debugPrint("Null Response"); debugPrint("Null Response");
} }
} catch (e) { } catch (e) {
debugPrint('hello bev=bug $e '); debugPrint('hello bev=bug $e ');
return null; return null;
} }
} }
static Future<EditPaymentDetailsAdjustedOrdersViewResponse?> ordersEditPaymentDetailsAdjustedOrdersViewAPI( static Future<EditPaymentDetailsAdjustedOrdersViewResponse?>
ordersEditPaymentDetailsAdjustedOrdersViewAPI(
empId, empId,
session, session,
payment_id, payment_id,
...@@ -2581,70 +2586,79 @@ class ApiCalling { ...@@ -2581,70 +2586,79 @@ class ApiCalling {
Map<String, String> data = { Map<String, String> data = {
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
'session_id': (session).toString(), 'session_id': (session).toString(),
'payment_id':payment_id.toString(), 'payment_id': payment_id.toString(),
}; };
var res = await post(data, ordersEditPaymentDetailsAdjustedOrdersViewUrl, {}); var res = await post(
if(res!=null) { data,
ordersEditPaymentDetailsAdjustedOrdersViewUrl,
{},
);
if (res != null) {
print("edit adjusted : ${res.body}"); print("edit adjusted : ${res.body}");
return EditPaymentDetailsAdjustedOrdersViewResponse.fromJson(jsonDecode(res.body)); return EditPaymentDetailsAdjustedOrdersViewResponse.fromJson(
}else{ jsonDecode(res.body),
);
} else {
debugPrint("Null Response"); debugPrint("Null Response");
} }
} catch (e) { } catch (e) {
debugPrint('hello bev=bug $e '); debugPrint('hello bev=bug $e ');
return null; return null;
} }
} }
static Future<EditPaymentDetailsAdjustedOrdersViewResponse?> ordersEditPaymentDetailsAdjustedOrdersUpdateAPI(
static Future<EditPaymentDetailsAdjustedOrdersViewResponse?>
ordersEditPaymentDetailsAdjustedOrdersUpdateAPI(
empId, empId,
session, session,
payment_id, payment_id,
update_amounts, update_amounts,
insert_amounts insert_amounts,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
'session_id': (session).toString(), 'session_id': (session).toString(),
'payment_id':payment_id.toString(), 'payment_id': payment_id.toString(),
'update_amounts':jsonEncode(update_amounts).toString(), 'update_amounts': jsonEncode(update_amounts).toString(),
'insert_amounts':jsonEncode(insert_amounts).toString(), 'insert_amounts': jsonEncode(insert_amounts).toString(),
}; };
var res = await post(data, ordersEditPaymentDetailsAdjustedOrdersUrl, {}); var res = await post(data, ordersEditPaymentDetailsAdjustedOrdersUrl, {});
if(res!=null) { if (res != null) {
return EditPaymentDetailsAdjustedOrdersViewResponse.fromJson(jsonDecode(res.body)); return EditPaymentDetailsAdjustedOrdersViewResponse.fromJson(
}else{ jsonDecode(res.body),
);
} else {
debugPrint("Null Response"); debugPrint("Null Response");
} }
} catch (e) { } catch (e) {
debugPrint('hello bev=bug $e '); debugPrint('hello bev=bug $e ');
return null; return null;
} }
} }
static Future<AddOrderPaymentSelectAccountResponse?> AddOrderPaymentSelectAccountAPI( static Future<AddOrderPaymentSelectAccountResponse?>
empId, AddOrderPaymentSelectAccountAPI(empId, session, mode, search_term) async {
session,
mode,
search_term
) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
'session_id': (session).toString(), 'session_id': (session).toString(),
'mode':mode.toString(), 'mode': mode.toString(),
'search_term':search_term.toString(), 'search_term': search_term.toString(),
}; };
final res = await post(data, ordersAddPaymentSelectAccountForOrderUrl, {}); final res = await post(
data,
ordersAddPaymentSelectAccountForOrderUrl,
{},
);
if (res != null) { if (res != null) {
print(data); print(data);
print("PaymentSeralectAccount${res.body}"); print("PaymentSeralectAccount${res.body}");
return AddOrderPaymentSelectAccountResponse.fromJson(jsonDecode(res.body)); return AddOrderPaymentSelectAccountResponse.fromJson(
jsonDecode(res.body),
);
} else { } else {
debugPrint("Null Response"); debugPrint("Null Response");
return null; return null;
...@@ -2655,22 +2669,21 @@ class ApiCalling { ...@@ -2655,22 +2669,21 @@ class ApiCalling {
} }
} }
static Future<AddOrderPaymentSelectOrderResponse?> AddOrderPaymentSelectOrderAPI( static Future<AddOrderPaymentSelectOrderResponse?>
empId, AddOrderPaymentSelectOrderAPI(empId, session, account_id) async {
session,
account_id,
) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
'session_id': (session).toString(), 'session_id': (session).toString(),
'account_id':account_id.toString(), 'account_id': account_id.toString(),
}; };
final res = await post(data, ordersAddPaymentSelectOrderUrl, {}); final res = await post(data, ordersAddPaymentSelectOrderUrl, {});
if (res != null) { if (res != null) {
print(data); print(data);
debugPrint("add order payment selected order: ${res.body}"); debugPrint("add order payment selected order: ${res.body}");
return AddOrderPaymentSelectOrderResponse.fromJson(jsonDecode(res.body)); return AddOrderPaymentSelectOrderResponse.fromJson(
jsonDecode(res.body),
);
} else { } else {
debugPrint("Null Response"); debugPrint("Null Response");
return null; return null;
...@@ -2684,7 +2697,7 @@ class ApiCalling { ...@@ -2684,7 +2697,7 @@ class ApiCalling {
static Future<paymentListByModeFilterResponse?> paymentListByModeFilterAPI( static Future<paymentListByModeFilterResponse?> paymentListByModeFilterAPI(
empId, empId,
session, session,
mode mode,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
...@@ -2739,15 +2752,15 @@ class ApiCalling { ...@@ -2739,15 +2752,15 @@ class ApiCalling {
session, session,
payment_id, payment_id,
type, type,
remarks remarks,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
'session_id': (session).toString(), 'session_id': (session).toString(),
"payment_id":payment_id.toString(), "payment_id": payment_id.toString(),
"type":type.toString(), "type": type.toString(),
"remarks":remarks.toString() "remarks": remarks.toString(),
}; };
final res = await post(data, ordersPaymentListApproveRejectUrl, {}); final res = await post(data, ordersPaymentListApproveRejectUrl, {});
if (res != null) { if (res != null) {
...@@ -2773,7 +2786,7 @@ class ApiCalling { ...@@ -2773,7 +2786,7 @@ class ApiCalling {
Map<String, String> data = { Map<String, String> data = {
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
'session_id': (session).toString(), 'session_id': (session).toString(),
"payment_id":payment_id.toString(), "payment_id": payment_id.toString(),
}; };
final res = await post(data, ordersPaymentListDeleteUrl, {}); final res = await post(data, ordersPaymentListDeleteUrl, {});
if (res != null) { if (res != null) {
...@@ -2790,11 +2803,10 @@ class ApiCalling { ...@@ -2790,11 +2803,10 @@ class ApiCalling {
} }
} }
static Future<paymentDetailsByModeFilterResponse?> paymentsDetailsByModeAPI( static Future<paymentDetailsByModeFilterResponse?> paymentsDetailsByModeAPI(
empId, empId,
session, session,
payment_id payment_id,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
...@@ -2806,7 +2818,9 @@ class ApiCalling { ...@@ -2806,7 +2818,9 @@ class ApiCalling {
if (res != null) { if (res != null) {
print(data); print(data);
debugPrint(res.body); debugPrint(res.body);
return paymentDetailsByModeFilterResponse.fromJson(jsonDecode(res.body)); return paymentDetailsByModeFilterResponse.fromJson(
jsonDecode(res.body),
);
} else { } else {
debugPrint("Null Response"); debugPrint("Null Response");
return null; return null;
...@@ -2817,9 +2831,7 @@ class ApiCalling { ...@@ -2817,9 +2831,7 @@ class ApiCalling {
} }
} }
static Future<CommonResponse?> ordersAddTPCAgentAPI(
static Future<CommonResponse?>
ordersAddTPCAgentAPI(
empId, empId,
session, session,
agent_name, agent_name,
...@@ -2835,13 +2847,13 @@ class ApiCalling { ...@@ -2835,13 +2847,13 @@ class ApiCalling {
Map<String, String> data = { Map<String, String> data = {
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
'session_id': (session).toString(), 'session_id': (session).toString(),
'agent_name':agent_name.toString(), 'agent_name': agent_name.toString(),
'mobile_number':mobile_number.toString(), 'mobile_number': mobile_number.toString(),
'bank_name':bank_name.toString(), 'bank_name': bank_name.toString(),
'bank_account_no':bank_account_no.toString(), 'bank_account_no': bank_account_no.toString(),
'bank_ifsc_code':bank_ifsc_code.toString(), 'bank_ifsc_code': bank_ifsc_code.toString(),
'bank_beneficiary_name':bank_beneficiary_name.toString(), 'bank_beneficiary_name': bank_beneficiary_name.toString(),
'note':note.toString(), 'note': note.toString(),
}; };
var res; var res;
if (id_proof != null) { if (id_proof != null) {
...@@ -2865,11 +2877,7 @@ class ApiCalling { ...@@ -2865,11 +2877,7 @@ class ApiCalling {
} }
} }
static Future<TPCListResponse?> TPCAgentListAPI( static Future<TPCListResponse?> TPCAgentListAPI(empId, session, mode) async {
empId,
session,
mode
) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
...@@ -2894,7 +2902,7 @@ class ApiCalling { ...@@ -2894,7 +2902,7 @@ class ApiCalling {
static Future<TPCAgentDetailsResponse?> TPCAgentDetailsAPI( static Future<TPCAgentDetailsResponse?> TPCAgentDetailsAPI(
empId, empId,
session, session,
tpc_agent_id tpc_agent_id,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
...@@ -2941,7 +2949,6 @@ class ApiCalling { ...@@ -2941,7 +2949,6 @@ class ApiCalling {
} }
} }
static Future<CommonResponse?> TpcIssueListApprovalAPI( static Future<CommonResponse?> TpcIssueListApprovalAPI(
empId, empId,
session, session,
...@@ -2949,16 +2956,16 @@ class ApiCalling { ...@@ -2949,16 +2956,16 @@ class ApiCalling {
tpc_payment_reference_no, tpc_payment_reference_no,
order_id, order_id,
order_tpc_feedback, order_tpc_feedback,
tpc_paym_attachment tpc_paym_attachment,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
'session_id': (session).toString(), 'session_id': (session).toString(),
'tpc_payment_mode':tpc_payment_mode.toString(), 'tpc_payment_mode': tpc_payment_mode.toString(),
'tpc_payment_reference_no':tpc_payment_reference_no.toString(), 'tpc_payment_reference_no': tpc_payment_reference_no.toString(),
'order_id':order_id.toString(), 'order_id': order_id.toString(),
'order_tpc_feedback':order_tpc_feedback.toString(), 'order_tpc_feedback': order_tpc_feedback.toString(),
}; };
var res; var res;
if (tpc_paym_attachment != null) { if (tpc_paym_attachment != null) {
...@@ -2985,7 +2992,7 @@ class ApiCalling { ...@@ -2985,7 +2992,7 @@ class ApiCalling {
///CRM Module ///CRM Module
static Future<AccessiblePagesResponse?> crmAccessiblePagesAPI( static Future<AccessiblePagesResponse?> crmAccessiblePagesAPI(
empId, empId,
session session,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
...@@ -3010,7 +3017,7 @@ class ApiCalling { ...@@ -3010,7 +3017,7 @@ class ApiCalling {
static Future<LeadListViewResponse?> crmLeadListViewAPI( static Future<LeadListViewResponse?> crmLeadListViewAPI(
empId, empId,
session, session,
mode mode,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
...@@ -3035,7 +3042,8 @@ class ApiCalling { ...@@ -3035,7 +3042,8 @@ class ApiCalling {
static Future<SubmitLeadListFilterResponse?> crmLeadListFilterSubmitAPI( static Future<SubmitLeadListFilterResponse?> crmLeadListFilterSubmitAPI(
empId, empId,
session,mode, session,
mode,
teamemployee, teamemployee,
slead_id, slead_id,
status, status,
...@@ -3055,19 +3063,19 @@ class ApiCalling { ...@@ -3055,19 +3063,19 @@ class ApiCalling {
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
'session_id': (session).toString(), 'session_id': (session).toString(),
'mode': (mode).toString(), 'mode': (mode).toString(),
'teamemployee':teamemployee.toString(), 'teamemployee': teamemployee.toString(),
'slead_id':slead_id.toString(), 'slead_id': slead_id.toString(),
'status':status.toString(), 'status': status.toString(),
'open_status':open_status.toString(), 'open_status': open_status.toString(),
'mob':mob.toString(), 'mob': mob.toString(),
'com':com.toString(), 'com': com.toString(),
'source':source.toString(), 'source': source.toString(),
'reference':reference.toString(), 'reference': reference.toString(),
'team':team.toString(), 'team': team.toString(),
'segment':segment.toString(), 'segment': segment.toString(),
'state':state.toString(), 'state': state.toString(),
'district':district.toString(), 'district': district.toString(),
'sub_loc':sub_loc.toString(), 'sub_loc': sub_loc.toString(),
}; };
final res = await post(data, crmLeadListFilterSubmitUrl, {}); final res = await post(data, crmLeadListFilterSubmitUrl, {});
if (res != null) { if (res != null) {
...@@ -3086,7 +3094,8 @@ class ApiCalling { ...@@ -3086,7 +3094,8 @@ class ApiCalling {
static Future<GetSourceOnReferenceResponse?> crmLeadListSourceOnReferenceAPI( static Future<GetSourceOnReferenceResponse?> crmLeadListSourceOnReferenceAPI(
empId, empId,
session,source_id session,
source_id,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
...@@ -3111,7 +3120,8 @@ class ApiCalling { ...@@ -3111,7 +3120,8 @@ class ApiCalling {
static Future<GetSegmentOnTeamResponse?> crmLeadListSegmentOnTeamAPI( static Future<GetSegmentOnTeamResponse?> crmLeadListSegmentOnTeamAPI(
empId, empId,
session,team_id session,
team_id,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
...@@ -3136,7 +3146,8 @@ class ApiCalling { ...@@ -3136,7 +3146,8 @@ class ApiCalling {
static Future<GetDistrictOnStateResponse?> crmDistrictsOnStateAPI( static Future<GetDistrictOnStateResponse?> crmDistrictsOnStateAPI(
empId, empId,
session,state_id session,
state_id,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
...@@ -3161,7 +3172,8 @@ class ApiCalling { ...@@ -3161,7 +3172,8 @@ class ApiCalling {
static Future<GetSubLocOnDistrictResponse?> crmSubLocOnDistrictAPI( static Future<GetSubLocOnDistrictResponse?> crmSubLocOnDistrictAPI(
empId, empId,
session,district_id session,
district_id,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
...@@ -3186,7 +3198,8 @@ class ApiCalling { ...@@ -3186,7 +3198,8 @@ class ApiCalling {
static Future<LeadListContactPopUpResponse?> crmLeadListContactPopUpAPI( static Future<LeadListContactPopUpResponse?> crmLeadListContactPopUpAPI(
empId, empId,
session,account_id session,
account_id,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
...@@ -3213,14 +3226,14 @@ class ApiCalling { ...@@ -3213,14 +3226,14 @@ class ApiCalling {
empId, empId,
session, session,
lead_id, lead_id,
mode mode,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
'session_id': (session).toString(), 'session_id': (session).toString(),
'lead_id': (lead_id).toString(), 'lead_id': (lead_id).toString(),
'mode':(mode).toString() 'mode': (mode).toString(),
}; };
final res = await post(data, crmLeadDetailsUrl, {}); final res = await post(data, crmLeadDetailsUrl, {});
if (res != null) { if (res != null) {
...@@ -3246,19 +3259,19 @@ class ApiCalling { ...@@ -3246,19 +3259,19 @@ class ApiCalling {
designation, designation,
mob2, mob2,
tel, tel,
email email,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
'session_id': (session).toString(), 'session_id': (session).toString(),
'acc_id': (acc_id).toString(), 'acc_id': (acc_id).toString(),
'name':(name).toString(), 'name': (name).toString(),
'mob1':(mob1).toString(), 'mob1': (mob1).toString(),
'designation':(designation).toString(), 'designation': (designation).toString(),
'mob2':(mob2).toString(), 'mob2': (mob2).toString(),
'tel':(tel).toString(), 'tel': (tel).toString(),
'email':(email).toString(), 'email': (email).toString(),
}; };
final res = await post(data, crmLeadDetailsAddContactUrl, {}); final res = await post(data, crmLeadDetailsAddContactUrl, {});
if (res != null) { if (res != null) {
...@@ -3284,19 +3297,19 @@ class ApiCalling { ...@@ -3284,19 +3297,19 @@ class ApiCalling {
designation, designation,
mob2, mob2,
tel, tel,
email email,
) async { ) async {
try { try {
Map<String, String> data = { Map<String, String> data = {
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
'session_id': (session).toString(), 'session_id': (session).toString(),
'contact_id': (contact_id).toString(), 'contact_id': (contact_id).toString(),
'name':(name).toString(), 'name': (name).toString(),
'mob1':(mob1).toString(), 'mob1': (mob1).toString(),
'designation':(designation).toString(), 'designation': (designation).toString(),
'mob2':(mob2).toString(), 'mob2': (mob2).toString(),
'tel':(tel).toString(), 'tel': (tel).toString(),
'email':(email).toString(), 'email': (email).toString(),
}; };
final res = await post(data, crmLeadDetailsEditContactUrl, {}); final res = await post(data, crmLeadDetailsEditContactUrl, {});
if (res != null) { if (res != null) {
...@@ -3326,9 +3339,9 @@ class ApiCalling { ...@@ -3326,9 +3339,9 @@ class ApiCalling {
'emp_id': (empId).toString(), 'emp_id': (empId).toString(),
'session_id': (session).toString(), 'session_id': (session).toString(),
'lead_id': (lead_id).toString(), 'lead_id': (lead_id).toString(),
'appointment_date':(appointment_date).toString(), 'appointment_date': (appointment_date).toString(),
'type':(type).toString(), 'type': (type).toString(),
'note':(note).toString(), 'note': (note).toString(),
}; };
final res = await post(data, crmLeadDetailsAddAppointmentUrl, {}); final res = await post(data, crmLeadDetailsAddAppointmentUrl, {});
if (res != null) { if (res != null) {
...@@ -3345,7 +3358,6 @@ class ApiCalling { ...@@ -3345,7 +3358,6 @@ class ApiCalling {
} }
} }
// static Future<CommonResponse?> TpcIssueListApprovalAPI( // static Future<CommonResponse?> TpcIssueListApprovalAPI(
// empId, // empId,
// session, // session,
......
...@@ -37,10 +37,10 @@ packages: ...@@ -37,10 +37,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: async name: async
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.12.0" version: "2.13.0"
barcode: barcode:
dependency: transitive dependency: transitive
description: description:
...@@ -285,10 +285,10 @@ packages: ...@@ -285,10 +285,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: fake_async name: fake_async
sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.3.2" version: "1.3.3"
ffi: ffi:
dependency: transitive dependency: transitive
description: description:
...@@ -932,26 +932,26 @@ packages: ...@@ -932,26 +932,26 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: leak_tracker name: leak_tracker
sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec sha256: "8dcda04c3fc16c14f48a7bb586d4be1f0d1572731b6d81d51772ef47c02081e0"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "10.0.8" version: "11.0.1"
leak_tracker_flutter_testing: leak_tracker_flutter_testing:
dependency: transitive dependency: transitive
description: description:
name: leak_tracker_flutter_testing name: leak_tracker_flutter_testing
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.9" version: "3.0.10"
leak_tracker_testing: leak_tracker_testing:
dependency: transitive dependency: transitive
description: description:
name: leak_tracker_testing name: leak_tracker_testing
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.1" version: "3.0.2"
lints: lints:
dependency: transitive dependency: transitive
description: description:
...@@ -1657,10 +1657,10 @@ packages: ...@@ -1657,10 +1657,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: vm_service name: vm_service
sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "14.3.1" version: "15.0.0"
web: web:
dependency: transitive dependency: transitive
description: description:
......
...@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev ...@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts # In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix. # of the product and file versions while build-number is used as the build suffix.
version: 1.0.87+91 version: 1.0.88+92
environment: environment:
sdk: ^3.7.2 sdk: ^3.7.2
......
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