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 {
int? error;
int? sessionExists;
TechnicianPendingComplaintsResponse(
{this.list, this.error, this.sessionExists});
TechnicianPendingComplaintsResponse({
this.list,
this.error,
this.sessionExists,
});
TechnicianPendingComplaintsResponse.fromJson(Map<String, dynamic> json) {
if (json['list'] != null) {
......@@ -39,19 +42,21 @@ class TP_List {
String? compRegDatetime;
String? mobileNo;
String? contactName;
String? engineNo;
TP_List(
{this.genId,
this.address,
this.loc,
this.complaintId,
this.companyName,
this.productName,
this.complaintCategory,
this.compRegDatetime,
this.mobileNo,
this.contactName,
});
TP_List({
this.genId,
this.address,
this.loc,
this.complaintId,
this.companyName,
this.productName,
this.complaintCategory,
this.compRegDatetime,
this.mobileNo,
this.contactName,
this.engineNo,
});
TP_List.fromJson(Map<String, dynamic> json) {
genId = json['gen_id'];
......@@ -64,6 +69,7 @@ class TP_List {
compRegDatetime = json['comp_reg_datetime'];
mobileNo = json['mobile_no'];
contactName = json['contact_name'];
engineNo = json['engine_number'];
}
Map<String, dynamic> toJson() {
......@@ -78,6 +84,7 @@ class TP_List {
data['comp_reg_datetime'] = this.compRegDatetime;
data['mobile_no'] = this.mobileNo;
data['contact_name'] = this.contactName;
data['engine_number'] = this.engineNo;
return data;
}
}
......@@ -18,7 +18,7 @@ PreferredSizeWidget appbar(BuildContext context, title) {
child: SvgPicture.asset("assets/svg/app_bar_back.svg", height: 25),
),
InkResponse(
onTap: () => Navigator.pop(context,true),
onTap: () => Navigator.pop(context, true),
child: Text(
title,
style: TextStyle(
......@@ -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(
automaticallyImplyLeading: false,
elevation: 2.0,
......@@ -50,14 +50,14 @@ PreferredSizeWidget appbar2(BuildContext context, title,reset,widget) {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
InkResponse(
onTap: (){
onTap: () {
reset();
Navigator.pop(context, true);
},
child: SvgPicture.asset("assets/svg/app_bar_back.svg", height: 25),
),
Expanded(
flex:4,
flex: 4,
child: InkResponse(
onTap: () {
reset();
......@@ -77,7 +77,7 @@ PreferredSizeWidget appbar2(BuildContext context, title,reset,widget) {
),
),
Spacer(),
widget
widget,
],
),
),
......@@ -94,11 +94,10 @@ Future<bool> onBackPressed(BuildContext context) async {
return true;
}
Widget Emptywidget(BuildContext context){
Widget Emptywidget(BuildContext context) {
return SizedBox(
height: MediaQuery.of(context).size.height*0.8,
child: Center(
child: Text("No Data Available")),
height: MediaQuery.of(context).size.height * 0.8,
child: Center(child: Text("No Data Available")),
);
}
......@@ -117,14 +116,14 @@ Widget errorWidget(context, text) {
}
Widget textControllerWidget(
context,
controller,
hintText,
Function(String)? onChanged,
inputtype,
readonly,
inputFormatters,
) {
context,
controller,
hintText,
Function(String)? onChanged,
inputtype,
readonly,
inputFormatters,
) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
......@@ -149,9 +148,9 @@ Widget textControllerWidget(
onChanged: onChanged,
inputFormatters:
inputFormatters != null
? [FilteringTextInputFormatter.digitsOnly]
: [],
inputFormatters != null
? [FilteringTextInputFormatter.digitsOnly]
: [],
decoration: InputDecoration(
hintText: hintText,
hintStyle: TextStyle(
......@@ -169,12 +168,13 @@ Widget textControllerWidget(
],
);
}
Widget textControllerReadonlyWidget(
context,
controller,
hintText,
Function(String)? onChanged,
) {
context,
controller,
hintText,
Function(String)? onChanged,
) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
......@@ -215,14 +215,15 @@ Widget textControllerReadonlyWidget(
],
);
}
class MyNavigatorObserver extends NavigatorObserver {
@override
void didPush(Route route, Route? previousRoute) {
super.didPush(route, previousRoute);
// Called when a route has been pushed onto the navigator.
didPushed = "true";
// print('Route pushed: ${route.settings.name}');
// print('didPushed$didPushed');
print('Route pushed: ${route.settings.name}');
print('didPushed$didPushed');
}
@override
......@@ -230,7 +231,7 @@ class MyNavigatorObserver extends NavigatorObserver {
super.didPop(route, previousRoute);
didPopped = "true";
// Called when a route has been popped off the navigator.
// print('Route popped: ${route.settings.name}');
// print('didPopped${didPopped}');
print('Route popped: ${route.settings.name}');
print('didPopped${didPopped}');
}
}
\ No newline at end of file
}
......@@ -57,7 +57,6 @@ Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
void main() async {
WidgetsFlutterBinding.ensureInitialized();
if (Platform.isAndroid) {
await Firebase.initializeApp(
options: FirebaseOptions(
......@@ -186,25 +185,28 @@ class MyApp extends StatelessWidget {
ChangeNotifierProvider(create: (_) => Paymentdetailsprovider()),
ChangeNotifierProvider(create: (_) => Generatordetailsprovider()),
ChangeNotifierProvider(create: (_) => Nearbygeneratorsprovider()),
///finance
ChangeNotifierProvider(create: (_) => Dashboardprovider(),),
ChangeNotifierProvider(create: (_) => Requestionlistprovider(),),
ChangeNotifierProvider(create: (_) => Requesitionlidtdetailsprovider(),),
ChangeNotifierProvider(create: (_) => Paymentrequisitionpaymentslistprovider(),),
ChangeNotifierProvider(create: (_) => Paymentreceiptsprovider(),),
ChangeNotifierProvider(create: (_) => Commonpagesprovider(),),
ChangeNotifierProvider(create: (_) => Accountslistprovider(),),
ChangeNotifierProvider(create: (_) => Accountdetailsprovider(),),
ChangeNotifierProvider(create: (_) => Accountledgerprovider(),),
ChangeNotifierProvider(create: (_) => Pagesdashboardprovider(),),
ChangeNotifierProvider(create: (_) => Paymentsprovider(),),
ChangeNotifierProvider(create: (_) => Tpcagentsprovider(),),
ChangeNotifierProvider(create: (_) => Addpaymentprovider(),),
ChangeNotifierProvider(create: (_) => Addorderprovider(),),
ChangeNotifierProvider(create: (_) => Editpaymentprovider(),),
ChangeNotifierProvider(create: (_) => Crmdashboardprovider(),),
ChangeNotifierProvider(create: (_) => Leadlistprovider(),),
ChangeNotifierProvider(create: (_) => crmLeadDetailsProvider(),),
ChangeNotifierProvider(create: (_) => Dashboardprovider()),
ChangeNotifierProvider(create: (_) => Requestionlistprovider()),
ChangeNotifierProvider(create: (_) => Requesitionlidtdetailsprovider()),
ChangeNotifierProvider(
create: (_) => Paymentrequisitionpaymentslistprovider(),
),
ChangeNotifierProvider(create: (_) => Paymentreceiptsprovider()),
ChangeNotifierProvider(create: (_) => Commonpagesprovider()),
ChangeNotifierProvider(create: (_) => Accountslistprovider()),
ChangeNotifierProvider(create: (_) => Accountdetailsprovider()),
ChangeNotifierProvider(create: (_) => Accountledgerprovider()),
ChangeNotifierProvider(create: (_) => Pagesdashboardprovider()),
ChangeNotifierProvider(create: (_) => Paymentsprovider()),
ChangeNotifierProvider(create: (_) => Tpcagentsprovider()),
ChangeNotifierProvider(create: (_) => Addpaymentprovider()),
ChangeNotifierProvider(create: (_) => Addorderprovider()),
ChangeNotifierProvider(create: (_) => Editpaymentprovider()),
ChangeNotifierProvider(create: (_) => Crmdashboardprovider()),
ChangeNotifierProvider(create: (_) => Leadlistprovider()),
ChangeNotifierProvider(create: (_) => crmLeadDetailsProvider()),
],
child: Builder(
builder: (BuildContext context) {
......@@ -213,7 +215,7 @@ class MyApp extends StatelessWidget {
builder: (BuildContext context, Widget? child) {
final MediaQueryData data = MediaQuery.of(context);
return MediaQuery(
data: data.copyWith(textScaleFactor: 1.0),
data: data.copyWith(textScaler: TextScaler.linear(1.0)),
child: child ?? Container(),
);
},
......@@ -271,7 +273,9 @@ class MyApp extends StatelessWidget {
interactive: true,
radius: Radius.circular(6),
thickness: WidgetStatePropertyAll(10),
thumbColor: WidgetStateProperty.all(AppColors.grey_semi.withOpacity(0.6))
thumbColor: WidgetStateProperty.all(
AppColors.grey_semi.withOpacity(0.6),
),
),
),
home: const Splash(),
......
......@@ -118,8 +118,8 @@ class _MyHomePageState extends State<MyHomePage> {
"Whizzdom",
"Common",
"Finance",
"Orders",
"CRM",
// "Orders",
// "CRM",
];
final icons = [
"assets/svg/home_icons_1.svg",
......@@ -131,8 +131,8 @@ class _MyHomePageState extends State<MyHomePage> {
"assets/svg/home_icons_81.svg",
"assets/svg/home_icons_9.svg",
"assets/svg/home_icons_10.svg",
"assets/svg/home_icons_11.svg",
"assets/svg/home_icons_12.svg",
// "assets/svg/home_icons_11.svg",
// "assets/svg/home_icons_12.svg",
];
final requiredRoles = [
"430",
......@@ -144,8 +144,8 @@ class _MyHomePageState extends State<MyHomePage> {
"431",
"430",
"430",
"430",
"430",
// "430",
// "430",
];
final filteredItems = <Map<String, String>>[];
......@@ -204,8 +204,9 @@ class _MyHomePageState extends State<MyHomePage> {
flex: 2,
child: SizedBox(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: [
SizedBox(
width: 66,
......@@ -217,7 +218,8 @@ class _MyHomePageState extends State<MyHomePage> {
child: CachedNetworkImage(
cacheKey: profile.profileImage,
fit: BoxFit.cover,
imageUrl: "${profile.profileImage}",
imageUrl:
"${profile.profileImage}",
useOldImageOnUrlChange: false,
placeholder:
(context, url) =>
......@@ -228,7 +230,7 @@ class _MyHomePageState extends State<MyHomePage> {
),
),
),
Row(
mainAxisAlignment:
MainAxisAlignment.center,
......@@ -266,7 +268,8 @@ class _MyHomePageState extends State<MyHomePage> {
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Text(
"${profile.employeeName}",
......@@ -341,7 +344,7 @@ class _MyHomePageState extends State<MyHomePage> {
top: 0,
bottom: 10,
),
margin:EdgeInsets.only(top: 10),
margin: EdgeInsets.only(top: 10),
child: GridView.builder(
itemCount: filteredItems.length,
gridDelegate:
......@@ -394,14 +397,15 @@ class _MyHomePageState extends State<MyHomePage> {
} else {
requestGpsPermission();
}
break;
case "Gen Tracker":
res = await Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => Gentrackerdashboard(),
(context) =>
Gentrackerdashboard(),
),
);
break;
......@@ -423,13 +427,14 @@ class _MyHomePageState extends State<MyHomePage> {
(context) => Nearbygenerators(),
),
);
break;
case "Inventory":
res = await Navigator.push(
context,
MaterialPageRoute(
builder: (context) => InventoryScreen(),
builder:
(context) => InventoryScreen(),
),
);
break;
......@@ -443,7 +448,8 @@ class _MyHomePageState extends State<MyHomePage> {
builder:
(context) => WebWhizzdomScreen(
whizzdom_url:
homescreen.whizzdomPageUrl,
homescreen
.whizzdomPageUrl,
),
),
);
......@@ -455,7 +461,8 @@ class _MyHomePageState extends State<MyHomePage> {
res = await Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Commondashboard(),
builder:
(context) => Commondashboard(),
),
);
break;
......@@ -473,10 +480,11 @@ class _MyHomePageState extends State<MyHomePage> {
context,
MaterialPageRoute(
builder:
(context) => Ordermoduledashboard(),
(context) =>
Ordermoduledashboard(),
),
);
case "CRM":
case "CRM":
res = await Navigator.push(
context,
MaterialPageRoute(
......@@ -498,10 +506,14 @@ class _MyHomePageState extends State<MyHomePage> {
borderRadius: BorderRadius.circular(30),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset(item['icon']!, height: 45),
SvgPicture.asset(
item['icon']!,
height: 45,
),
SizedBox(height: 10),
Text(item['name']!),
],
......
......@@ -32,7 +32,6 @@ class Paymentrequestionlistdetails extends StatefulWidget {
class _PaymentrequestionlistdetailsState
extends State<Paymentrequestionlistdetails> {
Dropdowntheme ddtheme = Dropdowntheme();
TextEditingController approvedAmount = TextEditingController();
TextEditingController remarks = TextEditingController();
......@@ -55,11 +54,9 @@ class _PaymentrequestionlistdetailsState
bool isLevel2Finalized = false;
// Final decision on whether to show buttons
// Final decision on whether to show buttons
bool shouldShowButtons = false;
@override
void initState() {
// TODO: implement initState
......@@ -95,11 +92,13 @@ class _PaymentrequestionlistdetailsState
if (widget.mode == "apr_lvl1") {
shouldShowButtons = !isLevel1Finalized;
} else if (widget.mode == "apr_lvl2") {
shouldShowButtons = !isLevel2Finalized && [
"Requested",
"Level 1 Approved",
"Level 1 approved",
].contains(req_det.status);
shouldShowButtons =
!isLevel2Finalized &&
[
"Requested",
"Level 1 Approved",
"Level 1 approved",
].contains(req_det.status);
} else if (widget.mode == "process") {
shouldShowButtons = [
"Level 2 Approved",
......@@ -109,7 +108,12 @@ class _PaymentrequestionlistdetailsState
return WillPopScope(
child: Scaffold(
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,
body: SafeArea(
child: Container(
......@@ -199,8 +203,8 @@ class _PaymentrequestionlistdetailsState
),
Divider(thickness: 0.5, color: Color(0xFFD7D7D7)),
...List.generate(provider.subHeadings.length, (j) {
if(provider.Headings[j] ==
"Attachment"&&req_det.attachmentViewFileName==""){
if (provider.Headings[j] == "Attachment" &&
req_det.attachmentViewFileName == "") {
return SizedBox.shrink();
}
return Container(
......@@ -301,113 +305,129 @@ class _PaymentrequestionlistdetailsState
),
),
),
floatingActionButton: (["admin", "self"].contains(widget.mode) || !shouldShowButtons)
? Container(height: 0)
: Container(
margin: EdgeInsets.symmetric(horizontal: 10),
alignment: Alignment.bottomCenter,
height: 60,
child: Container(
margin: EdgeInsets.only(bottom: 10),
alignment: Alignment.center,
height: 45,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: InkResponse(
onTap: () {
_showLevelRejectionSheet(context);
},
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: Color(0xFFFFEFEF),
border: Border.all(
color: Color(0xFFED3424),
width: 0.5,
),
),
child: Center(
child: Text(
"Reject",
style: TextStyle(
color: Color(0xFFED3424),
),
),
),
),
),
),
SizedBox(width: 10),
if (["apr_lvl1", "apr_lvl2"].contains(widget.mode)) ...[
Expanded(
child: InkResponse(
onTap: () {
provider.approveRejectPaymentRequestAPIFunction(
context,
provider.requestsDetails.id,
);
_showLevelApprovalSheet(context);
},
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: Color(0xFFE7FFE5),
border: Border.all(
color: Color(0xFF0D9C00),
width: 0.5,
),
),
child: Center(
child: Text(
"Approve",
style: TextStyle(
color: Color(0xFF0D9C00),
floatingActionButton:
(["admin", "self"].contains(widget.mode) || !shouldShowButtons)
? Container(height: 0)
: Container(
margin: EdgeInsets.symmetric(horizontal: 10),
alignment: Alignment.bottomCenter,
height: 60,
child: Container(
margin: EdgeInsets.only(bottom: 10),
alignment: Alignment.center,
height: 45,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: InkResponse(
onTap: () {
print(provider.requestsDetails.id);
_showLevelRejectionSheet(
context,
provider.requestsDetails.id,
);
},
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: Color(0xFFFFEFEF),
border: Border.all(
color: Color(0xFFED3424),
width: 0.5,
),
),
child: Center(
child: Text(
"Reject",
style: TextStyle(
color: Color(0xFFED3424),
),
),
),
),
),
),
),
),
),
]
else if (widget.mode == "process") ...[
Expanded(
child: InkResponse(
onTap: () {
provider.approveRejectPaymentRequestAPIFunction(
context,
provider.requestsDetails.id,
);
provider.preValues();
_showAddPaymentSheet(context);
},
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: Color(0xFFE7FFE5),
border: Border.all(
color: Color(0xFF0D9C00),
width: 0.5,
SizedBox(width: 10),
if ([
"apr_lvl1",
"apr_lvl2",
].contains(widget.mode)) ...[
Expanded(
child: InkResponse(
onTap: () {
provider
.approveRejectPaymentRequestAPIFunction(
context,
provider.requestsDetails.id,
);
_showLevelApprovalSheet(
context,
provider.requestsDetails.id,
);
},
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: Color(0xFFE7FFE5),
border: Border.all(
color: Color(0xFF0D9C00),
width: 0.5,
),
),
child: Center(
child: Text(
"Approve",
style: TextStyle(
color: Color(0xFF0D9C00),
),
),
),
),
),
),
),
child: Center(
child: Text(
"Add Payment",
style: TextStyle(
color: Color(0xFF0D9C00),
] else if (widget.mode == "process") ...[
Expanded(
child: InkResponse(
onTap: () {
provider
.approveRejectPaymentRequestAPIFunction(
context,
provider.requestsDetails.id,
);
provider.preValues();
_showAddPaymentSheet(
context,
provider.requestsDetails.id,
);
},
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: Color(0xFFE7FFE5),
border: Border.all(
color: Color(0xFF0D9C00),
width: 0.5,
),
),
child: Center(
child: Text(
"Add Payment",
style: TextStyle(
color: Color(0xFF0D9C00),
),
),
),
),
),
),
),
),
],
],
),
),
],
],
),
),
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
),
floatingActionButtonLocation:
FloatingActionButtonLocation.centerFloat,
// bottomNavigationBar:
// (["admin", "self"].contains(widget.mode))
// ? Container(height: 0)
......@@ -539,7 +559,7 @@ class _PaymentrequestionlistdetailsState
);
}
Future<void> _showLevelApprovalSheet(BuildContext context) {
Future<void> _showLevelApprovalSheet(BuildContext context, paymentID) {
return showModalBottomSheet(
useSafeArea: true,
isDismissible: true,
......@@ -561,7 +581,9 @@ class _PaymentrequestionlistdetailsState
right: 15,
top: 10,
),
padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom,),
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom,
),
child: SingleChildScrollView(
child: Column(
......@@ -668,42 +690,53 @@ class _PaymentrequestionlistdetailsState
},
dropdownSearchData: DropdownSearchData(
searchInnerWidgetHeight: 50,
searchController: provider.paymentAccountSearchController,
searchController:
provider
.paymentAccountSearchController,
searchInnerWidget: Padding(
padding: const EdgeInsets.all(8),
child: TextFormField(
controller: provider.paymentAccountSearchController,
controller:
provider
.paymentAccountSearchController,
decoration: InputDecoration(
isDense: true,
contentPadding: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 8,
),
contentPadding:
const EdgeInsets.symmetric(
horizontal: 10,
vertical: 8,
),
hintText: 'Search account...',
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
borderRadius:
BorderRadius.circular(8),
),
),
),
),
searchMatchFn: (item, searchValue) {
return item.value?.name
?.toLowerCase()
.contains(searchValue.toLowerCase()) ??
?.toLowerCase()
.contains(
searchValue.toLowerCase(),
) ??
false;
},
// Optional: clear search text when dropdown closes
// Optional: clear search text when dropdown closes
),
onMenuStateChange: (isOpen) {
if (!isOpen) {
provider.paymentAccountSearchController.clear();
provider.paymentAccountSearchController
.clear();
}
},
buttonStyleData: ddtheme.buttonStyleData,
iconStyleData: ddtheme.iconStyleData,
menuItemStyleData: ddtheme.menuItemStyleData,
dropdownStyleData: ddtheme.dropdownStyleData,
menuItemStyleData:
ddtheme.menuItemStyleData,
dropdownStyleData:
ddtheme.dropdownStyleData,
),
),
],
......@@ -715,7 +748,7 @@ class _PaymentrequestionlistdetailsState
.paymentrequisitionApproveSubmitAPIFunction(
context,
widget.mode,
provider.paymentsReqDetails.id,
paymentID,
approvedAmount.text,
remarks.text,
provider.selectedID,
......@@ -737,6 +770,8 @@ class _PaymentrequestionlistdetailsState
child: Center(
child: Text(
"Submit",
///approve
textAlign: TextAlign.center,
style: TextStyle(color: Colors.white),
),
......@@ -756,7 +791,7 @@ class _PaymentrequestionlistdetailsState
);
}
Future<void> _showLevelRejectionSheet(BuildContext context) {
Future<void> _showLevelRejectionSheet(BuildContext context, paymentID) {
return showModalBottomSheet(
useSafeArea: true,
isDismissible: true,
......@@ -778,7 +813,9 @@ class _PaymentrequestionlistdetailsState
right: 15,
top: 10,
),
padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom,),
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom,
),
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
......@@ -829,7 +866,7 @@ class _PaymentrequestionlistdetailsState
.paymentrequisitionRejectSubmitAPIFunction(
context,
widget.mode,
provider.paymentsReqDetails.id,
paymentID,
remarks.text,
);
},
......@@ -849,6 +886,8 @@ class _PaymentrequestionlistdetailsState
child: Center(
child: Text(
"Submit",
///reject
textAlign: TextAlign.center,
style: TextStyle(color: Colors.white),
),
......@@ -868,7 +907,7 @@ class _PaymentrequestionlistdetailsState
);
}
Future<void> _showAddPaymentSheet(BuildContext context) {
Future<void> _showAddPaymentSheet(BuildContext context, paymentID) {
return showModalBottomSheet(
useSafeArea: true,
isDismissible: true,
......@@ -890,7 +929,9 @@ class _PaymentrequestionlistdetailsState
right: 15,
top: 10,
),
padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom,),
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom,
),
child: SingleChildScrollView(
child: Column(
......@@ -967,8 +1008,10 @@ class _PaymentrequestionlistdetailsState
},
buttonStyleData: ddtheme.buttonStyleData,
iconStyleData: ddtheme.iconStyleData,
menuItemStyleData: ddtheme.menuItemStyleData,
dropdownStyleData: ddtheme.dropdownStyleData,
menuItemStyleData:
ddtheme.menuItemStyleData,
dropdownStyleData:
ddtheme.dropdownStyleData,
),
),
],
......@@ -1138,7 +1181,7 @@ class _PaymentrequestionlistdetailsState
.paymentrequisitionProcessSubmitAPIFunction(
context,
widget.mode,
provider.paymentsReqDetails.id,
paymentID,
paymentReferenceNumber.text,
remarks.text,
provider.imagePath,
......@@ -1160,6 +1203,8 @@ class _PaymentrequestionlistdetailsState
child: Center(
child: Text(
"Submit",
///add payment
textAlign: TextAlign.center,
style: TextStyle(color: Colors.white),
),
......
......@@ -55,193 +55,214 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
child: SvgPicture.asset("assets/svg/scanner.svg"),
),
),
body: SafeArea(child: provider.technician_complaint_list.isNotEmpty?Container(
child: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: provider.technician_complaint_list.length,
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
body: SafeArea(
child:
provider.technician_complaint_list.isNotEmpty
? Container(
child: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: provider.technician_complaint_list.length,
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
itemBuilder: (context, index) {
return Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
margin: EdgeInsets.symmetric(vertical: 5),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
flex: 1,
child: SvgPicture.asset(
"assets/svg/se_block_head.svg",
itemBuilder: (context, index) {
return Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
margin: EdgeInsets.symmetric(vertical: 5),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
),
),
SizedBox(width: 5),
Expanded(
flex: 4,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"${provider.technician_complaint_list[index].contactName}",
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontFamily: "JakartaMedium",
),
Row(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
flex: 1,
child: SvgPicture.asset(
"assets/svg/se_block_head.svg",
),
),
SizedBox(width: 5),
Expanded(
flex: 4,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
"${provider.technician_complaint_list[index].contactName}",
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontFamily: "JakartaMedium",
),
),
Text(
"${provider.technician_complaint_list[index].companyName}",
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color(0xFF818181),
fontSize: 14,
),
),
],
),
),
Spacer(),
Expanded(
flex: 1,
child: InkResponse(
onTap: () {
launch(
'tel://${provider.technician_complaint_list[index].mobileNo}',
);
},
child: SvgPicture.asset(
"assets/svg/se_call_customer.svg",
color: Color(0xFF0D9C00),
height: 20,
width: 20,
),
),
),
Expanded(
flex: 1,
child: InkResponse(
onTap: () {
_showOptionsSheet(
context,
provider
.technician_complaint_list[index]
.companyName,
provider
.technician_complaint_list[index]
.genId,
provider
.technician_complaint_list[index]
.complaintId,
);
},
child: SvgPicture.asset(
"assets/svg/ic_more.svg",
height: 30,
),
),
),
],
),
Text(
"${provider.technician_complaint_list[index].companyName}",
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color(0xFF818181),
fontSize: 14,
),
Divider(
thickness: 0.5,
color: Color(0xFFD7D7D7),
),
],
),
),
Spacer(),
Expanded(
flex: 1,
child: InkResponse(
onTap: () {
launch(
'tel://${provider.technician_complaint_list[index].mobileNo}',
);
},
child: SvgPicture.asset(
"assets/svg/se_call_customer.svg",
color: Color(0xFF0D9C00),
height: 20,
width: 20,
),
),
),
Expanded(
flex: 1,
child: InkResponse(
onTap: () {
_showOptionsSheet(
context,
provider
.technician_complaint_list[index]
.companyName,
...List.generate(4, (j) {
final textheads = [
"Complaint ID",
"Product Name",
provider
.technician_complaint_list[index]
.genId,
provider
.technician_complaint_list[index]
.complaintId,
);
},
child: SvgPicture.asset("assets/svg/ic_more.svg",height: 30,),
),
),
],
),
Divider(thickness: 0.5, color: Color(0xFFD7D7D7)),
...List.generate(3, (j) {
final textheads = [
"Complaint ID",
"Product Name",
"Address",
];
final textSubheads = [
provider
.technician_complaint_list[index]
.complaintId,
provider
.technician_complaint_list[index]
.productName,
provider
.technician_complaint_list[index]
.address,
];
return Container(
padding: EdgeInsets.symmetric(vertical: 3),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Expanded(
flex: 1,
child: Text(
textheads[j].toString(),
style: TextStyle(
fontFamily: "JakartaMedium",
),
),
),
Expanded(
flex: 2,
child: Text(
textSubheads[j].toString(),
style: TextStyle(
color: Color(0xFF818181),
"Engine Number",
"Address",
];
final textSubheads = [
provider
.technician_complaint_list[index]
.complaintId,
provider
.technician_complaint_list[index]
.productName,
provider
.technician_complaint_list[index]
.engineNo,
provider
.technician_complaint_list[index]
.address,
];
return Container(
padding: EdgeInsets.symmetric(
vertical: 3,
),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Expanded(
flex: 1,
child: Text(
textheads[j].toString(),
style: TextStyle(
fontFamily: "JakartaMedium",
),
),
),
Expanded(
flex: 2,
child: Text(
textSubheads[j].toString(),
style: TextStyle(
color: Color(0xFF818181),
),
),
),
],
),
);
}),
InkResponse(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => Visitdetails(
complaintID:
provider
.technician_complaint_list[index]
.complaintId,
),
),
);
},
child: Row(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Text(
"View Details",
style: TextStyle(
color: AppColors.app_blue,
fontFamily: "JakartaMedium",
),
),
SizedBox(width: 5),
SvgPicture.asset(
"assets/svg/next_button.svg",
),
],
),
),
),
],
),
);
}),
InkResponse(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => Visitdetails(
complaintID:
provider
.technician_complaint_list[index]
.complaintId,
),
],
),
);
},
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"View Details",
style: TextStyle(
color: AppColors.app_blue,
fontFamily: "JakartaMedium"
),
),
SizedBox(width: 5),
SvgPicture.asset(
"assets/svg/next_button.svg",
),
],
),
),
],
),
);
},
),
):Emptywidget(context),)
)
: Emptywidget(context),
),
),
);
},
......@@ -346,9 +367,10 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
leading: SvgPicture.asset(
"assets/svg/${assetnames[index]}.svg",
),
title: Text(Headingnames[index],style: TextStyle(
fontFamily: "JakartaMedium"
),),
title: Text(
Headingnames[index],
style: TextStyle(fontFamily: "JakartaMedium"),
),
trailing: SvgPicture.asset(
"assets/svg/arrow_right_new.svg",
),
......
......@@ -10,7 +10,7 @@ import '../../Utils/dropdownTheme.dart';
class Updatecomplaints extends StatefulWidget {
final ComplaintID;
const Updatecomplaints({super.key,required this.ComplaintID});
const Updatecomplaints({super.key, required this.ComplaintID});
@override
State<Updatecomplaints> createState() => _UpdatecomplaintsState();
......@@ -18,14 +18,17 @@ class Updatecomplaints extends StatefulWidget {
class _UpdatecomplaintsState extends State<Updatecomplaints> {
Dropdowntheme ddtheme = Dropdowntheme();
@override
@override
void initState() {
// TODO: implement initState
super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) {
final provider = Provider.of<Pendingcomplaintsprovider>(context,listen: false);
final provider = Provider.of<Pendingcomplaintsprovider>(
context,
listen: false,
);
provider.checkDropDownSelected();
},);
});
}
@override
......@@ -40,14 +43,19 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
},
child: Scaffold(
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,
body: SafeArea(
child: Container(
padding: EdgeInsets.symmetric(horizontal: 10,vertical: 10),
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20)
borderRadius: BorderRadius.circular(20),
),
child: SingleChildScrollView(
child: Column(
......@@ -55,7 +63,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 15),
Padding(
padding: const EdgeInsets.only(bottom: 5.0),
child: Text(
......@@ -77,26 +85,26 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
Expanded(
child: Text(
'Select Complaint Status',
style: TextStyle(
fontSize: 14,
),
style: TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
),
],
),
items: provider.CompletedStatus.map(
(complaintStatus) =>
DropdownMenuItem<String>(
value: complaintStatus['name'],
child: Text(
complaintStatus['name'] ?? '',
style: const TextStyle(
fontSize: 14,
items:
provider.CompletedStatus.map(
(complaintStatus) =>
DropdownMenuItem<String>(
value: complaintStatus['name'],
child: Text(
complaintStatus['name'] ?? '',
style: const TextStyle(
fontSize: 14,
),
overflow: TextOverflow.ellipsis,
),
overflow: TextOverflow.ellipsis,
),
)).toList(),
).toList(),
value: provider.statusID,
onChanged: (value) {
if (value != null) {
......@@ -114,10 +122,8 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
],
),
),
SizedBox(height: 5,),
SizedBox(height: 5),
ErrorWidget(context, provider.statusError),
if(provider.statusID!=null)...[
if(provider.statusID!="Pending")...[
Padding(
padding: const EdgeInsets.only(bottom: 5.0),
child: Text(
......@@ -128,57 +134,47 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
),
),
),
Container(
height: 50,
alignment: Alignment.center,
decoration: BoxDecoration(
color: AppColors.text_field_color,
borderRadius:
BorderRadius.circular(14),
),
child: Padding(
padding:
const EdgeInsets.fromLTRB(
10.0, 0.0, 10, 0),
child: TextFormField(
controller:
provider.fsrNumberController,
keyboardType:
TextInputType.text,
onChanged: (value) {
provider.fsrError = "";
},
decoration: InputDecoration(
hintText:
"Enter FSR Number",
hintStyle: TextStyle(
fontWeight: FontWeight.w400,
color: Color(0xFFB4BEC0),
fontSize: 14
),
enabledBorder:
InputBorder.none,
focusedBorder:
InputBorder.none,
),
Container(
height: 50,
alignment: Alignment.center,
decoration: BoxDecoration(
color: AppColors.text_field_color,
borderRadius: BorderRadius.circular(14),
),
child: Padding(
padding: const EdgeInsets.fromLTRB(10.0, 0.0, 10, 0),
child: TextFormField(
controller: provider.fsrNumberController,
keyboardType: TextInputType.text,
onChanged: (value) {
provider.fsrError = "";
},
decoration: InputDecoration(
hintText: "Enter FSR Number",
hintStyle: TextStyle(
fontWeight: FontWeight.w400,
color: Color(0xFFB4BEC0),
fontSize: 14,
),
enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none,
),
),
SizedBox(height: 5,),
ErrorWidget(context, provider.fsrError)
]
],
),
),
SizedBox(height: 5),
ErrorWidget(context, provider.fsrError),
Row(
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 5.0,vertical: 3),
horizontal: 5.0,
vertical: 3,
),
child: Text(
"Select Time",
style: TextStyle(
......@@ -191,7 +187,8 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
Expanded(
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 20.0),
horizontal: 20.0,
),
child: Text(
"Running Hours",
style: TextStyle(
......@@ -201,88 +198,83 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
),
),
),
],
),
Row(
children: [
Expanded(
child: Container(
decoration: BoxDecoration(
color: AppColors.text_field_color,
borderRadius:
BorderRadius.circular(14),
),
child: InkWell(
onTap: () {
provider.selectTime(context);
},
child: Container(
alignment: Alignment.center,
height: 45,
margin:
EdgeInsets.only(
left: 15.0, right: 15.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
15.0),
),
child: Row(children: [
decoration: BoxDecoration(
color: AppColors.text_field_color,
borderRadius: BorderRadius.circular(14),
),
child: InkWell(
onTap: () {
provider.selectTime(context);
},
child: Container(
alignment: Alignment.center,
height: 45,
margin: EdgeInsets.only(
left: 15.0,
right: 15.0,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.0),
),
child: Row(
children: [
Text(
provider.selectedTime.hour
.toString() +
":" +
provider.selectedTime.minute
.toString() ??
provider.selectedTime.hour.toString() +
":" +
provider.selectedTime.minute
.toString() ??
"Enter in Time",
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.w400),
fontWeight: FontWeight.w400,
),
),
]),
],
),
)),
),
),
),
),
SizedBox(width: 10,),
SizedBox(width: 10),
Expanded(
child: Container(
height: 50,
alignment: Alignment.center,
decoration: BoxDecoration(
color: AppColors.text_field_color,
borderRadius:
BorderRadius.circular(14),
borderRadius: BorderRadius.circular(14),
),
child: Padding(
padding:
const EdgeInsets.fromLTRB(
10.0, 0.0, 10, 0),
padding: const EdgeInsets.fromLTRB(
10.0,
0.0,
10,
0,
),
child: TextFormField(
controller:
provider.runningHoursController,
keyboardType:
TextInputType.text,
controller: provider.runningHoursController,
keyboardType: TextInputType.text,
onChanged: (value) {
provider.runningHoursError = "";
},
decoration: InputDecoration(
hintText:
"Enter Running Hours",
hintText: "Enter Running Hours",
hintStyle: TextStyle(
fontWeight: FontWeight.w400,
color: Color(0xFFB4BEC0),
fontSize: 14
fontWeight: FontWeight.w400,
color: Color(0xFFB4BEC0),
fontSize: 14,
),
enabledBorder:
InputBorder.none,
focusedBorder:
InputBorder.none,
enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none,
),
),
),
),
......@@ -290,11 +282,15 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
],
),
Row(
children: [
Expanded(child: SizedBox()),
SizedBox(width: 10,),
Expanded(child: ErrorWidget(context, provider.runningHoursError)),
SizedBox(width: 10),
Expanded(
child: ErrorWidget(
context,
provider.runningHoursError,
),
),
],
),
InkResponse(
......@@ -304,44 +300,53 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
child: Container(
margin: EdgeInsets.symmetric(vertical: 10),
height: 45,
width: MediaQuery
.of(context)
.size
.width,
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
color: Color(0xFFE6F6FF),
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: AppColors.app_blue, width: 0.5)
color: Color(0xFFE6F6FF),
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: AppColors.app_blue,
width: 0.5,
),
),
child: Center(
child: Text("Scan Document", style: TextStyle(
color: AppColors.app_blue
),),
child: Text(
"Scan Document",
style: TextStyle(color: AppColors.app_blue),
),
),
),
),
if(provider.imagePicked==1 && provider.imagePath!=null)...[
if (provider.imagePicked == 1 &&
provider.imagePath != null) ...[
Padding(
padding: const EdgeInsets.symmetric(vertical: 4.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("${provider.imagePath}",style: TextStyle(
color: AppColors.semi_black,
fontSize: 11,
fontWeight: FontWeight.w600
),),
Text(
"${provider.imagePath}",
style: TextStyle(
color: AppColors.semi_black,
fontSize: 11,
fontWeight: FontWeight.w600,
),
),
InkResponse(
onTap: () {
provider.imagePicked = 0;
provider.imagePath = null;
provider.imageFilePath = null;
},
child: SvgPicture.asset("assets/svg/ic_close.svg",width: 15,height: 15,))
onTap: () {
provider.imagePicked = 0;
provider.imagePath = null;
provider.imageFilePath = null;
},
child: SvgPicture.asset(
"assets/svg/ic_close.svg",
width: 15,
height: 15,
),
),
],
),
)
),
],
Padding(
padding: const EdgeInsets.only(bottom: 5.0),
......@@ -355,60 +360,53 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
),
Container(
height: 150,
alignment: Alignment.center,
decoration: BoxDecoration(
color: AppColors.text_field_color,
borderRadius:
BorderRadius.circular(14),
borderRadius: BorderRadius.circular(14),
),
child: Padding(
padding:
const EdgeInsets.fromLTRB(
10.0, 0.0, 10, 0),
padding: const EdgeInsets.fromLTRB(10.0, 0.0, 10, 0),
child: TextFormField(
controller:
provider.feedbackController,
controller: provider.feedbackController,
maxLines: 60,
keyboardType:
TextInputType.text,
keyboardType: TextInputType.text,
decoration: InputDecoration(
hintText:
"Enter Feedback",
hintText: "Enter Feedback",
hintStyle: TextStyle(
fontWeight: FontWeight.w400,
color: Color(0xFFB4BEC0),
fontSize: 14
fontWeight: FontWeight.w400,
color: Color(0xFFB4BEC0),
fontSize: 14,
),
enabledBorder:
InputBorder.none,
focusedBorder:
InputBorder.none,
enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none,
),
),
),
),
],
),
),
),
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
floatingActionButtonLocation:
FloatingActionButtonLocation.centerFloat,
floatingActionButton: InkResponse(
onTap:provider.submitLoading?null: () {
provider.submitLoading = true;
provider.UpdateComplaintAPIFunction(
context,
widget.ComplaintID,
provider.feedbackController.text,
provider.fsrNumberController.text,
provider.runningHoursController.text,
provider.statusID);
},
onTap:
provider.submitLoading
? null
: () {
provider.submitLoading = true;
provider.UpdateComplaintAPIFunction(
context,
widget.ComplaintID,
provider.feedbackController.text,
provider.fsrNumberController.text,
provider.runningHoursController.text,
provider.statusID,
);
},
child: Container(
alignment: Alignment.center,
height: 45,
......@@ -423,32 +421,38 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
borderRadius: BorderRadius.circular(15.0),
),
child: Center(
child:provider.submitLoading?CircularProgressIndicator.adaptive(
valueColor: AlwaysStoppedAnimation<Color>(
AppColors.white)
): Text(
"Submit",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 15,
fontFamily: "JakartaMedium",
color: Colors.white),
),
child:
provider.submitLoading
? CircularProgressIndicator.adaptive(
valueColor: AlwaysStoppedAnimation<Color>(
AppColors.white,
),
)
: Text(
"Submit",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 15,
fontFamily: "JakartaMedium",
color: Colors.white,
),
),
),
),
),
),
);
},);
},
);
}
Widget ErrorWidget(context, text) {
if (text != null)
return Text(text!, style: TextStyle(color: Colors.red, fontSize: 12));
else
return SizedBox(height: 10);
}
Future<void> _showAttachmentSheet(BuildContext context) {
return showModalBottomSheet(
useSafeArea: true,
......@@ -465,15 +469,11 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
child: Consumer<Pendingcomplaintsprovider>(
builder: (context, provider, child) {
return Padding(
padding: EdgeInsets.only(
bottom:
MediaQuery
.of(
context,
)
.viewInsets
.bottom, // This handles keyboard
MediaQuery.of(
context,
).viewInsets.bottom, // This handles keyboard
),
child: Container(
margin: EdgeInsets.only(
......@@ -494,11 +494,11 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
"Select Source",
style: TextStyle(
color: AppColors.app_blue,
fontSize: 16
fontSize: 16,
),
),
),
SizedBox(height: 15,),
SizedBox(height: 15),
InkWell(
onTap: () {
Navigator.of(context).pop(false);
......@@ -513,8 +513,7 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
InkWell(
onTap: () {
Navigator.of(context).pop(false);
provider.imgFromCamera(
);
provider.imgFromCamera();
},
child: Container(
height: 35,
......@@ -534,5 +533,4 @@ class _UpdatecomplaintsState extends State<Updatecomplaints> {
},
);
}
}
......@@ -51,8 +51,14 @@ class _VisitdetailsState extends State<Visitdetails> {
children: [
Text("Customer Details"),
Container(
margin: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
padding: EdgeInsets.symmetric(horizontal: 15, vertical: 10),
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 5,
),
padding: EdgeInsets.symmetric(
horizontal: 15,
vertical: 10,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
......@@ -67,13 +73,12 @@ class _VisitdetailsState extends State<Visitdetails> {
"Mail ID",
];
final textSubheads = [
customerDetails.aname??"-",
customerDetails.mob1??"-",
customerDetails.mob2??"-",
customerDetails.mail??"-",
customerDetails.aname ?? "-",
customerDetails.mob1 ?? "-",
customerDetails.mob2 ?? "-",
customerDetails.mail ?? "-",
];
return Container(
padding: EdgeInsets.symmetric(
vertical: 6,
horizontal: 0,
......@@ -94,9 +99,11 @@ class _VisitdetailsState extends State<Visitdetails> {
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(textheads[j].toString(),
maxLines: 2,
overflow: TextOverflow.ellipsis,),
Text(
textheads[j].toString(),
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
SizedBox(
// height:45,
width:
......@@ -105,11 +112,11 @@ class _VisitdetailsState extends State<Visitdetails> {
).size.width *
0.75,
child: Text(
textSubheads[j]==""?"-":
textSubheads[j],
textSubheads[j] == ""
? "-"
: textSubheads[j],
maxLines: 2,
overflow:
TextOverflow.ellipsis,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color(0xFF818181),
),
......@@ -125,11 +132,17 @@ class _VisitdetailsState extends State<Visitdetails> {
}),
),
),
Text("Generator Details"),
Container(
margin: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
padding: EdgeInsets.symmetric(horizontal: 15, vertical: 10),
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 5,
),
padding: EdgeInsets.symmetric(
horizontal: 15,
vertical: 10,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
......@@ -159,7 +172,9 @@ class _VisitdetailsState extends State<Visitdetails> {
"${complaintDetails.dateOfSupply}",
];
return Container(
padding: EdgeInsets.symmetric(vertical: 3),
padding: EdgeInsets.symmetric(
vertical: 3,
),
child: Column(
children: [
Row(
......@@ -175,7 +190,9 @@ class _VisitdetailsState extends State<Visitdetails> {
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(textheads[j].toString()),
Text(
textheads[j].toString(),
),
SizedBox(
// height:45,
width:
......@@ -184,12 +201,17 @@ class _VisitdetailsState extends State<Visitdetails> {
).size.width *
0.8,
child: Text(
textSubheads[j]==""?"-": textSubheads[j],
textSubheads[j] == ""
? "-"
: textSubheads[j],
maxLines: 2,
overflow:
TextOverflow.ellipsis,
TextOverflow
.ellipsis,
style: TextStyle(
color: Color(0xFF818181),
color: Color(
0xFF818181,
),
),
),
),
......@@ -208,11 +230,17 @@ class _VisitdetailsState extends State<Visitdetails> {
],
),
),
Text("Complaint Details"),
Container(
margin: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
padding: EdgeInsets.symmetric(horizontal: 15, vertical: 10),
margin: EdgeInsets.symmetric(
horizontal: 10,
vertical: 5,
),
padding: EdgeInsets.symmetric(
horizontal: 15,
vertical: 10,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
......@@ -221,7 +249,6 @@ class _VisitdetailsState extends State<Visitdetails> {
children: [
Row(
children: [
SvgPicture.asset("assetName"),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: List.generate(4, (j) {
......@@ -238,7 +265,9 @@ class _VisitdetailsState extends State<Visitdetails> {
"${complaintDetails.complaintType}",
];
return Container(
padding: EdgeInsets.symmetric(vertical: 3),
padding: EdgeInsets.symmetric(
vertical: 3,
),
child: Column(
children: [
Row(
......@@ -254,7 +283,9 @@ class _VisitdetailsState extends State<Visitdetails> {
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(textheads[j].toString()),
Text(
textheads[j].toString(),
),
SizedBox(
// height:45,
width:
......@@ -263,12 +294,17 @@ class _VisitdetailsState extends State<Visitdetails> {
).size.width *
0.8,
child: Text(
textSubheads[j]==""?"-": textSubheads[j],
textSubheads[j] == ""
? "-"
: textSubheads[j],
maxLines: 2,
overflow:
TextOverflow.ellipsis,
TextOverflow
.ellipsis,
style: TextStyle(
color: Color(0xFF818181),
color: Color(
0xFF818181,
),
),
),
),
......@@ -287,7 +323,7 @@ class _VisitdetailsState extends State<Visitdetails> {
],
),
),
SizedBox(height: 75),
],
),
......@@ -320,8 +356,10 @@ class _VisitdetailsState extends State<Visitdetails> {
child: Text(
"Followup Details",
textAlign: TextAlign.center,
style: TextStyle(color: Colors.white,
fontFamily: "JakartaMedium"),
style: TextStyle(
color: Colors.white,
fontFamily: "JakartaMedium",
),
),
),
),
......
......@@ -367,7 +367,7 @@ class ApiCalling {
sessioId,
location,
latlngs,
check_out_pic,
check_out_pic,
) async {
try {
Map<String, String> data = {
......@@ -391,7 +391,13 @@ class ApiCalling {
// return 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);
} else {
res = await post(data, employeeCheckOutUrl, {});
......@@ -943,7 +949,13 @@ class ApiCalling {
// }
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);
return TechnicianAddPaymentCollectionResponse.fromJson(res);
} else {
......@@ -1150,7 +1162,13 @@ class ApiCalling {
// print(fsr_file);
var res;
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);
return UpdateComplaintResponse.fromJson(res);
} else {
......@@ -1327,7 +1345,6 @@ class ApiCalling {
var res;
if (attachment != null) {
res = await postImageNew(
data,
{},
......@@ -1469,14 +1486,12 @@ class ApiCalling {
"attachment",
);
res = jsonDecode(res);
} else {
res = await post(data, addPaymentReceiptSubmitUrl, {});
res = jsonDecode(res.body);
// return addReceiptPaymentResponse.fromJson(res);
}
return addReceiptPaymentResponse.fromJson(res);
} catch (e) {
debugPrint('hello bev=bug $e ');
return null;
......@@ -1665,6 +1680,7 @@ class ApiCalling {
"attachment",
);
res = jsonDecode(res);
print(data);
return approveRejectPaymentRequestResponse.fromJson(res);
} else {
res = await post(data, approveRejectPaymentRequestSubmitUrl, {});
......@@ -2091,13 +2107,11 @@ class ApiCalling {
}
}
static Future<AddOrderViewResponse?> addOrderViewAPI(
empId,
session,
mode
) async {
empId,
session,
mode,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
......@@ -2119,10 +2133,10 @@ class ApiCalling {
}
static Future<addOrderAccontDetailsResponse?> addOrderAccountDetailsAPI(
empId,
session,
account_id
) async {
empId,
session,
account_id,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
......@@ -2144,16 +2158,16 @@ class ApiCalling {
}
static Future<addOrderTpcAgentListResponse?> addOrderTPCAgentListAPI(
empId,
session,
mode,
text
) async {
empId,
session,
mode,
text,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
'session_id': (session).toString(),
'mode':mode.toString(),
'mode': mode.toString(),
'text': (text).toString(),
};
final res = await post(data, ordersAddOrderTpcAgentListUrl, {});
......@@ -2171,99 +2185,91 @@ class ApiCalling {
}
static Future<CommonResponse?> addOrderSubmitAPI(
empId,
session,
mode,
sales_person_emp_id,
selected_acc_id,
dispatch_state_id,
dispatch_district_id,
dispatch_sub_location_id,
dispatch_pincode,
dispatch_address,
basic_amount,
cgst_amount,
sgst_amount,
igst_amount,
total_amount,
order_received_date,
note,
unloading,
freight,
erection,
tpc_applicable,
billing_name,
billing_gst_no,
billing_pincode,
billing_address,
billing_state,
billing_district,
billing_sub_locality,
order_products,
lead_id,
feedback,
in_time,
loc,
requested_tpc_amount,
tpc_agent_id,
po
) async {
try {
Map<String, String> data = {
'emp_id':empId.toString(),
'session_id':session.toString(),
'mode':mode.toString(),
'sales_person_emp_id':sales_person_emp_id.toString(),
'selected_acc_id':selected_acc_id.toString(),
'dispatch_state_id':dispatch_state_id.toString(),
'dispatch_district_id':dispatch_district_id.toString(),
'dispatch_sub_location_id':dispatch_sub_location_id.toString(),
'dispatch_pincode':dispatch_pincode.toString(),
'dispatch_address':dispatch_address.toString(),
'basic_amount':basic_amount.toString(),
'cgst_amount':cgst_amount.toString(),
'sgst_amount':sgst_amount.toString(),
'igst_amount':igst_amount.toString(),
'total_amount':total_amount.toString(),
'order_received_date':order_received_date.toString(),
'note':note.toString(),
'unloading':unloading.toString(),
'freight':freight.toString(),
'erection':erection.toString(),
'tpc_applicable':tpc_applicable.toString(),
'billing_name':billing_name.toString(),
'billing_gst_no':billing_gst_no.toString(),
'billing_pincode':billing_pincode.toString(),
'billing_address':billing_address.toString(),
'billing_state':billing_state.toString(),
'billing_district':billing_district.toString(),
'billing_sub_locality':billing_sub_locality.toString(),
'order_products':jsonEncode(order_products).toString(),
'lead_id':lead_id.toString(),
'feedback':feedback.toString(),
'in_time':in_time.toString(),
'loc':loc.toString(),
'requested_tpc_amount':requested_tpc_amount.toString(),
'tpc_agent_id':tpc_agent_id.toString(),
empId,
session,
mode,
sales_person_emp_id,
selected_acc_id,
dispatch_state_id,
dispatch_district_id,
dispatch_sub_location_id,
dispatch_pincode,
dispatch_address,
basic_amount,
cgst_amount,
sgst_amount,
igst_amount,
total_amount,
order_received_date,
note,
unloading,
freight,
erection,
tpc_applicable,
billing_name,
billing_gst_no,
billing_pincode,
billing_address,
billing_state,
billing_district,
billing_sub_locality,
order_products,
lead_id,
feedback,
in_time,
loc,
requested_tpc_amount,
tpc_agent_id,
po,
) async {
try {
Map<String, String> data = {
'emp_id': empId.toString(),
'session_id': session.toString(),
'mode': mode.toString(),
'sales_person_emp_id': sales_person_emp_id.toString(),
'selected_acc_id': selected_acc_id.toString(),
'dispatch_state_id': dispatch_state_id.toString(),
'dispatch_district_id': dispatch_district_id.toString(),
'dispatch_sub_location_id': dispatch_sub_location_id.toString(),
'dispatch_pincode': dispatch_pincode.toString(),
'dispatch_address': dispatch_address.toString(),
'basic_amount': basic_amount.toString(),
'cgst_amount': cgst_amount.toString(),
'sgst_amount': sgst_amount.toString(),
'igst_amount': igst_amount.toString(),
'total_amount': total_amount.toString(),
'order_received_date': order_received_date.toString(),
'note': note.toString(),
'unloading': unloading.toString(),
'freight': freight.toString(),
'erection': erection.toString(),
'tpc_applicable': tpc_applicable.toString(),
'billing_name': billing_name.toString(),
'billing_gst_no': billing_gst_no.toString(),
'billing_pincode': billing_pincode.toString(),
'billing_address': billing_address.toString(),
'billing_state': billing_state.toString(),
'billing_district': billing_district.toString(),
'billing_sub_locality': billing_sub_locality.toString(),
'order_products': jsonEncode(order_products).toString(),
'lead_id': lead_id.toString(),
'feedback': feedback.toString(),
'in_time': in_time.toString(),
'loc': loc.toString(),
'requested_tpc_amount': requested_tpc_amount.toString(),
'tpc_agent_id': tpc_agent_id.toString(),
};
var res;
print(data);
if (po != null) {
res = await postImageNew(
data,
{},
ordersAddOrderSubmitUrl,
po,
"po",
);
res = await postImageNew(data, {}, ordersAddOrderSubmitUrl, po, "po");
res = jsonDecode(res);
} else {
res = await post(data, ordersAddOrderSubmitUrl, {});
res = jsonDecode(res.body);
}
return CommonResponse.fromJson(res);
} catch (e) {
debugPrint('hello bev=bug $e ');
return null;
......@@ -2271,10 +2277,10 @@ class ApiCalling {
}
static Future<ordersListByModeFilterResponse?> ordersListByModeFilterAPI(
empId,
session,
mode
) async {
empId,
session,
mode,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
......@@ -2296,12 +2302,12 @@ class ApiCalling {
}
static Future<ordersListByModeResponse?> ordersListByModeAPI(
empId,
session,
mode,
teamemployee,
status
) async {
empId,
session,
mode,
teamemployee,
status,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
......@@ -2326,10 +2332,10 @@ class ApiCalling {
}
static Future<ordersDetailsByModeResponse?> ordersDetailsByModeAPI(
empId,
session,
order_id
) async {
empId,
session,
order_id,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
......@@ -2351,15 +2357,14 @@ class ApiCalling {
}
}
static Future<CommonResponse?>
ordersDetailsFeedbackSubmissionAPI(
empId,
session,
order_id,
feedback,
status,
attachment_file,
) async {
static Future<CommonResponse?> ordersDetailsFeedbackSubmissionAPI(
empId,
session,
order_id,
feedback,
status,
attachment_file,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
......@@ -2390,39 +2395,39 @@ class ApiCalling {
}
static Future<CommonResponse?> ordersDetailsApproveRejectAPI(
empId,
session,
status,
type,
order_id,
feedback,
tpc_applicable,
tpc_approved_amount,
sale_order_number,
edit_company_name,
invoice_number,
vehicle_number,
driver_name,
driver_mobile_no,
crm_order_p_id
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
'session_id': (session).toString(),
"status":status.toString(),
"type":type.toString(),
"order_id":order_id.toString(),
"feedback":feedback.toString(),
"tpc_applicable":tpc_applicable.toString(),
"tpc_approved_amount":tpc_approved_amount.toString(),
"sale_order_number":sale_order_number.toString(),
"edit_company_name":edit_company_name.toString(),
"invoice_number":invoice_number.toString(),
"vehicle_number":vehicle_number.toString(),
"driver_name":driver_name.toString(),
"driver_mobile_no":driver_mobile_no.toString(),
"crm_order_p_id":crm_order_p_id.toString()
empId,
session,
status,
type,
order_id,
feedback,
tpc_applicable,
tpc_approved_amount,
sale_order_number,
edit_company_name,
invoice_number,
vehicle_number,
driver_name,
driver_mobile_no,
crm_order_p_id,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
'session_id': (session).toString(),
"status": status.toString(),
"type": type.toString(),
"order_id": order_id.toString(),
"feedback": feedback.toString(),
"tpc_applicable": tpc_applicable.toString(),
"tpc_approved_amount": tpc_approved_amount.toString(),
"sale_order_number": sale_order_number.toString(),
"edit_company_name": edit_company_name.toString(),
"invoice_number": invoice_number.toString(),
"vehicle_number": vehicle_number.toString(),
"driver_name": driver_name.toString(),
"driver_mobile_no": driver_mobile_no.toString(),
"crm_order_p_id": crm_order_p_id.toString(),
};
final res = await post(data, ordersOrderApproveRejectUrl, {});
if (res != null) {
......@@ -2440,17 +2445,17 @@ class ApiCalling {
}
static Future<CommonResponse?> ordersDetailsDeleteAPI(
empId,
session,
order_id,
feedback
) async {
empId,
session,
order_id,
feedback,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
'session_id': (session).toString(),
"order_id":order_id.toString(),
"feedback":feedback.toString(),
"order_id": order_id.toString(),
"feedback": feedback.toString(),
};
final res = await post(data, ordersOrderLDeleteUrl, {});
if (res != null) {
......@@ -2468,9 +2473,9 @@ class ApiCalling {
}
static Future<addOrderPaymentViewResponse?> addOrderpaymentListViewAPI(
empId,
session,
) async {
empId,
session,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
......@@ -2491,28 +2496,28 @@ class ApiCalling {
}
static Future<CommonResponse?> addOrderpaymentListSubmitAPI(
empId,
session,
account_id,
description,
selected_orders,
payment_amount,
payment_date,
payment_type,
ref_no,
attachment
) async {
empId,
session,
account_id,
description,
selected_orders,
payment_amount,
payment_date,
payment_type,
ref_no,
attachment,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
'session_id': (session).toString(),
'account_id':account_id.toString(),
'description':description.toString(),
'selected_orders':jsonEncode(selected_orders).toString(),
'payment_amount':payment_amount.toString(),
'payment_date':payment_date.toString(),
'payment_type':payment_type.toString(),
'ref_no':ref_no.toString(),
'account_id': account_id.toString(),
'description': description.toString(),
'selected_orders': jsonEncode(selected_orders).toString(),
'payment_amount': payment_amount.toString(),
'payment_date': payment_date.toString(),
'payment_type': payment_type.toString(),
'ref_no': ref_no.toString(),
};
var res;
print(data);
......@@ -2531,120 +2536,129 @@ class ApiCalling {
// return CommonResponse.fromJson(res);
}
return CommonResponse.fromJson(res);
} catch (e) {
debugPrint('hello bev=bug $e ');
return null;
}
}
static Future<CommonResponse?> ordersEditPaymentDetailsAPI(
empId,
session,
payment_id,
description,
payment_type,
ref_no,
payment_date,
amount
) async {
empId,
session,
payment_id,
description,
payment_type,
ref_no,
payment_date,
amount,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
'session_id': (session).toString(),
'payment_id':payment_id.toString(),
'description':description.toString(),
'payment_type':payment_type.toString(),
'payment_date':payment_date.toString(),
'ref_no':ref_no.toString(),
'amount':amount.toString(),
'payment_id': payment_id.toString(),
'description': description.toString(),
'payment_type': payment_type.toString(),
'payment_date': payment_date.toString(),
'ref_no': ref_no.toString(),
'amount': amount.toString(),
};
var res = await post(data, ordersEditPaymentDetailsUrl, {});
if(res!=null) {
if (res != null) {
return CommonResponse.fromJson(jsonDecode(res.body));
}else{
} else {
debugPrint("Null Response");
}
} catch (e) {
debugPrint('hello bev=bug $e ');
return null;
}
}
static Future<EditPaymentDetailsAdjustedOrdersViewResponse?> ordersEditPaymentDetailsAdjustedOrdersViewAPI(
empId,
session,
payment_id,
) async {
static Future<EditPaymentDetailsAdjustedOrdersViewResponse?>
ordersEditPaymentDetailsAdjustedOrdersViewAPI(
empId,
session,
payment_id,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
'session_id': (session).toString(),
'payment_id':payment_id.toString(),
'payment_id': payment_id.toString(),
};
var res = await post(data, ordersEditPaymentDetailsAdjustedOrdersViewUrl, {});
if(res!=null) {
var res = await post(
data,
ordersEditPaymentDetailsAdjustedOrdersViewUrl,
{},
);
if (res != null) {
print("edit adjusted : ${res.body}");
return EditPaymentDetailsAdjustedOrdersViewResponse.fromJson(jsonDecode(res.body));
}else{
return EditPaymentDetailsAdjustedOrdersViewResponse.fromJson(
jsonDecode(res.body),
);
} else {
debugPrint("Null Response");
}
} catch (e) {
debugPrint('hello bev=bug $e ');
return null;
}
}
static Future<EditPaymentDetailsAdjustedOrdersViewResponse?> ordersEditPaymentDetailsAdjustedOrdersUpdateAPI(
empId,
session,
payment_id,
update_amounts,
insert_amounts
) async {
static Future<EditPaymentDetailsAdjustedOrdersViewResponse?>
ordersEditPaymentDetailsAdjustedOrdersUpdateAPI(
empId,
session,
payment_id,
update_amounts,
insert_amounts,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
'session_id': (session).toString(),
'payment_id':payment_id.toString(),
'update_amounts':jsonEncode(update_amounts).toString(),
'insert_amounts':jsonEncode(insert_amounts).toString(),
'payment_id': payment_id.toString(),
'update_amounts': jsonEncode(update_amounts).toString(),
'insert_amounts': jsonEncode(insert_amounts).toString(),
};
var res = await post(data, ordersEditPaymentDetailsAdjustedOrdersUrl, {});
if(res!=null) {
return EditPaymentDetailsAdjustedOrdersViewResponse.fromJson(jsonDecode(res.body));
}else{
if (res != null) {
return EditPaymentDetailsAdjustedOrdersViewResponse.fromJson(
jsonDecode(res.body),
);
} else {
debugPrint("Null Response");
}
} catch (e) {
debugPrint('hello bev=bug $e ');
return null;
}
}
static Future<AddOrderPaymentSelectAccountResponse?> AddOrderPaymentSelectAccountAPI(
empId,
session,
mode,
search_term
) async {
static Future<AddOrderPaymentSelectAccountResponse?>
AddOrderPaymentSelectAccountAPI(empId, session, mode, search_term) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
'session_id': (session).toString(),
'mode':mode.toString(),
'search_term':search_term.toString(),
'mode': mode.toString(),
'search_term': search_term.toString(),
};
final res = await post(data, ordersAddPaymentSelectAccountForOrderUrl, {});
final res = await post(
data,
ordersAddPaymentSelectAccountForOrderUrl,
{},
);
if (res != null) {
print(data);
print("PaymentSeralectAccount${res.body}");
return AddOrderPaymentSelectAccountResponse.fromJson(jsonDecode(res.body));
return AddOrderPaymentSelectAccountResponse.fromJson(
jsonDecode(res.body),
);
} else {
debugPrint("Null Response");
return null;
......@@ -2655,22 +2669,21 @@ class ApiCalling {
}
}
static Future<AddOrderPaymentSelectOrderResponse?> AddOrderPaymentSelectOrderAPI(
empId,
session,
account_id,
) async {
static Future<AddOrderPaymentSelectOrderResponse?>
AddOrderPaymentSelectOrderAPI(empId, session, account_id) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
'session_id': (session).toString(),
'account_id':account_id.toString(),
'account_id': account_id.toString(),
};
final res = await post(data, ordersAddPaymentSelectOrderUrl, {});
if (res != null) {
print(data);
debugPrint("add order payment selected order: ${res.body}");
return AddOrderPaymentSelectOrderResponse.fromJson(jsonDecode(res.body));
return AddOrderPaymentSelectOrderResponse.fromJson(
jsonDecode(res.body),
);
} else {
debugPrint("Null Response");
return null;
......@@ -2682,10 +2695,10 @@ class ApiCalling {
}
static Future<paymentListByModeFilterResponse?> paymentListByModeFilterAPI(
empId,
session,
mode
) async {
empId,
session,
mode,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
......@@ -2707,11 +2720,11 @@ class ApiCalling {
}
static Future<paymentListByModeResponse?> paymentListsByModeAPI(
empId,
session,
mode,
teamemployee,
) async {
empId,
session,
mode,
teamemployee,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
......@@ -2735,19 +2748,19 @@ class ApiCalling {
}
static Future<CommonResponse?> paymentOrderApproveRejectAPI(
empId,
session,
payment_id,
type,
remarks
) async {
empId,
session,
payment_id,
type,
remarks,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
'session_id': (session).toString(),
"payment_id":payment_id.toString(),
"type":type.toString(),
"remarks":remarks.toString()
"payment_id": payment_id.toString(),
"type": type.toString(),
"remarks": remarks.toString(),
};
final res = await post(data, ordersPaymentListApproveRejectUrl, {});
if (res != null) {
......@@ -2765,15 +2778,15 @@ class ApiCalling {
}
static Future<CommonResponse?> paymentOrderDeleteAPI(
empId,
session,
payment_id,
) async {
empId,
session,
payment_id,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
'session_id': (session).toString(),
"payment_id":payment_id.toString(),
"payment_id": payment_id.toString(),
};
final res = await post(data, ordersPaymentListDeleteUrl, {});
if (res != null) {
......@@ -2790,12 +2803,11 @@ class ApiCalling {
}
}
static Future<paymentDetailsByModeFilterResponse?> paymentsDetailsByModeAPI(
empId,
session,
payment_id
) async {
empId,
session,
payment_id,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
......@@ -2806,7 +2818,9 @@ class ApiCalling {
if (res != null) {
print(data);
debugPrint(res.body);
return paymentDetailsByModeFilterResponse.fromJson(jsonDecode(res.body));
return paymentDetailsByModeFilterResponse.fromJson(
jsonDecode(res.body),
);
} else {
debugPrint("Null Response");
return null;
......@@ -2817,31 +2831,29 @@ class ApiCalling {
}
}
static Future<CommonResponse?>
ordersAddTPCAgentAPI(
empId,
session,
agent_name,
mobile_number,
bank_name,
bank_account_no,
bank_ifsc_code,
bank_beneficiary_name,
note,
id_proof,
) async {
static Future<CommonResponse?> ordersAddTPCAgentAPI(
empId,
session,
agent_name,
mobile_number,
bank_name,
bank_account_no,
bank_ifsc_code,
bank_beneficiary_name,
note,
id_proof,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
'session_id': (session).toString(),
'agent_name':agent_name.toString(),
'mobile_number':mobile_number.toString(),
'bank_name':bank_name.toString(),
'bank_account_no':bank_account_no.toString(),
'bank_ifsc_code':bank_ifsc_code.toString(),
'bank_beneficiary_name':bank_beneficiary_name.toString(),
'note':note.toString(),
'agent_name': agent_name.toString(),
'mobile_number': mobile_number.toString(),
'bank_name': bank_name.toString(),
'bank_account_no': bank_account_no.toString(),
'bank_ifsc_code': bank_ifsc_code.toString(),
'bank_beneficiary_name': bank_beneficiary_name.toString(),
'note': note.toString(),
};
var res;
if (id_proof != null) {
......@@ -2865,11 +2877,7 @@ class ApiCalling {
}
}
static Future<TPCListResponse?> TPCAgentListAPI(
empId,
session,
mode
) async {
static Future<TPCListResponse?> TPCAgentListAPI(empId, session, mode) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
......@@ -2892,10 +2900,10 @@ class ApiCalling {
}
static Future<TPCAgentDetailsResponse?> TPCAgentDetailsAPI(
empId,
session,
tpc_agent_id
) async {
empId,
session,
tpc_agent_id,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
......@@ -2918,9 +2926,9 @@ class ApiCalling {
}
static Future<PendingTPCAgentListResponse?> pendingTPCAgentIssueListAPI(
empId,
session,
) async {
empId,
session,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
......@@ -2941,24 +2949,23 @@ class ApiCalling {
}
}
static Future<CommonResponse?> TpcIssueListApprovalAPI(
empId,
session,
tpc_payment_mode,
tpc_payment_reference_no,
order_id,
order_tpc_feedback,
tpc_paym_attachment
) async {
empId,
session,
tpc_payment_mode,
tpc_payment_reference_no,
order_id,
order_tpc_feedback,
tpc_paym_attachment,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
'session_id': (session).toString(),
'tpc_payment_mode':tpc_payment_mode.toString(),
'tpc_payment_reference_no':tpc_payment_reference_no.toString(),
'order_id':order_id.toString(),
'order_tpc_feedback':order_tpc_feedback.toString(),
'tpc_payment_mode': tpc_payment_mode.toString(),
'tpc_payment_reference_no': tpc_payment_reference_no.toString(),
'order_id': order_id.toString(),
'order_tpc_feedback': order_tpc_feedback.toString(),
};
var res;
if (tpc_paym_attachment != null) {
......@@ -2984,9 +2991,9 @@ class ApiCalling {
///CRM Module
static Future<AccessiblePagesResponse?> crmAccessiblePagesAPI(
empId,
session
) async {
empId,
session,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
......@@ -3008,10 +3015,10 @@ class ApiCalling {
}
static Future<LeadListViewResponse?> crmLeadListViewAPI(
empId,
session,
mode
) async {
empId,
session,
mode,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
......@@ -3034,40 +3041,41 @@ class ApiCalling {
}
static Future<SubmitLeadListFilterResponse?> crmLeadListFilterSubmitAPI(
empId,
session,mode,
teamemployee,
slead_id,
status,
open_status,
mob,
com,
source,
reference,
team,
segment,
state,
district,
sub_loc,
) async {
empId,
session,
mode,
teamemployee,
slead_id,
status,
open_status,
mob,
com,
source,
reference,
team,
segment,
state,
district,
sub_loc,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
'session_id': (session).toString(),
'mode': (mode).toString(),
'teamemployee':teamemployee.toString(),
'slead_id':slead_id.toString(),
'status':status.toString(),
'open_status':open_status.toString(),
'mob':mob.toString(),
'com':com.toString(),
'source':source.toString(),
'reference':reference.toString(),
'team':team.toString(),
'segment':segment.toString(),
'state':state.toString(),
'district':district.toString(),
'sub_loc':sub_loc.toString(),
'teamemployee': teamemployee.toString(),
'slead_id': slead_id.toString(),
'status': status.toString(),
'open_status': open_status.toString(),
'mob': mob.toString(),
'com': com.toString(),
'source': source.toString(),
'reference': reference.toString(),
'team': team.toString(),
'segment': segment.toString(),
'state': state.toString(),
'district': district.toString(),
'sub_loc': sub_loc.toString(),
};
final res = await post(data, crmLeadListFilterSubmitUrl, {});
if (res != null) {
......@@ -3085,9 +3093,10 @@ class ApiCalling {
}
static Future<GetSourceOnReferenceResponse?> crmLeadListSourceOnReferenceAPI(
empId,
session,source_id
) async {
empId,
session,
source_id,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
......@@ -3110,9 +3119,10 @@ class ApiCalling {
}
static Future<GetSegmentOnTeamResponse?> crmLeadListSegmentOnTeamAPI(
empId,
session,team_id
) async {
empId,
session,
team_id,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
......@@ -3135,9 +3145,10 @@ class ApiCalling {
}
static Future<GetDistrictOnStateResponse?> crmDistrictsOnStateAPI(
empId,
session,state_id
) async {
empId,
session,
state_id,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
......@@ -3160,9 +3171,10 @@ class ApiCalling {
}
static Future<GetSubLocOnDistrictResponse?> crmSubLocOnDistrictAPI(
empId,
session,district_id
) async {
empId,
session,
district_id,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
......@@ -3185,9 +3197,10 @@ class ApiCalling {
}
static Future<LeadListContactPopUpResponse?> crmLeadListContactPopUpAPI(
empId,
session,account_id
) async {
empId,
session,
account_id,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
......@@ -3208,19 +3221,19 @@ class ApiCalling {
return null;
}
}
static Future<LeadDetailsResponse?> crmLeadDetailsAPI(
empId,
session,
lead_id,
mode
) async {
empId,
session,
lead_id,
mode,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
'session_id': (session).toString(),
'lead_id': (lead_id).toString(),
'mode':(mode).toString()
'mode': (mode).toString(),
};
final res = await post(data, crmLeadDetailsUrl, {});
if (res != null) {
......@@ -3238,27 +3251,27 @@ class ApiCalling {
}
static Future<CommonResponse?> crmLeadDetailsAddContactAPI(
empId,
session,
acc_id,
name,
mob1,
designation,
mob2,
tel,
email
) async {
empId,
session,
acc_id,
name,
mob1,
designation,
mob2,
tel,
email,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
'session_id': (session).toString(),
'acc_id': (acc_id).toString(),
'name':(name).toString(),
'mob1':(mob1).toString(),
'designation':(designation).toString(),
'mob2':(mob2).toString(),
'tel':(tel).toString(),
'email':(email).toString(),
'name': (name).toString(),
'mob1': (mob1).toString(),
'designation': (designation).toString(),
'mob2': (mob2).toString(),
'tel': (tel).toString(),
'email': (email).toString(),
};
final res = await post(data, crmLeadDetailsAddContactUrl, {});
if (res != null) {
......@@ -3276,27 +3289,27 @@ class ApiCalling {
}
static Future<CommonResponse?> crmLeadDetailsEditContactAPI(
empId,
session,
contact_id,
name,
mob1,
designation,
mob2,
tel,
email
) async {
empId,
session,
contact_id,
name,
mob1,
designation,
mob2,
tel,
email,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
'session_id': (session).toString(),
'contact_id': (contact_id).toString(),
'name':(name).toString(),
'mob1':(mob1).toString(),
'designation':(designation).toString(),
'mob2':(mob2).toString(),
'tel':(tel).toString(),
'email':(email).toString(),
'name': (name).toString(),
'mob1': (mob1).toString(),
'designation': (designation).toString(),
'mob2': (mob2).toString(),
'tel': (tel).toString(),
'email': (email).toString(),
};
final res = await post(data, crmLeadDetailsEditContactUrl, {});
if (res != null) {
......@@ -3314,21 +3327,21 @@ class ApiCalling {
}
static Future<CommonResponse?> crmLeadDetailsAddAppointmentAPI(
empId,
session,
lead_id,
appointment_date,
type,
note,
) async {
empId,
session,
lead_id,
appointment_date,
type,
note,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
'session_id': (session).toString(),
'lead_id': (lead_id).toString(),
'appointment_date':(appointment_date).toString(),
'type':(type).toString(),
'note':(note).toString(),
'appointment_date': (appointment_date).toString(),
'type': (type).toString(),
'note': (note).toString(),
};
final res = await post(data, crmLeadDetailsAddAppointmentUrl, {});
if (res != null) {
......@@ -3345,7 +3358,6 @@ class ApiCalling {
}
}
// static Future<CommonResponse?> TpcIssueListApprovalAPI(
// empId,
// session,
......
......@@ -37,10 +37,10 @@ packages:
dependency: transitive
description:
name: async
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
url: "https://pub.dev"
source: hosted
version: "2.12.0"
version: "2.13.0"
barcode:
dependency: transitive
description:
......@@ -285,10 +285,10 @@ packages:
dependency: transitive
description:
name: fake_async
sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc"
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
url: "https://pub.dev"
source: hosted
version: "1.3.2"
version: "1.3.3"
ffi:
dependency: transitive
description:
......@@ -932,26 +932,26 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
sha256: "8dcda04c3fc16c14f48a7bb586d4be1f0d1572731b6d81d51772ef47c02081e0"
url: "https://pub.dev"
source: hosted
version: "10.0.8"
version: "11.0.1"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
url: "https://pub.dev"
source: hosted
version: "3.0.9"
version: "3.0.10"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
version: "3.0.2"
lints:
dependency: transitive
description:
......@@ -1657,10 +1657,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
url: "https://pub.dev"
source: hosted
version: "14.3.1"
version: "15.0.0"
web:
dependency: transitive
description:
......
......@@ -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
# 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.
version: 1.0.87+91
version: 1.0.88+92
environment:
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