浏览代码

Fix update appointment with raw date and time

Vijayakrishnan 4 年之前
父节点
当前提交
58d1103005
共有 1 个文件被更改,包括 17 次插入11 次删除
  1. 17 11
      resources/views/app/patient/dashboard.blade.php

+ 17 - 11
resources/views/app/patient/dashboard.blade.php

@@ -95,29 +95,29 @@
                                                 <div class="mb-2">
                                                     <label class="text-secondary text-sm">Date</label>
                                                     <input autofocus type="date" name="date" min="{{ date('Y-m-d') }}"
-                                                           value="{{ date("Y-m-d", strtotime($appointment->start_time)) }}" class="form-control form-control-sm">
+                                                           value="{{ date("Y-m-d", strtotime($appointment->raw_date)) }}" class="form-control form-control-sm">
                                                 </div>
                                                 <div class="mb-2">
                                                     <label class="text-secondary text-sm">Start Time</label>
                                                     <input type="time" name="startTime" class="form-control form-control-sm"
-                                                           value="{{ date("H:i", strtotime($appointment->start_time)) }}">
+                                                           value="{{ date("H:i", strtotime($appointment->raw_start_time)) }}">
                                                 </div>
                                                 <div class="mb-2">
                                                     <label class="text-secondary text-sm">End Time</label>
                                                     <input type="time" name="endTime" class="form-control form-control-sm"
-                                                           value="{{ date("H:i", strtotime($appointment->end_time)) }}">
+                                                           value="{{ date("H:i", strtotime($appointment->raw_end_time)) }}">
                                                 </div>
                                                 <div class="mb-2">
                                                     <label class="text-secondary text-sm">Timezone *</label>
                                                     <select name="timeZone" class="form-control form-control-sm" required>
                                                         <option value=""> --select-- </option>
-                                                        <option {{ $appointment->time_zone === 'EASTERN' ? 'selected' : '' }} value="EASTERN">Eastern</option>
-                                                        <option {{ $appointment->time_zone === 'CENTRAL' ? 'selected' : '' }} value="CENTRAL">Central</option>
-                                                        <option {{ $appointment->time_zone === 'MOUNTAIN' ? 'selected' : '' }} value="MOUNTAIN">Mountain</option>
-                                                        <option {{ $appointment->time_zone === 'PACIFIC' ? 'selected' : '' }} value="PACIFIC">Pacific</option>
-                                                        <option {{ $appointment->time_zone === 'ALASKA' ? 'selected' : '' }} value="ALASKA">Alaska</option>
-                                                        <option {{ $appointment->time_zone === 'HAWAII' ? 'selected' : '' }} value="HAWAII">Hawaii</option>
-                                                        <option {{ $appointment->time_zone === 'PUERTO_RICO' ? 'selected' : '' }} value="PUERTO_RICO">Puerto Rico</option>
+                                                        <option {{ $appointment->timezone === 'EASTERN' ? 'selected' : '' }} value="EASTERN">Eastern</option>
+                                                        <option {{ $appointment->timezone === 'CENTRAL' ? 'selected' : '' }} value="CENTRAL">Central</option>
+                                                        <option {{ $appointment->timezone === 'MOUNTAIN' ? 'selected' : '' }} value="MOUNTAIN">Mountain</option>
+                                                        <option {{ $appointment->timezone === 'PACIFIC' ? 'selected' : '' }} value="PACIFIC">Pacific</option>
+                                                        <option {{ $appointment->timezone === 'ALASKA' ? 'selected' : '' }} value="ALASKA">Alaska</option>
+                                                        <option {{ $appointment->timezone === 'HAWAII' ? 'selected' : '' }} value="HAWAII">Hawaii</option>
+                                                        <option {{ $appointment->timezone === 'PUERTO_RICO' ? 'selected' : '' }} value="PUERTO_RICO">Puerto Rico</option>
                                                     </select>
                                                 </div>
                                                 <div class="mb-2">
@@ -134,7 +134,13 @@
                                                 </div>
                                             </form>
                                         </span>
-                                        {{ friendly_date_time($appointment->start_time, false) }}, {{ friendly_time($appointment->start_time) }}
+                                        {{ friendly_date_time($appointment->raw_date, false) }}
+                                        @if($appointment->raw_start_time)
+                                            , {{ friendly_time($appointment->raw_start_time, false) }}
+                                        @endif
+                                        @if($appointment->timezone)
+                                            &nbsp;<span class="text-secondary text-sm">({{ $appointment->timezone }})</span>
+                                        @endif
                                         &nbsp;/&nbsp;
                                         {{--<span class="d-inline-block ml- 2 text-secondary">{{ $appointment->title }}</span>
                                         &nbsp;/&nbsp;--}}