|
@@ -3,8 +3,15 @@ using InABox.Core;
|
|
|
|
|
|
namespace Comal.Classes
|
|
|
{
|
|
|
- public class JobScopeLookups : EntityLookup<JobScope>, ILookupDefinition<JobScope, InvoiceLine>, ILookupDefinition<JobScope, Job>, ILookupDefinition<JobScope, StagingSetout>
|
|
|
- , ILookupDefinition<JobScope, Assignment>, ILookupDefinition<JobScope, Kanban>, ILookupDefinition<JobScope, RequisitionItem>, ILookupDefinition<JobScope, Requisition>
|
|
|
+ public class JobScopeLookups : EntityLookup<JobScope>,
|
|
|
+ ILookupDefinition<JobScope, InvoiceLine>,
|
|
|
+ ILookupDefinition<JobScope, Job>,
|
|
|
+ ILookupDefinition<JobScope, StagingSetout>,
|
|
|
+ ILookupDefinition<JobScope, Assignment>,
|
|
|
+ ILookupDefinition<JobScope, Kanban>,
|
|
|
+ ILookupDefinition<JobScope, RequisitionItem>,
|
|
|
+ ILookupDefinition<JobScope, JobForm>,
|
|
|
+ ILookupDefinition<JobScope, Requisition>
|
|
|
{
|
|
|
|
|
|
#region Invoice Lines
|
|
@@ -107,8 +114,8 @@ namespace Comal.Classes
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
- #region
|
|
|
-
|
|
|
+ #region Kanban
|
|
|
+
|
|
|
public Filter<JobScope> DefineFilter(Kanban[] items)
|
|
|
{
|
|
|
var item = items?.Length == 1 ? items[0] : null;
|
|
@@ -122,6 +129,21 @@ namespace Comal.Classes
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
+ #region JobForm
|
|
|
+
|
|
|
+ public Filter<JobScope> DefineFilter(JobForm[] items)
|
|
|
+ {
|
|
|
+ var item = items?.Length == 1 ? items[0] : null;
|
|
|
+ if (item != null)
|
|
|
+ return new Filter<JobScope>(x => x.Job.ID).IsEqualTo(item.Parent.ID).And(x => x.Status.Approved).IsEqualTo(true);
|
|
|
+ return new Filter<JobScope>(x => x.ID).None();
|
|
|
+ }
|
|
|
+
|
|
|
+ Columns<JobForm> ILookupDefinition<JobScope, JobForm>.DefineFilterColumns()
|
|
|
+ => new Columns<JobForm>(x => x.Parent.ID);
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
public override Columns<JobScope> DefineColumns()
|
|
|
{
|
|
|
return new Columns<JobScope>().Default();
|