From 0d0c08341f220fb65dd1fb1562197378398302b1 Mon Sep 17 00:00:00 2001 From: Tajim Date: Mon, 21 Sep 2026 14:48:22 +0600 Subject: [PATCH 1/5] feat(account): add account deletion request page and profile integration --- app/Http/Controllers/ProfileController.php | 14 + resources/js/pages/Account/Delete.vue | 470 +++++++++++++++++++++ resources/js/pages/Profile.vue | 42 +- routes/web.php | 1 + 4 files changed, 524 insertions(+), 3 deletions(-) create mode 100644 resources/js/pages/Account/Delete.vue diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 40702487..db194a5f 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -3,6 +3,7 @@ namespace App\Http\Controllers; use App\Http\Requests\Profile\UpdateProfileRequest; +use App\Models\SupportTicket; use Illuminate\Http\Request; use Illuminate\Support\Facades\Storage; use Inertia\Inertia; @@ -16,6 +17,19 @@ public function edit(Request $request) ]); } + public function deleteAccount(Request $request) + { + $user = $request->user(); + $openTicketsCount = SupportTicket::where('user_id', $user->id) + ->whereIn('status', [SupportTicket::STATUS_OPEN, SupportTicket::STATUS_IN_PROGRESS]) + ->count(); + + return Inertia::render('Account/Delete', [ + 'user' => $user->load('roles'), + 'openTicketsCount' => $openTicketsCount, + ]); + } + public function update(UpdateProfileRequest $request) { $user = $request->user(); diff --git a/resources/js/pages/Account/Delete.vue b/resources/js/pages/Account/Delete.vue new file mode 100644 index 00000000..978838fb --- /dev/null +++ b/resources/js/pages/Account/Delete.vue @@ -0,0 +1,470 @@ + + + diff --git a/resources/js/pages/Profile.vue b/resources/js/pages/Profile.vue index 79b0424a..528a569b 100644 --- a/resources/js/pages/Profile.vue +++ b/resources/js/pages/Profile.vue @@ -16,6 +16,7 @@ import { Lock, Zap, GraduationCap, + Trash2, } from 'lucide-vue-next'; import { computed, ref } from 'vue'; import BaseModal from '@/components/BaseModal.vue'; @@ -1065,11 +1066,11 @@ const submitForm = () => {

- Account Deletion & Support. + Help & Support Center

- অ্যাকাউন্ট ডিলেট করতে চান কিংবা অন্য কোনো সমস্যা? - সরাসরি সাপোর্টে কথা বলুন ! + কোনো সমস্যা, প্রশ্ন বা ফিডব্যাকের জন্য সরাসরি + সাপোর্ট টিকেট খুলুন।

@@ -1086,6 +1087,41 @@ const submitForm = () => { + +
+
+
+ +
+
+

+ Delete Account +

+

+ অ্যাকাউন্ট ও সংশ্লিষ্ট ডেটা স্থায়ীভাবে মুছে ফেলার + অনুরোধ করুন। +

+
+
+ + + + Delete Account + + +
+
- - -
-

- অ্যাকাউন্ট তৈরির মাধ্যমে আপনি আমাদের - - Terms of Service - - ও - - Privacy Policy -তে সম্মতি দিচ্ছেন। -

-
From 8c4935974bd640d3ef1cc38cfa2258cdb217992f Mon Sep 17 00:00:00 2001 From: Tajim Date: Mon, 21 Sep 2026 14:54:53 +0600 Subject: [PATCH 3/5] refactor(profile): simplify email notification preferences and remove dark patterns --- resources/js/pages/Profile.vue | 171 ++++----------------------------- 1 file changed, 19 insertions(+), 152 deletions(-) diff --git a/resources/js/pages/Profile.vue b/resources/js/pages/Profile.vue index 528a569b..2f10f772 100644 --- a/resources/js/pages/Profile.vue +++ b/resources/js/pages/Profile.vue @@ -9,12 +9,12 @@ import { Sparkles, ArrowRight, AlertTriangle, - ChevronDown, LifeBuoy, Shield, Users, Lock, Zap, + Mail, GraduationCap, Trash2, } from 'lucide-vue-next'; @@ -34,8 +34,6 @@ const isUnverified = computed(() => { return !user.value?.is_verified; }); -const showAdvancedSettings = ref(false); -const showConfirmModal = ref(false); const showCurriculumConfirmModal = ref(false); const pendingCurriculum = ref<'hsc' | 'ssc'>('hsc'); const isSwitchingCurriculum = ref(false); @@ -129,19 +127,6 @@ const handleRemoveAvatar = () => { } }; -const handleEmailToggle = () => { - if (form.receive_emails) { - showConfirmModal.value = true; - } else { - form.receive_emails = true; - } -}; - -const confirmDisable = () => { - form.receive_emails = false; - showConfirmModal.value = false; -}; - const handleSelectCurriculum = (target: 'hsc' | 'ssc') => { if (target === currentCurriculum.value) { return; @@ -946,110 +931,55 @@ const submitForm = () => { > - - - - -
- - +
+ - Essential study updates & announcements - - - Recommended + ইমেইল নোটিফিকেশন

- Receive notifications for syllabus changes, - study materials, and platform alerts. + গুরুত্বপূর্ণ আপডেট, নোটিশ ও পড়াশোনা + সংক্রান্ত প্রয়োজনীয় তথ্য ইমেইলে পেতে এই + অপশনটি অন রাখুন।

- - -
- -
- You may miss critical updates: - Disabling this will prevent you from receiving - vital academic alerts, syllabus updates, and new - study materials. - -
-
-
+
@@ -1139,69 +1069,6 @@ const submitForm = () => { - - - -
-
-
-
- -
-
-

- Turn off essential announcements? -

-

- You will stop receiving critical syllabus - announcements, new exam preparation - materials, and platform alerts. We strongly - recommend keeping this enabled. -

-
-
- -
- - -
-
-
-
-
- Date: Mon, 21 Sep 2026 14:58:34 +0600 Subject: [PATCH 4/5] refactor(profile): optimize deleteAccount action and remove redundant roles loading --- app/Http/Controllers/ProfileController.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index db194a5f..a5c8c913 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -19,14 +19,10 @@ public function edit(Request $request) public function deleteAccount(Request $request) { - $user = $request->user(); - $openTicketsCount = SupportTicket::where('user_id', $user->id) - ->whereIn('status', [SupportTicket::STATUS_OPEN, SupportTicket::STATUS_IN_PROGRESS]) - ->count(); - return Inertia::render('Account/Delete', [ - 'user' => $user->load('roles'), - 'openTicketsCount' => $openTicketsCount, + 'openTicketsCount' => SupportTicket::where('user_id', $request->user()->id) + ->whereIn('status', [SupportTicket::STATUS_OPEN, SupportTicket::STATUS_IN_PROGRESS]) + ->count(), ]); } From 89d8cb42993398d3b6f8e6fb992c0da2354f1eb5 Mon Sep 17 00:00:00 2001 From: Tajim Date: Mon, 21 Sep 2026 14:58:39 +0600 Subject: [PATCH 5/5] docs(rules): restrict automated lint and format runs to push/commit triggers --- GEMINI.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/GEMINI.md b/GEMINI.md index ff85e444..2e398da4 100644 --- a/GEMINI.md +++ b/GEMINI.md @@ -1,7 +1,10 @@ # Project Guidelines & Automated Checks ## Formatting and Linting -When asked to fix or check formatting/linting issues, or before committing changes, run the automated fix commands directly instead of manually inspecting and fixing errors one by one: +- **Strict Trigger**: Do NOT run formatting, linting, or fix commands (`npm run format`, `composer lint`, `npm run lint`) during intermediate edits or regular conversational turns. +- Only run the automated check commands when: + 1. The user explicitly instructs to `"push"` or `"commit"`. + 2. The user explicitly asks to check or fix formatting/linting issues. ```bash npm run format && composer lint && npm run lint @@ -16,7 +19,7 @@ npm run format && composer lint && npm run lint ``` 2. Switch to that branch. 3. Use atomic commits where applicable. - 4. Always run formatting and linting checks before committing: + 4. Run formatting and linting checks before committing: ```bash npm run format && composer lint && npm run lint ```