Simplify lab trial dispatch and fix per-jaw pricing

This commit is contained in:
egecankomur
2026-10-10 14:52:05 +03:00
parent f44e07f378
commit d20d44a1f3
6 changed files with 204 additions and 74 deletions
@@ -112,7 +112,11 @@ class ClinicJobsRepository {
}
Future<Job> approveAtClinic(String jobId, Job job, {String? note}) async {
final nextStep = job.nextStep;
if (job.status != JobStatus.inProgress ||
job.location != JobLocation.atClinic) {
throw StateError('Yalnızca klinikteki üretim işleri onaylanabilir.');
}
final nextStep = job.provaRequired ? job.currentStep : job.nextStep;
if (nextStep == null) throw Exception('Bu aşamadan ileri gidilemez.');
final record = await _pb.collection('jobs').update(jobId, body: {