ui fixes
This commit is contained in:
parent
92f0b2dc73
commit
9f3b22200f
@ -126,7 +126,7 @@ class claimListState extends ConsumerState<claimList> {
|
||||
return (item['reg_no'] ?? '-').toLowerCase().contains(
|
||||
query.toLowerCase(),
|
||||
) ||
|
||||
(item['insurer_name'] ?? '-').toLowerCase().contains(
|
||||
(item['insurer_short_name'] ?? '-').toLowerCase().contains(
|
||||
query.toLowerCase(),
|
||||
) ||
|
||||
(item['policy_no'] ?? '-').toLowerCase().contains(
|
||||
@ -289,7 +289,7 @@ class claimListState extends ConsumerState<claimList> {
|
||||
keys: [
|
||||
"sno", // handled internally as i + 1
|
||||
"reg_no",
|
||||
"insurer_name",
|
||||
"insurer_short_name",
|
||||
"policy_no",
|
||||
"policy_end_date",
|
||||
"claim_number",
|
||||
@ -398,7 +398,7 @@ class claimListState extends ConsumerState<claimList> {
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 2,
|
||||
flex: 1,
|
||||
child: Text('S.No.', style: _headerStyle),
|
||||
),
|
||||
Expanded(
|
||||
@ -410,7 +410,7 @@ class claimListState extends ConsumerState<claimList> {
|
||||
child: Text('Insurer', style: _headerStyle),
|
||||
),
|
||||
Expanded(
|
||||
flex: 2,
|
||||
flex: 3,
|
||||
child: Text('Policy No.', style: _headerStyle),
|
||||
),
|
||||
Expanded(
|
||||
@ -524,7 +524,7 @@ class claimListState extends ConsumerState<claimList> {
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(flex: 2, child: Text('$sno' ?? '-', style: _dataBold)),
|
||||
Expanded(flex: 1, child: Text('$sno' ?? '-', style: _dataBold)),
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Text(
|
||||
@ -535,12 +535,12 @@ class claimListState extends ConsumerState<claimList> {
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Text(
|
||||
item['insurer_name'] ?? '-', // fallback
|
||||
item['insurer_short_name'] ?? '-', // fallback
|
||||
style: _dataBold,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
flex: 2,
|
||||
flex: 3,
|
||||
child: Text(item['policy_no'] ?? '-', style: _dataBold),
|
||||
),
|
||||
Expanded(
|
||||
|
||||
@ -128,7 +128,7 @@ class endosementState extends ConsumerState<endosement> {
|
||||
return (item['reg_no'] ?? '-').toLowerCase().contains(
|
||||
query.toLowerCase(),
|
||||
) ||
|
||||
(item['insurer_name'] ?? '-').toLowerCase().contains(
|
||||
(item['insurer_short_name'] ?? '-').toLowerCase().contains(
|
||||
query.toLowerCase(),
|
||||
) ||
|
||||
(item['policy_number'] ?? '-').toLowerCase().contains(
|
||||
@ -285,7 +285,7 @@ class endosementState extends ConsumerState<endosement> {
|
||||
keys: [
|
||||
"sno", // handled internally as i + 1
|
||||
"reg_no",
|
||||
"insurer_name",
|
||||
"insurer_short_name",
|
||||
"policy_number",
|
||||
"endorsement_type_value",
|
||||
"endorsement_no",
|
||||
@ -397,7 +397,7 @@ class endosementState extends ConsumerState<endosement> {
|
||||
child: Text('Vehicle.No.', style: _headerStyle),
|
||||
),
|
||||
Expanded(
|
||||
flex: 4,
|
||||
flex: 2,
|
||||
child: Text('Insurer', style: _headerStyle),
|
||||
),
|
||||
Expanded(
|
||||
@ -523,9 +523,9 @@ class endosementState extends ConsumerState<endosement> {
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
flex: 4,
|
||||
flex: 2,
|
||||
child: Text(
|
||||
item['insurer_name'] ?? '-', // fallback
|
||||
item['insurer_short_name'] ?? '-', // fallback
|
||||
style: _dataBold,
|
||||
),
|
||||
),
|
||||
|
||||
@ -278,8 +278,9 @@ class BrokerListState extends ConsumerState<BrokerList> {
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 1,
|
||||
SizedBox(
|
||||
width: 100,
|
||||
// flex: 1,
|
||||
child: Text('S.No.', style: _headerStyle),
|
||||
),
|
||||
Expanded(
|
||||
@ -386,7 +387,11 @@ class BrokerListState extends ConsumerState<BrokerList> {
|
||||
),
|
||||
child: Row(
|
||||
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,
|
||||
|
||||
@ -276,12 +276,16 @@ class PaymentLsitState extends ConsumerState<PaymentLsit> {
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 1,
|
||||
// Expanded(
|
||||
// flex: 1,
|
||||
// child: Text('S.No.', style: _headerStyle),
|
||||
// ),
|
||||
SizedBox(
|
||||
width: 50,
|
||||
child: Text('S.No.', style: _headerStyle),
|
||||
),
|
||||
Expanded(
|
||||
flex: 2,
|
||||
flex: 1,
|
||||
child: Text('Payment', style: _headerStyle),
|
||||
),
|
||||
|
||||
@ -293,6 +297,14 @@ class PaymentLsitState extends ConsumerState<PaymentLsit> {
|
||||
flex: 1,
|
||||
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(
|
||||
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(
|
||||
flex: 2,
|
||||
flex: 1,
|
||||
child: Text(item['value'] ?? '-', style: _dataBold),
|
||||
),
|
||||
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(
|
||||
fontSize: 11.5,
|
||||
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Color(0xFF000000),
|
||||
);
|
||||
|
||||
@ -93,6 +93,7 @@ class _PayOutScreenState extends ConsumerState<PayOutScreen> {
|
||||
|
||||
bool isLoading = false;
|
||||
bool isLoadingPOS = false;
|
||||
bool isLoadingEditData = false;
|
||||
late ApiService apiService;
|
||||
dynamic managerId;
|
||||
dynamic userId;
|
||||
@ -229,7 +230,7 @@ class _PayOutScreenState extends ConsumerState<PayOutScreen> {
|
||||
}
|
||||
|
||||
void _loadEditData(String invoiceID, brokerID) async {
|
||||
setState(() => isLoading = true);
|
||||
setState(() => isLoadingEditData = true);
|
||||
print('_loadEditData');
|
||||
|
||||
final jsondata = {
|
||||
@ -351,7 +352,7 @@ class _PayOutScreenState extends ConsumerState<PayOutScreen> {
|
||||
// });
|
||||
}
|
||||
|
||||
setState(() => isLoading = false);
|
||||
setState(() => isLoadingEditData = false);
|
||||
}
|
||||
|
||||
String formatDate(String date) {
|
||||
@ -654,7 +655,8 @@ class _PayOutScreenState extends ConsumerState<PayOutScreen> {
|
||||
|
||||
return MainLayout(
|
||||
title: "Pay Out",
|
||||
body: Container(
|
||||
body: !isLoadingEditData
|
||||
? Container(
|
||||
color: Colors.white,
|
||||
padding: const EdgeInsets.all(8),
|
||||
margin: isEdit
|
||||
@ -692,7 +694,9 @@ class _PayOutScreenState extends ConsumerState<PayOutScreen> {
|
||||
constraints: const BoxConstraints(),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 5), // spacing between icon and text
|
||||
const SizedBox(
|
||||
width: 5,
|
||||
), // spacing between icon and text
|
||||
Text(
|
||||
"Invoice",
|
||||
style: GoogleFonts.inter(
|
||||
@ -804,7 +808,9 @@ class _PayOutScreenState extends ConsumerState<PayOutScreen> {
|
||||
borderRadius: BorderRadius.circular(22),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: const Color(0xFF10B981).withOpacity(0.25),
|
||||
color: const Color(
|
||||
0xFF10B981,
|
||||
).withOpacity(0.25),
|
||||
blurRadius: 6,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
@ -912,7 +918,10 @@ class _PayOutScreenState extends ConsumerState<PayOutScreen> {
|
||||
secondChild: Column(
|
||||
children: [
|
||||
_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),
|
||||
],
|
||||
),
|
||||
)
|
||||
: 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() {
|
||||
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(
|
||||
itemCount: filteredPolicies.length,
|
||||
itemBuilder: (context, index) {
|
||||
|
||||
@ -573,7 +573,7 @@ class policylistState extends ConsumerState<policylist> {
|
||||
// child: Text('Recieved Date', style: _headerStyle),
|
||||
// ),
|
||||
Expanded(
|
||||
flex: 2,
|
||||
flex: 3,
|
||||
child: Text('Assigned To', style: _headerStyle),
|
||||
),
|
||||
|
||||
@ -715,7 +715,7 @@ class policylistState extends ConsumerState<policylist> {
|
||||
// ),
|
||||
// ),
|
||||
Expanded(
|
||||
flex: 2,
|
||||
flex: 3,
|
||||
child: Text(item['assigned_to_name'] ?? '-', style: _dataBold),
|
||||
),
|
||||
Expanded(
|
||||
@ -1102,7 +1102,7 @@ class policylistState extends ConsumerState<policylist> {
|
||||
}
|
||||
|
||||
static final _dataBold = GoogleFonts.inter(
|
||||
fontSize: 11.5,
|
||||
fontSize: 11,
|
||||
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Color(0xFF000000),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user