feat: improve patient flow and pricing workflow

This commit is contained in:
egecankomur
2026-06-12 00:04:53 +03:00
parent e12587398b
commit b42f68214e
26 changed files with 1283 additions and 243 deletions
+23 -4
View File
@@ -273,8 +273,10 @@ class _PendingJobsTabState extends ConsumerState<_PendingJobsTab> {
if (q.isEmpty) return jobs;
return jobs.where((j) =>
j.patientCode.toLowerCase().contains(q) ||
(j.patientName?.toLowerCase().contains(q) ?? false) ||
(j.clinicName?.toLowerCase().contains(q) ?? false) ||
j.prostheticType.label.toLowerCase().contains(q)
j.prostheticType.label.toLowerCase().contains(q) ||
(j.prostheticName?.toLowerCase().contains(q) ?? false)
).toList();
}
@@ -591,8 +593,10 @@ class _LabJobsTabState extends ConsumerState<_LabJobsTab> {
if (q.isNotEmpty) {
list = list.where((j) {
return j.patientCode.toLowerCase().contains(q) ||
(j.patientName?.toLowerCase().contains(q) ?? false) ||
(j.clinicName?.toLowerCase().contains(q) ?? false) ||
j.prostheticType.label.toLowerCase().contains(q) ||
(j.prostheticName?.toLowerCase().contains(q) ?? false) ||
(j.currentStep?.label.toLowerCase().contains(q) ?? false);
}).toList();
}
@@ -722,12 +726,15 @@ class _LabJobCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
final title = job.patientName?.trim().isNotEmpty == true
? job.patientName!
: job.patientCode;
final isOverdue =
job.dueDate != null && job.dueDate!.isBefore(DateTime.now());
final accentColor = _statusColor(job.status);
return Semantics(
label: job.patientCode,
label: title,
button: true,
excludeSemantics: true,
child: Material(
@@ -771,7 +778,7 @@ class _LabJobCard extends StatelessWidget {
children: [
Expanded(
child: Text(
job.patientCode,
title,
style: const TextStyle(
fontSize: 15,
fontWeight: FontWeight.w700,
@@ -798,6 +805,16 @@ class _LabJobCard extends StatelessWidget {
),
],
),
if (job.patientName?.isNotEmpty == true) ...[
const SizedBox(height: 4),
Text(
job.patientCode,
style: const TextStyle(
fontSize: 12,
color: AppColors.textMuted,
),
),
],
const SizedBox(height: 5),
Row(
children: [
@@ -827,7 +844,9 @@ class _LabJobCard extends StatelessWidget {
borderRadius: BorderRadius.circular(6),
),
child: Text(
job.prostheticType.label,
job.prostheticName?.isNotEmpty == true
? '${job.prostheticType.label} · ${job.prostheticName}'
: job.prostheticType.label,
style: const TextStyle(
fontSize: 11,
color: AppColors.textSecondary,