Commit 2d33e69d authored by Sai Srinivas's avatar Sai Srinivas
Browse files

08-09-2025 Mohit Kumar

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