|
@@ -1,24 +1,66 @@
|
|
|
-@extends('layouts.guest-home')
|
|
|
+@extends('layouts.join')
|
|
|
@section('content')
|
|
|
+ <form action="/api/client/createAsGuest"
|
|
|
+ method="post"
|
|
|
+ enctype="multipart/form-data"
|
|
|
+ onsubmit="return joinMeeting(this)">
|
|
|
+ @csrf
|
|
|
|
|
|
- <div class="d-flex">
|
|
|
- <h1 class="font-weight-bold">Consult your doctor from the comfort of your home!</h1>
|
|
|
- </div>
|
|
|
+ <p class="login-box-msg">Welcome! Please check in.</p>
|
|
|
|
|
|
- <div class="d-flex mt-4 mt-sm-5">
|
|
|
- <div class="form-container">
|
|
|
- <div class="form">
|
|
|
- <h3 class="border-bottom border-success text-center font-weight-bold py-3 m-0">Join Meeting</h3>
|
|
|
- <p class="px-4 text-dark m-0 py-3"><b>Mr. John Doe</b> would like you to join him/her on her video
|
|
|
- consultation with the doctor/</p>
|
|
|
- <div class="px-4 mb-4" autofocus="true">
|
|
|
- <input type="text" class="form-control py-3" placeholder="Your name">
|
|
|
- </div>
|
|
|
- <div class="px-4 pb-4">
|
|
|
- <button class="btn btn-success font-weight-bold w-100">Join Meeting</button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ @if (session('message'))
|
|
|
+ <div class="alert alert-danger">{{ session('message') }}</div>
|
|
|
+ @endif
|
|
|
+
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <input type="text" name="nameFirst" class="form-control" placeholder="First Name" required>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <input type="text" name="nameLast" class="form-control" placeholder="Last Name" required>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <input type="date" name="dob" class="form-control" placeholder="Date of Birth" required>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <input type="text" name="medicareNumber" class="form-control" placeholder="Medicare Number" required>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <input type="text" name="ssn" class="form-control" placeholder="SSN" required>
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
+ <button type="submit" class="btn btn-primary btn-block mx-auto w-50 mt-4 mb-2">Check In</button>
|
|
|
+ </form>
|
|
|
+ <script>
|
|
|
+ function joinMeeting(_form) {
|
|
|
+ $.post('/api/session/createStrangerSession', {}, function (_data) {
|
|
|
+ var sessionKey = _data.data;
|
|
|
+ $.ajax({
|
|
|
+ type: 'post',
|
|
|
+ url: '/api/client/createAsGuest',
|
|
|
+ headers: {
|
|
|
+ 'sessionKey': sessionKey
|
|
|
+ },
|
|
|
+ data: $(_form).serialize(),
|
|
|
+ dataType: 'json'
|
|
|
+ })
|
|
|
+ .done(function (_data) {
|
|
|
+ console.log(_data);
|
|
|
+ if(_data.success) {
|
|
|
+ localStorage.clientFirstName = $('[name="nameFirst"]').val();
|
|
|
+ localStorage.clientLastName = $('[name="nameLast"]').val();
|
|
|
+ localStorage.clientSessionKey = _data.data;
|
|
|
+ // window.location = '/meet';
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ alert(_data.message);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .fail(function (_data) {
|
|
|
+ console.log(_data);
|
|
|
+ alert(_data.message);
|
|
|
+ });
|
|
|
+ }, 'json');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ </script>
|
|
|
@endsection
|