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 ``` diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 40702487..a5c8c913 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,15 @@ public function edit(Request $request) ]); } + public function deleteAccount(Request $request) + { + return Inertia::render('Account/Delete', [ + 'openTicketsCount' => SupportTicket::where('user_id', $request->user()->id) + ->whereIn('status', [SupportTicket::STATUS_OPEN, SupportTicket::STATUS_IN_PROGRESS]) + ->count(), + ]); + } + 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..2f10f772 100644 --- a/resources/js/pages/Profile.vue +++ b/resources/js/pages/Profile.vue @@ -9,13 +9,14 @@ import { Sparkles, ArrowRight, AlertTriangle, - ChevronDown, LifeBuoy, Shield, Users, Lock, Zap, + Mail, GraduationCap, + Trash2, } from 'lucide-vue-next'; import { computed, ref } from 'vue'; import BaseModal from '@/components/BaseModal.vue'; @@ -33,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); @@ -128,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; @@ -945,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. - -
-
-
+
@@ -1065,11 +996,11 @@ const submitForm = () => {

- Account Deletion & Support. + Help & Support Center

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

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

+ Delete Account +

+

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

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

- Turn off essential announcements? -

-

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

-
-
- -
- - -
-
-
-
-
- (page.props as any).flash?.error); const currentStep = ref<1 | 2>(1); +const termsAccepted = ref(false); const getInitialAppreciations = (suggested: Contributor[] = []): number[] => { if (suggested.length === 0) { @@ -213,7 +214,7 @@ const goToStep2 = () => { }; const submit = () => { - if (isCompressing.value || form.errors.image) { + if (isCompressing.value || form.errors.image || !termsAccepted.value) { return; } @@ -693,6 +694,41 @@ const getContributorAvatar = (contributor: Contributor) => { {{ form.errors.appreciations }}

+ +
+ +
+
- - -
-

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

-
diff --git a/routes/web.php b/routes/web.php index cbf7bc9c..4981bced 100644 --- a/routes/web.php +++ b/routes/web.php @@ -30,6 +30,7 @@ Route::middleware(['throttle:60,1', 'auth'])->group(function () { Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit'); Route::put('/profile', [ProfileController::class, 'update'])->name('profile.update'); + Route::get('/account/delete', [ProfileController::class, 'deleteAccount'])->name('account.delete'); Route::post('/api/short-urls', [ShortUrlController::class, 'store'])->name('short-urls.store'); Route::post('/blogs/{blog}/react', [BlogController::class, 'toggleReaction'])->name('blogs.react'); Route::post('/blogs/{blog}/comments', [BlogController::class, 'storeComment'])->name('blogs.comments.store');