...@@ -167,7 +167,7 @@ class _HrmdashboardScreenState extends State<HrmdashboardScreen> { ...@@ -167,7 +167,7 @@ class _HrmdashboardScreenState extends State<HrmdashboardScreen> {
LayoutBuilder( LayoutBuilder(
builder: (context, constraints) { builder: (context, constraints) {
return Padding( return Padding(
padding: const EdgeInsets.all(14), padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 10),
child: Consumer<HrmAccessiblePagesProvider>( child: Consumer<HrmAccessiblePagesProvider>(
builder: (context, provider, child) { builder: (context, provider, child) {
if (provider.isLoading) { if (provider.isLoading) {
...@@ -190,9 +190,9 @@ class _HrmdashboardScreenState extends State<HrmdashboardScreen> { ...@@ -190,9 +190,9 @@ class _HrmdashboardScreenState extends State<HrmdashboardScreen> {
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: (constraints.maxWidth / 180).floor().clamp(2, 4), crossAxisCount: (constraints.maxWidth / 180).floor().clamp(2, 4),
crossAxisSpacing: 8.5, crossAxisSpacing: 1,
mainAxisSpacing: 16, mainAxisSpacing: 2,
childAspectRatio: 1.7, childAspectRatio: 1.8,
), ),
itemBuilder: (context, index) { itemBuilder: (context, index) {
final page = pages[index]; final page = pages[index];
...@@ -343,9 +343,9 @@ class _HrmdashboardScreenState extends State<HrmdashboardScreen> { ...@@ -343,9 +343,9 @@ class _HrmdashboardScreenState extends State<HrmdashboardScreen> {
case "Tour Bill List": case "Tour Bill List":
return "assets/svg/hrm/tourExp.svg"; return "assets/svg/hrm/tourExp.svg";
case "Team Leave Request Approval": case "Team Leave Request Approval":
return "assets/svg/hrm/leaveApplication.svg"; return "assets/svg/hrm/logout_ic.svg";
case "Team Attendance Approval": case "Team Attendance Approval":
return "assets/svg/hrm/attendanceList.svg"; return "assets/svg/hrm/check_ic.svg";
default: default:
return "assets/svg/hrm/groupIc.svg"; return "assets/svg/hrm/groupIc.svg";
} }
......
...@@ -21,8 +21,17 @@ class LeaveApplicationDetailScreen extends StatefulWidget { ...@@ -21,8 +21,17 @@ class LeaveApplicationDetailScreen extends StatefulWidget {
class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScreen> { class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScreen> {
bool _actionSubmitted = false; bool _actionSubmitted = false;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
// Get screen dimensions for responsive scaling
final screenWidth = MediaQuery.of(context).size.width;
final screenHeight = MediaQuery.of(context).size.height;
// Scale factors based on screen size
final scaleFactor = screenWidth / 360; // Base width for scaling
final textScaleFactor = MediaQuery.of(context).textScaleFactor.clamp(1.0, 1.2);
return SafeArea( return SafeArea(
top: false, top: false,
child: ChangeNotifierProvider( child: ChangeNotifierProvider(
...@@ -41,10 +50,10 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -41,10 +50,10 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
onTap: () => Navigator.pop(context, true), onTap: () => Navigator.pop(context, true),
child: SvgPicture.asset( child: SvgPicture.asset(
"assets/svg/appbar_back_button.svg", "assets/svg/appbar_back_button.svg",
height: 25, height: 25 * scaleFactor,
), ),
), ),
const SizedBox(width: 10), SizedBox(width: 10 * scaleFactor),
InkResponse( InkResponse(
onTap: () => Navigator.pop(context, true), onTap: () => Navigator.pop(context, true),
child: Text( child: Text(
...@@ -71,11 +80,6 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -71,11 +80,6 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
return const Center(child: Text("No details found")); return const Center(child: Text("No details found"));
} }
// Get screen dimensions for responsive scaling
final screenWidth = MediaQuery.of(context).size.width;
final screenHeight = MediaQuery.of(context).size.height;
// Scale factors based on screen size
final scaleFactor = screenWidth / 360; // Base width for scaling
final details = provider.response!.requestDetails!; final details = provider.response!.requestDetails!;
/// Screen content /// Screen content
...@@ -89,7 +93,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -89,7 +93,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
), ),
elevation: 0, elevation: 0,
child: Padding( child: Padding(
padding: EdgeInsets.all(10.0 * scaleFactor), padding: EdgeInsets.all(16.0 * scaleFactor),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
...@@ -97,8 +101,8 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -97,8 +101,8 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
Container( Container(
margin: EdgeInsets.only(bottom: 0.5 * scaleFactor), margin: EdgeInsets.only(bottom: 0.5 * scaleFactor),
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
vertical: 10 * scaleFactor, horizontal: 2.5 * scaleFactor,
horizontal: 2 * scaleFactor, vertical: 12 * scaleFactor,
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
...@@ -108,8 +112,8 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -108,8 +112,8 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
children: [ children: [
/// Left Avatar /// Left Avatar
Container( Container(
height: 48 * scaleFactor, height: 44 * scaleFactor,
width: 48 * scaleFactor, width: 44 * scaleFactor,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: const Color(0xFFEDF8FF), color: const Color(0xFFEDF8FF),
...@@ -117,8 +121,8 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -117,8 +121,8 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
child: Center( child: Center(
child: SvgPicture.asset( child: SvgPicture.asset(
"assets/svg/hrm/leaveApplication.svg", "assets/svg/hrm/leaveApplication.svg",
height: 28 * scaleFactor, height: 24 * scaleFactor,
width: 28 * scaleFactor, width: 24 * scaleFactor,
fit: BoxFit.contain, fit: BoxFit.contain,
), ),
), ),
...@@ -138,7 +142,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -138,7 +142,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
decorationColor: AppColors.grey_thick, decorationColor: AppColors.grey_thick,
height: 1.2, height: 1.2,
fontFamily: "JakartaRegular", fontFamily: "JakartaRegular",
fontSize: 12 * scaleFactor, fontSize: 14,
color: AppColors.semi_black, color: AppColors.semi_black,
), ),
), ),
...@@ -147,7 +151,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -147,7 +151,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
"Applied: ${details.appliedDate ?? "-"}", "Applied: ${details.appliedDate ?? "-"}",
style: TextStyle( style: TextStyle(
fontFamily: "JakartaRegular", fontFamily: "JakartaRegular",
fontSize: 12 * scaleFactor, fontSize: 14,
color: AppColors.app_blue, color: AppColors.app_blue,
), ),
), ),
...@@ -157,23 +161,20 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -157,23 +161,20 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
/// Right side status badge /// Right side status badge
Container( Container(
height: 28 * scaleFactor, height: 30 * scaleFactor,
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: 5 * scaleFactor, horizontal: 12 * scaleFactor,
vertical: 1 * scaleFactor,
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8 * scaleFactor), borderRadius: BorderRadius.circular(6 * scaleFactor),
color: _getStatusBackgroundColor(details.status), color: _getStatusBackgroundColor(details.status),
), ),
child: Center( child: Center(
child: Text( child: Text(
details.status ?? "-", details.status ?? "-",
textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontFamily: "JakartaMedium", fontSize: 13,
fontSize: 10 * scaleFactor, fontWeight: FontWeight.w600,
color: _getStatusTextColor(details.status), color: _getStatusTextColor(details.status),
), ),
), ),
...@@ -188,7 +189,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -188,7 +189,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
padding: EdgeInsets.all(8.0 * scaleFactor), padding: EdgeInsets.all(8.0 * scaleFactor),
child: Column( child: Column(
children: [ children: [
_buildSectionHeader("Leave Details", ), _buildSectionHeader("Leave Details", scaleFactor),
_buildDetailTile("Application ID", details.id, scaleFactor), _buildDetailTile("Application ID", details.id, scaleFactor),
_buildDetailTile("Applied Date", details.appliedDate, scaleFactor), _buildDetailTile("Applied Date", details.appliedDate, scaleFactor),
_buildDetailTile("Leave Type", details.leaveType, scaleFactor), _buildDetailTile("Leave Type", details.leaveType, scaleFactor),
...@@ -197,14 +198,14 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -197,14 +198,14 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
_buildDetailTile("Reason", details.reason, scaleFactor), _buildDetailTile("Reason", details.reason, scaleFactor),
/// Approval Details /// Approval Details
_buildSectionHeader("Approval Details", ), _buildSectionHeader("Approval Details", scaleFactor),
_buildDetailTile("Requested To", details.requestedTo, scaleFactor), _buildDetailTile("Requested To", details.requestedTo, scaleFactor),
_buildDetailTile("Approved By", details.approvedBy, scaleFactor), _buildDetailTile("Approved By", details.approvedBy, scaleFactor),
_buildDetailTile("Approved Date", details.approvedDate, scaleFactor), _buildDetailTile("Approved Date", details.approvedDate, scaleFactor),
_buildDetailTile("Approval Remarks", details.approvalRemarks, scaleFactor), _buildDetailTile("Approval Remarks", details.approvalRemarks, scaleFactor),
/// Additional Information /// Additional Information
_buildSectionHeader("Additional Information", ), _buildSectionHeader("Additional Information", scaleFactor),
_buildDetailTile("Status", details.status, scaleFactor), _buildDetailTile("Status", details.status, scaleFactor),
_buildDetailTile("From Time", details.fromTime, scaleFactor), _buildDetailTile("From Time", details.fromTime, scaleFactor),
_buildDetailTile("To Time", details.toTime, scaleFactor), _buildDetailTile("To Time", details.toTime, scaleFactor),
...@@ -219,7 +220,6 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -219,7 +220,6 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
], ],
), ),
); );
}, },
), ),
bottomNavigationBar: (widget.mode == "teamleader" bottomNavigationBar: (widget.mode == "teamleader"
...@@ -237,8 +237,8 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -237,8 +237,8 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
], ],
), ),
), ),
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 6), padding: EdgeInsets.symmetric(horizontal: 10 * scaleFactor, vertical: 6 * scaleFactor),
height: 61, height: 61 * scaleFactor,
child: Column( child: Column(
children: [ children: [
Row( Row(
...@@ -266,18 +266,18 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -266,18 +266,18 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8 * scaleFactor),
), ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
SvgPicture.asset("assets/svg/finance/level_reject_ic.svg"), SvgPicture.asset("assets/svg/finance/level_reject_ic.svg"),
const SizedBox(width: 6), SizedBox(width: 6 * scaleFactor),
const Text( Text(
"Reject", "Reject",
style: TextStyle( style: TextStyle(
color: Colors.black87, color: Colors.black87,
fontSize: 14, fontSize: 14 * scaleFactor,
fontFamily: "JakartaMedium", fontFamily: "JakartaMedium",
), ),
), ),
...@@ -290,7 +290,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -290,7 +290,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
/// Vertical Divider /// Vertical Divider
Container( Container(
width: 1, width: 1,
height: 45, height: 45 * scaleFactor,
color: Colors.grey.shade300, color: Colors.grey.shade300,
), ),
...@@ -317,18 +317,18 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -317,18 +317,18 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8 * scaleFactor),
), ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
SvgPicture.asset("assets/svg/finance/level_approve_ic.svg"), SvgPicture.asset("assets/svg/finance/level_approve_ic.svg"),
const SizedBox(width: 6), SizedBox(width: 6 * scaleFactor),
const Text( Text(
"Approve", "Approve",
style: TextStyle( style: TextStyle(
color: Colors.black87, color: Colors.black87,
fontSize: 14, fontSize: 14 * scaleFactor,
fontFamily: "JakartaMedium", fontFamily: "JakartaMedium",
), ),
), ),
...@@ -339,10 +339,9 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -339,10 +339,9 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
), ),
], ],
), ),
SizedBox(height: 2,) SizedBox(height: 2 * scaleFactor)
], ],
), ),
) )
: const SizedBox.shrink(), : const SizedBox.shrink(),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
...@@ -355,9 +354,12 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -355,9 +354,12 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
Future<void> showRemarkSheet({ Future<void> showRemarkSheet({
required BuildContext context, required BuildContext context,
required String actionType, // "Approved" or "Rejected" required String actionType,
required Function(String remark) onSubmit, required Function(String remark) onSubmit,
}) { }) {
final screenWidth = MediaQuery.of(context).size.width;
final scaleFactor = screenWidth / 360;
final remarkController = TextEditingController(); final remarkController = TextEditingController();
String? remarkError; String? remarkError;
...@@ -391,12 +393,12 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -391,12 +393,12 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
Widget errorText(String? msg) => msg == null Widget errorText(String? msg) => msg == null
? const SizedBox() ? const SizedBox()
: Padding( : Padding(
padding: const EdgeInsets.only(top: 4, left: 4), padding: EdgeInsets.only(top: 4 * scaleFactor, left: 4 * scaleFactor),
child: Text( child: Text(
msg, msg,
style: const TextStyle( style: TextStyle(
color: Colors.red, color: Colors.red,
fontSize: 12, fontSize: 12 * scaleFactor,
fontFamily: "JakartaMedium", fontFamily: "JakartaMedium",
), ),
), ),
...@@ -404,7 +406,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -404,7 +406,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
return SafeArea( return SafeArea(
child: Container( child: Container(
margin: const EdgeInsets.symmetric(horizontal: 15, vertical: 10), margin: EdgeInsets.symmetric(horizontal: 15 * scaleFactor, vertical: 10 * scaleFactor),
padding: EdgeInsets.only( padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom, bottom: MediaQuery.of(context).viewInsets.bottom,
), ),
...@@ -414,37 +416,37 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -414,37 +416,37 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Text( Text(
"$actionType Attendance Request", "$actionType Leave Request",
style: const TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16 * scaleFactor,
color: Colors.black87, color: Colors.black87,
fontFamily: "JakartaMedium", fontFamily: "JakartaMedium",
), ),
), ),
const SizedBox(height: 16), SizedBox(height: 16 * scaleFactor),
Text( Text(
"Remark", "Remark",
style: const TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14 * scaleFactor,
color: Colors.black87, color: Colors.black87,
fontFamily: "JakartaMedium", fontFamily: "JakartaMedium",
), ),
), ),
const SizedBox(height: 6), SizedBox(height: 6 * scaleFactor),
Container( Container(
margin: const EdgeInsets.only(bottom: 6), margin: EdgeInsets.only(bottom: 6 * scaleFactor),
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColors.text_field_color, color: AppColors.text_field_color,
borderRadius: BorderRadius.circular(14), borderRadius: BorderRadius.circular(14 * scaleFactor),
), ),
child: TextField( child: TextField(
controller: remarkController, controller: remarkController,
maxLines: 3, maxLines: 3,
style: TextStyle( style: TextStyle(
color: Colors.black, // Entered text color color: Colors.black,
fontSize: 14, // Optional: adjust font size fontSize: 14 * scaleFactor,
), ),
onChanged: (val) { onChanged: (val) {
if (remarkError != null && val.isNotEmpty) { if (remarkError != null && val.isNotEmpty) {
...@@ -454,17 +456,20 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -454,17 +456,20 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
decoration: InputDecoration( decoration: InputDecoration(
hintText: "Enter your remark here...", hintText: "Enter your remark here...",
hintStyle: TextStyle( hintStyle: TextStyle(
color: Colors.grey.shade500, // Customize this color color: Colors.grey.shade500,
fontSize: 14, // Optional: tweak font size fontSize: 14 * scaleFactor,
), ),
border: InputBorder.none, border: InputBorder.none,
contentPadding: const EdgeInsets.symmetric(horizontal: 12, vertical: 12), contentPadding: EdgeInsets.symmetric(
horizontal: 12 * scaleFactor,
vertical: 12 * scaleFactor
),
), ),
), ),
), ),
errorText(remarkError), errorText(remarkError),
const SizedBox(height: 5), SizedBox(height: 20 * scaleFactor),
Row( Row(
children: [ children: [
...@@ -472,24 +477,25 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -472,24 +477,25 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
child: InkResponse( child: InkResponse(
onTap: () => Navigator.pop(context), onTap: () => Navigator.pop(context),
child: Container( child: Container(
height: 45, height: 45 * scaleFactor,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0x12AAAAAA), color: Color(0x12AAAAAA),
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12 * scaleFactor),
), ),
child: const Center( child: Center(
child: Text( child: Text(
"Cancel", "Cancel",
style: TextStyle( style: TextStyle(
color: Colors.red, color: Colors.red,
fontFamily: "JakartaMedium", fontFamily: "JakartaMedium",
fontSize: 14 * scaleFactor,
), ),
), ),
), ),
), ),
), ),
), ),
const SizedBox(width: 12), SizedBox(width: 12 * scaleFactor),
Expanded( Expanded(
child: InkResponse( child: InkResponse(
onTap: () async { onTap: () async {
...@@ -502,7 +508,6 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -502,7 +508,6 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
_actionSubmitted = true; _actionSubmitted = true;
}); });
} }
// Show snackbar
ScaffoldMessenger.of(context).showSnackBar( ScaffoldMessenger.of(context).showSnackBar(
SnackBar( SnackBar(
content: Text("Request submitted successfully"), content: Text("Request submitted successfully"),
...@@ -512,30 +517,28 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -512,30 +517,28 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
); );
} }
}, },
child: Container( child: Container(
height: 45, height: 45 * scaleFactor,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.blue, color: Colors.blue,
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12 * scaleFactor),
), ),
child: const Center( child: Center(
child: Text( child: Text(
"Submit", "Submit",
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontFamily: "JakartaMedium", fontFamily: "JakartaMedium",
fontSize: 14 * scaleFactor,
), ),
), ),
), ),
), ),
), ),
), ),
], ],
), ),
SizedBox(height: 2,) SizedBox(height: 2 * scaleFactor)
], ],
), ),
), ),
...@@ -547,13 +550,12 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -547,13 +550,12 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
); );
} }
/// Reusable Row Widget for details /// Reusable Row Widget for details
Widget _buildDetailTile(String label, String? value, double scaleFactor) { Widget _buildDetailTile(String label, String? value, double scaleFactor) {
return Padding( return Padding(
padding: EdgeInsets.symmetric(vertical: 3 * scaleFactor), padding: EdgeInsets.symmetric(vertical: 6 * scaleFactor),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, // Align top if value wraps crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
// Label // Label
Expanded( Expanded(
...@@ -562,12 +564,12 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -562,12 +564,12 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
label, label,
style: TextStyle( style: TextStyle(
fontFamily: "JakartaRegular", fontFamily: "JakartaRegular",
fontSize: 12 * scaleFactor, fontSize: 14,
color: AppColors.semi_black, color: AppColors.semi_black,
), ),
), ),
), ),
const SizedBox(width: 4), SizedBox(width: 4 * scaleFactor),
// Value // Value
Expanded( Expanded(
...@@ -575,7 +577,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -575,7 +577,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
child: Text( child: Text(
value ?? "-", value ?? "-",
style: TextStyle( style: TextStyle(
fontSize: 12 * scaleFactor, fontSize: 14,
color: const Color(0xFF818181), color: const Color(0xFF818181),
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
), ),
...@@ -588,11 +590,10 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -588,11 +590,10 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
); );
} }
/// For date range display /// For date range display
Widget _buildDateRangeTile(String label, String? fromDate, String? toDate, double scaleFactor) { Widget _buildDateRangeTile(String label, String? fromDate, String? toDate, double scaleFactor) {
return Padding( return Padding(
padding: EdgeInsets.symmetric(vertical: 3 * scaleFactor), padding: EdgeInsets.symmetric(vertical: 6 * scaleFactor),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
...@@ -603,12 +604,12 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -603,12 +604,12 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
label, label,
style: TextStyle( style: TextStyle(
fontFamily: "JakartaRegular", fontFamily: "JakartaRegular",
fontSize: 12 * scaleFactor, fontSize: 14,
color: AppColors.semi_black, color: AppColors.semi_black,
), ),
), ),
), ),
const SizedBox(width: 4), SizedBox(width: 4 * scaleFactor),
// Value // Value
Expanded( Expanded(
...@@ -616,7 +617,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -616,7 +617,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
child: Text( child: Text(
'${fromDate ?? "-"} to ${toDate ?? "-"}', '${fromDate ?? "-"} to ${toDate ?? "-"}',
style: TextStyle( style: TextStyle(
fontSize: 12 * scaleFactor, fontSize: 14,
color: const Color(0xFF818181), color: const Color(0xFF818181),
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
), ),
...@@ -629,15 +630,14 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -629,15 +630,14 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
); );
} }
/// For time range display /// For time range display
Widget _buildTimeRangeTile(String label, String? fromTime, String? toTime, double scaleFactor) { Widget _buildTimeRangeTile(String label, String? fromTime, String? toTime, double scaleFactor) {
if ((fromTime == null || fromTime.isEmpty) && (toTime == null || toTime.isEmpty)) { if ((fromTime == null || fromTime.isEmpty) && (toTime == null || toTime.isEmpty)) {
return const SizedBox.shrink(); // Hide if no time data return const SizedBox.shrink();
} }
return Padding( return Padding(
padding: EdgeInsets.symmetric(vertical: 3 * scaleFactor), padding: EdgeInsets.symmetric(vertical: 6 * scaleFactor),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
...@@ -647,7 +647,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -647,7 +647,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
child: Text( child: Text(
label, label,
style: TextStyle( style: TextStyle(
fontSize: 12 * scaleFactor, fontSize: 14,
color: const Color(0xff2D2D2D), color: const Color(0xff2D2D2D),
fontStyle: FontStyle.normal, fontStyle: FontStyle.normal,
fontFamily: "Plus Jakarta Sans", fontFamily: "Plus Jakarta Sans",
...@@ -655,7 +655,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -655,7 +655,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
), ),
), ),
), ),
const SizedBox(width: 4), SizedBox(width: 4 * scaleFactor),
// Value // Value
Expanded( Expanded(
...@@ -663,7 +663,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -663,7 +663,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
child: Text( child: Text(
'${fromTime ?? "-"} to ${toTime ?? "-"}', '${fromTime ?? "-"} to ${toTime ?? "-"}',
style: TextStyle( style: TextStyle(
fontSize: 12 * scaleFactor, fontSize: 14,
color: const Color(0xff818181), color: const Color(0xff818181),
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
), ),
...@@ -676,11 +676,10 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -676,11 +676,10 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
); );
} }
/// Section header with dotted line /// Section header with dotted line
Widget _buildSectionHeader(String title) { Widget _buildSectionHeader(String title, double scaleFactor) {
return Padding( return Padding(
padding: const EdgeInsets.symmetric(vertical: 8), padding: EdgeInsets.symmetric(vertical: 9 * scaleFactor),
child: Row( child: Row(
children: [ children: [
Text( Text(
...@@ -690,7 +689,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr ...@@ -690,7 +689,7 @@ class _LeaveApplicationDetailScreenState extends State<LeaveApplicationDetailScr
fontFamily: "JakartaSemiBold", fontFamily: "JakartaSemiBold",
), ),
), ),
const SizedBox(width: 10), SizedBox(width: 10 * scaleFactor),
Expanded( Expanded(
child: DottedLine( child: DottedLine(
dashGapLength: 4, dashGapLength: 4,
......
...@@ -71,29 +71,31 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{ ...@@ -71,29 +71,31 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
if (response == null) { if (response == null) {
return const Center(child: Text("No data available")); return const Center(child: Text("No data available"));
} }
debugPrint("==================requestDetails: ${response.requestDetails?.approvalStatus}"); debugPrint("==================requestDetails: ${widget.tourBillId}");
return SingleChildScrollView( return SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
/// Header Card at the very top /// Header Card at the very top
_expenseHeaderCard( _expenseHeaderCard(
title: response.requestDetails?.placeOfVisit ?? "Tour", title: response.requestDetails?.placeOfVisit ?? "Tour",
date: response.tourExpenses?.fromDate ?? "-", date: response.requestDetails?.appliedDate ?? "-",
status: (response.requestDetails?.approvalStatus?.isNotEmpty ?? false) status: (response.requestDetails?.approvalStatus?.isNotEmpty ?? false)
? response.requestDetails!.approvalStatus! ? response.requestDetails!.approvalStatus!
: "No Status", : "No Status",
details: [ details: [
{"key": "TL Pending Approval Amount", "value": "-"}, {"key": "Employee", "value": response.requestDetails!.employeeName!},
{"key": "Total Approved Amount", "value": response.tourExpenses?.appliedAmount ?? "-"}, {"key": "Approved By TL", "value": response.requestDetails!.tlApprovedBy!},
{"key": "Total Balance Amount", "value": "-"}, {"key": "TL Approval Amount", "value": response.requestDetails!.tlApprovedAmount!},
{"key": "HR Expiring Amount (Within 24Hrs)", "value": "-"}, {"key": "TL Remarks", "value": response.requestDetails!.tlRemarks!},
{"key": "HR Pending Approval Amount", "value": "-"}, {"key": "Approved By HR", "value": response.requestDetails!.hrApprovedBy!},
{"key": "Total Disbursed Amount", "value": "-"}, {"key": "HR Approval Amount", "value": response.requestDetails!.hrApprovedAmount!},
{"key": "TL Remarks", "value": response.requestDetails!.tlRemarks!},
{"key": "Total Approved Amount", "value": response.requestDetails?.approvedAmount ?? "-"},
{"key": "Total Balance Amount", "value": response.requestDetails!.appliedAmount!},
{"key": "Type", "value": response.requestDetails!.type!},
], ],
), ),
const SizedBox(height: 16), const SizedBox(height: 16),
...@@ -113,15 +115,15 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{ ...@@ -113,15 +115,15 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
const SizedBox(height: 8), const SizedBox(height: 8),
SizedBox( SizedBox(
height: 220, // adjust height to match your card height: 321, // adjust height to match your card
child: ListView( child: ListView(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
padding: EdgeInsets.symmetric( // horizontal margin for centering padding: EdgeInsets.symmetric(
horizontal: MediaQuery.of(context).size.width * 0.05, horizontal: MediaQuery.of(context).size.width * 0.05,
), ),
children: [ children: [
SizedBox( SizedBox(
width: MediaQuery.of(context).size.width * 0.85, width: MediaQuery.of(context).size.width * 0.90,
child: _tourExpenseCard( child: _tourExpenseCard(
employeeName: response.requestDetails?.employeeName ?? "-", employeeName: response.requestDetails?.employeeName ?? "-",
placeOfVisit: response.requestDetails?.placeOfVisit ?? "-", placeOfVisit: response.requestDetails?.placeOfVisit ?? "-",
...@@ -132,6 +134,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{ ...@@ -132,6 +134,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
remarks: response.tourExpenses?.extraNote ?? "-", remarks: response.tourExpenses?.extraNote ?? "-",
), ),
), ),
], ],
), ),
), ),
...@@ -173,6 +176,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{ ...@@ -173,6 +176,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
amount: t.fare ?? "0", amount: t.fare ?? "0",
from: t.froma ?? "-", from: t.froma ?? "-",
to: t.toa ?? "-", to: t.toa ?? "-",
imageUrl: t.imageDirFilePath ?? "",
onViewTap: () { onViewTap: () {
debugPrint("Open: ${t.imageDirFilePath}"); debugPrint("Open: ${t.imageDirFilePath}");
//Fileviewer(fileName: "", fileUrl: t.imageDirFilePath.toString()) //Fileviewer(fileName: "", fileUrl: t.imageDirFilePath.toString())
...@@ -236,6 +240,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{ ...@@ -236,6 +240,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
amount: h.amount ?? "0", amount: h.amount ?? "0",
fromDate: h.fromDate ?? "-", fromDate: h.fromDate ?? "-",
toDate: h.toDate ?? "-", toDate: h.toDate ?? "-",
imageUrl: h.imageDirFilePath ?? "",
onViewTap: () { onViewTap: () {
debugPrint("Open: ${h.imageDirFilePath}"); debugPrint("Open: ${h.imageDirFilePath}");
Navigator.push( Navigator.push(
...@@ -296,6 +301,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{ ...@@ -296,6 +301,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
description: o.otherDesc ?? "-", description: o.otherDesc ?? "-",
amount: o.otherAmount ?? "0", amount: o.otherAmount ?? "0",
date: o.otherDate ?? "-", date: o.otherDate ?? "-",
imageUrl: o.imageDirFilePath ?? "",
onViewTap: () { onViewTap: () {
debugPrint("Open: ${o.imageDirFilePath}"); debugPrint("Open: ${o.imageDirFilePath}");
Navigator.push( Navigator.push(
...@@ -346,7 +352,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{ ...@@ -346,7 +352,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
}) { }) {
// paste your same implementation here // paste your same implementation here
return Container( return Container(
margin: const EdgeInsets.only(bottom: 16), margin: const EdgeInsets.only(bottom: 10),
padding: const EdgeInsets.all(16), padding: const EdgeInsets.all(16),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
...@@ -415,6 +421,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{ ...@@ -415,6 +421,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
required String amount, required String amount,
required String from, required String from,
required String to, required String to,
required imageUrl,
required VoidCallback onViewTap, required VoidCallback onViewTap,
}) { }) {
// paste your travel card code here // paste your travel card code here
...@@ -444,7 +451,9 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{ ...@@ -444,7 +451,9 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
radius: 20, radius: 20,
backgroundColor: const Color(0xffFFF3E0), backgroundColor: const Color(0xffFFF3E0),
child: SvgPicture.asset( child: SvgPicture.asset(
"assets/svg/hrm/travel_ic.svg", _getTravelIcon(travelType),
width: 28,
height: 28,
), ),
), ),
const SizedBox(width: 8), const SizedBox(width: 8),
...@@ -474,7 +483,8 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{ ...@@ -474,7 +483,8 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
const SizedBox(height: 2), const SizedBox(height: 2),
_buildKeyValue("To", to), _buildKeyValue("To", to),
const SizedBox(height: 2), const SizedBox(height: 2),
_buildKeyValue("Image", "View", isLink: true, onTap: onViewTap), if ( imageUrl != null && imageUrl!.isNotEmpty)
_buildKeyValue("Image", "View", isLink: true, onTap: onViewTap),
], ],
), ),
); );
...@@ -485,6 +495,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{ ...@@ -485,6 +495,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
required String amount, required String amount,
required String fromDate, required String fromDate,
required String toDate, required String toDate,
required imageUrl,
required VoidCallback onViewTap, required VoidCallback onViewTap,
}) { }) {
// paste your hotel card code here // paste your hotel card code here
...@@ -546,6 +557,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{ ...@@ -546,6 +557,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
const SizedBox(height: 2), const SizedBox(height: 2),
_buildKeyValue("To", toDate), _buildKeyValue("To", toDate),
const SizedBox(height: 2), const SizedBox(height: 2),
if ( imageUrl != null && imageUrl!.isNotEmpty)
_buildKeyValue("Image", "View", isLink: true, onTap: onViewTap), _buildKeyValue("Image", "View", isLink: true, onTap: onViewTap),
], ],
), ),
...@@ -556,6 +568,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{ ...@@ -556,6 +568,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
required String description, required String description,
required String amount, required String amount,
required String date, required String date,
required imageUrl,
required VoidCallback onViewTap, required VoidCallback onViewTap,
}) { }) {
// paste your other expense card code here // paste your other expense card code here
...@@ -616,6 +629,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{ ...@@ -616,6 +629,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
const SizedBox(height: 2), const SizedBox(height: 2),
_buildKeyValue("Description", description), _buildKeyValue("Description", description),
const SizedBox(height: 2), const SizedBox(height: 2),
if ( imageUrl != null && imageUrl!.isNotEmpty)
_buildKeyValue("Image", "View", isLink: true, onTap: onViewTap), _buildKeyValue("Image", "View", isLink: true, onTap: onViewTap),
], ],
), ),
...@@ -863,6 +877,27 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{ ...@@ -863,6 +877,27 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{
}, },
); );
} }
///travel icons
String _getTravelIcon(String? travelType) {
switch (travelType?.toLowerCase()) {
case "flight":
return "assets/svg/hrm/airplane_ic.svg";
case "train":
return "assets/svg/hrm/train_ic.svg";
case "bus":
return "assets/svg/hrm/bus_ic.svg";
case "car":
return "assets/svg/hrm/car_ic.svg";
case "auto":
return "assets/svg/hrm/truck_ic.svg";
case "bike":
return "assets/svg/hrm/motorcycle_ic.svg";
default:
return "assets/svg/hrm/travel_ic.svg"; // fallback
}
}
/// Avatar color generator /// Avatar color generator
Color _getStatusBgColor(value) { Color _getStatusBgColor(value) {
var color = AppColors.approved_bg_color; var color = AppColors.approved_bg_color;
......
...@@ -315,6 +315,18 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> { ...@@ -315,6 +315,18 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
fontSize: 14, fontSize: 14,
), ),
), ),
Text(
"#${provider.technician_complaint_list[index].engineNo}",
maxLines: 1,
overflow:
TextOverflow.ellipsis,
style: TextStyle(
color: Color(
0xFF818181,
),
fontSize: 14,
),
),
], ],
), ),
), ),
...@@ -335,30 +347,30 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> { ...@@ -335,30 +347,30 @@ class _PendingcomplaintsState extends State<Pendingcomplaints> {
), ),
), ),
), ),
Expanded( // Expanded(
flex: 1, // flex: 1,
child: InkResponse( // child: InkResponse(
onTap: () { // onTap: () {
_showOptionsSheet( // _showOptionsSheet(
context, // context,
provider // provider
.technician_complaint_list[index] // .technician_complaint_list[index]
.companyName, // .companyName,
//
provider // provider
.technician_complaint_list[index] // .technician_complaint_list[index]
.genId, // .genId,
provider // provider
.technician_complaint_list[index] // .technician_complaint_list[index]
.complaintId, // .complaintId,
); // );
}, // },
child: SvgPicture.asset( // child: SvgPicture.asset(
"assets/svg/ic_more.svg", // "assets/svg/ic_more.svg",
height: 30, // height: 30,
), // ),
), // ),
), // ),
], ],
), ),
......
...@@ -115,7 +115,7 @@ class _VisitdetailsState extends State<Visitdetails> { ...@@ -115,7 +115,7 @@ class _VisitdetailsState extends State<Visitdetails> {
bottomRight: Radius.circular(30), bottomRight: Radius.circular(30),
), ),
), ),
elevation: 2, elevation: 0,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
......
...@@ -26,6 +26,7 @@ import 'package:generp/Models/crmModels/crmProspectDetailsResponse.dart'; ...@@ -26,6 +26,7 @@ import 'package:generp/Models/crmModels/crmProspectDetailsResponse.dart';
import 'package:generp/Models/financeModels/addDirectPaymentResponse.dart'; import 'package:generp/Models/financeModels/addDirectPaymentResponse.dart';
import 'package:generp/Models/financeModels/paymentRequisitionPaymentsListResponse.dart'; import 'package:generp/Models/financeModels/paymentRequisitionPaymentsListResponse.dart';
import 'package:generp/Models/hrmModels/attendanceRequestListResponse.dart'; import 'package:generp/Models/hrmModels/attendanceRequestListResponse.dart';
import 'package:generp/Models/hrmModels/jobDescriptionResponse.dart';
import 'package:generp/Models/hrmModels/leaveApplicationDetailsResponse.dart'; import 'package:generp/Models/hrmModels/leaveApplicationDetailsResponse.dart';
import 'package:generp/Models/hrmModels/leaveApplicationLIstResponse.dart'; import 'package:generp/Models/hrmModels/leaveApplicationLIstResponse.dart';
import 'package:generp/Models/hrmModels/rewardListResponse.dart'; import 'package:generp/Models/hrmModels/rewardListResponse.dart';
...@@ -4965,6 +4966,31 @@ class ApiCalling { ...@@ -4965,6 +4966,31 @@ class ApiCalling {
return null; return null;
} }
} }
static Future<jobDescriptionResponse?> jobDescriptAPI(
empId,
session,
) async {
try {
Map<String, String> data = {
'session_id': (session).toString(),
'emp_id': (empId).toString(),
};
final res = await post(data, JobDesciptionUrl, {});
if (res != null) {
print(data);
debugPrint(res.body);
return jobDescriptionResponse.fromJson(jsonDecode(res.body));
} else {
debugPrint("Null Response");
return null;
}
} catch (e) {
debugPrint('hello bev=bug $e ');
return null;
}
}
static Future<hrmAccessiblePagesResponse?> hrmAccessiblePagesAPI( static Future<hrmAccessiblePagesResponse?> hrmAccessiblePagesAPI(
empId, empId,
session, session,
...@@ -5295,7 +5321,7 @@ class ApiCalling { ...@@ -5295,7 +5321,7 @@ class ApiCalling {
if (file.path.isNotEmpty) { if (file.path.isNotEmpty) {
request.files.add( request.files.add(
await http.MultipartFile.fromPath( await http.MultipartFile.fromPath(
"hotel_images[]", "hotel_image[]",
file.path, file.path,
), ),
); );
...@@ -5309,7 +5335,7 @@ class ApiCalling { ...@@ -5309,7 +5335,7 @@ class ApiCalling {
if (file.path.isNotEmpty) { if (file.path.isNotEmpty) {
request.files.add( request.files.add(
await http.MultipartFile.fromPath( await http.MultipartFile.fromPath(
"travel_images[]", "travel_image[]",
file.path, file.path,
), ),
); );
...@@ -5323,7 +5349,7 @@ class ApiCalling { ...@@ -5323,7 +5349,7 @@ class ApiCalling {
if (file.path.isNotEmpty) { if (file.path.isNotEmpty) {
request.files.add( request.files.add(
await http.MultipartFile.fromPath( await http.MultipartFile.fromPath(
"other_images[]", "other_image[]",
file.path, file.path,
), ),
); );
......
...@@ -590,6 +590,14 @@ packages: ...@@ -590,6 +590,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.12.0" version: "1.12.0"
flutter_html:
dependency: "direct main"
description:
name: flutter_html
sha256: "38a2fd702ffdf3243fb7441ab58aa1bc7e6922d95a50db76534de8260638558d"
url: "https://pub.dev"
source: hosted
version: "3.0.0"
flutter_image_compress: flutter_image_compress:
dependency: "direct main" dependency: "direct main"
description: description:
...@@ -1200,6 +1208,14 @@ packages: ...@@ -1200,6 +1208,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "5.1.1" version: "5.1.1"
list_counter:
dependency: transitive
description:
name: list_counter
sha256: c447ae3dfcd1c55f0152867090e67e219d42fe6d4f2807db4bbe8b8d69912237
url: "https://pub.dev"
source: hosted
version: "1.0.2"
location: location:
dependency: "direct main" dependency: "direct main"
description: description:
......
...@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev ...@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts # In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix. # of the product and file versions while build-number is used as the build suffix.
version: 1.0.101+109 version: 1.0.103+111
environment: environment:
sdk: ^3.7.2 sdk: ^3.7.2
...@@ -91,6 +91,7 @@ dependencies: ...@@ -91,6 +91,7 @@ dependencies:
build_web_compilers: ^4.0.4 build_web_compilers: ^4.0.4
graphview: ^1.2.0 graphview: ^1.2.0
file_picker: ^8.0.0 file_picker: ^8.0.0
flutter_html: ^3.0.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
......