Skip to content

Commit

Permalink
Merge pull request #469 from nofrixion/feature/MOOV-3832-payrun-auth
Browse files Browse the repository at this point in the history
Added authorisation props
  • Loading branch information
donalnofrixion authored Nov 26, 2024
2 parents 6e16c43 + 14cee97 commit 4a40d45
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/NoFrixion.MoneyMoov/Models/Payruns/Payrun.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

using NoFrixion.MoneyMoov.Enums;
using NoFrixion.MoneyMoov.Extensions;
using NoFrixion.MoneyMoov.Models.Approve;

namespace NoFrixion.MoneyMoov.Models;

Expand Down Expand Up @@ -56,4 +57,30 @@ public class Payrun
public bool CanEdit => Status.CanEdit();

public bool CanDelete => Status.CanDelete();

/// <summary>
/// The number of authorisers required for this payrun. Is determined by business settings
/// on the source account and/or merchant.
/// </summary>
public int AuthorisersRequiredCount { get; set; }

/// <summary>
/// The number of distinct authorisers that have authorised the payrun.
/// </summary>
public int AuthorisersCompletedCount { get; set; }

/// <summary>
/// True if the payrun can be authorised by the user who loaded it.
/// </summary>
public bool CanAuthorise { get; set; }

/// <summary>
/// True if the payrun was loaded for a user and that user has already authorised the latest version of the payrun.
/// </summary>
public bool HasCurrentUserAuthorised { get; set; }

/// <summary>
/// A list of the users who have successfully authorised the latest version of the payrun and when.
/// </summary>
public List<Authorisation>? Authorisations { get; set; }
}

0 comments on commit 4a40d45

Please sign in to comment.