v1.1.6.0
This commit is contained in:
@@ -248,7 +248,7 @@ namespace Saxonite.Net.Core.Web.Base.App
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Region.
|
||||
public String GetRegionName(SaxRegion region)
|
||||
public String GetRegionName(SaxRegion.Data region)
|
||||
{
|
||||
if (region == null) return "";
|
||||
// ToDo Region name localisation.
|
||||
@@ -262,7 +262,7 @@ namespace Saxonite.Net.Core.Web.Base.App
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Sport.
|
||||
public String GetSportName(SaxSport sport)
|
||||
public String GetSportName(SaxSport.Data sport)
|
||||
{
|
||||
if (sport == null) return "";
|
||||
// ToDo Sport name localisation.
|
||||
|
||||
@@ -68,20 +68,30 @@ namespace Saxonite.Net.Core.Web.Base.Consoles
|
||||
public List<SaxRegion.Data> activeRegionDataList = null;
|
||||
}
|
||||
private readonly RegionsData regionsData = new RegionsData();
|
||||
public override List<SaxRegion> GetActiveRegions()
|
||||
public override List<SaxRegion.Data> GetAllRegions()
|
||||
{
|
||||
String fn = GetType().Name + ".ActiveRegions";
|
||||
if (!RegionsSupported) throw new NotSupportedException(fn + " Regions not supported.");
|
||||
List<SaxRegion> activeRegions = new List<SaxRegion>();
|
||||
List<SaxRegion.Data> activeRegionDataList = new List<SaxRegion.Data>();
|
||||
List<SaxRegion.Data> activeRegions = new List<SaxRegion.Data>();
|
||||
if (regionsData.regionDataMap == null) ForceRefresh();
|
||||
lock (regionsData)
|
||||
{
|
||||
if (regionsData.regionDataMap == null) throw new NotSupportedException(fn + " Regions not populated.");
|
||||
activeRegionDataList.AddRange(regionsData.activeRegionDataList);
|
||||
activeRegions.AddRange(regionsData.regionDataMap.Values);
|
||||
}
|
||||
return activeRegions;
|
||||
}
|
||||
public override List<SaxRegion.Data> GetActiveRegions()
|
||||
{
|
||||
String fn = GetType().Name + ".ActiveRegions";
|
||||
if (!RegionsSupported) throw new NotSupportedException(fn + " Regions not supported.");
|
||||
List<SaxRegion.Data> activeRegions = new List<SaxRegion.Data>();
|
||||
if (regionsData.regionDataMap == null) ForceRefresh();
|
||||
lock (regionsData)
|
||||
{
|
||||
if (regionsData.regionDataMap == null) throw new NotSupportedException(fn + " Regions not populated.");
|
||||
activeRegions.AddRange(regionsData.activeRegionDataList);
|
||||
}
|
||||
foreach (SaxRegion.Data regionData in activeRegionDataList)
|
||||
activeRegions.Add(GetRegion(regionData));
|
||||
return activeRegions;
|
||||
}
|
||||
protected void RefreshRegions()
|
||||
@@ -120,7 +130,7 @@ namespace Saxonite.Net.Core.Web.Base.Consoles
|
||||
regionsData.regionDataMap = newRegionDataMap;
|
||||
regionsData.activeRegionDataList = newActiveRegionDataList;
|
||||
}
|
||||
SaLogger.Info(fn + " END. Regions found: " + regionsData.regionDataMap.Count + ". Elapsed: " + DateUtil.FormatNumberOfSeconds((DateTime.Now - startedAt).TotalSeconds), true);
|
||||
SaLogger.Info(fn + " END. Regions found: " + regionsData.regionDataMap.Count + ". Elapsed: " + DateUtil.FormatNumberOfSeconds((DateTime.Now - startedAt).TotalSeconds));
|
||||
}
|
||||
private static bool IsRegionActive(Dictionary<SysId, SaxRegion.Data> regionDataMap, SaxRegion.Data regionData)
|
||||
{
|
||||
@@ -147,20 +157,30 @@ namespace Saxonite.Net.Core.Web.Base.Consoles
|
||||
public List<SaxSport.Data> activeSportDataList = null;
|
||||
}
|
||||
private readonly SportsData sportsData = new SportsData();
|
||||
public override List<SaxSport> GetActiveSports()
|
||||
public override List<SaxSport.Data> GetAllSports()
|
||||
{
|
||||
String fn = GetType().Name + ".ActiveSports";
|
||||
String fn = GetType().Name + ".GetAllSports";
|
||||
if (!SportsSupported) throw new NotSupportedException(fn + " Sports not supported.");
|
||||
List<SaxSport> activeSports = new List<SaxSport>();
|
||||
List<SaxSport.Data> activeSportDataList = new List<SaxSport.Data>();
|
||||
List<SaxSport.Data> sports = new List<SaxSport.Data>();
|
||||
if (sportsData.sportDataMap == null) ForceRefresh();
|
||||
lock (sportsData)
|
||||
{
|
||||
if (sportsData.sportDataMap == null) throw new NotSupportedException(fn + " Sports not populated.");
|
||||
activeSportDataList.AddRange(sportsData.activeSportDataList);
|
||||
sports.AddRange(sportsData.sportDataMap.Values);
|
||||
}
|
||||
return sports;
|
||||
}
|
||||
public override List<SaxSport.Data> GetActiveSports()
|
||||
{
|
||||
String fn = GetType().Name + ".GetActiveSports";
|
||||
if (!SportsSupported) throw new NotSupportedException(fn + " Sports not supported.");
|
||||
List<SaxSport.Data> activeSports = new List<SaxSport.Data>();
|
||||
if (sportsData.sportDataMap == null) ForceRefresh();
|
||||
lock (sportsData)
|
||||
{
|
||||
if (sportsData.sportDataMap == null) throw new NotSupportedException(fn + " Sports not populated.");
|
||||
activeSports.AddRange(sportsData.activeSportDataList);
|
||||
}
|
||||
foreach (SaxSport.Data sportData in activeSportDataList)
|
||||
activeSports.Add(GetSport(sportData));
|
||||
return activeSports;
|
||||
}
|
||||
protected void RefreshSports()
|
||||
@@ -199,7 +219,7 @@ namespace Saxonite.Net.Core.Web.Base.Consoles
|
||||
sportsData.sportDataMap = newSportDataMap;
|
||||
sportsData.activeSportDataList = newActiveSportDataList;
|
||||
}
|
||||
SaLogger.Info(fn + " END. Sports found: " + sportsData.sportDataMap.Count + ". Elapsed: " + DateUtil.FormatNumberOfSeconds((DateTime.Now - startedAt).TotalSeconds), true);
|
||||
SaLogger.Info(fn + " END. Sports found: " + sportsData.sportDataMap.Count + ". Elapsed: " + DateUtil.FormatNumberOfSeconds((DateTime.Now - startedAt).TotalSeconds));
|
||||
}
|
||||
private static bool IsSportActive(Dictionary<SysId, SaxSport.Data> sportDataMap, SaxSport.Data sportData)
|
||||
{
|
||||
|
||||
@@ -110,6 +110,7 @@ namespace Saxonite.Net.Core.Web.Base.Controllers
|
||||
public SaxItemDataMgr ItemDataMgr { get { return Internals.ItemDataMgr; } }
|
||||
// System codes.
|
||||
public List<TypeCodeDesc> DataItemTypeCodes { get { return Internals.DataItemTypeCodes; } }
|
||||
public List<TypeCodeDesc> SportSpecialityLabelCodes { get { return Internals.SportSpecialityLabelCodes; } }
|
||||
public List<TypeCodeDesc> SportParticipationCodes { get { return Internals.SportParticipationCodes; } }
|
||||
public List<TypeCodeDesc> SportOfficiatingCodes { get { return Internals.SportOfficiatingCodes; } }
|
||||
public List<TypeCodeDesc> RegionTypeCodes { get { return Internals.RegionTypeCodes; } }
|
||||
|
||||
@@ -71,6 +71,7 @@ namespace Saxonite.Net.Core.Web.Base.Models
|
||||
protected SaxItemDataMgr ItemDataMgr { get { return Internals.ItemDataMgr; } }
|
||||
// System codes.
|
||||
public List<TypeCodeDesc> DataItemTypeCodes { get { return Internals.DataItemTypeCodes; } }
|
||||
public List<TypeCodeDesc> SportSpecialityLabelCodes { get { return Internals.SportSpecialityLabelCodes; } }
|
||||
public List<TypeCodeDesc> SportParticipationCodes { get { return Internals.SportParticipationCodes; } }
|
||||
public List<TypeCodeDesc> SportOfficiatingCodes { get { return Internals.SportOfficiatingCodes; } }
|
||||
public List<TypeCodeDesc> RegionTypeCodes { get { return Internals.RegionTypeCodes; } }
|
||||
@@ -220,6 +221,18 @@ namespace Saxonite.Net.Core.Web.Base.Models
|
||||
get { return new SelectList(SaxSystem.GetCodesOfType(Sax.CodeType.YesNo), "Code", "Desc"); }
|
||||
}
|
||||
|
||||
/// <summary>List of Sport Participation options for dropdown.</summary>
|
||||
public IEnumerable<SelectListItem> SportSpecialityLabelCodesForSelect
|
||||
{
|
||||
get
|
||||
{
|
||||
List<SelectListItem> codes = new List<SelectListItem>();
|
||||
codes.Add(new SelectListItem("Default", ""));
|
||||
codes.AddRange(new SelectList(SportSpecialityLabelCodes, "Code", "Desc"));
|
||||
return codes;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>List of Sport Participation options for dropdown.</summary>
|
||||
public IEnumerable<SelectListItem> SportParticipationCodesForSelect
|
||||
{
|
||||
|
||||
@@ -19,12 +19,11 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Sport data.
|
||||
private class SportData_List
|
||||
private class SportData_List : AjaxResponse_Data.ItemData_Base
|
||||
{
|
||||
public String Id { get; set; }
|
||||
public String Name { get; set; }
|
||||
public String StatusCode { get; set; }
|
||||
public String StatusDesc { get; set; }
|
||||
public String SpecialityLabelCode { get; set; }
|
||||
public String SpecialityLabelDesc { get; set; }
|
||||
}
|
||||
private class SportData_Full : SportData_List
|
||||
{
|
||||
@@ -33,6 +32,8 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
{
|
||||
data.Id = SysId.ToString(sport.Id);
|
||||
data.Name = sport.Name;
|
||||
data.SpecialityLabelCode = SportSpecialityLabelCodes.GetCodeForType(sport.SpecialityLabel);
|
||||
data.SpecialityLabelDesc = SportSpecialityLabelCodes.GetDescForType(sport.SpecialityLabel);
|
||||
data.StatusCode = sport.StatusCode;
|
||||
data.StatusDesc = sport.StatusDesc;
|
||||
}
|
||||
@@ -82,11 +83,12 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
// Item columns.
|
||||
ColumnDfn colId = ReferenceMgr.GetSportColumnDfn(SaxSport.Column.Id);
|
||||
ColumnDfn colName = ReferenceMgr.GetSportColumnDfn(SaxSport.Column.Name);
|
||||
ColumnDfn colSpecialityLabel = ReferenceMgr.GetSportColumnDfn(SaxSport.Column.SpecialityLabel);
|
||||
ColumnDfn colStatus = ReferenceMgr.GetSportColumnDfn(SaxSport.Column.Status);
|
||||
List<ColumnDfn> columns = new List<ColumnDfn>()
|
||||
{
|
||||
colId,
|
||||
colName,
|
||||
colName, colSpecialityLabel,
|
||||
colStatus
|
||||
};
|
||||
|
||||
@@ -99,10 +101,13 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
while (resultSet != null && resultSet.HasRows && resultSet.NextRecord())
|
||||
{
|
||||
NamedValue.Map values = resultSet.GetRecordValues();
|
||||
Sax.SportSpecialityLabel specialityLabel = (Sax.SportSpecialityLabel)values.GetLong(colSpecialityLabel.DataName);
|
||||
SportData_List sportData = new SportData_List()
|
||||
{
|
||||
Id = values.GetString(colId.DataName),
|
||||
Name = values.GetString(colName.DataName),
|
||||
SpecialityLabelCode = SportSpecialityLabelCodes.GetCodeForType(specialityLabel),
|
||||
SpecialityLabelDesc = SportSpecialityLabelCodes.GetDescForType(specialityLabel),
|
||||
StatusCode = values.GetString(colStatus.DataName),
|
||||
StatusDesc = SacsSystem.GetStatusDescForCode(values.GetString(colStatus.DataName))
|
||||
};
|
||||
@@ -199,6 +204,8 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
// Populate item properties.
|
||||
if (model.SportName != null)
|
||||
sport.Name = model.SportName;
|
||||
if (model.SportSpecialityLabelCode != null)
|
||||
sport.SpecialityLabel = model.SportSpecialityLabel;
|
||||
if (model.SportStatusCode != null)
|
||||
sport.Status = model.SportStatus;
|
||||
|
||||
|
||||
@@ -38,6 +38,8 @@ namespace Saxonite.Net.Core.Web.Admin.Models
|
||||
// Sport properties.
|
||||
public String SportId { get; set; }
|
||||
public String SportName { get; set; }
|
||||
public String SportSpecialityLabelCode { get; set; }
|
||||
public Sax.SportSpecialityLabel SportSpecialityLabel { get { return (Sax.SportSpecialityLabel)SportSpecialityLabelCodes.GetTypeForCode(SportSpecialityLabelCode); } }
|
||||
public String SportStatusCode { get; set; }
|
||||
public SaStatus SportStatus { get { return SacsSystem.GetStatusForCode(SportStatusCode); } }
|
||||
|
||||
@@ -69,6 +71,16 @@ namespace Saxonite.Net.Core.Web.Admin.Models
|
||||
}
|
||||
}
|
||||
|
||||
// Sport Speciality Label.
|
||||
if (SportSpecialityLabelCode != null)
|
||||
{
|
||||
if (!StringUtil.IsEmpty(SportSpecialityLabelCode))
|
||||
{
|
||||
if (SportSpecialityLabel <= 0)
|
||||
responseData.SetControlError(nameof(SportSpecialityLabel), Localiser["msg.validation.invalid.value"]);
|
||||
}
|
||||
}
|
||||
|
||||
// Sport status.
|
||||
if (SportStatusCode != null)
|
||||
{
|
||||
|
||||
@@ -192,6 +192,9 @@
|
||||
<data name="label.database.table" xml:space="preserve">
|
||||
<value>Database table</value>
|
||||
</data>
|
||||
<data name="label.default" xml:space="preserve">
|
||||
<value>Default</value>
|
||||
</data>
|
||||
<data name="label.delete" xml:space="preserve">
|
||||
<value>Delete</value>
|
||||
</data>
|
||||
@@ -318,6 +321,12 @@
|
||||
<data name="label.selected.none" xml:space="preserve">
|
||||
<value>none selected</value>
|
||||
</data>
|
||||
<data name="label.speciality" xml:space="preserve">
|
||||
<value>Speciality</value>
|
||||
</data>
|
||||
<data name="label.speciality.label" xml:space="preserve">
|
||||
<value>Speciality label</value>
|
||||
</data>
|
||||
<data name="label.sport" xml:space="preserve">
|
||||
<value>Sport</value>
|
||||
</data>
|
||||
|
||||
@@ -5,19 +5,36 @@
|
||||
ViewData["Title"] = "Sports";
|
||||
}
|
||||
|
||||
<div class="">
|
||||
<div class="sax-panel Sports">
|
||||
|
||||
<script type="text/javascript">
|
||||
sax.lbl.refresh = '@(Localiser.GetJavascriptText("label.refresh"))';
|
||||
sax.lbl.create = '@(Localiser.GetJavascriptText("label.create"))';
|
||||
sax.lbl.edit = '@(Localiser.GetJavascriptText("label.edit"))';
|
||||
</script>
|
||||
|
||||
@* Filter Form *@
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmSportFilter", @class = "sax-form", @onSubmit = "return false;" }))
|
||||
{
|
||||
|
||||
@* Filter Panel *@
|
||||
<div class="sax-panel-filter">
|
||||
@* Header - Page caption, paging controls, actions. *@
|
||||
<div class="sax-header row">
|
||||
<div class="col"><div class="sax-caption">@Localiser["sport.caption.sports"]</div></div>
|
||||
<div class="fixed row">
|
||||
<div>
|
||||
<div class="col">
|
||||
<partial name="~/Views/Common/ResultsPaging.cshtml" />
|
||||
</div>
|
||||
<div class="sax-action sax-results-refresh"><img src="~/img/action/refresh24.png" alt="@(Localiser["label.refresh"])" title="@(Localiser["label.refresh"])" /></div>
|
||||
<div class="sax-action sax-item-create"><img src="~/img/action/add24.png" alt="@(Localiser["label.create"])" title="@(Localiser["label.create"])" /></div>
|
||||
<div class="fixed">
|
||||
@* Burger menu *@
|
||||
<ul class="nav navbar-nav navbar-dark navbar-right sax-burger">
|
||||
<li class="dropdown-toggle caret-off">
|
||||
<a href="#" class="dropdown" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="navbar-toggler-icon"></span></a>
|
||||
<ul class="dropdown-menu dropdown-menu-right sax-dropdown-menu">@* Menu items will be inserted here. *@</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-content">
|
||||
@@ -26,27 +43,47 @@
|
||||
<div class="col-sm-7">@Html.TextBoxFor(model => model.Filter.Sport, new { @id = "ifFilterSport", @class = "FilterSport", @maxlength = "32" })</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* Filter element templates *@
|
||||
<div class="sax-panel-item-template">
|
||||
@* Burger dropdown item template - ul is ignored *@
|
||||
<ul class="sax-dropdown-menu SportFilter">
|
||||
<li class="sax-dropdown-item sax-action"><div class="sax-label">XXX</div></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
@* Results Panel *@
|
||||
<div class="sax-panel-results">
|
||||
<div class="sax-panel-messages"></div>
|
||||
<div class="sax-panel-item-list"></div>
|
||||
|
||||
@* Element templates *@
|
||||
<div class="sax-panel-item-template">
|
||||
|
||||
@* Sport item template *@
|
||||
<div class="sax-panel-item Sport">
|
||||
<div class="sax-header row">
|
||||
<div class="col">
|
||||
<div class="sax-caption"><div class=" sax-action SportName">Sport name</div></div>
|
||||
<div class="sax-caption"><div class="sax-action sax-item-update SportName">Sport name</div></div>
|
||||
</div>
|
||||
<div class="fixed sax-actions">
|
||||
<div class="sax-action sax-item-update"><img src="~/img/action/edit24.png" alt="@(Localiser["label.update"])" title="@(Localiser["label.update"])" /></div>
|
||||
@* Burger menu *@
|
||||
<ul class="nav navbar-nav navbar-light navbar-right sax-burger">
|
||||
<li class="dropdown-toggle caret-off">
|
||||
<a href="#" class="dropdown" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="navbar-toggler-icon"></span></a>
|
||||
<ul class="dropdown-menu dropdown-menu-right sax-dropdown-menu">@* Menu items will be inserted here. *@</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-4"><div class="SportCategory"></div></div>
|
||||
<div class="col-sm-4"><div class="SportType"></div></div>
|
||||
<div class="col-sm-4 right"><div class="StatusDesc"></div></div>
|
||||
<div class="col-sm-4"><div class="sax-note SportSpeciality">@Localiser["label.speciality"]: <span class="SportSpecialityLabel"></span></div></div>
|
||||
<div class="col-sm-4"><div class="sax-note "></div></div>
|
||||
<div class="col-sm-4 right"><div class="sax-note StatusDesc"></div></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-4"></div>
|
||||
@@ -54,10 +91,16 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* Burger dropdown item template - ul is ignored *@
|
||||
<ul class="sax-dropdown-menu Sport">
|
||||
<li class="sax-dropdown-item sax-action"><div class="sax-label">XXX</div></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<partial name="Panel-SportDialog.cshtml" />
|
||||
|
||||
</div>
|
||||
|
||||
<partial name="Panel-SportDialog.cshtml" />
|
||||
|
||||
|
||||
@@ -14,32 +14,63 @@
|
||||
}
|
||||
<div id="dlgSport" class="sax-dialog" title="">
|
||||
|
||||
<div class="spacer2"></div>
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmSport", @class = "sax-form", @onSubmit = "return false;" }))
|
||||
{
|
||||
@Html.HiddenFor(model => model.SportId, new { @class = "SportId" })
|
||||
|
||||
@* Sport name *@
|
||||
@* Sport Name *@
|
||||
<div class="sax-form-control SportName">
|
||||
<div class="sax-label">
|
||||
<label for="ifSportName"><span><span class="required">*</span> @Localiser["label.name"]</span></label>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="ifSportName"><span>@Localiser["label.name"]</span><span class="required"> *</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<div class="sax-control">
|
||||
@Html.TextBoxFor(model => model.SportName, new { @id = "ifSportName", @class = "SportName sax-input", @maxlength = @Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.Sport_Name) })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
@Html.TextBoxFor(model => model.SportName, new { @id = "ifSportName", @class = "SportName sax-input", @maxlength = @Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.Sport_Name) })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@* Sport status *@
|
||||
@* Sport Speciality Label *@
|
||||
<div class="sax-form-control SportSpecialityLabel">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="cbSportSpecialityLabel"><span>@Localiser["label.speciality.label"]</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<div class="sax-control">
|
||||
@Html.DropDownListFor(model => model.SportSpecialityLabelCode, Model.SportSpecialityLabelCodesForSelect, new { @id = "cbSportSpecialityLabel", @class = "SportSpecialityLabel sax-select" })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* Sport Status *@
|
||||
<div class="sax-form-control SportStatus">
|
||||
<div class="sax-label">
|
||||
<label for="cbSportStatus"><span><span class="required">*</span> @Localiser["label.status"]</span></label>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="cbSportStatus"><span>@Localiser["label.status"]</span><span class="required"> *</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<div class="sax-control">
|
||||
<select id="cbSportStatus" class="sax-select SportStatus" name="SportStatusCode"></select>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
<select id="cbSportStatus" class="sax-select SportStatus" name="SportStatusCode"></select>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
}
|
||||
<div class="spacer2"></div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
<div class="sax-header row">
|
||||
<div class="col">
|
||||
@* User email *@
|
||||
<div class="sax-caption"><div class="sax-action UserEmailAddress"></div></div>
|
||||
<div class="sax-caption"><div class="sax-action sax-item-update UserEmailAddress"></div></div>
|
||||
</div>
|
||||
<div class="fixed sax-actions">
|
||||
@* Burger menu *@
|
||||
@@ -102,7 +102,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<partial name="Panel-UserDialog.cshtml" />
|
||||
|
||||
</div>
|
||||
|
||||
<partial name="Panel-UserDialog.cshtml" />
|
||||
|
||||
|
||||
@@ -5,16 +5,17 @@
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let $pnl = sax.$pnl, $frm = sax.$frm, $dlg = sax.$dlg;
|
||||
sax.itemIdPrefix = 'Itm_';
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.refreshResults = function (delay)
|
||||
{
|
||||
var $results = $('.sax-panel-results');
|
||||
if (!sax.awaitingRefreshResponse)
|
||||
{
|
||||
var $items = $('.sax-panel-item-list', $results).fadeOut(200).empty();
|
||||
var $msgs = $('.sax-panel-messages', $results).hide().empty().append($('<div class="sax-message">' + sax.msg.dataQuerying + '</div>')).fadeIn(200);
|
||||
$('.sax-burger', $pnl.filter).hide();
|
||||
var $items = $('.sax-panel-item-list', $pnl.results).fadeOut(200).empty();
|
||||
var $msgs = $('.sax-panel-messages', $pnl.results).hide().empty().append($('<div class="sax-message">' + sax.msg.dataQuerying + '</div>')).fadeIn(200);
|
||||
}
|
||||
sax.ajax.refreshResults = sax.ajax.refreshResults || { url: sax.url.base + 'Sport/Ajax/GetList', formId: 'frmSportFilter', callbackFn: sax.doRefreshResults };
|
||||
sax.doAjaxRequest(sax.ajax.refreshResults, delay || 50);
|
||||
@@ -25,27 +26,26 @@
|
||||
//sax.debug('doRefreshResults', response);
|
||||
delete sax.awaitingRefreshResponse;
|
||||
sax.refreshControlValues(response.controlValues);
|
||||
var $results = $('.sax-panel-results');
|
||||
var $msgs = $('.sax-panel-messages', $results).hide().empty();
|
||||
var $items = $('.sax-panel-item-list', $results).hide().empty();
|
||||
var $tmpl = $('.sax-panel-item-template .sax-panel-item.Sport', $results);
|
||||
var $msgs = $('.sax-panel-messages', $pnl.results).hide().empty();
|
||||
var $items = $('.sax-panel-item-list', $pnl.results).hide().empty();
|
||||
sax.refreshPaging(response, '#frmSportFilter', sax.refreshResults);
|
||||
if (!response.success) return;
|
||||
// Reference data - Statuses.
|
||||
if (response.defaultStatusCode) sax.data.defaultStatusCode = response.defaultStatusCode;
|
||||
if (response.statuses)
|
||||
sax.populateSelectCodeDesc('#cbSportStatus', response.statuses);
|
||||
// Menu.
|
||||
var $bgr = $('.sax-burger', $pnl.filter).hide();
|
||||
var $mnu = $('ul.sax-dropdown-menu', $bgr).empty();
|
||||
$mnu.append(sax.getFilterMenuOption(sax.lbl.refresh, function () { sax.refreshResults(); }));
|
||||
$mnu.append(sax.getFilterMenuOption(sax.lbl.create, function () { sax.createItem(); }));
|
||||
$bgr.toggle(!!$('.sax-dropdown-item', $mnu).length);
|
||||
// Items.
|
||||
var items = response.sports;
|
||||
if (!items.length)
|
||||
return $msgs.append($('<div class="sax-message">' + sax.msg.dataNoneFound + '</div>')).fadeIn(500);
|
||||
for (let itemIdx = 0; itemIdx < items.length; itemIdx++)
|
||||
{
|
||||
let item = items[itemIdx];
|
||||
let $item = $tmpl.clone();
|
||||
sax.populateItem($item, item);
|
||||
$items.append($item);
|
||||
}
|
||||
$items.append(sax.populateItem(sax.getItemTemplate(), items[itemIdx]));
|
||||
$items.fadeIn(50);
|
||||
}
|
||||
sax.populateItem = function ($item, item)
|
||||
@@ -53,51 +53,80 @@
|
||||
if (!item) return;
|
||||
$item.prop('id', sax.itemIdPrefix + item.id);
|
||||
$('.SportName', $item).text(item.name);
|
||||
$('.SportSpecialityLabel', $item).text(item.specialityLabelDesc);
|
||||
$('.SportSpeciality', $item).toggle(!!item.specialityLabelCode);
|
||||
$('.StatusDesc', $item).text(item.statusDesc);
|
||||
$('.sax-caption .sax-action, .sax-actions .sax-action.sax-item-update', $item).off('click').on('click', function () { sax.updateItem(item.id) })
|
||||
$item.off('dblclick').on('dblclick', function () { sax.updateItem(item.id) })
|
||||
$('.sax-panel-results .sax-panel-messages').hide().empty();
|
||||
$('.sax-caption .sax-action').toggleClass('sax-action', !item.deleted);
|
||||
let $mnu = $('ul.sax-dropdown-menu', $item);
|
||||
if (!item.deleted)
|
||||
{
|
||||
$mnu.append(sax.getItemMenuOption(sax.lbl.edit, function () { sax.updateItem(item) }));
|
||||
$('.sax-header .sax-action.sax-item-update', $item).off('click').on('click', function () { sax.updateItem(item) });
|
||||
$item.off('dblclick').on('dblclick', function () { sax.updateItem(item) });
|
||||
}
|
||||
$('.sax-burger', $item).toggle(!!$('.sax-dropdown-item', $mnu).length);
|
||||
$('.sax-panel-messages', $pnl.results).hide().empty();
|
||||
return $item;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.getFilterDropdownTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-dropdown-menu.SportFilter li.sax-dropdown-item', $pnl.filter).clone();
|
||||
}
|
||||
sax.getItemTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-panel-item.Sport', $pnl.results).clone();
|
||||
}
|
||||
sax.getItemDropdownTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-dropdown-menu.Sport li.sax-dropdown-item', $pnl.results).clone();
|
||||
}
|
||||
sax.getFilterMenuOption = function (lbl, fn)
|
||||
{
|
||||
return sax.getMenuOption(sax.getFilterDropdownTemplate(), lbl, fn);
|
||||
}
|
||||
sax.getItemMenuOption = function (lbl, fn)
|
||||
{
|
||||
return sax.getMenuOption(sax.getItemDropdownTemplate(), lbl, fn);
|
||||
}
|
||||
sax.getMenuOption = function ($opt, lbl, fn)
|
||||
{
|
||||
return $opt.find('div.sax-label').text(lbl).end().on('click', fn);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.createItem = function ()
|
||||
{
|
||||
let $frm = sax.$frm.sport;
|
||||
$('.SportId,input[type="text"],textarea,select', $frm).val('');
|
||||
$('.SportStatus', $frm).val(sax.data.defaultStatusCode);
|
||||
let frm = $frm.sport;
|
||||
$('.SportId,input[type="text"],textarea,select', frm).val('');
|
||||
$('.SportStatus', frm).val(sax.data.defaultStatusCode);
|
||||
sax.clearControlErrors();
|
||||
sax.$dlg.sport.dialog('option', 'title', sax.dlg.title.createSport);
|
||||
sax.openDialog(sax.$dlg.sport, 600, 600);
|
||||
}
|
||||
sax.doCreateItem = function ()
|
||||
{
|
||||
sax.storeItem();
|
||||
$dlg.sport.dialog('option', 'title', sax.dlg.title.createSport);
|
||||
sax.openDialog($dlg.sport, 600, 600);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.updateItem = function (id)
|
||||
sax.updateItem = function (item)
|
||||
{
|
||||
$('.SportId', sax.$frm.sportId).val(id);
|
||||
$('.SportId', $frm.sportId).val(item.id);
|
||||
sax.ajax.updateItem = sax.ajax.updateItem || { url: sax.url.base + 'Sport/Ajax/GetItem', formId: 'frmSportId', callbackFn: sax.onUpdateItem };
|
||||
sax.doAjaxRequest(sax.ajax.updateItem, 50);
|
||||
}
|
||||
sax.onUpdateItem = function (response)
|
||||
{
|
||||
//sax.debug('onUpdateItem', response);
|
||||
let $frm = sax.$frm.sport;
|
||||
$('.SportId,input[type="text"],textarea,select', $frm).val('');
|
||||
let frm = $frm.sport;
|
||||
$('.SportId,input[type="text"],textarea,select', frm).val('');
|
||||
if (!response.success) return;
|
||||
let item = response.sport;
|
||||
$('.SportId', $frm).val(item.id);
|
||||
$('.SportName', $frm).val(item.name);
|
||||
$('.SportStatus', $frm).val(item.statusCode);
|
||||
$('.SportId', frm).val(item.id);
|
||||
$('.SportName', frm).val(item.name);
|
||||
$('.SportSpecialityLabel', frm).val(item.specialityLabelCode);
|
||||
$('.SportStatus', frm).val(item.statusCode);
|
||||
sax.clearControlErrors();
|
||||
sax.$dlg.sport.dialog('option', 'title', sax.dlg.title.updateSport);
|
||||
sax.openDialog(sax.$dlg.sport, 600, 600);
|
||||
}
|
||||
sax.doUpdateItem = function ()
|
||||
{
|
||||
sax.storeItem();
|
||||
$dlg.sport.dialog('option', 'title', sax.dlg.title.updateSport);
|
||||
sax.openDialog($dlg.sport, 600, 600);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
@@ -111,15 +140,14 @@
|
||||
//sax.debug('onStoreItem', response);
|
||||
sax.refreshControlValues(response.controlValues);
|
||||
if (!response.success) return;
|
||||
sax.$dlg.sport.dialog('close');
|
||||
$dlg.sport.dialog('close');
|
||||
|
||||
var item = response.sport;
|
||||
var $item = $('#' + sax.itemIdPrefix + item.id);
|
||||
if (!$item.length)
|
||||
{
|
||||
var $results = $('.sax-panel-results');
|
||||
$item = $('.sax-panel-item-template .sax-panel-item.Sport', $results).clone();
|
||||
$('.sax-panel-item-list', $results).prepend($item).show();
|
||||
$item = sax.getItemTemplate();
|
||||
$('.sax-panel-item-list', $pnl.results).prepend($item).show();
|
||||
}
|
||||
sax.populateItem($item, item)
|
||||
}
|
||||
@@ -127,19 +155,21 @@
|
||||
//--------------------------------------------------------------
|
||||
$(function ()
|
||||
{
|
||||
$('.sax-action.sax-item-create').on('click', function () { sax.createItem(); });
|
||||
$('.sax-action.sax-results-refresh').on('click', function () { sax.refreshResults(); });
|
||||
$('.sax-input').on('input', function () { sax.clearControlError(this); });
|
||||
$pnl.sports = $('.sax-panel.Sports');
|
||||
$pnl.filter = $('.sax-panel-filter', $pnl.sports);
|
||||
$pnl.results = $('.sax-panel-results', $pnl.sports);
|
||||
|
||||
sax.$frm.filter = $('#frmSportFilter');
|
||||
$('.FilterSport', sax.$frm.filter).on('input', function () { sax.refreshResults(250); });
|
||||
sax.$frm.sportId = $('#frmSportId');
|
||||
sax.$frm.sport = $('#frmSport');
|
||||
$('.sax-input', sax.$frm.sport).on('input', function () { sax.clearControlError(this); });
|
||||
$('.sax-select', sax.$frm.sport).on('change', function () { sax.clearControlError(this); });
|
||||
|
||||
var opt = sax.dlgOpts();
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { sax.doCreateItem(); };
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { sax.storeItem(); };
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { $(this).dialog('close'); };
|
||||
sax.$dlg.sport = $('#dlgSport').dialog(opt);
|
||||
$dlg.sport = $('#dlgSport').dialog(opt);
|
||||
|
||||
setTimeout(sax.refreshResults, 250);
|
||||
});
|
||||
|
||||
@@ -222,8 +222,9 @@
|
||||
//--------------------------------------------------------------
|
||||
$(function ()
|
||||
{
|
||||
$pnl.filter = $('.sax-panel-filter');
|
||||
$pnl.results = $('.sax-panel-results');
|
||||
$pnl.users = $('.sax-panel.Users');
|
||||
$pnl.filter = $('.sax-panel-filter', $pnl.users);
|
||||
$pnl.results = $('.sax-panel-results', $pnl.users);
|
||||
|
||||
$frm.filter = $('#frmUserFilter');
|
||||
$('.FilterUser', $frm.filter).on('input', function () { sax.refreshResults(250); });
|
||||
|
||||
@@ -213,6 +213,9 @@
|
||||
<data name="home.organisation.request.para2" xml:space="preserve">
|
||||
<value>Sign-up now with a few details and we'll let you know when you can login and get going.</value>
|
||||
</data>
|
||||
<data name="label.about" xml:space="preserve">
|
||||
<value>About</value>
|
||||
</data>
|
||||
<data name="label.account" xml:space="preserve">
|
||||
<value>My Account</value>
|
||||
</data>
|
||||
@@ -225,6 +228,9 @@
|
||||
<data name="label.address" xml:space="preserve">
|
||||
<value>Address</value>
|
||||
</data>
|
||||
<data name="label.alternatively" xml:space="preserve">
|
||||
<value>Alternatively</value>
|
||||
</data>
|
||||
<data name="label.article" xml:space="preserve">
|
||||
<value>Article</value>
|
||||
</data>
|
||||
@@ -276,6 +282,12 @@
|
||||
<data name="label.discipline" xml:space="preserve">
|
||||
<value>Discipline</value>
|
||||
</data>
|
||||
<data name="label.download" xml:space="preserve">
|
||||
<value>Download</value>
|
||||
</data>
|
||||
<data name="label.drag.image.here" xml:space="preserve">
|
||||
<value>Drag your image here.</value>
|
||||
</data>
|
||||
<data name="label.edit" xml:space="preserve">
|
||||
<value>Edit</value>
|
||||
</data>
|
||||
@@ -483,6 +495,9 @@
|
||||
<data name="label.update" xml:space="preserve">
|
||||
<value>Update</value>
|
||||
</data>
|
||||
<data name="label.upload" xml:space="preserve">
|
||||
<value>Upload</value>
|
||||
</data>
|
||||
<data name="label.very.good" xml:space="preserve">
|
||||
<value>Very Good</value>
|
||||
</data>
|
||||
|
||||
@@ -35,11 +35,12 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
public String Title { get; set; }
|
||||
public String FirstName { get; set; }
|
||||
public String LastName { get; set; }
|
||||
public String About { get; set; }
|
||||
public byte Gender { get; set; }
|
||||
public String GenderCaption{ get; set; }
|
||||
public String GenderCaption { get; set; }
|
||||
public byte DobDay { get; set; }
|
||||
public byte DobMonth{ get; set; }
|
||||
public short DobYear{ get; set; }
|
||||
public byte DobMonth { get; set; }
|
||||
public short DobYear { get; set; }
|
||||
// Regions.
|
||||
public int RegionIdCountry { get; set; }
|
||||
public String RegionCaptionCountry { get; set; }
|
||||
@@ -54,22 +55,19 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
data.Title = userAccount.Title;
|
||||
data.FirstName = userAccount.FirstName;
|
||||
data.LastName = userAccount.LastName;
|
||||
data.About = userAccount.About;
|
||||
data.Gender = (byte)userAccount.Gender;
|
||||
data.GenderCaption = Localiser.GetGenderCaption(userAccount.Gender);
|
||||
data.DobDay= (byte)userAccount.DateOfBirthDay;
|
||||
data.DobDay = (byte)userAccount.DateOfBirthDay;
|
||||
data.DobMonth = (byte)userAccount.DateOfBirthMonth;
|
||||
data.DobYear = (short)userAccount.DateOfBirthYear;
|
||||
// Regions.
|
||||
data.RegionIdCountry = SysId.ToInt(userAccount.RegionIdCountry);
|
||||
data.RegionIdProvince = SysId.ToInt(userAccount.RegionIdProvince);
|
||||
using (SaxRegion regionCountry = Internals.GetRegion(userAccount.RegionIdCountry))
|
||||
using (SaxRegion regionProvince = Internals.GetRegion(userAccount.RegionIdProvince))
|
||||
{
|
||||
data.RegionCaptionCountry = Localiser.GetRegionName(regionCountry);
|
||||
data.RegionCaptionProvince = Localiser.GetRegionName(regionProvince);
|
||||
List<String> locations = new List<string>() { data.RegionCaptionProvince, data.RegionCaptionCountry };
|
||||
data.LocationCaption = locations.Concat(", ", "", "", true, true);
|
||||
}
|
||||
data.RegionCaptionCountry = Localiser.GetRegionName(Internals.GetRegion(userAccount.RegionIdCountry));
|
||||
data.RegionCaptionProvince = Localiser.GetRegionName(Internals.GetRegion(userAccount.RegionIdProvince));
|
||||
List<String> locations = new List<string>() { data.RegionCaptionProvince, data.RegionCaptionCountry };
|
||||
data.LocationCaption = locations.Concat(", ", "", "", true, true);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -112,7 +110,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
responseData.Genders.Add(gender.Type.ToString(), Localiser.GetGenderCaption((Sax.Gender)gender.Type));
|
||||
|
||||
// Reference data - Months.
|
||||
for (int month= 1; month <= 12; month++)
|
||||
for (int month = 1; month <= 12; month++)
|
||||
responseData.Months.Add(month.ToString(), DateUtil.Format(new DateTime(DateTime.Today.Year, month, 1), "MMMM", SessionCulture));
|
||||
|
||||
// Retrieve user details.
|
||||
@@ -280,6 +278,8 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
userAccount.FirstName = model.AccountFirstName;
|
||||
if (model.AccountLastName != null)
|
||||
userAccount.LastName = model.AccountLastName;
|
||||
if (model.AccountAbout != null)
|
||||
userAccount.About = model.AccountAbout;
|
||||
if (model.AccountGender != null)
|
||||
userAccount.Gender = model.GetAccountGender();
|
||||
// Date of birth.
|
||||
@@ -299,7 +299,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
else
|
||||
{
|
||||
userAccount.DateOfBirthMonth = 0;
|
||||
userAccount.DateOfBirthDay= 0;
|
||||
userAccount.DateOfBirthDay = 0;
|
||||
}
|
||||
// Regions.
|
||||
if (model.AccountRegionIdCountry != null)
|
||||
|
||||
@@ -25,27 +25,25 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Data definitions.
|
||||
private class ProfileSportResponseData_List
|
||||
private class ProfileSportResponseData_List : AjaxResponse_Data.ItemData_Base
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long SportId { get; set; }
|
||||
public String SportId { get; set; }
|
||||
public String SportName { get; set; }
|
||||
public String SportSpecialityLabel { get; set; }
|
||||
public String SportParticipation { get; set; }
|
||||
public String SportOfficiating { get; set; }
|
||||
public String StatusCode { get; set; }
|
||||
public String StatusDesc { get; set; }
|
||||
}
|
||||
private class ProfileSportResponseData_Item : ProfileSportResponseData_List
|
||||
{
|
||||
public String SportParticipationCode { get; set; }
|
||||
public String SportOfficiatingCode { get; set; }
|
||||
public String CreatedOnFmt { get; set; }
|
||||
}
|
||||
private void PopulateProfileSportResponseData(Model_Account model, SaxUserSport userSport, SaxSport sport, ProfileSportResponseData_Item data)
|
||||
{
|
||||
data.Id = SysId.ToLong(userSport.Id);
|
||||
data.SportId = SysId.ToLong(userSport.SportId);
|
||||
data.Id = SysId.ToString(userSport.Id);
|
||||
data.SportId = SysId.ToString(userSport.SportId);
|
||||
data.SportName = sport.Name;
|
||||
data.SportSpecialityLabel = model.GetSportSpecialityLabel(userSport.SportId);
|
||||
data.SportParticipationCode = SportParticipationCodes.GetCodeForType(userSport.Participation);
|
||||
data.SportParticipation = Localiser.GetSportParticipationTypeCaption(userSport.Participation);
|
||||
data.SportOfficiatingCode = SportOfficiatingCodes.GetCodeForType(userSport.Officiating);
|
||||
@@ -110,11 +108,13 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
while (resultSet != null && resultSet.HasRows && resultSet.NextRecord())
|
||||
{
|
||||
NamedValue.Map values = resultSet.GetRecordValues();
|
||||
SysId sportId = new SysId(values.GetLong(colSportId.DataName));
|
||||
ProfileSportResponseData_List userSportData = new ProfileSportResponseData_List()
|
||||
{
|
||||
Id = values.GetLong(colId.DataName),
|
||||
SportId = values.GetLong(colSportId.DataName),
|
||||
Id = values.GetLong(colId.DataName).ToString(),
|
||||
SportId = sportId.ToString(),
|
||||
SportName = values.GetString(colSportName.DataName),
|
||||
SportSpecialityLabel = model.GetSportSpecialityLabel(sportId),
|
||||
SportParticipation = Localiser.GetSportParticipationTypeCaption((Sax.SportParticipation)values.GetLong(colParticipation.DataName)),
|
||||
SportOfficiating = Localiser.GetSportOfficiatingTypeCaption((Sax.SportOfficiating)values.GetLong(colOfficiating.DataName)),
|
||||
StatusCode = values.GetString(colStatus.DataName),
|
||||
|
||||
+22
-11
@@ -54,7 +54,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
public String RegionIdNation { get; set; }
|
||||
public String RegionIdProvince { get; set; }
|
||||
}
|
||||
private void PopulateSportExperienceResponseData(Model_UserSportExperience model, SportExperienceResponseData_Detail data, SaxUserSportExperience userSportExperience)
|
||||
private void PopulateSportExperienceResponseData(Model_UserSportExperience model, SportExperienceResponseData_Detail data, SaxUserSport userSport, SaxUserSportExperience userSportExperience)
|
||||
{
|
||||
data.Id = model.EncryptId(userSportExperience.Id);
|
||||
data.UserSportId = model.EncryptId(userSportExperience.UserSportId);
|
||||
@@ -72,14 +72,10 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
// Regions.
|
||||
data.RegionIdNation = model.EncryptId(userSportExperience.RegionIdNation);
|
||||
data.RegionIdProvince = model.EncryptId(userSportExperience.RegionIdProvince);
|
||||
using (SaxRegion regionNation = Internals.GetRegion(userSportExperience.RegionIdNation))
|
||||
using (SaxRegion regionProvince = Internals.GetRegion(userSportExperience.RegionIdProvince))
|
||||
{
|
||||
data.RegionCaptionNation = Localiser.GetRegionName(regionNation);
|
||||
data.RegionCaptionProvince = Localiser.GetRegionName(regionProvince);
|
||||
List<String> locations = new List<string>() { data.RegionCaptionProvince, data.RegionCaptionNation };
|
||||
data.RegionRepresentation = locations.Concat(", ", "", "", true, true);
|
||||
}
|
||||
data.RegionCaptionNation = Localiser.GetRegionName(Internals.GetRegion(userSportExperience.RegionIdNation));
|
||||
data.RegionCaptionProvince = Localiser.GetRegionName(Internals.GetRegion(userSportExperience.RegionIdProvince));
|
||||
List<String> locations = new List<string>() { data.RegionCaptionProvince, data.RegionCaptionNation };
|
||||
data.RegionRepresentation = locations.Concat(", ", "", "", true, true);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -94,6 +90,17 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
public AjaxResponse_UserSportExperienceList(SaxModel_Online model) : base(model) { }
|
||||
// Contact details.
|
||||
public List<SportExperienceResponseData_List> Experiences { get; } = new List<SportExperienceResponseData_List>();
|
||||
// Sport details.
|
||||
public class SportData
|
||||
{
|
||||
public class SpecialityData
|
||||
{
|
||||
public bool? NotRelevant { get; set; } = null;
|
||||
public String Label { get; set; }
|
||||
}
|
||||
public SpecialityData Speciality { get; } = new SpecialityData();
|
||||
}
|
||||
public SportData Sport { get; } = new SportData();
|
||||
}
|
||||
// Ajax request.
|
||||
[HttpPost]
|
||||
@@ -119,6 +126,10 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
if (userSport == null || !userSport.UserAccountId.Equals(SessionData.User.UserAccountId))
|
||||
return Json(responseData.SetGoHome(messageTitle, Localiser["msg.something.gone.wrong"]));
|
||||
|
||||
// Sport details.
|
||||
if (model.SportSpecialityNotRelevant(userSport.SportId)) responseData.Sport.Speciality.NotRelevant = true;
|
||||
responseData.Sport.Speciality.Label = model.GetSportSpecialityLabel(userSport.SportId);
|
||||
|
||||
// Columns.
|
||||
ColumnDfn colId = AccountMgr.GetUserSportExperienceColumnDfn(SaxUserSportExperience.Column.Id);
|
||||
ColumnDfn colUserSportId = AccountMgr.GetUserSportExperienceColumnDfn(SaxUserSportExperience.Column.UserSportId);
|
||||
@@ -214,7 +225,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
|
||||
// Populate data to response.
|
||||
responseData.Experience = new SportExperienceResponseData_Detail();
|
||||
PopulateSportExperienceResponseData(model, responseData.Experience, userSportExperience);
|
||||
PopulateSportExperienceResponseData(model, responseData.Experience, userSport, userSportExperience);
|
||||
}
|
||||
|
||||
// Complete response.
|
||||
@@ -337,7 +348,7 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
|
||||
// Populate data to response.
|
||||
responseData.Experience = new SportExperienceResponseData_Detail();
|
||||
PopulateSportExperienceResponseData(model, responseData.Experience, userSportExperience);
|
||||
PopulateSportExperienceResponseData(model, responseData.Experience, userSport, userSportExperience);
|
||||
}
|
||||
|
||||
// Complete response.
|
||||
|
||||
@@ -50,8 +50,9 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
/// <summary>Article activity info. </summary>
|
||||
private class ActivityResponseData_Article
|
||||
{
|
||||
public ActivityResponseData_Article(SaxController_Online controller, SaxModel_Online model, SaxArticle article)
|
||||
public ActivityResponseData_Article(SaxController_Online controller, SaxModel_Online model, SaxArticle article, SaxOrganisation organisation)
|
||||
{
|
||||
Organisation = organisation?.Name ?? null;
|
||||
Author = model.GetUserAccountDisplayName(article.UserAccountIdAuthor);
|
||||
Headline = article.Headline;
|
||||
Summary = article.Summary;
|
||||
@@ -218,44 +219,53 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
RefreshModel(model);
|
||||
SaxSessionData_Online sessionData = SessionData_Online;
|
||||
|
||||
// Identify activity.
|
||||
Sax.DataItemType itemType = (Sax.DataItemType)StringUtil.ToShort(model.ActivityType);
|
||||
SysId itemId = model.ExtractSysId(model.ActivityIdx);
|
||||
if (itemType <= 0 || !SysId.IsValid(itemId))
|
||||
// Record disposable items as they are created so all can be disposed when needed.
|
||||
using (DisposableCollection<SacsHierarchyItem> disposableItems = new DisposableCollection<SacsHierarchyItem>())
|
||||
{
|
||||
SaLogger.Warn(fn + " Activity type/Id inncorrectly specified." + GetLogSuffix());
|
||||
return Json(responseData);
|
||||
}
|
||||
|
||||
// Retrieve activity details.
|
||||
if (itemType == Sax.DataItemType.Article)
|
||||
{
|
||||
// Article.
|
||||
SaxArticle article = ActivityMgr.GetArticleById(itemId);
|
||||
if (article == null)
|
||||
// Identify activity.
|
||||
Sax.DataItemType itemType = (Sax.DataItemType)StringUtil.ToShort(model.ActivityType);
|
||||
SysId itemId = model.ExtractSysId(model.ActivityIdx);
|
||||
if (itemType <= 0 || !SysId.IsValid(itemId))
|
||||
{
|
||||
SaLogger.Warn(fn + " Article not found for Activity Id: " + itemId.ToString() + "." + GetLogSuffix());
|
||||
SaLogger.Warn(fn + " Activity type/Id inncorrectly specified." + GetLogSuffix());
|
||||
return Json(responseData);
|
||||
}
|
||||
responseData.Article = new ActivityResponseData_Article(this, model, article);
|
||||
}
|
||||
else if (itemType == Sax.DataItemType.OrganisationOpportunity)
|
||||
{
|
||||
// Organisation Opportunity.
|
||||
SaxOrganisationOpportunity opportunity = ActivityMgr.GetOrganisationOpportunityById(itemId);
|
||||
if (opportunity == null)
|
||||
|
||||
// Retrieve activity details.
|
||||
if (itemType == Sax.DataItemType.Article)
|
||||
{
|
||||
SaLogger.Warn(fn + " Opportunity not found for Activity Id: " + itemId.ToString() + "." + GetLogSuffix());
|
||||
// Article.
|
||||
SaxArticle article = ActivityMgr.GetArticleById(itemId);
|
||||
disposableItems.Add(article);
|
||||
if (article == null)
|
||||
{
|
||||
SaLogger.Warn(fn + " Article not found for Activity Id: " + itemId.ToString() + "." + GetLogSuffix());
|
||||
return Json(responseData);
|
||||
}
|
||||
SaxOrganisation organisation = AccountMgr.GetOrganisationById(article.OrganisationId);
|
||||
disposableItems.Add(organisation);
|
||||
responseData.Article = new ActivityResponseData_Article(this, model, article, organisation);
|
||||
}
|
||||
else if (itemType == Sax.DataItemType.OrganisationOpportunity)
|
||||
{
|
||||
// Organisation Opportunity.
|
||||
SaxOrganisationOpportunity opportunity = ActivityMgr.GetOrganisationOpportunityById(itemId);
|
||||
disposableItems.Add(opportunity);
|
||||
if (opportunity == null)
|
||||
{
|
||||
SaLogger.Warn(fn + " Opportunity not found for Activity Id: " + itemId.ToString() + "." + GetLogSuffix());
|
||||
return Json(responseData);
|
||||
}
|
||||
responseData.Opportunity = new ActivityResponseData_Opportunity(model, opportunity);
|
||||
}
|
||||
|
||||
// Record activty viewing.
|
||||
if (!ActivityConsole.RecordUserActivityViewed(SessionData.User.UserAccountId, new ItemId((short)itemType, itemId), DbUpdateInfo))
|
||||
{
|
||||
SaLogger.Warn(fn + " Failed to record Activity Viewing: " + ActivityConsole.ErrorStateMessage + "." + GetLogSuffix());
|
||||
return Json(responseData);
|
||||
}
|
||||
responseData.Opportunity = new ActivityResponseData_Opportunity(model, opportunity);
|
||||
}
|
||||
|
||||
// Record activty viewing.
|
||||
if (!ActivityConsole.RecordUserActivityViewed(SessionData.User.UserAccountId, new ItemId((short)itemType, itemId), DbUpdateInfo))
|
||||
{
|
||||
SaLogger.Warn(fn + " Failed to record Activity Viewing: " + ActivityConsole.ErrorStateMessage + "." + GetLogSuffix());
|
||||
return Json(responseData);
|
||||
}
|
||||
|
||||
// Complete response.
|
||||
|
||||
+89
-61
@@ -78,6 +78,17 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
public bool CanManage { get; set; }
|
||||
}
|
||||
public UserData User { get; } = new UserData();
|
||||
// Organisation.
|
||||
public class OrganisationData
|
||||
{
|
||||
public String Id { get; set; }
|
||||
public String Name { get; set; }
|
||||
public String SportId { get; set; }
|
||||
public String SportName { get; set; }
|
||||
public String RegionId { get; set; }
|
||||
public String RegionName { get; set; }
|
||||
}
|
||||
public OrganisationData Organisation { get; } = new OrganisationData();
|
||||
// Reference data.
|
||||
public List<CodeDesc> OpportunityTypes { get; } = new List<CodeDesc>();
|
||||
}
|
||||
@@ -95,11 +106,16 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
if (!ValidReferer) return Forbid();
|
||||
if (!ValidUserSession) return GetAjaxResult_InvalidSession(responseData);
|
||||
RefreshModel(model);
|
||||
SysId userAccountId = SessionData.User.UserAccountId;
|
||||
|
||||
// Organisation.
|
||||
SysId organisationId = model.ExtractSysId(model.Filter.OrganisationId);
|
||||
using (SaxOrganisation organisation = AccountMgr.GetOrganisationById(organisationId))
|
||||
// Record disposable items as they are created so all can be disposed when needed.
|
||||
using (DisposableCollection<SacsHierarchyItem> disposableItems = new DisposableCollection<SacsHierarchyItem>())
|
||||
{
|
||||
|
||||
// Organisation.
|
||||
SysId organisationId = model.ExtractSysId(model.Filter.OrganisationId);
|
||||
SaxOrganisation organisation = AccountMgr.GetOrganisationById(organisationId);
|
||||
disposableItems.Add(organisation);
|
||||
if (organisation == null || !organisation.IsStatusActive)
|
||||
{
|
||||
SaLogger.Warn(fn + " " + (organisation == null ? "Invalid" : "Inactive") + " organisation for Opportunity list. OrganisationId: '" + model.Filter.OrganisationId + "'");
|
||||
@@ -117,73 +133,85 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
|
||||
// User organisation.
|
||||
SaxUserOrganisation.Params prmUserOrganisation = new SaxUserOrganisation.Params();
|
||||
prmUserOrganisation.UserAccountIdsIncluded.Add(SessionData.User.UserAccountId);
|
||||
prmUserOrganisation.UserAccountIdsIncluded.Add(userAccountId);
|
||||
prmUserOrganisation.OrganisationIdsIncluded.Add(organisationId);
|
||||
prmUserOrganisation.UserAccountStatusCat = SaxUserAccount.StatusCat.ActiveOnly;
|
||||
prmUserOrganisation.StatusCat = SaxUserOrganisation.StatusCat.ActiveOnly;
|
||||
using (SaxUserOrganisation userOrganisation = AccountMgr.GetUserOrganisation(prmUserOrganisation))
|
||||
SaxUserOrganisation userOrganisation = AccountMgr.GetUserOrganisation(prmUserOrganisation);
|
||||
disposableItems.Add(userOrganisation);
|
||||
if (userOrganisation == null)
|
||||
{
|
||||
SaLogger.Warn(fn + " Invalid/inactive user organisation for Opportunity list. UserAccountId: " + SysId.ToString(userAccountId) + ". OrganisationId: " + model.Filter.OrganisationId + ".");
|
||||
return Json(responseData.SetMessage(messageTitle, Localiser["msg.error.system"]));
|
||||
}
|
||||
|
||||
// User details.
|
||||
responseData.User.CanManage = userOrganisation?.HasOrganisationRole(Sax.OrganisationRole.OpportunityAdmin) ?? false;
|
||||
// Organisation.
|
||||
responseData.Organisation.Id = SysId.ToString(organisation.Id);
|
||||
responseData.Organisation.Name = organisation.Name;
|
||||
responseData.Organisation.SportId = SysId.ToString(organisation.SportIdPrimary);
|
||||
responseData.Organisation.SportName = model.GetSportCaption(organisation.SportIdPrimary);
|
||||
responseData.Organisation.RegionId = SysId.ToString(organisation.RegionIdPrimary);
|
||||
responseData.Organisation.RegionName = model.GetRegionCaption(organisation.RegionIdPrimary);
|
||||
|
||||
// Item filter.
|
||||
SaxOrganisationOpportunity.Params prmOpportunity = new SaxOrganisationOpportunity.Params();
|
||||
prmOpportunity.UserAccountIdsIncluded.Add(SessionData.User.UserAccountId);
|
||||
prmOpportunity.OrganisationIdsIncluded.Add(organisationId);
|
||||
prmOpportunity.OpportunityFilter = model.Filter.Opportunity;
|
||||
prmOpportunity.StatusCat = SaxOrganisationOpportunity.StatusCat.NotDeleted;
|
||||
model.Paging.ItemTotal = (ulong)ActivityMgr.GetOrganisationOpportunityCount(prmOpportunity);
|
||||
model.PopulatePagingTo(prmOpportunity.ResultsPaging);
|
||||
// User details.
|
||||
responseData.User.CanManage = userOrganisation?.HasOrganisationRole(Sax.OrganisationRole.OpportunityAdmin) ?? false;
|
||||
|
||||
// Item columns.
|
||||
ColumnDfn colId = ActivityMgr.GetOrganisationOpportunityColumnDfn(SaxOrganisationOpportunity.Column.Id);
|
||||
ColumnDfn colOpportunityTypeCode = ActivityMgr.GetOrganisationOpportunityColumnDfn(SaxOrganisationOpportunity.Column.OpportunityTypeCode);
|
||||
ColumnDfn colPosition = ActivityMgr.GetOrganisationOpportunityColumnDfn(SaxOrganisationOpportunity.Column.Position);
|
||||
ColumnDfn colOutline = ActivityMgr.GetOrganisationOpportunityColumnDfn(SaxOrganisationOpportunity.Column.Outline);
|
||||
ColumnDfn colRegionId = ActivityMgr.GetOrganisationOpportunityColumnDfn(SaxOrganisationOpportunity.Column.RegionIdPrimary);
|
||||
ColumnDfn colRegionName = ActivityMgr.GetOrganisationOpportunityColumnDfn(SaxOrganisationOpportunity.Column.Region_Name);
|
||||
ColumnDfn colSportId = ActivityMgr.GetOrganisationOpportunityColumnDfn(SaxOrganisationOpportunity.Column.SportIdPrimary);
|
||||
ColumnDfn colSportName = ActivityMgr.GetOrganisationOpportunityColumnDfn(SaxOrganisationOpportunity.Column.Sport_Name);
|
||||
ColumnDfn colPublishedOn = ActivityMgr.GetOrganisationOpportunityColumnDfn(SaxOrganisationOpportunity.Column.PublishedAt_Date);
|
||||
ColumnDfn colExpiresOn = ActivityMgr.GetOrganisationOpportunityColumnDfn(SaxOrganisationOpportunity.Column.ExpiresAt_Date);
|
||||
ColumnDfn colStatus = ActivityMgr.GetOrganisationOpportunityColumnDfn(SaxOrganisationOpportunity.Column.Status);
|
||||
ColumnDfn colCreatedOn = ActivityMgr.GetOrganisationOpportunityColumnDfn(SaxOrganisationOpportunity.Column.CreateOn_Date);
|
||||
List<ColumnDfn> columns = new List<ColumnDfn>()
|
||||
// Item filter.
|
||||
SaxOrganisationOpportunity.Params prmOpportunity = new SaxOrganisationOpportunity.Params();
|
||||
prmOpportunity.UserAccountIdsIncluded.Add(userAccountId);
|
||||
prmOpportunity.OrganisationIdsIncluded.Add(organisationId);
|
||||
prmOpportunity.OpportunityFilter = model.Filter.Opportunity;
|
||||
prmOpportunity.StatusCat = SaxOrganisationOpportunity.StatusCat.NotDeleted;
|
||||
model.Paging.ItemTotal = (ulong)ActivityMgr.GetOrganisationOpportunityCount(prmOpportunity);
|
||||
model.PopulatePagingTo(prmOpportunity.ResultsPaging);
|
||||
|
||||
// Item columns.
|
||||
ColumnDfn colId = ActivityMgr.GetOrganisationOpportunityColumnDfn(SaxOrganisationOpportunity.Column.Id);
|
||||
ColumnDfn colOpportunityTypeCode = ActivityMgr.GetOrganisationOpportunityColumnDfn(SaxOrganisationOpportunity.Column.OpportunityTypeCode);
|
||||
ColumnDfn colPosition = ActivityMgr.GetOrganisationOpportunityColumnDfn(SaxOrganisationOpportunity.Column.Position);
|
||||
ColumnDfn colOutline = ActivityMgr.GetOrganisationOpportunityColumnDfn(SaxOrganisationOpportunity.Column.Outline);
|
||||
ColumnDfn colRegionId = ActivityMgr.GetOrganisationOpportunityColumnDfn(SaxOrganisationOpportunity.Column.RegionIdPrimary);
|
||||
ColumnDfn colRegionName = ActivityMgr.GetOrganisationOpportunityColumnDfn(SaxOrganisationOpportunity.Column.Region_Name);
|
||||
ColumnDfn colSportId = ActivityMgr.GetOrganisationOpportunityColumnDfn(SaxOrganisationOpportunity.Column.SportIdPrimary);
|
||||
ColumnDfn colSportName = ActivityMgr.GetOrganisationOpportunityColumnDfn(SaxOrganisationOpportunity.Column.Sport_Name);
|
||||
ColumnDfn colPublishedOn = ActivityMgr.GetOrganisationOpportunityColumnDfn(SaxOrganisationOpportunity.Column.PublishedAt_Date);
|
||||
ColumnDfn colExpiresOn = ActivityMgr.GetOrganisationOpportunityColumnDfn(SaxOrganisationOpportunity.Column.ExpiresAt_Date);
|
||||
ColumnDfn colStatus = ActivityMgr.GetOrganisationOpportunityColumnDfn(SaxOrganisationOpportunity.Column.Status);
|
||||
ColumnDfn colCreatedOn = ActivityMgr.GetOrganisationOpportunityColumnDfn(SaxOrganisationOpportunity.Column.CreateOn_Date);
|
||||
List<ColumnDfn> columns = new List<ColumnDfn>()
|
||||
{
|
||||
colId, colOpportunityTypeCode, colPosition, colOutline,
|
||||
colRegionId, colRegionName, colSportId, colSportName,
|
||||
colPublishedOn, colExpiresOn,
|
||||
colStatus, colCreatedOn
|
||||
};
|
||||
|
||||
// Sort columns.
|
||||
colCreatedOn.SortAscending = false;
|
||||
prmOpportunity.SortColumns.Add(colCreatedOn);
|
||||
|
||||
// Query items.
|
||||
using (DbResultSet resultSet = ActivityMgr.ExecuteOrganisationOpportunityQuery(columns, prmOpportunity))
|
||||
{
|
||||
while (resultSet != null && resultSet.HasRows && resultSet.NextRecord())
|
||||
{
|
||||
colId, colOpportunityTypeCode, colPosition, colOutline,
|
||||
colRegionId, colRegionName, colSportId, colSportName,
|
||||
colPublishedOn, colExpiresOn,
|
||||
colStatus, colCreatedOn
|
||||
};
|
||||
|
||||
// Sort columns.
|
||||
colCreatedOn.SortAscending = false;
|
||||
prmOpportunity.SortColumns.Add(colCreatedOn);
|
||||
|
||||
// Query items.
|
||||
using (DbResultSet resultSet = ActivityMgr.ExecuteOrganisationOpportunityQuery(columns, prmOpportunity))
|
||||
{
|
||||
while (resultSet != null && resultSet.HasRows && resultSet.NextRecord())
|
||||
NamedValue.Map values = resultSet.GetRecordValues();
|
||||
OpportunityData_List opportunityData = new OpportunityData_List()
|
||||
{
|
||||
NamedValue.Map values = resultSet.GetRecordValues();
|
||||
OpportunityData_List opportunityData = new OpportunityData_List()
|
||||
{
|
||||
Id = values.GetLong(colId.DataName).ToString(),
|
||||
TypeCode = values.GetString(colOpportunityTypeCode.DataName),
|
||||
TypeDesc = Localiser.GetOpportunityTypeCaption((Sax.OpportunityType)OpportunityTypeCodes.GetTypeForCode(values.GetString(colOpportunityTypeCode.DataName))),
|
||||
Position = values.GetString(colPosition.DataName),
|
||||
Outline = values.GetString(colOutline.DataName),
|
||||
RegionCaption = model.GetRegionCaption(values.GetString(colRegionId.DataName).ToSysId()),
|
||||
SportCaption = model.GetSportCaption(values.GetString(colSportId.DataName).ToSysId()),
|
||||
CreatedOnFmt = Localiser.FormatDate(values.GetDateTime(colCreatedOn.DataName)),
|
||||
PublishedOnFmt = Localiser.FormatDate(values.GetDateTime(colPublishedOn.DataName)),
|
||||
ExpiresOnFmt = Localiser.FormatDate(values.GetDateTime(colExpiresOn.DataName)),
|
||||
StatusCode = values.GetString(colStatus.DataName),
|
||||
StatusDesc = SacsSystem.GetStatusDescForCode(values.GetString(colStatus.DataName))
|
||||
};
|
||||
responseData.Opportunities.Add(opportunityData);
|
||||
}
|
||||
Id = values.GetLong(colId.DataName).ToString(),
|
||||
TypeCode = values.GetString(colOpportunityTypeCode.DataName),
|
||||
TypeDesc = Localiser.GetOpportunityTypeCaption((Sax.OpportunityType)OpportunityTypeCodes.GetTypeForCode(values.GetString(colOpportunityTypeCode.DataName))),
|
||||
Position = values.GetString(colPosition.DataName),
|
||||
Outline = values.GetString(colOutline.DataName),
|
||||
RegionCaption = model.GetRegionCaption(values.GetString(colRegionId.DataName).ToSysId()),
|
||||
SportCaption = model.GetSportCaption(values.GetString(colSportId.DataName).ToSysId()),
|
||||
CreatedOnFmt = Localiser.FormatDate(values.GetDateTime(colCreatedOn.DataName)),
|
||||
PublishedOnFmt = Localiser.FormatDate(values.GetDateTime(colPublishedOn.DataName)),
|
||||
ExpiresOnFmt = Localiser.FormatDate(values.GetDateTime(colExpiresOn.DataName)),
|
||||
StatusCode = values.GetString(colStatus.DataName),
|
||||
StatusDesc = SacsSystem.GetStatusDescForCode(values.GetString(colStatus.DataName))
|
||||
};
|
||||
responseData.Opportunities.Add(opportunityData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,14 +49,14 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
|
||||
// Check Regions.
|
||||
SysId regionIdCountry = model.ExtractSysId(model.OrganisationRegionIdCountry);
|
||||
SaxRegion regionCountry = Internals.GetRegion(regionIdCountry);
|
||||
SaxRegion.Data regionCountry = Internals.GetRegion(regionIdCountry);
|
||||
if (SysId.IsValid(regionIdCountry) && regionCountry == null)
|
||||
{
|
||||
SaLogger.Warn(fn + " Country region not found. Id: " + model.OrganisationRegionIdCountry + ". " + GetLogSuffix());
|
||||
return Json(responseData.SetGoHome(messageTitle, Localiser["msg.error.system"]));
|
||||
}
|
||||
SysId regionIdAddressProvince= model.ExtractSysId(model.OrganisationAddressRegionIdProvince);
|
||||
SaxRegion regionProvince = Internals.GetRegion(regionIdAddressProvince);
|
||||
SaxRegion.Data regionProvince = Internals.GetRegion(regionIdAddressProvince);
|
||||
if (SysId.IsValid(regionIdAddressProvince) && regionProvince == null)
|
||||
{
|
||||
SaLogger.Warn(fn + " Province region not found. Id: " + model.OrganisationAddressRegionIdProvince + ". " + GetLogSuffix());
|
||||
|
||||
@@ -37,6 +37,7 @@ namespace Saxonite.Net.Core.Web.Online.Models
|
||||
public String AccountTitle { get; set; }
|
||||
public String AccountFirstName { get; set; }
|
||||
public String AccountLastName { get; set; }
|
||||
public String AccountAbout { get; set; }
|
||||
public String AccountGender { get; set; }
|
||||
public Sax.Gender GetAccountGender()
|
||||
{
|
||||
@@ -106,6 +107,17 @@ namespace Saxonite.Net.Core.Web.Online.Models
|
||||
responseData.SetControlError(nameof(AccountLastName), Localiser["msg.validation.maximum.length", GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_LastName)]);
|
||||
}
|
||||
|
||||
// About.
|
||||
if (AccountAbout != null)
|
||||
{
|
||||
responseData.SetControlValue(nameof(AccountAbout), AccountAbout);
|
||||
if (!StringUtil.IsEmpty(AccountAbout))
|
||||
{
|
||||
if (StringUtil.GetLength(AccountAbout) > GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_About))
|
||||
responseData.SetControlError(nameof(AccountAbout), Localiser["msg.validation.maximum.length", GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_About)]);
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// Date of birth.
|
||||
if (AccountDobYear != null)
|
||||
@@ -135,7 +147,7 @@ namespace Saxonite.Net.Core.Web.Online.Models
|
||||
SysId regionIdCountry = ExtractSysId(AccountRegionIdCountry);
|
||||
if (AccountRegionIdCountry != null && SysId.IsValid(regionIdCountry))
|
||||
{
|
||||
SaxRegion regionCountry = Internals.GetRegion(regionIdCountry);
|
||||
SaxRegion.Data regionCountry = Internals.GetRegion(regionIdCountry);
|
||||
if (regionCountry == null)
|
||||
responseData.SetControlError(nameof(AccountRegionIdCountry), Localiser["msg.validation.invalid.value"]);
|
||||
}
|
||||
@@ -144,7 +156,7 @@ namespace Saxonite.Net.Core.Web.Online.Models
|
||||
if (AccountRegionIdProvince != null)
|
||||
{
|
||||
SysId regionIdProvince = ExtractSysId(AccountRegionIdProvince);
|
||||
SaxRegion regionProvince = Internals.GetRegion(regionIdProvince);
|
||||
SaxRegion.Data regionProvince = Internals.GetRegion(regionIdProvince);
|
||||
if (regionProvince == null)
|
||||
responseData.SetControlError(nameof(AccountRegionIdProvince), Localiser["msg.validation.invalid.value"]);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace Saxonite.Net.Core.Web.Online.Models
|
||||
{
|
||||
get
|
||||
{
|
||||
if (userCanManageOrganisationMembers == null && ValidUserSession)
|
||||
if (userCanManageOrganisationMembers == null && ValidUserSession)
|
||||
{
|
||||
SaxUserOrganisation.Params prmUserOrganisation = new SaxUserOrganisation.Params();
|
||||
prmUserOrganisation.UserAccountIdsIncluded.Add(SessionData.User.UserAccountId);
|
||||
@@ -158,7 +158,7 @@ namespace Saxonite.Net.Core.Web.Online.Models
|
||||
public List<RegionData> GetRegionDataList_Active()
|
||||
{
|
||||
List<RegionData> regions = new List<RegionData>();
|
||||
foreach (SaxRegion region in DataCacheConsole.GetActiveRegions())
|
||||
foreach (SaxRegion.Data region in DataCacheConsole.GetActiveRegions())
|
||||
{
|
||||
RegionData regionData = new RegionData()
|
||||
{
|
||||
@@ -177,10 +177,10 @@ namespace Saxonite.Net.Core.Web.Online.Models
|
||||
}
|
||||
public String GetRegionCaption(SysId regionId)
|
||||
{
|
||||
SaxRegion region = DataCacheConsole.GetActiveRegions().Find(item => item.Id.Equals(regionId));
|
||||
SaxRegion.Data region = DataCacheConsole.GetAllRegions().Find(item => item.Id.Equals(regionId));
|
||||
return Localiser.GetRegionName(region);
|
||||
}
|
||||
public String GetRegionCaption(SaxRegion region)
|
||||
public String GetRegionCaption(SaxRegion.Data region)
|
||||
{
|
||||
return Localiser.GetRegionName(region);
|
||||
}
|
||||
@@ -197,7 +197,7 @@ namespace Saxonite.Net.Core.Web.Online.Models
|
||||
public List<SportData> GetSportDataList_Active()
|
||||
{
|
||||
List<SportData> sports = new List<SportData>();
|
||||
foreach (SaxSport sport in DataCacheConsole.GetActiveSports())
|
||||
foreach (SaxSport.Data sport in DataCacheConsole.GetActiveSports())
|
||||
{
|
||||
SportData sportData = new SportData()
|
||||
{
|
||||
@@ -210,14 +210,45 @@ namespace Saxonite.Net.Core.Web.Online.Models
|
||||
}
|
||||
return sports;
|
||||
}
|
||||
// Sport caption.
|
||||
public String GetSportCaption(SysId sportId)
|
||||
{
|
||||
SaxSport sport = DataCacheConsole.GetActiveSports().Find(item => item.Id.Equals(sportId));
|
||||
SaxSport.Data sport = DataCacheConsole.GetAllSports().Find(item => item.Id.Equals(sportId));
|
||||
return GetSportCaption(sport);
|
||||
}
|
||||
public String GetSportCaption(SaxSport.Data sport)
|
||||
{
|
||||
if (sport == null) return "";
|
||||
return Localiser.GetSportName(sport);
|
||||
}
|
||||
public String GetSportCaption(SaxSport sport)
|
||||
// Speciality type.
|
||||
public bool SportSpecialityNotRelevant(SysId sportId)
|
||||
{
|
||||
return Localiser.GetSportName(sport);
|
||||
SaxSport.Data sport = DataCacheConsole.GetAllSports().Find(item => item.Id.Equals(sportId));
|
||||
return SportSpecialityNotRelevant(sport);
|
||||
}
|
||||
public bool SportSpecialityNotRelevant(SaxSport.Data sport)
|
||||
{
|
||||
if (sport == null) return true;
|
||||
return sport.SpecialityLabel == Sax.SportSpecialityLabel.NotRelevant;
|
||||
}
|
||||
// Speciality label.
|
||||
public String GetSportSpecialityLabel(SysId sportId)
|
||||
{
|
||||
SaxSport.Data sport = DataCacheConsole.GetAllSports().Find(item => item.Id.Equals(sportId));
|
||||
return GetSportSpecialityLabel(sport);
|
||||
}
|
||||
public String GetSportSpecialityLabel(SaxSport.Data sport)
|
||||
{
|
||||
if (sport == null) return "";
|
||||
switch (sport.SpecialityLabel)
|
||||
{
|
||||
case Sax.SportSpecialityLabel.Positon:
|
||||
return Localiser["label.position"];
|
||||
case Sax.SportSpecialityLabel.Discipline:
|
||||
return Localiser["label.discipline"];
|
||||
}
|
||||
return Localiser["label.speciality"];
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
@@ -68,8 +68,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* User Contact Details form *@
|
||||
<div class="sax-panel-form">
|
||||
|
||||
@* User Contact Details form - Header *@
|
||||
<div class="sax-header">
|
||||
<div class="row">
|
||||
<div class="col"><div class="sax-caption">@Localiser["account.caption.profile.contact"]</div></div>
|
||||
@@ -78,74 +80,110 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* User Contact Details form - Content *@
|
||||
<div class="sax-content">
|
||||
|
||||
<div class="spacer2"></div>
|
||||
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmProfileContact", @class = "sax-form", @onSubmit = "return false;" }))
|
||||
{
|
||||
|
||||
@* User email *@
|
||||
<div class="sax-form-control AccountEmailAddress">
|
||||
<div class="sax-label">
|
||||
<label for="ifAccountEmailAddress"><span>@Localiser["label.email"]</span><span class="required"> *</span></label>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="ifAccountEmailAddress"><span>@Localiser["label.email"]</span><span class="required"> *</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control">
|
||||
@Html.TextBoxFor(model => model.AccountEmailAddress, new { @id = "ifAccountEmailAddress", @class = "AccountEmailAddress sax-input", @readonly = "readonly", @maxlength = @Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_EmailAddress) })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
@Html.TextBoxFor(model => model.AccountEmailAddress, new { @id = "ifAccountEmailAddress", @class = "AccountEmailAddress sax-input", @readonly = "readonly", @maxlength = @Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_EmailAddress) })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@* User Name *@
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-4">
|
||||
@* User first Title *@
|
||||
<div class="sax-form-control AccountTitle pr8">
|
||||
<div class="sax-label">
|
||||
<label for="cbAccountTitle"><span>@Localiser["label.title"]</span></label>
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label d-none d-sm-block">
|
||||
<label for="ifAccountEmailAddress"><span>@Localiser["label.name"]</span></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm row">
|
||||
|
||||
<div class="col-sm-4">
|
||||
@* User first Title *@
|
||||
<div class="sax-form-control AccountTitle pr8">
|
||||
<div class="sax-label">
|
||||
<label for="cbAccountTitle"><span>@Localiser["label.title"]</span></label>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
@Html.DropDownListFor(model => model.AccountTitle, Model.TitlesForSelect, Localiser["label.select"], new { @id = "cbAccountTitle", @class = "AccountTitle sax-select" })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4">
|
||||
@* User first name *@
|
||||
<div class="sax-form-control AccountFirstName pr8">
|
||||
<div class="sax-label">
|
||||
<label for="ifAccountFirstName"><span>@Localiser["label.first.name"]</span><span class="required"> *</span></label>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
@Html.TextBoxFor(model => model.AccountFirstName, new { @id = "ifAccountFirstName", @class = "AccountFirstName sax-input", @maxlength = @Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_FirstName) })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4">
|
||||
@* User last name *@
|
||||
<div class="sax-form-control AccountLastName">
|
||||
<div class="sax-label">
|
||||
<label for="ifAccountLastName"><span>@Localiser["label.last.name"]</span><span class="required"> *</span></label>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
@Html.TextBoxFor(model => model.AccountLastName, new { @id = "ifAccountLastName", @class = "AccountLastName sax-input", @maxlength = @Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_LastName) })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* About *@
|
||||
<div class="sax-form-control AccountAbout">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="ifAccountAbout"><span>@Localiser["label.about"]</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control">
|
||||
@Html.DropDownListFor(model => model.AccountTitle, Model.TitlesForSelect, Localiser["label.select"], new { @id = "cbAccountTitle", @class = "AccountTitle sax-select" })
|
||||
@Html.TextAreaFor(model => model.AccountAbout, new { @id = "ifAccountAbout", @class = "AccountAbout sax-input", @rows = 4, @maxlength = @Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_About) })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4">
|
||||
@* User first name *@
|
||||
<div class="sax-form-control AccountFirstName pr8">
|
||||
<div class="sax-label">
|
||||
<label for="ifAccountFirstName"><span>@Localiser["label.first.name"]</span><span class="required"> *</span></label>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
@Html.TextBoxFor(model => model.AccountFirstName, new { @id = "ifAccountFirstName", @class = "AccountFirstName sax-input", @maxlength = @Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_FirstName) })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4">
|
||||
@* User last name *@
|
||||
<div class="sax-form-control AccountLastName">
|
||||
<div class="sax-label">
|
||||
<label for="ifAccountLastName"><span>@Localiser["label.last.name"]</span><span class="required"> *</span></label>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
@Html.TextBoxFor(model => model.AccountLastName, new { @id = "ifAccountLastName", @class = "AccountLastName sax-input", @maxlength = @Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.UserAccount_LastName) })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@* Gender *@
|
||||
<div class="sax-form-control AccountGender">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="cbAccountGender"><span>@Localiser["label.gender"]</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="col-sm">
|
||||
<div class="sax-control">
|
||||
<select name="AccountGender" id="cbAccountGender" class="AccountGender sax-select"></select>
|
||||
</div>
|
||||
@@ -157,7 +195,7 @@
|
||||
@* Date of birth *@
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-4">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-form-control AccountDob">
|
||||
<div class="sax-label">
|
||||
<label for="ifAccountRegionIdCountry"><span>@Localiser["label.date.of.birth"]</span></label>
|
||||
@@ -165,17 +203,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<div class="col-sm">
|
||||
<div class="row">
|
||||
|
||||
@* DOB Day *@
|
||||
@* DOB Year *@
|
||||
<div class="col-4">
|
||||
<div class="sax-form-control AccountDobDay pr8">
|
||||
<div class="sax-form-control AccountDobYear pr8">
|
||||
<div class="sax-label">
|
||||
<label for="cbAccountDobDay"><span>@Localiser["label.day"]</span></label>
|
||||
<label for="cbAccountDobYear"><span>@Localiser["label.year"]</span></label>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
<select name="AccountDobDay" id="cbAccountDobDay" class="AccountDobDay sax-select" onchange="sax.refreshDob();"></select>
|
||||
<select name="AccountDobYear" id="cbAccountDobYear" class="AccountDobYear sax-select" onchange="sax.refreshDob();"></select>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
@@ -194,14 +232,14 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* DOB Year *@
|
||||
@* DOB Day *@
|
||||
<div class="col-4">
|
||||
<div class="sax-form-control AccountDobYear">
|
||||
<div class="sax-form-control AccountDobDay">
|
||||
<div class="sax-label">
|
||||
<label for="cbAccountDobYear"><span>@Localiser["label.year"]</span></label>
|
||||
<label for="cbAccountDobDay"><span>@Localiser["label.day"]</span></label>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
<select name="AccountDobYear" id="cbAccountDobYear" class="AccountDobYear sax-select" onchange="sax.refreshDob();"></select>
|
||||
<select name="AccountDobDay" id="cbAccountDobDay" class="AccountDobDay sax-select" onchange="sax.refreshDob();"></select>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
@@ -216,12 +254,12 @@
|
||||
@* Country Region *@
|
||||
<div class="sax-form-control AccountRegionIdCountry">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="ifAccountRegionIdCountry"><span>@Localiser["label.country"]</span><span class="required"> *</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="col-sm">
|
||||
<div class="sax-control row">
|
||||
@Html.HiddenFor(model => model.AccountRegionIdCountry, new { @id = "ifAccountRegionIdCountry", @class = "AccountRegionIdCountry" })
|
||||
<div class="col"><input type="text" id="ifAccountRegionCaptionCountry" class="AccountRegionCaptionCountry sax-input" readonly="readonly" onDblClick="sax.selectRegionCountry()" /></div>
|
||||
@@ -234,27 +272,34 @@
|
||||
|
||||
@* Account image *@
|
||||
<div class="sax-form-control AccountContactImage">
|
||||
<div class="sax-label">
|
||||
<label for="ifAccountImage"><span>@Localiser["label.image"]</span></label>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
<div id="pnlContactImageDrop" class="sax-panel-drop row">
|
||||
<div class="fixed">
|
||||
<div class=""><img src="" class="sax-contact-image AccountContact" alt="" title="" /></div>
|
||||
</div>
|
||||
<div class="col">
|
||||
Drag your image here.
|
||||
<div class="DropMessage"></div>
|
||||
<div class="UploadMessage"></div>
|
||||
<div class="spacer4"></div>
|
||||
<button id="pbSelectContactImage" class="sax-button" style="min-width:auto;margin-left:4px;padding:4px 6px" onclick="sax.selectContactImage()">@Localiser["label.select"]</button>
|
||||
</div>
|
||||
<div class="fixed">
|
||||
<img id="" class="ContactImageUploadProgress" src="~/img/animated/progress-basketball-32.gif" style="display:none;margin:8px 4px;" />
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="ifAccountImage"><span>@Localiser["label.image"]</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control">
|
||||
<div id="pnlContactImageDrop" class="sax-panel-drop row">
|
||||
<div class="fixed">
|
||||
<div class=""><img src="" class="sax-contact-image AccountContact" alt="" title="" /></div>
|
||||
</div>
|
||||
<div class="col">
|
||||
@Localiser["label.drag.image.here"]
|
||||
<div class="DropMessage"></div>
|
||||
<div class="UploadMessage"></div>
|
||||
<div class="spacer4"></div>
|
||||
@Localiser["label.alternatively"]:
|
||||
<button id="pbSelectContactImage" class="sax-button" style="min-width:auto;margin-left:4px;padding:4px 6px;z-index:999;" onclick="sax.selectContactImage()">@Localiser["label.upload"]</button>
|
||||
</div>
|
||||
<div class="fixed">
|
||||
<img id="" class="ContactImageUploadProgress" src="~/img/animated/progress-basketball-32.gif" style="display:none;margin:8px 4px;" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@* Action buttons *@
|
||||
@@ -266,6 +311,8 @@
|
||||
|
||||
}
|
||||
|
||||
<div class="spacer2"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="dlgSelectContactImage" class="sax-dialog">
|
||||
@@ -288,8 +335,6 @@
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="spacer2"></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<li class="dropdown-toggle caret-off">
|
||||
<a href="#" class="dropdown" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="navbar-toggler-icon"></span></a>
|
||||
<ul class="dropdown-menu dropdown-menu-right sax-dropdown-menu">
|
||||
<li><div class="sax-action sax-dropdown-item" onclick="sax.orgReq.fn.requestOrganisation();">@Localiser["organisation.caption.organisation.request"]</div></li>
|
||||
<li class="sax-action sax-users sax-dropdown-item" onclick="sax.orgReq.fn.requestOrganisation();"><div class="sax-label">@Localiser["organisation.caption.organisation.request"]</div></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
@model SaxModel_Online
|
||||
@inject SaxLocaliser Localiser
|
||||
|
||||
@* Sport Experience panel - list experience for sport *@
|
||||
<div class="sax-panel sax-panel-info ProfileSportExperience hidden">
|
||||
|
||||
<script type="text/javascript">
|
||||
sax.lbl.speciality = '@Localiser.GetJavascriptText("label.speciality")';
|
||||
</script>
|
||||
|
||||
<div class="sax-header">
|
||||
<div class="row">
|
||||
<div class="col"><div class="sax-caption"><span>@Localiser["account.caption.profile.sports.experience"] - </span><span class="SportName"></span></div></div>
|
||||
@@ -12,7 +17,7 @@
|
||||
<li class="dropdown-toggle caret-off">
|
||||
<a href="#" class="dropdown" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="navbar-toggler-icon"></span></a>
|
||||
<ul class="dropdown-menu dropdown-menu-right sax-dropdown-menu">
|
||||
<li class="sax-dropdown-item sax-action" onclick="sax.addSportExperience()"><div class="sax-label">@(Localiser["label.add"])</div></li>
|
||||
<li class="sax-dropdown-item sax-action sax-add" onclick="sax.addSportExperience()"><div class="sax-label">@(Localiser["label.add"])</div></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -172,7 +177,7 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for=""><span>@Localiser["label.speciality"]</span></label>
|
||||
<label for=""><span class="sax-label-text">@Localiser["label.speciality"]</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
|
||||
@@ -4,19 +4,34 @@
|
||||
ViewData["Title"] = "Journalist - Articles";
|
||||
}
|
||||
|
||||
<div class="">
|
||||
<div class="sax-panel Articles">
|
||||
|
||||
<script type="text/javascript">
|
||||
sax.lbl.edit = '@(Localiser.GetJavascriptText("label.edit"))';
|
||||
sax.lbl.remove = '@(Localiser.GetJavascriptText("label.remove"))';
|
||||
</script>
|
||||
|
||||
@* Filter Form *@
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmArticleFilter", @class = "sax-form", @action = "#", @method = "POST", onsubmit = "return false;" }))
|
||||
{
|
||||
|
||||
@* Filter panel *@
|
||||
<div class="sax-panel-filter">
|
||||
<div class="sax-header row">
|
||||
<div class="col"><div class="sax-caption">@Localiser["article.caption.articles"]</div></div>
|
||||
<div class="fixed row">
|
||||
<div>
|
||||
<div class="col">
|
||||
<partial name="~/Views/Common/ResultsPaging.cshtml" />
|
||||
</div>
|
||||
<div class="sax-action sax-results-refresh"><img src="~/img/action/refresh24.png" alt="@(Localiser["label.refresh"])" title="@(Localiser["label.refresh"])" /></div>
|
||||
<div class="sax-action sax-item-create"><img src="~/img/action/add24.png" alt="@(Localiser["label.create"])" title="@(Localiser["label.create"])" /></div>
|
||||
<div class="fixed">
|
||||
@* Burger menu *@
|
||||
<ul class="nav navbar-nav navbar-dark navbar-right sax-burger">
|
||||
<li class="dropdown-toggle caret-off">
|
||||
<a href="#" class="dropdown" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="navbar-toggler-icon"></span></a>
|
||||
<ul class="dropdown-menu dropdown-menu-right sax-dropdown-menu">@* Menu items will be inserted here. *@</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-content">
|
||||
@@ -36,20 +51,40 @@
|
||||
<div class="col-sm-8"><input type="search" name="Filter.Article" id="ifArticleFilter" class="ArticleFilter sax-input" maxlength="64" /></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* Filter item templates *@
|
||||
<div class="sax-panel-item-template">
|
||||
@* Burger dropdown item template - ul is ignored *@
|
||||
<ul class="sax-dropdown-menu Articles">
|
||||
<li class="sax-dropdown-item sax-action"><div class="sax-label">...</div></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
@* Results Panel *@
|
||||
<div class="sax-panel-results">
|
||||
<div class="sax-panel-messages"></div>
|
||||
<div class="sax-panel-item-list"></div>
|
||||
|
||||
@* Element templates *@
|
||||
<div class="sax-panel-item-template">
|
||||
|
||||
@* Article item template *@
|
||||
<div class="sax-panel-item Article">
|
||||
<div class="sax-header row">
|
||||
<div class="col">
|
||||
<div class="sax-caption"><div class="sax-action ArticleHeadline"></div></div>
|
||||
</div>
|
||||
<div class="fixed sax-actions">
|
||||
<div class="sax-action sax-item-update"><img src="~/img/action/edit24.png" alt="@(Localiser["label.update"])" title="@(Localiser["label.update"])" /></div>
|
||||
@* Burger menu *@
|
||||
<ul class="nav navbar-nav navbar-light navbar-right sax-burger">
|
||||
<li class="dropdown-toggle caret-off">
|
||||
<a href="#" class="dropdown" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="navbar-toggler-icon"></span></a>
|
||||
<ul class="dropdown-menu dropdown-menu-right sax-dropdown-menu">@* Menu items will be inserted here. *@</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-content">
|
||||
@@ -65,6 +100,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* Burger dropdown item template - ul is ignored *@
|
||||
<ul class="sax-dropdown-menu Article">
|
||||
<li class="sax-dropdown-item sax-action"><div class="sax-label">...</div></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -72,4 +113,3 @@
|
||||
|
||||
<partial name="~/Views/Common/OrganisationSelect.cshtml" />
|
||||
<partial name="Panel-ArticleDialog.cshtml" />
|
||||
|
||||
|
||||
@@ -10,12 +10,17 @@
|
||||
sax.dlg.title.selectRegion = '@Localiser.GetJavascriptText("reference.caption.region.select")';
|
||||
sax.dlg.title.selectSport = '@Localiser.GetJavascriptText("reference.caption.sport.select")';
|
||||
</script>
|
||||
|
||||
@* Article Id form *@
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmArticleId", @class = "sax-form" }))
|
||||
{
|
||||
@Html.HiddenFor(model => model.ArticleId, new { @class = "ArticleId" })
|
||||
}
|
||||
|
||||
@* Article dialog and form *@
|
||||
<div id="dlgArticle" class="sax-dialog" title="">
|
||||
|
||||
<div class="spacer2"></div>
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmArticle", @class = "sax-form", @onSubmit = "return false;" }))
|
||||
{
|
||||
@Html.HiddenFor(model => model.ArticleId, new { @id = "ifArticleId", @class = "ArticleId" })
|
||||
@@ -29,8 +34,8 @@
|
||||
@* Organisation *@
|
||||
<div class="sax-form-control ArticleOrganisation">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="sax-label right pt4 pr8">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label pt4 pr8">
|
||||
<label for="ifArticleOrganisation"><span>@Localiser["label.organisation"]</span></label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -66,45 +71,63 @@
|
||||
|
||||
@* Sport *@
|
||||
<div class="sax-form-control ArticleSportId">
|
||||
<div class="sax-label">
|
||||
<label for="ifArticleSportId"><span>@Localiser["label.sport"]</span><span class="required"> *</span></label>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="ifArticleSportId"><span>@Localiser["label.sport"]</span><span class="required"> *</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control row">
|
||||
@Html.HiddenFor(model => model.ArticleSportId, new { @id = "ifArticleSportId", @class = "ArticleSportId" })
|
||||
<div class="col">@Html.TextBoxFor(model => model.ArticleSportCaption, new { @id = "ifArticleSportCaption", @class = "ArticleSportCaption sax-input", @readonly = "readonly", @onDblClick = "sax.selectSport()" }) </div>
|
||||
<div class="fixed"><button class="SelectSport sax-button" style="min-width:auto;margin-left:4px;padding:4px 6px" onclick="sax.selectSport()">@Localiser["label.select"]</button></div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-control row">
|
||||
@Html.HiddenFor(model => model.ArticleSportId, new { @id = "ifArticleSportId", @class = "ArticleSportId" })
|
||||
<div class="col">@Html.TextBoxFor(model => model.ArticleSportCaption, new { @id = "ifArticleSportCaption", @class = "ArticleSportCaption sax-input", @readonly = "readonly", @onDblClick = "sax.selectSport()" }) </div>
|
||||
<div class="fixed"><button class="SelectSport sax-button" style="min-width:auto;margin-left:4px;padding:4px 6px" onclick="sax.selectSport()">@Localiser["label.select"]</button></div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@* Region *@
|
||||
<div class="sax-form-control ArticleRegionId">
|
||||
<div class="sax-label">
|
||||
<label for="ifArticleRegionId"><span>@Localiser["label.region"]</span><span class="required"> *</span></label>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="ifArticleRegionId"><span>@Localiser["label.region"]</span><span class="required"> *</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control row">
|
||||
@Html.HiddenFor(model => model.ArticleRegionId, new { @id = "ifArticleRegionId", @class = "ArticleRegionId" })
|
||||
<div class="col">@Html.TextBoxFor(model => model.ArticleRegionCaption, new { @id = "ifArticleRegionCaption", @class = "ArticleRegionCaption sax-input", @readonly = "readonly", @onDblClick = "sax.selectRegion()" }) </div>
|
||||
<div class="fixed"><button class="SelectRegion sax-button" style="min-width:auto;margin-left:4px;padding:4px 6px" onclick="sax.selectRegion()">@Localiser["label.select"]</button></div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-control row">
|
||||
@Html.HiddenFor(model => model.ArticleRegionId, new { @id = "ifArticleRegionId", @class = "ArticleRegionId" })
|
||||
<div class="col">@Html.TextBoxFor(model => model.ArticleRegionCaption, new { @id = "ifArticleRegionCaption", @class = "ArticleRegionCaption sax-input", @readonly = "readonly", @onDblClick = "sax.selectRegion()" }) </div>
|
||||
<div class="fixed"><button class="SelectRegion sax-button" style="min-width:auto;margin-left:4px;padding:4px 6px" onclick="sax.selectRegion()">@Localiser["label.select"]</button></div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@* Publication *@
|
||||
<div class="sax-form-control ArticlePublication">
|
||||
<div class="sax-label">
|
||||
<label for="ifArticleRegionId"><span>@Localiser["label.publication"]</span></label>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
<div class="row ArticlePublish">
|
||||
<div class="fixed"><div class="pl16 pt4 pr8">@Html.CheckBoxFor(model => model.ArticlePublish, new { @id = "chkArticlePublish", @class = "ArticlePublish" }) <span class="" onclick="$('#chkArticlePublish').click()">@Localiser["label.publish"]</span></div></div>
|
||||
<div class="col">@Html.TextBoxFor(model => model.ArticlePublishOn, new { @id = "ifArticlePublishOn", @class = "sax-input sax-calendar ArticlePublishOn", @readonly = "readonly" })</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="ifArticleRegionId"><span>@Localiser["label.publication"]</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row ArticlePublished">
|
||||
<div class="col"><div class="pl16">@Localiser["label.published"]: <span class="ArticlePublishedOn"></span></div></div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control">
|
||||
<div class="row ArticlePublish">
|
||||
<div class="fixed"><div class="pl16 pt4 pr8">@Html.CheckBoxFor(model => model.ArticlePublish, new { @id = "chkArticlePublish", @class = "ArticlePublish" }) <span class="" onclick="$('#chkArticlePublish').click()">@Localiser["label.publish"]</span></div></div>
|
||||
<div class="col">@Html.TextBoxFor(model => model.ArticlePublishOn, new { @id = "ifArticlePublishOn", @class = "sax-input sax-calendar ArticlePublishOn", @readonly = "readonly" })</div>
|
||||
</div>
|
||||
<div class="row ArticlePublished">
|
||||
<div class="col"><div class="pl16">@Localiser["label.published"]: <span class="ArticlePublishedOn"></span></div></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -151,37 +174,39 @@
|
||||
</div>
|
||||
|
||||
}
|
||||
<div class="spacer2"></div>
|
||||
|
||||
<div id="dlgSelectArticleImage" class="sax-dialog">
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmSelectArticleImage", @class = "sax-form", @onSubmit = "return false;" }))
|
||||
{
|
||||
<input type="hidden" class="SegmentIdx" />
|
||||
<div class="spacer4"></div>
|
||||
<div class="sax-form-control ArticleImage">
|
||||
<div class="row">
|
||||
<div class="fixed"><div style="padding:0 12px;">@Localiser["label.image"]</div></div>
|
||||
<div class="col"><input type="file" id="ifArticleImage" name="" class="fullwidth" style="" /></div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
<div class="spacer2"></div>
|
||||
</div>
|
||||
|
||||
@* Article Image upload dialog and form *@
|
||||
<div id="dlgSelectArticleImage" class="sax-dialog">
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmSelectArticleImage", @class = "sax-form", @onSubmit = "return false;" }))
|
||||
{
|
||||
<input type="hidden" class="SegmentIdx" />
|
||||
<div class="spacer4"></div>
|
||||
<div class="sax-form-control ArticleImage">
|
||||
<div class="row">
|
||||
<div class="col"><div class="UploadMessage"></div></div>
|
||||
<div class="fixed"><img class="ArticleImageUploadProgress" src="~/img/animated/progress-basketball-32.gif" style="display:none;margin:8px 4px;" /></div>
|
||||
<div class="fixed"><div style="padding:0 12px;">@Localiser["label.image"]</div></div>
|
||||
<div class="col"><input type="file" id="ifArticleImage" name="" class="fullwidth" style="" /></div>
|
||||
</div>
|
||||
<div class="spacer2"></div>
|
||||
}
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
<div class="spacer2"></div>
|
||||
<div class="row">
|
||||
<div class="col"><div class="UploadMessage"></div></div>
|
||||
<div class="fixed"><img class="ArticleImageUploadProgress" src="~/img/animated/progress-basketball-32.gif" style="display:none;margin:8px 4px;" /></div>
|
||||
</div>
|
||||
<div class="spacer2"></div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
sax.dlg.title.imageUpload = '@Localiser.GetJavascriptText("account.caption.image.upload")';
|
||||
sax.msg.uploadFileSelect = '@Localiser.GetJavascriptText("msg.upload.file.select")';
|
||||
sax.msg.uploadImageSingle = '@Localiser.GetJavascriptText("msg.upload.image.single")';
|
||||
sax.msg.uploadFileSizeMax = '@Localiser.GetJavascriptText("msg.upload.file.size.max","{0}")';
|
||||
sax.msg.uploadFileTypeInvalid = '@Localiser.GetJavascriptText("msg.upload.file.type.invalid","{0}")';
|
||||
sax.msg.uploadingFile = '@Localiser.GetJavascriptText("msg.upload.file.uploading","{0}")';
|
||||
</script>
|
||||
<partial name="~/Views/Common/SportSelect.cshtml" />
|
||||
<partial name="~/Views/Common/RegionSelect.cshtml" />
|
||||
|
||||
</div>
|
||||
</script>
|
||||
<partial name="~/Views/Common/SportSelect.cshtml" />
|
||||
<partial name="~/Views/Common/RegionSelect.cshtml" />
|
||||
|
||||
@@ -106,7 +106,12 @@ else
|
||||
<div class="sax-panel-item Article">
|
||||
<div class="ArticleHeadline"></div>
|
||||
<div class="ArticleSummary"></div>
|
||||
<div class="ArticleAuthor"></div>
|
||||
<div class="ArticleOrigin">
|
||||
<div class="row">
|
||||
<div class="col"><div class="ArticleAuthor"></div></div>
|
||||
<div class="fixed right"><div class="ArticleOrganisation"></div></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ArticleContent">
|
||||
<div class="ArticleContentSegments"></div>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
ViewData["Title"] = "Organisation - Members";
|
||||
}
|
||||
|
||||
<div id="pnlMembers" class="sax-panel">
|
||||
<div class="sax-panel Members">
|
||||
|
||||
<script type="text/javascript">
|
||||
sax.lbl.edit = '@(Localiser.GetJavascriptText("label.edit"))';
|
||||
@@ -17,32 +17,27 @@
|
||||
sax.dlg.title.activate = '@(Localiser.GetJavascriptText("account.activate.caption"))';
|
||||
</script>
|
||||
|
||||
@* Filter panel *@
|
||||
<div class="sax-panel-filter">
|
||||
@* Filter header *@
|
||||
<div class="sax-header row">
|
||||
@* Filter caption *@
|
||||
<div class="col"><div class="sax-caption">@Localiser["organisation.members"]</div></div>
|
||||
<div class="fixed row">
|
||||
@* Burger menu *@
|
||||
<ul class="nav navbar-nav navbar-dark navbar-right sax-burger">
|
||||
<li class="dropdown-toggle caret-off">
|
||||
<a href="#" class="dropdown" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="navbar-toggler-icon"></span></a>
|
||||
<ul class="dropdown-menu dropdown-menu-right sax-dropdown-menu">@* Menu items will be inserted here. *@</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@* Filter item templates *@
|
||||
<div class="sax-panel-item-template">
|
||||
@* Burger dropdown item template - ul is ignored *@
|
||||
<ul class="sax-dropdown-menu Members">
|
||||
<li class="sax-dropdown-item sax-action"><div class="sax-label">...</div></li>
|
||||
@* Filter Form *@
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmMemberFilter", @class = "sax-form", @action = "#", @method = "POST", onsubmit = "return false;" }))
|
||||
{
|
||||
|
||||
@* Filter panel *@
|
||||
<div class="sax-panel-filter">
|
||||
@* Filter header *@
|
||||
<div class="sax-header row">
|
||||
@* Filter caption *@
|
||||
<div class="col"><div class="sax-caption">@Localiser["organisation.members"]</div></div>
|
||||
<div class="fixed row">
|
||||
@* Burger menu *@
|
||||
<ul class="nav navbar-nav navbar-dark navbar-right sax-burger">
|
||||
<li class="dropdown-toggle caret-off">
|
||||
<a href="#" class="dropdown" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="navbar-toggler-icon"></span></a>
|
||||
<ul class="dropdown-menu dropdown-menu-right sax-dropdown-menu">@* Menu items will be inserted here. *@</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-content">
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmMemberFilter", @class = "sax-form", @action = "#", @method = "POST", onsubmit = "return false;" }))
|
||||
{
|
||||
<div class="sax-content">
|
||||
<div class="sax-control row">
|
||||
<div class="col-sm-4"><div class="sax-label text-left text-sm-right">@Localiser["label.organisation"]</div></div>
|
||||
<div class="col-sm-8 row">
|
||||
@@ -55,19 +50,29 @@
|
||||
<div class="col-sm-4"><div class="sax-label text-left text-sm-right">@Localiser["label.search"]</div></div>
|
||||
<div class="col-sm-8"><input type="search" id="ifMemberFilter" name="Filter.Member" class="MemberFilter sax-input" maxlength="64" autocomplete="off" /></div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@* Filter item templates *@
|
||||
<div class="sax-panel-item-template">
|
||||
@* Burger dropdown item template - ul is ignored *@
|
||||
<ul class="sax-dropdown-menu Members">
|
||||
<li class="sax-dropdown-item sax-action"><div class="sax-label">...</div></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
}
|
||||
|
||||
@* Results Panel *@
|
||||
<div class="sax-panel-results">
|
||||
<div class="sax-panel-messages"></div>
|
||||
<div class="sax-panel-item-list"></div>
|
||||
|
||||
@* element templates *@
|
||||
@* Element templates *@
|
||||
<div class="sax-panel-item-template">
|
||||
|
||||
@* Member item template *@
|
||||
@* Item template *@
|
||||
<div class="sax-panel-item Member">
|
||||
<div class="sax-header row">
|
||||
<div class="col">
|
||||
|
||||
@@ -4,19 +4,32 @@
|
||||
ViewData["Title"] = "Organisation - Opportunities";
|
||||
}
|
||||
|
||||
<div id="pnlOpportunities">
|
||||
<div class="sax-panel Opportunities">
|
||||
|
||||
<div class="sax-panel-filter">
|
||||
<div class="sax-header row">
|
||||
<div class="col"><div class="sax-caption">@Localiser["organisation.caption.opportunities"]</div></div>
|
||||
<div class="fixed row">
|
||||
<div class="sax-action sax-results-refresh"><img src="~/img/action/refresh24.png" alt="@(Localiser["label.refresh"])" title="@(Localiser["label.refresh"])" /></div>
|
||||
<div class="sax-action sax-item-create hidden"><img src="~/img/action/add24.png" alt="@(Localiser["label.create"])" title="@(Localiser["label.create"])" /></div>
|
||||
<script type="text/javascript">
|
||||
sax.lbl.edit = '@(Localiser.GetJavascriptText("label.edit"))';
|
||||
</script>
|
||||
|
||||
@* Filter Form *@
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmOpportunityFilter", @class = "sax-form", @action = "#", @method = "POST", onsubmit = "return false;" }))
|
||||
{
|
||||
|
||||
@* Filter Panel *@
|
||||
<div class="sax-panel-filter">
|
||||
@* Filter header *@
|
||||
<div class="sax-header row">
|
||||
<div class="col"><div class="sax-caption">@Localiser["organisation.caption.opportunities"]</div></div>
|
||||
<div class="fixed row">
|
||||
@* Burger menu *@
|
||||
<ul class="nav navbar-nav navbar-dark navbar-right sax-burger">
|
||||
<li class="dropdown-toggle caret-off">
|
||||
<a href="#" class="dropdown" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="navbar-toggler-icon"></span></a>
|
||||
<ul class="dropdown-menu dropdown-menu-right sax-dropdown-menu">@* Menu items will be inserted here. *@</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-content">
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmOpportunityFilter", @class = "sax-form", @action = "#", @method = "POST", onsubmit = "return false;" }))
|
||||
{
|
||||
<div class="sax-content">
|
||||
<div class="sax-control row">
|
||||
<div class="col-sm-4"><div class="sax-label text-left text-sm-right">@Localiser["label.organisation"]</div></div>
|
||||
<div class="col-sm-8 row">
|
||||
@@ -29,21 +42,42 @@
|
||||
<div class="col-sm-4"><div class="sax-label text-left text-sm-right">@Localiser["label.search"]</div></div>
|
||||
<div class="col-sm-8"><input type="search" id="ifOpportunityFilter" name="Filter.Opportunity" class="OpportunityFilter sax-input" maxlength="64" autocomplete="off" /></div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* Filter item templates *@
|
||||
<div class="sax-panel-item-template">
|
||||
@* Burger dropdown item template - ul is ignored *@
|
||||
<ul class="sax-dropdown-menu Opportunities">
|
||||
<li class="sax-dropdown-item sax-action"><div class="sax-label">...</div></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
}
|
||||
|
||||
@* Results Panel *@
|
||||
<div class="sax-panel-results">
|
||||
<div class="sax-panel-messages"></div>
|
||||
<div class="sax-panel-item-list"></div>
|
||||
|
||||
@* Element templates *@
|
||||
<div class="sax-panel-item-template">
|
||||
|
||||
@* Item template *@
|
||||
<div class="sax-panel-item Opportunity">
|
||||
<div class="sax-header row">
|
||||
<div class="col">
|
||||
<div class="sax-caption"><div class="sax-action"><span class="OpportunityType"></span> - <span class="OpportunityPosition"></span></div></div>
|
||||
</div>
|
||||
<div class="fixed sax-actions">
|
||||
<div class="sax-action sax-item-update hidden"><img src="~/img/action/edit24.png" alt="@(Localiser["label.update"])" title="@(Localiser["label.update"])" /></div>
|
||||
@* Burger menu *@
|
||||
<ul class="nav navbar-nav navbar-light navbar-right sax-burger">
|
||||
<li class="dropdown-toggle caret-off">
|
||||
<a href="#" class="dropdown" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="navbar-toggler-icon"></span></a>
|
||||
<ul class="dropdown-menu dropdown-menu-right sax-dropdown-menu">@* Menu items will be inserted here. *@</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-content">
|
||||
@@ -59,6 +93,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* Burger dropdown item template - ul is ignored *@
|
||||
<ul class="sax-dropdown-menu Opportunity">
|
||||
<li class="sax-dropdown-item sax-action"><div class="sax-label">...</div></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -16,32 +16,46 @@
|
||||
}
|
||||
<div id="dlgOpportunity" class="sax-dialog" title="">
|
||||
|
||||
<div class="spacer2"></div>
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmOpportunity", @class = "sax-form", @onSubmit = "return false;" }))
|
||||
{
|
||||
|
||||
@Html.HiddenFor(model => model.OpportunityId, new { @id = "ifOpportunityId", @class = "OpportunityId" })
|
||||
@Html.HiddenFor(model => model.OpportunityExists, new { @id = "ifOpportunityExists", @class = "OpportunityExists" })
|
||||
<input type="hidden" id="ifOpportunityOrganisationId" class="OpportunityOrganisationId" name="OpportunityOrganisationId" value="@(Model.Filter.OrganisationId)" />
|
||||
|
||||
@* Opportunity type *@
|
||||
<div class="sax-form-control OpportunityTypeCode">
|
||||
<div class="sax-label">
|
||||
<label for="cbOpportunityType"><span>@Localiser["label.type"]</span><span class="required"> *</span></label>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="cbOpportunityType"><span>@Localiser["label.type"]</span><span class="required"> *</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control">
|
||||
<select id="cbOpportunityType" class="OpportunityType sax-select" name="OpportunityTypeCode"></select>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
<select id="cbOpportunityType" class="OpportunityType sax-select" name="OpportunityTypeCode"></select>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@* Opportunity position *@
|
||||
<div class="sax-form-control OpportunityPosition">
|
||||
<div class="sax-label">
|
||||
<label for="ifOpportunityPosition"><span>@Localiser["label.position"]</span><span class="required"> *</span></label>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="ifOpportunityPosition"><span>@Localiser["label.position"]</span><span class="required"> *</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control">
|
||||
@Html.TextBoxFor(model => model.OpportunityPosition, new { @id = "ifOpportunityPosition", @class = "OpportunityPosition sax-input", @maxlength = @Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.OrganisationOpportunity_Position) })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
@Html.TextBoxFor(model => model.OpportunityPosition, new { @id = "ifOpportunityPosition", @class = "OpportunityPosition sax-input", @maxlength = @Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.OrganisationOpportunity_Position) })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@* Opportunity outline *@
|
||||
@@ -50,40 +64,53 @@
|
||||
<label for="ifOpportunityOutline"><span>@Localiser["label.outline"]</span><span class="required"> *</span></label>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
@Html.TextAreaFor(model => model.OpportunityOutline, new { @id = "ifOpportunityOutline", @class = "OpportunityOutline sax-input", @maxlength = @Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.OrganisationOpportunity_Outline) })
|
||||
@Html.TextAreaFor(model => model.OpportunityOutline, new { @id = "ifOpportunityOutline", @class = "OpportunityOutline sax-input", @rows = 4, @maxlength = @Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.OrganisationOpportunity_Outline) })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@* Sport *@
|
||||
<div class="sax-form-control OpportunitySportId">
|
||||
<div class="sax-label">
|
||||
<label for="ifOpportunitySportCaption"><span>@Localiser["label.sport"]</span><span class="required"> *</span></label>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="ifOpportunitySportCaption"><span>@Localiser["label.sport"]</span><span class="required"> *</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control row">
|
||||
@Html.HiddenFor(model => model.OpportunitySportId, new { @id = "ifOpportunitySportId", @class = "OpportunitySportId" })
|
||||
<div class="col"><input type="text" id="ifOpportunitySportCaption" class="OpportunitySportCaption sax-input" readonly="readonly" ondblclick="sax.selectSport()" /></div>
|
||||
<div class="fixed"><button class="SelectSport sax-button" style="min-width:auto;margin-left:4px;padding:4px 6px" onclick="sax.selectSport()">@Localiser["label.select"]</button></div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-control row">
|
||||
@Html.HiddenFor(model => model.OpportunitySportId, new { @id = "ifOpportunitySportId", @class = "OpportunitySportId" })
|
||||
<div class="col"><input type="text" id="ifOpportunitySportCaption" class="OpportunitySportCaption sax-input" readonly="readonly" ondblclick="sax.selectSport()" /></div>
|
||||
<div class="fixed"><button class="SelectSport sax-button" style="min-width:auto;margin-left:4px;padding:4px 6px" onclick="sax.selectSport()">@Localiser["label.select"]</button></div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@* Region *@
|
||||
<div class="sax-form-control OpportunityRegionId">
|
||||
<div class="sax-label">
|
||||
<label for="ifOpportunityRegionCaption"><span>@Localiser["label.region"]</span><span class="required"> *</span></label>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="ifOpportunityRegionCaption"><span>@Localiser["label.region"]</span><span class="required"> *</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control row">
|
||||
@Html.HiddenFor(model => model.OpportunityRegionId, new { @id = "ifOpportunityRegionId", @class = "OpportunityRegionId" })
|
||||
<div class="col"><input type="text" id="ifOpportunityRegionCaption" class="OpportunityRegionCaption sax-input" readonly="readonly" ondblclick="sax.selectRegion()" /></div>
|
||||
<div class="fixed"><button class="SelectRegion sax-button" style="min-width:auto;margin-left:4px;padding:4px 6px" onclick="sax.selectRegion()">@Localiser["label.select"]</button></div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sax-control row">
|
||||
@Html.HiddenFor(model => model.OpportunityRegionId, new { @id = "ifOpportunityRegionId", @class = "OpportunityRegionId" })
|
||||
<div class="col"><input type="text" id="ifOpportunityRegionCaption" class="OpportunityRegionCaption sax-input" readonly="readonly" ondblclick="sax.selectRegion()" /></div>
|
||||
<div class="fixed"><button class="SelectRegion sax-button" style="min-width:auto;margin-left:4px;padding:4px 6px" onclick="sax.selectRegion()">@Localiser["label.select"]</button></div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
}
|
||||
|
||||
<partial name="~/Views/Common/RegionSelect.cshtml" />
|
||||
<partial name="~/Views/Common/SportSelect.cshtml" />
|
||||
<div class="spacer2"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<partial name="~/Views/Common/RegionSelect.cshtml" />
|
||||
<partial name="~/Views/Common/SportSelect.cshtml" />
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
|
||||
.sax-profile #pnlContactImageDrop.sax-panel-drop *
|
||||
{
|
||||
pointer-events: none;
|
||||
/*pointer-events: none;*/
|
||||
}
|
||||
|
||||
.sax-profile #pnlContactImageDrop.sax-panel-drop.sax-file-drag
|
||||
|
||||
@@ -98,6 +98,85 @@
|
||||
background-color: #c0c0c0;
|
||||
}
|
||||
|
||||
/* Panel header - Burger */
|
||||
|
||||
.sax-header ul.nav.sax-burger
|
||||
{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu
|
||||
{
|
||||
padding: 4px 8px 4px 4px;
|
||||
box-shadow: 0 0 8px 2px #80808080;
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item
|
||||
{
|
||||
margin: 2px 4px 2px 0;
|
||||
padding: 2px 4px 2px 30px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: left center;
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item.sax-refresh
|
||||
{
|
||||
background-image: url('../img/action/refresh24.png');
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item.sax-add
|
||||
{
|
||||
background-image: url('../img/action/add24.png');
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item.sax-edit
|
||||
{
|
||||
background-image: url('../img/action/edit24.png');
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item.sax-remove
|
||||
{
|
||||
background-image: url('../img/action/delete24.png');
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item.sax-experience
|
||||
{
|
||||
background-image: url('../img/action/trophy24.png');
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item.sax-user
|
||||
{
|
||||
background-image: url('../img/action/user24.png');
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item.sax-users
|
||||
{
|
||||
background-image: url('../img/action/users24.png');
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item.sax-process
|
||||
{
|
||||
background-image: url('../img/action/process24.png');
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item:hover
|
||||
{
|
||||
background-color: #f8f8f8;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item .sax-label
|
||||
{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.sax-header ul.nav.sax-burger ul.sax-dropdown-menu li.sax-action.sax-dropdown-item:hover .sax-label
|
||||
{
|
||||
background-color: #f8f8f8;
|
||||
box-shadow: 0 0 2px 1px #80808080;
|
||||
}
|
||||
|
||||
/* Data Items panel */
|
||||
|
||||
.sax-panel-results
|
||||
@@ -154,15 +233,7 @@
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sax-panel-item > .sax-header ul.nav.sax-burger
|
||||
{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.sax-panel-item > .sax-header .dropdown-menu
|
||||
{
|
||||
padding: 4px 8px;
|
||||
}
|
||||
/* Actions */
|
||||
|
||||
.sax-panel-item > .sax-header .sax-action
|
||||
{
|
||||
@@ -233,7 +304,7 @@
|
||||
background-color: var(--color-article-pale);
|
||||
}
|
||||
|
||||
/* Opportunitys */
|
||||
/* Opportunities */
|
||||
|
||||
.sax-panel-item.Opportunity,
|
||||
.sax-panel-item.Opportunity > .sax-header
|
||||
|
||||
@@ -55,23 +55,29 @@
|
||||
}
|
||||
|
||||
#dlgActivity .sax-panel-item.Article .ArticleSummary,
|
||||
#dlgActivity .sax-panel-item.Article .ArticleAuthor,
|
||||
#dlgActivity .sax-panel-item.Opportunity .OpportunityOrganisation,
|
||||
#dlgActivity .sax-panel-item.Opportunity .OpportunityPosition,
|
||||
#dlgActivity .sax-panel-item.Opportunity .OpportunityOutline
|
||||
{
|
||||
margin: 0;
|
||||
padding: 8px 8px;
|
||||
font-size: 1.5rem;
|
||||
font-size: 1.25rem;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid #b0b0b0;
|
||||
}
|
||||
|
||||
#dlgActivity .sax-panel-item.Article .ArticleAuthor
|
||||
#dlgActivity .sax-panel-item.Article .ArticleOrigin
|
||||
{
|
||||
padding: 4px 8px;
|
||||
font-size: .9rem;
|
||||
font-weight: bold;
|
||||
background-color: #f8f8f8;
|
||||
border-bottom: 1px solid #b0b0b0;
|
||||
}
|
||||
|
||||
#dlgActivity .sax-panel-item.Article .ArticleAuthor,
|
||||
#dlgActivity .sax-panel-item.Article .ArticleOrganisation
|
||||
{
|
||||
font-size: .9rem;
|
||||
}
|
||||
|
||||
#dlgActivity .sax-panel-item.Opportunity
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 767 B |
@@ -5,7 +5,6 @@
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
sax.itemIdPrefix = 'Itm_';
|
||||
sax.segIdPrefix = 'Seg_';
|
||||
sax.classFileDrag = 'sax-file-drag';
|
||||
let $pnl = sax.$pnl, $frm = sax.$frm;
|
||||
@@ -16,8 +15,9 @@
|
||||
{
|
||||
if (!sax.awaitingRefreshResponse)
|
||||
{
|
||||
var $items = $('.sax-panel-item-list', $pnl.results).fadeOut(200).empty();
|
||||
var $msgs = $('.sax-panel-messages', $pnl.results).hide().empty().append($('<div class="sax-message">' + sax.msg.dataQuerying + '</div>')).fadeIn(200);
|
||||
$('.sax-burger', $pnl.filter).hide();
|
||||
$('.sax-panel-item-list', $pnl.results).fadeOut(200).empty();
|
||||
$('.sax-panel-messages', $pnl.results).hide().empty().append($('<div class="sax-message">' + sax.msg.dataQuerying + '</div>')).fadeIn(200);
|
||||
}
|
||||
sax.ajax.refreshResults = sax.ajax.refreshResults || { url: sax.url.base + 'Article/Ajax/GetList', formId: 'frmArticleFilter', callbackFn: sax.doRefreshResults };
|
||||
sax.doAjaxRequest(sax.ajax.refreshResults, delay || 50);
|
||||
@@ -30,26 +30,27 @@
|
||||
sax.refreshControlValues(response.controlValues);
|
||||
var $msgs = $('.sax-panel-messages', $pnl.results).hide().empty();
|
||||
var $items = $('.sax-panel-item-list', $pnl.results).hide().empty();
|
||||
var $tmpl = $('.sax-panel-item-template .sax-panel-item', $pnl.results);
|
||||
if (!response.success) return;
|
||||
sax.data.articleOrganisations = response.organisations;
|
||||
sax.refreshPaging(response);
|
||||
// Menu.
|
||||
let $mnu = $('.sax-burger ul.sax-dropdown-menu', $pnl.filter).empty();
|
||||
$mnu.append(sax.getFilterMenuOption(sax.lbl.refresh, function () { sax.refreshResults(); }, 'sax-refresh'));
|
||||
$mnu.append(sax.getFilterMenuOption(sax.lbl.add, function () { sax.createItem(); }, 'sax-add'));
|
||||
$('.sax-burger', $pnl.filter).toggle(!!$('.sax-dropdown-item', $mnu).length);
|
||||
// Items.
|
||||
var items = response.articles;
|
||||
if (!items.length)
|
||||
return $msgs.append($('<div class="sax-message">' + sax.msg.dataNoneFound + '</div>')).fadeIn(500);
|
||||
for (let itemIdx = 0; itemIdx < items.length; itemIdx++)
|
||||
{
|
||||
let item = items[itemIdx];
|
||||
let $item = $tmpl.clone();
|
||||
sax.populateItem($item, item);
|
||||
$items.append($item);
|
||||
}
|
||||
$items.append(sax.populateItem(sax.getItemTemplate(), items[itemIdx]));
|
||||
$items.fadeIn(50);
|
||||
}
|
||||
sax.populateItem = function ($item, item)
|
||||
{
|
||||
if (!item) return;
|
||||
$item.prop('id', sax.itemIdPrefix + item.id);
|
||||
$('.sax-panel-messages', $pnl.results).hide().empty();
|
||||
$item.prop('id', sax.getItemId(item.id));
|
||||
$('.ArticleHeadline', $item).text(item.headline);
|
||||
$('.ArticleSummary', $item).text(item.summary);
|
||||
$('.ArticleRegionCaption', $item).text(item.regionCaptionPrimary);
|
||||
@@ -58,9 +59,51 @@
|
||||
$('.ArticlePublishedOn', $item).text(item.publishedOnFmt);
|
||||
$('.ArticlePublished', $item).toggle(!!item.publishedOnFmt);
|
||||
$('.ArticleStatusDesc', $item).text(item.statusDesc);
|
||||
$('.sax-caption .sax-action, .sax-actions .sax-action.sax-item-update', $item).off('click').on('click', function () { sax.updateItem(item.id) })
|
||||
$item.off('dblclick').on('dblclick', function () { sax.updateItem(item.id) })
|
||||
$('.sax-panel-messages', $pnl.results).hide().empty();
|
||||
let $bgr = $('.sax-burger', $item);
|
||||
let $mnu = $('ul.sax-dropdown-menu', $bgr).empty();
|
||||
if (!item.deleted)
|
||||
{
|
||||
let fnUpd = function () { sax.updateItem(item) };
|
||||
$mnu.append(sax.getItemMenuOption(sax.lbl.edit, fnUpd, 'sax-edit'));
|
||||
$('.sax-caption .sax-action', $item).off('click').on('click', fnUpd);
|
||||
}
|
||||
else $('.sax-caption .sax-action', $item).removeClass('sax-action');
|
||||
$bgr.toggle(!!$('.sax-dropdown-menu .sax-dropdown-item', $item).length);
|
||||
return $item;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.getItemId = function (id)
|
||||
{
|
||||
return 'Itm_' + id;
|
||||
}
|
||||
sax.getFilterDropdownTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-dropdown-menu.Articles li.sax-dropdown-item', $pnl.filter).clone();
|
||||
}
|
||||
sax.getItemTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-panel-item.Article', $pnl.results).clone();
|
||||
}
|
||||
sax.getItemDropdownTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-dropdown-menu.Article li.sax-dropdown-item', $pnl.results).clone();
|
||||
}
|
||||
sax.getSegmentTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-panel-item.ArticleSegment', ac.$content).clone();
|
||||
}
|
||||
sax.getFilterMenuOption = function (lbl, fn, cls)
|
||||
{
|
||||
return sax.getMenuOption(sax.getFilterDropdownTemplate(), lbl, fn, cls);
|
||||
}
|
||||
sax.getItemMenuOption = function (lbl, fn, cls)
|
||||
{
|
||||
return sax.getMenuOption(sax.getItemDropdownTemplate(), lbl, fn, cls);
|
||||
}
|
||||
sax.getMenuOption = function ($opt, lbl, fn, cls)
|
||||
{
|
||||
return $opt.find('div.sax-label').text(lbl).end().on('click', fn).addClass(cls);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
@@ -106,7 +149,7 @@
|
||||
{
|
||||
return;
|
||||
}
|
||||
let $seg = $('.sax-panel-item-template .sax-panel-item.ArticleSegment', ac.$content).clone().prop('id', segId)
|
||||
let $seg = sax.getSegmentTemplate().prop('id', segId)
|
||||
if (seg.body)
|
||||
{
|
||||
$('.sax-article-segment-body', $seg).html(seg.body.html);
|
||||
@@ -294,19 +337,20 @@
|
||||
sax.createItem = function ()
|
||||
{
|
||||
sax.clearItem();
|
||||
let orgId = $('#ifFilterOrganisationId', $frm.filter).val();
|
||||
$('#ifArticleOrganisationId', $frm.article).val(orgId);
|
||||
$('#ifArticleOrganisation', $frm.article).val($('#ifFilterOrganisation', $frm.filter).val());
|
||||
$('.sax-form-control.ArticleOrganisation', $frm.article).toggle(!!orgId);
|
||||
sax.populateArticleContent({});
|
||||
sax.openArticleDialog(sax.dlg.title.createArticle);
|
||||
}
|
||||
sax.clearItem = function ()
|
||||
{
|
||||
let frm = $frm.article;
|
||||
$('#ifArticleId,#ifArticleExists,#ifArticleOrganisationId,#ifArticleRegionId,#ifArticleSportId,input[type="text"],textarea,select', frm).val('');
|
||||
$('#chkArticlePublish', frm).prop("checked", false);
|
||||
$('.sax-input.sax-calendar.ArticlePublishOn', frm).datepicker('setDate', 'today');
|
||||
let $frmF = $frm.filter;
|
||||
let $frmA = $frm.article;
|
||||
$('#ifArticleId,#ifArticleExists,#ifArticleOrganisationId,#ifArticleRegionId,#ifArticleSportId,input[type="text"],textarea,select', $frmA).val('');
|
||||
let orgId = $('#ifFilterOrganisationId', $frmF).val();
|
||||
$('#ifArticleOrganisationId', $frmA).val(orgId);
|
||||
$('#ifArticleOrganisation', $frmA).val($('#ifFilterOrganisation', $frmF).val());
|
||||
$('.sax-form-control.ArticleOrganisation', $frmA).toggle(!!orgId);
|
||||
$('#chkArticlePublish', $frmA).prop("checked", false);
|
||||
$('.sax-input.sax-calendar.ArticlePublishOn', $frmA).datepicker('setDate', 'today');
|
||||
sax.clearControlErrors();
|
||||
}
|
||||
sax.openArticleDialog = function (title)
|
||||
@@ -318,9 +362,9 @@
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.updateItem = function (id)
|
||||
sax.updateItem = function (item)
|
||||
{
|
||||
$('.ArticleId', $frm.articleId).val(id);
|
||||
$('.ArticleId', $frm.articleId).val(item.id);
|
||||
sax.ajax.updateItem = sax.ajax.updateItem || { url: sax.url.base + 'Article/Ajax/GetItem', formId: 'frmArticleId', callbackFn: sax.onUpdateItem };
|
||||
sax.doAjaxRequest(sax.ajax.updateItem, 50);
|
||||
}
|
||||
@@ -329,21 +373,21 @@
|
||||
//sax.debug('onUpdateItem', response);
|
||||
sax.clearItem();
|
||||
if (!response.success) return;
|
||||
let frm = $frm.article;
|
||||
let $frmA = $frm.article;
|
||||
let item = response.article;
|
||||
$('#ifArticleId', frm).val(item.id);
|
||||
$('#ifArticleExists', frm).val(1);
|
||||
$('#ifArticleHeadline', frm).val(item.headline);
|
||||
$('#ifArticleSummary', frm).val(item.summary);
|
||||
$('#ifArticleRegionId', frm).val(item.regionIdPrimary);
|
||||
$('#ifArticleRegionCaption', frm).val(item.regionCaptionPrimary);
|
||||
$('#ifArticleSportId', frm).val(item.sportIdPrimary);
|
||||
$('#ifArticleSportCaption', frm).val(item.sportCaptionPrimary);
|
||||
$('#ifArticleId', $frmA).val(item.id);
|
||||
$('#ifArticleExists', $frmA).val(1);
|
||||
$('#ifArticleHeadline', $frmA).val(item.headline);
|
||||
$('#ifArticleSummary', $frmA).val(item.summary);
|
||||
$('#ifArticleRegionId', $frmA).val(item.regionIdPrimary);
|
||||
$('#ifArticleRegionCaption', $frmA).val(item.regionCaptionPrimary);
|
||||
$('#ifArticleSportId', $frmA).val(item.sportIdPrimary);
|
||||
$('#ifArticleSportCaption', $frmA).val(item.sportCaptionPrimary);
|
||||
if (item.published)
|
||||
$('span.ArticlePublishedOn', frm).text(item.publishedOnFmt);
|
||||
$('div.ArticlePublish', frm).toggle(!item.published);
|
||||
$('div.ArticlePublished', frm).toggle(!!item.published);
|
||||
$('#cbArticleStatusCode', frm).val(item.statusCode);
|
||||
$('span.ArticlePublishedOn', $frmA).text(item.publishedOnFmt);
|
||||
$('div.ArticlePublish', $frmA).toggle(!item.published);
|
||||
$('div.ArticlePublished', $frmA).toggle(!!item.published);
|
||||
$('#cbArticleStatusCode', $frmA).val(item.statusCode);
|
||||
sax.populateArticleContent(item.content);
|
||||
sax.openArticleDialog(sax.dlg.title.updateArticle);
|
||||
}
|
||||
@@ -394,10 +438,10 @@
|
||||
sax.$dlg.article.dialog('close');
|
||||
|
||||
var item = response.article;
|
||||
var $item = $('#' + sax.itemIdPrefix + item.id);
|
||||
var $item = $('#' + sax.getItemId(item.id));
|
||||
if (!$item.length)
|
||||
{
|
||||
$item = $('.sax-panel-item-template .sax-panel-item', $pnl.results).clone();
|
||||
$item = sax.getItemTemplate();
|
||||
$('.sax-panel-item-list', $pnl.results).prepend($item).show();
|
||||
}
|
||||
sax.populateItem($item, item)
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
}
|
||||
sax.showActivityDetails = function (response)
|
||||
{
|
||||
//sax.debug('showActivityDetails', response);
|
||||
sax.debug('showActivityDetails', response);
|
||||
let $act = $('#dlgActivity .sax-content').empty();
|
||||
let item;
|
||||
if (item = response.article)
|
||||
@@ -86,7 +86,9 @@
|
||||
let $segs = $('.ArticleContentSegments', $itm);
|
||||
$('.ArticleHeadline', $itm).text(item.headline);
|
||||
$('.ArticleSummary', $itm).text(item.summary).toggle(!!item.summary);
|
||||
$('.ArticleAuthor', $itm).text(item.author).toggle(!!item.author);
|
||||
$('.ArticleAuthor', $itm).text(item.author);
|
||||
$('.ArticleOrganisation', $itm).text(item.organisation);
|
||||
$('.ArticleOrigin', $itm).toggle(!!(item.author||item.organisation));
|
||||
let segs = item.content.segments;
|
||||
for (let segIdx = 0; segIdx < segs.length; segIdx++)
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
let $pnl = sax.$pnl, $frm = sax.$frm, $dlg = sax.$dlg;
|
||||
sax.members = {};
|
||||
sax.itemIdPrefix = 'Itm_';
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.refreshResults = function (delay)
|
||||
@@ -14,89 +14,94 @@
|
||||
sax.data.userCanManageMembers = false;
|
||||
if (!sax.awaitingRefreshResponse)
|
||||
{
|
||||
var $items = $('.sax-panel-item-list', sax.$pnl.results).fadeOut(200).empty();
|
||||
var $msgs = $('.sax-panel-messages', sax.$pnl.results).hide().empty().append($('<div class="sax-message">' + sax.msg.dataQuerying + '</div>')).fadeIn(200);
|
||||
$('.sax-burger', $pnl.filter).hide();
|
||||
$('.sax-panel-item-list', $pnl.results).fadeOut(200).empty();
|
||||
$('.sax-panel-messages', $pnl.results).hide().empty().append($('<div class="sax-message">' + sax.msg.dataQuerying + '</div>')).fadeIn(200);
|
||||
}
|
||||
sax.ajax.refreshResults = sax.ajax.refreshResults || { url: sax.url.base + 'Organisation/Ajax/GetMemberList', formId: 'frmMemberFilter', callbackFn: sax.doRefreshResults };
|
||||
sax.doAjaxRequest(sax.ajax.refreshResults, delay || 50);
|
||||
sax.awaitingRefreshResponse = true;
|
||||
}
|
||||
sax.getFilterDropdownTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-dropdown-menu.Members li.sax-dropdown-item', sax.$pnl.filter).clone();
|
||||
}
|
||||
sax.getItemTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-panel-item.Member', sax.$pnl.results).clone();
|
||||
}
|
||||
sax.getItemDropdownTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-dropdown-menu.Member li.sax-dropdown-item', sax.$pnl.results).clone();
|
||||
}
|
||||
sax.doRefreshResults = function (response)
|
||||
{
|
||||
//sax.debug('doRefreshResults', response);
|
||||
delete sax.awaitingRefreshResponse;
|
||||
sax.refreshControlValues(response.controlValues);
|
||||
let $mnu = $('.sax-burger ul.sax-dropdown-menu', sax.$pnl.filter).empty();
|
||||
var $msgs = $('.sax-panel-messages', sax.$pnl.results).hide().empty();
|
||||
var $items = $('.sax-panel-item-list', sax.$pnl.results).hide().empty();
|
||||
var $msgs = $('.sax-panel-messages', $pnl.results).hide().empty();
|
||||
var $items = $('.sax-panel-item-list', $pnl.results).hide().empty();
|
||||
if (!response.success) return;
|
||||
// Reference data - roles.
|
||||
if (response.memberRoles && response.memberRoles.length)
|
||||
sax.data.memberRoles = response.memberRoles;
|
||||
// Menu.
|
||||
$mnu.append(sax.getFilterMenuOption(sax.lbl.refresh, function () { sax.refreshResults(); }));
|
||||
let $bgr = $('.sax-burger', $pnl.filter);
|
||||
let $mnu = $('ul.sax-dropdown-menu', $bgr).empty();
|
||||
$mnu.append(sax.getFilterMenuOption(sax.lbl.refresh, function () { sax.refreshResults(); }, 'sax-refresh'));
|
||||
if (sax.data.userCanManageMembers = (response.user && response.user.canManage))
|
||||
$mnu.append(sax.getFilterMenuOption(sax.lbl.add, function () { sax.createItem(); }));
|
||||
$('.sax-burger', sax.$pnl.filter).toggle(!!$('.sax-dropdown-item', $mnu).length);
|
||||
$mnu.append(sax.getFilterMenuOption(sax.lbl.add, function () { sax.createItem(); }, 'sax-edit'));
|
||||
$bgr.toggle(!!$('.sax-dropdown-item', $mnu).length);
|
||||
// Items.
|
||||
var items = response.members;
|
||||
if (!items.length)
|
||||
return $msgs.append($('<div class="sax-message">' + sax.msg.dataNoneFound + '</div>')).fadeIn(500);
|
||||
for (let itemIdx = 0; itemIdx < items.length; itemIdx++)
|
||||
{
|
||||
let item = items[itemIdx];
|
||||
let $item = sax.getItemTemplate();
|
||||
sax.populateItem($item, item);
|
||||
$items.append($item);
|
||||
}
|
||||
$items.append(sax.populateItem(sax.getItemTemplate(), items[itemIdx]));
|
||||
$items.fadeIn(50);
|
||||
}
|
||||
sax.getFilterMenuOption = function (lbl, fn)
|
||||
{
|
||||
return sax.getMenuOption(sax.getFilterDropdownTemplate(), lbl, fn);
|
||||
}
|
||||
sax.getMenuOption = function ($opt, lbl, fn)
|
||||
{
|
||||
return $opt.find('div.sax-label').text(lbl).end().on('click', fn);
|
||||
}
|
||||
sax.populateItem = function ($item, item)
|
||||
{
|
||||
if (!item) return;
|
||||
$item.prop('id', sax.itemIdPrefix + item.id);
|
||||
$('.sax-panel-messages', $pnl.results).hide().empty();
|
||||
$item.prop('id', sax.getItemId(item.id));
|
||||
$('.MemberEmail', $item).text(item.emailAddress);
|
||||
$('.MemberDisplayName', $item).text(item.displayName);
|
||||
$('.MemberAdminComment', $item).text(item.adminComment);
|
||||
$('.MemberStatus', $item).text(item.statusDesc).addClass('sax-status-' + item.statusCode.toLowerCase());
|
||||
let $mnu = $('ul.sax-dropdown-menu', $item).empty();
|
||||
let $bgr = $('.sax-burger', $item);
|
||||
let $mnu = $('ul.sax-dropdown-menu', $bgr).empty();
|
||||
if (sax.data.userCanManageMembers)
|
||||
{
|
||||
let fnUpd = function () { sax.updateItem(item.id) };
|
||||
$mnu.append(sax.getItemMenuOption(sax.lbl.edit, fnUpd));
|
||||
let fnUpd = function () { sax.updateItem(item) };
|
||||
$mnu.append(sax.getItemMenuOption(sax.lbl.edit, fnUpd, 'sax-edit'));
|
||||
if (!item.currentUser)
|
||||
$mnu.append(sax.getItemMenuOption(sax.lbl.remove, function () { sax.removeItem(item.id) }));
|
||||
$mnu.append(sax.getItemMenuOption(sax.lbl.remove, function () { sax.removeItem(item.id) }, 'sax-remove'));
|
||||
if (item.awaiting)
|
||||
$mnu.append(sax.getItemMenuOption(sax.lbl.activate, function () { sax.activateItem(item.id) }));
|
||||
$mnu.append(sax.getItemMenuOption(sax.lbl.activate, function () { sax.activateItem(item.id) }, 'sax-user'));
|
||||
$('.sax-caption .sax-action', $item).off('click').on('click', fnUpd);
|
||||
}
|
||||
else $('.sax-caption .sax-action', $item).removeClass('sax-action');
|
||||
$('.sax-burger', $item).toggle(!!$('.sax-dropdown-menu .sax-dropdown-item', $item).length);
|
||||
$('.sax-panel-messages', sax.$pnl.results).hide().empty();
|
||||
$bgr.toggle(!!$('.sax-dropdown-menu .sax-dropdown-item', $item).length);
|
||||
return $item;
|
||||
}
|
||||
sax.getItemMenuOption = function (lbl, fn)
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.getItemId = function (id)
|
||||
{
|
||||
return sax.getMenuOption(sax.getItemDropdownTemplate(), lbl, fn);
|
||||
return 'Itm_' + id;
|
||||
}
|
||||
sax.getFilterDropdownTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-dropdown-menu.Members li.sax-dropdown-item', $pnl.filter).clone();
|
||||
}
|
||||
sax.getItemTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-panel-item.Member', $pnl.results).clone();
|
||||
}
|
||||
sax.getItemDropdownTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-dropdown-menu.Member li.sax-dropdown-item', $pnl.results).clone();
|
||||
}
|
||||
sax.getFilterMenuOption = function (lbl, fn, cls)
|
||||
{
|
||||
return sax.getMenuOption(sax.getFilterDropdownTemplate(), lbl, fn, cls);
|
||||
}
|
||||
sax.getItemMenuOption = function (lbl, fn, cls)
|
||||
{
|
||||
return sax.getMenuOption(sax.getItemDropdownTemplate(), lbl, fn, cls);
|
||||
}
|
||||
sax.getMenuOption = function ($opt, lbl, fn, cls)
|
||||
{
|
||||
return $opt.find('div.sax-label').text(lbl).end().on('click', fn).addClass(cls);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
@@ -136,17 +141,17 @@
|
||||
{
|
||||
if (!sax.data.userCanManageMembers) return;
|
||||
sax.clearItem();
|
||||
$('.MemberOrganisationId', sax.$frm.member).val($('.FilterOrganisationId', sax.$frm.filter).val());
|
||||
sax.$dlg.member.dialog('option', 'title', sax.dlg.title.createMember);
|
||||
sax.openDialog(sax.$dlg.member, 600, 600);
|
||||
$('.MemberOrganisationId', $frm.member).val($('.FilterOrganisationId', $frm.filter).val());
|
||||
$dlg.member.dialog('option', 'title', sax.dlg.title.createMember);
|
||||
sax.openDialog($dlg.member, 600, 600);
|
||||
}
|
||||
sax.clearItem = function ()
|
||||
{
|
||||
sax.member = { roleCodes: [] };
|
||||
let $frm = sax.$frm.member;
|
||||
$('.MemberId,.MemberExists,.MemberRoleCodes,input[type="text"],textarea,select', $frm).val('');
|
||||
$('.MemberEmailAddress', $frm).prop('readonly', false);
|
||||
$('.MemberDisplayName,.MemberTitle,.MemberFirstName,.MemberLastName', $frm).hide();
|
||||
let $frmM = $frm.member;
|
||||
$('.MemberId,.MemberExists,.MemberRoleCodes,input[type="text"],textarea,select', $frmM).val('');
|
||||
$('.MemberEmailAddress', $frmM).prop('readonly', false);
|
||||
$('.MemberDisplayName,.MemberTitle,.MemberFirstName,.MemberLastName', $frmM).hide();
|
||||
sax.clearControlErrors();
|
||||
}
|
||||
sax.doCreateItem = function ()
|
||||
@@ -155,10 +160,10 @@
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.updateItem = function (id)
|
||||
sax.updateItem = function (item)
|
||||
{
|
||||
if (!sax.data.userCanManageMembers) return;
|
||||
$('.MemberId', sax.$frm.memberId).val(id);
|
||||
$('.MemberId', $frm.memberId).val(item.id);
|
||||
sax.ajax.updateItem = sax.ajax.updateItem || { url: sax.url.base + 'Organisation/Ajax/GetMember', formId: 'frmMemberId', callbackFn: sax.onUpdateItem };
|
||||
sax.doAjaxRequest(sax.ajax.updateItem, 50);
|
||||
}
|
||||
@@ -167,22 +172,22 @@
|
||||
//sax.debug('onUpdateItem', response);
|
||||
sax.clearItem();
|
||||
if (!response.success) return;
|
||||
let $frm = sax.$frm.member;
|
||||
let $frmM = $frm.member;
|
||||
let item = sax.member = response.member;
|
||||
$('.MemberId', $frm).val(item.id);
|
||||
$('.MemberExists', $frm).val(1);
|
||||
$('.MemberOrganisationId', $frm).val();
|
||||
$('.MemberEmailAddress', $frm).val(item.emailAddress).prop('readonly', true);
|
||||
$('.MemberDisplayName', $frm).toggle(!item.awaiting).val(item.displayName);
|
||||
$('.MemberTitle', $frm).toggle(!!item.awaiting).val(item.title);
|
||||
$('.MemberFirstName', $frm).toggle(!!item.awaiting).val(item.firstName);
|
||||
$('.MemberLastName', $frm).toggle(!!item.awaiting).val(item.lastName);
|
||||
$('.MemberRoleCodes', $frm).val(item.roleCodes);
|
||||
$('.MemberRoles', $frm).val(sax.getSelectedMemberRoleDescs().join('\n'));
|
||||
$('.MemberAdminComment', $frm).val(item.adminComment);
|
||||
$('.MemberId', $frmM).val(item.id);
|
||||
$('.MemberExists', $frmM).val(1);
|
||||
$('.MemberOrganisationId', $frmM).val();
|
||||
$('.MemberEmailAddress', $frmM).val(item.emailAddress).prop('readonly', true);
|
||||
$('.MemberDisplayName', $frmM).toggle(!item.awaiting).val(item.displayName);
|
||||
$('.MemberTitle', $frmM).toggle(!!item.awaiting).val(item.title);
|
||||
$('.MemberFirstName', $frmM).toggle(!!item.awaiting).val(item.firstName);
|
||||
$('.MemberLastName', $frmM).toggle(!!item.awaiting).val(item.lastName);
|
||||
$('.MemberRoleCodes', $frmM).val(item.roleCodes);
|
||||
$('.MemberRoles', $frmM).val(sax.getSelectedMemberRoleDescs().join('\n'));
|
||||
$('.MemberAdminComment', $frmM).val(item.adminComment);
|
||||
sax.clearControlErrors();
|
||||
sax.$dlg.member.dialog('option', 'title', sax.dlg.title.updateMember);
|
||||
sax.openDialog(sax.$dlg.member, 600, 600);
|
||||
$dlg.member.dialog('option', 'title', sax.dlg.title.updateMember);
|
||||
sax.openDialog($dlg.member, 600, 600);
|
||||
}
|
||||
sax.doUpdateItem = function ()
|
||||
{
|
||||
@@ -202,10 +207,10 @@
|
||||
sax.updateMemberRoles = function (memberRoleCodes)
|
||||
{
|
||||
//sax.debug('updateMemberRoles', memberRoleCodes);
|
||||
let $frm = sax.$frm.member;
|
||||
let $frmM = $frm.member;
|
||||
sax.member.roleCodes = memberRoleCodes;
|
||||
$('.MemberRoleCodes',$frm).val(memberRoleCodes.join(sax.data.memberRoleCodeDelim));
|
||||
$('.MemberRoles', $frm).val(sax.getSelectedMemberRoleDescs().join('\n'));
|
||||
$('.MemberRoleCodes', $frmM).val(memberRoleCodes.join(sax.data.memberRoleCodeDelim));
|
||||
$('.MemberRoles', $frmM).val(sax.getSelectedMemberRoleDescs().join('\n'));
|
||||
}
|
||||
sax.getSelectedMemberRoleDescs = function ()
|
||||
{
|
||||
@@ -223,8 +228,8 @@
|
||||
//--------------------------------------------------------------
|
||||
sax.storeItem = function ()
|
||||
{
|
||||
let $frm = sax.$frm.member;
|
||||
$('.MemberNameSupplied', $frm).val($('.MemberLastName', $frm).is(":visible") ? 1 : 0);
|
||||
let $frmM = $frm.member;
|
||||
$('.MemberNameSupplied', $frmM).val($('.MemberLastName', $frmM).is(":visible") ? 1 : 0);
|
||||
sax.ajax.storeItem = sax.ajax.storeItem || { url: sax.url.base + 'Organisation/Ajax/StoreMember', formId: 'frmMember', callbackFn: sax.onStoreItem };
|
||||
sax.doAjaxRequest(sax.ajax.storeItem, 50);
|
||||
}
|
||||
@@ -233,20 +238,20 @@
|
||||
//sax.debug('onStoreItem', response);
|
||||
sax.refreshControlValues(response.controlValues);
|
||||
if (!response.success) return;
|
||||
let $frm = sax.$frm.member;
|
||||
let $frmM = $frm.member;
|
||||
if (response.memberNameRequired)
|
||||
{
|
||||
$('.MemberEmailAddress', $frm).prop('readonly', true);
|
||||
$('.MemberTitle,.MemberFirstName,.MemberLastName', $frm).show();
|
||||
$('.MemberEmailAddress', $frmM).prop('readonly', true);
|
||||
$('.MemberTitle,.MemberFirstName,.MemberLastName', $frmM).show();
|
||||
return;
|
||||
}
|
||||
sax.$dlg.member.dialog('close');
|
||||
$dlg.member.dialog('close');
|
||||
var item = response.member;
|
||||
var $item = $('#' + sax.itemIdPrefix + item.id);
|
||||
var $item = $('#' + sax.getItemId(item.id));
|
||||
if (!$item.length)
|
||||
{
|
||||
$item = sax.getItemTemplate();
|
||||
$('.sax-panel-item-list', sax.$pnl.results).prepend($item).show();
|
||||
$('.sax-panel-item-list', $pnl.results).prepend($item).show();
|
||||
}
|
||||
sax.populateItem($item, item)
|
||||
}
|
||||
@@ -256,7 +261,7 @@
|
||||
{
|
||||
let fn = function ()
|
||||
{
|
||||
$('.MemberId', sax.$frm.memberId).val(id);
|
||||
$('.MemberId', $frm.memberId).val(id);
|
||||
sax.ajax.removeItem = sax.ajax.removeItem || { url: sax.url.base + 'Organisation/Ajax/RemoveMember', formId: 'frmMemberId', callbackFn: sax.onItemRemoved };
|
||||
sax.doAjaxRequest(sax.ajax.removeItem, 50);
|
||||
}
|
||||
@@ -267,7 +272,7 @@
|
||||
{
|
||||
if (!response.success) return;
|
||||
var item = response.member;
|
||||
var $item = $('#' + sax.itemIdPrefix + item.id);
|
||||
var $item = $('#' + sax.getItemId(item.id));
|
||||
//sax.debug(item, $item);
|
||||
if ($item.length)
|
||||
$item.remove();
|
||||
@@ -278,7 +283,7 @@
|
||||
{
|
||||
let fn = function ()
|
||||
{
|
||||
$('.MemberId', sax.$frm.memberId).val(id);
|
||||
$('.MemberId', $frm.memberId).val(id);
|
||||
sax.ajax.activateItem = sax.ajax.activateItem || { url: sax.url.base + 'Organisation/Ajax/ActivateMember', formId: 'frmMemberId', callbackFn: sax.onItemActivated };
|
||||
sax.doAjaxRequest(sax.ajax.activateItem, 50);
|
||||
}
|
||||
@@ -288,7 +293,7 @@
|
||||
{
|
||||
if (!response.success) return;
|
||||
var item = response.member;
|
||||
var $item = $('#' + sax.itemIdPrefix + item.id);
|
||||
var $item = $('#' + sax.getItemId(item.id));
|
||||
//sax.debug(item, $item);
|
||||
if ($item.length)
|
||||
sax.populateItem($item, item)
|
||||
@@ -297,22 +302,22 @@
|
||||
//--------------------------------------------------------------
|
||||
$(function ()
|
||||
{
|
||||
sax.$pnl.members = $('#pnlMembers');
|
||||
sax.$pnl.filter = $('.sax-panel-filter', sax.$pnl.members);
|
||||
sax.$pnl.results = $('.sax-panel-results', sax.$pnl.members);
|
||||
sax.$frm.filter = $('#frmMemberFilter');
|
||||
$('.MemberFilter', sax.$frm.filter).on('input', function () { sax.refreshResults(250); }).on('keypress', function (event)
|
||||
$pnl.members = $('.sax-panel.Members');
|
||||
$pnl.filter = $('.sax-panel-filter', $pnl.members);
|
||||
$pnl.results = $('.sax-panel-results', $pnl.members);
|
||||
$frm.filter = $('#frmMemberFilter');
|
||||
$('.MemberFilter', $frm.filter).on('input', function () { sax.refreshResults(250); }).on('keypress', function (event)
|
||||
{
|
||||
if (event.keyCode == 13) setTimeout(sax.refreshResults, 50);
|
||||
});
|
||||
sax.$frm.memberId = $('#frmMemberId');
|
||||
sax.$frm.member = $('#frmMember');
|
||||
$('.sax-input', sax.$frm.member).on('input', function () { sax.clearControlError(this); });
|
||||
$frm.memberId = $('#frmMemberId');
|
||||
$frm.member = $('#frmMember');
|
||||
$('.sax-input', $frm.member).on('input', function () { sax.clearControlError(this); });
|
||||
|
||||
var opt = sax.dlgOpts();
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { sax.doCreateItem(); };
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { $(this).dialog('close'); };
|
||||
sax.$dlg.member = $('#dlgMember').dialog(opt);
|
||||
$dlg.member = $('#dlgMember').dialog(opt);
|
||||
|
||||
setTimeout(sax.refreshResults, 250);
|
||||
});
|
||||
|
||||
@@ -5,17 +5,18 @@
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
sax.itemIdPrefix = 'Itm_';
|
||||
let $pnl = sax.$pnl, $frm = sax.$frm, $dlg = sax.$dlg;
|
||||
let oo = sax.OrgOpp = { data: {}, fn: {} };
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.refreshResults = function (delay)
|
||||
{
|
||||
var $results = $('.sax-panel-results');
|
||||
sax.data.userCanManageOpportunities = false;
|
||||
if (!sax.awaitingRefreshResponse)
|
||||
{
|
||||
var $items = $('.sax-panel-item-list', $results).fadeOut(200).empty();
|
||||
var $msgs = $('.sax-panel-messages', $results).hide().empty().append($('<div class="sax-message">' + sax.msg.dataQuerying + '</div>')).fadeIn(200);
|
||||
$('.sax-burger', $pnl.filter).hide();
|
||||
$('.sax-panel-item-list', $pnl.results).fadeOut(200).empty();
|
||||
$('.sax-panel-messages', $pnl.results).hide().empty().append($('<div class="sax-message">' + sax.msg.dataQuerying + '</div>')).fadeIn(200);
|
||||
}
|
||||
sax.ajax.refreshResults = sax.ajax.refreshResults || { url: sax.url.base + 'Organisation/Ajax/GetOpportunityList', formId: 'frmOpportunityFilter', callbackFn: sax.doRefreshResults };
|
||||
sax.doAjaxRequest(sax.ajax.refreshResults, delay || 50);
|
||||
@@ -26,35 +27,33 @@
|
||||
//sax.debug('doRefreshResults', response);
|
||||
delete sax.awaitingRefreshResponse;
|
||||
sax.refreshControlValues(response.controlValues);
|
||||
var $panel = $('#pnlOpportunities');
|
||||
$('.sax-action.sax-item-create', $panel).hide();
|
||||
var $results = $('.sax-panel-results', $panel);
|
||||
var $msgs = $('.sax-panel-messages', $results).hide().empty();
|
||||
var $items = $('.sax-panel-item-list', $results).hide().empty();
|
||||
var $tmpl = $('.sax-panel-item-template .sax-panel-item', $results);
|
||||
var $msgs = $('.sax-panel-messages', $pnl.results).hide().empty();
|
||||
var $items = $('.sax-panel-item-list', $pnl.results).hide().empty();
|
||||
if (!response.success) return;
|
||||
oo.data.organisation = response.organisation;
|
||||
// Reference data - Opportunity types.
|
||||
if (response.opportunityTypes)
|
||||
sax.populateSelectCodeDesc('#cbOpportunityType', response.opportunityTypes);
|
||||
// Menu.
|
||||
let $bgr = $('.sax-burger', $pnl.filter);
|
||||
let $mnu = $('ul.sax-dropdown-menu', $bgr).empty();
|
||||
$mnu.append(sax.getFilterMenuOption(sax.lbl.refresh, function () { sax.refreshResults(); }, 'sax-refresh'));
|
||||
if (sax.data.userCanManageOpportunities = (response.user && response.user.canManage))
|
||||
$mnu.append(sax.getFilterMenuOption(sax.lbl.add, function () { sax.createItem(); }, 'sax-edit'));
|
||||
$bgr.toggle(!!$('.sax-dropdown-item', $mnu).length);
|
||||
// Items.
|
||||
sax.data.userCanManageOpportunities = (response.user && response.user.canManage);
|
||||
$('#pnlOpportunities .sax-panel-filter .sax-action.sax-item-create').toggle(sax.data.userCanManageOpportunities);
|
||||
var items = response.opportunities;
|
||||
if (!items.length)
|
||||
return $msgs.append($('<div class="sax-message">' + sax.msg.dataNoneFound + '</div>')).fadeIn(500);
|
||||
for (let itemIdx = 0; itemIdx < items.length; itemIdx++)
|
||||
{
|
||||
let item = items[itemIdx];
|
||||
let $item = $tmpl.clone();
|
||||
sax.populateItem($item, item);
|
||||
$items.append($item);
|
||||
}
|
||||
$items.append(sax.populateItem(sax.getItemTemplate(), items[itemIdx]));
|
||||
$items.fadeIn(50);
|
||||
}
|
||||
sax.populateItem = function ($item, item)
|
||||
{
|
||||
if (!item) return;
|
||||
$item.prop('id', sax.itemIdPrefix + item.id);
|
||||
$('.sax-panel-results .sax-panel-messages').hide().empty();
|
||||
$item.prop('id', sax.getItemId(item.id));
|
||||
$('.OpportunityType', $item).text(item.typeDesc);
|
||||
$('.OpportunityPosition', $item).text(item.position);
|
||||
$('.OpportunityOutline', $item).text(item.outline);
|
||||
@@ -66,10 +65,52 @@
|
||||
$('.OpportunityExpiresOn', $item).text(item.expiresOnFmt);
|
||||
$('.OpportunityExpires', $item).toggle(!!item.expiresOnFmt);
|
||||
$('.OpportunityStatusDesc', $item).text(item.statusDesc);
|
||||
if (sax.data.userCanManageOpportunities)
|
||||
$('.sax-caption .sax-action, .sax-actions .sax-action.sax-item-update', $item).off('click').on('click', function () { sax.updateItem(item.id) }).removeClass('hidden');
|
||||
$item.off('dblclick').on('dblclick', function () { sax.updateItem(item.id) });
|
||||
$('.sax-panel-results .sax-panel-messages').hide().empty();
|
||||
|
||||
let $bgr = $('.sax-burger', $item);
|
||||
let $mnu = $('ul.sax-dropdown-menu', $bgr).empty();
|
||||
if (!item.deleted)
|
||||
{
|
||||
if (sax.data.userCanManageOpportunities)
|
||||
{
|
||||
let fnUpd = function () { sax.updateItem(item) };
|
||||
$mnu.append(sax.getItemMenuOption(sax.lbl.edit, fnUpd, 'sax-edit'));
|
||||
$('.sax-caption .sax-action', $item).off('click').on('click', fnUpd);
|
||||
$item.off('dblclick').on('dblclick', fnUpd);
|
||||
}
|
||||
}
|
||||
else $('.sax-caption .sax-action', $item).removeClass('sax-action');
|
||||
$bgr.toggle(!!$('.sax-dropdown-menu .sax-dropdown-item', $item).length);
|
||||
return $item;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.getItemId = function (id)
|
||||
{
|
||||
return 'Itm_' + id;
|
||||
}
|
||||
sax.getFilterDropdownTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-dropdown-menu.Opportunities li.sax-dropdown-item', sax.$pnl.filter).clone();
|
||||
}
|
||||
sax.getItemTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-panel-item.Opportunity', sax.$pnl.results).clone();
|
||||
}
|
||||
sax.getItemDropdownTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-dropdown-menu.Opportunity li.sax-dropdown-item', sax.$pnl.results).clone();
|
||||
}
|
||||
sax.getFilterMenuOption = function (lbl, fn, cls)
|
||||
{
|
||||
return sax.getMenuOption(sax.getFilterDropdownTemplate(), lbl, fn, cls);
|
||||
}
|
||||
sax.getItemMenuOption = function (lbl, fn, cls)
|
||||
{
|
||||
return sax.getMenuOption(sax.getItemDropdownTemplate(), lbl, fn, cls);
|
||||
}
|
||||
sax.getMenuOption = function ($opt, lbl, fn, cls)
|
||||
{
|
||||
return $opt.find('div.sax-label').text(lbl).end().on('click', fn).addClass(cls);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
@@ -131,12 +172,17 @@
|
||||
{
|
||||
if (!sax.data.userCanManageOpportunities) return;
|
||||
sax.clearItem();
|
||||
sax.$dlg.opportunity.dialog('option', 'title', sax.dlg.title.createOpportunity);
|
||||
sax.openDialog(sax.$dlg.opportunity, 600, 600);
|
||||
let $frmO = $frm.opportunity;
|
||||
$('#ifOpportunitySportId', $frmO).val(oo.data.organisation.sportId);
|
||||
$('#ifOpportunitySportCaption', $frmO).val(oo.data.organisation.sportName);
|
||||
$('#ifOpportunityRegionId', $frmO).val(oo.data.organisation.regionId);
|
||||
$('#ifOpportunityRegionCaption', $frmO).val(oo.data.organisation.regionName);
|
||||
$dlg.opportunity.dialog('option', 'title', sax.dlg.title.createOpportunity);
|
||||
sax.openDialog($dlg.opportunity, 600, 600);
|
||||
}
|
||||
sax.clearItem = function ()
|
||||
{
|
||||
$('#ifOpportunityId,#ifOpportunityExists,#ifOpportunityRegionId,#ifOpportunitySportId,input[type="text"],textarea,select', sax.$frm.opportunity).val('');
|
||||
$('#ifOpportunityId,#ifOpportunityExists,#ifOpportunityRegionId,#ifOpportunitySportId,input[type="text"],textarea,select', $frm.opportunity).val('');
|
||||
sax.clearControlErrors();
|
||||
}
|
||||
sax.doCreateItem = function ()
|
||||
@@ -145,10 +191,10 @@
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.updateItem = function (id)
|
||||
sax.updateItem = function (item)
|
||||
{
|
||||
if (!sax.data.userCanManageOpportunities) return;
|
||||
$('.OpportunityId', sax.$frm.opportunityId).val(id);
|
||||
$('.OpportunityId', $frm.opportunityId).val(item.id);
|
||||
sax.ajax.updateItem = sax.ajax.updateItem || { url: sax.url.base + 'Organisation/Ajax/GetOpportunity', formId: 'frmOpportunityId', callbackFn: sax.onUpdateItem };
|
||||
sax.doAjaxRequest(sax.ajax.updateItem, 50);
|
||||
}
|
||||
@@ -157,21 +203,21 @@
|
||||
//sax.debug('onUpdateItem', response);
|
||||
sax.clearItem();
|
||||
if (!response.success) return;
|
||||
let $frm = sax.$frm.opportunity;
|
||||
let $frmO = $frm.opportunity;
|
||||
let item = response.opportunity;
|
||||
$('#ifOpportunityId', $frm).val(item.id);
|
||||
$('#ifOpportunityExists', $frm).val(1);
|
||||
$('#cbOpportunityType', $frm).val(item.typeCode);
|
||||
$('#ifOpportunityPosition', $frm).val(item.position);
|
||||
$('#ifOpportunityOutline', $frm).val(item.outline);
|
||||
$('#ifOpportunityRegionId', $frm).val(item.regionIdPrimary);
|
||||
$('#ifOpportunityRegionCaption', $frm).val(item.regionCaption);
|
||||
$('#ifOpportunitySportId', $frm).val(item.sportIdPrimary);
|
||||
$('#ifOpportunitySportCaption', $frm).val(item.sportCaption);
|
||||
$('#cbOpportunityStatusCode', $frm).val(item.statusCode);
|
||||
$('#ifOpportunityId', $frmO).val(item.id);
|
||||
$('#ifOpportunityExists', $frmO).val(1);
|
||||
$('#cbOpportunityType', $frmO).val(item.typeCode);
|
||||
$('#ifOpportunityPosition', $frmO).val(item.position);
|
||||
$('#ifOpportunityOutline', $frmO).val(item.outline);
|
||||
$('#ifOpportunityRegionId', $frmO).val(item.regionIdPrimary);
|
||||
$('#ifOpportunityRegionCaption', $frmO).val(item.regionCaption);
|
||||
$('#ifOpportunitySportId', $frmO).val(item.sportIdPrimary);
|
||||
$('#ifOpportunitySportCaption', $frmO).val(item.sportCaption);
|
||||
$('#cbOpportunityStatusCode', $frmO).val(item.statusCode);
|
||||
sax.clearControlErrors();
|
||||
sax.$dlg.opportunity.dialog('option', 'title', sax.dlg.title.updateOpportunity);
|
||||
sax.openDialog(sax.$dlg.opportunity, 600, 600);
|
||||
$dlg.opportunity.dialog('option', 'title', sax.dlg.title.updateOpportunity);
|
||||
sax.openDialog($dlg.opportunity, 600, 600);
|
||||
}
|
||||
sax.doUpdateItem = function ()
|
||||
{
|
||||
@@ -189,15 +235,14 @@
|
||||
//sax.debug('onStoreItem', response);
|
||||
sax.refreshControlValues(response.controlValues);
|
||||
if (!response.success) return;
|
||||
sax.$dlg.opportunity.dialog('close');
|
||||
$dlg.opportunity.dialog('close');
|
||||
|
||||
var item = response.opportunity;
|
||||
var $item = $('#' + sax.itemIdPrefix + item.id);
|
||||
var $item = $('#' + sax.getItemId(item.id));
|
||||
if (!$item.length)
|
||||
{
|
||||
var $results = $('.sax-panel-results');
|
||||
$item = $('.sax-panel-item-template .sax-panel-item', $results).clone();
|
||||
$('.sax-panel-item-list', $results).prepend($item).show();
|
||||
$item = $('.sax-panel-item-template .sax-panel-item', $pnl.results).clone();
|
||||
$('.sax-panel-item-list', $pnl.results).prepend($item).show();
|
||||
}
|
||||
sax.populateItem($item, item)
|
||||
}
|
||||
@@ -205,21 +250,22 @@
|
||||
//--------------------------------------------------------------
|
||||
$(function ()
|
||||
{
|
||||
sax.$frm.filter = $('#frmOpportunityFilter');
|
||||
$('.sax-panel-filter .sax-action.sax-item-create').on('click', function () { sax.createItem(); });
|
||||
$('.sax-panel-filter .sax-action.sax-results-refresh').on('click', function () { sax.refreshResults(); });
|
||||
$('.OpportunityFilter', sax.$frm.filter).on('input', function () { sax.refreshResults(250); }).on('keypress', function (event)
|
||||
$pnl.opportunities = $('.sax-panel.Opportunities');
|
||||
$pnl.filter = $('.sax-panel-filter', $pnl.opportunities);
|
||||
$pnl.results = $('.sax-panel-results', $pnl.opportunities);
|
||||
$frm.filter = $('#frmOpportunityFilter', $pnl.filter);
|
||||
$('.OpportunityFilter', $frm.filter).on('input', function () { sax.refreshResults(250); }).on('keypress', function (event)
|
||||
{
|
||||
if (event.keyCode == 13) setTimeout(sax.refreshResults, 50);
|
||||
});
|
||||
sax.$frm.opportunityId = $('#frmOpportunityId');
|
||||
sax.$frm.opportunity = $('#frmOpportunity');
|
||||
$('.sax-input', sax.$frm.opportunity).on('input', function () { sax.clearControlError(this); });
|
||||
$frm.opportunityId = $('#frmOpportunityId');
|
||||
$frm.opportunity = $('#frmOpportunity');
|
||||
$('.sax-input', $frm.opportunity).on('input', function () { sax.clearControlError(this); });
|
||||
|
||||
var opt = sax.dlgOpts();
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { sax.doCreateItem(); };
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { $(this).dialog('close'); };
|
||||
sax.$dlg.opportunity = $('#dlgOpportunity').dialog(opt);
|
||||
$dlg.opportunity = $('#dlgOpportunity').dialog(opt);
|
||||
|
||||
setTimeout(sax.refreshResults, 250);
|
||||
});
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
sax.refreshSelect($section, 'AccountTitle', response.contact.title);
|
||||
sax.refreshInput($section, 'AccountFirstName', response.contact.firstName);
|
||||
sax.refreshInput($section, 'AccountLastName', response.contact.lastName);
|
||||
sax.refreshTextArea($section, 'AccountAbout', response.contact.about);
|
||||
let $selGender = $('#cbAccountGender');
|
||||
if (response.genders && response.genders.length)
|
||||
sax.populateSelectCodeDesc($('#cbAccountGender'), response.genders);
|
||||
@@ -179,6 +180,7 @@
|
||||
}
|
||||
sax.selectContactImage = function ()
|
||||
{
|
||||
sax.debug('selectContactImage');
|
||||
let dlg = $dlg.selectContactImage.dialog('option', { title: sax.dlg.title.imageUpload });
|
||||
$('#ifContactImage', dlg).val('');
|
||||
sax.openDialog(dlg, 560, 240);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
//--------------------------------------------------------------
|
||||
sax.showSportExperience = function (usrSpt)
|
||||
{
|
||||
sax.debug('showSportExperience', usrSpt);
|
||||
//sax.debug('showSportExperience', usrSpt);
|
||||
$('.sax-header .SportName', se.$pnl.sportExp).text(usrSpt.sportName);
|
||||
$('.sax-panel-section').slideUp(750, function () { se.$pnl.sportExp.slideDown(750); });
|
||||
se.$dlg.sportExp.dialog('option', { 'title': sax.lbl.sportExperience + ' - ' + usrSpt.sportName });
|
||||
@@ -27,7 +27,11 @@
|
||||
}
|
||||
se.fn.handleSportExperiencesResponse = function (response)
|
||||
{
|
||||
sax.debug('handleSportExperiencesResponse', response);
|
||||
//sax.debug('handleSportExperiencesResponse', response);
|
||||
if (!response.success) return;
|
||||
let sport = response.sport;
|
||||
$('.sax-form-control.ExperienceSpeciality', se.$dlg.sportExp).toggle(!sport.speciality.notRelevant);
|
||||
$('.sax-form-control.ExperienceSpeciality .sax-label-text', se.$dlg.sportExp).text(sport.speciality.label || sax.lbl.speciality);
|
||||
let $results = se.$pnl.results;
|
||||
let $msgs = $('.sax-panel-messages', $results).empty();
|
||||
let $list = $('.sax-panel-item-list', $results).hide().empty();
|
||||
@@ -38,20 +42,22 @@
|
||||
let item = items[itemIdx];
|
||||
item.idx = ++se.idx;
|
||||
let $item = se.fn.getItemTemplate(item.idx);
|
||||
sax.debug(item, $item);
|
||||
//sax.debug(item, $item);
|
||||
$('.ExperiencePeriod', $item).text(item.period);
|
||||
$('.ExperienceSummary', $item).text(item.summary);
|
||||
$('.ExperienceTeam', $item).text(item.team);
|
||||
$('.ExperienceLeague', $item).text(item.league);
|
||||
$('.ExperienceSpeciality', $item).text(item.speciality);
|
||||
let $mnu = $('.sax-burger .sax-dropdown-menu', $item).empty();
|
||||
$mnu.append(se.fn.getMenuOption(se.fn.getItemActionTemplate(), sax.lbl.edit, function () { se.fn.updateSportExperience(item, $item); }));
|
||||
$mnu.append(se.fn.getMenuOption(se.fn.getItemActionTemplate(), sax.lbl.edit, function () { se.fn.updateSportExperience(item, $item); }, 'sax-edit'));
|
||||
$('.sax-header .sax-caption', $item).on('click', function () { se.fn.updateSportExperience(item, $item); });
|
||||
$('.sax-content', $item).on('dblclick', function () { se.fn.updateSportExperience(item, $item); });
|
||||
$list.append($item);
|
||||
}
|
||||
$list.show();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
se.fn.getItemId = function (idx)
|
||||
{
|
||||
return 'SptExp_' + idx;
|
||||
@@ -64,15 +70,15 @@
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-panel-item.SportExperience', se.$pnl.results).clone().prop('id', se.fn.getItemId(idx));
|
||||
}
|
||||
se.fn.getMenuOption = function ($opt, lbl, fn)
|
||||
se.fn.getMenuOption = function ($opt, lbl, fn, cls)
|
||||
{
|
||||
return $opt.find('div.sax-label').text(lbl).end().on('click', fn);
|
||||
return $opt.find('div.sax-label').text(lbl).end().on('click', fn).addClass(cls);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.addSportExperience = function ()
|
||||
{
|
||||
sax.debug('addSportExperience')
|
||||
//sax.debug('addSportExperience')
|
||||
se.fn.clearSportExperience();
|
||||
sax.openDialog(se.$dlg.sportExp, 560, 600);
|
||||
}
|
||||
@@ -83,7 +89,7 @@
|
||||
}
|
||||
se.fn.updateSportExperience = function (item, $item)
|
||||
{
|
||||
sax.debug('updateSportExperience', item);
|
||||
//sax.debug('updateSportExperience', item);
|
||||
let frm = se.$frm.sportExpId;
|
||||
$('.UserSportExperienceId', se.$frm.sportExpId).val(item.id);
|
||||
sax.ajax.sportExp = sax.ajax.sportExp || { url: sax.url.base + 'UserSport/Ajax/GetExperience', formId: frm.prop('id'), callbackFn: se.fn.doUpdateSportExperience };
|
||||
@@ -91,14 +97,14 @@
|
||||
}
|
||||
se.fn.doUpdateSportExperience = function (response)
|
||||
{
|
||||
sax.debug('doUpdateSportExperience', response);
|
||||
//sax.debug('doUpdateSportExperience', response);
|
||||
if (!response.success) return;
|
||||
let item = response.experience;
|
||||
let frm = se.$frm.sportExp;
|
||||
se.fn.clearSportExperience();
|
||||
$('input.UserSportExperienceId', frm).val(item.id);
|
||||
$('input.UserSportExperienceExists', frm).val(1);
|
||||
sax.debug(Date.parse(item.periodFrom_YMD));
|
||||
//sax.debug(Date.parse(item.periodFrom_YMD));
|
||||
$('.sax-input.ExperiencePeriodFrom', frm).datepicker('setDate', new Date(item.periodFrom_YMD));
|
||||
$('.sax-input.ExperiencePeriodTo', frm).datepicker('setDate', item.periodTo_YMD ? new Date(item.periodTo_YMD) : null);
|
||||
$('.sax-textarea.ExperienceSummary', frm).val(item.summary).prop('autofocus', true);
|
||||
@@ -110,14 +116,14 @@
|
||||
}
|
||||
se.fn.storeSportExperience = function ()
|
||||
{
|
||||
sax.debug('storeSportExperience');
|
||||
//sax.debug('storeSportExperience');
|
||||
let frm = se.$frm.sportExp;
|
||||
sax.ajax.storeSportExp = sax.ajax.storeSportExp || { url: sax.url.base + 'UserSport/Ajax/StoreExperience', formId: frm.prop('id'), callbackFn: se.fn.onStoreSportExperience };
|
||||
sax.doAjaxRequest(sax.ajax.storeSportExp, 50);
|
||||
}
|
||||
se.fn.onStoreSportExperience = function (response)
|
||||
{
|
||||
sax.debug('onStoreSportExperience', response);
|
||||
//sax.debug('onStoreSportExperience', response);
|
||||
sax.refreshControlValues(response.controlValues, se.$dlg.sprExp);
|
||||
if (!response.success) return;
|
||||
se.$dlg.sportExp.dialog('close');
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
//-------------------------------------------------------------------
|
||||
public static class Version
|
||||
{
|
||||
private static String version { get; } = "1.1.5.1";
|
||||
private static String version { get; } = "1.1.6.0";
|
||||
// Retrieve version.
|
||||
public static String GetFullVersion () { return version; }
|
||||
public static String GetAppVersion ()
|
||||
@@ -40,6 +40,8 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
//-------------------------------------------------------------------
|
||||
// Version history.
|
||||
//-------------------------------------------------------------------
|
||||
// 1.1.6 ?-Aug-2021 ?
|
||||
// - ?
|
||||
// 1.1.5 19-Aug-2021 Profile Sport Experience.
|
||||
// - Online Profile Sport Experience.
|
||||
// 1.1.4 9-Aug-2021 Organisation Articles.
|
||||
|
||||
@@ -90,6 +90,7 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
YesNo,
|
||||
DataItemType,
|
||||
Gender,
|
||||
SportSpecialityLabel,
|
||||
SportParticipation,
|
||||
SportOfficiating,
|
||||
RegionType,
|
||||
@@ -199,6 +200,17 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
SystemAdmin,
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Sport Speciality Label</summary>
|
||||
public enum SportSpecialityLabel
|
||||
{
|
||||
Default = 0,
|
||||
/* Do not change the values/codes - tied to database. */
|
||||
Positon = 10,
|
||||
Discipline = 20,
|
||||
NotRelevant = 90,
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Sport Participation</summary>
|
||||
public enum SportParticipation
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 19-Aug-2021 17:19:49
|
||||
// Code generated by Sarand Database Utilities Thu 26-Aug-2021 12:36:27
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Base.App
|
||||
{
|
||||
@@ -195,6 +195,7 @@ namespace Saxonite.Base.App
|
||||
Region_UpdateHost,
|
||||
Sport_Id,
|
||||
Sport_Name,
|
||||
Sport_SpecialityLabel,
|
||||
Sport_Notes,
|
||||
Sport_Flags,
|
||||
Sport_Status,
|
||||
@@ -210,6 +211,7 @@ namespace Saxonite.Base.App
|
||||
UserAccount_FirstName,
|
||||
UserAccount_Initials,
|
||||
UserAccount_LastName,
|
||||
UserAccount_About,
|
||||
UserAccount_PhoneMain,
|
||||
UserAccount_PhoneMobile,
|
||||
UserAccount_PhoneAlt,
|
||||
@@ -293,6 +295,7 @@ namespace Saxonite.Base.App
|
||||
UserSport_Id,
|
||||
UserSport_UserAccountId,
|
||||
UserSport_SportId,
|
||||
UserSport_About,
|
||||
UserSport_Participation,
|
||||
UserSport_Officiating,
|
||||
UserSport_UserSportData,
|
||||
@@ -333,7 +336,7 @@ namespace Saxonite.Base.App
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
private static readonly int tableCount = 16;
|
||||
private static readonly int columnCount = 288;
|
||||
private static readonly int columnCount = 291;
|
||||
private static ulong maxTextLen = 0;
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -676,6 +679,7 @@ namespace Saxonite.Base.App
|
||||
new ColumnDfn(8,"UpdateHost",0,12,false,100),
|
||||
new ColumnDfn(9,"Id",4,4,true,10),
|
||||
new ColumnDfn(9,"Name",0,-9,false,100),
|
||||
new ColumnDfn(9,"SpecialityLabel",3,5,false,5),
|
||||
new ColumnDfn(9,"Notes",0,-9,false,2000),
|
||||
new ColumnDfn(9,"Flags",3,5,false,5),
|
||||
new ColumnDfn(9,"Status",0,12,false,3),
|
||||
@@ -691,6 +695,7 @@ namespace Saxonite.Base.App
|
||||
new ColumnDfn(10,"FirstName",0,-9,false,100),
|
||||
new ColumnDfn(10,"Initials",0,-9,false,10),
|
||||
new ColumnDfn(10,"LastName",0,-9,false,100),
|
||||
new ColumnDfn(10,"About",0,-9,false,2000),
|
||||
new ColumnDfn(10,"PhoneMain",0,-9,false,50),
|
||||
new ColumnDfn(10,"PhoneMobile",0,-9,false,50),
|
||||
new ColumnDfn(10,"PhoneAlt",0,-9,false,50),
|
||||
@@ -774,6 +779,7 @@ namespace Saxonite.Base.App
|
||||
new ColumnDfn(15,"Id",5,-5,true,19),
|
||||
new ColumnDfn(15,"UserAccountId",4,4,false,10),
|
||||
new ColumnDfn(15,"SportId",4,4,false,10),
|
||||
new ColumnDfn(15,"About",0,-9,false,2000),
|
||||
new ColumnDfn(15,"Participation",3,5,false,5),
|
||||
new ColumnDfn(15,"Officiating",3,5,false,5),
|
||||
new ColumnDfn(15,"UserSportData",0,-9,false,0),
|
||||
|
||||
@@ -89,6 +89,7 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
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> 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); } }
|
||||
public List<TypeCodeDesc> SportOfficiatingCodes { get { return GetCodesOfType(Sax.CodeType.SportOfficiating); } }
|
||||
public List<TypeCodeDesc> RegionTypeCodes { get { return GetCodesOfType(Sax.CodeType.RegionType); } }
|
||||
@@ -201,31 +202,24 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
SaLogger.Debug(GetType().Name + ".QueryRegionsToCache(regionIds) Regions queried: " + regionsQueried + ". Regions in cache: " + regionCache.Count + ". Elapsed: " + DateUtil.FormatNumberOfSeconds((DateTime.Now - startedAt).TotalSeconds));
|
||||
}
|
||||
}
|
||||
public SaxRegion GetRegion(SysId regionId)
|
||||
public SaxRegion.Data GetRegion(SysId regionId)
|
||||
{
|
||||
QueryRegionsToCache(new List<SysId>() { regionId });
|
||||
return GetRegion(regionCache.GetValue(regionId, null));
|
||||
return regionCache.GetValue(regionId, null);
|
||||
}
|
||||
public List<SaxRegion> GetRegions(List<SysId> regionIds)
|
||||
public List<SaxRegion.Data> GetRegions(List<SysId> regionIds)
|
||||
{
|
||||
List<SaxRegion> regions = new List<SaxRegion>();
|
||||
List<SaxRegion.Data> regions = new List<SaxRegion.Data>();
|
||||
QueryRegionsToCache(regionIds);
|
||||
foreach (SysId regionId in regionIds)
|
||||
{
|
||||
if (!SysId.IsValid(regionId)) continue;
|
||||
SaxRegion region = GetRegion(regionCache.GetValue(regionId, null));
|
||||
SaxRegion.Data region = regionCache.GetValue(regionId, null);
|
||||
if (region != null)
|
||||
regions.Add(region);
|
||||
}
|
||||
return regions;
|
||||
}
|
||||
private SaxRegion GetRegion(SaxRegion.Data regionData)
|
||||
{
|
||||
if (regionData == null) return null;
|
||||
SaxRegion region = ReferenceMgr.CreateRegion();
|
||||
region.SetData(regionData);
|
||||
return region;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Sports.
|
||||
@@ -276,31 +270,24 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
SaLogger.Debug(GetType().Name + ".QuerySportsToCache(sportIds) Sports queried: " + sportsQueried + ". Sports in cache: " + sportCache.Count + ". Elapsed: " + DateUtil.FormatNumberOfSeconds((DateTime.Now - startedAt).TotalSeconds));
|
||||
}
|
||||
}
|
||||
public SaxSport GetSport(SysId sportId)
|
||||
public SaxSport.Data GetSport(SysId sportId)
|
||||
{
|
||||
QuerySportsToCache(new List<SysId>() { sportId });
|
||||
return GetSport(sportCache.GetValue(sportId, null));
|
||||
return sportCache.GetValue(sportId, null);
|
||||
}
|
||||
public List<SaxSport> GetSports(List<SysId> sportIds)
|
||||
public List<SaxSport.Data> GetSports(List<SysId> sportIds)
|
||||
{
|
||||
List<SaxSport> sports = new List<SaxSport>();
|
||||
List<SaxSport.Data> sports = new List<SaxSport.Data>();
|
||||
QuerySportsToCache(sportIds);
|
||||
foreach (SysId sportId in sportIds)
|
||||
{
|
||||
if (!SysId.IsValid(sportId)) continue;
|
||||
SaxSport sport = GetSport(sportCache.GetValue(sportId, null));
|
||||
SaxSport.Data sport = sportCache.GetValue(sportId, null);
|
||||
if (sport != null)
|
||||
sports.Add(sport);
|
||||
}
|
||||
return sports;
|
||||
}
|
||||
private SaxSport GetSport(SaxSport.Data sportData)
|
||||
{
|
||||
if (sportData == null) return null;
|
||||
SaxSport sport = ReferenceMgr.CreateSport();
|
||||
sport.SetData(sportData);
|
||||
return sport;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Common Data Components
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
private static readonly List<TypeCodeDesc> yesNoCodes = new List<TypeCodeDesc>();
|
||||
private static readonly List<TypeCodeDesc> dataItemTypeCodes = new List<TypeCodeDesc>();
|
||||
private static readonly List<TypeCodeDesc> genderCodes = new List<TypeCodeDesc>();
|
||||
private static readonly List<TypeCodeDesc> sportSpecialityLabelCodes = new List<TypeCodeDesc>();
|
||||
private static readonly List<TypeCodeDesc> sportParticipationCodes = new List<TypeCodeDesc>();
|
||||
private static readonly List<TypeCodeDesc> sportOfficiatingCodes = new List<TypeCodeDesc>();
|
||||
private static readonly List<TypeCodeDesc> regionTypeCodes = new List<TypeCodeDesc>();
|
||||
@@ -69,6 +70,12 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
genderCodes.Add(Sax.Gender.Nonconforming, "Nonconforming", "Nonconforming");
|
||||
genderCodes.Add(Sax.Gender.PreferNotToSay, "PreferNotToSay", "Prefer not to say");
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// Sport speciality label.
|
||||
sportSpecialityLabelCodes.Add(Sax.SportSpecialityLabel.Positon, "POS", "Positon");
|
||||
sportSpecialityLabelCodes.Add(Sax.SportSpecialityLabel.Discipline, "DIS", "Discipline");
|
||||
sportSpecialityLabelCodes.Add(Sax.SportSpecialityLabel.NotRelevant, "NRE", "Not relevant");
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// Sport participation.
|
||||
sportParticipationCodes.Add(Sax.SportParticipation.Professional, "PRO", "Professional");
|
||||
|
||||
@@ -42,6 +42,8 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
return new List<TypeCodeDesc>(dataItemTypeCodes);
|
||||
case Sax.CodeType.Gender:
|
||||
return new List<TypeCodeDesc>(genderCodes);
|
||||
case Sax.CodeType.SportSpecialityLabel:
|
||||
return new List<TypeCodeDesc>(sportSpecialityLabelCodes);
|
||||
case Sax.CodeType.SportParticipation:
|
||||
return new List<TypeCodeDesc>(sportParticipationCodes);
|
||||
case Sax.CodeType.SportOfficiating:
|
||||
|
||||
@@ -19,6 +19,8 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
Pos,
|
||||
Id,
|
||||
Name,
|
||||
SpecialityLabel,
|
||||
SpecialityLabel_Desc,
|
||||
// Associated data.
|
||||
// Common.
|
||||
Notes,
|
||||
@@ -35,6 +37,7 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
public class DataProperties
|
||||
{
|
||||
public String Name { get; set; } = String.Empty;
|
||||
public Sax.SportSpecialityLabel SpecialityLabel { get; set; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -54,10 +57,16 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
get { return data.Name; }
|
||||
set { CheckChanged(data.Name, value); data.Name = value; }
|
||||
}
|
||||
public Sax.SportSpecialityLabel SpecialityLabel
|
||||
{
|
||||
get { return data.SpecialityLabel; }
|
||||
set { CheckChanged((short)data.SpecialityLabel, (short)value); data.SpecialityLabel = value; }
|
||||
}
|
||||
// Population.
|
||||
internal void PopulateFrom (Data data)
|
||||
{
|
||||
Name = data.Name;
|
||||
SpecialityLabel = data.SpecialityLabel;
|
||||
base.PopulateFrom(data);
|
||||
}
|
||||
public Data Clone ()
|
||||
@@ -74,6 +83,7 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
{
|
||||
// Identifies the field that has invalid data.
|
||||
public ValidValue Name { get; set; } = ValidValue.Valid;
|
||||
public ValidValue SpecialityLabel { get; set; } = ValidValue.Valid;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -129,6 +139,11 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
get { return data.Name; }
|
||||
set { data.Name = value; }
|
||||
}
|
||||
public Sax.SportSpecialityLabel SpecialityLabel
|
||||
{
|
||||
get { return data.SpecialityLabel; }
|
||||
set { data.SpecialityLabel = value; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Flags - positions 1-16 available.
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
FirstName,
|
||||
Initials,
|
||||
LastName,
|
||||
About,
|
||||
PhoneMain,
|
||||
PhoneMobile,
|
||||
DateOfBirthDay,
|
||||
@@ -65,6 +66,7 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
public String FirstName { get; set; } = String.Empty;
|
||||
public String Initials { get; set; } = String.Empty;
|
||||
public String LastName { get; set; } = String.Empty;
|
||||
public String About { get; set; } = String.Empty;
|
||||
public String PhoneMain { get; set; } = String.Empty;
|
||||
public String PhoneMobile { get; set; } = String.Empty;
|
||||
public Sax.Gender Gender { get; set; }
|
||||
@@ -121,6 +123,11 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
get { return data.LastName; }
|
||||
set { CheckChanged(data.LastName, value); data.LastName = value; }
|
||||
}
|
||||
public String About
|
||||
{
|
||||
get { return data.About; }
|
||||
set { CheckChanged(data.About, value); data.About = value; }
|
||||
}
|
||||
public String PhoneMain
|
||||
{
|
||||
get { return data.PhoneMain; }
|
||||
@@ -211,6 +218,7 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
FirstName = data.FirstName;
|
||||
Initials = data.Initials;
|
||||
LastName = data.LastName;
|
||||
About = data.About;
|
||||
PhoneMain = data.PhoneMain;
|
||||
PhoneMobile = data.PhoneMobile;
|
||||
Gender = data.Gender;
|
||||
@@ -248,6 +256,7 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
public ValidValue FirstName { get; set; } = ValidValue.Valid;
|
||||
public ValidValue Initials { get; set; } = ValidValue.Valid;
|
||||
public ValidValue LastName { get; set; } = ValidValue.Valid;
|
||||
public ValidValue About { get; set; } = ValidValue.Valid;
|
||||
public ValidValue PhoneMain { get; set; } = ValidValue.Valid;
|
||||
public ValidValue PhoneMobile { get; set; } = ValidValue.Valid;
|
||||
public ValidValue Gender { get; set; } = ValidValue.Valid;
|
||||
@@ -356,6 +365,11 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
get { return data.LastName; }
|
||||
set { data.LastName = value; }
|
||||
}
|
||||
public String About
|
||||
{
|
||||
get { return data.About; }
|
||||
set { data.About = value; }
|
||||
}
|
||||
public String PhoneMain
|
||||
{
|
||||
get { return data.PhoneMain; }
|
||||
|
||||
@@ -22,6 +22,8 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
Pos,
|
||||
Id,
|
||||
UserSportId,
|
||||
// Sport.
|
||||
Sport_Id,
|
||||
// Period.
|
||||
PeriodFrom,
|
||||
PeriodTo,
|
||||
|
||||
@@ -29,16 +29,24 @@ namespace Saxonite.Net.Standard.Base.Consoles
|
||||
//-------------------------------------------------------------------
|
||||
// Regions.
|
||||
/// <summary>
|
||||
/// Get the cached list of regions. NB These should be disposed after use.
|
||||
/// Get the cached list of regions.
|
||||
/// </summary>
|
||||
public abstract List<SaxRegion> GetActiveRegions();
|
||||
public abstract List<SaxRegion.Data> GetAllRegions();
|
||||
/// <summary>
|
||||
/// Get the cached list of active regions.
|
||||
/// </summary>
|
||||
public abstract List<SaxRegion.Data> GetActiveRegions();
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Sports.
|
||||
/// <summary>
|
||||
/// Get the cached list of sports. NB These should be disposed after use.
|
||||
/// Get the cached list of sports.
|
||||
/// </summary>
|
||||
public abstract List<SaxSport> GetActiveSports();
|
||||
public abstract List<SaxSport.Data> GetAllSports();
|
||||
/// <summary>
|
||||
/// Get the cached list of active sports.
|
||||
/// </summary>
|
||||
public abstract List<SaxSport.Data> GetActiveSports();
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
|
||||
@@ -119,6 +119,12 @@ namespace Saxonite.Net.Standard.Base.Mgr
|
||||
errField.LastName = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return false;
|
||||
}
|
||||
// About.
|
||||
if (errField.About != SacsHierarchyItem.ValidValue.Ignore && !IsValidValue(data.About, "about", (long)SaxDbDfn_Core.GetColTextLen(SaxDbDfn_Core.ColumnIdx.UserAccount_About)))
|
||||
{
|
||||
errField.About = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return false;
|
||||
}
|
||||
// Phone - main.
|
||||
if (errField.PhoneMain != SacsHierarchyItem.ValidValue.Ignore && !IsValidValue(data.PhoneMain, "phone", (long)SaxDbDfn_Core.GetColTextLen(SaxDbDfn_Core.ColumnIdx.UserAccount_PhoneMain)))
|
||||
{
|
||||
@@ -196,13 +202,12 @@ namespace Saxonite.Net.Standard.Base.Mgr
|
||||
// Associated data - ignore for deleted items.
|
||||
if (!data.IsStatusDeleted)
|
||||
{
|
||||
|
||||
// Regions.
|
||||
if (errField.RegionIdCountry != SacsHierarchyItem.ValidValue.Ignore || errField.RegionIdProvince != SacsHierarchyItem.ValidValue.Ignore)
|
||||
{
|
||||
List<SaxRegion> regions = Internals.GetRegions(new List<SysId>() { data.RegionIdCountry, data.RegionIdProvince });
|
||||
SaxRegion regionCountry = regions.GetRegionById(data.RegionIdCountry);
|
||||
SaxRegion regionProvince = regions.GetRegionById(data.RegionIdProvince);
|
||||
List<SaxRegion.Data> regions = Internals.GetRegions(new List<SysId>() { data.RegionIdCountry, data.RegionIdProvince });
|
||||
SaxRegion.Data regionCountry = regions.Find(item => item.Id.Equals(data.RegionIdCountry));
|
||||
SaxRegion.Data regionProvince = regions.Find(item => item.Id.Equals(data.RegionIdProvince));
|
||||
if (errField.RegionIdCountry != SacsHierarchyItem.ValidValue.Ignore)
|
||||
{
|
||||
if (SysId.IsValid(data.RegionIdCountry) && regionCountry == null)
|
||||
@@ -214,7 +219,6 @@ namespace Saxonite.Net.Standard.Base.Mgr
|
||||
return SetErrorState("Invalid country specified");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -67,6 +67,7 @@ namespace Saxonite.Net.Standard.Base.Mgr
|
||||
public SaxItemDataMgr ItemDataMgr { get { return Internals.ItemDataMgr; } }
|
||||
// Application codes.
|
||||
public List<TypeCodeDesc> DataItemTypeCodes { get { return Internals.DataItemTypeCodes; } }
|
||||
public List<TypeCodeDesc> SportSpecialityLabelCodes { get { return Internals.SportSpecialityLabelCodes; } }
|
||||
public List<TypeCodeDesc> SportParticipationCodes { get { return Internals.SportParticipationCodes; } }
|
||||
public List<TypeCodeDesc> SportOfficiatingCodes { get { return Internals.SportOfficiatingCodes; } }
|
||||
public List<TypeCodeDesc> RegionTypeCodes { get { return Internals.RegionTypeCodes; } }
|
||||
|
||||
@@ -21,11 +21,11 @@ namespace Saxonite.Net.Standard.Base.Mgr
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Create item.
|
||||
public abstract SaxSport CreateSport ();
|
||||
public abstract SaxSport CreateSport();
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Item exists.
|
||||
public bool SportExistsById (SysId id)
|
||||
public bool SportExistsById(SysId id)
|
||||
{
|
||||
ClearErrorState();
|
||||
if (!SysId.IsValid(id)) return false;
|
||||
@@ -34,7 +34,7 @@ namespace Saxonite.Net.Standard.Base.Mgr
|
||||
prmSport.StatusCat = SaxSport.StatusCat.Any;
|
||||
return GetSportCount(prmSport) == 1;
|
||||
}
|
||||
public bool SportExistsByName (String name)
|
||||
public bool SportExistsByName(String name)
|
||||
{
|
||||
ClearErrorState();
|
||||
if (StringUtil.IsEmpty(name)) return false;
|
||||
@@ -46,8 +46,8 @@ namespace Saxonite.Net.Standard.Base.Mgr
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Retrieve individual items.
|
||||
public abstract SaxSport GetSport (SaxSport.Params prmSport);
|
||||
public SaxSport GetSportById (SysId id)
|
||||
public abstract SaxSport GetSport(SaxSport.Params prmSport);
|
||||
public SaxSport GetSportById(SysId id)
|
||||
{
|
||||
ClearErrorState();
|
||||
if (!SysId.IsValid(id)) return null;
|
||||
@@ -56,7 +56,7 @@ namespace Saxonite.Net.Standard.Base.Mgr
|
||||
prmSport.StatusCat = SaxSport.StatusCat.Any;
|
||||
return GetSport(prmSport);
|
||||
}
|
||||
public SaxSport GetSportByName (String name)
|
||||
public SaxSport GetSportByName(String name)
|
||||
{
|
||||
ClearErrorState();
|
||||
if (StringUtil.IsEmpty(name)) return null;
|
||||
@@ -68,13 +68,13 @@ namespace Saxonite.Net.Standard.Base.Mgr
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Validate item data.
|
||||
public bool IsValidSport (SaxSport sport)
|
||||
public bool IsValidSport(SaxSport sport)
|
||||
{
|
||||
ClearErrorState();
|
||||
if (sport == null) return SetErrorState(ErrorMessage.ItemNotSpecified);
|
||||
return IsValidSportData(sport.GetData(), new SaxSport.ErrField());
|
||||
}
|
||||
public virtual bool IsValidSportData (SaxSport.Data data, SaxSport.ErrField errField)
|
||||
public virtual bool IsValidSportData(SaxSport.Data data, SaxSport.ErrField errField)
|
||||
{
|
||||
ClearErrorState();
|
||||
|
||||
@@ -109,33 +109,39 @@ namespace Saxonite.Net.Standard.Base.Mgr
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Sport database interface.
|
||||
public abstract bool InsertSport (SaxSport sport, DbUpdateInfo dbUpdateInfo);
|
||||
public abstract bool UpdateSport (SaxSport sport, DbUpdateInfo dbUpdateInfo);
|
||||
public virtual bool SportCanBeDeleted (SaxSport sport)
|
||||
public abstract bool InsertSport(SaxSport sport, DbUpdateInfo dbUpdateInfo);
|
||||
public abstract bool UpdateSport(SaxSport sport, DbUpdateInfo dbUpdateInfo);
|
||||
public virtual bool SportCanBeDeleted(SaxSport sport)
|
||||
{
|
||||
ClearErrorState();
|
||||
return true;
|
||||
}
|
||||
public abstract bool DeleteSport (SaxSport sport, DbUpdateInfo dbUpdateInfo);
|
||||
public abstract bool DeleteSport(SaxSport sport, DbUpdateInfo dbUpdateInfo);
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Sport list:
|
||||
public abstract ColumnDfn GetSportColumnDfn (SaxSport.Column columnId, String caption = "", int width = 0);
|
||||
public abstract List<String> GetSportQueryFilter (SaxSport.Params prmSport);
|
||||
public abstract long GetSportCount (SaxSport.Params prmSport);
|
||||
public abstract List<SaxSport> GetSportList (SaxSport.Params prmSport);
|
||||
public abstract DbResultSet ExecuteSportQuery (List<ColumnDfn> columns, SaxSport.Params prmSport);
|
||||
public abstract ColumnDfn GetSportColumnDfn(SaxSport.Column columnId, String caption = "", int width = 0);
|
||||
public abstract List<String> GetSportQueryFilter(SaxSport.Params prmSport);
|
||||
public abstract long GetSportCount(SaxSport.Params prmSport);
|
||||
public abstract List<SaxSport> GetSportList(SaxSport.Params prmSport);
|
||||
public abstract DbResultSet ExecuteSportQuery(List<ColumnDfn> columns, SaxSport.Params prmSport);
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>
|
||||
/// Extract and format result set data value where specific handling is required.
|
||||
/// <para>Where response is an invalid data value, format value using column.FormatValue(values).</para>
|
||||
/// </summary>
|
||||
public virtual DataValue GetSportDataValue (ColumnDfn column, NamedValue.Map values)
|
||||
public virtual DataValue GetSportDataValue(ColumnDfn column, NamedValue.Map values)
|
||||
{
|
||||
DataValue value = new DataValue();
|
||||
switch ((SaxSport.Column)column.Id)
|
||||
{
|
||||
//-----------------------------------------------------------
|
||||
// Speciality label.
|
||||
case SaxSport.Column.SpecialityLabel_Desc:
|
||||
value = new DataValue(Internals.SportSpecialityLabelCodes.GetDescForType(values.GetValue(column.DataName).AsLong()));
|
||||
break;
|
||||
|
||||
//-----------------------------------------------------------
|
||||
// Notes - limit to 200 chars.
|
||||
case SaxSport.Column.Notes:
|
||||
@@ -146,17 +152,17 @@ namespace Saxonite.Net.Standard.Base.Mgr
|
||||
// Status.
|
||||
case SaxSport.Column.Status_Desc:
|
||||
case SaxSport.Column.Status_Ind:
|
||||
{
|
||||
String statusCode = values.GetValue(column.DataName).ToString();
|
||||
SaStatus status = SacsSystem.GetStatusForCode(statusCode);
|
||||
if (column.Id == (int)SaxSport.Column.Status_Desc)
|
||||
value = new DataValue(SacsSystem.GetStatusDesc(status));
|
||||
else if (column.Id == (int)SaxSport.Column.Status_Ind)
|
||||
value = new DataValue(SaxSport.GetStatusTriState(status));
|
||||
}
|
||||
break;
|
||||
{
|
||||
String statusCode = values.GetValue(column.DataName).ToString();
|
||||
SaStatus status = SacsSystem.GetStatusForCode(statusCode);
|
||||
if (column.Id == (int)SaxSport.Column.Status_Desc)
|
||||
value = new DataValue(SacsSystem.GetStatusDesc(status));
|
||||
else if (column.Id == (int)SaxSport.Column.Status_Ind)
|
||||
value = new DataValue(SaxSport.GetStatusTriState(status));
|
||||
}
|
||||
break;
|
||||
|
||||
//-----------------------------------------------------------
|
||||
//-----------------------------------------------------------
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 19-Aug-2021 17:19:49
|
||||
// Code generated by Sarand Database Utilities Thu 26-Aug-2021 12:36:27
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 19-Aug-2021 17:19:49
|
||||
// Code generated by Sarand Database Utilities Thu 26-Aug-2021 12:36:27
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 19-Aug-2021 17:19:49
|
||||
// Code generated by Sarand Database Utilities Thu 26-Aug-2021 12:36:27
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 19-Aug-2021 17:19:49
|
||||
// Code generated by Sarand Database Utilities Thu 26-Aug-2021 12:36:27
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 19-Aug-2021 17:19:49
|
||||
// Code generated by Sarand Database Utilities Thu 26-Aug-2021 12:36:27
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 19-Aug-2021 17:19:49
|
||||
// Code generated by Sarand Database Utilities Thu 26-Aug-2021 12:36:27
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 19-Aug-2021 17:19:49
|
||||
// Code generated by Sarand Database Utilities Thu 26-Aug-2021 12:36:27
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 19-Aug-2021 17:19:49
|
||||
// Code generated by Sarand Database Utilities Thu 26-Aug-2021 12:36:27
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 19-Aug-2021 17:19:49
|
||||
// Code generated by Sarand Database Utilities Thu 26-Aug-2021 12:36:27
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
@@ -21,6 +21,7 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
public ColumnDataInt32 _Id { get; } = new ColumnDataInt32("Id", true);
|
||||
public ColumnDataString _Name { get; } = new ColumnDataString("Name");
|
||||
public ColumnDataInt16 _SpecialityLabel { get; } = new ColumnDataInt16("SpecialityLabel");
|
||||
public ColumnDataString _Notes { get; } = new ColumnDataString("Notes");
|
||||
public ColumnDataInt16 _Flags { get; } = new ColumnDataInt16("Flags");
|
||||
public ColumnDataString _Status { get; } = new ColumnDataString("Status");
|
||||
@@ -38,6 +39,7 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
"Id",
|
||||
"Name",
|
||||
"SpecialityLabel",
|
||||
"Notes",
|
||||
"Flags",
|
||||
"Status",
|
||||
@@ -81,6 +83,7 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
public ColumnsData Cols { get; } = new ColumnsData();
|
||||
public Int32 _Id { get { return Cols._Id.Value; } set { Cols._Id.Value = value; } }
|
||||
public String _Name { get { return Cols._Name.Value; } set { Cols._Name.Value = value; } }
|
||||
public Int16 _SpecialityLabel { get { return Cols._SpecialityLabel.Value; } set { Cols._SpecialityLabel.Value = value; } }
|
||||
public String _Notes { get { return Cols._Notes.Value; } set { Cols._Notes.Value = value; } }
|
||||
public Int16 _Flags { get { return Cols._Flags.Value; } set { Cols._Flags.Value = value; } }
|
||||
public String _Status { get { return Cols._Status.Value; } set { Cols._Status.Value = value; } }
|
||||
@@ -113,6 +116,7 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
_Id = GetFieldInt32(dbDataReader, "Id", _Id);
|
||||
_Name = GetFieldString(dbDataReader, "Name", _Name);
|
||||
_SpecialityLabel = GetFieldInt16(dbDataReader, "SpecialityLabel", _SpecialityLabel);
|
||||
_Notes = GetFieldString(dbDataReader, "Notes", _Notes);
|
||||
_Flags = GetFieldInt16(dbDataReader, "Flags", _Flags);
|
||||
_Status = GetFieldString(dbDataReader, "Status", _Status);
|
||||
@@ -144,6 +148,7 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
// Populate parameters.
|
||||
dbCommand.Parameters.Clear();
|
||||
if (columnNames.ContainsCI("Name")) AddCommandParameter(dbCommand, "@Name", _Name);
|
||||
if (columnNames.ContainsCI("SpecialityLabel")) AddCommandParameter(dbCommand, "@SpecialityLabel", _SpecialityLabel);
|
||||
if (columnNames.ContainsCI("Notes")) AddCommandParameter(dbCommand, "@Notes", _Notes);
|
||||
if (columnNames.ContainsCI("Flags")) AddCommandParameter(dbCommand, "@Flags", _Flags);
|
||||
if (columnNames.ContainsCI("Status")) AddCommandParameter(dbCommand, "@Status", _Status);
|
||||
@@ -190,6 +195,7 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
// Populate parameters.
|
||||
dbCommand.Parameters.Clear();
|
||||
if (columnNames.ContainsCI("Name")) AddCommandParameter(dbCommand, "@Name", _Name);
|
||||
if (columnNames.ContainsCI("SpecialityLabel")) AddCommandParameter(dbCommand, "@SpecialityLabel", _SpecialityLabel);
|
||||
if (columnNames.ContainsCI("Notes")) AddCommandParameter(dbCommand, "@Notes", _Notes);
|
||||
if (columnNames.ContainsCI("Flags")) AddCommandParameter(dbCommand, "@Flags", _Flags);
|
||||
if (columnNames.ContainsCI("Status")) AddCommandParameter(dbCommand, "@Status", _Status);
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 19-Aug-2021 17:19:49
|
||||
// Code generated by Sarand Database Utilities Thu 26-Aug-2021 12:36:27
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
@@ -25,6 +25,7 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
public ColumnDataString _FirstName { get; } = new ColumnDataString("FirstName");
|
||||
public ColumnDataString _Initials { get; } = new ColumnDataString("Initials");
|
||||
public ColumnDataString _LastName { get; } = new ColumnDataString("LastName");
|
||||
public ColumnDataString _About { get; } = new ColumnDataString("About");
|
||||
public ColumnDataString _PhoneMain { get; } = new ColumnDataString("PhoneMain");
|
||||
public ColumnDataString _PhoneMobile { get; } = new ColumnDataString("PhoneMobile");
|
||||
public ColumnDataString _PhoneAlt { get; } = new ColumnDataString("PhoneAlt");
|
||||
@@ -62,6 +63,7 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
"FirstName",
|
||||
"Initials",
|
||||
"LastName",
|
||||
"About",
|
||||
"PhoneMain",
|
||||
"PhoneMobile",
|
||||
"PhoneAlt",
|
||||
@@ -125,6 +127,7 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
public String _FirstName { get { return Cols._FirstName.Value; } set { Cols._FirstName.Value = value; } }
|
||||
public String _Initials { get { return Cols._Initials.Value; } set { Cols._Initials.Value = value; } }
|
||||
public String _LastName { get { return Cols._LastName.Value; } set { Cols._LastName.Value = value; } }
|
||||
public String _About { get { return Cols._About.Value; } set { Cols._About.Value = value; } }
|
||||
public String _PhoneMain { get { return Cols._PhoneMain.Value; } set { Cols._PhoneMain.Value = value; } }
|
||||
public String _PhoneMobile { get { return Cols._PhoneMobile.Value; } set { Cols._PhoneMobile.Value = value; } }
|
||||
public String _PhoneAlt { get { return Cols._PhoneAlt.Value; } set { Cols._PhoneAlt.Value = value; } }
|
||||
@@ -177,6 +180,7 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
_FirstName = GetFieldString(dbDataReader, "FirstName", _FirstName);
|
||||
_Initials = GetFieldString(dbDataReader, "Initials", _Initials);
|
||||
_LastName = GetFieldString(dbDataReader, "LastName", _LastName);
|
||||
_About = GetFieldString(dbDataReader, "About", _About);
|
||||
_PhoneMain = GetFieldString(dbDataReader, "PhoneMain", _PhoneMain);
|
||||
_PhoneMobile = GetFieldString(dbDataReader, "PhoneMobile", _PhoneMobile);
|
||||
_PhoneAlt = GetFieldString(dbDataReader, "PhoneAlt", _PhoneAlt);
|
||||
@@ -228,6 +232,7 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
if (columnNames.ContainsCI("FirstName")) AddCommandParameter(dbCommand, "@FirstName", _FirstName);
|
||||
if (columnNames.ContainsCI("Initials")) AddCommandParameter(dbCommand, "@Initials", _Initials);
|
||||
if (columnNames.ContainsCI("LastName")) AddCommandParameter(dbCommand, "@LastName", _LastName);
|
||||
if (columnNames.ContainsCI("About")) AddCommandParameter(dbCommand, "@About", _About);
|
||||
if (columnNames.ContainsCI("PhoneMain")) AddCommandParameter(dbCommand, "@PhoneMain", _PhoneMain);
|
||||
if (columnNames.ContainsCI("PhoneMobile")) AddCommandParameter(dbCommand, "@PhoneMobile", _PhoneMobile);
|
||||
if (columnNames.ContainsCI("PhoneAlt")) AddCommandParameter(dbCommand, "@PhoneAlt", _PhoneAlt);
|
||||
@@ -294,6 +299,7 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
if (columnNames.ContainsCI("FirstName")) AddCommandParameter(dbCommand, "@FirstName", _FirstName);
|
||||
if (columnNames.ContainsCI("Initials")) AddCommandParameter(dbCommand, "@Initials", _Initials);
|
||||
if (columnNames.ContainsCI("LastName")) AddCommandParameter(dbCommand, "@LastName", _LastName);
|
||||
if (columnNames.ContainsCI("About")) AddCommandParameter(dbCommand, "@About", _About);
|
||||
if (columnNames.ContainsCI("PhoneMain")) AddCommandParameter(dbCommand, "@PhoneMain", _PhoneMain);
|
||||
if (columnNames.ContainsCI("PhoneMobile")) AddCommandParameter(dbCommand, "@PhoneMobile", _PhoneMobile);
|
||||
if (columnNames.ContainsCI("PhoneAlt")) AddCommandParameter(dbCommand, "@PhoneAlt", _PhoneAlt);
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 19-Aug-2021 17:19:49
|
||||
// Code generated by Sarand Database Utilities Thu 26-Aug-2021 12:36:27
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 19-Aug-2021 17:19:49
|
||||
// Code generated by Sarand Database Utilities Thu 26-Aug-2021 12:36:27
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 19-Aug-2021 17:19:49
|
||||
// Code generated by Sarand Database Utilities Thu 26-Aug-2021 12:36:27
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 19-Aug-2021 17:19:49
|
||||
// Code generated by Sarand Database Utilities Thu 26-Aug-2021 12:36:27
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 19-Aug-2021 17:19:49
|
||||
// Code generated by Sarand Database Utilities Thu 26-Aug-2021 12:36:27
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Thu 19-Aug-2021 17:19:49
|
||||
// Code generated by Sarand Database Utilities Thu 26-Aug-2021 12:36:27
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
@@ -22,6 +22,7 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
public ColumnDataInt64 _Id { get; } = new ColumnDataInt64("Id", true);
|
||||
public ColumnDataInt32 _UserAccountId { get; } = new ColumnDataInt32("UserAccountId");
|
||||
public ColumnDataInt32 _SportId { get; } = new ColumnDataInt32("SportId");
|
||||
public ColumnDataString _About { get; } = new ColumnDataString("About");
|
||||
public ColumnDataInt16 _Participation { get; } = new ColumnDataInt16("Participation");
|
||||
public ColumnDataInt16 _Officiating { get; } = new ColumnDataInt16("Officiating");
|
||||
public ColumnDataString _UserSportData { get; } = new ColumnDataString("UserSportData");
|
||||
@@ -43,6 +44,7 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
"Id",
|
||||
"UserAccountId",
|
||||
"SportId",
|
||||
"About",
|
||||
"Participation",
|
||||
"Officiating",
|
||||
"UserSportData",
|
||||
@@ -90,6 +92,7 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
public Int64 _Id { get { return Cols._Id.Value; } set { Cols._Id.Value = value; } }
|
||||
public Int32 _UserAccountId { get { return Cols._UserAccountId.Value; } set { Cols._UserAccountId.Value = value; } }
|
||||
public Int32 _SportId { get { return Cols._SportId.Value; } set { Cols._SportId.Value = value; } }
|
||||
public String _About { get { return Cols._About.Value; } set { Cols._About.Value = value; } }
|
||||
public Int16 _Participation { get { return Cols._Participation.Value; } set { Cols._Participation.Value = value; } }
|
||||
public Int16 _Officiating { get { return Cols._Officiating.Value; } set { Cols._Officiating.Value = value; } }
|
||||
public String _UserSportData { get { return Cols._UserSportData.Value; } set { Cols._UserSportData.Value = value; } }
|
||||
@@ -126,6 +129,7 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
_Id = GetFieldInt64(dbDataReader, "Id", _Id);
|
||||
_UserAccountId = GetFieldInt32(dbDataReader, "UserAccountId", _UserAccountId);
|
||||
_SportId = GetFieldInt32(dbDataReader, "SportId", _SportId);
|
||||
_About = GetFieldString(dbDataReader, "About", _About);
|
||||
_Participation = GetFieldInt16(dbDataReader, "Participation", _Participation);
|
||||
_Officiating = GetFieldInt16(dbDataReader, "Officiating", _Officiating);
|
||||
_UserSportData = GetFieldString(dbDataReader, "UserSportData", _UserSportData);
|
||||
@@ -161,6 +165,7 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
dbCommand.Parameters.Clear();
|
||||
if (columnNames.ContainsCI("UserAccountId")) AddCommandParameter(dbCommand, "@UserAccountId", _UserAccountId);
|
||||
if (columnNames.ContainsCI("SportId")) AddCommandParameter(dbCommand, "@SportId", _SportId);
|
||||
if (columnNames.ContainsCI("About")) AddCommandParameter(dbCommand, "@About", _About);
|
||||
if (columnNames.ContainsCI("Participation")) AddCommandParameter(dbCommand, "@Participation", _Participation);
|
||||
if (columnNames.ContainsCI("Officiating")) AddCommandParameter(dbCommand, "@Officiating", _Officiating);
|
||||
if (columnNames.ContainsCI("UserSportData")) AddCommandParameter(dbCommand, "@UserSportData", _UserSportData);
|
||||
@@ -211,6 +216,7 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
dbCommand.Parameters.Clear();
|
||||
if (columnNames.ContainsCI("UserAccountId")) AddCommandParameter(dbCommand, "@UserAccountId", _UserAccountId);
|
||||
if (columnNames.ContainsCI("SportId")) AddCommandParameter(dbCommand, "@SportId", _SportId);
|
||||
if (columnNames.ContainsCI("About")) AddCommandParameter(dbCommand, "@About", _About);
|
||||
if (columnNames.ContainsCI("Participation")) AddCommandParameter(dbCommand, "@Participation", _Participation);
|
||||
if (columnNames.ContainsCI("Officiating")) AddCommandParameter(dbCommand, "@Officiating", _Officiating);
|
||||
if (columnNames.ContainsCI("UserSportData")) AddCommandParameter(dbCommand, "@UserSportData", _UserSportData);
|
||||
|
||||
@@ -216,6 +216,7 @@ namespace Saxonite.Net.Standard.Dbas.Mgr
|
||||
dbUserAccount._FirstName = userAccount.FirstName;
|
||||
dbUserAccount._Initials = userAccount.Initials;
|
||||
dbUserAccount._LastName = userAccount.LastName;
|
||||
dbUserAccount._About = userAccount.About;
|
||||
dbUserAccount._PhoneMain = StringUtil.EmptyOnNull(userAccount.PhoneMain);
|
||||
dbUserAccount._PhoneMobile = StringUtil.EmptyOnNull(userAccount.PhoneMobile);
|
||||
dbUserAccount._Gender = (byte)userAccount.Gender;
|
||||
@@ -255,6 +256,7 @@ namespace Saxonite.Net.Standard.Dbas.Mgr
|
||||
userAccount.FirstName = dbUserAccount._FirstName;
|
||||
userAccount.Initials = dbUserAccount._Initials;
|
||||
userAccount.LastName = dbUserAccount._LastName;
|
||||
userAccount.About = dbUserAccount._About;
|
||||
userAccount.PhoneMain = dbUserAccount._PhoneMain;
|
||||
userAccount.PhoneMobile = dbUserAccount._PhoneMobile;
|
||||
userAccount.Gender = (Sax.Gender)dbUserAccount._Gender;
|
||||
|
||||
@@ -265,13 +265,15 @@ namespace Saxonite.Net.Standard.Dbas.Mgr
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Item column definitions.
|
||||
private static readonly String aliasUserSportExperience = "UsrSpt";
|
||||
private static readonly String aliasUserSportExperience_Organisation = "UsrSpt_Org";
|
||||
private static readonly String prefixUserSportExperience_Organisation = "UsrSpt_Org_";
|
||||
private static readonly String aliasUserSportExperience_Region_Nation = "UsrSpt_Rgn_Nat";
|
||||
private static readonly String prefixUserSportExperience_Region_Nation = "UsrSpt_Rgn_Nat_";
|
||||
private static readonly String aliasUserSportExperience_Region_Province = "UsrSpt_Rgn_Pro";
|
||||
private static readonly String prefixUserSportExperience_Region_Province = "UsrSpt_Rgn_Pro_";
|
||||
private static readonly String aliasUserSportExperience = "SptExp";
|
||||
private static readonly String aliasUserSportExperience_UserSport = "SptExp_UsrSpt";
|
||||
private static readonly String prefixUserSportExperience_UserSport = "SptExp_UsrSpt_";
|
||||
private static readonly String aliasUserSportExperience_Organisation = "SptExp_Org";
|
||||
private static readonly String prefixUserSportExperience_Organisation = "SptExp_Org_";
|
||||
private static readonly String aliasUserSportExperience_Region_Nation = "SptExp_Rgn_Nat";
|
||||
private static readonly String prefixUserSportExperience_Region_Nation = "SptExp_Rgn_Nat_";
|
||||
private static readonly String aliasUserSportExperience_Region_Province = "SptExp_Rgn_Pro";
|
||||
private static readonly String prefixUserSportExperience_Region_Province = "SptExp_Rgn_Pro_";
|
||||
private void SetUserSportExperienceColDfn
|
||||
(ColumnDfn col, String caption, int width, SaxDbDfn_Core.ColumnIdx dbCol,
|
||||
ColumnAlignment align = ColumnAlignment.Default, DataValue.DataType dataType = DataValue.DataType.String,
|
||||
@@ -307,6 +309,13 @@ namespace Saxonite.Net.Standard.Dbas.Mgr
|
||||
columnDfn.ReadOnly = true;
|
||||
break;
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Sport.
|
||||
case SaxUserSportExperience.Column.Sport_Id:
|
||||
SetUserSportExperienceColDfn(columnDfn, "Sport Id", 80, SaxDbDfn_Core.ColumnIdx.UserSport_SportId, ColumnAlignment.Right, DataValue.DataType.Long, aliasUserSportExperience_UserSport, prefixUserSportExperience_UserSport);
|
||||
columnDfn.ReadOnly = true;
|
||||
break;
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Period.
|
||||
case SaxUserSportExperience.Column.PeriodFrom:
|
||||
@@ -550,6 +559,7 @@ namespace Saxonite.Net.Standard.Dbas.Mgr
|
||||
// Add columns as defined in query list.
|
||||
if (columns.HasId(SaxUserSportExperience.Column.Id))
|
||||
query.Columns.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.UserSportExperience_Id, aliasUserSportExperience));
|
||||
bool hasUserSportCols = (columns.HasId(SaxUserSportExperience.Column.Sport_Id));
|
||||
if (columns.HasId(SaxUserSportExperience.Column.UserSportId))
|
||||
query.Columns.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.UserSportExperience_UserSportId, aliasUserSportExperience));
|
||||
if (columns.HasId(SaxUserSportExperience.Column.PeriodFrom))
|
||||
@@ -587,6 +597,20 @@ namespace Saxonite.Net.Standard.Dbas.Mgr
|
||||
if (columns.HasId(SaxUserSportExperience.Column.UpdateOn_Date))
|
||||
query.Columns.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.UserSportExperience_UpdateOn, aliasUserSportExperience));
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// User Sport.
|
||||
if (hasUserSportCols)
|
||||
{
|
||||
DbQueryJoin joinUserSport = new DbQueryJoin(DbJoinType.LeftOuter);
|
||||
joinUserSport.Table = new StringPair(SaxDbDfn_Core.GetTableName(SaxDbDfn_Core.TableIdx.UserSport), aliasUserSportExperience_UserSport);
|
||||
joinUserSport.Filters.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.UserSport_Id, aliasUserSportExperience_UserSport) + "=" + SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.UserSportExperience_UserSportId, aliasUserSportExperience));
|
||||
query.Joins.Add(joinUserSport);
|
||||
List<SaxDbDfn_Core.ColumnIdx> cols = new List<SaxDbDfn_Core.ColumnIdx>();
|
||||
cols.Add(SaxDbDfn_Core.ColumnIdx.UserSport_SportId);
|
||||
foreach (var col in cols)
|
||||
query.Columns.Add(SaxDbDfn_Core.GetColumnNameQual(col, aliasUserSportExperience_UserSport), prefixUserSportExperience_UserSport + SaxDbDfn_Core.GetColumnName(col, false));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// Organisation.
|
||||
if (hasOrganisationCols)
|
||||
|
||||
@@ -212,6 +212,8 @@ namespace Saxonite.Net.Standard.Dbas.Mgr
|
||||
{
|
||||
dbSport._Id = SysId.ToInt(sport.Id);
|
||||
dbSport._Name = sport.Name;
|
||||
dbSport._SpecialityLabel = (short)sport.SpecialityLabel;
|
||||
// Common properties.
|
||||
dbSport._Notes = sport.Notes;
|
||||
dbSport._Status = SacsSystem.GetStatusCode(sport.Status);
|
||||
dbSport._Flags = (short)sport.Flags;
|
||||
@@ -229,6 +231,8 @@ namespace Saxonite.Net.Standard.Dbas.Mgr
|
||||
{
|
||||
//sport.Id = new SysId(dbSport._Id);
|
||||
sport.Name = dbSport._Name;
|
||||
sport.SpecialityLabel = (Sax.SportSpecialityLabel)dbSport._SpecialityLabel;
|
||||
// Common properties.
|
||||
sport.Notes = dbSport._Notes;
|
||||
sport.Status = SacsSystem.GetStatusForCode(dbSport._Status);
|
||||
sport.SetCreateStamp(dbSport._CreateOn, new SysId(dbSport._CreateBy), dbSport._CreateHost);
|
||||
@@ -257,6 +261,7 @@ namespace Saxonite.Net.Standard.Dbas.Mgr
|
||||
switch (columnId)
|
||||
{
|
||||
//-----------------------------------------------------------
|
||||
// Identification.
|
||||
case SaxSport.Column.Pos:
|
||||
SetSportColDfn(columnDfn, "Pos", 60, SaxDbDfn_Core.ColumnIdx.Unknown, ColumnAlignment.Right);
|
||||
columnDfn.SortMode = ColumnDfn.ColumnSortMode.Off;
|
||||
@@ -267,11 +272,22 @@ namespace Saxonite.Net.Standard.Dbas.Mgr
|
||||
SetSportColDfn(columnDfn, "Id", 80, SaxDbDfn_Core.ColumnIdx.Sport_Id, ColumnAlignment.Right, DataValue.DataType.Long);
|
||||
columnDfn.ReadOnly = true;
|
||||
break;
|
||||
|
||||
//-----------------------------------------------------------
|
||||
// Properties.
|
||||
case SaxSport.Column.Name:
|
||||
SetSportColDfn(columnDfn, "Name", 120, SaxDbDfn_Core.ColumnIdx.Sport_Name);
|
||||
break;
|
||||
case SaxSport.Column.SpecialityLabel:
|
||||
SetSportColDfn(columnDfn, "Speciality label", 80, SaxDbDfn_Core.ColumnIdx.Sport_SpecialityLabel, ColumnAlignment.Center, DataValue.DataType.Long);
|
||||
break;
|
||||
case SaxSport.Column.SpecialityLabel_Desc:
|
||||
SetSportColDfn(columnDfn, "Speciality label", 100, SaxDbDfn_Core.ColumnIdx.Sport_SpecialityLabel, ColumnAlignment.Center);
|
||||
break;
|
||||
|
||||
//-----------------------------------------------------------
|
||||
// Derived properties.
|
||||
|
||||
//-----------------------------------------------------------
|
||||
// Common properties.
|
||||
case SaxSport.Column.Notes:
|
||||
@@ -298,6 +314,7 @@ namespace Saxonite.Net.Standard.Dbas.Mgr
|
||||
SetSportColDfn(columnDfn, "Updated", 80, SaxDbDfn_Core.ColumnIdx.Sport_UpdateOn, ColumnAlignment.Center, DataValue.DataType.Date);
|
||||
columnDfn.ReadOnly = true;
|
||||
break;
|
||||
|
||||
//-----------------------------------------------------------
|
||||
}
|
||||
if (!String.IsNullOrEmpty(caption))
|
||||
@@ -465,6 +482,8 @@ namespace Saxonite.Net.Standard.Dbas.Mgr
|
||||
query.Columns.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.Sport_Id, aliasSport));
|
||||
if (columns.HasId(SaxSport.Column.Name))
|
||||
query.Columns.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.Sport_Name, aliasSport));
|
||||
if (columns.HasId(SaxSport.Column.SpecialityLabel) || columns.HasId(SaxSport.Column.SpecialityLabel_Desc))
|
||||
query.Columns.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.Sport_SpecialityLabel, aliasSport));
|
||||
// Common properties.
|
||||
if (columns.HasId(SaxSport.Column.Notes))
|
||||
query.Columns.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.Sport_Notes, aliasSport));
|
||||
|
||||
@@ -3342,6 +3342,23 @@
|
||||
<Schema>dbo</Schema>
|
||||
<Table>Sport</Table>
|
||||
<Pos>3</Pos>
|
||||
<Name>SpecialityLabel</Name>
|
||||
<DataType>SmallInt</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>5</DataTypeNative>
|
||||
<DataTypeNameNative>smallint</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>5</Size>
|
||||
<BufferLen>2</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>Nullable</Nullable>
|
||||
<IsNullable>true</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>Sport</Table>
|
||||
<Pos>4</Pos>
|
||||
<Name>Notes</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3358,7 +3375,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>Sport</Table>
|
||||
<Pos>4</Pos>
|
||||
<Pos>5</Pos>
|
||||
<Name>Flags</Name>
|
||||
<DataType>SmallInt</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3375,7 +3392,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>Sport</Table>
|
||||
<Pos>5</Pos>
|
||||
<Pos>6</Pos>
|
||||
<Name>Status</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3392,7 +3409,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>Sport</Table>
|
||||
<Pos>6</Pos>
|
||||
<Pos>7</Pos>
|
||||
<Name>CreateOn</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3409,7 +3426,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>Sport</Table>
|
||||
<Pos>7</Pos>
|
||||
<Pos>8</Pos>
|
||||
<Name>CreateBy</Name>
|
||||
<DataType>Int</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3426,7 +3443,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>Sport</Table>
|
||||
<Pos>8</Pos>
|
||||
<Pos>9</Pos>
|
||||
<Name>CreateHost</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3443,7 +3460,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>Sport</Table>
|
||||
<Pos>9</Pos>
|
||||
<Pos>10</Pos>
|
||||
<Name>UpdateOn</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3460,7 +3477,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>Sport</Table>
|
||||
<Pos>10</Pos>
|
||||
<Pos>11</Pos>
|
||||
<Name>UpdateBy</Name>
|
||||
<DataType>Int</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3477,7 +3494,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>Sport</Table>
|
||||
<Pos>11</Pos>
|
||||
<Pos>12</Pos>
|
||||
<Name>UpdateHost</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3646,6 +3663,23 @@
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>7</Pos>
|
||||
<Name>About</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>-9</DataTypeNative>
|
||||
<DataTypeNameNative>nvarchar</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>2000</Size>
|
||||
<BufferLen>4000</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>Nullable</Nullable>
|
||||
<IsNullable>true</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>8</Pos>
|
||||
<Name>PhoneMain</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3662,7 +3696,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>8</Pos>
|
||||
<Pos>9</Pos>
|
||||
<Name>PhoneMobile</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3679,7 +3713,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>9</Pos>
|
||||
<Pos>10</Pos>
|
||||
<Name>PhoneAlt</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3696,7 +3730,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>10</Pos>
|
||||
<Pos>11</Pos>
|
||||
<Name>Gender</Name>
|
||||
<DataType>TinyInt</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3713,7 +3747,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>11</Pos>
|
||||
<Pos>12</Pos>
|
||||
<Name>DateOfBirthDay</Name>
|
||||
<DataType>TinyInt</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3730,7 +3764,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>12</Pos>
|
||||
<Pos>13</Pos>
|
||||
<Name>DateOfBirthMonth</Name>
|
||||
<DataType>TinyInt</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3747,7 +3781,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>13</Pos>
|
||||
<Pos>14</Pos>
|
||||
<Name>DateOfBirthYear</Name>
|
||||
<DataType>SmallInt</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3764,7 +3798,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>14</Pos>
|
||||
<Pos>15</Pos>
|
||||
<Name>RegionIdCountry</Name>
|
||||
<DataType>Int</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3781,7 +3815,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>15</Pos>
|
||||
<Pos>16</Pos>
|
||||
<Name>RegionIdProvince</Name>
|
||||
<DataType>Int</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3798,7 +3832,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>16</Pos>
|
||||
<Pos>17</Pos>
|
||||
<Name>PasswordToken</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3815,7 +3849,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>17</Pos>
|
||||
<Pos>18</Pos>
|
||||
<Name>PasswordHashed</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3832,7 +3866,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>18</Pos>
|
||||
<Pos>19</Pos>
|
||||
<Name>PasswordHistory</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3849,7 +3883,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>19</Pos>
|
||||
<Pos>20</Pos>
|
||||
<Name>PasswordChangedAt</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3866,7 +3900,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>20</Pos>
|
||||
<Pos>21</Pos>
|
||||
<Name>LastLoginAt</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3883,7 +3917,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>21</Pos>
|
||||
<Pos>22</Pos>
|
||||
<Name>LastInvalidLoginAt</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3900,7 +3934,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>22</Pos>
|
||||
<Pos>23</Pos>
|
||||
<Name>InvalidLoginCount</Name>
|
||||
<DataType>SmallInt</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3917,7 +3951,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>23</Pos>
|
||||
<Pos>24</Pos>
|
||||
<Name>Notes</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3934,7 +3968,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>24</Pos>
|
||||
<Pos>25</Pos>
|
||||
<Name>Flags</Name>
|
||||
<DataType>SmallInt</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3951,7 +3985,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>25</Pos>
|
||||
<Pos>26</Pos>
|
||||
<Name>Status</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3968,7 +4002,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>26</Pos>
|
||||
<Pos>27</Pos>
|
||||
<Name>CreateOn</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
@@ -3985,7 +4019,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>27</Pos>
|
||||
<Pos>28</Pos>
|
||||
<Name>CreateBy</Name>
|
||||
<DataType>Int</DataType>
|
||||
<DataTypeName />
|
||||
@@ -4002,7 +4036,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>28</Pos>
|
||||
<Pos>29</Pos>
|
||||
<Name>CreateHost</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -4019,7 +4053,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>29</Pos>
|
||||
<Pos>30</Pos>
|
||||
<Name>UpdateOn</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
@@ -4036,7 +4070,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>30</Pos>
|
||||
<Pos>31</Pos>
|
||||
<Name>UpdateBy</Name>
|
||||
<DataType>Int</DataType>
|
||||
<DataTypeName />
|
||||
@@ -4053,7 +4087,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserAccount</Table>
|
||||
<Pos>31</Pos>
|
||||
<Pos>32</Pos>
|
||||
<Name>UpdateHost</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -5497,6 +5531,23 @@
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>4</Pos>
|
||||
<Name>About</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>-9</DataTypeNative>
|
||||
<DataTypeNameNative>nvarchar</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>2000</Size>
|
||||
<BufferLen>4000</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>Nullable</Nullable>
|
||||
<IsNullable>true</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>5</Pos>
|
||||
<Name>Participation</Name>
|
||||
<DataType>SmallInt</DataType>
|
||||
<DataTypeName />
|
||||
@@ -5513,7 +5564,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>5</Pos>
|
||||
<Pos>6</Pos>
|
||||
<Name>Officiating</Name>
|
||||
<DataType>SmallInt</DataType>
|
||||
<DataTypeName />
|
||||
@@ -5530,7 +5581,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>6</Pos>
|
||||
<Pos>7</Pos>
|
||||
<Name>UserSportData</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -5547,7 +5598,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>7</Pos>
|
||||
<Pos>8</Pos>
|
||||
<Name>Notes</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -5564,7 +5615,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>8</Pos>
|
||||
<Pos>9</Pos>
|
||||
<Name>Flags</Name>
|
||||
<DataType>SmallInt</DataType>
|
||||
<DataTypeName />
|
||||
@@ -5581,7 +5632,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>9</Pos>
|
||||
<Pos>10</Pos>
|
||||
<Name>Status</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -5598,7 +5649,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>10</Pos>
|
||||
<Pos>11</Pos>
|
||||
<Name>CreateOn</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
@@ -5615,7 +5666,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>11</Pos>
|
||||
<Pos>12</Pos>
|
||||
<Name>CreateBy</Name>
|
||||
<DataType>Int</DataType>
|
||||
<DataTypeName />
|
||||
@@ -5632,7 +5683,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>12</Pos>
|
||||
<Pos>13</Pos>
|
||||
<Name>CreateHost</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -5649,7 +5700,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>13</Pos>
|
||||
<Pos>14</Pos>
|
||||
<Name>UpdateOn</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
@@ -5666,7 +5717,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>14</Pos>
|
||||
<Pos>15</Pos>
|
||||
<Name>UpdateBy</Name>
|
||||
<DataType>Int</DataType>
|
||||
<DataTypeName />
|
||||
@@ -5683,7 +5734,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>UserSport</Table>
|
||||
<Pos>15</Pos>
|
||||
<Pos>16</Pos>
|
||||
<Name>UpdateHost</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
|
||||
Reference in New Issue
Block a user