UX update when system failed to open a support ticket via help menu

This commit is contained in:
Dillon
2023-10-05 17:30:29 +08:00
parent 619fc25605
commit 42b6140df7
4 changed files with 15 additions and 3 deletions
@@ -75,7 +75,8 @@ class UpdateNextQuestionQALogic extends AbstractControllerLogic
/**
* @param Request $request
* @return JsonResponse
* @throws ErrorException
* @throws MalformedRequestException
* @throws ResourceNotFoundException
*/
public function logic(Request $request) : JsonResponse
{
@@ -25,6 +25,14 @@ class DeleteAnswerQAProcessor
$this->listsHelpMenuUserAnswerSelected = $listsHelpMenuUserAnswerSelected;
}
/**
* @param int $userId
* @param int $questionId
* @param Request $request
* @return void
* @throws ResourceNotFoundException
*/
public function execute($userId, $questionId, $request){
if ($request->has('isPrevious')) {
//Get current and previous question's answer
@@ -28,7 +28,9 @@ class FetchesPerfexCRMCustomer
return null;
}
}catch(\Exception $exception){
throw new MalformedRequestException('Unable to get correct response from Perfex CRM server: ' . $exception->getMessage());
$error = 'Unable to get correct response from Perfex CRM server: ' . $exception->getMessage();
Log::error($error);
throw new MalformedRequestException($error);
}
}
}
@@ -134,7 +134,8 @@
}
},
errorHandler(error){
this.error = error.message;
// this.error = error.message;
this.error = 'We are sorry, something went wrong. Please contact us via live chat.';
},
submitForm(direction) {
this.parameters = {}