Merge branch 'main' of bitbucket.org:venbainformationtechnology/ts-tat
This commit is contained in:
commit
6c3571f4e8
@ -195,65 +195,78 @@ class StatusDashboardState extends State<StatusDashboard> {
|
|||||||
appBar: CustomAppBar(isDesktop: isDesktop),
|
appBar: CustomAppBar(isDesktop: isDesktop),
|
||||||
drawer: CustomDrawer(isDesktop: false),
|
drawer: CustomDrawer(isDesktop: false),
|
||||||
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 : LayoutBuilder(
|
||||||
child:Container(
|
builder: (context, constraints) {
|
||||||
// padding: const EdgeInsets.all(10.0),
|
return SingleChildScrollView(
|
||||||
decoration: BoxDecoration(
|
child: ConstrainedBox(
|
||||||
color: isDesktop ? Colors.white : const Color(0xFFFCFCFC),
|
constraints: BoxConstraints(
|
||||||
borderRadius: BorderRadius.circular(12), // 👈 Set your desired radius
|
minHeight: constraints.maxHeight,
|
||||||
),
|
),
|
||||||
// color: isDesktop ? Colors.white : Color(0xFFFCFCFC),
|
child: IntrinsicHeight( // Only needed if child layout depends on height
|
||||||
child: Row(
|
child: Container(
|
||||||
children: [
|
decoration: BoxDecoration(
|
||||||
Expanded(
|
color: isDesktop ? Colors.white : const Color(0xFFFCFCFC),
|
||||||
child: Padding(
|
borderRadius: BorderRadius.circular(12),
|
||||||
padding: const EdgeInsets.all(30.0),
|
),
|
||||||
child: Column(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
children: [
|
||||||
children: [
|
Expanded(
|
||||||
Wrap(
|
child: Padding(
|
||||||
spacing: 10,
|
padding: const EdgeInsets.all(30.0),
|
||||||
runSpacing: 10,
|
child: Column(
|
||||||
children: typeBasedCount.map((item) {
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
double cardWidth = isDesktop
|
children: [
|
||||||
? (MediaQuery.of(context).size.width * 0.75 - 10) / 2 // 80% width padding adjusted
|
Wrap(
|
||||||
: MediaQuery.of(context).size.width - 24; // full width with padding
|
spacing: 10,
|
||||||
|
runSpacing: 10,
|
||||||
|
children: typeBasedCount.map((item) {
|
||||||
|
double cardWidth = isDesktop
|
||||||
|
? (MediaQuery.of(context).size.width * 0.75 - 10) / 2 // 80% width padding adjusted
|
||||||
|
: MediaQuery.of(context).size.width - 24; // full width with padding
|
||||||
|
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: cardWidth,
|
width: cardWidth,
|
||||||
child: buildInfoCard(item['value'], item['count'], cardWidth),
|
child: buildInfoCard(item['value'], item['count'], cardWidth),
|
||||||
);
|
);
|
||||||
}).toList(),
|
}).toList(),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
Wrap(
|
||||||
|
spacing: 10,
|
||||||
|
runSpacing: 10,
|
||||||
|
children: statusBasedCount.map((item) {
|
||||||
|
double cardWidth = isDesktop
|
||||||
|
? (MediaQuery.of(context).size.width * 0.90 - 50) / 6 // desktop layout: 6 cards per row
|
||||||
|
: MediaQuery.of(context).size.width - 24; // mobile: full width
|
||||||
|
|
||||||
|
return SizedBox(
|
||||||
|
width: cardWidth,
|
||||||
|
child: buildInfoCard(item['value'], item['count'], cardWidth),
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
),
|
||||||
Wrap(
|
|
||||||
spacing: 10,
|
|
||||||
runSpacing: 10,
|
|
||||||
children: statusBasedCount.map((item) {
|
|
||||||
double cardWidth = isDesktop
|
|
||||||
? (MediaQuery.of(context).size.width * 0.90 - 50) / 6 // desktop layout: 6 cards per row
|
|
||||||
: MediaQuery.of(context).size.width - 24; // mobile: full width
|
|
||||||
|
|
||||||
return SizedBox(
|
|
||||||
width: cardWidth,
|
|
||||||
child: buildInfoCard(item['value'], item['count'], cardWidth),
|
|
||||||
);
|
|
||||||
}).toList(),
|
|
||||||
),
|
|
||||||
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
),
|
},
|
||||||
],
|
)
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -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),
|
||||||
|
|||||||
@ -395,8 +395,10 @@ class _OfficeDetailsState extends State<OfficeDetails> {
|
|||||||
children: [
|
children: [
|
||||||
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(
|
||||||
@ -439,8 +441,10 @@ class _OfficeDetailsState extends State<OfficeDetails> {
|
|||||||
children: [
|
children: [
|
||||||
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(
|
||||||
@ -489,8 +493,10 @@ class _OfficeDetailsState extends State<OfficeDetails> {
|
|||||||
children: [
|
children: [
|
||||||
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(
|
||||||
@ -627,10 +633,11 @@ class _OfficeDetailsState extends State<OfficeDetails> {
|
|||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"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(
|
||||||
@ -739,10 +746,11 @@ class _OfficeDetailsState extends State<OfficeDetails> {
|
|||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"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(
|
||||||
@ -850,10 +858,11 @@ class _OfficeDetailsState extends State<OfficeDetails> {
|
|||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"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(
|
||||||
@ -960,10 +969,11 @@ class _OfficeDetailsState extends State<OfficeDetails> {
|
|||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"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(
|
||||||
@ -1107,10 +1117,11 @@ class _OfficeDetailsState extends State<OfficeDetails> {
|
|||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"Start Date",
|
"Start Date",
|
||||||
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(
|
||||||
@ -1201,8 +1212,11 @@ class _OfficeDetailsState extends State<OfficeDetails> {
|
|||||||
children: [
|
children: [
|
||||||
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(
|
||||||
|
|||||||
@ -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()
|
||||||
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -587,8 +589,10 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
|||||||
children: [
|
children: [
|
||||||
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(
|
||||||
@ -794,8 +800,10 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
|||||||
children: [
|
children: [
|
||||||
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(
|
||||||
@ -848,8 +856,10 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
|||||||
children: [
|
children: [
|
||||||
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(
|
||||||
@ -892,8 +902,10 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
|||||||
children: [
|
children: [
|
||||||
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(
|
||||||
@ -941,9 +953,9 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
|||||||
children: [
|
children: [
|
||||||
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,
|
||||||
@ -1004,8 +1016,10 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
|||||||
children: [
|
children: [
|
||||||
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(
|
||||||
@ -1089,8 +1103,10 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
|||||||
children: [
|
children: [
|
||||||
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(
|
||||||
@ -1130,8 +1146,10 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
|||||||
children: [
|
children: [
|
||||||
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(
|
||||||
@ -1182,8 +1200,10 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
|||||||
children: [
|
children: [
|
||||||
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(
|
||||||
@ -1219,8 +1239,10 @@ class PersonalDetailsState extends State<PersonalDetails> {
|
|||||||
children: [
|
children: [
|
||||||
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(
|
||||||
|
|||||||
@ -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',
|
||||||
|
|||||||
@ -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,58 +212,64 @@ 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(
|
||||||
children: menuItems.map((item) {
|
child: Wrap(
|
||||||
return SizedBox(
|
spacing: 16,
|
||||||
width: isDesktop ? 325 : double.infinity,
|
runSpacing: 16,
|
||||||
child: Card(
|
children: menuItems.map((item) {
|
||||||
color: Colors.white,
|
return SizedBox(
|
||||||
child: InkWell(
|
width: isDesktop ? 325 : double.infinity,
|
||||||
onTap: () {
|
child: Card(
|
||||||
final route = item['value'] as String;
|
color: Colors.white,
|
||||||
context.go(route);
|
child: InkWell(
|
||||||
},
|
onTap: () {
|
||||||
child: Padding(
|
final route = item['value'] as String;
|
||||||
padding: EdgeInsets.all(12),
|
context.go(route);
|
||||||
child: Row(
|
},
|
||||||
children: [
|
child: Padding(
|
||||||
Icon(item['icon'], size: 40, color: Color(0xFF114D8B)),
|
padding: EdgeInsets.all(12),
|
||||||
SizedBox(width: 16),
|
child: Row(
|
||||||
Expanded(
|
children: [
|
||||||
child: Column(
|
Icon(item['icon'], size: 40, color: Color(0xFF114D8B)),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
SizedBox(width: 16),
|
||||||
mainAxisSize: MainAxisSize.min,
|
Expanded(
|
||||||
children: [
|
child: Column(
|
||||||
Text(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
item['label'],
|
mainAxisSize: MainAxisSize.min,
|
||||||
style: GoogleFonts.poppins(
|
children: [
|
||||||
fontSize: 14,
|
Text(
|
||||||
fontWeight: FontWeight.w500,
|
item['label'],
|
||||||
|
style: GoogleFonts.poppins(
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 4),
|
||||||
|
Text(
|
||||||
|
item['description'],
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
softWrap: false,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
color: Colors.grey[700],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
SizedBox(height: 4),
|
),
|
||||||
Text(
|
|
||||||
item['description'],
|
|
||||||
maxLines: 1,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
softWrap: false,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14,
|
|
||||||
color: Colors.grey[700],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
);
|
||||||
),
|
}).toList(),
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
),
|
||||||
}).toList(),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user