From b0eda5e38908283264a9722ee855f4081fa8f26e Mon Sep 17 00:00:00 2001 From: Bayu Lukman Yusuf Date: Mon, 19 Jan 2026 14:38:16 +0700 Subject: [PATCH] profile --- .../Controllers/Auth/ProfileController.php | 108 +++- app/Models/User.php | 8 +- lang/en/account_info.php | 39 ++ lang/en/account_sidebar.php | 17 + lang/en/locale.php | 6 + lang/id/account_info.php | 39 ++ lang/id/account_sidebar.php | 17 + lang/id/locale.php | 6 + public/img/photo-placeholder.png | Bin 0 -> 5301 bytes resources/views/account/info.blade.php | 227 ++++++--- .../language-selector-sidebar.blade.php | 4 +- .../components/language-selector.blade.php | 4 +- .../partials/account-sidebar.blade.php | 38 +- .../views/layouts/partials/navbar.blade.php | 477 ++++++++++++------ routes/web.php | 3 +- 15 files changed, 751 insertions(+), 242 deletions(-) create mode 100644 lang/en/account_info.php create mode 100644 lang/en/account_sidebar.php create mode 100644 lang/en/locale.php create mode 100644 lang/id/account_info.php create mode 100644 lang/id/account_sidebar.php create mode 100644 lang/id/locale.php create mode 100644 public/img/photo-placeholder.png diff --git a/app/Http/Controllers/Auth/ProfileController.php b/app/Http/Controllers/Auth/ProfileController.php index eaf7f4b..ca38cfa 100644 --- a/app/Http/Controllers/Auth/ProfileController.php +++ b/app/Http/Controllers/Auth/ProfileController.php @@ -2,16 +2,122 @@ namespace App\Http\Controllers\Auth; +use App\Helpers\AutoNumbering; use App\Http\Controllers\Controller; +use App\Models\Customer; +use Exception; use Illuminate\Http\Request; +use Illuminate\Support\Facades\Hash; +use Illuminate\Support\Facades\Log; +use Illuminate\Support\Facades\Storage; +use Intervention\Image\Drivers\Imagick\Driver; +use Intervention\Image\ImageManager; class ProfileController extends Controller { public function index(Request $request) { - if (!auth()->check()) { + if (! auth()->check()) { return redirect()->route('login'); } + return view('account.info'); } + + public function update(Request $request) + { + try { + + $request->validate([ + 'name' => 'required|string|max:255', + 'birth_date' => 'nullable|date', + 'email' => 'required|email|max:255', + 'phone' => 'required|string|max:255', + 'photo' => 'required|image|mimes:jpg,jpeg,png,webp|max:2048', + ]); + + $user = auth()->user(); + $user->name = $request->name; + $user->email = $request->email; + $user->phone = $request->phone; + + // Handle avatar upload + if ($request->hasFile('photo')) { + $ext = $request->file('photo')->extension(); + $filename = $request->file('photo')->storeAs("profile", $user->id.".".$ext, "public"); + $user->photo = $filename; + } + + $user->save(); + + $customer = $user->customer; + if ($user->customer == null) { + $customer = new Customer; + + $autoNumbering = new AutoNumbering([ + 'type' => 'CUST', + 'prefix' => 'CAPP', + 'location_id' => 0, + 'pad' => 9, + ]); + do { + $number = $autoNumbering->getCurrent(); + $count = Customer::where('number', $number)->count(); + } while ($count > 0); + + $customer->number = $number; + $customer->user_id = $user->id; + + } + + if ($request->name){ + $customer->name = $request->name; + } + + if ($request->email) { + $customer->email = $request->email; + } + + if ($request->phone) { + $customer->phone = $request->phone; + } + + if ($request->birth_date != null) { + $customer->date_of_birth = $request->birth_date; + } + + $customer->save(); + + return back()->with('success', 'Profile updated successfully!'); + } catch (Exception $e) { + Log::error($e); + return back()->with('error', $e->getMessage()); + } + } + + + public function updatePassword(Request $request) + { + try { + + $request->validate([ + 'current_password' => 'required|string', + 'password' => 'required|string|min:8|confirmed', + ]); + + $user = auth()->user(); + + // Verify current password + if (!Hash::check($request->current_password, $user->password)) { + return back()->with('error', 'Current password is incorrect.'); + } + + $user->password = bcrypt($request->password); + $user->save(); + + return back()->with('success', 'Password updated successfully!'); + } catch (Exception $e) { + return back()->with('error', $e->getMessage()); + } + } } diff --git a/app/Models/User.php b/app/Models/User.php index 22dca43..952651f 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -25,7 +25,7 @@ class User extends Authenticatable 'photo', 'fcm_token', 'phone', - 'phone_verified_at' + 'phone_verified_at', ]; /** @@ -50,4 +50,10 @@ class User extends Authenticatable 'password' => 'hashed', ]; } + + + public function customer() + { + return $this->hasOne(Customer::class); + } } diff --git a/lang/en/account_info.php b/lang/en/account_info.php new file mode 100644 index 0000000..73e8dca --- /dev/null +++ b/lang/en/account_info.php @@ -0,0 +1,39 @@ + 'Account - Personal Info', + 'personal_info' => 'Personal info', + 'basic_info' => 'Basic info', + 'edit' => 'Edit', + 'name' => 'Name', + 'date_of_birth' => 'Date of birth', + 'choose_date' => 'Choose date', + 'please_enter_first_name' => 'Please enter your first name!', + 'save_changes' => 'Save changes', + 'close' => 'Close', + 'contact' => 'Contact', + 'email_address' => 'Email address', + 'please_enter_valid_email' => 'Please enter a valid email address!', + 'phone_number' => 'Phone number', + 'please_enter_phone_number' => 'Please enter your phone number!', + 'password' => 'Password', + 'current_password' => 'Current password', + 'enter_current_password' => 'Enter your current password', + 'new_password' => 'New password', + 'create_new_password' => 'Create new password', + 'delete_account' => 'Delete account', + 'delete_account_description' => 'When you delete your account, your public profile will be deactivated immediately. If you change your mind before the 14 days are up, sign in with your email and password, and we\'ll send you a link to reactivate your account.', + 'not_set' => 'Not Set', + 'verified' => 'Verified', + 'date_format' => 'j F Y', + 'language' => 'Language', + 'select_language' => 'Select language', + 'english' => 'English', + 'french' => 'Français', + 'german' => 'Deutsch', + 'italian' => 'Italiano', + 'confirm_password' => 'Confirm password', + 'confirm_new_password' => 'Confirm new password', + 'profile_photo' => 'Profile Photo', + 'photo_requirements' => 'Recommended: Square image, at least 200x200px', +]; \ No newline at end of file diff --git a/lang/en/account_sidebar.php b/lang/en/account_sidebar.php new file mode 100644 index 0000000..89d0082 --- /dev/null +++ b/lang/en/account_sidebar.php @@ -0,0 +1,17 @@ + 'Points', + 'orders' => 'Orders', + 'wishlist' => 'Wishlist', + 'payment_methods' => 'Payment methods', + 'my_reviews' => 'My reviews', + 'manage_account' => 'Manage account', + 'personal_info' => 'Personal info', + 'addresses' => 'Addresses', + 'notifications' => 'Notifications', + 'customer_service' => 'Customer service', + 'help_center' => 'Help center', + 'terms_and_conditions' => 'Terms and conditions', + 'log_out' => 'Log out', +]; \ No newline at end of file diff --git a/lang/en/locale.php b/lang/en/locale.php new file mode 100644 index 0000000..227aac5 --- /dev/null +++ b/lang/en/locale.php @@ -0,0 +1,6 @@ + 'English', + 'id' => 'Indonesia', +]; \ No newline at end of file diff --git a/lang/id/account_info.php b/lang/id/account_info.php new file mode 100644 index 0000000..007050c --- /dev/null +++ b/lang/id/account_info.php @@ -0,0 +1,39 @@ + 'Akun - Info Pribadi', + 'personal_info' => 'Info Pribadi', + 'basic_info' => 'Info Dasar', + 'edit' => 'Edit', + 'name' => 'Nama', + 'date_of_birth' => 'Tanggal Lahir', + 'choose_date' => 'Pilih Tanggal', + 'please_enter_first_name' => 'Silakan masukkan nama depan Anda!', + 'save_changes' => 'Simpan Perubahan', + 'close' => 'Tutup', + 'contact' => 'Kontak', + 'email_address' => 'Alamat Email', + 'please_enter_valid_email' => 'Silakan masukkan alamat email yang valid!', + 'phone_number' => 'Nomor Telepon', + 'please_enter_phone_number' => 'Silakan masukkan nomor telepon Anda!', + 'password' => 'Kata Sandi', + 'current_password' => 'Kata Sandi Saat Ini', + 'enter_current_password' => 'Masukkan kata sandi saat ini', + 'new_password' => 'Kata Sandi Baru', + 'create_new_password' => 'Buat kata sandi baru', + 'delete_account' => 'Hapus Akun', + 'delete_account_description' => 'Ketika Anda menghapus akun, profil publik Anda akan dinonaktifkan segera. Jika Anda berubah pikiran sebelum 14 hari berakhir, masuk dengan email dan kata sandi Anda, dan kami akan mengirimkan tautan untuk mengaktifkan kembali akun Anda.', + 'not_set' => 'Belum Diatur', + 'verified' => 'Terverifikasi', + 'date_format' => 'j F Y', + 'language' => 'Bahasa', + 'select_language' => 'Pilih Bahasa', + 'english' => 'Inggris', + 'french' => 'Prancis', + 'german' => 'Jerman', + 'italian' => 'Italia', + 'confirm_password' => 'Konfirmasi Kata Sandi', + 'confirm_new_password' => 'Konfirmasi Kata Sandi Baru', + 'profile_photo' => 'Foto Profil', + 'photo_requirements' => 'Direkomendasikan: Gambar persegi, minimal 200x200px', +]; \ No newline at end of file diff --git a/lang/id/account_sidebar.php b/lang/id/account_sidebar.php new file mode 100644 index 0000000..b9e0ded --- /dev/null +++ b/lang/id/account_sidebar.php @@ -0,0 +1,17 @@ + 'Poin', + 'orders' => 'Pesanan', + 'wishlist' => 'Daftar Keinginan', + 'payment_methods' => 'Metode Pembayaran', + 'my_reviews' => 'Ulasan Saya', + 'manage_account' => 'Kelola Akun', + 'personal_info' => 'Info Pribadi', + 'addresses' => 'Alamat', + 'notifications' => 'Notifikasi', + 'customer_service' => 'Layanan Pelanggan', + 'help_center' => 'Pusat Bantuan', + 'terms_and_conditions' => 'Syarat dan Ketentuan', + 'log_out' => 'Keluar', +]; diff --git a/lang/id/locale.php b/lang/id/locale.php new file mode 100644 index 0000000..227aac5 --- /dev/null +++ b/lang/id/locale.php @@ -0,0 +1,6 @@ + 'English', + 'id' => 'Indonesia', +]; \ No newline at end of file diff --git a/public/img/photo-placeholder.png b/public/img/photo-placeholder.png new file mode 100644 index 0000000000000000000000000000000000000000..2344659ae9f31ccd804c960cc9ca3237c02b8be3 GIT binary patch literal 5301 zcmW+)cRUpCAAj!7xywA6CEfY9M6%M!x-&{Dt7K(HTt;Npi951FQ7SE*6)8^k9)+SZ zvR8yS^T;~f`04k@^L(Dq=ktC&pU?BhXFU&0jScvD_VWM$_zlnNUj_iOdxQWa_b##Z z&2`-+dwkAY`vGv`;=cvS)_VT#AH?snfi5U$KQOz?aJlIi=>YICftTq72SDV4p}vm! z9mwJ+{gy~C`pb%Uc_Kdix>)$Am@f-`zgZ@4Z#IF}O4~c*d>$dyPYD(M8B&8Y^@B=tOc_K7kN^;mC?6E{@r zRBDO@GS)WBZeBZI*^j+;je3s4hp9_kcUKZE$rW~eNafecxW`6$>g)VX9c{R5%B0p57^^Ccwt4bg^4jn7bs zGgh*{9+QZMC}yt_NR4GCqtXZGcnS)^O?9q@2;va)k+f^8ZR5)17pg?df1t%Dl5|p@ zS(bj`l%~~D` z%BY&n5tNh!vv--^KUW!qlPTIY13egm3mB;ixX63w`9rwoK;M9qP9~Hbh;}AeW+uGu z;V=0hJz~a@v}Ag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L3d=k@eFZisW8(>?7NFcw_0wxfUkePB@Zt}*DctGx)X}%BaMz*%&pajHN_sz zFia-q&dNk{`I3?8>uOQw|K8vF&RI`(2({k1&6as6Nap(--eNU6G*rcC7I*ltA4v}7 z((wuyb>1rO(5}8dpab}HP(A1RWtizmvJx`9ZEk-gP7I=$ehTT|LUE4S=gd5g0#~-# zJ9LfR#%U(LJKF4ajz6`k_{^9YqgxvIUNAwY2G}*io$r{6$&YUp^t#)*&)sEO3jsLe zcQm@a3Y*?1)G5ly(RIlAp}-9>rIg6g6fMV_^LFaokJ01~EXL`9I~j^TCTSI7S5tJp zBqGkz_d!q~rLpPBMrwv&G(dijYz&vI4;*=;^M$o>Xw$05b-wCL$5OCwKu4<9yhw-@ z7rwPesshWod>^VKKE|AjIyb-MQFoy+IS$0ct4GXqq$yNp{zl9erhE1B!@c_J=6FIz zLyYSEA`%24rb0I4sZWlLS|Z%&tVYV0@Mjm{`MUiBESy&LBi9i6uUflUtxzs}^E>A| z8w=LgevdyY@!CwEDwS)(b|)qVcHnL%Y?%b^I8<{iu<}bE2C#NPKeNBSr*pE@X>l%8 SZui|^Mqqf>SieBmG5miZx&8?N literal 0 HcmV?d00001 diff --git a/resources/views/account/info.blade.php b/resources/views/account/info.blade.php index f87b29e..a39f976 100644 --- a/resources/views/account/info.blade.php +++ b/resources/views/account/info.blade.php @@ -1,76 +1,128 @@ -@extends('layouts.account', ['title' => 'Account - Personal Info']) +@extends('layouts.account', ['title' => __('account_info.page_title')]) @section('content')
-

Personal info

+

{{ __('account_info.personal_info') }}

-
+
  • {{ auth()->user()->name }}
  • {{ auth()->user()->email }}
  • {{--
  • English
  • --}}
-
-
+ +
+ + @csrf + + @if(session('error')) + + @endif + +
+ +
+
+
+ @if(auth()->user()->photo) + {{ auth()->user()->name }} + @else + {{ auth()->user()->name }} + @endif +
+ + +
+
+

{{ __('account_info.photo_requirements') }}

+

JPG, PNG or GIF (Max 2MB)

+
+
+
+
- +
- -
Please enter your first name!
+
{{ __('account_info.please_enter_first_name') }}
- + +
+ +
{{ __('account_info.please_enter_valid_email') }}
+
+
+ +
+ +
+ +
{{ __('account_info.please_enter_phone_number') }}
+
+
+ +
+
user()->birth_date)) : '' }}" - }' - id="birthdate" placeholder="Choose date" type="text" /> + "dateFormat": "Y-m-d", + "defaultDate": "{{ auth()->user()->customer->date_of_birth != null ? date('Y-m-d', strtotime(auth()->user()->customer->date_of_birth)) : '' }}" + }' + placeholder="{{ __('account_info.choose_date') }}" type="text" />
{{--
- + -
Please enter a valid email address!
-
-
-
- -
- -
Please enter your phone number!
-
-
+
- + + type="button">{{ __('account_info.close') }}
-
+
--}} -
+ {{--
-
+
  • **************
-
-
+
+ + @csrf + @method('PUT') + + @if(session('error')) + + @endif + + @if(session('success')) + + @endif +
- +
- +
- +
- + +
+
+
+ +
+
- + + type="button">{{ __('account_info.close') }}
-
+
--}} -
-

