Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/LeToyek/satu
Browse files Browse the repository at this point in the history
  • Loading branch information
LeToyek committed Jun 11, 2023
2 parents 9b19b96 + df6534c commit 5c24cb8
Show file tree
Hide file tree
Showing 7 changed files with 158 additions and 116 deletions.
10 changes: 7 additions & 3 deletions app/Http/Controllers/ProfileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ class ProfileController extends Controller
/**
* Display a listing of the resource.
*/
public function __construct(){
public function __construct()
{

$this->middleware('auth');
}
Expand Down Expand Up @@ -76,7 +77,7 @@ public function update(Request $request, $id)
}
$user = User::find($id);
if ($request->hasFile('avatar')) {
if ($user->images!=null) {
if ($user->images != null) {
Storage::delete('storage/' . $user->images[0]->path);
$user->images[0]->delete();
}
Expand All @@ -86,7 +87,10 @@ public function update(Request $request, $id)
]);
}
$user->update($request->except('_token', '_method'));
return redirect()->route('profile.show',['profile' => $user])->with('success', 'Profile updated successfully');
if ($user->role === 'partner') {
$user->details->update($request->only(['partner_name', 'found_at', 'sector', 'monthly_income', 'partner_address']));
}
return redirect()->route('profile.show', ['profile' => $user])->with('success', 'Profile updated successfully');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion public/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ a:hover {

.section-gap-extra-bottom {
padding-top: 115px;
padding-bottom: 200px;
padding-bottom: 110px;
}

.primary-bg {
Expand Down
4 changes: 2 additions & 2 deletions resources/views/dashboard/pages/portofolio/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class="btn btn-outline-info">
<h5 class="card-title flex-grow-1 mb-0"><i class="mdi mdi-cash-fast text-muted"></i> Log Aktifitas</h5>
<div class="flex-shrink-0">
<a href="javascript:void(0);" class="badge badge-soft-primary fs-12">
{{ auth()->user()->role }}
{{ ucfirst(auth()->user()->role) }}
</a>
</div>
</div>
Expand All @@ -128,7 +128,7 @@ class="mdi {{ $transaction->from_wallet_id == auth()->user()->wallet->id ? 'mdi-
{{ number_format($transaction->amount, 0, ',', '.') }}
</span>
<span class="align-middle">({{ $transaction->type }})</span>
<p class="align-middle max-w-50 text-muted">{{ $transaction->description }}</p>
<p class="align-middle max-w-50 text-muted" style="word-wrap: break-word; white-space: normal;">{{ $transaction->description }}</p>
</span>
@empty
<span class="dropdown-item btn">
Expand Down
191 changes: 98 additions & 93 deletions resources/views/dashboard/pages/profile/edit.blade.php

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions resources/views/dashboard/pages/profile/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<div class="col">
<div class="p-2">
<h3 class="text-white mb-1">{{ $user->name }}</h3>
<p class="text-white-75">{{ $user->role }}</p>
<p class="text-white-75">{{ ucfirst($user->role) }}</p>
<div class="hstack text-white-50 gap-1">
<div class="me-2"><i
class="ri-map-pin-user-line me-1 text-white-75 fs-16 align-bottom"></i>{{ $user->address }}
Expand Down Expand Up @@ -95,24 +95,24 @@ class="ri-edit-box-line align-bottom"></i> Edit Profile</a>
<table class="table table-borderless mb-0">
<tbody>
<tr>
<th class="ps-0" scope="row">Full Name :</th>
<th class="ps-0" scope="row">Nama Lengkap :</th>
<td class="text-muted">{{ $user->name }}</td>
</tr>
<tr>
<th class="ps-0" scope="row">Mobile :</th>
<th class="ps-0" scope="row">Nomor HP :</th>
<td class="text-muted">{{ $user->no_hp }}</td>
</tr>
<tr>
<th class="ps-0" scope="row">E-mail :</th>
<th class="ps-0" scope="row">Email :</th>
<td class="text-muted">{{ $user->email }}</td>
</tr>
<tr>
<th class="ps-0" scope="row">Location :</th>
<th class="ps-0" scope="row">Alamat :</th>
<td class="text-muted">{{ $user->address }}</td>
</td>
</tr>
<tr>
<th class="ps-0" scope="row">Joining Date</th>
<th class="ps-0" scope="row">Tanggal Bergabung : </th>
<td class="text-muted">{{ $user->created_at }}</td>
</tr>
</tbody>
Expand Down
42 changes: 36 additions & 6 deletions resources/views/layouts/footer.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<style>
.address a {
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.address a:first-child {
margin-bottom: 5px;
}
</style>
</head>
<body>
<footer class="site-footer">
<div class="footer-content-area">
<div class="container">
Expand Down Expand Up @@ -30,26 +47,37 @@
<h4 class="widget-title">Hubungi Kami</h4>
<ul class="info-list">
<li>
<span class="icon" style="display: flex; align-items: center; justify-content: center;"><i class="far fa-phone"></i></span>
<span class="icon"
style="display: flex; align-items: center; justify-content: center;"><i
class="far fa-phone"></i></span>
<span class="info">
<span class="info-title">Nomor Telepon</span>
<a href="#">+6281679246178</a>
<a target="_blank" href="https://api.whatsapp.com/send?phone=6283848492366">+6283848492366</a>
</span>
</li>
<li>
<span class="icon" style="display: flex; align-items: center; justify-content: center;"><i class="far fa-envelope-open"></i></span>
<span class="icon"
style="display: flex; align-items: center; justify-content: center;"><i
class="far fa-envelope-open"></i></span>
<span class="info">
<span class="info-title">Alamat Email</span>
<a href="#">[email protected]</a>
<a target="_blank" href="mailto:[email protected]">[email protected]</a>
</span>
</li>
<li>
<span class="icon" style="display: flex; align-items: center; justify-content: center;"><i class="far fa-map-marker-alt"></i></span>
<span class="info">
<span class="info-title">Lokasi</span>
<a href="#">Malang, Jawa Timur, Indonesia</a>
<div class="address">
<a target="_blank"
href="https://www.google.com/maps/place/Politeknik+Negeri+Malang,+Jl.+Soekarno+Hatta+No.9,+Jatimulyo,+Kec.+Lowokwaru,+Kota+Malang,+Jawa+Timur+65141/@-7.9467136,112.6156684,17z/data=!4m6!3m5!1s0x2e78827687d272e7:0x789ce9a636cd3aa2!8m2!3d-7.9467136!4d112.6156684!16s%2Fg%2F1237vy8k">Jl. Soekarno Hatta No.9, Jatimulyo,</a>
<a target="_blank"
href="https://www.google.com/maps/place/Politeknik+Negeri+Malang,+Jl.+Soekarno+Hatta+No.9,+Jatimulyo,+Kec.+Lowokwaru,+Kota+Malang,+Jawa+Timur+65141/@-7.9467136,112.6156684,17z/data=!4m6!3m5!1s0x2e78827687d272e7:0x789ce9a636cd3aa2!8m2!3d-7.9467136!4d112.6156684!16s%2Fg%2F1237vy8k">Kec. Lowokwaru, Kota Malang,</a>
<a target="_blank"
href="https://www.google.com/maps/place/Politeknik+Negeri+Malang,+Jl.+Soekarno+Hatta+No.9,+Jatimulyo,+Kec.+Lowokwaru,+Kota+Malang,+Jawa+Timur+65141/@-7.9467136,112.6156684,17z/data=!4m6!3m5!1s0x2e78827687d272e7:0x789ce9a636cd3aa2!8m2!3d-7.9467136!4d112.6156684!16s%2Fg%2F1237vy8k">Jawa Timur 65141</a>
</div>
</span>
</li>
</li>
</ul>
</div>
</div>
Expand All @@ -73,3 +101,5 @@
</div>
</div>
</footer>
</body>
</html>
13 changes: 8 additions & 5 deletions resources/views/pages/contact-us.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@
<div class="info-content">
<h5>Lokasi</h5>
<p>
Malang, Jawa Timur, Indonesia
<a target="_blank"
href="https://www.google.com/maps/place/Politeknik+Negeri+Malang,+Jl.+Soekarno+Hatta+No.9,+Jatimulyo,+Kec.+Lowokwaru,+Kota+Malang,+Jawa+Timur+65141/@-7.9467136,112.6156684,17z/data=!4m6!3m5!1s0x2e78827687d272e7:0x789ce9a636cd3aa2!8m2!3d-7.9467136!4d112.6156684!16s%2Fg%2F1237vy8k" style="color: #696969;">Jl.
Soekarno Hatta No.9, Jatimulyo, Kec. Lowokwaru, Kota Malang, Jawa Timur
65141</a>
</p>
</div>
</div>
Expand All @@ -65,7 +68,7 @@
<div class="info-content">
<h5>Alamat Email</h5>
<p>
[email protected] <br>
<a target="_blank" href="mailto:[email protected]" style="color: #696969;">[email protected]</a>
</p>
</div>
</div>
Expand All @@ -78,7 +81,7 @@
<div class="info-content">
<h5>Nomor Telepon</h5>
<p>
+6281679246178 <br>
<a target="_blank" href="https://api.whatsapp.com/send?phone=6283848492366" style="color: #696969;">+6283848492366</a>
</p>
</div>
</div>
Expand All @@ -88,7 +91,7 @@
</div>
</div>
<!-- Contact Info End -->
<div class="contact-from-area">
{{-- <div class="contact-from-area">
<div class="row no-gutters">
<div class="col-lg-5">
<div class="contact-maps">
Expand Down Expand Up @@ -149,7 +152,7 @@ class="far fa-arrow-right"></i></button>
</div>
</div>
</div>
</div>
</div> --}}
</div>
</section>
<!--====== Contact Section End ======-->
Expand Down

0 comments on commit 5c24cb8

Please sign in to comment.