[IP-221]: client detail view#577
Draft
nielsdrost7 wants to merge 1 commit into
Draft
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ff0253f to
a2724e6
Compare
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was missing
Clients had no detail/view page. The list was the only entry point, with only Edit and Delete actions.
Changes
ViewRelation page (
Pages/ViewRelation.php)Filament\Resources\Pages\ViewRecord'view' => ViewRelation::route('/{record}')in RelationResourceInfolist on RelationResource
9-field client summary in a 3-column grid:
company_name,trading_name,relation_number,relation_type(badge),relation_status(badge),registered_at,coc_number,vat_number,currency_codeFive RelationManagers (tabs)
InvoicesRelationManagerinvoices(customer_id)QuotesRelationManagerquotes(prospect_id)ExpensesRelationManagerexpenses(vendor_id)TasksRelationManagertasks(customer_id)ProjectsRelationManagerprojects(customer_id)All relationships were already defined on the
Relationmodel — no model changes needed.RelationsTable
ViewActionrow button (navigates to the view page)Action::make('create_invoice')andAction::make('create_quote')row actions pointing to the create pages with?customer_id=pre-fillcreate-invoices; Create Quote for all types withcreate-quotes([Clients]: Client list — implement row action options #29, [Clients]: Create a quote for a specific client from the client list #191, [Clients]: Create an invoice for a specific client from the client list #192)Relation::hasLinkedRecords()shared by the table,ViewRelation, and the service guard; the check also covers payments.Restored dependency
createpages and pre-fills the client from?customer_id=(invoice form fieldcustomer_id, quote form fieldprospect_id— mapped correctly). Restores the work of PR feat(#191,#192): create invoice/quote pre-filled from client detail #541.Closes
Closes #221 — Client detail — tabs for invoices, quotes, expenses and files
Closes #217 — Create a quote when viewing a specific client
Closes #218 — Create an invoice when viewing a specific client
Closes #191 — Create a quote for a specific client from the client list
Closes #192 — Create an invoice for a specific client from the client list
Closes #219 — Edit a client from the client detail view
Closes #220 — Hide delete button when client has invoices
Closes #29 — Client list — implement row action options
Follow-up issues
None — no stubs or unimplemented markers in this diff.
Test plan
RelationListRowActionsTest(5 tests) — action visibility, delete guard, both prefillsViewRelationTest— viewing a relation, tabs render, header actions work