Эх сурвалжийг харах

RPM manager - code cleanup

Vijayakrishnan 2 жил өмнө
parent
commit
13b89978ee

+ 103 - 181
resources/views/app/practice-management/rpm-manager/index.blade.php

@@ -137,186 +137,126 @@
                         </div>
                     @endif
                 </div>
-                <div class="d-flex align-items-stretch m-0 h-100">
-                    <table class="table table-sm table-bordered table-striped table-hover p-0 m-0 min-width-1100px border-0" id="table-rm-matrix">
-                        <thead class="bg-light">
-                        <tr>
-                            <th class="border-top-0 border-bottom-0 border-left-0"></th>
-                            <th class="border-top-0 border-bottom-0"></th>
-                            <th class="border-top-0 border-bottom-0"></th>
-                            @if($viewingAs === 'ADMIN')
-                                <th class="border-top-0 border-bottom-0 rmgr-name-column"></th>
-                                <th class="border-top-0 border-bottom-0 rmgr-name-column"></th>
-                                <th class="border-top-0 border-bottom-0 rmgr-name-column"></th>
+                <table class="table table-sm table-bordered table-striped table-hover p-0 m-0 min-width-1100px border-0" id="table-rm-matrix">
+                    <thead class="bg-light">
+                    <tr>
+                        <th class="border-top-0 border-bottom-0 border-left-0"></th>
+                        <th class="border-top-0 border-bottom-0"></th>
+                        <th class="border-top-0 border-bottom-0"></th>
+                        @if($viewingAs === 'ADMIN')
+                            <th class="border-top-0 border-bottom-0 rmgr-name-column"></th>
+                            <th class="border-top-0 border-bottom-0 rmgr-name-column"></th>
+                            <th class="border-top-0 border-bottom-0 rmgr-name-column"></th>
+                        @endif
+                        <th class="border-top-0 border-bottom-0"></th>
+                        <th class="border-top-0 border-bottom-0 bg-aliceblue text-nowrap" colspan="3"># Meas. Days</th>
+                        <th class="border-top-0 border-bottom-0 text-nowrap" colspan="2">
+                            @if($specificDate)
+                                Values: <span class="text-info">{{$specificDate}}</span>
+                            @else
+                                Latest Value
                             @endif
-                            <th class="border-top-0 border-bottom-0"></th>
-                            <th class="border-top-0 border-bottom-0 bg-aliceblue text-nowrap" colspan="3"># Meas. Days</th>
-                            <th class="border-top-0 border-bottom-0 text-nowrap" colspan="2">
+                        </th>
+                        @if($viewingAs !== 'RME')
+                            <th class="border-top-0 border-bottom-0 bg-aliceblue text-nowrap" colspan="2">
                                 @if($specificDate)
-                                    Values: <span class="text-info">{{$specificDate}}</span>
+                                    Entries: <span class="text-info">{{$specificDate}}</span>
                                 @else
-                                    Latest Value
+                                    Latest Entry
                                 @endif
                             </th>
