Ver código fonte

RM - launch and clean

Vijayakrishnan 3 anos atrás
pai
commit
6b6aca217f

+ 5 - 0
app/Http/Controllers/PracticeManagementController.php

@@ -1391,6 +1391,11 @@ ORDER BY claim.created_at ASC
         return  view('app.practice-management.process-claims', compact('claims', 'status'));
     }
 
+    public function rmLaunchAndClean(Request  $request) {
+        $keyNumbers = [];
+        return  view('app.practice-management.rm-launch-and-clean', compact('keyNumbers'));
+    }
+
     public function processNotes(Request  $request) {
 
         $mode = $request->input('mode') ? $request->input('mode') : '1';

+ 38 - 0
resources/views/app/practice-management/rm-launch-and-clean.blade.php

@@ -0,0 +1,38 @@
+@extends ('layouts/template')
+
+@section('content')
+    <div id="rm-launch-and-clean" class="p-3 mcp-theme-1">
+        <div class="d-flex align-items-end mb-3">
+            <div class="font-weight-bold font-size-14 text-secondary">
+                RM - Launch &amp; Clean
+            </div>
+        </div>
+        <button class="btn btn-sm btn-primary btn-launch px-3 font-weight-bold">Generate Claims</button>
+        <div class="my-3 text-secondary text-sm text-monospace launch-result" style="white-space: pre;">
+
+        </div>
+    </div>
+    <script>
+        (function() {
+            function init() {
+                $('.btn-launch')
+                    .off('click')
+                    .on('click', function () {
+                        $('.launch-result').text('Please wait...');
+                        $('.btn-launch').prop('disabled', true);
+                        $.get('/api/careMonth/rm-admin-launcher', _data => {
+                            if(!hasResponseError(_data)) {
+                                if(_data.data && _data.data.length) {
+                                    $('.launch-result').text(_data.data.join("\n"));
+                                }
+                            }
+                        }, 'json')
+                        .then(() => {
+                            $('.btn-launch').prop('disabled', false);
+                        });
+                    });
+            }
+            addMCInitializer('rm-launch-and-clean', init, '#rm-launch-and-clean');
+        }).call(window);
+    </script>
+@endsection

+ 1 - 0
routes/web.php

@@ -96,6 +96,7 @@ Route::middleware('pro.auth')->group(function () {
 
         Route::get('cellular-device-manager/{proUid?}', 'PracticeManagementController@cellularDeviceManager')->name('cellularDeviceManager');
 
+        Route::get('rm-launch-and-clean', 'PracticeManagementController@rmLaunchAndClean')->name('rm-launch-and-clean');
         Route::get('process-claims', 'PracticeManagementController@processClaims')->name('process-claims');
         Route::get('process-notes', 'PracticeManagementController@processNotes')->name('process-notes');
         Route::get('picked-notes', 'PracticeManagementController@pickedNotes')->name('picked-notes');