['view','prepare','generate'],'reader'=>['view','review']] as $who=>$rights){foreach($rights as $right)IdentityFixture::grant($f[$who]->id,$f['tenant'],$f['company'],'workshop_billing.'.$right,$f['unit']);IdentityFixture::grant($f[$who]->id,$f['tenant'],$f['company'],'workshop.view',$f['unit']);} $service=app(ServiceWorkflow::class)->save('services',null,$f['manager']->id,['name'=>'Serviço comercial exclusivamente sintético'],(string)Str::uuid())['id'];return $f+compact('service'); } public static function proposal(array $f): array {return ['version'=>1,'previous_id'=>null,'client_id'=>$f['client'],'currency'=>'MZN','evidence'=>'WORKSHOP-SALES-SYNTHETIC-v1: 200/H e 75/UN, revisão comercial distinta.','lines'=>array_map(fn($id,$price)=>['entry_id'=>$id,'entry_version'=>1,'service_id'=>$f['service'],'service_version'=>1,'price'=>$price,'price_source'=>'WORKSHOP-SALES-SYNTHETIC-v1'],[$f['time'],$f['material']],['200','75'])];} }