mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim.git
synced 2026-08-19 04:24:00 +00:00
large commit
This commit is contained in:
@@ -6,7 +6,6 @@ use App\Classes\Modules\Accounts\DataTransferObjects\UserInvitationObject;
|
||||
use App\Classes\Modules\Accounts\Services\CreatesUserInvitation;
|
||||
use App\Classes\Modules\Accounts\Validation\CanSendAccountInvitation;
|
||||
use App\Classes\Modules\ControllerLogic\Exceptions\InternalServerErrorException;
|
||||
use App\Classes\Modules\ControllerLogic\Exceptions\ResourceConflictException;
|
||||
use App\Classes\ValueObjects\Constants\HttpStatus;
|
||||
use App\Events\Accounts\UserInvited;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
@@ -52,7 +51,7 @@ class CreateAccountInvitationLogic
|
||||
return new JsonResponse("Invitation have been sent!", HttpStatus::RESOURCE_CREATED);
|
||||
}
|
||||
|
||||
} catch (ResourceConflictException $exception) {
|
||||
} catch (\Exception $exception) {
|
||||
throw new InternalServerErrorException("Failed to send user invitation because {$exception->getMessage()}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,15 +3,22 @@
|
||||
namespace App\Classes;
|
||||
|
||||
|
||||
use App\Classes\Modules\ControllerLogic\Exceptions\InternalServerErrorException;
|
||||
|
||||
final class common
|
||||
{
|
||||
|
||||
/**
|
||||
* @param int $length
|
||||
* @return string
|
||||
* @throws \Exception
|
||||
* @throws InternalServerErrorException
|
||||
*/
|
||||
public static function generateRandomHash(int $length = 10): string {
|
||||
return substr(bin2hex(random_bytes(ceil($length / 2))), 0, $length);
|
||||
try {
|
||||
return substr(bin2hex(random_bytes(ceil($length / 2))), 0, $length);
|
||||
} catch (\Exception $exception){
|
||||
throw new InternalServerErrorException('Failed to generate hash for user invitation');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+11
@@ -24,6 +24,17 @@
|
||||
position: relative;
|
||||
float:right;
|
||||
}
|
||||
.login-triangle {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
right: 0; top: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-style: solid;
|
||||
border-width: 0 0 100vh 14rem;
|
||||
border-color: transparent transparent #fff;
|
||||
z-index: 10;
|
||||
}
|
||||
.bg-caption{
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<div class="row no-margin" style=" min-height: 100%; ">
|
||||
<div class="col no-padding" style="background-image: url({{asset('images/shipping_bg.jpeg')}}); background-position: center; background-size: cover;">
|
||||
<div class="w-100 h-100 bg-primary" style="position: absolute; opacity: 0.1;"></div>
|
||||
<span class="login-triangle"></span>
|
||||
</div>
|
||||
<div class="col-4 padding-50 bg-white">
|
||||
<div class="row m-t-50">
|
||||
|
||||
Reference in New Issue
Block a user