EmployeeFormModel.cs 681 B

12345678910111213141516171819202122
  1. using System;
  2. using System.Diagnostics.CodeAnalysis;
  3. using System.Linq;
  4. using Comal.Classes;
  5. using InABox.Core;
  6. using InABox.Mobile;
  7. namespace PRS.Mobile
  8. {
  9. public class EmployeeFormModel : DigitalFormInstanceModel<EmployeeFormModel,EmployeeFormShell,EmployeeForm>
  10. {
  11. public EmployeeFormModel(IModelHost host, Func<Filter<EmployeeForm>>? filter = null, Func<string>? cachefilename = null) : base(host, filter, cachefilename)
  12. {
  13. }
  14. public IDigitalFormInstanceShell[] Forms => Items.OfType<IDigitalFormInstanceShell>().ToArray();
  15. public int NeedsAttention => Items.Count(x =>
  16. x.Completed.IsEmpty()
  17. );
  18. }
  19. }