This commit is contained in:
venbaittech 2025-12-26 15:30:53 +05:30
parent 92f0b2dc73
commit 9f3b22200f
6 changed files with 486 additions and 450 deletions

View File

@ -126,7 +126,7 @@ class claimListState extends ConsumerState<claimList> {
return (item['reg_no'] ?? '-').toLowerCase().contains( return (item['reg_no'] ?? '-').toLowerCase().contains(
query.toLowerCase(), query.toLowerCase(),
) || ) ||
(item['insurer_name'] ?? '-').toLowerCase().contains( (item['insurer_short_name'] ?? '-').toLowerCase().contains(
query.toLowerCase(), query.toLowerCase(),
) || ) ||
(item['policy_no'] ?? '-').toLowerCase().contains( (item['policy_no'] ?? '-').toLowerCase().contains(
@ -289,7 +289,7 @@ class claimListState extends ConsumerState<claimList> {
keys: [ keys: [
"sno", // handled internally as i + 1 "sno", // handled internally as i + 1
"reg_no", "reg_no",
"insurer_name", "insurer_short_name",
"policy_no", "policy_no",
"policy_end_date", "policy_end_date",
"claim_number", "claim_number",
@ -398,7 +398,7 @@ class claimListState extends ConsumerState<claimList> {
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
flex: 2, flex: 1,
child: Text('S.No.', style: _headerStyle), child: Text('S.No.', style: _headerStyle),
), ),
Expanded( Expanded(
@ -410,7 +410,7 @@ class claimListState extends ConsumerState<claimList> {
child: Text('Insurer', style: _headerStyle), child: Text('Insurer', style: _headerStyle),
), ),
Expanded( Expanded(
flex: 2, flex: 3,
child: Text('Policy No.', style: _headerStyle), child: Text('Policy No.', style: _headerStyle),
), ),
Expanded( Expanded(
@ -524,7 +524,7 @@ class claimListState extends ConsumerState<claimList> {
), ),
child: Row( child: Row(
children: [ children: [
Expanded(flex: 2, child: Text('$sno' ?? '-', style: _dataBold)), Expanded(flex: 1, child: Text('$sno' ?? '-', style: _dataBold)),
Expanded( Expanded(
flex: 2, flex: 2,
child: Text( child: Text(
@ -535,12 +535,12 @@ class claimListState extends ConsumerState<claimList> {
Expanded( Expanded(
flex: 2, flex: 2,
child: Text( child: Text(
item['insurer_name'] ?? '-', // fallback item['insurer_short_name'] ?? '-', // fallback
style: _dataBold, style: _dataBold,
), ),
), ),
Expanded( Expanded(
flex: 2, flex: 3,
child: Text(item['policy_no'] ?? '-', style: _dataBold), child: Text(item['policy_no'] ?? '-', style: _dataBold),
), ),
Expanded( Expanded(

View File

@ -128,7 +128,7 @@ class endosementState extends ConsumerState<endosement> {
return (item['reg_no'] ?? '-').toLowerCase().contains( return (item['reg_no'] ?? '-').toLowerCase().contains(
query.toLowerCase(), query.toLowerCase(),
) || ) ||
(item['insurer_name'] ?? '-').toLowerCase().contains( (item['insurer_short_name'] ?? '-').toLowerCase().contains(
query.toLowerCase(), query.toLowerCase(),
) || ) ||
(item['policy_number'] ?? '-').toLowerCase().contains( (item['policy_number'] ?? '-').toLowerCase().contains(
@ -285,7 +285,7 @@ class endosementState extends ConsumerState<endosement> {
keys: [ keys: [
"sno", // handled internally as i + 1 "sno", // handled internally as i + 1
"reg_no", "reg_no",
"insurer_name", "insurer_short_name",
"policy_number", "policy_number",
"endorsement_type_value", "endorsement_type_value",
"endorsement_no", "endorsement_no",
@ -397,7 +397,7 @@ class endosementState extends ConsumerState<endosement> {
child: Text('Vehicle.No.', style: _headerStyle), child: Text('Vehicle.No.', style: _headerStyle),
), ),
Expanded( Expanded(
flex: 4, flex: 2,
child: Text('Insurer', style: _headerStyle), child: Text('Insurer', style: _headerStyle),
), ),
Expanded( Expanded(
@ -523,9 +523,9 @@ class endosementState extends ConsumerState<endosement> {
), ),
), ),
Expanded( Expanded(
flex: 4, flex: 2,
child: Text( child: Text(
item['insurer_name'] ?? '-', // fallback item['insurer_short_name'] ?? '-', // fallback
style: _dataBold, style: _dataBold,
), ),
), ),

View File

@ -278,8 +278,9 @@ class BrokerListState extends ConsumerState<BrokerList> {
), ),
child: Row( child: Row(
children: [ children: [
Expanded( SizedBox(
flex: 1, width: 100,
// flex: 1,
child: Text('S.No.', style: _headerStyle), child: Text('S.No.', style: _headerStyle),
), ),
Expanded( Expanded(
@ -386,7 +387,11 @@ class BrokerListState extends ConsumerState<BrokerList> {
), ),
child: Row( child: Row(
children: [ children: [
Expanded(flex: 1, child: Text('$sno' ?? '-', style: _dataBold)), SizedBox(
width: 100,
// flex: 1,
child: Text('$sno' ?? '-', style: _dataBold),
),
Expanded(flex: 1, child: Text(item['name'] ?? '-', style: _dataBold)), Expanded(flex: 1, child: Text(item['name'] ?? '-', style: _dataBold)),
Expanded( Expanded(
flex: 1, flex: 1,

View File

@ -276,12 +276,16 @@ class PaymentLsitState extends ConsumerState<PaymentLsit> {
), ),
child: Row( child: Row(
children: [ children: [
Expanded( // Expanded(
flex: 1, // flex: 1,
// child: Text('S.No.', style: _headerStyle),
// ),
SizedBox(
width: 50,
child: Text('S.No.', style: _headerStyle), child: Text('S.No.', style: _headerStyle),
), ),
Expanded( Expanded(
flex: 2, flex: 1,
child: Text('Payment', style: _headerStyle), child: Text('Payment', style: _headerStyle),
), ),
@ -293,6 +297,14 @@ class PaymentLsitState extends ConsumerState<PaymentLsit> {
flex: 1, flex: 1,
child: Text('Action', style: _headerStyle), child: Text('Action', style: _headerStyle),
), ),
Expanded(
flex: 1,
child: Text('', style: _headerStyle),
),
Expanded(
flex: 1,
child: Text('', style: _headerStyle),
),
], ],
), ),
), ),
@ -380,9 +392,10 @@ class PaymentLsitState extends ConsumerState<PaymentLsit> {
), ),
child: Row( child: Row(
children: [ children: [
Expanded(flex: 1, child: Text('$sno' ?? '-', style: _dataBold)), SizedBox(width: 50, child: Text('$sno' ?? '-', style: _dataBold)),
// Expanded(flex: 1, child: Text('$sno' ?? '-', style: _dataBold)),
Expanded( Expanded(
flex: 2, flex: 1,
child: Text(item['value'] ?? '-', style: _dataBold), child: Text(item['value'] ?? '-', style: _dataBold),
), ),
Expanded( Expanded(
@ -462,6 +475,8 @@ class PaymentLsitState extends ConsumerState<PaymentLsit> {
], ],
), ),
), ),
Expanded(flex: 1, child: Text('', style: _dataBold)),
Expanded(flex: 1, child: Text('', style: _dataBold)),
], ],
), ),
); );
@ -469,7 +484,6 @@ class PaymentLsitState extends ConsumerState<PaymentLsit> {
static final _dataBold = GoogleFonts.inter( static final _dataBold = GoogleFonts.inter(
fontSize: 11.5, fontSize: 11.5,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
color: Color(0xFF000000), color: Color(0xFF000000),
); );

View File

@ -93,6 +93,7 @@ class _PayOutScreenState extends ConsumerState<PayOutScreen> {
bool isLoading = false; bool isLoading = false;
bool isLoadingPOS = false; bool isLoadingPOS = false;
bool isLoadingEditData = false;
late ApiService apiService; late ApiService apiService;
dynamic managerId; dynamic managerId;
dynamic userId; dynamic userId;
@ -229,7 +230,7 @@ class _PayOutScreenState extends ConsumerState<PayOutScreen> {
} }
void _loadEditData(String invoiceID, brokerID) async { void _loadEditData(String invoiceID, brokerID) async {
setState(() => isLoading = true); setState(() => isLoadingEditData = true);
print('_loadEditData'); print('_loadEditData');
final jsondata = { final jsondata = {
@ -351,7 +352,7 @@ class _PayOutScreenState extends ConsumerState<PayOutScreen> {
// }); // });
} }
setState(() => isLoading = false); setState(() => isLoadingEditData = false);
} }
String formatDate(String date) { String formatDate(String date) {
@ -654,7 +655,8 @@ class _PayOutScreenState extends ConsumerState<PayOutScreen> {
return MainLayout( return MainLayout(
title: "Pay Out", title: "Pay Out",
body: Container( body: !isLoadingEditData
? Container(
color: Colors.white, color: Colors.white,
padding: const EdgeInsets.all(8), padding: const EdgeInsets.all(8),
margin: isEdit margin: isEdit
@ -692,7 +694,9 @@ class _PayOutScreenState extends ConsumerState<PayOutScreen> {
constraints: const BoxConstraints(), constraints: const BoxConstraints(),
), ),
), ),
const SizedBox(width: 5), // spacing between icon and text const SizedBox(
width: 5,
), // spacing between icon and text
Text( Text(
"Invoice", "Invoice",
style: GoogleFonts.inter( style: GoogleFonts.inter(
@ -804,7 +808,9 @@ class _PayOutScreenState extends ConsumerState<PayOutScreen> {
borderRadius: BorderRadius.circular(22), borderRadius: BorderRadius.circular(22),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color(0xFF10B981).withOpacity(0.25), color: const Color(
0xFF10B981,
).withOpacity(0.25),
blurRadius: 6, blurRadius: 6,
offset: const Offset(0, 2), offset: const Offset(0, 2),
), ),
@ -912,7 +918,10 @@ class _PayOutScreenState extends ConsumerState<PayOutScreen> {
secondChild: Column( secondChild: Column(
children: [ children: [
_policyTableHeader(), // 🔒 Static header _policyTableHeader(), // 🔒 Static header
_policyTableBody(), // 🔽 Scrollable rows Container(
// color: Colors.amber.shade100,
child: _policyTableBody(),
), // 🔽 Scrollable rows
], ],
), ),
), ),
@ -1095,6 +1104,11 @@ class _PayOutScreenState extends ConsumerState<PayOutScreen> {
// const SizedBox(height: 100), // const SizedBox(height: 100),
], ],
), ),
)
: Container(
color: Colors.white,
height: MediaQuery.of(context).size.height * 0.7,
child: Center(child: CircularProgressIndicator()),
), ),
); );
} }
@ -1191,7 +1205,10 @@ class _PayOutScreenState extends ConsumerState<PayOutScreen> {
Widget _policyTableBody() { Widget _policyTableBody() {
return SizedBox( return SizedBox(
height: isEdit ? 400 : 340, // avoids overflow // height: isEdit ? 400 : 340, // avoids overflow
height: isEdit
? MediaQuery.of(context).size.height * 0.65
: MediaQuery.of(context).size.height * 0.48, // avoids overflow
child: ListView.builder( child: ListView.builder(
itemCount: filteredPolicies.length, itemCount: filteredPolicies.length,
itemBuilder: (context, index) { itemBuilder: (context, index) {

View File

@ -573,7 +573,7 @@ class policylistState extends ConsumerState<policylist> {
// child: Text('Recieved Date', style: _headerStyle), // child: Text('Recieved Date', style: _headerStyle),
// ), // ),
Expanded( Expanded(
flex: 2, flex: 3,
child: Text('Assigned To', style: _headerStyle), child: Text('Assigned To', style: _headerStyle),
), ),
@ -715,7 +715,7 @@ class policylistState extends ConsumerState<policylist> {
// ), // ),
// ), // ),
Expanded( Expanded(
flex: 2, flex: 3,
child: Text(item['assigned_to_name'] ?? '-', style: _dataBold), child: Text(item['assigned_to_name'] ?? '-', style: _dataBold),
), ),
Expanded( Expanded(
@ -1102,7 +1102,7 @@ class policylistState extends ConsumerState<policylist> {
} }
static final _dataBold = GoogleFonts.inter( static final _dataBold = GoogleFonts.inter(
fontSize: 11.5, fontSize: 11,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
color: Color(0xFF000000), color: Color(0xFF000000),