feat: improve patient flow and pricing workflow
This commit is contained in:
@@ -252,8 +252,10 @@ class _JobsTabState extends ConsumerState<_JobsTab> {
|
||||
if (q.isNotEmpty) {
|
||||
list = list.where((j) {
|
||||
return j.patientCode.toLowerCase().contains(q) ||
|
||||
(j.patientName?.toLowerCase().contains(q) ?? false) ||
|
||||
(j.labName?.toLowerCase().contains(q) ?? false) ||
|
||||
j.prostheticType.label.toLowerCase().contains(q);
|
||||
j.prostheticType.label.toLowerCase().contains(q) ||
|
||||
(j.prostheticName?.toLowerCase().contains(q) ?? false);
|
||||
}).toList();
|
||||
}
|
||||
|
||||
@@ -380,13 +382,16 @@ class _JobListCard extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final title = job.patientName?.trim().isNotEmpty == true
|
||||
? job.patientName!
|
||||
: job.patientCode;
|
||||
final statusColor = _statusColor(job);
|
||||
final statusBg = _statusBg(job);
|
||||
final isOverdue =
|
||||
job.dueDate != null && job.dueDate!.isBefore(DateTime.now());
|
||||
|
||||
return Semantics(
|
||||
label: job.patientCode,
|
||||
label: title,
|
||||
button: true,
|
||||
excludeSemantics: true,
|
||||
child: Material(
|
||||
@@ -426,7 +431,7 @@ class _JobListCard extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
job.patientCode,
|
||||
title,
|
||||
style: const TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w600,
|
||||
@@ -437,9 +442,22 @@ class _JobListCard extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 3),
|
||||
Text(job.prostheticType.label,
|
||||
Text(
|
||||
job.prostheticName?.isNotEmpty == true
|
||||
? '${job.prostheticType.label} · ${job.prostheticName}'
|
||||
: job.prostheticType.label,
|
||||
style: const TextStyle(
|
||||
fontSize: 12, color: AppColors.textSecondary)),
|
||||
if (job.patientName?.isNotEmpty == true) ...[
|
||||
const SizedBox(height: 2),
|
||||
Text(
|
||||
job.patientCode,
|
||||
style: const TextStyle(
|
||||
fontSize: 12, color: AppColors.textMuted),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
],
|
||||
if (job.labName != null) ...[
|
||||
const SizedBox(height: 2),
|
||||
Text(
|
||||
|
||||
Reference in New Issue
Block a user