Compare commits
3 Commits
f7454d771f
...
c49074b167
Author | SHA1 | Date |
---|---|---|
|
c49074b167 | |
|
47512e86d0 | |
|
e12af90539 |
Binary file not shown.
After Width: | Height: | Size: 124 KiB |
Binary file not shown.
After Width: | Height: | Size: 235 B |
Binary file not shown.
After Width: | Height: | Size: 6.5 MiB |
|
@ -1,10 +1,11 @@
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:shayog/components/styles/app_colors.dart';
|
import 'package:shayog/components/styles/app_colors.dart';
|
||||||
|
import 'package:shayog/components/styles/textStyles.dart';
|
||||||
|
|
||||||
class CommonBtn extends StatelessWidget {
|
class CommonBtn extends StatelessWidget {
|
||||||
CommonBtn({super.key, this.text,
|
CommonBtn({super.key, this.text,
|
||||||
this.width, this.bkClr,
|
this.width, this.bkClr,
|
||||||
this.borderClr,this.textClr,
|
this.borderClr,
|
||||||
this.margin,
|
this.margin,
|
||||||
required this.clickAction,
|
required this.clickAction,
|
||||||
this.style
|
this.style
|
||||||
|
@ -12,7 +13,7 @@ class CommonBtn extends StatelessWidget {
|
||||||
|
|
||||||
String? text;
|
String? text;
|
||||||
Color? bkClr;
|
Color? bkClr;
|
||||||
Color? textClr;
|
|
||||||
Color? borderClr;
|
Color? borderClr;
|
||||||
double? width;
|
double? width;
|
||||||
EdgeInsets? margin;
|
EdgeInsets? margin;
|
||||||
|
@ -34,10 +35,7 @@ TextStyle? style;
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
text ?? '',
|
text ?? '',
|
||||||
style: style ?? TextStyle(
|
style: style ?? 14.txtSBoldBlue
|
||||||
fontSize: 12,
|
|
||||||
color: textClr ?? AppColors.primaryClr,
|
|
||||||
fontWeight: FontWeight.w900),
|
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -90,7 +90,7 @@ class CommonButton extends StatelessWidget {
|
||||||
child: Text(text.tr,
|
child: Text(text.tr,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: textStyle ?? 16.txtMediumWhite.copyWith(color: textColor)),
|
style: textStyle ?? 14.txtSBoldWhite.copyWith(color: textColor)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// ),
|
// ),
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:shayog/components/styles/app_colors.dart';
|
import 'package:shayog/components/styles/app_colors.dart';
|
||||||
|
import 'package:shayog/components/styles/textStyles.dart';
|
||||||
class CustomDropdown<T> extends StatefulWidget {
|
class CustomDropdown<T> extends StatefulWidget {
|
||||||
final List<T> items;
|
final List<T> items;
|
||||||
final String Function(T) itemLabel;
|
final String Function(T) itemLabel;
|
||||||
|
@ -185,9 +186,9 @@ class _CustomDropdownState<T> extends State<CustomDropdown<T>> {
|
||||||
|
|
||||||
enabled: widget.enableSearch,
|
enabled: widget.enableSearch,
|
||||||
controller: searchController,
|
controller: searchController,
|
||||||
style: const TextStyle(
|
style: 12.txtSBoldGrey,
|
||||||
fontSize: 12,
|
|
||||||
overflow: TextOverflow.ellipsis),
|
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: 'Search...',
|
hintText: 'Search...',
|
||||||
contentPadding: const EdgeInsets.symmetric(
|
contentPadding: const EdgeInsets.symmetric(
|
||||||
|
@ -217,10 +218,7 @@ class _CustomDropdownState<T> extends State<CustomDropdown<T>> {
|
||||||
message: widget.itemLabel(item),
|
message: widget.itemLabel(item),
|
||||||
child: Text(
|
child: Text(
|
||||||
widget.itemLabel(item),
|
widget.itemLabel(item),
|
||||||
style: const TextStyle(
|
style: 12.txtSBoldGrey,
|
||||||
fontSize: 12,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onTap: () => _selectItem(item),
|
onTap: () => _selectItem(item),
|
||||||
|
@ -266,7 +264,7 @@ class _CustomDropdownState<T> extends State<CustomDropdown<T>> {
|
||||||
selectedItem != null
|
selectedItem != null
|
||||||
? widget.itemLabel(selectedItem!)
|
? widget.itemLabel(selectedItem!)
|
||||||
: widget.hintText,
|
: widget.hintText,
|
||||||
style: TextStyle(fontSize: 12, color: Colors.black),
|
style: 12.txtSBoldGrey,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:shayog/components/styles/textStyles.dart';
|
||||||
|
|
||||||
import '../../../components/styles/app_colors.dart';
|
import '../../../components/styles/app_colors.dart';
|
||||||
|
|
||||||
|
@ -13,11 +14,7 @@ DataCell editableCell(int index, String? value,
|
||||||
value ?? "",
|
value ?? "",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
style: TextStyle(
|
style: isLink ? 11.txtSBoldBlue : 11.txtSBoldBlack,
|
||||||
fontSize: 11,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
color: isLink ? Colors.blue : AppColors.darkGrey,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -32,8 +29,9 @@ DataColumn dataColumn(String text, {Function(int, bool)? onSort}) {
|
||||||
text,
|
text,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
style: TextStyle(
|
style: 12.txtBoldBlack,
|
||||||
fontSize: 12, fontWeight: FontWeight.bold, color: Colors.black),
|
// style: TextStyle(
|
||||||
|
// fontSize: 12, fontWeight: FontWeight.bold, color: Colors.black),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:shayog/components/styles/textStyles.dart';
|
||||||
|
|
||||||
import '../../../components/styles/app_colors.dart';
|
import '../../../components/styles/app_colors.dart';
|
||||||
|
|
||||||
|
@ -37,10 +38,11 @@ class InputField extends StatelessWidget {
|
||||||
contextMenuBuilder: (context, editableTextState) {
|
contextMenuBuilder: (context, editableTextState) {
|
||||||
return Container(height: 0, color: Colors.transparent);
|
return Container(height: 0, color: Colors.transparent);
|
||||||
},
|
},
|
||||||
style: TextStyle(fontSize: 12, color: AppColors.black),
|
style: 12.txtSBoldBlack,
|
||||||
|
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
hintStyle: TextStyle(fontSize: 12, color: AppColors.darkGrey),
|
hintStyle: 11.txtSBoldGrey,
|
||||||
maintainHintHeight: true,
|
maintainHintHeight: true,
|
||||||
contentPadding: edgesInsects ??
|
contentPadding: edgesInsects ??
|
||||||
EdgeInsets.symmetric(vertical: 12.0, horizontal: 12.0),
|
EdgeInsets.symmetric(vertical: 12.0, horizontal: 12.0),
|
||||||
|
@ -51,8 +53,9 @@ class InputField extends StatelessWidget {
|
||||||
focusedBorder: underLineBorder ?? inputBorder,
|
focusedBorder: underLineBorder ?? inputBorder,
|
||||||
focusedErrorBorder: underLineBorder ?? inputBorder,
|
focusedErrorBorder: underLineBorder ?? inputBorder,
|
||||||
filled: true,
|
filled: true,
|
||||||
labelText: title ?? "",
|
hintText: title ?? "",
|
||||||
labelStyle: TextStyle(fontSize: 12, color: AppColors.darkGrey),
|
|
||||||
|
labelStyle: 12.txtSBoldGrey,
|
||||||
fillColor: AppColors.clrD9,
|
fillColor: AppColors.clrD9,
|
||||||
errorStyle: TextStyle(
|
errorStyle: TextStyle(
|
||||||
fontSize: 10.0,
|
fontSize: 10.0,
|
||||||
|
|
|
@ -11,6 +11,7 @@ class AppImages {
|
||||||
static String refresh = "${path}refresh.png";
|
static String refresh = "${path}refresh.png";
|
||||||
static String download = "${path}download.png";
|
static String download = "${path}download.png";
|
||||||
static String filter = "${path}filter.png";
|
static String filter = "${path}filter.png";
|
||||||
|
static String exportIcon = '${path}export_icon.png';
|
||||||
|
|
||||||
|
|
||||||
static String inVoiceManage = '${path}invoice_manage.png';
|
static String inVoiceManage = '${path}invoice_manage.png';
|
||||||
|
|
|
@ -81,4 +81,8 @@ class AppStrings {
|
||||||
static const String plantName = "Plant Name";
|
static const String plantName = "Plant Name";
|
||||||
static const String fromLocDesc = "From Location Desc.";
|
static const String fromLocDesc = "From Location Desc.";
|
||||||
static const String remark = "Remark";
|
static const String remark = "Remark";
|
||||||
|
static const String viewInvoice = "View Invoice";
|
||||||
|
static const String cancelledInvoice = "Cancelled Invoice";
|
||||||
|
static const String ccnView = "CCN View";
|
||||||
|
static const String transporterInbound = "Transporter Inbound Transaction";
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,12 @@ extension TextStyles on num{
|
||||||
|
|
||||||
|
|
||||||
//Semi bold
|
//Semi bold
|
||||||
TextStyle get txtSBoldBlackText => _textStyle(this,AppColors.black,Family.semiBold);
|
TextStyle get txtSBoldBlack => _textStyle(this,AppColors.black,Family.semiBold);
|
||||||
|
TextStyle get txtSBoldGrey => _textStyle(this,AppColors.darkGrey,Family.semiBold);
|
||||||
|
TextStyle get txtSBoldBlue => _textStyle(this,AppColors.primaryClr,Family.semiBold);
|
||||||
|
TextStyle get txtSBoldRed => _textStyle(this,Colors.red,Family.semiBold);
|
||||||
|
TextStyle get txtSBoldWhite => _textStyle(this,Colors.white,Family.semiBold);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,6 +36,7 @@ extension TextStyles on num{
|
||||||
//bold
|
//bold
|
||||||
TextStyle get txtBoldWhite => _textStyle(this,AppColors.white,Family.bold);
|
TextStyle get txtBoldWhite => _textStyle(this,AppColors.white,Family.bold);
|
||||||
TextStyle get txtBoldBlack => _textStyle(this,AppColors.black,Family.bold);
|
TextStyle get txtBoldBlack => _textStyle(this,AppColors.black,Family.bold);
|
||||||
|
TextStyle get txtBoldBlue => _textStyle(this,AppColors.primaryClr,Family.bold);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:shayog/components/styles/textStyles.dart';
|
||||||
|
|
||||||
import '../../../../../components/common/common_btn.dart';
|
import '../../../../../components/common/common_btn.dart';
|
||||||
import '../../../../../components/common/input_field.dart';
|
import '../../../../../components/common/input_field.dart';
|
||||||
|
@ -310,7 +311,7 @@ class FreightBillScreen extends StatelessWidget {
|
||||||
SizedBox(width: 16),
|
SizedBox(width: 16),
|
||||||
CommonBtn(
|
CommonBtn(
|
||||||
text: AppStrings.submit,
|
text: AppStrings.submit,
|
||||||
textClr: Colors.white, clickAction: () { },
|
style: 14.txtBoldWhite, clickAction: () { },
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -35,8 +35,8 @@ class AddInternalUser extends StatelessWidget {
|
||||||
children: [
|
children: [
|
||||||
TextView(
|
TextView(
|
||||||
text: AppStrings.firstName,
|
text: AppStrings.firstName,
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12, fontWeight: FontWeight.bold)),
|
),
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
InputField(
|
InputField(
|
||||||
controller: ctrl.nameCtrl,
|
controller: ctrl.nameCtrl,
|
||||||
|
@ -52,8 +52,7 @@ class AddInternalUser extends StatelessWidget {
|
||||||
children: [
|
children: [
|
||||||
TextView(
|
TextView(
|
||||||
text: AppStrings.lastName,
|
text: AppStrings.lastName,
|
||||||
style: TextStyle(
|
),
|
||||||
fontSize: 12, fontWeight: FontWeight.bold)),
|
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
InputField(
|
InputField(
|
||||||
validator: Validations.checkLastName,
|
validator: Validations.checkLastName,
|
||||||
|
@ -70,8 +69,7 @@ class AddInternalUser extends StatelessWidget {
|
||||||
children: [
|
children: [
|
||||||
TextView(
|
TextView(
|
||||||
text: AppStrings.employeeCode,
|
text: AppStrings.employeeCode,
|
||||||
style: TextStyle(
|
),
|
||||||
fontSize: 12, fontWeight: FontWeight.bold)),
|
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
InputField(
|
InputField(
|
||||||
controller: ctrl.employeeCodeCtrl,
|
controller: ctrl.employeeCodeCtrl,
|
||||||
|
@ -92,14 +90,13 @@ class AddInternalUser extends StatelessWidget {
|
||||||
children: [
|
children: [
|
||||||
TextView(
|
TextView(
|
||||||
text: AppStrings.userType,
|
text: AppStrings.userType,
|
||||||
style: TextStyle(
|
),
|
||||||
fontSize: 12, fontWeight: FontWeight.bold)),
|
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
CustomDropdown(
|
CustomDropdown(
|
||||||
initialValue: ctrl.selectUserVal.value,
|
initialValue: ctrl.selectUserVal.value,
|
||||||
backClr: AppColors.clrD9,
|
backClr: AppColors.clrD9,
|
||||||
borderClr: AppColors.clrGrey,
|
borderClr: AppColors.clrGrey,
|
||||||
items: ctrl.items,
|
items: ctrl.userTypeList,
|
||||||
itemLabel: (item) => item,
|
itemLabel: (item) => item,
|
||||||
onSelected: (selected) {
|
onSelected: (selected) {
|
||||||
if (selected != null) {
|
if (selected != null) {
|
||||||
|
@ -107,18 +104,18 @@ class AddInternalUser extends StatelessWidget {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
hintText: 'Select User Type'),
|
hintText: 'Select User Type'),
|
||||||
Obx(() {
|
// Obx(() {
|
||||||
return ctrl.errorText.value.isNotEmpty
|
// return ctrl.errorText.value.isNotEmpty
|
||||||
? Padding(
|
// ? Padding(
|
||||||
padding: const EdgeInsets.only(top: 8.0),
|
// padding: const EdgeInsets.only(top: 8.0),
|
||||||
child: Text(
|
// child: Text(
|
||||||
ctrl.errorText.value,
|
// ctrl.errorText.value,
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: Colors.red, fontSize: 12),
|
// color: Colors.red, fontSize: 12),
|
||||||
),
|
// ),
|
||||||
)
|
// )
|
||||||
: SizedBox.shrink();
|
// : SizedBox.shrink();
|
||||||
}),
|
// }),
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
SizedBox(width: 16),
|
SizedBox(width: 16),
|
||||||
|
@ -129,8 +126,7 @@ class AddInternalUser extends StatelessWidget {
|
||||||
children: [
|
children: [
|
||||||
TextView(
|
TextView(
|
||||||
text: AppStrings.status,
|
text: AppStrings.status,
|
||||||
style: TextStyle(
|
),
|
||||||
fontSize: 12, fontWeight: FontWeight.bold)),
|
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
CustomDropdown(
|
CustomDropdown(
|
||||||
initialValue: ctrl.selectedStatus.value,
|
initialValue: ctrl.selectedStatus.value,
|
||||||
|
@ -154,8 +150,7 @@ class AddInternalUser extends StatelessWidget {
|
||||||
children: [
|
children: [
|
||||||
TextView(
|
TextView(
|
||||||
text: AppStrings.emailAddress,
|
text: AppStrings.emailAddress,
|
||||||
style: TextStyle(
|
),
|
||||||
fontSize: 12, fontWeight: FontWeight.bold)),
|
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
InputField(
|
InputField(
|
||||||
controller: ctrl.emailCtrl,
|
controller: ctrl.emailCtrl,
|
||||||
|
@ -170,8 +165,7 @@ class AddInternalUser extends StatelessWidget {
|
||||||
padding: const EdgeInsets.only(top: 16.0, bottom: 8),
|
padding: const EdgeInsets.only(top: 16.0, bottom: 8),
|
||||||
child: TextView(
|
child: TextView(
|
||||||
text: AppStrings.mobileNo,
|
text: AppStrings.mobileNo,
|
||||||
style:
|
),
|
||||||
TextStyle(fontSize: 12, fontWeight: FontWeight.bold)),
|
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
|
@ -207,11 +201,8 @@ class AddInternalUser extends StatelessWidget {
|
||||||
text: ctrl.employeeCodeCtrl.text.isEmpty
|
text: ctrl.employeeCodeCtrl.text.isEmpty
|
||||||
? AppStrings.add
|
? AppStrings.add
|
||||||
: AppStrings.edit,
|
: AppStrings.edit,
|
||||||
textStyle: TextStyle(
|
|
||||||
fontSize: 12,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: Colors.white),
|
|
||||||
// textClr: Colors.white,
|
|
||||||
clickAction: () {
|
clickAction: () {
|
||||||
ctrl.employeeCodeCtrl.text.isEmpty
|
ctrl.employeeCodeCtrl.text.isEmpty
|
||||||
? ctrl.createUser()
|
? ctrl.createUser()
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:shayog/components/common/common_button.dart';
|
||||||
import 'package:shayog/components/common/custom_drop_down.dart';
|
import 'package:shayog/components/common/custom_drop_down.dart';
|
||||||
|
import 'package:shayog/components/styles/textStyles.dart';
|
||||||
import 'package:shayog/feature/presentation/screens/dashboard/controller/dashboard_ctrl.dart';
|
import 'package:shayog/feature/presentation/screens/dashboard/controller/dashboard_ctrl.dart';
|
||||||
import 'package:shayog/feature/presentation/screens/transporter/widgets/common_card.dart';
|
import 'package:shayog/feature/presentation/screens/transporter/widgets/common_card.dart';
|
||||||
import 'package:sizer/sizer.dart';
|
import 'package:shayog/feature/presentation/widgets/text_view.dart';
|
||||||
import '../../../../../components/common/common_btn.dart';
|
import '../../../../../components/common/common_btn.dart';
|
||||||
import '../../../../../components/styles/app_colors.dart';
|
import '../../../../../components/styles/app_colors.dart';
|
||||||
import '../../../../../components/styles/app_strings.dart';
|
import '../../../../../components/styles/app_strings.dart';
|
||||||
|
@ -39,7 +41,7 @@ class InternalUserRoleMapping extends StatelessWidget {
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
_commonText(
|
TextView(text:
|
||||||
"Employee Code",
|
"Employee Code",
|
||||||
),
|
),
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
|
@ -63,7 +65,7 @@ class InternalUserRoleMapping extends StatelessWidget {
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
_commonText(
|
TextView(text:
|
||||||
"Email Address",
|
"Email Address",
|
||||||
),
|
),
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
|
@ -86,7 +88,7 @@ class InternalUserRoleMapping extends StatelessWidget {
|
||||||
//flex: 2,
|
//flex: 2,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
_commonText(
|
TextView(text:
|
||||||
"",
|
"",
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
|
@ -100,9 +102,12 @@ class InternalUserRoleMapping extends StatelessWidget {
|
||||||
clickAction: () {},
|
clickAction: () {},
|
||||||
),
|
),
|
||||||
SizedBox(width: 16),
|
SizedBox(width: 16),
|
||||||
CommonBtn(
|
CommonButton(
|
||||||
|
borderRadius: 4,
|
||||||
|
height: 30,
|
||||||
|
width: 100,
|
||||||
text: AppStrings.submit,
|
text: AppStrings.submit,
|
||||||
textClr: Colors.white,
|
|
||||||
clickAction: () {
|
clickAction: () {
|
||||||
ctrl.getRoleMappingData();
|
ctrl.getRoleMappingData();
|
||||||
},
|
},
|
||||||
|
@ -128,13 +133,9 @@ class InternalUserRoleMapping extends StatelessWidget {
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
TextView(
|
||||||
'User Type: Admin',
|
text: 'User Type: Admin',
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.black,
|
|
||||||
fontSize: 12.sp,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 10,
|
height: 10,
|
||||||
|
@ -170,10 +171,9 @@ class InternalUserRoleMapping extends StatelessWidget {
|
||||||
MaterialTapTargetSize.shrinkWrap,
|
MaterialTapTargetSize.shrinkWrap,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
TextView(text:
|
||||||
fetchRole.roleName ?? "",
|
fetchRole.roleName ?? "",
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12, color: Colors.black),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
@ -188,12 +188,9 @@ class InternalUserRoleMapping extends StatelessWidget {
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 8,
|
height: 8,
|
||||||
),
|
),
|
||||||
Text(
|
TextView(text:
|
||||||
'*Note- If user type is transporter, by default all the plants would be selected for the first time.',
|
'*Note- If user type is transporter, by default all the plants would be selected for the first time.',
|
||||||
style: TextStyle(
|
style: 13.txtSBoldRed,
|
||||||
color: Colors.red,
|
|
||||||
fontSize: 13.sp,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 12,
|
height: 12,
|
||||||
|
@ -209,9 +206,13 @@ class InternalUserRoleMapping extends StatelessWidget {
|
||||||
clickAction: () {},
|
clickAction: () {},
|
||||||
),
|
),
|
||||||
SizedBox(width: 16),
|
SizedBox(width: 16),
|
||||||
CommonBtn(
|
CommonButton(
|
||||||
|
borderRadius: 4,
|
||||||
|
height: 30,
|
||||||
|
width: 100,
|
||||||
text: AppStrings.submit,
|
text: AppStrings.submit,
|
||||||
textClr: Colors.white,
|
|
||||||
|
|
||||||
clickAction: () {
|
clickAction: () {
|
||||||
CommonAlertDialog.showDialog(
|
CommonAlertDialog.showDialog(
|
||||||
message:
|
message:
|
||||||
|
@ -260,20 +261,12 @@ class InternalUserRoleMapping extends StatelessWidget {
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
descRole,
|
descRole,
|
||||||
style: TextStyle(
|
style:12.txtSBoldBlack
|
||||||
color: Colors.black,
|
|
||||||
fontSize: 12.sp,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
_commonText(String title) {
|
|
||||||
return Text(
|
|
||||||
title,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 13, color: Colors.black, fontWeight: FontWeight.w900),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:shayog/components/common/common_button.dart';
|
||||||
|
import 'package:shayog/components/styles/textStyles.dart';
|
||||||
import '../../../../../components/common/common_btn.dart';
|
import '../../../../../components/common/common_btn.dart';
|
||||||
import '../../../../../components/common/data_cell.dart';
|
import '../../../../../components/common/data_cell.dart';
|
||||||
import '../../../../../components/styles/app_colors.dart';
|
import '../../../../../components/styles/app_colors.dart';
|
||||||
|
@ -12,12 +15,18 @@ class ManageUser extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Obx(() {
|
return Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Obx(() {
|
||||||
if (controller.userLoading.value) {
|
if (controller.userLoading.value) {
|
||||||
return Center(child: CircularProgressIndicator());
|
return Center(child: CircularProgressIndicator());
|
||||||
}
|
}
|
||||||
|
|
||||||
return Scrollbar(
|
return Column(
|
||||||
|
children: [
|
||||||
|
Scrollbar(
|
||||||
thumbVisibility: true,
|
thumbVisibility: true,
|
||||||
controller: controller.verticalScrollController,
|
controller: controller.verticalScrollController,
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
|
@ -39,10 +48,13 @@ class ManageUser extends StatelessWidget {
|
||||||
child: DataTable(
|
child: DataTable(
|
||||||
dataRowHeight: 28,
|
dataRowHeight: 28,
|
||||||
headingRowHeight: 40,
|
headingRowHeight: 40,
|
||||||
headingRowColor: WidgetStateProperty.all(AppColors.clrF2),
|
headingRowColor:
|
||||||
|
WidgetStateProperty.all(AppColors.clrF2),
|
||||||
border: TableBorder(
|
border: TableBorder(
|
||||||
horizontalInside: BorderSide(color: AppColors.clrGrey),
|
horizontalInside:
|
||||||
verticalInside: BorderSide(color: AppColors.clrGrey),
|
BorderSide(color: AppColors.clrGrey),
|
||||||
|
verticalInside:
|
||||||
|
BorderSide(color: AppColors.clrGrey),
|
||||||
bottom: BorderSide(color: AppColors.clrGrey),
|
bottom: BorderSide(color: AppColors.clrGrey),
|
||||||
left: BorderSide(color: AppColors.clrGrey),
|
left: BorderSide(color: AppColors.clrGrey),
|
||||||
right: BorderSide(color: AppColors.clrGrey),
|
right: BorderSide(color: AppColors.clrGrey),
|
||||||
|
@ -62,8 +74,8 @@ class ManageUser extends StatelessWidget {
|
||||||
dataColumn("Status"),
|
dataColumn("Status"),
|
||||||
dataColumn("Action"),
|
dataColumn("Action"),
|
||||||
],
|
],
|
||||||
rows: List<DataRow>.generate(controller.getAllUser.length,
|
rows: List<DataRow>.generate(
|
||||||
(index) {
|
controller.getAllUser.length, (index) {
|
||||||
final stoppage = controller.getAllUser[index];
|
final stoppage = controller.getAllUser[index];
|
||||||
|
|
||||||
return DataRow(
|
return DataRow(
|
||||||
|
@ -72,28 +84,38 @@ class ManageUser extends StatelessWidget {
|
||||||
// controller.toggleSelection(index, value ?? false);
|
// controller.toggleSelection(index, value ?? false);
|
||||||
// },
|
// },
|
||||||
cells: [
|
cells: [
|
||||||
editableCell(index, "0${index + 1}"),
|
editableCell(index, ""
|
||||||
|
"${index + 1}"),
|
||||||
editableCell(index, stoppage.userName ?? ""),
|
editableCell(index, stoppage.userName ?? ""),
|
||||||
editableCell(index, stoppage.userEmail ?? ""),
|
editableCell(index, stoppage.userEmail ?? ""),
|
||||||
editableCell(index, stoppage.userEmpTransCode ?? ""),
|
editableCell(
|
||||||
|
index, stoppage.userEmpTransCode ?? ""),
|
||||||
editableCell(index, stoppage.userMobile ?? ""),
|
editableCell(index, stoppage.userMobile ?? ""),
|
||||||
editableCell(index, stoppage.usertypeName ?? ""),
|
editableCell(
|
||||||
editableCell(index, stoppage.createdBy.toString()),
|
index, stoppage.usertypeName ?? ""),
|
||||||
editableCell(index, stoppage.createdOn.toString()),
|
editableCell(
|
||||||
editableCell(index, stoppage.lastUpdatedBy.toString()),
|
index, stoppage.createdBy.toString()),
|
||||||
editableCell(index, stoppage.lastUpdatedOn.toString()),
|
editableCell(
|
||||||
|
index,
|
||||||
|
DateFormat("d MMMM yyyy").format(
|
||||||
|
DateTime.parse(
|
||||||
|
'${stoppage.createdOn}'))),
|
||||||
|
editableCell(
|
||||||
|
index, stoppage.lastUpdatedBy.toString()),
|
||||||
|
editableCell(
|
||||||
|
index,
|
||||||
|
DateFormat("d MMMM yyyy").format(
|
||||||
|
DateTime.parse(
|
||||||
|
'${stoppage.lastUpdatedOn}'))),
|
||||||
editableCell(index, stoppage.status.toString()),
|
editableCell(index, stoppage.status.toString()),
|
||||||
DataCell(CommonBtn(
|
DataCell(CommonBtn(
|
||||||
style: TextStyle(
|
style: 8.txtSBoldWhite,
|
||||||
fontSize: 8,
|
|
||||||
color: Colors.white,
|
|
||||||
fontWeight: FontWeight.bold),
|
|
||||||
margin: EdgeInsets.symmetric(vertical: 6),
|
margin: EdgeInsets.symmetric(vertical: 6),
|
||||||
width: 35,
|
width: 35,
|
||||||
text: "Edit",
|
text: "Edit",
|
||||||
textClr: Colors.white,
|
|
||||||
clickAction: () {
|
clickAction: () {
|
||||||
controller.nameCtrl.text = stoppage.userFname ?? '';
|
controller.nameCtrl.text =
|
||||||
|
stoppage.userFname ?? '';
|
||||||
controller.lastNCtrl.text =
|
controller.lastNCtrl.text =
|
||||||
stoppage.userLname ?? '';
|
stoppage.userLname ?? '';
|
||||||
controller.mobileCtrl.text =
|
controller.mobileCtrl.text =
|
||||||
|
@ -121,7 +143,29 @@ class ManageUser extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 16),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
CommonButton(
|
||||||
|
height: 30,
|
||||||
|
width: 100,
|
||||||
|
text: "Previous",
|
||||||
|
clickAction: controller.previousPage),
|
||||||
|
Text(
|
||||||
|
'Page ${controller.currentPage.value} of ${controller.totalPages.value}'),
|
||||||
|
CommonButton(
|
||||||
|
height: 30,
|
||||||
|
width: 100,
|
||||||
|
text: "Next",
|
||||||
|
clickAction: controller.nextPage),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
],
|
||||||
);
|
);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:shayog/components/styles/textStyles.dart';
|
||||||
import 'package:shayog/feature/presentation/screens/dashboard/controller/dashboard_ctrl.dart';
|
import 'package:shayog/feature/presentation/screens/dashboard/controller/dashboard_ctrl.dart';
|
||||||
import 'package:shayog/feature/presentation/screens/transporter/widgets/common_card.dart';
|
import 'package:shayog/feature/presentation/screens/transporter/widgets/common_card.dart';
|
||||||
|
import 'package:shayog/feature/presentation/widgets/text_view.dart';
|
||||||
|
|
||||||
import '../../../../../components/common/common_btn.dart';
|
import '../../../../../components/common/common_btn.dart';
|
||||||
|
import '../../../../../components/common/common_button.dart';
|
||||||
import '../../../../../components/common/custom_drop_down.dart';
|
import '../../../../../components/common/custom_drop_down.dart';
|
||||||
import '../../../../../components/styles/app_colors.dart';
|
import '../../../../../components/styles/app_colors.dart';
|
||||||
import '../../../../../components/styles/app_strings.dart';
|
import '../../../../../components/styles/app_strings.dart';
|
||||||
|
@ -29,8 +32,8 @@ class UserPlantMapping extends StatelessWidget {
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
_commonText(
|
TextView(
|
||||||
"Employee/Transporter Code",
|
text: "Employee/Transporter Code",style: 13.txtBoldBlack,
|
||||||
),
|
),
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
CustomDropdown(
|
CustomDropdown(
|
||||||
|
@ -53,8 +56,8 @@ class UserPlantMapping extends StatelessWidget {
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
_commonText(
|
TextView(text:
|
||||||
"Email Address",
|
"Email Address",style:13.txtBoldBlack
|
||||||
),
|
),
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
CustomDropdown(
|
CustomDropdown(
|
||||||
|
@ -76,7 +79,7 @@ class UserPlantMapping extends StatelessWidget {
|
||||||
//flex: 2,
|
//flex: 2,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
_commonText(
|
TextView(text:
|
||||||
"",
|
"",
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
|
@ -90,9 +93,12 @@ class UserPlantMapping extends StatelessWidget {
|
||||||
clickAction: () {},
|
clickAction: () {},
|
||||||
),
|
),
|
||||||
SizedBox(width: 16),
|
SizedBox(width: 16),
|
||||||
CommonBtn(
|
CommonButton(
|
||||||
|
borderRadius: 4,
|
||||||
|
height: 30,
|
||||||
|
width: 100,
|
||||||
text: AppStrings.submit,
|
text: AppStrings.submit,
|
||||||
textClr: Colors.white,
|
|
||||||
clickAction: () {
|
clickAction: () {
|
||||||
ctrl.getPlantMapping();
|
ctrl.getPlantMapping();
|
||||||
},
|
},
|
||||||
|
@ -110,12 +116,9 @@ class UserPlantMapping extends StatelessWidget {
|
||||||
ctrl.plantMapping.isNotEmpty
|
ctrl.plantMapping.isNotEmpty
|
||||||
? Padding(
|
? Padding(
|
||||||
padding: const EdgeInsets.only(top: 16.0),
|
padding: const EdgeInsets.only(top: 16.0),
|
||||||
child: Text(
|
child: TextView(
|
||||||
"User Type: Admin",
|
text: "User Type: Admin",
|
||||||
style: TextStyle(
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: 14,
|
|
||||||
color: Colors.black),
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: SizedBox(),
|
: SizedBox(),
|
||||||
|
@ -147,9 +150,9 @@ class UserPlantMapping extends StatelessWidget {
|
||||||
.shrinkWrap,
|
.shrinkWrap,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
TextView(
|
||||||
ctrl.plantMapping[index].plantPan ?? "",
|
text: ctrl.plantMapping[index].plantPan ?? "",
|
||||||
style: TextStyle(fontSize: 12, color: Colors.black),
|
style:12.txtRegularBlack,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
@ -162,12 +165,10 @@ class UserPlantMapping extends StatelessWidget {
|
||||||
Obx(
|
Obx(
|
||||||
() =>
|
() =>
|
||||||
ctrl.plantMapping.isNotEmpty
|
ctrl.plantMapping.isNotEmpty
|
||||||
? Text(
|
? TextView( text:
|
||||||
"*Note-If user type is a transporter,by default all the plants would be selected for the frist time",
|
"*Note-If user type is a transporter,by default all the plants would be selected for the frist time",
|
||||||
style: TextStyle(
|
style:12.txtSBoldRed
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: 12,
|
|
||||||
color: Colors.red),
|
|
||||||
)
|
)
|
||||||
: SizedBox(),
|
: SizedBox(),
|
||||||
),
|
),
|
||||||
|
@ -188,9 +189,13 @@ class UserPlantMapping extends StatelessWidget {
|
||||||
clickAction: () {},
|
clickAction: () {},
|
||||||
),
|
),
|
||||||
SizedBox(width: 16),
|
SizedBox(width: 16),
|
||||||
CommonBtn(
|
CommonButton(
|
||||||
|
borderRadius: 4,
|
||||||
|
height: 30,
|
||||||
|
width: 100,
|
||||||
text: AppStrings.submit,
|
text: AppStrings.submit,
|
||||||
textClr: Colors.white,
|
|
||||||
|
|
||||||
clickAction: () {
|
clickAction: () {
|
||||||
CommonAlertDialog.showDialog(
|
CommonAlertDialog.showDialog(
|
||||||
message: 'Are you sure you want to do this action?',
|
message: 'Are you sure you want to do this action?',
|
||||||
|
@ -216,11 +221,5 @@ class UserPlantMapping extends StatelessWidget {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
_commonText(String title) {
|
|
||||||
return Text(
|
|
||||||
title,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 13, color: Colors.black, fontWeight: FontWeight.w900),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:shayog/components/common/input_field.dart';
|
||||||
|
import 'package:shayog/components/styles/textStyles.dart';
|
||||||
import 'package:shayog/feature/presentation/screens/admin/user_management/user_plant_mapping.dart';
|
import 'package:shayog/feature/presentation/screens/admin/user_management/user_plant_mapping.dart';
|
||||||
import 'package:shayog/feature/presentation/widgets/text_view.dart';
|
import 'package:shayog/feature/presentation/widgets/text_view.dart';
|
||||||
import '../../../../../components/common/common_btn.dart';
|
import '../../../../../components/common/common_btn.dart';
|
||||||
import '../../../../../components/common/custom_drop_down.dart';
|
import '../../../../../components/common/common_button.dart';
|
||||||
import '../../../../../components/styles/app_colors.dart';
|
import '../../../../../components/styles/app_colors.dart';
|
||||||
import '../../../../../components/styles/app_images.dart';
|
import '../../../../../components/styles/app_images.dart';
|
||||||
import '../../../../../components/styles/app_strings.dart';
|
import '../../../../../components/styles/app_strings.dart';
|
||||||
|
@ -106,7 +108,6 @@ class UserScreen extends StatelessWidget {
|
||||||
onTap:(){
|
onTap:(){
|
||||||
ctrl.toggleContainer();
|
ctrl.toggleContainer();
|
||||||
},
|
},
|
||||||
|
|
||||||
child: Image.asset(AppImages.filter,
|
child: Image.asset(AppImages.filter,
|
||||||
height: 16, width: 16)),
|
height: 16, width: 16)),
|
||||||
),
|
),
|
||||||
|
@ -151,6 +152,13 @@ class UserScreen extends StatelessWidget {
|
||||||
text: "User Name",
|
text: "User Name",
|
||||||
),
|
),
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
|
InputField(
|
||||||
|
title: "Enter User Name",
|
||||||
|
|
||||||
|
controller: ctrl.userTypeCtrl
|
||||||
|
|
||||||
|
),
|
||||||
|
|
||||||
// CustomDropdown(
|
// CustomDropdown(
|
||||||
// backClr: AppColors.clrD9,
|
// backClr: AppColors.clrD9,
|
||||||
// borderClr: AppColors.clrGrey,
|
// borderClr: AppColors.clrGrey,
|
||||||
|
@ -176,6 +184,11 @@ class UserScreen extends StatelessWidget {
|
||||||
text: "User Type",
|
text: "User Type",
|
||||||
),
|
),
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
|
InputField(
|
||||||
|
title: "Enter User Type",
|
||||||
|
controller: ctrl.userTypeCtrl
|
||||||
|
|
||||||
|
),
|
||||||
// CustomDropdown(
|
// CustomDropdown(
|
||||||
// backClr: AppColors.clrD9,
|
// backClr: AppColors.clrD9,
|
||||||
// borderClr: AppColors.clrGrey,
|
// borderClr: AppColors.clrGrey,
|
||||||
|
@ -201,6 +214,10 @@ class UserScreen extends StatelessWidget {
|
||||||
text: "Email Address",
|
text: "Email Address",
|
||||||
),
|
),
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
|
InputField(
|
||||||
|
title: "Enter Email Address",
|
||||||
|
controller: ctrl.emailCtrl
|
||||||
|
),
|
||||||
// CustomDropdown(
|
// CustomDropdown(
|
||||||
// backClr: AppColors.clrD9,
|
// backClr: AppColors.clrD9,
|
||||||
// borderClr: AppColors.clrGrey,
|
// borderClr: AppColors.clrGrey,
|
||||||
|
@ -219,7 +236,7 @@ class UserScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(
|
padding: const EdgeInsets.only(
|
||||||
top: 16.0, left: 8, right: 8),
|
top: 16.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
|
@ -233,6 +250,10 @@ class UserScreen extends StatelessWidget {
|
||||||
text: "Employee/Transporter Code",
|
text: "Employee/Transporter Code",
|
||||||
),
|
),
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
|
InputField(
|
||||||
|
title: "Enter Employee Code",
|
||||||
|
controller: ctrl.employeeCodeCtrl
|
||||||
|
),
|
||||||
// CustomDropdown(
|
// CustomDropdown(
|
||||||
// backClr: AppColors.clrD9,
|
// backClr: AppColors.clrD9,
|
||||||
// borderClr: AppColors.clrGrey,
|
// borderClr: AppColors.clrGrey,
|
||||||
|
@ -260,6 +281,10 @@ class UserScreen extends StatelessWidget {
|
||||||
"Status",
|
"Status",
|
||||||
),
|
),
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
|
InputField(
|
||||||
|
title: "Enter Status",
|
||||||
|
controller: ctrl.statusCtrl
|
||||||
|
),
|
||||||
// CustomDropdown(
|
// CustomDropdown(
|
||||||
// backClr: AppColors.clrD9,
|
// backClr: AppColors.clrD9,
|
||||||
// borderClr: AppColors.clrGrey,
|
// borderClr: AppColors.clrGrey,
|
||||||
|
@ -294,11 +319,14 @@ class UserScreen extends StatelessWidget {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
SizedBox(width: 16),
|
SizedBox(width: 16),
|
||||||
CommonBtn(
|
CommonButton(
|
||||||
|
borderRadius: 4,
|
||||||
|
width: 100,height:30,
|
||||||
text: AppStrings.submit,
|
text: AppStrings.submit,
|
||||||
textClr: Colors.white,
|
textStyle: 14.txtSBoldWhite,
|
||||||
clickAction: () {
|
clickAction: () {
|
||||||
ctrl.isSelected.value = false;
|
ctrl.isSelected.value = false;
|
||||||
|
ctrl.getAllUser();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:shayog/components/common/common_button.dart';
|
import 'package:shayog/components/common/common_button.dart';
|
||||||
|
import 'package:shayog/components/styles/textStyles.dart';
|
||||||
import 'package:shayog/feature/presentation/screens/transporter/widgets/common_card.dart';
|
import 'package:shayog/feature/presentation/screens/transporter/widgets/common_card.dart';
|
||||||
|
import 'package:shayog/feature/presentation/widgets/text_view.dart';
|
||||||
import '../../../../../components/common/common_btn.dart';
|
import '../../../../../components/common/common_btn.dart';
|
||||||
import '../../../../../components/common/custom_drop_down.dart';
|
import '../../../../../components/common/custom_drop_down.dart';
|
||||||
import '../../../../../components/common/data_cell.dart';
|
import '../../../../../components/common/data_cell.dart';
|
||||||
|
@ -30,7 +32,7 @@ class UserType extends StatelessWidget {
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
_commonText(
|
TextView(text:
|
||||||
"Add User Type",
|
"Add User Type",
|
||||||
),
|
),
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
|
@ -46,7 +48,8 @@ class UserType extends StatelessWidget {
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
_commonText(
|
TextView(
|
||||||
|
text:
|
||||||
"Status Type",
|
"Status Type",
|
||||||
),
|
),
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
|
@ -69,7 +72,7 @@ class UserType extends StatelessWidget {
|
||||||
//flex: 2,
|
//flex: 2,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
_commonText(
|
TextView(text:
|
||||||
"",
|
"",
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
|
@ -89,11 +92,8 @@ class UserType extends StatelessWidget {
|
||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
width: 100,
|
width: 100,
|
||||||
text: AppStrings.submit,
|
text: AppStrings.submit,
|
||||||
textStyle: TextStyle(
|
|
||||||
fontSize: 12,
|
|
||||||
color: Colors.white,
|
|
||||||
fontWeight: FontWeight.bold),
|
|
||||||
//textClr: Colors.white,
|
|
||||||
clickAction: () {
|
clickAction: () {
|
||||||
controller.createUserType();
|
controller.createUserType();
|
||||||
},
|
},
|
||||||
|
@ -111,9 +111,9 @@ class UserType extends StatelessWidget {
|
||||||
margin: const EdgeInsets.only(top: 24.0, bottom: 8),
|
margin: const EdgeInsets.only(top: 24.0, bottom: 8),
|
||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width,
|
||||||
color: AppColors.primaryClr,
|
color: AppColors.primaryClr,
|
||||||
child: Text(
|
child: TextView(text:
|
||||||
AppStrings.userTypes,
|
AppStrings.userTypes,
|
||||||
style: TextStyle(fontSize: 14, color: Colors.white),
|
style: 14.txtBoldWhite,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Obx(() {
|
Obx(() {
|
||||||
|
@ -229,11 +229,5 @@ class UserType extends StatelessWidget {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
_commonText(String title) {
|
|
||||||
return Text(
|
|
||||||
title,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 13, color: Colors.black, fontWeight: FontWeight.w900),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,9 @@ class DashboardCtrl extends GetxController {
|
||||||
final emailCtrl = TextEditingController();
|
final emailCtrl = TextEditingController();
|
||||||
final mobileCtrl = TextEditingController();
|
final mobileCtrl = TextEditingController();
|
||||||
final userTypeCtrl = TextEditingController();
|
final userTypeCtrl = TextEditingController();
|
||||||
|
final statusCtrl = TextEditingController();
|
||||||
|
|
||||||
|
|
||||||
var selectedIndex = 0.obs;
|
var selectedIndex = 0.obs;
|
||||||
var selectUserType = 0.obs;
|
var selectUserType = 0.obs;
|
||||||
var selectedUser = 0.obs;
|
var selectedUser = 0.obs;
|
||||||
|
@ -42,7 +45,7 @@ class DashboardCtrl extends GetxController {
|
||||||
print("isSelected.value..${isSelected.value}");
|
print("isSelected.value..${isSelected.value}");
|
||||||
}
|
}
|
||||||
|
|
||||||
var items =
|
var userTypeList =
|
||||||
['Admin', 'Sub Admin', 'Internal Audit', 'Raw material', 'MIS User'].obs;
|
['Admin', 'Sub Admin', 'Internal Audit', 'Raw material', 'MIS User'].obs;
|
||||||
|
|
||||||
RxList tabs = <CommonModel>[
|
RxList tabs = <CommonModel>[
|
||||||
|
@ -79,17 +82,17 @@ class DashboardCtrl extends GetxController {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************************************************
|
|
||||||
final formKey = GlobalKey<FormState>();
|
|
||||||
|
|
||||||
var userData = [].obs;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//**************************Manage-User************************************
|
//**************************Manage-User************************************
|
||||||
|
var currentPage = 1.obs;
|
||||||
|
var totalPages = 3.obs;
|
||||||
|
final int limit = 10;
|
||||||
var getAllUser = <AllUser>[].obs;
|
var getAllUser = <AllUser>[].obs;
|
||||||
var userLoading = false.obs;
|
var userLoading = false.obs;
|
||||||
|
|
||||||
|
@ -105,7 +108,7 @@ class DashboardCtrl extends GetxController {
|
||||||
"status": ""
|
"status": ""
|
||||||
};
|
};
|
||||||
|
|
||||||
var response = await PostRequests.getAllUser(requestBody);
|
var response = await PostRequests.getAllUser(requestBody,currentPage.value,limit);
|
||||||
if (response != null) {
|
if (response != null) {
|
||||||
getAllUser.assignAll(response.data?.content ?? []);
|
getAllUser.assignAll(response.data?.content ?? []);
|
||||||
}
|
}
|
||||||
|
@ -113,7 +116,18 @@ class DashboardCtrl extends GetxController {
|
||||||
userLoading.value = false;
|
userLoading.value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void nextPage() {
|
||||||
|
if (currentPage.value < totalPages.value) {
|
||||||
|
currentPage.value++;
|
||||||
|
getManageUser(); // Fetch data for the next page
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void previousPage() {
|
||||||
|
if (currentPage.value > 1) {
|
||||||
|
currentPage.value--;
|
||||||
|
getManageUser(); // Fetch data for the previous page
|
||||||
|
}
|
||||||
|
}
|
||||||
//********************************edit User****************************//
|
//********************************edit User****************************//
|
||||||
var editLoading = false.obs;
|
var editLoading = false.obs;
|
||||||
Rx<Data> editUserResModel = Data().obs;
|
Rx<Data> editUserResModel = Data().obs;
|
||||||
|
@ -204,9 +218,7 @@ class DashboardCtrl extends GetxController {
|
||||||
isLoading.value = false;
|
isLoading.value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//**************************Internal User Role Mapping*********************
|
|
||||||
//**************************User Plant Mapping*****************************
|
|
||||||
//**************************Create User Type*******************************
|
|
||||||
|
|
||||||
void updateSelectedRoleIds(int roleId, bool isSelected) {
|
void updateSelectedRoleIds(int roleId, bool isSelected) {
|
||||||
if (isSelected) {
|
if (isSelected) {
|
||||||
|
@ -265,11 +277,8 @@ class DashboardCtrl extends GetxController {
|
||||||
showPlantRolesSection.value = false;
|
showPlantRolesSection.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//************************getAllUser*****************************
|
|
||||||
|
|
||||||
|
|
||||||
//************************editAllUser*****************************
|
|
||||||
|
|
||||||
|
|
||||||
//************************-createUserType-*****************************
|
//************************-createUserType-*****************************
|
||||||
var userTypeLoading = false.obs;
|
var userTypeLoading = false.obs;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:shayog/components/styles/app_strings.dart';
|
import 'package:shayog/components/styles/app_strings.dart';
|
||||||
|
import 'package:shayog/components/styles/textStyles.dart';
|
||||||
import 'package:shayog/feature/presentation/screens/transporter/view/transport_view.dart';
|
import 'package:shayog/feature/presentation/screens/transporter/view/transport_view.dart';
|
||||||
|
|
||||||
import '../../../../components/styles/app_colors.dart';
|
import '../../../../components/styles/app_colors.dart';
|
||||||
|
@ -29,17 +30,12 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
text: AppStrings.appName,
|
text: AppStrings.appName,
|
||||||
style: TextStyle(
|
style: 20.txtBoldBlue,
|
||||||
fontSize: 20,
|
|
||||||
color: AppColors.primaryClr,
|
|
||||||
fontWeight: FontWeight.w900),
|
|
||||||
children: [
|
children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: '\n${AppStrings.cement}',
|
text: '\n${AppStrings.cement}',
|
||||||
style: TextStyle(
|
style: 20.txtBoldBlue,
|
||||||
fontSize: 15,
|
)
|
||||||
color: AppColors.primaryClr,
|
|
||||||
fontWeight: FontWeight.w900))
|
|
||||||
])),
|
])),
|
||||||
actions: [
|
actions: [
|
||||||
Padding(
|
Padding(
|
||||||
|
@ -53,7 +49,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
"A",
|
"A",
|
||||||
style: TextStyle(fontSize: 18, color: AppColors.primaryClr),
|
style: 20.txtBoldBlue,
|
||||||
)),
|
)),
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
|
@ -62,10 +58,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||||
ctrl.selectUserType.value == 0
|
ctrl.selectUserType.value == 0
|
||||||
? AppStrings.adminUser
|
? AppStrings.adminUser
|
||||||
: AppStrings.transportVendor,
|
: AppStrings.transportVendor,
|
||||||
style: TextStyle(
|
style: 12.txtBoldBlack,
|
||||||
fontSize: 12,
|
|
||||||
color: Colors.black,
|
|
||||||
fontWeight: FontWeight.w900),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
PopupMenuButton(
|
PopupMenuButton(
|
||||||
|
@ -84,9 +77,11 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||||
onTap: () {
|
onTap: () {
|
||||||
ctrl.selectUserType.value = index;
|
ctrl.selectUserType.value = index;
|
||||||
},
|
},
|
||||||
child: Text(index == 0
|
child: Text(
|
||||||
|
index == 0
|
||||||
? AppStrings.adminUser
|
? AppStrings.adminUser
|
||||||
: AppStrings.transportVendor),
|
: AppStrings.transportVendor,
|
||||||
|
style: 12.txtSBoldGrey),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -116,7 +111,6 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||||
() => InkWell(
|
() => InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
ctrl.selectedIndex.value = index;
|
ctrl.selectedIndex.value = index;
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
@ -144,10 +138,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||||
Text(
|
Text(
|
||||||
ctrl.tabs[index].title ?? "",
|
ctrl.tabs[index].title ?? "",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: 10.txtBoldWhite,
|
||||||
fontSize: 10,
|
|
||||||
color: Colors.white,
|
|
||||||
fontWeight: FontWeight.w900),
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -0,0 +1,167 @@
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../../../../../components/styles/app_colors.dart';
|
||||||
|
import '../../../../../components/styles/app_strings.dart';
|
||||||
|
import '../../../../../navigation/page_routes.dart';
|
||||||
|
|
||||||
|
class LoginScreen extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_LoginScreenState createState() => _LoginScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _LoginScreenState extends State<LoginScreen> {
|
||||||
|
final _formKey = GlobalKey<FormState>();
|
||||||
|
final TextEditingController _usernameController = TextEditingController();
|
||||||
|
final TextEditingController _passwordController = TextEditingController();
|
||||||
|
bool _obscurePassword = true;
|
||||||
|
|
||||||
|
// void _login() {
|
||||||
|
// // if (_formKey.currentState?.validate() ?? false) {
|
||||||
|
// // // Handle login logic here
|
||||||
|
// // Navigator.pushNamed(
|
||||||
|
// // context, PageRoutes.dashboard);
|
||||||
|
// // }
|
||||||
|
// Navigator.pushNamed(
|
||||||
|
// context, PageRoutes.dashboard);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
body: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: AppColors.black,
|
||||||
|
image: DecorationImage(
|
||||||
|
image: AssetImage("assets/images/login_bg.png"),
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
)),
|
||||||
|
child: Center(
|
||||||
|
child: SizedBox(
|
||||||
|
width: 380,
|
||||||
|
height: 500,
|
||||||
|
child: Card(
|
||||||
|
color: Colors.white60,
|
||||||
|
elevation: 10.0,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
RichText(
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
text: TextSpan(
|
||||||
|
text: 'Inbound Portal',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 30,
|
||||||
|
color: AppColors.primaryClr,
|
||||||
|
fontWeight: FontWeight.w900),
|
||||||
|
)),
|
||||||
|
Container(
|
||||||
|
height: 100,
|
||||||
|
width: 150,
|
||||||
|
child: Image.asset("assets/images/back2.png")),
|
||||||
|
SizedBox(height: 8),
|
||||||
|
RichText(
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
text: TextSpan(
|
||||||
|
text: AppStrings.appName,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 30,
|
||||||
|
color: AppColors.primaryClr,
|
||||||
|
fontWeight: FontWeight.w900),
|
||||||
|
children: [
|
||||||
|
TextSpan(
|
||||||
|
text: '\n${AppStrings.cement}',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 25,
|
||||||
|
color: AppColors.primaryClr,
|
||||||
|
fontWeight: FontWeight.w900))
|
||||||
|
])),
|
||||||
|
SizedBox(height: 10),
|
||||||
|
Form(
|
||||||
|
key: _formKey,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||||
|
child: Center(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
TextFormField(
|
||||||
|
controller: _usernameController,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
labelText: 'Username',
|
||||||
|
border: OutlineInputBorder(),
|
||||||
|
),
|
||||||
|
// validator: (value) {
|
||||||
|
// if (value == null || value.isEmpty) {
|
||||||
|
// return 'Please enter your username';
|
||||||
|
// }
|
||||||
|
// return null;
|
||||||
|
// },
|
||||||
|
),
|
||||||
|
SizedBox(height: 16),
|
||||||
|
TextFormField(
|
||||||
|
controller: _passwordController,
|
||||||
|
obscureText: _obscurePassword,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
labelText: 'Password',
|
||||||
|
border: OutlineInputBorder(),
|
||||||
|
suffixIcon: IconButton(
|
||||||
|
icon: Icon(
|
||||||
|
_obscurePassword
|
||||||
|
? Icons.visibility_off
|
||||||
|
: Icons.visibility,
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
setState(() {
|
||||||
|
_obscurePassword = !_obscurePassword;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// validator: (value) {
|
||||||
|
// if (value == null || value.isEmpty) {
|
||||||
|
// return 'Please enter your password';
|
||||||
|
// }
|
||||||
|
// return null;
|
||||||
|
// },
|
||||||
|
),
|
||||||
|
SizedBox(height: 20.0),
|
||||||
|
GestureDetector(
|
||||||
|
child: ElevatedButton(
|
||||||
|
onPressed: (){
|
||||||
|
Navigator.of(context)
|
||||||
|
.pushNamed(PageRoutes.dashboard);
|
||||||
|
},
|
||||||
|
child: Text('Continue'),
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
minimumSize: Size(double.infinity, 45),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 10),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text('Forget Password?'),
|
||||||
|
TextButton(
|
||||||
|
onPressed: () {
|
||||||
|
// Handle navigate to registration screen
|
||||||
|
},
|
||||||
|
child: Text('Click Here'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,45 @@
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import '../../../../../../components/common/common_model.dart';
|
||||||
|
import '../../../../../../components/styles/app_strings.dart';
|
||||||
|
|
||||||
|
class InvoiceManagementController extends GetxController{
|
||||||
|
var selectedState = 0.obs;
|
||||||
|
RxBool isSelected = false.obs;
|
||||||
|
RxList userTabs = <CommonModel>[
|
||||||
|
CommonModel(title: AppStrings.viewInvoice),
|
||||||
|
CommonModel(title: AppStrings.cancelledInvoice),
|
||||||
|
CommonModel(title: AppStrings.ccnView),
|
||||||
|
].obs;
|
||||||
|
var selectedInvoice = '41896424644'.obs; // Default value
|
||||||
|
var selectedFreightNo = '9841651635426'.obs; // Default value
|
||||||
|
void toggleContainer() {
|
||||||
|
isSelected.value = true;
|
||||||
|
print("isSelected.value..${isSelected.value}");
|
||||||
|
}
|
||||||
|
var invoiceNoItems = ['41896424644', '41896424644',
|
||||||
|
'41896424644', '41896424644','41896424644'].obs;
|
||||||
|
var freightBillNoItems = ['9841651635426','9841651635426','9841651635426','9841651635426','9841651635426'];
|
||||||
|
// var items = ['Admin', 'Sub Admin',
|
||||||
|
// 'Internal Audit', 'Raw material','MIS User'].obs;
|
||||||
|
// var status = ['STO','In-Bound'];
|
||||||
|
// RxList tabs = <CommonModel>[
|
||||||
|
// CommonModel(
|
||||||
|
// title: "User\nManagement",
|
||||||
|
// image: AppImages.userMgmt,
|
||||||
|
// selectionImg: AppImages.userMgmtBlue),
|
||||||
|
// CommonModel(
|
||||||
|
// title: "Configuration\nManagement",
|
||||||
|
// image: AppImages.configuration,
|
||||||
|
// selectionImg: AppImages.configurationBlue),
|
||||||
|
// CommonModel(
|
||||||
|
// title: "Masters",
|
||||||
|
// image: AppImages.masters,
|
||||||
|
// selectionImg: AppImages.mastersBlue),
|
||||||
|
// CommonModel(
|
||||||
|
// title: "Freight Bill & \n Invoice",
|
||||||
|
// image: AppImages.bills,
|
||||||
|
// selectionImg: AppImages.billsBlue),
|
||||||
|
// ].obs;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import '../../../../../../components/common/common_model.dart';
|
||||||
|
import '../../../../../../components/styles/app_strings.dart';
|
||||||
|
|
||||||
|
class ReportController extends GetxController{
|
||||||
|
final ScrollController horizontalScrollController = ScrollController();
|
||||||
|
final ScrollController verticalScrollController = ScrollController();
|
||||||
|
var selectedState = 0.obs;
|
||||||
|
RxList reportTabs = <CommonModel>[
|
||||||
|
CommonModel(title: AppStrings.transporterInbound),
|
||||||
|
|
||||||
|
].obs;
|
||||||
|
}
|
|
@ -246,7 +246,7 @@ class GenerateFrightBill extends StatelessWidget {
|
||||||
SizedBox(width: 16),
|
SizedBox(width: 16),
|
||||||
CommonBtn(
|
CommonBtn(
|
||||||
text: AppStrings.submit,
|
text: AppStrings.submit,
|
||||||
textClr: Colors.white,
|
style: 14.txtBoldWhite,
|
||||||
clickAction: () {
|
clickAction: () {
|
||||||
controller.postData();
|
controller.postData();
|
||||||
},
|
},
|
||||||
|
@ -274,7 +274,7 @@ class GenerateFrightBill extends StatelessWidget {
|
||||||
CommonBtn(
|
CommonBtn(
|
||||||
bkClr: AppColors.white,
|
bkClr: AppColors.white,
|
||||||
borderClr: AppColors.primaryClr,
|
borderClr: AppColors.primaryClr,
|
||||||
textClr: AppColors.primaryClr,
|
style: 14.txtBoldBlue,
|
||||||
text: AppStrings.save,
|
text: AppStrings.save,
|
||||||
clickAction: () {
|
clickAction: () {
|
||||||
bool hasSelectedRows = controller.grnDetails
|
bool hasSelectedRows = controller.grnDetails
|
||||||
|
|
|
@ -0,0 +1,468 @@
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
|
||||||
|
import '../../../../../../components/common/common_btn.dart';
|
||||||
|
import '../../../../../../components/common/input_field.dart';
|
||||||
|
import '../../../../../../components/styles/app_colors.dart';
|
||||||
|
import '../../../../../../components/styles/app_images.dart';
|
||||||
|
import '../../../../../../components/styles/app_strings.dart';
|
||||||
|
import '../ctrl/invoice_management_controller.dart';
|
||||||
|
|
||||||
|
class InvoiceManagement extends StatefulWidget {
|
||||||
|
const InvoiceManagement({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<InvoiceManagement> createState() => _TransportViewState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _TransportViewState extends State<InvoiceManagement> {
|
||||||
|
final ctrl = Get.put(InvoiceManagementController());
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.only(bottom: 4),
|
||||||
|
margin: EdgeInsets.all(16),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(bottom: 12),
|
||||||
|
height: 55,
|
||||||
|
color: AppColors.primaryClr,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
ListView.separated(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
shrinkWrap: true,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return Obx(
|
||||||
|
() => InkWell(
|
||||||
|
onTap: () {},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(bottom: 10, top: 10),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border(
|
||||||
|
bottom: BorderSide(
|
||||||
|
color:
|
||||||
|
ctrl.selectedState.value == index
|
||||||
|
? Colors.white
|
||||||
|
: AppColors.primaryClr,
|
||||||
|
width: 3))),
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
ctrl.userTabs[index].title ?? "",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: FontWeight.w900,
|
||||||
|
color: Colors.white),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
separatorBuilder: (context, index) {
|
||||||
|
return SizedBox(width: 16);
|
||||||
|
},
|
||||||
|
itemCount: ctrl.userTabs.length),
|
||||||
|
Spacer(),
|
||||||
|
InkWell(
|
||||||
|
child: Image.asset(AppImages.refresh,
|
||||||
|
height: 10, width: 10)),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Text(
|
||||||
|
AppStrings.refresh,
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.white,
|
||||||
|
fontSize: 10,
|
||||||
|
fontWeight: FontWeight.normal),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
onTap: ctrl.toggleContainer,
|
||||||
|
child: Image.asset(AppImages.filter,
|
||||||
|
height: 12, width: 12)),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Text(
|
||||||
|
AppStrings.filter,
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.white,
|
||||||
|
fontSize: 10,
|
||||||
|
fontWeight: FontWeight.normal),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Obx(
|
||||||
|
() => ctrl.isSelected.value
|
||||||
|
? Container(
|
||||||
|
padding: EdgeInsets.all(16),
|
||||||
|
color: AppColors.clrF2,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
_commonText(
|
||||||
|
"Invoice No.",
|
||||||
|
),
|
||||||
|
SizedBox(height: 8),
|
||||||
|
InputField(
|
||||||
|
title: "Select Invoice No. ",
|
||||||
|
),
|
||||||
|
// Obx(
|
||||||
|
// () => Container(
|
||||||
|
// padding: EdgeInsets.only(left: 8),
|
||||||
|
// height: 35,
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// borderRadius:
|
||||||
|
// BorderRadius.circular(4.0),
|
||||||
|
// color: AppColors.clrD9,
|
||||||
|
// border: Border.all(
|
||||||
|
// color: AppColors.clrGrey)),
|
||||||
|
// child: DropdownButton<String>(
|
||||||
|
// icon: Icon(
|
||||||
|
// Icons
|
||||||
|
// .keyboard_arrow_down_outlined,
|
||||||
|
// size: 20,
|
||||||
|
// color: AppColors.darkGrey),
|
||||||
|
//
|
||||||
|
// isExpanded: true,
|
||||||
|
// underline: SizedBox(),
|
||||||
|
//
|
||||||
|
// value: ctrl
|
||||||
|
// .selectedInvoice.value,
|
||||||
|
// // Use the selected value
|
||||||
|
// onChanged: (String? newValue) {
|
||||||
|
// if (newValue != null) {
|
||||||
|
// ctrl.selectedInvoice.value =
|
||||||
|
// newValue; // Update the selected value
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// items: ctrl.invoiceNoItems
|
||||||
|
// .map((String value) {
|
||||||
|
// return DropdownMenuItem<String>(
|
||||||
|
// value: value.toString(),
|
||||||
|
// child: Text(
|
||||||
|
// value,
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 12,
|
||||||
|
// color:
|
||||||
|
// AppColors.darkGrey),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }).toList(),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
SizedBox(width: 16),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
_commonText(
|
||||||
|
"Invoice date",
|
||||||
|
),
|
||||||
|
SizedBox(height: 8),
|
||||||
|
InputField(
|
||||||
|
title: "Select Invoice Date",
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
SizedBox(width: 16),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
_commonText(
|
||||||
|
"Freight Bill No.",
|
||||||
|
),
|
||||||
|
SizedBox(height: 8),
|
||||||
|
InputField(
|
||||||
|
title: "Select Freight Bill No. ",
|
||||||
|
),
|
||||||
|
// Obx(
|
||||||
|
// () => Container(
|
||||||
|
// padding: EdgeInsets.only(left: 8),
|
||||||
|
// height: 35,
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// borderRadius:
|
||||||
|
// BorderRadius.circular(4.0),
|
||||||
|
// color: AppColors.clrD9,
|
||||||
|
// border: Border.all(
|
||||||
|
// color: AppColors.clrGrey)),
|
||||||
|
// child: DropdownButton<String>(
|
||||||
|
// icon: Icon(
|
||||||
|
// Icons
|
||||||
|
// .keyboard_arrow_down_outlined,
|
||||||
|
// size: 20,
|
||||||
|
// color: AppColors.darkGrey),
|
||||||
|
//
|
||||||
|
// isExpanded: true,
|
||||||
|
// underline: SizedBox(),
|
||||||
|
//
|
||||||
|
// value: ctrl
|
||||||
|
// .selectedFreightNo.value,
|
||||||
|
// // Use the selected value
|
||||||
|
// onChanged: (String? newValue) {
|
||||||
|
// if (newValue != null) {
|
||||||
|
// ctrl
|
||||||
|
// .selectedFreightNo.value =
|
||||||
|
// newValue; // Update the selected value
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// items: ctrl.freightBillNoItems
|
||||||
|
// .map((String value) {
|
||||||
|
// return DropdownMenuItem<String>(
|
||||||
|
// value: value.toString(),
|
||||||
|
// child: Text(
|
||||||
|
// value,
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 12,
|
||||||
|
// color:
|
||||||
|
// AppColors.darkGrey),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }).toList(),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets.only(top: 16.0, left: 0, right: 8),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
_commonText(
|
||||||
|
"Freight Bill Date",
|
||||||
|
),
|
||||||
|
SizedBox(height: 8),
|
||||||
|
InputField(
|
||||||
|
title: "Select Bill Date",
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
CommonBtn(
|
||||||
|
bkClr: Colors.white,
|
||||||
|
text: AppStrings.cancel,
|
||||||
|
clickAction: () {},
|
||||||
|
),
|
||||||
|
SizedBox(width: 16),
|
||||||
|
CommonBtn(
|
||||||
|
text: AppStrings.submit,
|
||||||
|
|
||||||
|
clickAction: () {},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: SizedBox(),
|
||||||
|
),
|
||||||
|
Obx(() {
|
||||||
|
switch (ctrl.selectedState.value) {
|
||||||
|
case 0:
|
||||||
|
return _tableView();
|
||||||
|
case 1:
|
||||||
|
return _tableView();
|
||||||
|
case 2:
|
||||||
|
return _tableView();
|
||||||
|
default:
|
||||||
|
return _tableView();
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
_tableView() {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||||
|
child:
|
||||||
|
Table(border: TableBorder.all(color: AppColors.clrGrey), children: [
|
||||||
|
TableRow(
|
||||||
|
decoration: BoxDecoration(color: AppColors.secondaryClr),
|
||||||
|
children: [
|
||||||
|
_cellText(
|
||||||
|
text: "SR. No.",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "Reference No.",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "Freight Bill No.",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "Freight Bill Date",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "Invoice No.",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "Invoice Date",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "Invoice Amount",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "CCN Amount",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "View CCN",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "Product Type",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "View Invoice",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
// _cellText(
|
||||||
|
// text: "Add Signature",
|
||||||
|
// clr: Colors.black,
|
||||||
|
// fontWeight: FontWeight.bold),
|
||||||
|
]),
|
||||||
|
TableRow(children: [
|
||||||
|
_cellText(
|
||||||
|
text: "01",
|
||||||
|
),
|
||||||
|
_cellText(text: "7894651231"),
|
||||||
|
_cellText(text: "9841651635426"),
|
||||||
|
_cellText(text: "1 August 2024"),
|
||||||
|
_cellText(text: "41918542634"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "XXXXXXXX"),
|
||||||
|
_cellText(text: "XXXXXXXX"),
|
||||||
|
_cellText(text: "78646646", clr: AppColors.primaryClr),
|
||||||
|
_cellText(text: "Z-FUL"),
|
||||||
|
_cellText(text: "View Invoice", clr: AppColors.primaryClr),
|
||||||
|
]),
|
||||||
|
TableRow(children: [
|
||||||
|
_cellText(text: "02"),
|
||||||
|
_cellText(text: "7894651231"),
|
||||||
|
_cellText(text: "9841651635426"),
|
||||||
|
_cellText(text: "1 August 2024"),
|
||||||
|
_cellText(text: "41918542634"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "XXXXXXXX"),
|
||||||
|
_cellText(text: "-"),
|
||||||
|
_cellText(text: "78646646", clr: AppColors.primaryClr),
|
||||||
|
_cellText(text: "Z-FUL"),
|
||||||
|
_cellText(text: "View Invoice", clr: AppColors.primaryClr),
|
||||||
|
]),
|
||||||
|
TableRow(children: [
|
||||||
|
_cellText(text: "03"),
|
||||||
|
_cellText(text: "7894651231"),
|
||||||
|
_cellText(text: "9841651635426"),
|
||||||
|
_cellText(text: "1 August 2024"),
|
||||||
|
_cellText(text: "41918542634"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "XXXXXXXX"),
|
||||||
|
_cellText(text: "-"),
|
||||||
|
_cellText(text: "-", clr: AppColors.primaryClr),
|
||||||
|
_cellText(text: "Z-FUL"),
|
||||||
|
_cellText(text: "View Invoice", clr: AppColors.primaryClr),
|
||||||
|
]),
|
||||||
|
TableRow(children: [
|
||||||
|
_cellText(text: "04"),
|
||||||
|
_cellText(text: "7894651231"),
|
||||||
|
_cellText(text: "9841651635426"),
|
||||||
|
_cellText(text: "1 August 2024"),
|
||||||
|
_cellText(text: "41918542634"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "XXXXXXXX"),
|
||||||
|
_cellText(text: "XXXXXXXX"),
|
||||||
|
_cellText(text: "78646646", clr: AppColors.primaryClr),
|
||||||
|
_cellText(text: "Z-FUL"),
|
||||||
|
_cellText(text: "View Invoice", clr: AppColors.primaryClr),
|
||||||
|
]),
|
||||||
|
TableRow(children: [
|
||||||
|
_cellText(text: "05"),
|
||||||
|
_cellText(text: "7894651231"),
|
||||||
|
_cellText(text: "9841651635426"),
|
||||||
|
_cellText(text: "1 August 2024"),
|
||||||
|
_cellText(text: "41918542634"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "XXXXXXXX"),
|
||||||
|
_cellText(text: "-"),
|
||||||
|
_cellText(text: "-", clr: AppColors.primaryClr),
|
||||||
|
_cellText(text: "Z-FUL"),
|
||||||
|
_cellText(text: "View Invoice", clr: AppColors.primaryClr),
|
||||||
|
]),
|
||||||
|
]),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
_cellText({String? text, Color? clr, FontWeight? fontWeight}) {
|
||||||
|
return Center(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 4),
|
||||||
|
child: Text(
|
||||||
|
text ?? '',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
color: clr ?? AppColors.darkGrey,
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: fontWeight ?? FontWeight.normal),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
_commonText(String title) {
|
||||||
|
return Text(
|
||||||
|
title,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 13, color: Colors.black, fontWeight: FontWeight.w900),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,563 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
|
||||||
|
import '../../../../../../components/styles/app_colors.dart';
|
||||||
|
import '../../../../../../components/styles/app_images.dart';
|
||||||
|
import '../../../../../../components/styles/app_strings.dart';
|
||||||
|
import '../ctrl/report_controller.dart';
|
||||||
|
|
||||||
|
class ReportScreen extends StatefulWidget {
|
||||||
|
const ReportScreen({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<ReportScreen> createState() => _ReportScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ReportScreenState extends State<ReportScreen> {
|
||||||
|
final reportCtrl = Get.put(ReportController());
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.only(bottom: 4),
|
||||||
|
margin: EdgeInsets.all(16),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(bottom: 12),
|
||||||
|
height: 50,
|
||||||
|
color: AppColors.primaryClr,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
ListView.separated(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
shrinkWrap: true,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return Obx(
|
||||||
|
() => InkWell(
|
||||||
|
onTap: () {},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(bottom: 10, top: 10),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border(
|
||||||
|
bottom: BorderSide(
|
||||||
|
color: reportCtrl
|
||||||
|
.selectedState.value ==
|
||||||
|
index
|
||||||
|
? Colors.white
|
||||||
|
: AppColors.primaryClr,
|
||||||
|
width: 3))),
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
reportCtrl.reportTabs[index].title ?? "",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: FontWeight.w900,
|
||||||
|
color: Colors.white),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
separatorBuilder: (context, index) {
|
||||||
|
return SizedBox(width: 16);
|
||||||
|
},
|
||||||
|
itemCount: reportCtrl.reportTabs.length),
|
||||||
|
Spacer(),
|
||||||
|
InkWell(
|
||||||
|
child: Image.asset(AppImages.refresh,
|
||||||
|
height: 10, width: 10)),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Text(
|
||||||
|
AppStrings.refresh,
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.white,
|
||||||
|
fontSize: 10,
|
||||||
|
fontWeight: FontWeight.normal),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
child: Image.asset(AppImages.filter,
|
||||||
|
height: 12, width: 12)),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Text(
|
||||||
|
AppStrings.filter,
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.white,
|
||||||
|
fontSize: 10,
|
||||||
|
fontWeight: FontWeight.normal),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
child: Image.asset(AppImages.exportIcon,
|
||||||
|
height: 12, width: 12)),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Text(
|
||||||
|
AppStrings.export,
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.white,
|
||||||
|
fontSize: 10,
|
||||||
|
fontWeight: FontWeight.normal),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Obx(() {
|
||||||
|
switch (reportCtrl.selectedState.value) {
|
||||||
|
case 0:
|
||||||
|
return _tableView();
|
||||||
|
default:
|
||||||
|
return _tableView();
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
_tableView() {
|
||||||
|
return Scrollbar(
|
||||||
|
thumbVisibility: true,
|
||||||
|
controller: reportCtrl.verticalScrollController,
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
scrollDirection: Axis.vertical,
|
||||||
|
controller: reportCtrl.verticalScrollController,
|
||||||
|
physics: AlwaysScrollableScrollPhysics(),
|
||||||
|
child: Scrollbar(
|
||||||
|
thumbVisibility: true,
|
||||||
|
controller: reportCtrl.horizontalScrollController,
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
controller: reportCtrl.horizontalScrollController,
|
||||||
|
child: SizedBox(
|
||||||
|
// height: MediaQuery.sizeOf(context).height * 0.68,
|
||||||
|
width: MediaQuery.sizeOf(context).width * 2.2,
|
||||||
|
child: Padding(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets.symmetric(horizontal: 16, vertical: 0),
|
||||||
|
child: Table(
|
||||||
|
border: TableBorder.all(color: AppColors.clrGrey),
|
||||||
|
children: [
|
||||||
|
TableRow(
|
||||||
|
decoration:
|
||||||
|
BoxDecoration(color: AppColors.secondaryClr),
|
||||||
|
children: [
|
||||||
|
_cellText(
|
||||||
|
text: "SR. No.",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "Transporter LR No.",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "FTransporter LR No. Date",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "Vehicle No.",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "From Location Desc.",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "Plant",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "Product Name",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "Date(MIGO)",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "Disp Qty",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "Net Qty",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "Billing Qty",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "UOM",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "Freight Rate",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "Freight Amount",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "CGST",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "SGST",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "IGST",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "Total GST",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "Total Invoice Amount",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "Freight Bill No.",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "Freight Bill Date",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "Freight MIRO Status",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "CCN No.",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "CCN Date",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "CCN Qty",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "CCN Amount",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "CCN MIRO Status",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "UTR No.",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "UTR Date",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "Amount",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "UTR No. 1",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "UTR Date",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "Amount 1",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "UTR No. 2",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "UTR Date",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(
|
||||||
|
text: "Amount 2",
|
||||||
|
clr: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
]),
|
||||||
|
TableRow(children: [
|
||||||
|
_cellText(
|
||||||
|
text: "01",
|
||||||
|
),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "78549-Plant 1"),
|
||||||
|
_cellText(text: "78549-Plant 1"),
|
||||||
|
_cellText(text: "Product 1"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "7894651231"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(
|
||||||
|
text: "Parked",
|
||||||
|
clr: AppColors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(text: "56484654", clr: AppColors.primaryClr),
|
||||||
|
_cellText(text: "1 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(
|
||||||
|
text: "Parked",
|
||||||
|
clr: AppColors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
]),
|
||||||
|
TableRow(children: [
|
||||||
|
_cellText(
|
||||||
|
text: "02",
|
||||||
|
),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "78549-Plant 1"),
|
||||||
|
_cellText(text: "78549-Plant 1"),
|
||||||
|
_cellText(text: "Product 1"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "7894651231"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(
|
||||||
|
text: "Parked",
|
||||||
|
clr: AppColors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(text: "56484654", clr: AppColors.primaryClr),
|
||||||
|
_cellText(text: "1 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(
|
||||||
|
text: "Parked",
|
||||||
|
clr: AppColors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
]),
|
||||||
|
TableRow(children: [
|
||||||
|
_cellText(
|
||||||
|
text: "03",
|
||||||
|
),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "78549-Plant 1"),
|
||||||
|
_cellText(text: "78549-Plant 1"),
|
||||||
|
_cellText(text: "Product 1"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "7894651231"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(
|
||||||
|
text: "Parked",
|
||||||
|
clr: AppColors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(text: "56484654", clr: AppColors.primaryClr),
|
||||||
|
_cellText(text: "1 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(
|
||||||
|
text: "Parked",
|
||||||
|
clr: AppColors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
]),
|
||||||
|
TableRow(children: [
|
||||||
|
_cellText(
|
||||||
|
text: "04",
|
||||||
|
),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "78549-Plant 1"),
|
||||||
|
_cellText(text: "78549-Plant 1"),
|
||||||
|
_cellText(text: "Product 1"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "7894651231"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(
|
||||||
|
text: "Pending",
|
||||||
|
clr: AppColors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(text: "-"),
|
||||||
|
_cellText(text: "-"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(
|
||||||
|
text: "Pending",
|
||||||
|
clr: AppColors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
]),
|
||||||
|
TableRow(children: [
|
||||||
|
_cellText(
|
||||||
|
text: "05",
|
||||||
|
),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "78549-Plant 1"),
|
||||||
|
_cellText(text: "78549-Plant 1"),
|
||||||
|
_cellText(text: "Product 1"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "7894651231"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(
|
||||||
|
text: "Pending",
|
||||||
|
clr: AppColors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(text: "-", clr: AppColors.primaryClr),
|
||||||
|
_cellText(text: "-"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(
|
||||||
|
text: "Pending",
|
||||||
|
clr: AppColors.black,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
_cellText(text: "5 Aug 2024"),
|
||||||
|
_cellText(text: "0000"),
|
||||||
|
]),
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
_cellText({String? text, Color? clr, FontWeight? fontWeight}) {
|
||||||
|
return Center(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 4),
|
||||||
|
child: Text(
|
||||||
|
text ?? '',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
color: clr ?? AppColors.darkGrey,
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: fontWeight ?? FontWeight.normal),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
_commonText(String title) {
|
||||||
|
return Text(
|
||||||
|
title,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 13, color: Colors.black, fontWeight: FontWeight.w900),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:shayog/components/common/common_btn.dart';
|
import 'package:shayog/components/common/common_btn.dart';
|
||||||
import 'package:shayog/components/common/common_button.dart';
|
|
||||||
import 'package:shayog/feature/presentation/screens/transporter/model/view_freight_bill_res_model.dart';
|
import 'package:shayog/feature/presentation/screens/transporter/model/view_freight_bill_res_model.dart';
|
||||||
import 'package:shayog/feature/presentation/screens/transporter/widgets/freightbill_dialog.dart';
|
|
||||||
|
|
||||||
import '../../../../../../../components/common/data_cell.dart';
|
import '../../../../../../../components/common/data_cell.dart';
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ class ViewFreightBill extends StatelessWidget {
|
||||||
children: [
|
children: [
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: Icon(Icons.chevron_left),
|
icon: Icon(Icons.chevron_left),
|
||||||
onPressed: ctrl.currentPage > 0
|
onPressed: ctrl.currentPage.value > 0
|
||||||
? () => ctrl.previousPage()
|
? () => ctrl.previousPage()
|
||||||
: null,
|
: null,
|
||||||
),
|
),
|
||||||
|
@ -202,14 +202,15 @@ class ViewFreightBill extends StatelessWidget {
|
||||||
SizedBox(width: 16),
|
SizedBox(width: 16),
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: Icon(Icons.chevron_right),
|
icon: Icon(Icons.chevron_right),
|
||||||
onPressed: ctrl.currentPage < ctrl.totalPages.value - 1
|
onPressed: ctrl.currentPage.value < ctrl.totalPages.value - 1
|
||||||
? () => ctrl.nextPage()
|
? () => ctrl.nextPage()
|
||||||
: null,
|
: null,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
)
|
||||||
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:shayog/components/common/custom_drop_down.dart';
|
import 'package:shayog/components/common/custom_drop_down.dart';
|
||||||
|
import 'package:shayog/components/styles/textStyles.dart';
|
||||||
|
import 'package:shayog/feature/presentation/screens/transporter/view/sub_views/invoice_management_screen.dart';
|
||||||
|
import 'package:shayog/feature/presentation/screens/transporter/view/sub_views/report_screen.dart';
|
||||||
|
import 'package:shayog/feature/presentation/widgets/text_view.dart';
|
||||||
|
|
||||||
import '../../../../../../components/common/common_btn.dart';
|
import '../../../../../../components/common/common_btn.dart';
|
||||||
|
|
||||||
|
@ -63,13 +67,11 @@ class _TransportViewState extends State<TransportView> {
|
||||||
: ctrl.tabs[index].image),
|
: ctrl.tabs[index].image),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
TextView(
|
||||||
ctrl.tabs[index].title ?? "",
|
text: ctrl.tabs[index].title ?? "",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: 10.txtBoldWhite,
|
||||||
fontSize: 10,
|
|
||||||
color: Colors.white,
|
|
||||||
fontWeight: FontWeight.w900),
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -89,10 +91,10 @@ class _TransportViewState extends State<TransportView> {
|
||||||
return _dashboardView();
|
return _dashboardView();
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
return Center(child: Text(''));
|
return InvoiceManagement();
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return Center(child: Text(''));
|
return ReportScreen();
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
@ -136,12 +138,11 @@ class _TransportViewState extends State<TransportView> {
|
||||||
: AppColors.primaryClr,
|
: AppColors.primaryClr,
|
||||||
width: 3))),
|
width: 3))),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: TextView(
|
||||||
|
text:
|
||||||
ctrl.userTabs[index].title ?? "",
|
ctrl.userTabs[index].title ?? "",
|
||||||
style: TextStyle(
|
style: 12.txtBoldWhite,
|
||||||
fontSize: 12,
|
|
||||||
fontWeight: FontWeight.w900,
|
|
||||||
color: Colors.white),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -162,10 +163,8 @@ class _TransportViewState extends State<TransportView> {
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
AppStrings.refresh,
|
AppStrings.refresh,
|
||||||
style: TextStyle(
|
style: 12.txtBoldWhite,
|
||||||
color: AppColors.white,
|
|
||||||
fontSize: 12,
|
|
||||||
fontWeight: FontWeight.bold),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Obx(() =>
|
Obx(() =>
|
||||||
|
@ -181,12 +180,11 @@ class _TransportViewState extends State<TransportView> {
|
||||||
visible: ctrl.selectedUser.value >= 1,
|
visible: ctrl.selectedUser.value >= 1,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Text(
|
child: TextView(
|
||||||
AppStrings.filter,
|
text:AppStrings.filter,
|
||||||
style: TextStyle(
|
style: 12.txtBoldWhite,
|
||||||
color: AppColors.white,
|
|
||||||
fontSize: 12,
|
|
||||||
fontWeight: FontWeight.bold),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -210,7 +208,8 @@ class _TransportViewState extends State<TransportView> {
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
_commonText(
|
TextView(
|
||||||
|
text:
|
||||||
"Plant",
|
"Plant",
|
||||||
),
|
),
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
|
@ -233,8 +232,8 @@ class _TransportViewState extends State<TransportView> {
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
_commonText(
|
TextView(
|
||||||
"Freight Bill No.",
|
text: "Freight Bill No.",
|
||||||
),
|
),
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
CustomDropdown(
|
CustomDropdown(
|
||||||
|
@ -256,7 +255,8 @@ class _TransportViewState extends State<TransportView> {
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
_commonText(
|
TextView(
|
||||||
|
text:
|
||||||
"Product Name",
|
"Product Name",
|
||||||
),
|
),
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
|
@ -286,7 +286,8 @@ class _TransportViewState extends State<TransportView> {
|
||||||
crossAxisAlignment:
|
crossAxisAlignment:
|
||||||
CrossAxisAlignment.start,
|
CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
_commonText(
|
TextView(
|
||||||
|
text:
|
||||||
"Plant",
|
"Plant",
|
||||||
),
|
),
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
|
@ -312,8 +313,9 @@ class _TransportViewState extends State<TransportView> {
|
||||||
crossAxisAlignment:
|
crossAxisAlignment:
|
||||||
CrossAxisAlignment.start,
|
CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
_commonText(
|
TextView(
|
||||||
"Trancastion Type",
|
text:
|
||||||
|
"Transaction Type",
|
||||||
),
|
),
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
CustomDropdown(
|
CustomDropdown(
|
||||||
|
@ -335,7 +337,8 @@ class _TransportViewState extends State<TransportView> {
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
_commonText(
|
TextView(
|
||||||
|
text:
|
||||||
"" ,
|
"" ,
|
||||||
),
|
),
|
||||||
SizedBox(height: 8),
|
SizedBox(height: 8),
|
||||||
|
@ -351,7 +354,7 @@ class _TransportViewState extends State<TransportView> {
|
||||||
SizedBox(width: 16),
|
SizedBox(width: 16),
|
||||||
CommonBtn(
|
CommonBtn(
|
||||||
text: AppStrings.submit,
|
text: AppStrings.submit,
|
||||||
textClr: Colors.white, clickAction: () {
|
style: 14.txtBoldWhite, clickAction: () {
|
||||||
ctrl.isSelected.value = false;
|
ctrl.isSelected.value = false;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -386,12 +389,6 @@ class _TransportViewState extends State<TransportView> {
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
_commonText(String title) {
|
|
||||||
return Text(
|
|
||||||
title,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 13, color: Colors.black, fontWeight: FontWeight.w900),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -197,7 +197,7 @@ class TransportController extends GetxController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////// PRIYA ////////////////////
|
////////////////////////////////////////// PRIYA ///////////////////////////////////////////////
|
||||||
var freightBillData = <FreightBill>[].obs;
|
var freightBillData = <FreightBill>[].obs;
|
||||||
var currentPage = 0.obs;
|
var currentPage = 0.obs;
|
||||||
var totalPages = 0.obs;
|
var totalPages = 0.obs;
|
||||||
|
@ -205,7 +205,6 @@ class TransportController extends GetxController {
|
||||||
var pageSize = 2.obs;
|
var pageSize = 2.obs;
|
||||||
var sortField = "grn_date".obs;
|
var sortField = "grn_date".obs;
|
||||||
var sortDirection = "desc".obs;
|
var sortDirection = "desc".obs;
|
||||||
|
|
||||||
viewFreightView({int? page, String? sort, String? direction}) async {
|
viewFreightView({int? page, String? sort, String? direction}) async {
|
||||||
try {
|
try {
|
||||||
freightViewLoader.value = true;
|
freightViewLoader.value = true;
|
||||||
|
@ -227,7 +226,8 @@ class TransportController extends GetxController {
|
||||||
"sort": "${sortField.value},${sortDirection.value}"
|
"sort": "${sortField.value},${sortDirection.value}"
|
||||||
};
|
};
|
||||||
|
|
||||||
var response = await PostRequests.viewFreightBill(requestBody);
|
var response = await PostRequests.viewFreightBill(requestBody,
|
||||||
|
currentPage.value, pageSize.value, '$sortField', '$sortDirection');
|
||||||
if (response != null) {
|
if (response != null) {
|
||||||
List<FreightBill> flattenedContent =
|
List<FreightBill> flattenedContent =
|
||||||
response.content!.expand((list) => list).toList();
|
response.content!.expand((list) => list).toList();
|
||||||
|
@ -240,19 +240,16 @@ class TransportController extends GetxController {
|
||||||
freightViewLoader.value = false;
|
freightViewLoader.value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void nextPage() {
|
void nextPage() {
|
||||||
if (currentPage < totalPages.value - 1) {
|
if (currentPage < totalPages.value - 1) {
|
||||||
viewFreightView(page: currentPage.value + 1);
|
viewFreightView(page: currentPage.value + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void previousPage() {
|
void previousPage() {
|
||||||
if (currentPage > 0) {
|
if (currentPage > 0) {
|
||||||
viewFreightView(page: currentPage.value - 1);
|
viewFreightView(page: currentPage.value - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void changeSort(String field) {
|
void changeSort(String field) {
|
||||||
if (field == sortField.value) {
|
if (field == sortField.value) {
|
||||||
sortDirection.value = sortDirection.value == "asc" ? "desc" : "asc";
|
sortDirection.value = sortDirection.value == "asc" ? "desc" : "asc";
|
||||||
|
|
|
@ -95,19 +95,17 @@ class CommonDialogContent extends StatelessWidget {
|
||||||
child: Text(
|
child: Text(
|
||||||
message.tr,
|
message.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
|
||||||
fontWeight: FontWeight.bold, fontSize: 12, color: Colors.black),
|
style: 14.txtBoldBlack,
|
||||||
// style: 14.txtBoldBlack,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: CommonButton(
|
child: CommonButton(
|
||||||
textStyle: TextStyle(
|
textStyle: 10.txtBoldBlue,
|
||||||
fontSize: 10,
|
|
||||||
color: AppColors.primaryClr,
|
|
||||||
fontWeight: FontWeight.bold),
|
|
||||||
borderColor: AppColors.primaryClr,
|
borderColor: AppColors.primaryClr,
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
|
@ -122,10 +120,7 @@ class CommonDialogContent extends StatelessWidget {
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: CommonButton(
|
child: CommonButton(
|
||||||
textStyle: TextStyle(
|
textStyle: 10.txtBoldBlue,
|
||||||
fontSize: 10,
|
|
||||||
color: AppColors.primaryClr,
|
|
||||||
fontWeight: FontWeight.bold),
|
|
||||||
borderColor: AppColors.primaryClr,
|
borderColor: AppColors.primaryClr,
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:shayog/components/styles/textStyles.dart';
|
||||||
import '../../../../../../components/common/common_btn.dart';
|
import '../../../../../../components/common/common_btn.dart';
|
||||||
import '../../../../../../components/common/data_cell.dart';
|
import '../../../../../../components/common/data_cell.dart';
|
||||||
import '../../../../../../components/styles/app_colors.dart';
|
import '../../../../../../components/styles/app_colors.dart';
|
||||||
|
@ -265,7 +266,7 @@ void showFreightBill(BuildContext context) {
|
||||||
Align(
|
Align(
|
||||||
alignment: Alignment.bottomRight,
|
alignment: Alignment.bottomRight,
|
||||||
child: CommonBtn(
|
child: CommonBtn(
|
||||||
textClr: AppColors.primaryClr,
|
style: 14.txtBoldBlue,
|
||||||
borderClr: AppColors.primaryClr,
|
borderClr: AppColors.primaryClr,
|
||||||
bkClr: Colors.white,
|
bkClr: Colors.white,
|
||||||
margin: EdgeInsets.only(top: 24),
|
margin: EdgeInsets.only(top: 24),
|
||||||
|
|
|
@ -37,7 +37,7 @@ Widget build(BuildContext context) {
|
||||||
onTap: onTap, child: Text(
|
onTap: onTap, child: Text(
|
||||||
capitalise != null && capitalise! ? text.toUpperCase() : text, maxLines: maxlines,
|
capitalise != null && capitalise! ? text.toUpperCase() : text, maxLines: maxlines,
|
||||||
overflow: maxlines != null ? TextOverflow.ellipsis : null, textAlign: textAlign,
|
overflow: maxlines != null ? TextOverflow.ellipsis : null, textAlign: textAlign,
|
||||||
style: style ?? 14.txtRegularBlack,
|
style: style ?? 12.txtBoldBlack,
|
||||||
), ),
|
), ),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:shayog/navigation/navigation.dart';
|
||||||
|
import 'package:shayog/navigation/page_routes.dart';
|
||||||
import 'package:sizer/sizer.dart';
|
import 'package:sizer/sizer.dart';
|
||||||
import 'feature/presentation/screens/dashboard/dashboard_screen.dart';
|
import 'feature/presentation/screens/dashboard/dashboard_screen.dart';
|
||||||
|
|
||||||
|
@ -18,7 +20,9 @@ class MyApp extends StatelessWidget {
|
||||||
return GetMaterialApp(
|
return GetMaterialApp(
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
title: 'Shayog',
|
title: 'Shayog',
|
||||||
home: DashboardScreen(),
|
initialRoute: PageRoutes.login,
|
||||||
|
onGenerateRoute: Navigation.onGenerateRoutes,
|
||||||
|
// home: DashboardScreen(),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:shayog/feature/presentation/screens/dashboard/dashboard_screen.dart';
|
||||||
|
import 'package:shayog/navigation/page_routes.dart';
|
||||||
|
|
||||||
|
import '../feature/presentation/screens/onbaord/view/login_screen.dart';
|
||||||
|
|
||||||
|
|
||||||
|
class Navigation {
|
||||||
|
static Route<dynamic>? onGenerateRoutes(RouteSettings routeSettings) {
|
||||||
|
final arguments = routeSettings.arguments;
|
||||||
|
switch (routeSettings.name) {
|
||||||
|
// case PageRoutes.splash:
|
||||||
|
// return MaterialPageRoute(
|
||||||
|
// settings: routeSettings,
|
||||||
|
// builder: (context) => const SplashScreen());
|
||||||
|
case PageRoutes.login:
|
||||||
|
return MaterialPageRoute(
|
||||||
|
settings: routeSettings, builder: (context) => LoginScreen());
|
||||||
|
case PageRoutes.dashboard:
|
||||||
|
return MaterialPageRoute(
|
||||||
|
settings: routeSettings, builder: (context) => DashboardScreen());
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
class PageRoutes {
|
||||||
|
static const String splash = "/";
|
||||||
|
static const String login = "login";
|
||||||
|
static const String dashboard = "dashboard";
|
||||||
|
}
|
|
@ -13,10 +13,10 @@ class ApiUrls {
|
||||||
static const editUser =
|
static const editUser =
|
||||||
'http://localhost:9090/api/users/update?userEmpTransCode=';
|
'http://localhost:9090/api/users/update?userEmpTransCode=';
|
||||||
static const getAllUser =
|
static const getAllUser =
|
||||||
'http://localhost:9090/api/users/userdetails?page=0&size=8&sort=last_updated_on,desc';
|
'http://localhost:9090/api/users/userdetails?page=';
|
||||||
|
|
||||||
static const viewFreightBill =
|
static const viewFreightBill =
|
||||||
'http://localhost:9098/bill/freightbill?page=0&size=20&sort=grn_date,desc';
|
'http://localhost:9098/bill/freightbill?page';
|
||||||
static const addUserType =
|
static const addUserType =
|
||||||
'http://localhost:9090/api/user-types/createUserType';
|
'http://localhost:9090/api/user-types/createUserType';
|
||||||
static const dropDownList =
|
static const dropDownList =
|
||||||
|
|
|
@ -66,9 +66,9 @@ class PostRequests {
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<GetAllUserResModel?> getAllUser(
|
static Future<GetAllUserResModel?> getAllUser(
|
||||||
Map<String, String> requestBody) async {
|
Map<String, String> requestBody,int page, int limit) async {
|
||||||
var apiResponse =
|
var apiResponse =
|
||||||
await RemoteService.postUser(requestBody, ApiUrls.getAllUser);
|
await RemoteService.postUser(requestBody, "${ApiUrls.getAllUser}$page&size=$limit&sort=last_updated_on,desc");
|
||||||
|
|
||||||
if (apiResponse != null) {
|
if (apiResponse != null) {
|
||||||
return getAllUserResModelFromJson(apiResponse.response!);
|
return getAllUserResModelFromJson(apiResponse.response!);
|
||||||
|
@ -91,9 +91,9 @@ class PostRequests {
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<ViewFreightBillResModel?> viewFreightBill(
|
static Future<ViewFreightBillResModel?> viewFreightBill(
|
||||||
Map<String, String> requestBody) async {
|
Map<String, String> requestBody, int page, int size,String sort,String dir) async {
|
||||||
var apiResponse =
|
var apiResponse =
|
||||||
await RemoteService.postUser(requestBody, ApiUrls.viewFreightBill);
|
await RemoteService.postUser(requestBody, '${ApiUrls.viewFreightBill}=$page&size=$size&sort=$sort,$dir' );
|
||||||
|
|
||||||
if (apiResponse != null) {
|
if (apiResponse != null) {
|
||||||
return viewFreightBillResModelFromJson(apiResponse.response!);
|
return viewFreightBillResModelFromJson(apiResponse.response!);
|
||||||
|
|
14
pubspec.yaml
14
pubspec.yaml
|
@ -81,25 +81,25 @@ flutter:
|
||||||
# list giving the asset and other descriptors for the font. For
|
# list giving the asset and other descriptors for the font. For
|
||||||
# example:
|
# example:
|
||||||
fonts:
|
fonts:
|
||||||
- family: Anek_Latin-Bold
|
- family: AnekLatin-Bold
|
||||||
fonts:
|
fonts:
|
||||||
- asset: assets/fonts/AnekLatin-Bold.ttf
|
- asset: assets/fonts/AnekLatin-Bold.ttf
|
||||||
- family: Anek_Latin-ExtraBold
|
- family: AnekLatin-ExtraBold
|
||||||
fonts:
|
fonts:
|
||||||
- asset: assets/fonts/AnekLatin-ExtraBold.ttf
|
- asset: assets/fonts/AnekLatin-ExtraBold.ttf
|
||||||
- family: Anek_Latin-SemiBold
|
- family: AnekLatin-SemiBold
|
||||||
fonts:
|
fonts:
|
||||||
- asset: assets/fonts/AnekLatin-SemiBold.ttf
|
- asset: assets/fonts/AnekLatin-SemiBold.ttf
|
||||||
- family: Anek_Latin-Medium
|
- family: AnekLatin-Medium
|
||||||
fonts:
|
fonts:
|
||||||
- asset: assets/fonts/AnekLatin-Medium.ttf
|
- asset: assets/fonts/AnekLatin-Medium.ttf
|
||||||
- family: Anek_Latin-Regular
|
- family: AnekLatin-Regular
|
||||||
fonts:
|
fonts:
|
||||||
- asset: assets/fonts/AnekLatin-Regular.ttf
|
- asset: assets/fonts/AnekLatin-Regular.ttf
|
||||||
- family: Anek_Latin-Light
|
- family: AnekLatin-Light
|
||||||
fonts:
|
fonts:
|
||||||
- asset: assets/fonts/AnekLatin-Light.ttf
|
- asset: assets/fonts/AnekLatin-Light.ttf
|
||||||
- family: Anek_Latin-Thin
|
- family: AnekLatin-Thin
|
||||||
fonts:
|
fonts:
|
||||||
- asset: assets/fonts/AnekLatin-Thin.ttf
|
- asset: assets/fonts/AnekLatin-Thin.ttf
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue