Kaynağa Gözat

fixed care month entries

Josh Kamau 5 yıl önce
ebeveyn
işleme
0b74dfd4a5

+ 6 - 0
app/Http/Controllers/care_month_entries_SINGLE_Controller.php

@@ -22,6 +22,12 @@ class care_month_entries_SINGLE_Controller extends Controller
 		return response()->view('pro/care_month_entries_SINGLE/ACTION_updateTiming', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
 	}
 
+	// GET /care_month_entries/view/{uid}/ACTION_remove
+	public function ACTION_remove(Request $request, $uid) {
+		$record = DB::table('care_month_entry')->where('uid', $uid)->first();
+		return response()->view('pro/care_month_entries_SINGLE/ACTION_remove', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
+	}
+
 	// GET /care_month_entries/view/{uid}/SUB_dashboard
 	public function SUB_dashboard(Request $request, $uid) {
 		$record = DB::table('care_month_entry')->where('uid', $uid)->first();

+ 0 - 6
app/Http/Controllers/my_clients_SINGLE_Controller.php

@@ -370,12 +370,6 @@ class my_clients_SINGLE_Controller extends Controller
 		return response()->view('pro/my_clients_SINGLE/ACTION_setIsEnrolledInRmToTrue', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
 	}
 
-	// GET /my_clients/view/{uid}/ACTION_updateRmReasons
-	public function ACTION_updateRmReasons(Request $request, $uid) {
-		$record = DB::table('client')->where('uid', $uid)->first();
-		return response()->view('pro/my_clients_SINGLE/ACTION_updateRmReasons', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
-	}
-
 	// GET /my_clients/view/{uid}/ACTION_updateWhyNotEnrolledInRm
 	public function ACTION_updateWhyNotEnrolledInRm(Request $request, $uid) {
 		$record = DB::table('client')->where('uid', $uid)->first();

+ 7 - 3
generatecv/tree.txt

@@ -265,9 +265,6 @@ PRO
             setIsEnrolledInRmToTrue
                 rmReason1*=rm_reason1
                 rmReason2=rm_reason2
-            updateRmReasons
-                rmReason1*=rm_reason1
-                rmReason2=rm_reason2
             updateWhyNotEnrolledInRm
                 whyNotEnrolledInRmCategory=why_not_enrolled_in_rm_category
                 whyNotEnrolledInRmMemo=why_not_enrolled_in_rm_memo
@@ -720,8 +717,15 @@ PRO
                 isTimeSpecific:bool
                 startingTime:time
                 endingTime:time
+            remove
         SUB
             dashboard
+                !grp:Info:cm_or_rm,client_id ,pro_id
+                !grp:Time:effective_date,time_in_seconds ,is_time_specific,starting_time,ending_time:Update timing:circle=>/care_month_entries/view/$uid/ACTION_updateTiming    
+                !grp:Achieved time(s):achieved_cm_pro_time_in_seconds,achieved_mcp_time_in_seconds,achieved_rme_pro_time_in_seconds,achieved_rmm_pro_time_in_seconds,achieved_total_time_in_seconds
+                !grp:Content:content_detail,content_text:Update content:circle=>/care_month_entries/view/$uid/ACTION_updateContent
+                !grp:Removed:is_removed,removal_memo,removed_at:Remove:circle=>/care_month_entries/view/$uid/ACTION_remove
+                !nal:
     bills|bill|view|icon:file-invoice-dollar
     bills/view/{uid}
         ACTIONS

+ 2 - 1
resources/views/pro/care_month_entries/actions.blade.php

@@ -1,2 +1,3 @@
 <a up-modal=".form-contents" up-width="800" up-history="false" href='/care_month_entries/view/<?= $record->uid ?>/ACTION_updateContent' class='d-block btn btn-sm btn-default mb-3'>Update Content</a>
-<a up-modal=".form-contents" up-width="800" up-history="false" href='/care_month_entries/view/<?= $record->uid ?>/ACTION_updateTiming' class='d-block btn btn-sm btn-default mb-3'>Update Timing</a>
+<a up-modal=".form-contents" up-width="800" up-history="false" href='/care_month_entries/view/<?= $record->uid ?>/ACTION_updateTiming' class='d-block btn btn-sm btn-default mb-3'>Update Timing</a>
+<a up-modal=".form-contents" up-width="800" up-history="false" href='/care_month_entries/view/<?= $record->uid ?>/ACTION_remove' class='d-block btn btn-sm btn-default mb-3'>Remove</a>

+ 38 - 0
resources/views/pro/care_month_entries_SINGLE/ACTION_remove.blade.php

@@ -0,0 +1,38 @@
+@extends('pro.care_month_entries.view')
+@section('content-inner')
+
+    <div class="form-contents"><div class="failed-form-contents">
+
+    <h4 class="d-flex m-0 p-3 stag-heading stag-heading-modal">
+        <div>Remove</div>
+        <div class="ml-auto">
+            <a class="text-secondary" href="#" up-close>
+                <i class="fa fa-times"></i>
+            </a>
+        </div>
+    </h4>
+
+    <form action="/post-to-api"
+          up-target="#main-content" up-history="false" up-fail-target=".failed-form-contents" up-reveal="false"
+          method="post" enctype="multipart/form-data"
+          class="border-top px-3 pt-3 pb-1 custom-submit">
+        @csrf
+
+        @if (session('message'))
+            <div class="alert alert-danger">{{ session('message') }}</div>
+        @endif
+
+        <input type="hidden" name="_uid" value="{{ $record->uid }}">
+        <input type="hidden" name="_api" value="/api/careMonthEntry/remove">
+        <input type="hidden" name="_success" value="{{route('care_month_entries-view', ['uid' => $record->uid])}}">
+        <input type="hidden" name="_return" value="{{route('care_month_entries_SINGLE-ACTION_remove', ['uid' => $record->uid])}}">
+        
+        <div class="form-group mb-3 d-flex justify-content-center">
+            <button class="btn btn-sm btn-primary mr-3 px-5">Submit</button>
+            <a href="{{route('care_month_entries-view', ['uid' => $record->uid])}}" class="btn btn-sm btn-default px-5" up-close>Cancel</a>
+        </div>
+    </form>
+
+    </div></div>
+
+@endsection

+ 90 - 31
resources/views/pro/care_month_entries_SINGLE/SUB_dashboard.blade.php

@@ -2,38 +2,97 @@
 @section('content-inner')
 
     <div class="row mt-3">
-    <div class="col-8">
-
-        <div class="table-responsive p-0 bg-white table-sm stag-table border-top">
-            <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
-                <thead>
-                <tr>
-                    <th colspan="2" class="px-2">Record Details</th>
-                </tr>
-                </thead>
-                <tbody>
-                <?php foreach($record as $k => $v): ?>
-                    <?php
-                    if($k === 'id' || $k === 'uid') continue;
-                    $displayValue = $record->$k;
-                    if(substr($k, -3) === '_at') {
-                        $displayValue = friendly_date_time($record->$k);
-                    }
-                    ?>
-                    <tr>
-                        <td class="px-2 text-secondary border-right w-50">{{ ucwords(str_replace("_", " ", $k)) }}</td>
-                        <td class="px-2 font-weight-bold w-50">{{ $displayValue }}</td>
-                    </tr>
-                <?php endforeach; ?>
-                </tbody>
-            </table>
-        </div>
+    <div class="col-12">
+
+        <div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Info
+                <span class="ml-auto"><!-- __GROUP_ACTION__ --></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Cm Or Rm</td><td class="w-75 px-2 font-weight-bold"><?= $record->cm_or_rm ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Client Id </td><td class="w-75 px-2 font-weight-bold"><?= $record->client_id  ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Pro Id</td><td class="w-75 px-2 font-weight-bold"><?= $record->pro_id ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Time
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/care_month_entries/view/<?= $record->uid ?>/ACTION_updateTiming' title='Update timing'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Timing</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Effective Date</td><td class="w-75 px-2 font-weight-bold"><?= $record->effective_date ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Time In Seconds </td><td class="w-75 px-2 font-weight-bold"><?= $record->time_in_seconds  ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Is Time Specific</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_time_specific ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Starting Time</td><td class="w-75 px-2 font-weight-bold"><?= $record->starting_time ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Ending Time</td><td class="w-75 px-2 font-weight-bold"><?= $record->ending_time ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Achieved time(s)
+                <span class="ml-auto"><!-- __GROUP_ACTION__ --></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Achieved Cm Pro Time In Seconds</td><td class="w-75 px-2 font-weight-bold"><?= $record->achieved_cm_pro_time_in_seconds ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Achieved Mcp Time In Seconds</td><td class="w-75 px-2 font-weight-bold"><?= $record->achieved_mcp_time_in_seconds ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Achieved Rme Pro Time In Seconds</td><td class="w-75 px-2 font-weight-bold"><?= $record->achieved_rme_pro_time_in_seconds ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Achieved Rmm Pro Time In Seconds</td><td class="w-75 px-2 font-weight-bold"><?= $record->achieved_rmm_pro_time_in_seconds ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Achieved Total Time In Seconds</td><td class="w-75 px-2 font-weight-bold"><?= $record->achieved_total_time_in_seconds ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Content
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/care_month_entries/view/<?= $record->uid ?>/ACTION_updateContent' title='Update content'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Update Content</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Content Detail</td><td class="w-75 px-2 font-weight-bold"><?= $record->content_detail ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Content Text</td><td class="w-75 px-2 font-weight-bold"><?= $record->content_text ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
+<div class="table-responsive p-0 bg-white table-sm mb-3">
+    <table class="table table-hover text-nowrap table-striped border-left border-right border-bottom">
+        <thead>
+        <tr>
+            <th colspan="2" class="px-2">Removed
+                <span class="ml-auto"><a up-modal=".form-contents" up-width="800" up-history="false" href='/care_month_entries/view/<?= $record->uid ?>/ACTION_remove' title='Remove'class='mx-2 font-weight-normal text-primary text-xs'><i class='fa fa-circle'></i>&nbsp;<span>Remove</span></a></span>
+            </th>
+        </tr>
+        </thead>
+        <tbody>
+            <tr><td class="w-25 px-2 text-secondary border-right">Is Removed</td><td class="w-75 px-2 font-weight-bold"><?= $record->is_removed ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Removal Memo</td><td class="w-75 px-2 font-weight-bold"><?= $record->removal_memo ?></td></tr>
+<tr><td class="w-25 px-2 text-secondary border-right">Removed At</td><td class="w-75 px-2 font-weight-bold"><?= friendly_date_time($record->removed_at) ?></td></tr>
+        </tbody>
+    </table>
+</div>
+
 
-    </div>
-    <div class="col-4">
-        <div class="border-left h-100 pl-3">
-            @include('pro/care_month_entries/actions')
-        </div>
     </div>
 </div>
 

+ 0 - 1
resources/views/pro/my_clients/actions.blade.php

@@ -58,6 +58,5 @@
 <a up-modal=".form-contents" up-width="800" up-history="false" href='/my_clients/view/<?= $record->uid ?>/ACTION_updateRmEligibility' class='d-block btn btn-sm btn-default mb-3'>Update Rm Eligibility</a>
 <a up-modal=".form-contents" up-width="800" up-history="false" href='/my_clients/view/<?= $record->uid ?>/ACTION_setIsEnrolledInRmToFalse' class='d-block btn btn-sm btn-default mb-3'>Set Is Enrolled In Rm To False</a>
 <a up-modal=".form-contents" up-width="800" up-history="false" href='/my_clients/view/<?= $record->uid ?>/ACTION_setIsEnrolledInRmToTrue' class='d-block btn btn-sm btn-default mb-3'>Set Is Enrolled In Rm To True</a>
-<a up-modal=".form-contents" up-width="800" up-history="false" href='/my_clients/view/<?= $record->uid ?>/ACTION_updateRmReasons' class='d-block btn btn-sm btn-default mb-3'>Update Rm Reasons</a>
 <a up-modal=".form-contents" up-width="800" up-history="false" href='/my_clients/view/<?= $record->uid ?>/ACTION_updateWhyNotEnrolledInRm' class='d-block btn btn-sm btn-default mb-3'>Update Why Not Enrolled In Rm</a>
 <a up-modal=".form-contents" up-width="800" up-history="false" href='/my_clients/view/<?= $record->uid ?>/ACTION_updateEquipmentInfo' class='d-block btn btn-sm btn-default mb-3'>Update Equipment Info</a>

+ 1 - 1
routes/generated.php

@@ -76,7 +76,6 @@ Route::prefix('/my_clients/view/{uid}')->group(function () {
 	Route::get('ACTION_updateRmEligibility', 'my_clients_SINGLE_Controller@ACTION_updateRmEligibility')->name('my_clients_SINGLE-ACTION_updateRmEligibility');
 	Route::get('ACTION_setIsEnrolledInRmToFalse', 'my_clients_SINGLE_Controller@ACTION_setIsEnrolledInRmToFalse')->name('my_clients_SINGLE-ACTION_setIsEnrolledInRmToFalse');
 	Route::get('ACTION_setIsEnrolledInRmToTrue', 'my_clients_SINGLE_Controller@ACTION_setIsEnrolledInRmToTrue')->name('my_clients_SINGLE-ACTION_setIsEnrolledInRmToTrue');
-	Route::get('ACTION_updateRmReasons', 'my_clients_SINGLE_Controller@ACTION_updateRmReasons')->name('my_clients_SINGLE-ACTION_updateRmReasons');
 	Route::get('ACTION_updateWhyNotEnrolledInRm', 'my_clients_SINGLE_Controller@ACTION_updateWhyNotEnrolledInRm')->name('my_clients_SINGLE-ACTION_updateWhyNotEnrolledInRm');
 	Route::get('ACTION_updateEquipmentInfo', 'my_clients_SINGLE_Controller@ACTION_updateEquipmentInfo')->name('my_clients_SINGLE-ACTION_updateEquipmentInfo');
 	Route::get('SUB_dashboard', 'my_clients_SINGLE_Controller@SUB_dashboard')->name('my_clients_SINGLE-SUB_dashboard');
@@ -221,6 +220,7 @@ Route::prefix('/care_month_entries')->group(function () {
 Route::prefix('/care_month_entries/view/{uid}')->group(function () {
 	Route::get('ACTION_updateContent', 'care_month_entries_SINGLE_Controller@ACTION_updateContent')->name('care_month_entries_SINGLE-ACTION_updateContent');
 	Route::get('ACTION_updateTiming', 'care_month_entries_SINGLE_Controller@ACTION_updateTiming')->name('care_month_entries_SINGLE-ACTION_updateTiming');
+	Route::get('ACTION_remove', 'care_month_entries_SINGLE_Controller@ACTION_remove')->name('care_month_entries_SINGLE-ACTION_remove');
 	Route::get('SUB_dashboard', 'care_month_entries_SINGLE_Controller@SUB_dashboard')->name('care_month_entries_SINGLE-SUB_dashboard');
 });