-                            @if($viewingAs !== 'RME')
-                                <th class="border-top-0 border-bottom-0 bg-aliceblue text-nowrap" colspan="2">
-                                    @if($specificDate)
-                                        Entries: <span class="text-info">{{$specificDate}}</span>
-                                    @else
-                                        Latest Entry
-                                    @endif
-                                </th>
-                            @endif
-                            <th class="border-top-0 border-bottom-0"></th>
-                            @if($viewingAs !== 'RME')
-                                <th class="border-top-0 border-bottom-0 bg-aliceblue" colspan="{{$viewingAs === 'ADMIN' ? 3 : 1}}">Time</th>
-                            @endif
-                            <th class="border-top-0 border-bottom-0 bg-aliceblue" colspan="{{$viewingAs === 'ADMIN' ? 3 : 1}}">Reimb.</th>
-                            @if($viewingAs === 'ADMIN' && !(date('m') == $month && date('Y') == $year))
-                                <th class="border-top-0 border-bottom-0 bg-aliceblue" colspan="3">Claim</th>
-                            @endif
-                            <th class="border-top-0 border-bottom-0"></th>
-                            <th class="border-top-0 border-bottom-0 border-right-0 w-25"></th>
-                        </tr>
-                        <tr>
-                            <th class="border-bottom-0 border-top border-left-0 text-right">#</th>
-                            <th class="border-bottom-0 border-top">Name</th>
-                            <th class="border-bottom-0 border-top">Age</th>
+                        @endif
+                        <th class="border-top-0 border-bottom-0"></th>
+                        @if($viewingAs !== 'RME')
+                            <th class="border-top-0 border-bottom-0 bg-aliceblue" colspan="{{$viewingAs === 'ADMIN' ? 3 : 1}}">Time</th>
+                        @endif
+                        <th class="border-top-0 border-bottom-0 bg-aliceblue" colspan="{{$viewingAs === 'ADMIN' ? 3 : 1}}">Reimb.</th>
+                        @if($viewingAs === 'ADMIN' && !(date('m') == $month && date('Y') == $year))
+                            <th class="border-top-0 border-bottom-0 bg-aliceblue" colspan="3">Claim</th>
+                        @endif
+                        <th class="border-top-0 border-bottom-0"></th>
+                        <th class="border-top-0 border-bottom-0 border-right-0 w-25"></th>
+                    </tr>
+                    <tr>
+                        <th class="border-bottom-0 border-top border-left-0 text-right">#</th>
+                        <th class="border-bottom-0 border-top">Name</th>
+                        <th class="border-bottom-0 border-top">Age</th>
+                        @if($viewingAs === 'ADMIN')
+                            <th class="border-bottom-0 border-top">MCP</th>
+                            <th class="border-bottom-0 border-top">RMM</th>
+                            <th class="border-bottom-0 border-top">RME</th>
+                        @endif
+                        <th class="border-bottom-0 border-top">DSLV</th>
+
+                        <!--# Meas. Days-->
+                        <th class="border-bottom-0 border-top">All</th>
+                        <th class="border-bottom-0 border-top">BP</th>
+                        <th class="border-bottom-0 border-top">WT</th>
+
+                        <th class="border-bottom-0 border-top">BP</th>
+                        <th class="border-bottom-0 border-top">WT</th>
+
+                        @if($viewingAs !== 'RME')
+                            <th class="border-bottom-0 border-top">Mine</th>
+                            <th class="border-bottom-0 border-top">Others</th>
+                        @endif
+
+                        <th class="border-bottom-0 border-top">
                             @if($viewingAs === 'ADMIN')
-                                <th class="border-bottom-0 border-top">MCP</th>
-                                <th class="border-bottom-0 border-top">RMM</th>
-                                <th class="border-bottom-0 border-top">RME</th>
-                            @endif
-                            <th class="border-bottom-0 border-top">DSLV</th>
-
-                            <!--# Meas. Days-->
-                            <th class="border-bottom-0 border-top">All</th>
-                            <th class="border-bottom-0 border-top">BP</th>
-                            <th class="border-bottom-0 border-top">WT</th>
-
-                            <th class="border-bottom-0 border-top">BP</th>
-                            <th class="border-bottom-0 border-top">WT</th>
-
-                            @if($viewingAs !== 'RME')
-                                <th class="border-bottom-0 border-top">Mine</th>
-                                <th class="border-bottom-0 border-top">Others</th>
-                            @endif
-
-                            <th class="border-bottom-0 border-top">
-                                @if($viewingAs === 'ADMIN')
-                                    Inter.
-                                @else
-                                    MCPI
-                                @endif
-                            </th>
-
-                            <!--Time-->
-                            @if($viewingAs !== 'RME')
-                                @if($viewingAs === 'ADMIN' || $viewingAs === 'MCP')
-                                    <th class="border-bottom-0 border-top">MCP</th>
-                                @endif
-                                @if($viewingAs === 'ADMIN' || $viewingAs === 'RMM')
-                                    <th class="border-bottom-0 border-top">RMM</th>
-                                @endif
-                                @if($viewingAs === 'ADMIN')
-                                    <th class="border-bottom-0 border-top">Total</th>
-                                @endif
+                                Inter.
+                            @else
+                                MCPI
                             @endif
