This commit is contained in:
2021-10-14 21:08:07 +01:00
parent 46b90cea74
commit 7417981a34
51 changed files with 1418 additions and 326 deletions
+11 -3
View File
@@ -18,7 +18,7 @@ namespace Saxonite.Net.Standard.Base.App
//-------------------------------------------------------------------
public static class Version
{
private static String version { get; } = "1.1.6.0";
private static String version { get; } = "1.1.6.1";
// Retrieve version.
public static String GetFullVersion () { return version; }
public static String GetAppVersion ()
@@ -40,8 +40,16 @@ namespace Saxonite.Net.Standard.Base.App
//-------------------------------------------------------------------
// Version history.
//-------------------------------------------------------------------
// 1.1.6 ?-Aug-2021 ?
// - ?
// 1.1.8 ?-Oct-2021 ?
// -
// 1.1.7 14-Oct-2021 Online Organisation Search
// - Online Profile Sport About & snags.
// - Online Organisation Search.
// - Admin Awaiting item counts on home page.
// 1.1.6 19-Sep-2021 Online profile.
// - Online burger menus - all menus with icons.
// - Online Profile - About.
// - Sport specific speciality label.
// 1.1.5 19-Aug-2021 Profile Sport Experience.
// - Online Profile Sport Experience.
// 1.1.4 9-Aug-2021 Organisation Articles.
@@ -88,6 +88,7 @@ namespace Saxonite.Net.Standard.Base.App
// System codes.
private readonly Dictionary<Sax.CodeType, List<TypeCodeDesc>> codeTypes = new Dictionary<Sax.CodeType, List<TypeCodeDesc>>();
public List<TypeCodeDesc> DataItemTypeCodes { get { return GetCodesOfType(Sax.CodeType.DataItemType); } }
public List<TypeCodeDesc> YesNoCodes { get { return GetCodesOfType(Sax.CodeType.YesNo); } }
public List<TypeCodeDesc> GenderCodes { get { return GetCodesOfType(Sax.CodeType.Gender); } }
public List<TypeCodeDesc> SportSpecialityLabelCodes { get { return GetCodesOfType(Sax.CodeType.SportSpecialityLabel); } }
public List<TypeCodeDesc> SportParticipationCodes { get { return GetCodesOfType(Sax.CodeType.SportParticipation); } }
@@ -3,6 +3,7 @@ using Sarand.Net.Standard.Base.Core;
using Saxonite.Net.Standard.Base.App;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Saxonite.Net.Standard.Base.Bus
@@ -282,6 +283,15 @@ namespace Saxonite.Net.Standard.Base.Bus
// Item list extension methods.
public static class SaxOrganisationList
{
//-------------------------------------------------------------------
/// <summary>
/// Extract the Organisation Ids.
/// </summary>
public static List<SysId>GetIds(this List<SaxOrganisation> values)
{
return values.Select(item => item.Id).ToList();
}
//-------------------------------------------------------------------
/// <summary>
/// Extract the first Organisation in list with the specified Id.
+15 -1
View File
@@ -28,6 +28,7 @@ namespace Saxonite.Net.Standard.Base.Bus
// Sport.
SportId,
Sport_Name,
About,
SportParticipation,
SportParticipation_Code,
SportParticipation_Desc,
@@ -51,6 +52,7 @@ namespace Saxonite.Net.Standard.Base.Bus
{
public SysId UserAccountId { get; set; }
public SysId SportId { get; set; }
public String About { get; set; } = String.Empty;
public Sax.SportParticipation Participation { get; set; }
public Sax.SportOfficiating Officiating { get; set; }
public String UserSportData { get; set; }
@@ -78,6 +80,11 @@ namespace Saxonite.Net.Standard.Base.Bus
get { return data.SportId; }
set { CheckChanged(data.SportId, value); data.SportId = value; }
}
public String About
{
get { return data.About; }
set { CheckChanged(data.About, value); data.About = value; }
}
public Sax.SportParticipation Participation
{
get { return data.Participation; }
@@ -98,6 +105,7 @@ namespace Saxonite.Net.Standard.Base.Bus
{
UserAccountId = data.UserAccountId;
SportId = data.SportId;
About = data.About;
Participation = data.Participation;
Officiating = data.Officiating;
UserSportData = data.UserSportData;
@@ -117,9 +125,10 @@ namespace Saxonite.Net.Standard.Base.Bus
{
// Identifies the field that has invalid data.
public ValidValue UserAccountId { get; set; } = ValidValue.Valid;
public ValidValue SportId { get; set; } = ValidValue.Valid;
public ValidValue About { get; set; } = ValidValue.Valid;
public ValidValue Participation { get; set; } = ValidValue.Valid;
public ValidValue Officiating { get; set; } = ValidValue.Valid;
public ValidValue SportId { get; set; } = ValidValue.Valid;
public ValidValue UserSportData { get; set; } = ValidValue.Valid;
}
@@ -187,6 +196,11 @@ namespace Saxonite.Net.Standard.Base.Bus
get { return data.SportId; }
protected set { data.SportId = value; }
}
public String About
{
get { return data.About; }
set { data.About = value; }
}
public Sax.SportParticipation Participation
{
get { return data.Participation; }
@@ -1,4 +1,5 @@
using Sarand.Net.Standard.Base.Core;
using Sarand.Net.Standard.Base.Bus;
using Sarand.Net.Standard.Base.Core;
using Saxonite.Net.Standard.Base.App;
using Saxonite.Net.Standard.Base.Bus;
using System;
@@ -25,6 +26,13 @@ namespace Saxonite.Net.Standard.Base.Consoles
//-------------------------------------------------------------------
// Utilities.
public abstract void PopulateCachedDataToInternals(SaxInternals internals);
/// <summary>
/// Encrypted Ids are stored in cache to ensure that they are consistent throughout a user's session
/// by persisting them through the life of the cache (application restart).
/// <para>Required as the encrypted values are compared in javascript.</para>
/// <para>Candidate encrypted value supplied by calling routine as cache doesn't know how to encrypt - used if Id not previously encrypted.</para>
/// </summary>
public abstract String GetEncryptedId(Sax.DataItemType itemType, SysId id, String candidateValue);
//-------------------------------------------------------------------
// Regions.
@@ -36,6 +44,13 @@ namespace Saxonite.Net.Standard.Base.Consoles
/// Get the cached list of active regions.
/// </summary>
public abstract List<SaxRegion.Data> GetActiveRegions();
/// <summary>
/// Persistent encrypted Region Ids.
/// </summary>
public String GetEncryptedRegionId(SysId regionId, String candidateValue)
{
return GetEncryptedId(Sax.DataItemType.Region, regionId, candidateValue);
}
//-------------------------------------------------------------------
// Sports.
@@ -47,6 +62,13 @@ namespace Saxonite.Net.Standard.Base.Consoles
/// Get the cached list of active sports.
/// </summary>
public abstract List<SaxSport.Data> GetActiveSports();
/// <summary>
/// Persistent encrypted Sport Ids.
/// </summary>
public String GetEncryptedSportId(SysId sportId, String candidateValue)
{
return GetEncryptedId(Sax.DataItemType.Sport, sportId, candidateValue);
}
//-------------------------------------------------------------------
}
@@ -91,6 +91,12 @@ namespace Saxonite.Net.Standard.Base.Mgr
errField.SportId = SacsHierarchyItem.ValidValue.Invalid;
return SetErrorState("User Sport must be specified");
}
// About.
if (errField.About != SacsHierarchyItem.ValidValue.Ignore && !IsValidValue(data.About, "about", (long)SaxDbDfn_Core.GetColTextLen(SaxDbDfn_Core.ColumnIdx.UserSport_About)))
{
errField.About = SacsHierarchyItem.ValidValue.Invalid;
return false;
}
//---------------------------------------------------------------
// Common properties.