-
Notifications
You must be signed in to change notification settings - Fork 0
Erweiterung E-Mails #582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Erweiterung E-Mails #582
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,63 @@ | ||||||
| <?php | ||||||
|
|
||||||
| namespace App\Console\Commands; | ||||||
|
|
||||||
| use App\Models\DropboxMail; | ||||||
| use App\Models\Tenant; | ||||||
| use Illuminate\Console\Command; | ||||||
|
|
||||||
| class SetInboundForDropboxMails extends Command | ||||||
| { | ||||||
| /** | ||||||
| * The name and signature of the console command. | ||||||
| * | ||||||
| * @var string | ||||||
| */ | ||||||
| protected $signature = 'dropbox:inbound {--tenant= : Optional tenant ID to process only one tenant}'; | ||||||
|
|
||||||
| /** | ||||||
| * The console command description. | ||||||
| * | ||||||
| * @var string | ||||||
| */ | ||||||
| protected $description = 'Create recurring invoices that are due today'; | ||||||
|
|
||||||
| /** | ||||||
| * Execute the console command. | ||||||
| */ | ||||||
| public function handle() | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win Rückgabetyp für Die Methode ♻️ Vorgeschlagene Korrektur- public function handle()
+ public function handle(): int📝 Committable suggestion
Suggested change
🤖 Prompt for AI AgentsSource: Coding guidelines |
||||||
| { | ||||||
| $tenantId = $this->option('tenant'); | ||||||
|
|
||||||
| if ($tenantId) { | ||||||
| $tenant = Tenant::find($tenantId); | ||||||
| if (! $tenant) { | ||||||
| $this->error("Tenant {$tenantId} not found"); | ||||||
|
|
||||||
| return 1; | ||||||
| } | ||||||
| $this->processTenant($tenant); | ||||||
| } else { | ||||||
| $tenants = Tenant::all(); | ||||||
| $this->info('Processing '.count($tenants).' tenants...'); | ||||||
|
|
||||||
| foreach ($tenants as $tenant) { | ||||||
| $this->processTenant($tenant); | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
| return 0; | ||||||
| } | ||||||
|
|
||||||
| private function processTenant(Tenant $tenant): void | ||||||
| { | ||||||
| $tenant->run(function () { | ||||||
| $mails = DropboxMail::query()->with('dropbox')->get(); | ||||||
|
|
||||||
| foreach ($mails as $mail) { | ||||||
| $mail->is_inbound = $mail->dropbox->real_email !== $mail->from; | ||||||
| $mail->save(); | ||||||
| } | ||||||
| }); | ||||||
| } | ||||||
| } | ||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -123,7 +123,14 @@ const EmailIndex: React.FC<InboxIndexProps> = ({ contacts, dropbox, mail, mails, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| width="full" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| className="relative m-0 mx-0 h-full p-0 px-0" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <div className="absolute top-0 bottom-0 w-96 border-r"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <div className="absolute top-0 bottom-0 w-68 border-r"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Posteingang | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <br /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Gesendete Objekte | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <br /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Archiv | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+126
to
+132
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win Seitenleiste ohne semantische Struktur und Interaktivität. Die Kategorien sind als reiner Text mit ♻️ Vorschlag: semantische Navigation mit Buttons- <div className="absolute top-0 bottom-0 w-68 border-r">
- Posteingang
- <br />
- Gesendete Objekte
- <br />
- Archiv
- </div>
+ <nav className="absolute top-0 bottom-0 w-68 border-r">
+ <ul className="flex flex-col gap-1 p-4">
+ <li>
+ <button
+ type="button"
+ className="w-full rounded-md px-3 py-2 text-left text-sm font-medium hover:bg-accent"
+ >
+ Posteingang
+ </button>
+ </li>
+ <li>
+ <button
+ type="button"
+ className="w-full rounded-md px-3 py-2 text-left text-sm font-medium hover:bg-accent"
+ >
+ Gesendete Objekte
+ </button>
+ </li>
+ <li>
+ <button
+ type="button"
+ className="w-full rounded-md px-3 py-2 text-left text-sm font-medium hover:bg-accent"
+ >
+ Archiv
+ </button>
+ </li>
+ </ul>
+ </nav>📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <div className="absolute top-0 bottom-0 left-68 w-96 border-r"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <div className="h-full overflow-y-auto"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <div className="flex flex-col gap-2 p-4"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {mails.data.map(item => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -137,7 +144,7 @@ const EmailIndex: React.FC<InboxIndexProps> = ({ contacts, dropbox, mail, mails, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <div className="absolute top-0 right-0 bottom-0 left-96 flex"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <div className="absolute top-0 right-0 bottom-0 left-164 flex"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <div className="mx-auto h-full overflow-y-auto"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {mail && <Email mail={mail} contacts={contacts} projects={projects} />} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Falsche Command-Beschreibung.
Die Beschreibung lautet "Create recurring invoices that are due today", aber der Befehl klassifiziert Dropbox-Mails als eingehend. Dies ist ein Copy-Paste-Fehler.
🐛 Vorgeschlagene Korrektur
📝 Committable suggestion
🤖 Prompt for AI Agents