Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
update
  • Loading branch information
rjbabul committed Jun 28, 2022
1 parent 1bd1668 commit 243d18d
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 10 deletions.
7 changes: 4 additions & 3 deletions app/Http/Controllers/SuperAdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Illuminate\Http\Request;
use App\Models\admin;
use App\Models\complain;
use App\Models\map;
use App\Models\superadmin;
use App\Models\feedback;
Expand All @@ -13,7 +14,7 @@
use App\Models\customer_request;
use App\Models\driver;

use App\Models\complain;
use Illuminate\Support\Facades\Hash;

class SuperAdminController extends Controller
Expand Down Expand Up @@ -145,7 +146,8 @@ public function Super_driver_list(){

public function super_customer_complain(){
$data= ['loggedUser' =>superadmin::where('id', '=',session('loggedUser'))->first()];
$fdback = feedback::orderBy('id')->get();
$fdback = complain::orderBy('id')->get();

return view('superadmin.super_customer_complain',$data)->with('fdback', $fdback);
}

Expand All @@ -155,7 +157,6 @@ public function Super_admin_feedback(){
return view('superadmin.Super_admin_feedback',$data)->with('fdback', $fdback);
}


public function SuperAdmin_desboard(){
$data= ['loggedUser' =>admin::where('id', '=',session('loggedUser'))->first()];
$payment = monthPayment::where('id','=','1')->first();
Expand Down
28 changes: 28 additions & 0 deletions app/Http/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use App\Models\admin;
use App\Models\driver;
use Illuminate\Http\Request;
use App\Models\superadmin;


class UserController extends Controller
Expand Down Expand Up @@ -36,6 +37,33 @@ public function user_profile(Request $email)
return view('admin.user_profile',$data)->with('user',$dt);
}

public function super_user_profile(Request $email)
{



// $email = str_replace("_", ".", $email);

$count=0;
for ($x = 24; $x < strlen($email); $x++) {
if( substr($email, $x, 4)==".com"){
$count= $count+4;
break;
}
$count++;
}


$ds= substr($email,24,$count);

$dt =customer::where('email' , '=', $ds)->first();
// return $ds;
$data= ['loggedUser' =>superadmin::where('id', '=',session('loggedUser'))->first()];

//return view('admin.user_profile',$data)->with('email',$email);
return view('superadmin.SuperAdmin_userProfile',$data)->with('user',$dt);
}


public function user_profile_driver(Request $email)
{
Expand Down
3 changes: 3 additions & 0 deletions app/Http/Controllers/paymentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ public function payment(Request $request){
else if( $cards->balance< $request->amount){
return back()->with('fail','Insufficient Balance');
}
else if( $cards->balance<0){
return back()->with('fail','wrong input Balance');
}
else{

$cards->balance = $cards->balance - $request->amount;
Expand Down
6 changes: 6 additions & 0 deletions resources/views/admin/admintemplate.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@
<a href="\checkpayment" style="text-decoration: none; color: white; ; font-size: 16px;"> <i class="fa fa-star" style=" color:#ffffff;"></i> Check payment</a>
</div>
<hr>
<div align=" " >

<a href="\logout" style="text-decoration: none; color: white; ; font-size: 16px;"> <i class="fa fa-star" style=" color:#ffffff;"></i> LogOut</a>

</div>
<hr>


</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/customer/CustomerPageTemplate.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<!-- header -->
<header class="header">
<div class="header_content d-flex flex-row align-items-center justify-content-start">
<div class="logo"><a href="/">WMS</a></div>
<div class="logo"><a href="/">OGCS</a></div>
<div class="ml-auto d-flex flex-row align-items-center justify-content-start">
<nav class="main_nav">
<ul class="d-flex flex-row align-items-start justify-content-start">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/customer/CustomerPaymentTemplate.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<!-- header -->
<header class="header">
<div class="header_content d-flex flex-row align-items-center justify-content-start">
<div class="logo"><a href="/">WMS</a></div>
<div class="logo"><a href="/">OGCS</a></div>
<div class="ml-auto d-flex flex-row align-items-center justify-content-start">
<nav class="main_nav">
<ul class="d-flex flex-row align-items-start justify-content-start">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/driver/driver_tamplate.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<!-- header -->
<header class="header">
<div class="header_content d-flex flex-row align-items-center justify-content-start">
<div class="logo"><a href="/">WMS</a></div>
<div class="logo"><a href="/">OGCS</a></div>
<div class="ml-auto d-flex flex-row align-items-center justify-content-start">
<nav class="main_nav">
<ul class="d-flex flex-row align-items-start justify-content-start">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/superadmin/SuperAdmin_profile.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

@section('content')

<h1 style="color:#646f64;">Admin's Profile</h1>
<h1 style="color:#646f64;">SuperAdmin's Profile</h1>
<hr>
<div class="page-content page-container" style="witdh:1000px; font-weight: bold; margin-left: -50px; margin-top: -30px;">
<div class="padding">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

Type: {{$fdback->type}}
Complain: {{$fdback->complain}}
<a href=" {{route('user_profile',$fdback->email)}}" class="btn btn-success">Customer Profile </a>
<a href=" {{route('super_user_profile',$fdback->email)}}" class="btn btn-success">Customer Profile </a>

</pre>
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/usermanual/pagetemplate.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<!-- header -->
<header class="header">
<div class="header_content d-flex flex-row align-items-center justify-content-start">
<div class="logo"><a href="/">WMS</a></div>
<div class="logo"><a href="/">OGCS</a></div>
<div class="ml-auto d-flex flex-row align-items-center justify-content-start">
<nav class="main_nav">
<ul class="d-flex flex-row align-items-start justify-content-start">
Expand Down
2 changes: 1 addition & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@

Route::post('/superadmin_password_update','SuperAdminController@superadmin_password_update')->name('superadmin_password_update');


Route::get('/super_user_profile','UserController@super_user_profile')->name('super_user_profile');
/// --------------------X-------------


Expand Down

0 comments on commit 243d18d

Please sign in to comment.