Browse Source

Merge branch 'master' of https://rav.triplestart.com/TigerPHP/stagfe

Flavionel 5 years ago
parent
commit
33ddd09dc2

+ 2 - 2
app/Console/Commands/GenerateTreeCommand.php

@@ -87,7 +87,7 @@ class GenerateTreeCommand extends Command
                         $parts = explode("=", $parts[1]);
                         $condition = [
                             "field" => $parts[0],
-                            "value" => str_replace("OWN", "Auth::user()->id" , $parts[1])
+                            "value" => str_replace("OWN", "session('proId')" , $parts[1])
                         ];
                     }
                 }
@@ -664,7 +664,7 @@ class GenController {
         $file = array_pop($parts);
         $dir = '';
         foreach($parts as $part) {
-            if($part[strlen($part) - 1] !== ':') {
+            if(strlen($part) === 0 || $part[strlen($part) - 1] !== ':') {
                 if(!is_dir($dir .= "/$part")) mkdir($dir);
             }
         }

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

@@ -30,7 +30,8 @@ class AppSessionController extends Controller
             return back()->with("message", $response['message']);
         }
 
-        $sessionKey = $response['data'];
+        $sessionKey = $response['data']["sessionKey"];
+        $request->session()->put("authID", $response['data']["proId"]);
 
         $cookie = cookie()->forever('sessionKey', $sessionKey, '/');
 

+ 1 - 1
app/Http/Controllers/my_payment_schedule_Controller.php

@@ -12,7 +12,7 @@ class my_payment_schedule_Controller extends Controller
 
 	// GET /my_payment_schedule
 	public function index(Request $request) {
-		$records = DB::table('pro_rate')->where('pro_id', Auth::user()->id)->get();
+		$records = DB::table('pro_rate')->where('pro_id', session('proId'))->get();
 		return view('pro/my_payment_schedule/index', compact('records'));
 	}
 }

+ 2 - 2
resources/views/pro/my_clients/index.blade.php

@@ -26,6 +26,7 @@
 <th>Cell Number Confirmed At</th>
 <th>Cm Reason1</th>
 <th>Cm Reason2</th>
+<th>Cm Target</th>
 <th>Date Of Birth</th>
 <th>Email Address</th>
 <th>Email Address Confirmation Token</th>
@@ -91,7 +92,6 @@
 <th>Mcp Em Visit Note Id</th>
 <th>Mcp Pro Id</th>
 <th>Team Id</th>
-<th>Cm Target</th>
             </tr>
             </thead>
             <tbody>
@@ -111,6 +111,7 @@
 <td><?= $record->cell_number_confirmed_at ?></td>
 <td><?= $record->cm_reason1 ?></td>
 <td><?= $record->cm_reason2 ?></td>
+<td><?= $record->cm_target ?></td>
 <td><?= $record->date_of_birth ?></td>
 <td><?= $record->email_address ?></td>
 <td><?= $record->email_address_confirmation_token ?></td>
@@ -176,7 +177,6 @@
 <td><?= $record->mcp_em_visit_note_id ?></td>
 <td><?= $record->mcp_pro_id ?></td>
 <td><?= $record->team_id ?></td>
-<td><?= $record->cm_target ?></td>
                 </tr>
             @endforeach
             </tbody>

+ 2 - 2
resources/views/pro/my_teams_SINGLE/SUB_clients.blade.php

@@ -28,6 +28,7 @@
 <th>Cell Number Confirmed At</th>
 <th>Cm Reason1</th>
 <th>Cm Reason2</th>
+<th>Cm Target</th>
 <th>Date Of Birth</th>
 <th>Email Address</th>
 <th>Email Address Confirmation Token</th>
@@ -93,7 +94,6 @@
 <th>Mcp Em Visit Note Id</th>
 <th>Mcp Pro Id</th>
 <th>Team Id</th>
-<th>Cm Target</th>
                 </tr>
                 </thead>
                 <tbody>
@@ -113,6 +113,7 @@
 <td><?= $subRecord->cell_number_confirmed_at ?></td>
 <td><?= $subRecord->cm_reason1 ?></td>
 <td><?= $subRecord->cm_reason2 ?></td>
+<td><?= $subRecord->cm_target ?></td>
 <td><?= $subRecord->date_of_birth ?></td>
 <td><?= $subRecord->email_address ?></td>
 <td><?= $subRecord->email_address_confirmation_token ?></td>
@@ -178,7 +179,6 @@
 <td><?= $subRecord->mcp_em_visit_note_id ?></td>
 <td><?= $subRecord->mcp_pro_id ?></td>
 <td><?= $subRecord->team_id ?></td>
-<td><?= $subRecord->cm_target ?></td>
                     </tr>
                 @endforeach
                 </tbody>