mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-30 01:43:59 +00:00
Admin Workflow - API code refactor to fetch information to display on workflow + action when answer is saved
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\Questionnaires\Processors;
|
||||
|
||||
|
||||
use App\Classes\Modules\Bookings\Processors\ApprovePurchaseOrderProcessor;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class SaveAnswerActionV1AdminWFProcessor
|
||||
{
|
||||
/** @var ApprovePurchaseOrderProcessor */
|
||||
private $approvePurchaseOrderProcessor;
|
||||
|
||||
/**
|
||||
* SaveAnswerActionV1AdminWFProcessor constructor.
|
||||
* @param ApprovePurchaseOrderProcessor $approvePurchaseOrderProcessor
|
||||
*/
|
||||
public function __construct(ApprovePurchaseOrderProcessor $approvePurchaseOrderProcessor)
|
||||
{
|
||||
$this->approvePurchaseOrderProcessor = $approvePurchaseOrderProcessor;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
public function execute($questionMetadata, $answerInText){
|
||||
if($answerInText === "approve_po_approved"){
|
||||
$this->approvePurchaseOrderProcessor->execute($questionMetadata['id']);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user