You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a job management system where a Job is the core object which has address fields (street, suburb, state, postcode, customer_id, region_id etc..). I have many other models like PurchaseOrder, WorkOrder, SalesOrder, Task, SalesInvoice etc.. which all have a belongsTo(Job::class) and my UI has a listing screen for all of the mentioned models and I have created a matching Query e.g. PurchaseOrderQuery, WorkOrderQuery etc. I need to search for PurchaseOrders or WorkOrders by job address.
For each of the queries I do a join to the jobs table and I'm looking for a way to add the job filters to each of these queries in a consistent manner. Can anyone recommend an approach.
Should i be namespacing my url filters e.g. rather than filters called 'street' and 'suburb' should i have 'job.street' and 'job.suburb' etc.. and then build a single custom filter for 'job'?
Or should i put all my job filters in a trait or similar and then include it in the other query classes?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a job management system where a Job is the core object which has address fields (street, suburb, state, postcode, customer_id, region_id etc..). I have many other models like PurchaseOrder, WorkOrder, SalesOrder, Task, SalesInvoice etc.. which all have a belongsTo(Job::class) and my UI has a listing screen for all of the mentioned models and I have created a matching Query e.g. PurchaseOrderQuery, WorkOrderQuery etc. I need to search for PurchaseOrders or WorkOrders by job address.
For each of the queries I do a join to the jobs table and I'm looking for a way to add the job filters to each of these queries in a consistent manner. Can anyone recommend an approach.
Should i be namespacing my url filters e.g. rather than filters called 'street' and 'suburb' should i have 'job.street' and 'job.suburb' etc.. and then build a single custom filter for 'job'?
Or should i put all my job filters in a trait or similar and then include it in the other query classes?
Beta Was this translation helpful? Give feedback.
All reactions