Пример #1
0
 private function status()
 {
     $closure = Info::withClosure($this->qdn->slug)->closure;
     if ($this->isApproverComplete($closure) && $this->qdn->status == 'Q.a. Verification') {
         throw new Exception("QDN signatories is not yet complete and the status is already Q.a. Verification" . __LINE__ . " of " . __FILE__);
     }
     return $this->isApproverComplete($closure);
 }
Пример #2
0
 public function fire($qdn)
 {
     Activity::log("Approved {$qdn['info']->control_id} : {$qdn['info']->discrepancy_category} and commented - {$qdn['request']->ApproverMessage}");
     Event::fire(new ApprovalNotificationEvent($qdn['info'], $qdn['request']->ApproverMessage));
     //flash success alert message
     $closure = Info::withClosure($qdn['info']->slug)->closure;
     $msg = $closure->other_department && $closure->production && $closure->quality_assurance && $closure->process_engineering ? 'Successfully updated! Issued QDN is now subject for QA Verification!' : 'Successfully updated! Issued QDN still waiting for other approvers!';
     Flash::success($msg);
 }