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> { ...@@ -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";
} }
......
...@@ -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
...@@ -474,6 +481,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{ ...@@ -474,6 +481,7 @@ 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),
if ( imageUrl != null && imageUrl!.isNotEmpty)
_buildKeyValue("Image", "View", isLink: true, onTap: onViewTap), _buildKeyValue("Image", "View", isLink: true, onTap: onViewTap),
], ],
), ),
...@@ -485,6 +493,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{ ...@@ -485,6 +493,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 +555,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{ ...@@ -546,6 +555,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 +566,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{ ...@@ -556,6 +566,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 +627,7 @@ class _TourExpensesDetailsScreenState extends State<TourExpensesDetailsScreen>{ ...@@ -616,6 +627,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),
], ],
), ),
......
...@@ -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:
......
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