ソースを参照

selected date formated

Peter Muturi 3 年 前
コミット
026175ba06
1 ファイル変更5 行追加5 行削除
  1. 5 5
      resources/views/app/dashboard-mcp.blade.php

+ 5 - 5
resources/views/app/dashboard-mcp.blade.php

@@ -295,7 +295,7 @@
                             <div class="card mb-4">
                                 <div class="card-header pl-2">
                                     <strong>
-                                        Appointments @{{ formatDate(selectedDate) }}
+                                        Appointments @{{ formatSelectedDate(selectedDate) }}
                                     </strong>
                                 </div>
                                 <div class="card-body p-0">
@@ -363,10 +363,10 @@
                                         </tr>
                                     </table>
 
-                                    <div v-if="numEventsForDate === 0"
+                                    <div v-if="numEventsForDate === 0 && selectedDate"
                                          class="bg-light p-3 text-secondary border bounded">
-                                        <span v-if="filterStatus === ''">You have no appointments on <b>@{{ formatDate(selectedDate) }}</b></span>
-                                        <span v-if="filterStatus !== ''">You have no appointments on <b>@{{ formatDate(selectedDate) }}</b> with status <b>@{{ filterStatus }}</b></span>
+                                        <span v-if="filterStatus === ''">You have no appointments on <b>@{{ formatSelectedDate(selectedDate) }}</b></span>
+                                        <span v-if="filterStatus !== ''">You have no appointments on <b>@{{ formatSelectedDate(selectedDate) }}</b> with status <b>@{{ filterStatus }}</b></span>
                                     </div>
 
                                     <div v-show="!selectedDate" class="bg-light p-3 text-secondary border bounded">
@@ -1143,7 +1143,7 @@
 
                           return date.getFullYear()+'-'+parseInt(date.getMonth()+1) +'-' + day;
                         },
-                        formatDate: function(_date, _format) {
+                        formatSelectedDate: function(_date, _format) {
                           _format = _format || 'MM/DD/YYYY';
                           if(_date) {
                             return moment(_date).format(_format);