Merge branch 'main' of bitbucket.org:venbainformationtechnology/ts-tat

This commit is contained in:
venbaittech 2025-05-29 20:01:32 +05:30
commit 6c3571f4e8
6 changed files with 307 additions and 246 deletions

View File

@ -197,18 +197,23 @@ class StatusDashboardState extends State<StatusDashboard> {
body: Padding( body: Padding(
padding: isDesktop padding: isDesktop
? EdgeInsets.symmetric( ? EdgeInsets.symmetric(
horizontal: MediaQuery.of(context).size.width * horizontal: MediaQuery.of(context).size.width * 0.1, // 30% of screen width as horizontal padding
0.1, // 30% of screen width as horizontal padding
vertical: 10, // 5% of screen height as vertical padding vertical: 10, // 5% of screen height as vertical padding
) )
: EdgeInsets.all(0), : EdgeInsets.all(0),
child:Container( child : LayoutBuilder(
// padding: const EdgeInsets.all(10.0), 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( decoration: BoxDecoration(
color: isDesktop ? Colors.white : const Color(0xFFFCFCFC), 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( child: Row(
children: [ children: [
Expanded( Expanded(
@ -253,7 +258,15 @@ class StatusDashboardState extends State<StatusDashboard> {
), ),
], ],
), ),
),
),
),
);
},
) )
), ),
); );
}); });

View File