Delete account

-

When you delete your account, your public profile will be deactivated - immediately. If you change your mind before the 14 days are up, sign in with your email and - password, and we'll send you a link to reactivate your account.

- Delete account -
+ {{--
+

{{ __('account_info.delete_account') }}

+

{{ __('account_info.delete_account_description') }}

+ {{ __('account_info.delete_account') }} +
--}}
@endsection @section('scripts') + @endsection diff --git a/resources/views/components/language-selector-sidebar.blade.php b/resources/views/components/language-selector-sidebar.blade.php index 1b05458..dd20a09 100644 --- a/resources/views/components/language-selector-sidebar.blade.php +++ b/resources/views/components/language-selector-sidebar.blade.php @@ -1,8 +1,8 @@ @@ -513,22 +525,26 @@
@@ -687,7 +706,8 @@
  • Ceiling & + href="{{ route('second', ['shop', 'catalog-electronics']) }}">Ceiling + & In-Wall Speakers
  • @@ -712,11 +732,13 @@
  • Sound Bars + href="{{ route('second', ['shop', 'catalog-electronics']) }}">Sound + Bars
  • Surround Sound + href="{{ route('second', ['shop', 'catalog-electronics']) }}">Surround + Sound Systems
  • @@ -724,7 +746,8 @@
    @@ -801,13 +829,15 @@
    @@ -969,7 +1007,8 @@
    By type + href="{{ route('second', ['shop', 'catalog-electronics']) }}">By + type
    @@ -1118,12 +1163,14 @@ - + --}} @@ -2219,3 +2373,26 @@ + diff --git a/routes/web.php b/routes/web.php index 3c915f4..c32a1e8 100644 --- a/routes/web.php +++ b/routes/web.php @@ -69,4 +69,5 @@ Route::group(['prefix' => '/login/google'], function () { }); Route::get('/profile', [ProfileController::class, 'index'])->name('profile'); - +Route::post('/profile', [ProfileController::class, 'update'])->name('profile.update'); +Route::put('/profile/password', [ProfileController::class, 'updatePassword'])->name('profile.password.update');