Merge branch 'main' of bitbucket.org:venbainformationtechnology/ts-tat
This commit is contained in:
commit
6c3571f4e8
@ -197,18 +197,23 @@ class StatusDashboardState extends State<StatusDashboard> {
|
||||
body: Padding(
|
||||
padding: isDesktop
|
||||
? EdgeInsets.symmetric(
|
||||
horizontal: MediaQuery.of(context).size.width *
|
||||
0.1, // 30% of screen width as horizontal padding
|
||||
horizontal: MediaQuery.of(context).size.width * 0.1, // 30% of screen width as horizontal padding
|
||||
vertical: 10, // 5% of screen height as vertical padding
|
||||
)
|
||||
: EdgeInsets.all(0),
|
||||
child:Container(
|
||||
// padding: const EdgeInsets.all(10.0),
|
||||
child : LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
return SingleChildScrollView(
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(
|
||||
minHeight: constraints.maxHeight,
|
||||
),
|
||||
child: IntrinsicHeight( // Only needed if child layout depends on height
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: isDesktop ? Colors.white : const Color(0xFFFCFCFC),
|
||||
borderRadius: BorderRadius.circular(12), // 👈 Set your desired radius
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
// color: isDesktop ? Colors.white : Color(0xFFFCFCFC),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
@ -253,7 +258,15 @@ class StatusDashboardState extends State<StatusDashboard> {
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
@ -2594,10 +2594,10 @@ class CreateNewPlansState extends State<CreateNewPlan> {
|
||||
children: [
|
||||
Text(
|
||||
"Trip Name", // Your label
|
||||
style: TextStyle(
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF575A74)),
|
||||
color: Color(0xFF575A74))
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFieldWrapper(
|
||||
@ -2774,8 +2774,10 @@ class CreateNewPlansState extends State<CreateNewPlan> {
|
||||
enabled: !widget.isViewMode,
|
||||
decoration: InputDecoration(
|
||||
labelText: "Trip Name *",
|
||||
|
||||
labelStyle: GoogleFonts.poppins(fontSize: 14, color: Colors.black54),
|
||||
labelStyle: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF575A74)),
|
||||
floatingLabelBehavior: FloatingLabelBehavior.never,
|
||||
border: InputBorder.none,
|
||||
contentPadding: EdgeInsets.symmetric(vertical: 16),
|
||||
|
||||
@ -396,7 +396,9 @@ class _OfficeDetailsState extends State<OfficeDetails> {
|
||||
Text(
|
||||
"Employee Code",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black),
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF575A74))
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFieldUserWrapper(
|
||||
@ -440,7 +442,9 @@ class _OfficeDetailsState extends State<OfficeDetails> {
|
||||
Text(
|
||||
"Department",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black),
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF575A74))
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFieldUserWrapper(
|
||||
@ -490,7 +494,9 @@ class _OfficeDetailsState extends State<OfficeDetails> {
|
||||
Text(
|
||||
"Group",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black),
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF575A74))
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
// CustomTextFieldUserWrapper(
|
||||
@ -629,8 +635,9 @@ class _OfficeDetailsState extends State<OfficeDetails> {
|
||||
"First Approver",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Colors.black),
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF575A74))
|
||||
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFieldUserWrapper(
|
||||
@ -741,8 +748,9 @@ class _OfficeDetailsState extends State<OfficeDetails> {
|
||||
"Second Approver",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Colors.black),
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF575A74))
|
||||
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFieldUserWrapper(
|
||||
@ -852,8 +860,9 @@ class _OfficeDetailsState extends State<OfficeDetails> {
|
||||
"Third Approver",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Colors.black),
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF575A74))
|
||||
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFieldUserWrapper(
|
||||
@ -962,8 +971,9 @@ class _OfficeDetailsState extends State<OfficeDetails> {
|
||||
"Delegate To",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Colors.black),
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF575A74))
|
||||
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFieldUserWrapper(
|
||||
@ -1110,7 +1120,8 @@ class _OfficeDetailsState extends State<OfficeDetails> {
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF575A74)),
|
||||
color: Color(0xFF575A74))
|
||||
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFieldUserWrapper(
|
||||
@ -1202,7 +1213,10 @@ class _OfficeDetailsState extends State<OfficeDetails> {
|
||||
Text(
|
||||
"End Date",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black),
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF575A74))
|
||||
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFieldUserWrapper(
|
||||
|
||||
@ -515,11 +515,11 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
buildEmailField(),
|
||||
SizedBox(height: 8), // Vertical space
|
||||
buildMobileField(),
|
||||
SizedBox(height: 8),
|
||||
SizedBox(height: 8), // Vertical space
|
||||
buildAlternateMobileField(),
|
||||
SizedBox(height: 8),
|
||||
buildEmailField(),
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -532,19 +532,21 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
? Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
buildRole(),
|
||||
SizedBox(
|
||||
width: 15,
|
||||
),
|
||||
if (!widget.apiselectedUser) buildPassword()
|
||||
if (!widget.apiselectedUser) ...[
|
||||
buildPassword(),
|
||||
SizedBox(width: 15),
|
||||
],
|
||||
buildRole()
|
||||
],
|
||||
)
|
||||
: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
buildRole(),
|
||||
SizedBox(height: 8), //
|
||||
if (!widget.apiselectedUser) buildPassword()
|
||||
if (!widget.apiselectedUser) ...[
|
||||
buildPassword(),
|
||||
SizedBox(height: 8)], //
|
||||
buildRole()
|
||||
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -588,7 +590,9 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
Text(
|
||||
"First Name",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black),
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF575A74))
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFieldUserWrapper(
|
||||
@ -632,10 +636,10 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text("Last Name",
|
||||
style: TextStyle(
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w200,
|
||||
color: Colors.black)),
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF575A74))),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFieldUserWrapper(
|
||||
isFocused: false,
|
||||
@ -677,7 +681,9 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
Text(
|
||||
"Gender",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black),
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF575A74)),
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFieldUserWrapper(
|
||||
@ -795,7 +801,9 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
Text(
|
||||
"Date of Birth",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black),
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF575A74))
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFieldUserWrapper(
|
||||
@ -849,7 +857,9 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
Text(
|
||||
"Email",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black),
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF575A74))
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFieldUserWrapper(
|
||||
@ -893,7 +903,9 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
Text(
|
||||
"Mobile Number",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black),
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF575A74))
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFieldUserWrapper(
|
||||
@ -942,8 +954,8 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
Text("Alternate Mobile Number",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Colors.black)),
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF575A74))),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFieldUserWrapper(
|
||||
isFocused: false,
|
||||
@ -1005,7 +1017,9 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
Text(
|
||||
"Country",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black),
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF575A74))
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFieldUserWrapper(
|
||||
@ -1090,7 +1104,9 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
Text(
|
||||
"Postal Code",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black),
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF575A74))
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFieldUserWrapper(
|
||||
@ -1131,7 +1147,9 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
Text(
|
||||
"Role ",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black),
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF575A74))
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFieldUserWrapper(
|
||||
@ -1183,7 +1201,9 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
Text(
|
||||
"Address",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black),
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF575A74))
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFieldUserWrapper(
|
||||
@ -1220,7 +1240,9 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
||||
Text(
|
||||
"Password",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black),
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF575A74))
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFieldUserWrapper(
|
||||
|
||||
@ -171,6 +171,11 @@ class _CustomDrawerState extends State<CustomDrawer> {
|
||||
),
|
||||
// _buildDrawerItem(context, Icons.home_outlined, 'Home', '/home'),
|
||||
|
||||
if (userData?["role"] == "Org Admin" ||
|
||||
userData?["role"] == "Travel Admin")
|
||||
_buildDrawerItem(context, Icons.dashboard, 'Dashboard',
|
||||
'/StatusDashboard'),
|
||||
|
||||
if (userData?["role"] == "Org Admin" ||
|
||||
userData?["role"] == "Travel Admin")
|
||||
_buildDrawerItem(context, Icons.insights_outlined, 'All Trips',
|
||||
|
||||
@ -102,77 +102,77 @@ class OrganizationSettingState extends State<OrganizationSetting> {
|
||||
},
|
||||
];
|
||||
|
||||
List<Widget> rows = [];
|
||||
for (int i = 0; i < menuItems.length; i += cardsPerRow) {
|
||||
List<Widget> cards = [];
|
||||
for (int j = i; j < i + cardsPerRow && j < menuItems.length; j++) {
|
||||
final item = menuItems[j];
|
||||
|
||||
cards.add(
|
||||
Expanded(
|
||||
child: Card(
|
||||
margin: EdgeInsets.all(8),
|
||||
color: Colors.white,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
// Navigate using go_router
|
||||
final route = item['value'] as String;
|
||||
switch (route) {
|
||||
case '/OrganizationSetup':
|
||||
case '/group':
|
||||
case '/department':
|
||||
case '/PolicyList':
|
||||
case '/getPerdiem':
|
||||
case '/templateList':
|
||||
case '/costcenter':
|
||||
case '/hotels':
|
||||
case '/groupDetails' :
|
||||
context.go(route);
|
||||
break;
|
||||
default:
|
||||
// Handle unknown routes or do nothing
|
||||
print('Unknown route: $route');
|
||||
}
|
||||
},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(12),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(item['icon'], size: 40, color: Color(0xFF114D8B)),
|
||||
SizedBox(width: 16),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
item['label'],
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 14, fontWeight: FontWeight.w500),
|
||||
),
|
||||
SizedBox(height: 4),
|
||||
Text(
|
||||
item['description'],
|
||||
style: TextStyle(
|
||||
fontSize: 14, color: Colors.grey[700]),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
rows.add(Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: cards,
|
||||
));
|
||||
}
|
||||
// List<Widget> rows = [];
|
||||
// for (int i = 0; i < menuItems.length; i += cardsPerRow) {
|
||||
// List<Widget> cards = [];
|
||||
// for (int j = i; j < i + cardsPerRow && j < menuItems.length; j++) {
|
||||
// final item = menuItems[j];
|
||||
//
|
||||
// cards.add(
|
||||
// Expanded(
|
||||
// child: Card(
|
||||
// margin: EdgeInsets.all(8),
|
||||
// color: Colors.white,
|
||||
// child: InkWell(
|
||||
// onTap: () {
|
||||
// // Navigate using go_router
|
||||
// final route = item['value'] as String;
|
||||
// switch (route) {
|
||||
// case '/OrganizationSetup':
|
||||
// case '/group':
|
||||
// case '/department':
|
||||
// case '/PolicyList':
|
||||
// case '/getPerdiem':
|
||||
// case '/templateList':
|
||||
// case '/costcenter':
|
||||
// case '/hotels':
|
||||
// case '/groupDetails' :
|
||||
// context.go(route);
|
||||
// break;
|
||||
// default:
|
||||
// // Handle unknown routes or do nothing
|
||||
// print('Unknown route: $route');
|
||||
// }
|
||||
// },
|
||||
// child: Padding(
|
||||
// padding: EdgeInsets.all(12),
|
||||
// child: Row(
|
||||
// children: [
|
||||
// Icon(item['icon'], size: 40, color: Color(0xFF114D8B)),
|
||||
// SizedBox(width: 16),
|
||||
// Expanded(
|
||||
// child: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// children: [
|
||||
// Text(
|
||||
// item['label'],
|
||||
// style: GoogleFonts.poppins(
|
||||
// fontSize: 14, fontWeight: FontWeight.w500),
|
||||
// ),
|
||||
// SizedBox(height: 4),
|
||||
// Text(
|
||||
// item['description'],
|
||||
// style: TextStyle(
|
||||
// fontSize: 14, color: Colors.grey[700]),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
//
|
||||
// rows.add(Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: cards,
|
||||
// ));
|
||||
// }
|
||||
|
||||
// return Container(
|
||||
// // color: Colors.white,
|
||||
@ -196,7 +196,6 @@ class OrganizationSettingState extends State<OrganizationSetting> {
|
||||
// ),
|
||||
// );
|
||||
|
||||
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 16, horizontal: 12),
|
||||
child: Column(
|
||||
@ -213,9 +212,12 @@ class OrganizationSettingState extends State<OrganizationSetting> {
|
||||
SizedBox(height: 8),
|
||||
Divider(thickness: 0.2, color: Colors.blueGrey.shade100),
|
||||
SizedBox(height: 12),
|
||||
Wrap(
|
||||
spacing: 16, // horizontal space between cards
|
||||
runSpacing: 16, // vertical space between rows
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: Center(
|
||||
child: Wrap(
|
||||
spacing: 16,
|
||||
runSpacing: 16,
|
||||
children: menuItems.map((item) {
|
||||
return SizedBox(
|
||||
width: isDesktop ? 325 : double.infinity,
|
||||
@ -266,6 +268,9 @@ class OrganizationSettingState extends State<OrganizationSetting> {
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user