@ -2594,10 +2594,10 @@ class CreateNewPlansState extends State<CreateNewPlan> {
children: [ children: [
Text( Text(
"Trip Name", // Your label "Trip Name", // Your label
style: TextStyle( style: GoogleFonts.poppins(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Color(0xFF575A74)), color: Color(0xFF575A74))
), ),
SizedBox(height: 5), SizedBox(height: 5),
CustomTextFieldWrapper( CustomTextFieldWrapper(
@ -2774,8 +2774,10 @@ class CreateNewPlansState extends State<CreateNewPlan> {
enabled: !widget.isViewMode, enabled: !widget.isViewMode,
decoration: InputDecoration( decoration: InputDecoration(
labelText: "Trip Name *", labelText: "Trip Name *",
labelStyle: GoogleFonts.poppins(
labelStyle: GoogleFonts.poppins(fontSize: 14, color: Colors.black54), fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xFF575A74)),
floatingLabelBehavior: FloatingLabelBehavior.never, floatingLabelBehavior: FloatingLabelBehavior.never,
border: InputBorder.none, border: InputBorder.none,
contentPadding: EdgeInsets.symmetric(vertical: 16), contentPadding: EdgeInsets.symmetric(vertical: 16),

View File

@ -396,7 +396,9 @@ class _OfficeDetailsState extends State<OfficeDetails> {
Text( Text(
"Employee Code", "Employee Code",
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black), fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xFF575A74))
), ),
SizedBox(height: 5), SizedBox(height: 5),
CustomTextFieldUserWrapper( CustomTextFieldUserWrapper(
@ -440,7 +442,9 @@ class _OfficeDetailsState extends State<OfficeDetails> {
Text( Text(
"Department", "Department",
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black), fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xFF575A74))
), ),
SizedBox(height: 5), SizedBox(height: 5),
CustomTextFieldUserWrapper( CustomTextFieldUserWrapper(
@ -490,7 +494,9 @@ class _OfficeDetailsState extends State<OfficeDetails> {
Text( Text(
"Group", "Group",
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black), fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xFF575A74))
), ),
SizedBox(height: 5), SizedBox(height: 5),
// CustomTextFieldUserWrapper( // CustomTextFieldUserWrapper(
@ -629,8 +635,9 @@ class _OfficeDetailsState extends State<OfficeDetails> {
"First Approver", "First Approver",
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w600,
color: Colors.black), color: Color(0xFF575A74))
), ),
SizedBox(height: 5), SizedBox(height: 5),
CustomTextFieldUserWrapper( CustomTextFieldUserWrapper(
@ -741,8 +748,9 @@ class _OfficeDetailsState extends State<OfficeDetails> {
"Second Approver", "Second Approver",
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w600,
color: Colors.black), color: Color(0xFF575A74))
), ),
SizedBox(height: 5), SizedBox(height: 5),
CustomTextFieldUserWrapper( CustomTextFieldUserWrapper(
@ -852,8 +860,9 @@ class _OfficeDetailsState extends State<OfficeDetails> {
"Third Approver", "Third Approver",
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w600,
color: Colors.black), color: Color(0xFF575A74))
), ),
SizedBox(height: 5), SizedBox(height: 5),
CustomTextFieldUserWrapper( CustomTextFieldUserWrapper(
@ -962,8 +971,9 @@ class _OfficeDetailsState extends State<OfficeDetails> {
"Delegate To", "Delegate To",
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w600,
color: Colors.black), color: Color(0xFF575A74))
), ),
SizedBox(height: 5), SizedBox(height: 5),
CustomTextFieldUserWrapper( CustomTextFieldUserWrapper(
@ -1110,7 +1120,8 @@ class _OfficeDetailsState extends State<OfficeDetails> {
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Color(0xFF575A74)), color: Color(0xFF575A74))
), ),
SizedBox(height: 5), SizedBox(height: 5),
CustomTextFieldUserWrapper( CustomTextFieldUserWrapper(
@ -1202,7 +1213,10 @@ class _OfficeDetailsState extends State<OfficeDetails> {
Text( Text(
"End Date", "End Date",
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black), fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xFF575A74))
), ),
SizedBox(height: 5), SizedBox(height: 5),
CustomTextFieldUserWrapper( CustomTextFieldUserWrapper(

View File

@ -515,11 +515,11 @@ class PersonalDetailsState extends State<PersonalDetails> {
: Column( : Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
buildEmailField(),
SizedBox(height: 8), // Vertical space
buildMobileField(), buildMobileField(),
SizedBox(height: 8), SizedBox(height: 8), // Vertical space
buildAlternateMobileField(), buildAlternateMobileField(),
SizedBox(height: 8),
buildEmailField(),
], ],
), ),
); );
@ -532,19 +532,21 @@ class PersonalDetailsState extends State<PersonalDetails> {
? Row( ? Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
buildRole(), if (!widget.apiselectedUser) ...[
SizedBox( buildPassword(),
width: 15, SizedBox(width: 15),
), ],
if (!widget.apiselectedUser) buildPassword() buildRole()
], ],
) )
: Column( : Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
buildRole(), if (!widget.apiselectedUser) ...[
SizedBox(height: 8), // buildPassword(),
if (!widget.apiselectedUser) buildPassword() SizedBox(height: 8)], //
buildRole()
], ],
), ),
); );
@ -588,7 +590,9 @@ class PersonalDetailsState extends State<PersonalDetails> {
Text( Text(
"First Name", "First Name",
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black), fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xFF575A74))
), ),
SizedBox(height: 5), SizedBox(height: 5),
CustomTextFieldUserWrapper( CustomTextFieldUserWrapper(
@ -632,10 +636,10 @@ class PersonalDetailsState extends State<PersonalDetails> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text("Last Name", Text("Last Name",
style: TextStyle( style: GoogleFonts.poppins(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.w200, fontWeight: FontWeight.w600,
color: Colors.black)), color: Color(0xFF575A74))),
SizedBox(height: 5), SizedBox(height: 5),
CustomTextFieldUserWrapper( CustomTextFieldUserWrapper(
isFocused: false, isFocused: false,
@ -677,7 +681,9 @@ class PersonalDetailsState extends State<PersonalDetails> {
Text( Text(
"Gender", "Gender",
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black), fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xFF575A74)),
), ),
SizedBox(height: 5), SizedBox(height: 5),
CustomTextFieldUserWrapper( CustomTextFieldUserWrapper(
@ -795,7 +801,9 @@ class PersonalDetailsState extends State<PersonalDetails> {
Text( Text(
"Date of Birth", "Date of Birth",
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black), fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xFF575A74))
), ),
SizedBox(height: 5), SizedBox(height: 5),
CustomTextFieldUserWrapper( CustomTextFieldUserWrapper(
@ -849,7 +857,9 @@ class PersonalDetailsState extends State<PersonalDetails> {
Text( Text(
"Email", "Email",
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black), fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xFF575A74))
), ),
SizedBox(height: 5), SizedBox(height: 5),
CustomTextFieldUserWrapper( CustomTextFieldUserWrapper(
@ -893,7 +903,9 @@ class PersonalDetailsState extends State<PersonalDetails> {
Text( Text(
"Mobile Number", "Mobile Number",
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black), fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xFF575A74))
), ),
SizedBox(height: 5), SizedBox(height: 5),
CustomTextFieldUserWrapper( CustomTextFieldUserWrapper(
@ -942,8 +954,8 @@ class PersonalDetailsState extends State<PersonalDetails> {
Text("Alternate Mobile Number", Text("Alternate Mobile Number",
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w600,
color: Colors.black)), color: Color(0xFF575A74))),
SizedBox(height: 5), SizedBox(height: 5),
CustomTextFieldUserWrapper( CustomTextFieldUserWrapper(
isFocused: false, isFocused: false,
@ -1005,7 +1017,9 @@ class PersonalDetailsState extends State<PersonalDetails> {
Text( Text(
"Country", "Country",
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black), fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xFF575A74))
), ),
SizedBox(height: 5), SizedBox(height: 5),
CustomTextFieldUserWrapper( CustomTextFieldUserWrapper(
@ -1090,7 +1104,9 @@ class PersonalDetailsState extends State<PersonalDetails> {
Text( Text(
"Postal Code", "Postal Code",
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black), fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xFF575A74))
), ),
SizedBox(height: 5), SizedBox(height: 5),
CustomTextFieldUserWrapper( CustomTextFieldUserWrapper(
@ -1131,7 +1147,9 @@ class PersonalDetailsState extends State<PersonalDetails> {
Text( Text(
"Role ", "Role ",
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black), fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xFF575A74))
), ),
SizedBox(height: 5), SizedBox(height: 5),
CustomTextFieldUserWrapper( CustomTextFieldUserWrapper(
@ -1183,7 +1201,9 @@ class PersonalDetailsState extends State<PersonalDetails> {
Text( Text(
"Address", "Address",
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black), fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xFF575A74))
), ),
SizedBox(height: 5), SizedBox(height: 5),
CustomTextFieldUserWrapper( CustomTextFieldUserWrapper(
@ -1220,7 +1240,9 @@ class PersonalDetailsState extends State<PersonalDetails> {
Text( Text(
"Password", "Password",
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black), fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xFF575A74))
), ),
SizedBox(height: 5), SizedBox(height: 5),
CustomTextFieldUserWrapper( CustomTextFieldUserWrapper(

View File

@ -171,6 +171,11 @@ class _CustomDrawerState extends State<CustomDrawer> {
), ),
// _buildDrawerItem(context, Icons.home_outlined, 'Home', '/home'), // _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" || if (userData?["role"] == "Org Admin" ||
userData?["role"] == "Travel Admin") userData?["role"] == "Travel Admin")
_buildDrawerItem(context, Icons.insights_outlined, 'All Trips', _buildDrawerItem(context, Icons.insights_outlined, 'All Trips',

View File

@ -102,77 +102,77 @@ class OrganizationSettingState extends State<OrganizationSetting> {
}, },
]; ];
List<Widget> rows = []; // List<Widget> rows = [];
for (int i = 0; i < menuItems.length; i += cardsPerRow) { // for (int i = 0; i < menuItems.length; i += cardsPerRow) {
List<Widget> cards = []; // List<Widget> cards = [];
for (int j = i; j < i + cardsPerRow && j < menuItems.length; j++) { // for (int j = i; j < i + cardsPerRow && j < menuItems.length; j++) {
final item = menuItems[j]; // final item = menuItems[j];
//
cards.add( // cards.add(
Expanded( // Expanded(
child: Card( // child: Card(
margin: EdgeInsets.all(8), // margin: EdgeInsets.all(8),
color: Colors.white, // color: Colors.white,
child: InkWell( // child: InkWell(
onTap: () { // onTap: () {
// Navigate using go_router // // Navigate using go_router
final route = item['value'] as String; // final route = item['value'] as String;
switch (route) { // switch (route) {
case '/OrganizationSetup': // case '/OrganizationSetup':
case '/group': // case '/group':
case '/department': // case '/department':
case '/PolicyList': // case '/PolicyList':
case '/getPerdiem': // case '/getPerdiem':
case '/templateList': // case '/templateList':
case '/costcenter': // case '/costcenter':
case '/hotels': // case '/hotels':
case '/groupDetails' : // case '/groupDetails' :
context.go(route); // context.go(route);
break; // break;
default: // default:
// Handle unknown routes or do nothing // // Handle unknown routes or do nothing
print('Unknown route: $route'); // print('Unknown route: $route');
} // }
}, // },
child: Padding( // child: Padding(
padding: EdgeInsets.all(12), // padding: EdgeInsets.all(12),
child: Row( // child: Row(
children: [ // children: [
Icon(item['icon'], size: 40, color: Color(0xFF114D8B)), // Icon(item['icon'], size: 40, color: Color(0xFF114D8B)),
SizedBox(width: 16), // SizedBox(width: 16),
Expanded( // Expanded(
child: Column( // child: Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, // mainAxisSize: MainAxisSize.min,
children: [ // children: [
Text( // Text(
item['label'], // item['label'],
style: GoogleFonts.poppins( // style: GoogleFonts.poppins(
fontSize: 14, fontWeight: FontWeight.w500), // fontSize: 14, fontWeight: FontWeight.w500),
), // ),
SizedBox(height: 4), // SizedBox(height: 4),
Text( // Text(
item['description'], // item['description'],
style: TextStyle( // style: TextStyle(
fontSize: 14, color: Colors.grey[700]), // fontSize: 14, color: Colors.grey[700]),
), // ),
], // ],
), // ),
), // ),
], // ],
), // ),
), // ),
), // ),
), // ),
), // ),
); // );
} // }
//
rows.add(Row( // rows.add(Row(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: cards, // children: cards,
)); // ));
} // }
// return Container( // return Container(
// // color: Colors.white, // // color: Colors.white,
@ -196,7 +196,6 @@ class OrganizationSettingState extends State<OrganizationSetting> {
// ), // ),
// ); // );
return Container( return Container(
padding: EdgeInsets.symmetric(vertical: 16, horizontal: 12), padding: EdgeInsets.symmetric(vertical: 16, horizontal: 12),
child: Column( child: Column(
@ -213,9 +212,12 @@ class OrganizationSettingState extends State<OrganizationSetting> {
SizedBox(height: 8), SizedBox(height: 8),
Divider(thickness: 0.2, color: Colors.blueGrey.shade100), Divider(thickness: 0.2, color: Colors.blueGrey.shade100),
SizedBox(height: 12), SizedBox(height: 12),
Wrap( Expanded(
spacing: 16, // horizontal space between cards child: SingleChildScrollView(
runSpacing: 16, // vertical space between rows child: Center(
child: Wrap(
spacing: 16,
runSpacing: 16,
children: menuItems.map((item) { children: menuItems.map((item) {
return SizedBox( return SizedBox(
width: isDesktop ? 325 : double.infinity, width: isDesktop ? 325 : double.infinity,
@ -266,6 +268,9 @@ class OrganizationSettingState extends State<OrganizationSetting> {
); );
}).toList(), }).toList(),
), ),
),
),
),
], ],
), ),
); );