3 次代码提交 45940377b9 ... b776c7a3d6

作者 SHA1 备注 提交日期
  Vijayakrishnan Krishnan b776c7a3d6 Admin dashboard: fix autoload appts for today 1 周之前
  Vijayakrishnan Krishnan b15e51c1e1 Query optimization: /rpm-manager 1 周之前
  Vijayakrishnan Krishnan 7189d1b638 RTE overlap issue: apply globally 1 周之前

+ 2 - 2
app/Http/Controllers/PracticeManagementController.php

@@ -2683,7 +2683,7 @@ WHERE
         $stats['withMeasOn'] = 'N/A';
         $v = $request->input('wmo') ?: date('Y-m-d');
         $statQuery = "$commonStatSQL
-(SELECT COUNT(mstat.id) FROM measurement mstat WHERE mstat.care_month_id = care_month.id AND mstat.created_at::date = '$v' AND mstat.is_cellular_zero IS FALSE) > 0 AND
+EXISTS (SELECT 1 FROM measurement mstat WHERE mstat.care_month_id = care_month.id AND mstat.created_at >= '$v 00:00:00' AND mstat.created_at <= '$v 23:59:59' AND mstat.is_cellular_zero IS FALSE) AND
   " . (count($conditions) > 0 ? implode(" AND ", $conditions) : '1') . "
 ";
         $statResult = DB::select($statQuery);
@@ -2692,7 +2692,7 @@ WHERE
         $stats['noMeasOn'] = 'N/A';
         $v = $request->input('nmo') ?: date('Y-m-d');
         $statQuery = "$commonStatSQL
-(SELECT COUNT(mstat.id) FROM measurement mstat WHERE mstat.care_month_id = care_month.id AND mstat.created_at::date = '$v' AND mstat.is_cellular_zero IS FALSE) = 0 AND
+NOT EXISTS (SELECT 1 FROM measurement mstat WHERE mstat.care_month_id = care_month.id AND mstat.created_at >= '$v 00:00:00' AND mstat.created_at <= '$v 23:59:59' AND mstat.is_cellular_zero IS FALSE) AND
   " . (count($conditions) > 0 ? implode(" AND ", $conditions) : '1') . "
 ";
         $statResult = DB::select($statQuery);

+ 5 - 0
public/css/style.css

@@ -619,6 +619,11 @@ body [note-rte][data-field-name="planValue"] .ql-editor[contenteditable] {
     margin-top: 0;
 }
 
+.mcp-theme-1 .rte-holder {
+    display: flex;
+    flex-direction: column;
+}
+
 .note-section:not(.edit) .if-not-edit {
     display: block !important;
 }

+ 5 - 0
resources/views/app/dashboard-admin.blade.php

@@ -969,6 +969,11 @@
                                     $('td.day[data-date="{{$milliseconds}}"]:visible').first().click();
                                 }
 
+                                // autoload appts for today (if current month)
+                                if($('td.ui-datepicker-today').length) {
+                                    $('td.ui-datepicker-today').first().click();
+                                }
+
                                 this.appointmentsLoaded = true;
                             }, 'json');
                         },

+ 0 - 6
resources/views/app/practice-management/care_month_add_ccm_entry_form.blade.php

@@ -74,12 +74,6 @@
         </div>
     </form>
 </div>
-<style>
-    #cm-entry-form{{@$entry ? '-' . $entry->uid : ''}} .rte-holder {
-        display: flex;
-        flex-direction: column;
-    }
-</style>
 <script>
     (function() {
         function init() {