+                        </th>
 
-                            <!--Reimb.-->
+                        <!--Time-->
+                        @if($viewingAs !== 'RME')
                             @if($viewingAs === 'ADMIN' || $viewingAs === 'MCP')
                                 <th class="border-bottom-0 border-top">MCP</th>
                             @endif
                             @if($viewingAs === 'ADMIN' || $viewingAs === 'RMM')
                                 <th class="border-bottom-0 border-top">RMM</th>
                             @endif
-                            @if($viewingAs === 'ADMIN' || $viewingAs === 'RME')
-                                <th class="border-bottom-0 border-top">RME</th>
-                            @endif
-
-                            <!--Claim-->
-                            @if($viewingAs === 'ADMIN' && !(date('m') == $month && date('Y') == $year))
-                                <th class="border-bottom-0 border-top">4</th>
-                                <th class="border-bottom-0 border-top">7</th>
-                                <th class="border-bottom-0 border-top">8</th>
+                            @if($viewingAs === 'ADMIN')
+                                <th class="border-bottom-0 border-top">Total</th>
                             @endif
-
-                            <th class="border-bottom-0 border-top">NV</th>
-                            <th class="border-bottom-0 border-top border-right-0"></th>
-                        </tr>
-                        </thead>
-                        <tbody>
+                        @endif
+
+                        <!--Reimb.-->
+                        @if($viewingAs === 'ADMIN' || $viewingAs === 'MCP')
+                            <th class="border-bottom-0 border-top">MCP</th>
+                        @endif
+                        @if($viewingAs === 'ADMIN' || $viewingAs === 'RMM')
+                            <th class="border-bottom-0 border-top">RMM</th>
+                        @endif
+                        @if($viewingAs === 'ADMIN' || $viewingAs === 'RME')
+                            <th class="border-bottom-0 border-top">RME</th>
+                        @endif
+
+                        <!--Claim-->
+                        @if($viewingAs === 'ADMIN' && !(date('m') == $month && date('Y') == $year))
+                            <th class="border-bottom-0 border-top">4</th>
+                            <th class="border-bottom-0 border-top">7</th>
+                            <th class="border-bottom-0 border-top">8</th>
+                        @endif
+
+                        <th class="border-bottom-0 border-top">NV</th>
+                        <th class="border-bottom-0 border-top border-right-0"></th>
+                    </tr>
+                    </thead>
+                    <tbody>
+                    <?php
+                    $daysRemaining = date('t') - date('j');
+                    $index = $paginator->firstItem();
+                    ?>
+                    @foreach ($patients as $iPatient)
+                        @include('app.practice-management.rpm-manager.row', compact('iPatient', 'index', 'month', 'year', 'viewingAs', 'daysRemaining', 'specificDate'))
                         <?php
-                        $daysRemaining = date('t') - date('j');
-                        $index = $paginator->firstItem();
+                        $index++;
                         ?>
