浏览代码

Load data for sub: care month > care month entries

Vijayakrishnan Krishnan 5 年之前
父节点
当前提交
808a31d25d

+ 2 - 1
app/Http/Controllers/care_months_SINGLE_Controller.php

@@ -30,7 +30,8 @@ class care_months_SINGLE_Controller extends Controller
 	// GET /care_months/view/{uid}/SUB_time_entries
 	public function SUB_time_entries(Request $request, $uid) {
 		$record = DB::table('care_month')->where('uid', $uid)->first();
-		return view('pro/care_months_SINGLE/SUB_time_entries', compact('record'));
+		$subRecords = DB::table('care_month_entry')->where('care_month_id', $record->id)->get();
+		return view('pro/care_months_SINGLE/SUB_time_entries', compact('record', 'subRecords'));
 	}
 
 	// GET /care_months/view/{uid}/SUB_audit_log

+ 1 - 0
generatecv/tree.txt

@@ -226,6 +226,7 @@ PRO
         SUB
             dashboard
             time_entries
+                id=care_month_entry.care_month_id
             audit_log
     care_month_entries|care_month_entry|add|view|remove
     care_month_entries/add_new_for_cm:createForCm

+ 71 - 1
resources/views/pro/care_months_SINGLE/SUB_time_entries.blade.php

@@ -1,6 +1,76 @@
 @extends('pro.care_months.view')
 @section('content-inner')
 
-    <h4 class='py-3 border-bottom'>Time Entries</h4>Controller: <b>care_months_SINGLE</b><br>Action: <b>SUB_time_entries()</b><br>View: <b>pro/care_months_SINGLE/SUB_time_entries.blade.php</b><br>
+    <div class="mr-3 pb-3">
+
+        <h4 class='my-3 d-flex'>
+            <div>Time Entries</div>
+            <div class="ml-auto">
+                <!-- _ADD_NEW_LINK_ -->
+            </div>
+        </h4>
+
+        <div class="table-responsive p-0 bg-white border">
+            <table class="table table-hover text-nowrap">
+                <thead>
+                <tr>
+                    <th>Id</th>
+<th>Created At</th>
+<th>Type</th>
+<th>Uid</th>
+<th>Is Removed</th>
+<th>Removal Memo</th>
+<th>Removed At</th>
+<th>Achieved Ally Time In Seconds</th>
+<th>Achieved Mcp Time In Seconds</th>
+<th>Achieved Total Time In Seconds</th>
+<th>Cm Or Rm</th>
+<th>Content Detail</th>
+<th>Content Text</th>
+<th>Effective Date</th>
+<th>Ending Time</th>
+<th>Is Time Specific</th>
+<th>Starting Time</th>
+<th>Time In Seconds</th>
+<th>Created By Session Id</th>
+<th>Removed By Session Id</th>
+<th>Care Month Id</th>
+<th>Client Id</th>
+<th>Pro Id</th>
+                </tr>
+                </thead>
+                <tbody>
+                @foreach($subRecords as $subRecord)
+                    <tr>
+                        <td><?= $subRecord->id ?></td>
+<td><?= $subRecord->created_at ?></td>
+<td><?= $subRecord->type ?></td>
+<td><?= $subRecord->uid ?></td>
+<td><?= $subRecord->is_removed ?></td>
+<td><?= $subRecord->removal_memo ?></td>
+<td><?= $subRecord->removed_at ?></td>
+<td><?= $subRecord->achieved_ally_time_in_seconds ?></td>
+<td><?= $subRecord->achieved_mcp_time_in_seconds ?></td>
+<td><?= $subRecord->achieved_total_time_in_seconds ?></td>
+<td><?= $subRecord->cm_or_rm ?></td>
+<td><?= $subRecord->content_detail ?></td>
+<td><?= $subRecord->content_text ?></td>
+<td><?= $subRecord->effective_date ?></td>
+<td><?= $subRecord->ending_time ?></td>
+<td><?= $subRecord->is_time_specific ?></td>
+<td><?= $subRecord->starting_time ?></td>
+<td><?= $subRecord->time_in_seconds ?></td>
+<td><?= $subRecord->created_by_session_id ?></td>
+<td><?= $subRecord->removed_by_session_id ?></td>
+<td><?= $subRecord->care_month_id ?></td>
+<td><?= $subRecord->client_id ?></td>
+<td><?= $subRecord->pro_id ?></td>
+                    </tr>
+                @endforeach
+                </tbody>
+            </table>
+        </div>
+
+    </div>
 
 @endsection