-                        @foreach ($patients as $iPatient)
-                            @include('app.practice-management.rpm-manager.row', compact('iPatient', 'index', 'month', 'year', 'viewingAs', 'daysRemaining', 'specificDate'))
-                            <?php
-                            $index++;
-                            ?>
-                        @endforeach
-                        </tbody>
-                    </table>
-                </div>
-            </div>
-        </div>
-        <div class="stag-popup tall draggable resizable mcp-theme-1"
-             update-parent
-             stag-popup-key="rpm-manager-my-entries-popup">
-            <div class="stag-popup-content p-0">
-                <h3 class="stag-popup-title mb-0 mt-3 mx-3 pb-0 border-bottom-0">
-                    <span id="rpm-manager-my-entries-popup-title">xxx</span>
-                    <a href="#" class="ml-auto text-secondary" onclick="return closeStagPopup()">
-                        <i class="fa fa-times-circle"></i>
-                    </a>
-                </h3>
-                <div class="stag-popup-content-inner">
-                    <div class="popup-content-container px-3">
-                        <h3 class="m-0 font-size-16" id="rpm-manager-my-entries-caremonth"></h3>
-                        <table class="table table-condensed table-sm table-bordered mt-3 cm-tab" id="rpm-manager-my-entries-matrix">
-                            <thead>
-                            <tr>
-                                <th class="text-secondary text-sm">Date</th>
-                                <th class="text-secondary text-sm">Minutes</th>
-                                <th class="text-secondary text-sm">Communicated</th>
-                                <th class="text-secondary text-sm">Comments</th>
-                                <th class="text-secondary text-sm"></th>
-                            </tr>
-                            </thead>
-                            <tbody></tbody>
-                        </table>
-                    </div>
-                </div>
-            </div>
-        </div>
-        <div class="stag-popup tall draggable resizable mcp-theme-1"
-             update-parent
-             stag-popup-key="rpm-manager-other-entries-popup">
-            <div class="stag-popup-content p-0">
-                <h3 class="stag-popup-title mb-0 mt-3 mx-3 pb-0 border-bottom-0">
-                    <span id="rpm-manager-other-entries-popup-title">xxx</span>
-                    <a href="#" class="ml-auto text-secondary" onclick="return closeStagPopup()">
-                        <i class="fa fa-times-circle"></i>
-                    </a>
-                </h3>
-                <div class="stag-popup-content-inner">
-                    <div class="popup-content-container px-3">
-                        <h3 class="m-0 font-size-16" id="rpm-manager-other-entries-caremonth"></h3>
-                        <table class="table table-condensed table-sm table-bordered mt-3 cm-tab" id="rpm-manager-other-entries-matrix">
-                            <thead>
-                            <tr>
-                                <th class="text-secondary text-sm">Pro</th>
-                                <th class="text-secondary text-sm">Date</th>
-                                <th class="text-secondary text-sm">Minutes</th>
-                                <th class="text-secondary text-sm">Communicated</th>
-                                <th class="text-secondary text-sm">Comments</th>
-                            </tr>
-                            </thead>
-                            <tbody></tbody>
-                        </table>
-                    </div>
-                </div>
+                    @endforeach
+                    </tbody>
+                </table>
             </div>
         </div>
     </div>
@@ -478,24 +418,6 @@
                         );
                         return false;
                     });
-
-                parent
-                    .off('click', '.btn-my-entries-popup')
-                    .on('click', '.btn-my-entries-popup', function() {
-                        showStagPopup('rpm-manager-my-entries-popup');
-                        prepareEntriesPopup($(this).attr('data-uid'), 'my');
-                        reInitMoes();
-                        return false;
-                    });
-
-                parent
-                    .off('click', '.btn-other-entries-popup')
-                    .on('click', '.btn-other-entries-popup', function() {
-                        showStagPopup('rpm-manager-other-entries-popup');
-                        prepareEntriesPopup($(this).attr('data-uid'), 'other');
-                        reInitMoes();
-                        return false;
-                    });
             }
 
             function prepareMeasurementsPopover(_careMonthUid, _type) {

+ 1 - 1
resources/views/app/practice-management/rpm-manager/row.blade.php

@@ -1,5 +1,5 @@
 <tr data-client-uid="{{$iPatient->client_uid}}" data-care-month-uid="{{$iPatient->care_month_uid}}">
-    <td class="text-right">
+    <td class="text-right border-left-0">
         @if(@$updateModel)
             <?php
             if(!!$iPatient->entries_json) {