v1.2.6.1
This commit is contained in:
@@ -468,6 +468,7 @@ namespace Saxonite.Net.Core.Web.Base.Controllers
|
||||
{
|
||||
// Common item properties.
|
||||
public String Id { get; set; }
|
||||
public String Notes { get; set; }
|
||||
public String StatusCode { get; set; }
|
||||
public String StatusDesc { get; set; }
|
||||
// Flags for common status values.
|
||||
@@ -502,6 +503,12 @@ namespace Saxonite.Net.Core.Web.Base.Controllers
|
||||
public String Id { get; set; }
|
||||
public String Name { get; set; }
|
||||
}
|
||||
/// <summary>Item code and desc values.</summary>
|
||||
public class ItemCodeDesc
|
||||
{
|
||||
public String Code { get; set; }
|
||||
public String Desc { get; set; }
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// Form data.
|
||||
|
||||
@@ -231,8 +231,14 @@ namespace Saxonite.Net.Core.Web.Base.Models
|
||||
case SaxDbDfn_Core.ColumnIdx.UserAccount_FirstName:
|
||||
case SaxDbDfn_Core.ColumnIdx.UserAccount_LastName:
|
||||
return Math.Min(maxLength, 40);
|
||||
case SaxDbDfn_Core.ColumnIdx.UserAccount_About:
|
||||
return Math.Min(maxLength, 2000);
|
||||
case SaxDbDfn_Core.ColumnIdx.Organisation_Name:
|
||||
return Math.Min(maxLength, 80);
|
||||
case SaxDbDfn_Core.ColumnIdx.Organisation_About:
|
||||
case SaxDbDfn_Core.ColumnIdx.Organisation_Facilities:
|
||||
case SaxDbDfn_Core.ColumnIdx.Organisation_Notes:
|
||||
return Math.Min(maxLength, 2000);
|
||||
case SaxDbDfn_Core.ColumnIdx.UserAccount_PhoneMain:
|
||||
case SaxDbDfn_Core.ColumnIdx.UserAccount_PhoneMobile:
|
||||
case SaxDbDfn_Core.ColumnIdx.Organisation_PhoneMain:
|
||||
|
||||
@@ -40,6 +40,8 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
}
|
||||
private class OrganisationData_Full : OrganisationData_List
|
||||
{
|
||||
public String About { get; set; }
|
||||
public String Facilities { get; set; }
|
||||
}
|
||||
private void PopulateOrganisationResponseData(SaxOrganisation organisation, OrganisationData_List data)
|
||||
{
|
||||
@@ -65,6 +67,9 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
private void PopulateOrganisationResponseData(SaxOrganisation organisation, OrganisationData_Full data)
|
||||
{
|
||||
PopulateOrganisationResponseData(organisation, data as OrganisationData_List);
|
||||
data.About = organisation.About;
|
||||
data.Facilities = organisation.Facilities;
|
||||
data.Notes = organisation.Notes;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -261,6 +266,10 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
organisation.SportIdPrimary = model.OrganisationSportId.ToSysId();
|
||||
if (model.OrganisationRegionIdCountry != null)
|
||||
organisation.RegionIdPrimary = model.OrganisationRegionIdCountry.ToSysId();
|
||||
if (model.OrganisationAbout != null)
|
||||
organisation.About = model.OrganisationAbout;
|
||||
if (model.OrganisationFacilities != null)
|
||||
organisation.Facilities = model.OrganisationFacilities;
|
||||
// Common properties.
|
||||
if (model.OrganisationStatusCode != null)
|
||||
organisation.Status = model.OrganisationStatus;
|
||||
|
||||
@@ -21,40 +21,55 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Member data.
|
||||
private class MemberData_List
|
||||
private class MemberData_List : AjaxResponse_Data.ItemData_Base
|
||||
{
|
||||
public String Id { get; set; }
|
||||
// User.
|
||||
public String UserAccountId { get; set; }
|
||||
public bool? Self { get; set; } = null;
|
||||
public String EmailAddress { get; set; }
|
||||
public String DisplayName { get; set; }
|
||||
public String UserStatusCode { get; set; }
|
||||
public String UserStatusDesc { get; set; }
|
||||
public bool? UserActive { get { return UserStatusCode.EqualsCI(SacsSystem.GetStatusCode(SaStatus.Active)) ? true : (bool?)null; } }
|
||||
// Organisation.
|
||||
public String OrganisationId { get; set; }
|
||||
public String OrganisationName { get; set; }
|
||||
public List<String> RoleCodes { get; } = new List<string>();
|
||||
// Organisation user.
|
||||
public int RoleCount { get; set; }
|
||||
public String StatusCode { get; set; }
|
||||
public String StatusDesc { get; set; }
|
||||
public bool? Member { get; set; } = null;
|
||||
}
|
||||
private class MemberData_Full : MemberData_List
|
||||
{
|
||||
// Organisation user.
|
||||
public List<String> RoleCodes { get; } = new List<string>();
|
||||
}
|
||||
private void PopulateMemberResponseData(MemberData_List data, SaxUserOrganisation userOrganisation, SaxUserAccount userAccount, SaxOrganisation organisation)
|
||||
{
|
||||
data.Id = SysId.ToString(userOrganisation.Id);
|
||||
// User.
|
||||
data.UserAccountId = SysId.ToString(userAccount.Id);
|
||||
if (userAccount.Id.Equals(UserAccountId)) data.Self = true;
|
||||
data.EmailAddress = userAccount.EmailAddress;
|
||||
data.DisplayName = userAccount.GetDisplayName();
|
||||
data.UserStatusCode = userAccount.StatusCode;
|
||||
data.UserStatusDesc = userAccount.StatusDesc;
|
||||
// Organisation.
|
||||
data.OrganisationId = SysId.ToString(organisation.Id);
|
||||
data.OrganisationName = organisation.Name;
|
||||
// Exclude 'Member' role.
|
||||
foreach (Sax.OrganisationRole organisationRole in userOrganisation.GetOrganisationRoles().ToList().FindAll(item => item != Sax.OrganisationRole.Member))
|
||||
data.RoleCodes.Add(OrganisationRoleCodes.GetCodeForType(organisationRole));
|
||||
// Organisation user:
|
||||
data.RoleCount = userOrganisation.OrganisationRoleCount - 1;
|
||||
data.StatusCode = userOrganisation.StatusCode;
|
||||
data.StatusDesc = userOrganisation.StatusDesc;
|
||||
if (userOrganisation.GetOrganisationRoles().ToList().Exists(item => item == Sax.OrganisationRole.Member))
|
||||
data.Member = true;
|
||||
}
|
||||
private void PopulateMemberResponseData(MemberData_Full data, SaxUserOrganisation userOrganisation, SaxUserAccount userAccount, SaxOrganisation organisation)
|
||||
{
|
||||
PopulateMemberResponseData(data as MemberData_List, userOrganisation, userAccount, organisation);
|
||||
// Organisation user:
|
||||
// Exclude 'Member' role.
|
||||
foreach (Sax.OrganisationRole organisationRole in userOrganisation.GetOrganisationRoles().ToList().FindAll(item => item != Sax.OrganisationRole.Member))
|
||||
data.RoleCodes.Add(OrganisationRoleCodes.GetCodeForType(organisationRole));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -119,7 +134,7 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
SaxUserOrganisation.Params prmUserOrganisation = new SaxUserOrganisation.Params();
|
||||
prmUserOrganisation.OrganisationIdsIncluded.Add(organisationId);
|
||||
prmUserOrganisation.OrganisationMembersOnly = true;
|
||||
prmUserOrganisation.UserAccountStatusCat = SaxUserAccount.StatusCat.AwaitingOnly;
|
||||
prmUserOrganisation.UserAccountStatusCat = SaxUserAccount.StatusCat.NotDeleted;
|
||||
prmUserOrganisation.StatusCat = SaxUserOrganisation.StatusCat.NotDeleted;
|
||||
model.Paging.ItemTotal = (ulong)AccountMgr.GetUserOrganisationCount(prmUserOrganisation);
|
||||
model.PopulatePagingTo(prmUserOrganisation.ResultsPaging);
|
||||
@@ -129,6 +144,7 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
ColumnDfn colUserAccountId = AccountMgr.GetUserOrganisationColumnDfn(SaxUserOrganisation.Column.UserAccountId);
|
||||
ColumnDfn colUserEmailAddress = AccountMgr.GetUserOrganisationColumnDfn(SaxUserOrganisation.Column.User_EmailAddress);
|
||||
ColumnDfn colUserDisplayName = AccountMgr.GetUserOrganisationColumnDfn(SaxUserOrganisation.Column.User_DisplayName);
|
||||
ColumnDfn colUserStatus = AccountMgr.GetUserOrganisationColumnDfn(SaxUserOrganisation.Column.User_Status);
|
||||
ColumnDfn colOrganisationId = AccountMgr.GetUserOrganisationColumnDfn(SaxUserOrganisation.Column.OrganisationId);
|
||||
ColumnDfn colOrganisationName = AccountMgr.GetUserOrganisationColumnDfn(SaxUserOrganisation.Column.Organisation_Name);
|
||||
ColumnDfn colRoleCodes = AccountMgr.GetUserOrganisationColumnDfn(SaxUserOrganisation.Column.OrganisationRoleCodes);
|
||||
@@ -136,14 +152,10 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
ColumnDfn colStatus = AccountMgr.GetUserOrganisationColumnDfn(SaxUserOrganisation.Column.Status);
|
||||
List<ColumnDfn> columns = new List<ColumnDfn>()
|
||||
{
|
||||
colId,
|
||||
colUserAccountId,
|
||||
colUserEmailAddress,
|
||||
colUserDisplayName,
|
||||
colOrganisationId,
|
||||
colOrganisationName,
|
||||
colRoleCodes,
|
||||
colRoleCount,
|
||||
colId, colUserAccountId,
|
||||
colUserEmailAddress, colUserDisplayName, colUserStatus,
|
||||
colOrganisationId, colOrganisationName,
|
||||
colRoleCodes, colRoleCount,
|
||||
colStatus
|
||||
};
|
||||
|
||||
@@ -156,15 +168,20 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
MemberData_List memberData = new MemberData_List()
|
||||
{
|
||||
Id = values.GetString(colId.DataName),
|
||||
// User.
|
||||
UserAccountId = values.GetString(colUserAccountId.DataName),
|
||||
EmailAddress = values.GetString(colUserEmailAddress.DataName),
|
||||
DisplayName = AccountMgr.GetUserOrganisationDataValue(colUserDisplayName, values).ToString(),
|
||||
UserStatusCode = values.GetString(colUserStatus.DataName),
|
||||
UserStatusDesc = SacsSystem.GetStatusDescForCode(values.GetString(colUserStatus.DataName)),
|
||||
// Organisation.
|
||||
OrganisationId = values.GetString(colOrganisationId.DataName),
|
||||
OrganisationName = values.GetString(colOrganisationName.DataName),
|
||||
// Role count - 1 to ignore 'Member' role.
|
||||
RoleCount = (int)values.GetLong(colRoleCount.DataName) - 1,
|
||||
StatusCode = values.GetString(colStatus.DataName),
|
||||
StatusDesc = SacsSystem.GetStatusDescForCode(values.GetString(colStatus.DataName))
|
||||
StatusDesc = SacsSystem.GetStatusDescForCode(values.GetString(colStatus.DataName)),
|
||||
Member = (values.GetLong(colRoleCount.DataName) > 0) ? true : (bool?)null
|
||||
};
|
||||
members.Add(memberData);
|
||||
}
|
||||
@@ -365,6 +382,88 @@ namespace Saxonite.Net.Core.Web.Admin.Controllers
|
||||
return Json(responseData);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Remove Organisation Member ajax request.
|
||||
//-------------------------------------------------------------------
|
||||
[HttpPost]
|
||||
[Route("Organisation/Ajax/RemoveMember")]
|
||||
public IActionResult Ajax_RemoveMember(Model_OrganisationMembers model)
|
||||
{
|
||||
String fn = GetType().Name + ".Ajax_RemoveMember";
|
||||
String messageTitle = Localiser["organisation.caption.member"];
|
||||
AjaxResponse_Member responseData = new AjaxResponse_Member(model);
|
||||
|
||||
// Validate session.
|
||||
if (!ValidUserSession)
|
||||
return GetAjaxResult_InvalidSession(responseData);
|
||||
|
||||
// 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.OrganisationId.ToSysId();
|
||||
SaxOrganisation organisation = AccountMgr.GetOrganisationById(organisationId);
|
||||
if (organisation == null)
|
||||
{
|
||||
SaLogger.Warn(fn + " Failed to retrieve Organisation for Id: '" + model.OrganisationId + "'");
|
||||
return Json(responseData.SetMessage(messageTitle, Localiser["msg.error.data.incomplete"]));
|
||||
}
|
||||
disposableItems.Add(organisation);
|
||||
|
||||
// User Organisation.
|
||||
SysId userOrganisationId = model.UserOrganisationId.ToSysId();
|
||||
SaxUserOrganisation userOrganisation = AccountMgr.GetUserOrganisationById(userOrganisationId);
|
||||
disposableItems.Add(userOrganisation);
|
||||
if (userOrganisation == null)
|
||||
{
|
||||
SaLogger.Warn(fn + " Failed to retrieve user organisation for Id: '" + userOrganisationId + "'");
|
||||
return Json(responseData.SetMessage(messageTitle, Localiser["msg.error.item.id.not.found"]));
|
||||
}
|
||||
if (!userOrganisation.OrganisationId.Equals(organisation.Id))
|
||||
{
|
||||
SaLogger.Warn(fn + " Inconsistent user organisation properties. OrganisationId: " + userOrganisation.OrganisationId + " vs " + organisation.Id + ".");
|
||||
return Json(responseData.SetMessage(messageTitle, Localiser["msg.error.data.inconsistent"]));
|
||||
}
|
||||
|
||||
// User Account.
|
||||
SaxUserAccount userAccount = AccountMgr.GetUserAccountById(userOrganisation.UserAccountId);
|
||||
disposableItems.Add(userAccount);
|
||||
if (userAccount == null)
|
||||
{
|
||||
SaLogger.Warn(fn + " Failed to retrieve user account for Id: '" + userOrganisation.UserAccountId + "'");
|
||||
return Json(responseData.SetMessage(messageTitle, Localiser["msg.error.system"]));
|
||||
}
|
||||
|
||||
// Remove all roles and store.
|
||||
userOrganisation.ClearOrganisationRoles();
|
||||
|
||||
// Store item.
|
||||
if (!SysId.IsValid(userOrganisation.Id))
|
||||
{
|
||||
if (!AccountMgr.InsertUserOrganisation(userOrganisation, DbUpdateInfo))
|
||||
{
|
||||
SaLogger.Warn(fn + " Failed to insert user organisation: " + AccountMgr.ErrorStateMessage);
|
||||
return Json(responseData.SetMessage(messageTitle, Localiser["msg.error.item.insert.failed"] + "\n\n" + AccountMgr.ErrorStateMessage));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!AccountMgr.UpdateUserOrganisation(userOrganisation, DbUpdateInfo))
|
||||
{
|
||||
SaLogger.Warn(fn + " Failed to update user organisation [Id:" + SysId.ToString(userOrganisation.Id) + "]: " + AccountMgr.ErrorStateMessage);
|
||||
return Json(responseData.SetMessage(messageTitle, Localiser["msg.error.item.update.failed"] + "\n\n" + AccountMgr.ErrorStateMessage));
|
||||
}
|
||||
}
|
||||
|
||||
// Construct response.
|
||||
PopulateMemberResponseData(responseData.Member, userOrganisation, userAccount, organisation);
|
||||
}
|
||||
|
||||
responseData.Success = true;
|
||||
return Json(responseData);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
|
||||
@@ -77,6 +77,8 @@ namespace Saxonite.Net.Core.Web.Admin.Models
|
||||
public Sax.OrganisationCategory OrganisationCategory { get { return (Sax.OrganisationCategory)OrganisationCategoryCodes.GetTypeForCode(OrganisationCategoryValue); } }
|
||||
public String OrganisationSportId { get; set; }
|
||||
public String OrganisationRegionIdCountry { get; set; }
|
||||
public String OrganisationAbout { get; set; }
|
||||
public String OrganisationFacilities { get; set; }
|
||||
// Common properties.
|
||||
public String OrganisationNotes { get; set; }
|
||||
public String OrganisationStatusCode { get; set; }
|
||||
@@ -131,15 +133,15 @@ namespace Saxonite.Net.Core.Web.Admin.Models
|
||||
}
|
||||
}
|
||||
|
||||
// Organisation country.
|
||||
// Organisation region.
|
||||
if (OrganisationRegionIdCountry != null)
|
||||
{
|
||||
using (SaxRegion region = ReferenceMgr.GetRegionById(OrganisationRegionIdCountry.ToSysId()))
|
||||
{
|
||||
if (region == null)
|
||||
responseData.SetControlError(nameof(OrganisationRegionIdCountry), Localiser["msg.validation.invalid.value"]);
|
||||
else if (region.RegionType != Sax.RegionType.Country)
|
||||
responseData.SetControlError(nameof(OrganisationRegionIdCountry), "Organisation region must be a country");
|
||||
else if (region.RegionType != Sax.RegionType.Country && region.RegionType != Sax.RegionType.Continent && region.RegionType != Sax.RegionType.World)
|
||||
responseData.SetControlError(nameof(OrganisationRegionIdCountry), "Organisation region must be a country or international region");
|
||||
}
|
||||
|
||||
if (!StringUtil.IsEmpty(OrganisationName))
|
||||
@@ -156,6 +158,30 @@ namespace Saxonite.Net.Core.Web.Admin.Models
|
||||
}
|
||||
}
|
||||
|
||||
// Organisation about.
|
||||
if (OrganisationAbout != null)
|
||||
{
|
||||
responseData.SetControlValue(nameof(OrganisationAbout), OrganisationAbout);
|
||||
if (StringUtil.GetLength(OrganisationAbout) > GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.Organisation_About))
|
||||
responseData.SetControlError(nameof(OrganisationAbout), Localiser["msg.validation.maximum.length", GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.Organisation_About)]);
|
||||
}
|
||||
|
||||
// Organisation facilities.
|
||||
if (OrganisationFacilities != null)
|
||||
{
|
||||
responseData.SetControlValue(nameof(OrganisationFacilities), OrganisationFacilities);
|
||||
if (StringUtil.GetLength(OrganisationFacilities) > GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.Organisation_Facilities))
|
||||
responseData.SetControlError(nameof(OrganisationFacilities), Localiser["msg.validation.maximum.length", GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.Organisation_Facilities)]);
|
||||
}
|
||||
|
||||
// Organisation notes.
|
||||
if (OrganisationNotes != null)
|
||||
{
|
||||
responseData.SetControlValue(nameof(OrganisationNotes), OrganisationNotes);
|
||||
if (StringUtil.GetLength(OrganisationNotes) > GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.Organisation_Notes))
|
||||
responseData.SetControlError(nameof(OrganisationNotes), Localiser["msg.validation.maximum.length", GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.Organisation_Notes)]);
|
||||
}
|
||||
|
||||
// Organisation status.
|
||||
if (OrganisationStatusCode != null)
|
||||
{
|
||||
|
||||
@@ -153,12 +153,18 @@
|
||||
<data name="info.chars.available" xml:space="preserve">
|
||||
<value>[{0} chars available]</value>
|
||||
</data>
|
||||
<data name="label.about" xml:space="preserve">
|
||||
<value>About</value>
|
||||
</data>
|
||||
<data name="label.accounts" xml:space="preserve">
|
||||
<value>Accounts</value>
|
||||
</data>
|
||||
<data name="label.activate" xml:space="preserve">
|
||||
<value>Activate</value>
|
||||
</data>
|
||||
<data name="label.add" xml:space="preserve">
|
||||
<value>Add</value>
|
||||
</data>
|
||||
<data name="label.address" xml:space="preserve">
|
||||
<value>Address</value>
|
||||
</data>
|
||||
@@ -228,6 +234,9 @@
|
||||
<data name="label.emails" xml:space="preserve">
|
||||
<value>Emails</value>
|
||||
</data>
|
||||
<data name="label.facilities" xml:space="preserve">
|
||||
<value>Facilities</value>
|
||||
</data>
|
||||
<data name="label.filename" xml:space="preserve">
|
||||
<value>Filename</value>
|
||||
</data>
|
||||
@@ -288,6 +297,9 @@
|
||||
<data name="label.not.specified" xml:space="preserve">
|
||||
<value>Not specified</value>
|
||||
</data>
|
||||
<data name="label.notes" xml:space="preserve">
|
||||
<value>Notes</value>
|
||||
</data>
|
||||
<data name="label.ok" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
@@ -426,6 +438,9 @@
|
||||
<data name="msg.error.data.incomplete" xml:space="preserve">
|
||||
<value>Data is incomplete</value>
|
||||
</data>
|
||||
<data name="msg.error.data.inconsistent" xml:space="preserve">
|
||||
<value>Data is inconsistent.</value>
|
||||
</data>
|
||||
<data name="msg.error.item.delete.failed" xml:space="preserve">
|
||||
<value>Item deletion failed</value>
|
||||
</data>
|
||||
|
||||
@@ -142,14 +142,12 @@
|
||||
</div>
|
||||
<div class="sax-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-4"><div class="OrganisationCategory"></div></div>
|
||||
<div class="col-sm-4"><div class="OrganisationType"></div></div>
|
||||
<div class="col-sm-4 text-left text-sm-right"><div class="OrganisationRegion"></div></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-4"><div class="OrganisationSport"></div></div>
|
||||
<div class="col-sm-4"><div class="OrganisationMemberCount sax-action-text">@Localiser["label.members"]: <span class="MemberCount"></span></div></div>
|
||||
<div class="col-sm-4 text-left text-sm-right"><div class="StatusDesc"></div></div>
|
||||
<div class="col-6 col-sm-4"><div class="OrganisationCategory"></div></div>
|
||||
<div class="col-6 col-sm-4"><div class="OrganisationType"></div></div>
|
||||
<div class="col-6 col-sm-4 text-left text-sm-right"><div class="OrganisationRegion"></div></div>
|
||||
<div class="col-6 col-sm-4"><div class="OrganisationSport"></div></div>
|
||||
<div class="col-6 col-sm-4"><div class="OrganisationMemberCount sax-action-text">@Localiser["label.members"]: <span class="MemberCount"></span></div></div>
|
||||
<div class="col-6 col-sm-4 text-left text-sm-right"><div class="StatusDesc"></div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,22 +5,41 @@
|
||||
ViewData["Title"] = "Organisation Members";
|
||||
}
|
||||
|
||||
<div class="">
|
||||
<div class="sax-panel OrganisationMembers">
|
||||
|
||||
<script type="text/javascript">
|
||||
sax.lbl.refresh = '@(Localiser.GetJavascriptText("label.refresh"))';
|
||||
sax.lbl.add = '@(Localiser.GetJavascriptText("label.add"))';
|
||||
sax.lbl.create = '@(Localiser.GetJavascriptText("label.create"))';
|
||||
sax.lbl.edit = '@(Localiser.GetJavascriptText("label.edit"))';
|
||||
sax.lbl.remove = '@(Localiser.GetJavascriptText("label.remove"))';
|
||||
</script>
|
||||
|
||||
@* Filter Panel *@
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmMemberFilter", @class = "sax-form", @onSubmit = "return false;" }))
|
||||
{
|
||||
<div class="sax-panel-filter OrganisationMembers">
|
||||
<div class="sax-panel-filter">
|
||||
|
||||
@* Header - Page caption, paging controls, actions. *@
|
||||
<div class="sax-header row">
|
||||
<div class="col"><div class="sax-caption">@Localiser["organisation.caption.members"]</div></div>
|
||||
<div class="fixed row">
|
||||
<div>
|
||||
<partial name="~/Views/Common/ResultsPaging.cshtml" />
|
||||
</div>
|
||||
<div class="fixed sax-action sax-results-refresh"><img src="~/img/action/refresh24.png" alt="@(Localiser["label.refresh"])" title="@(Localiser["label.refresh"])" /></div>
|
||||
<div class="fixed 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">
|
||||
@* Organisation Member filter - Organisation etc. *@
|
||||
<div class="row">
|
||||
<div class="col-sm-3 sax-label text-left text-sm-right">@Localiser["organisation.caption.organisation"]</div>
|
||||
<div class="col-sm-9">
|
||||
@@ -29,39 +48,65 @@
|
||||
@Html.HiddenFor(model => model.Filter.OrganisationId, new { @id = "ifFilterOrganisationId" })
|
||||
<input type="text" id="ifFilterOrganisation" class="sax-input" readonly="readonly" value="@(Model.MemberOrganisationName)" />
|
||||
</div>
|
||||
<div class="fixed"><button id="" class="sax-button" onclick="sax.selectFilterOrganisation()">@Localiser["label.select"]</button></div>
|
||||
<div class="fixed"><button id="pbFilterOrganisationSelect" class="sax-button">@Localiser["label.select"]</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* Filter element templates *@
|
||||
<div class="sax-panel-item-template">
|
||||
@* Burger dropdown item template - ul is ignored *@
|
||||
<ul class="sax-dropdown-menu MemberFilter">
|
||||
<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">
|
||||
@* Organisation Member item template *@
|
||||
<div class="sax-panel-item Member">
|
||||
<div class="sax-header row">
|
||||
<div class="col">
|
||||
<div class="sax-caption"><div class="sax-action UserDisplayName"></div></div>
|
||||
@* User name *@
|
||||
<div class="sax-caption sax-action"><div class="UserDisplayName"></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-6"><div class="UserEmailAddress"></div></div>
|
||||
@* User email address and status (if not active) *@
|
||||
<div class="col-sm-6"><span class="UserEmailAddress"></span><span class="UserStatus" style="color:#a0a0a0;"> [<span class="UserStatusDesc"></span>]</span></div>
|
||||
@* Role count *@
|
||||
<div class="col-sm-6 right"><div class="MemberRoleCount">@Localiser["label.roles"]: <span class="RoleCount"></span></div></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-4"></div>
|
||||
<div class="col-sm-4"><div class=""></div></div>
|
||||
<div class="col-sm-4 right"><div class="StatusDesc"></div></div>
|
||||
@* Member status *@
|
||||
<div class="col-sm-4 sax-note right"><span class="StatusDesc"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@* Burger dropdown item template - ul is ignored *@
|
||||
<ul class="sax-dropdown-menu Member">
|
||||
<li class="sax-dropdown-item sax-action"><div class="sax-label">...</div></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
</script>
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmMemberId" }))
|
||||
{
|
||||
@Html.HiddenFor(model => model.OrganisationId, new { @id = "", @class = "OrganisationId" })
|
||||
@Html.HiddenFor(model => model.UserOrganisationId, new { @id = "", @class = "UserOrganisationId" })
|
||||
}
|
||||
@using (@Html.BeginForm(FormMethod.Post, new { @id = "frmUserEmail" }))
|
||||
@@ -73,8 +74,8 @@
|
||||
<div class="col-sm">
|
||||
<div class="sax-control row">
|
||||
@Html.HiddenFor(model => model.MemberRoleCodes, new { @id = "ifMemberRoleCodes", @class = "MemberRoleCodes sax-input" })
|
||||
<div class="col"><textarea id="ifMemberRoles" class="MemberRoles sax-input" rows="6" readonly="readonly" ondblclick="sax.selectMemberRoles()"></textarea></div>
|
||||
<div class="fixed"><button id="" class="sax-button" style="min-width:auto;margin-left:4px;padding:4px 6px" onclick="sax.selectMemberRoles()">@Localiser["label.select"]</button></div>
|
||||
<div class="col"><textarea id="ifMemberRoles" class="MemberRoles sax-input" rows="6" readonly="readonly"></textarea></div>
|
||||
<div class="fixed"><button id="pbMemberRolesSelect" class="sax-button" style="min-width:auto;margin-left:4px;padding:4px 6px">@Localiser["label.select"]</button></div>
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
@* Organisation name *@
|
||||
<div class="sax-form-control OrganisationName">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="ifOrganisationName"><span>@Localiser["label.name"]</span> <span class="required">*</span></label>
|
||||
</div>
|
||||
@@ -39,44 +39,45 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-4"></div>
|
||||
<div class="col-sm-3"></div>
|
||||
|
||||
<div class="col-sm-4">
|
||||
<div class="col-sm row">
|
||||
<div class="col-sm-6">
|
||||
|
||||
@* Organisation category *@
|
||||
<div class="sax-form-control OrganisationCategory pr4">
|
||||
<div class="sax-label">
|
||||
<label for="cbOrganisationCategory"><span>@Localiser["label.category"]</span> <span class="required">*</span></label>
|
||||
@* Organisation category *@
|
||||
<div class="sax-form-control OrganisationCategory pr4">
|
||||
<div class="sax-label">
|
||||
<label for="cbOrganisationCategory"><span>@Localiser["label.category"]</span> <span class="required">*</span></label>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
@Html.DropDownListFor(model => model.OrganisationCategoryValue, Model.AdminOrganisationCategoriesForSelect, Localiser["label.select"], new { @id = "cbOrganisationCategory", @class = "OrganisationCategory sax-select" })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
@Html.DropDownListFor(model => model.OrganisationCategoryValue, Model.AdminOrganisationCategoriesForSelect, Localiser["label.select"], new { @id = "cbOrganisationCategory", @class = "OrganisationCategory sax-select" })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
|
||||
<div class="col-sm-4">
|
||||
@* Organisation type *@
|
||||
<div class="sax-form-control OrganisationType">
|
||||
<div class="sax-label">
|
||||
<label for="cbOrganisationType"><span>@Localiser["label.type"]</span> <span class="required">*</span></label>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
@Html.DropDownListFor(model => model.OrganisationTypeValue, Model.OrganisationTypesForSelect, Localiser["label.select"], new { @id = "cbOrganisationType", @class = "OrganisationType sax-select" })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
@* Organisation type *@
|
||||
<div class="sax-form-control OrganisationType">
|
||||
<div class="sax-label">
|
||||
<label for="cbOrganisationType"><span>@Localiser["label.type"]</span> <span class="required">*</span></label>
|
||||
</div>
|
||||
<div class="sax-control">
|
||||
@Html.DropDownListFor(model => model.OrganisationTypeValue, Model.OrganisationTypesForSelect, Localiser["label.select"], new { @id = "cbOrganisationType", @class = "OrganisationType sax-select" })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@* Organisation sport *@
|
||||
<div class="sax-form-control OrganisationSportId">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="ifOrganisationSportCaption"><span>@Localiser["label.sport"]</span> <span class="required">(*)</span></label>
|
||||
</div>
|
||||
@@ -96,7 +97,7 @@
|
||||
@* Organisation country *@
|
||||
<div class="sax-form-control OrganisationRegionIdCountry">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="ifOrganisationRegionCaptionCountry"><span>@Localiser["label.country"]</span> <span class="required">*</span></label>
|
||||
</div>
|
||||
@@ -112,10 +113,61 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* Organisation About *@
|
||||
<div class="sax-form-control OrganisationAbout">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="ifOrganisationAbout"><span>@Localiser["label.about"]</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control">
|
||||
@Html.TextAreaFor(model => model.OrganisationAbout, new { @id = "ifOrganisationAbout", @class = "OrganisationAbout sax-input", @rows = 6, @maxlength = @Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.Organisation_About) })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* Organisation Facilities *@
|
||||
<div class="sax-form-control OrganisationFacilities">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="ifOrganisationFacilities"><span>@Localiser["label.facilities"]</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control">
|
||||
@Html.TextAreaFor(model => model.OrganisationFacilities, new { @id = "ifOrganisationFacilities", @class = "OrganisationFacilities sax-input", @rows = 6, @maxlength = @Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.Organisation_Facilities) })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* Organisation Notes *@
|
||||
<div class="sax-form-control OrganisationNotes">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="ifOrganisationNotes"><span>@Localiser["label.notes"]</span></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="sax-control">
|
||||
@Html.TextAreaFor(model => model.OrganisationNotes, new { @id = "ifOrganisationNotes", @class = "OrganisationNotes sax-input", @rows = 3, @maxlength = @Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.Organisation_Notes) })
|
||||
</div>
|
||||
<div class="sax-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* Organisation status *@
|
||||
<div class="sax-form-control OrganisationStatus">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="col-sm-3">
|
||||
<div class="sax-label">
|
||||
<label for="cbOrganisationStatus"><span>@Localiser["label.status"]</span> <span class="required">*</span></label>
|
||||
</div>
|
||||
|
||||
@@ -105,30 +105,11 @@
|
||||
{
|
||||
}
|
||||
|
||||
.sax-form .sax-form-control .sax-label
|
||||
{
|
||||
margin: 0 0 8px 0;
|
||||
font-size: 1rem;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.sax-form .sax-form-control .sax-label-text
|
||||
{
|
||||
font-size: 1rem;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.sax-form .sax-form-control .sax-note
|
||||
{
|
||||
font-size: 0.9rem;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
/* Controls */
|
||||
|
||||
.sax-form .sax-form-control
|
||||
{
|
||||
margin: 0 0 16px 0;
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
|
||||
.sax-form .sax-form-control .sax-label
|
||||
|
||||
@@ -5,63 +5,101 @@
|
||||
(function (win, doc, undef)
|
||||
{
|
||||
"use strict";
|
||||
sax.itemIdPrefix = 'Itm_';
|
||||
let om = sax.mdl.organisationMembers = { data: {}, ajax: {} };
|
||||
let $pnl = om.$pnl = {}, $frm = om.$frm = {}, $dlg = om.$dlg = {};
|
||||
om.itemIdPrefix = 'Itm_';
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.refreshResults = function (delay)
|
||||
om.refreshResults = function (delay)
|
||||
{
|
||||
var $results = $('.sax-panel-results');
|
||||
if (!sax.awaitingRefreshResponse)
|
||||
if (!om.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);
|
||||
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 + 'Organisation/Ajax/GetMemberList', formId: 'frmMemberFilter', callbackFn: sax.doRefreshResults };
|
||||
sax.doAjaxRequest(sax.ajax.refreshResults, delay || 50);
|
||||
sax.awaitingRefreshResponse = true;
|
||||
om.ajax.refreshResults = om.ajax.refreshResults || { url: sax.url.base + 'Organisation/Ajax/GetMemberList', formId: 'frmMemberFilter', callbackFn: om.doRefreshResults };
|
||||
sax.doAjaxRequest(om.ajax.refreshResults, delay || 50);
|
||||
om.awaitingRefreshResponse = true;
|
||||
}
|
||||
sax.doRefreshResults = function (response)
|
||||
om.doRefreshResults = function (response)
|
||||
{
|
||||
//sax.debug('doRefreshResults', response);
|
||||
delete sax.awaitingRefreshResponse;
|
||||
delete om.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.Member', $results);
|
||||
sax.refreshPaging(response, '#frmMemberFilter', sax.refreshResults);
|
||||
var $msgs = $('.sax-panel-messages', $pnl.results).hide().empty();
|
||||
var $items = $('.sax-panel-item-list', $pnl.results).hide().empty();
|
||||
sax.refreshPaging(response, '#frmMemberFilter', om.refreshResults);
|
||||
if (!response.success) return;
|
||||
// Reference data - roles.
|
||||
if (response.memberRoles && response.memberRoles.length)
|
||||
sax.data.memberRoles = response.memberRoles;
|
||||
om.data.memberRoles = response.memberRoles;
|
||||
// Reference data - Statuses.
|
||||
if (response.defaultStatusCode) sax.data.defaultStatusCode = response.defaultStatusCode;
|
||||
if (response.defaultStatusCode) om.data.defaultStatusCode = response.defaultStatusCode;
|
||||
if (response.statuses)
|
||||
sax.populateSelectCodeDesc('#cbMemberStatus', response.statuses);
|
||||
// Menu.
|
||||
var $bgr = $('.sax-burger', $pnl.filter).hide();
|
||||
var $mnu = $('ul.sax-dropdown-menu', $bgr).empty();
|
||||
$mnu.append(om.getFilterMenuOption(sax.lbl.refresh, function () { om.refreshResults(); }, 'sax-refresh'));
|
||||
$mnu.append(om.getFilterMenuOption(sax.lbl.add, function () { om.createItem(); }, 'sax-add'));
|
||||
$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 = $tmpl.clone();
|
||||
sax.populateItem($item, item);
|
||||
$items.append($item);
|
||||
}
|
||||
$items.append(sax.populateItem(om.getItemTemplate(), items[itemIdx]));
|
||||
$items.fadeIn(50);
|
||||
}
|
||||
sax.populateItem = function ($item, item)
|
||||
{
|
||||
if (!item) return;
|
||||
$item.prop('id', sax.itemIdPrefix + item.id);
|
||||
$item.prop('id', om.itemIdPrefix + item.id);
|
||||
$('.UserEmailAddress', $item).text(item.emailAddress);
|
||||
$('.UserStatusDesc', $item).text(item.userStatusDesc).addClass('sax-status-' + (item.userStatusCode || '').toLowerCase());
|
||||
$('.UserStatus', $item).toggle(!item.userActive);
|
||||
$('.UserDisplayName', $item).text(item.displayName);
|
||||
$('.MemberRoleCount .RoleCount', $item).text(item.roleCount);
|
||||
$('.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();
|
||||
$('.StatusDesc', $item).text(item.statusDesc).addClass('sax-status-' + item.statusCode.toLowerCase());
|
||||
$('.sax-caption .sax-action').toggleClass('sax-action', !item.deleted);
|
||||
let $mnu = $('ul.sax-dropdown-menu', $item).empty();
|
||||
if (!item.deleted)
|
||||
{
|
||||
let fnUpdItm = function () { om.updateItem(item, $item) };
|
||||
$mnu.append(om.getItemMenuOption(sax.lbl.edit, fnUpdItm, 'sax-edit'));
|
||||
$item.on('click', '.sax-header .sax-caption', fnUpdItm).on('dblclick', fnUpdItm);
|
||||
if (item.member)
|
||||
$mnu.append(om.getItemMenuOption(sax.lbl.remove, function () { om.removeItem(item, $item) }, 'sax-remove'));
|
||||
}
|
||||
$('.sax-burger', $item).toggle(!!$('.sax-dropdown-item', $mnu).length);
|
||||
$('.sax-panel-messages', $pnl.results).hide().empty();
|
||||
return $item;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
om.getFilterDropdownTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-dropdown-menu.MemberFilter li.sax-dropdown-item', $pnl.filter).clone();
|
||||
}
|
||||
om.getItemTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-panel-item.Member', $pnl.results).clone();
|
||||
}
|
||||
om.getItemDropdownTemplate = function ()
|
||||
{
|
||||
return $('.sax-panel-item-template .sax-dropdown-menu.Member li.sax-dropdown-item', $pnl.results).clone();
|
||||
}
|
||||
om.getFilterMenuOption = function (lbl, fn, cls)
|
||||
{
|
||||
return om.getMenuOption(om.getFilterDropdownTemplate(), lbl, fn, cls);
|
||||
}
|
||||
om.getItemMenuOption = function (lbl, fn, cls)
|
||||
{
|
||||
return om.getMenuOption(om.getItemDropdownTemplate(), lbl, fn, cls);
|
||||
}
|
||||
om.getMenuOption = function ($opt, lbl, fn, cls)
|
||||
{
|
||||
return $opt.find('div.sax-label').text(lbl).end().on('click', fn).addClass(cls);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
@@ -73,138 +111,170 @@
|
||||
sax.onFilterOrganisationSelected = function (id, name)
|
||||
{
|
||||
//sax.debug('sax.onOrganisationSelected', id, name);
|
||||
$('#frmMemberFilter #ifFilterOrganisationId').val(id);
|
||||
$('#frmMemberFilter #ifFilterOrganisation').val(name);
|
||||
sax.refreshResults(50);
|
||||
$('#ifFilterOrganisationId', $frm.filter).val(id);
|
||||
$('#ifFilterOrganisation', $frm.filter).val(name);
|
||||
om.refreshResults(50);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.onChangeEmail = function ()
|
||||
// Member Roles.
|
||||
om.selectMemberRoles = function ()
|
||||
{
|
||||
let $frm = sax.$frm.member;
|
||||
let $mbrName = $('.MemberUserName', $frm);
|
||||
$('#frmUserEmail .UserEmailAddress').val($('.MemberUserEmailAddress', $frm).val());
|
||||
//sax.debug('selectMemberRoles',sax.data);
|
||||
om.data.cfgSelMbrRol = om.data.cfgSelMbrRol || { caption: sax.dlg.title.selectMemberRoles, width: 520, fnCallback: om.updateMemberRoles };
|
||||
om.data.cfgSelMbrRol.codes = om.data.memberRoles;
|
||||
om.data.cfgSelMbrRol.selectedCodes = sax.member.roleCodes || [];
|
||||
sax.selectCode.fn.openSelectCode(om.data.cfgSelMbrRol);
|
||||
}
|
||||
om.updateMemberRoles = function (memberRoleCodes)
|
||||
{
|
||||
//sax.debug('updateMemberRoles', MemberRoleCodes);
|
||||
sax.member.roleCodes = memberRoleCodes;
|
||||
$('#ifMemberRoleCodes').val(memberRoleCodes.join(om.data.memberRoleCodeDelim));
|
||||
$('#ifMemberRoles').val(om.getSelectedMemberRoleDescs().join('\n'));
|
||||
}
|
||||
om.getSelectedMemberRoleDescs = function ()
|
||||
{
|
||||
let roles = [];
|
||||
sax.member.roleCodes.forEach(function (value) { roles.push(om.getMemberRoleDesc(value)); })
|
||||
return roles.sortCI();
|
||||
}
|
||||
om.getMemberRoleDesc = function (roleCode)
|
||||
{
|
||||
let roleDesc = '';
|
||||
om.data.memberRoles.some(function (value) { if (value.code == roleCode) { roleDesc = value.desc; return true; } return false; })
|
||||
return roleDesc || roleCode;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
om.createItem = function ()
|
||||
{
|
||||
om.clearItem();
|
||||
$dlg.mbr.dialog('option', 'title', sax.dlg.title.createMember);
|
||||
om.openMemberDialog();
|
||||
}
|
||||
om.clearItem = function ()
|
||||
{
|
||||
let frm = $frm.mbr;
|
||||
$('.UserOrganisationId,.MemberRoleCodes,input[type="text"],textarea,select', frm).val('');
|
||||
$('.MemberOrganisationId', frm).val($('#frmMemberFilter #ifFilterOrganisationId').val());
|
||||
$('.MemberUserEmailAddress', frm).prop('readonly', false);
|
||||
$('.MemberUserName', frm).prop('readonly', true);
|
||||
$('.MemberStatus', frm).val(om.data.defaultStatusCode);
|
||||
sax.clearControlErrors();
|
||||
sax.member = { roleCodes: [] };
|
||||
}
|
||||
om.openMemberDialog = function ()
|
||||
{
|
||||
sax.openDialog($dlg.mbr, 600, 480);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
om.updateItem = function (item, $item)
|
||||
{
|
||||
$('.UserOrganisationId', $frm.mbrId).val(item.id);
|
||||
om.ajax.updateItem = om.ajax.updateItem || { url: sax.url.base + 'Organisation/Ajax/GetMember', formId: 'frmMemberId', callbackFn: om.onUpdateItem };
|
||||
sax.doAjaxRequest(om.ajax.updateItem, 50);
|
||||
}
|
||||
om.onUpdateItem = function (response)
|
||||
{
|
||||
//sax.debug('onUpdateItem', response);
|
||||
om.clearItem();
|
||||
if (!response.success) return;
|
||||
let item = sax.member = response.member;
|
||||
let frm = $frm.mbr;
|
||||
$('.UserOrganisationId', frm).val(item.id);
|
||||
$('.MemberOrganisationId', frm).val($('#frmMemberFilter #ifFilterOrganisationId').val());
|
||||
$('.MemberUserEmailAddress', frm).val(item.emailAddress).prop('readonly', true);
|
||||
$('.MemberUserName', frm).val(item.displayName).prop('readonly', true);
|
||||
$('.MemberRoleCodes', frm).val(item.roleCodes);
|
||||
$('#ifMemberRoles', frm).val(om.getSelectedMemberRoleDescs().join('\n'));
|
||||
$('.MemberStatus', frm).val(item.statusCode);
|
||||
sax.clearControlErrors();
|
||||
$dlg.mbr.dialog('option', 'title', sax.dlg.title.updateMember);
|
||||
om.openMemberDialog();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
om.onChangeEmail = function ()
|
||||
{
|
||||
let $mbrName = $('.MemberUserName', $frm.mbr);
|
||||
$('#frmUserEmail .UserEmailAddress').val($('.MemberUserEmailAddress', $frm.mbr).val());
|
||||
$mbrName.val('');
|
||||
let fn = function (response)
|
||||
{
|
||||
if (!response || !response.success || !response.user) return;
|
||||
$mbrName.val(response.user.displayName);
|
||||
}
|
||||
sax.ajax.userByEmail = sax.ajax.userByEmail || { url: sax.url.base + 'User/Ajax/GetUserByEmail', formId: 'frmUserEmail', callbackFn: fn };
|
||||
sax.doAjaxRequest(sax.ajax.userByEmail, 100);
|
||||
om.ajax.userByEmail = om.ajax.userByEmail || { url: sax.url.base + 'User/Ajax/GetUserByEmail', formId: 'frmUserEmail', callbackFn: fn };
|
||||
sax.doAjaxRequest(om.ajax.userByEmail, 100);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
// Member Roles.
|
||||
sax.selectMemberRoles = function ()
|
||||
om.storeItem = function ()
|
||||
{
|
||||
//sax.debug('selectMemberRoles',sax.data);
|
||||
sax.selectMemberRoleConfig = sax.selectMemberRoleConfig || { caption: sax.dlg.title.selectMemberRoles, width: 520, fnCallback: sax.updateMemberRoles };
|
||||
sax.selectMemberRoleConfig.codes = sax.data.memberRoles;
|
||||
sax.selectMemberRoleConfig.selectedCodes = sax.member.roleCodes || [];
|
||||
sax.selectCode.fn.openSelectCode(sax.selectMemberRoleConfig);
|
||||
om.ajax.storeItem = om.ajax.storeItem || { url: sax.url.base + 'Organisation/Ajax/StoreMember', formId: 'frmMember', callbackFn: om.onStoreItem };
|
||||
sax.doAjaxRequest(om.ajax.storeItem, 50);
|
||||
}
|
||||
sax.updateMemberRoles = function (memberRoleCodes)
|
||||
{
|
||||
//sax.debug('updateMemberRoles', MemberRoleCodes);
|
||||
sax.member.roleCodes = memberRoleCodes;
|
||||
$('#ifMemberRoleCodes').val(memberRoleCodes.join(sax.data.memberRoleCodeDelim));
|
||||
$('#ifMemberRoles').val(sax.getSelectedMemberRoleDescs().join('\n'));
|
||||
}
|
||||
sax.getSelectedMemberRoleDescs = function ()
|
||||
{
|
||||
let roles = [];
|
||||
sax.member.roleCodes.forEach(function (value) { roles.push(sax.getMemberRoleDesc(value)); })
|
||||
return roles.sortCI();
|
||||
}
|
||||
sax.getMemberRoleDesc = function (roleCode)
|
||||
{
|
||||
let roleDesc = '';
|
||||
sax.data.memberRoles.some(function (value) { if (value.code == roleCode) { roleDesc = value.desc; return true; } return false; })
|
||||
return roleDesc || roleCode;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.createItem = function ()
|
||||
{
|
||||
let $frm = sax.$frm.member;
|
||||
$('.UserOrganisationId,.MemberRoleCodes,input[type="text"],textarea,select', $frm).val('');
|
||||
$('.MemberOrganisationId', $frm).val($('#frmMemberFilter #ifFilterOrganisationId').val());
|
||||
$('.MemberUserEmailAddress', $frm).prop('readonly', false);
|
||||
$('.MemberStatus', $frm).val(sax.data.defaultStatusCode);
|
||||
sax.clearControlErrors();
|
||||
sax.member = { roleCodes: [] };
|
||||
sax.$dlg.member.dialog('option', 'title', sax.dlg.title.createMember);
|
||||
sax.openDialog(sax.$dlg.member, 600, 480);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.updateItem = function (id)
|
||||
{
|
||||
$('.UserOrganisationId', sax.$frm.memberId).val(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);
|
||||
}
|
||||
sax.onUpdateItem = function (response)
|
||||
{
|
||||
//sax.debug('onUpdateItem', response);
|
||||
let $frm = sax.$frm.member;
|
||||
$('.UserOrganisationId,input[type="text"],textarea,select', $frm).val('');
|
||||
if (!response.success) return;
|
||||
let item = sax.member = response.member;
|
||||
$('.UserOrganisationId', $frm).val(item.id);
|
||||
$('.MemberOrganisationId', $frm).val($('#frmMemberFilter #ifFilterOrganisationId').val());
|
||||
$('.MemberUserEmailAddress', $frm).val(item.emailAddress).prop('readonly', true);
|
||||
$('.MemberUserName', $frm).val(item.displayName).prop('readonly', true);
|
||||
$('.MemberRoleCodes', $frm).val(item.roleCodes);
|
||||
$('#ifMemberRoles').val(sax.getSelectedMemberRoleDescs().join('\n'));
|
||||
$('.MemberStatus', $frm).val(item.statusCode);
|
||||
sax.clearControlErrors();
|
||||
sax.$dlg.member.dialog('option', 'title', sax.dlg.title.updateMember);
|
||||
sax.openDialog(sax.$dlg.member, 600, 480);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.storeItem = function ()
|
||||
{
|
||||
sax.ajax.storeItem = sax.ajax.storeItem || { url: sax.url.base + 'Organisation/Ajax/StoreMember', formId: 'frmMember', callbackFn: sax.onStoreItem };
|
||||
sax.doAjaxRequest(sax.ajax.storeItem, 50);
|
||||
}
|
||||
sax.onStoreItem = function (response)
|
||||
om.onStoreItem = function (response)
|
||||
{
|
||||
//sax.debug('onStoreItem', response);
|
||||
sax.refreshControlValues(response.controlValues);
|
||||
if (!response.success) return;
|
||||
sax.$dlg.member.dialog('close');
|
||||
$dlg.mbr.dialog('close');
|
||||
|
||||
var item = response.member;
|
||||
var $item = $('#' + sax.itemIdPrefix + item.id);
|
||||
var $item = $('#' + om.itemIdPrefix + item.id);
|
||||
if (!$item.length)
|
||||
{
|
||||
var $results = $('.sax-panel-results');
|
||||
$item = $('.sax-panel-item-template .sax-panel-item.Member', $results).clone();
|
||||
$('.sax-panel-item-list', $results).prepend($item).show();
|
||||
$item = $('.sax-panel-item-template .sax-panel-item.Member', $pnl.results).clone();
|
||||
$('.sax-panel-item-list', $pnl.results).prepend($item).show();
|
||||
}
|
||||
sax.populateItem($item, item)
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
om.removeItem = function (item, $item)
|
||||
{
|
||||
$('.OrganisationId', $frm.mbrId).val(item.organisationId);
|
||||
$('.UserOrganisationId', $frm.mbrId).val(item.id);
|
||||
om.ajax.removeItem = om.ajax.removeItem || { url: sax.url.base + 'Organisation/Ajax/RemoveMember', formId: 'frmMemberId', callbackFn: om.onRemoveItem };
|
||||
sax.doAjaxRequest(om.ajax.removeItem, 50);
|
||||
}
|
||||
om.onRemoveItem = function (response)
|
||||
{
|
||||
sax.debug('onRemoveItem', response);
|
||||
if (!response.success) return;
|
||||
|
||||
var item = response.member;
|
||||
$('#' + om.itemIdPrefix + item.id).remove();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
$(function ()
|
||||
{
|
||||
$('.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(); });
|
||||
$('.sax-input').on('input', function () { sax.clearControlError(this); });
|
||||
$pnl.mbrs = $('.sax-panel.OrganisationMembers');
|
||||
$pnl.filter = $('.sax-panel-filter', $pnl.mbrs);
|
||||
$pnl.results = $('.sax-panel-results', $pnl.mbrs);
|
||||
|
||||
sax.$frm.memberId = $('#frmMemberId');
|
||||
sax.$frm.member = $('#frmMember');
|
||||
$('#ifMemberUserEmailAddress', sax.$frm.member).on('change', function () { sax.onChangeEmail(); });
|
||||
$frm.filter = $('#frmOrganisationFilter');
|
||||
$frm.filter.on('dblclick', '#ifFilterOrganisation', sax.selectFilterOrganisation);
|
||||
$frm.filter.on('click', '#pbFilterOrganisationSelect', sax.selectFilterOrganisation);
|
||||
|
||||
$frm.mbrId = $('#frmMemberId');
|
||||
$frm.mbr = $('#frmMember');
|
||||
$frm.mbr.on('input', '.sax-input', function () { sax.clearControlError(this); });
|
||||
$frm.mbr.on('change', '.sax-select', function () { sax.clearControlError(this); });
|
||||
$frm.mbr.on('change', '#ifMemberUserEmailAddress', function () { om.onChangeEmail(); });
|
||||
$frm.mbr.on('dblclick', '#ifMemberRoles', om.selectMemberRoles);
|
||||
$frm.mbr.on('click', '#pbMemberRolesSelect', om.selectMemberRoles);
|
||||
|
||||
var opt = sax.dlgOpts();
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { sax.storeItem(); };
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { om.storeItem(); };
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { $(this).dialog('close'); };
|
||||
sax.$dlg.member = $('#dlgMember').dialog(opt);
|
||||
$dlg.mbr = $('#dlgMember').dialog(opt);
|
||||
|
||||
setTimeout(sax.refreshResults, 250);
|
||||
setTimeout(om.refreshResults, 250);
|
||||
});
|
||||
|
||||
}(window, window.document));
|
||||
|
||||
@@ -56,18 +56,18 @@
|
||||
$('.OrganisationType', $item).text(item.typeDesc);
|
||||
$('.OrganisationCategory', $item).text(item.categoryDesc);
|
||||
$('.OrganisationSport', $item).text(item.sportName);
|
||||
$('.OrganisationRegion', $item).text(item.regionName);
|
||||
$('.OrganisationRegion', $item).text(item.regionNameCountry);
|
||||
$('.OrganisationMemberCount', $item).on('click', function () { op.onClickMemberCount(item.id); }).find('.MemberCount').text(item.memberCount);
|
||||
$('.StatusDesc', $item).text(item.statusDesc).addClass('sax-status-' + item.statusCode.toLowerCase());
|
||||
$('.sax-caption .sax-action').toggleClass('sax-action', !item.deleted);
|
||||
let $mnu = $('ul.sax-dropdown-menu', $item).empty();
|
||||
if (!item.deleted)
|
||||
{
|
||||
$mnu.append(op.getItemMenuOption(sax.lbl.edit, function () { op.updateItem(item, $item) }, 'sax-edit'));
|
||||
let fnUpdItm = function () { op.updateItem(item, $item) };
|
||||
$mnu.append(op.getItemMenuOption(sax.lbl.edit, fnUpdItm, 'sax-edit'));
|
||||
if (item.awaiting)
|
||||
$mnu.append(op.getItemMenuOption(sax.lbl.activate, function () { op.activateItem(item) }, 'sax-unlock'));
|
||||
$('.sax-header .sax-action.sax-item-update', $item).off('click').on('click', function () { op.updateItem(item, $item) });
|
||||
$item.off('dblclick').on('dblclick', function () { op.updateItem(item, $item) });
|
||||
$item.on('click', '.sax-header .sax-action.sax-item-update', fnUpdItm).on('dblclick', fnUpdItm);
|
||||
}
|
||||
$('.sax-burger', $item).toggle(!!$('.sax-dropdown-item', $mnu).length);
|
||||
$('.sax-panel-messages', $pnl.results).hide().empty();
|
||||
@@ -101,6 +101,11 @@
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
op.getFilterSport = function ()
|
||||
{
|
||||
let frm = $frm.filter;
|
||||
return { id: $('.FilterOrganisationSportId', frm).val(), name: $('.FilterOrganisationSportCaption', frm).val() };
|
||||
}
|
||||
op.selectFilterSport = function ()
|
||||
{
|
||||
if (!op.data.sports)
|
||||
@@ -109,7 +114,7 @@
|
||||
}
|
||||
op.showSelectFilterSport = function ()
|
||||
{
|
||||
sax.data.selectItem.fn.selectItem({ caption: sax.dlg.title.selectSport, itemId: $('.FilterOrganisationSportId', $frm.filter).val(), items: op.data.sports, fnCallback: op.onFilterSportSelected });
|
||||
sax.data.selectItem.fn.selectItem({ caption: sax.dlg.title.selectSport, itemId: op.getFilterSport().id, items: op.data.sports, fnCallback: op.onFilterSportSelected });
|
||||
}
|
||||
op.onFilterSportSelected = function (spt)
|
||||
{
|
||||
@@ -159,6 +164,11 @@
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
op.getFilterRegion = function ()
|
||||
{
|
||||
let frm = $frm.filter;
|
||||
return { id: $('.FilterOrganisationRegionId', frm).val(), name: $('.FilterOrganisationRegionCaption', frm).val() };
|
||||
}
|
||||
op.selectFilterRegion = function ()
|
||||
{
|
||||
if (!op.data.regions)
|
||||
@@ -167,7 +177,7 @@
|
||||
}
|
||||
op.showSelectFilterRegion = function ()
|
||||
{
|
||||
sax.data.selectItem.fn.selectItem({ caption: sax.dlg.title.selectFilterRegion, itemId: $('.FilterOrganisationRegionId', $frm.filter).val(), items: op.data.regions, fnCallback: op.onFilterRegionSelected });
|
||||
sax.data.selectItem.fn.selectItem({ caption: sax.dlg.title.selectFilterRegion, itemId: op.getFilterRegion().id, items: op.data.regions, fnCallback: op.onFilterRegionSelected });
|
||||
}
|
||||
op.onFilterRegionSelected = function (rgn)
|
||||
{
|
||||
@@ -218,8 +228,14 @@
|
||||
op.createItem = function ()
|
||||
{
|
||||
op.clearItem();
|
||||
let spt = op.getFilterSport();
|
||||
if (spt.id && spt.name)
|
||||
{
|
||||
$('.OrganisationSportId', $frm.org).val(spt.id);
|
||||
$('.OrganisationSportCaption', $frm.org).val(spt.name);
|
||||
}
|
||||
$dlg.organisation.dialog('option', 'title', sax.dlg.title.createOrganisation);
|
||||
sax.openDialog($dlg.organisation, 600, 480);
|
||||
sax.openOrgDialog();
|
||||
}
|
||||
op.clearItem = function ()
|
||||
{
|
||||
@@ -228,6 +244,14 @@
|
||||
$('.OrganisationStatus', frm).val(sax.data.defaultStatusCode);
|
||||
sax.clearControlErrors();
|
||||
}
|
||||
sax.openOrgDialog = function ()
|
||||
{
|
||||
sax.openDialog($dlg.organisation, 640, 720);
|
||||
}
|
||||
sax.onOpenOrgDialog = function ()
|
||||
{
|
||||
$('textarea').scrollTop(0);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
op.updateItem = function (item, $item)
|
||||
@@ -251,10 +275,13 @@
|
||||
$('.OrganisationSportCaption', frm).val(item.sportName);
|
||||
$('.OrganisationRegionIdCountry', frm).val(item.regionIdCountry);
|
||||
$('.OrganisationRegionCaptionCountry', frm).val(item.regionNameCountry);
|
||||
$('.OrganisationAbout', frm).val(item.about);
|
||||
$('.OrganisationFacilities', frm).val(item.facilities);
|
||||
$('.OrganisationNotes', frm).val(item.notes);
|
||||
$('.OrganisationStatus', frm).val(item.statusCode);
|
||||
sax.clearControlErrors();
|
||||
$dlg.organisation.dialog('option', 'title', sax.dlg.title.updateOrganisation);
|
||||
sax.openDialog($dlg.organisation, 600, 480);
|
||||
sax.openOrgDialog();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
@@ -367,6 +394,7 @@
|
||||
$frm.org.on('dblclick', '.OrganisationRegionCaptionCountry', op.selectOrgRegion).on('click', '#pbSelectRegion', op.selectOrgRegion);
|
||||
|
||||
var opt = sax.dlgOpts();
|
||||
opt.open = sax.onOpenOrgDialog;
|
||||
opt.buttons[sax.dlg.btn.ok] = function () { op.storeItem(); };
|
||||
opt.buttons[sax.dlg.btn.cancel] = function () { $(this).dialog('close'); };
|
||||
$dlg.organisation = $('#dlgOrganisation').dialog(opt);
|
||||
|
||||
@@ -333,6 +333,9 @@
|
||||
<data name="label.experience" xml:space="preserve">
|
||||
<value>Experience</value>
|
||||
</data>
|
||||
<data name="label.facilities" xml:space="preserve">
|
||||
<value>Facilities</value>
|
||||
</data>
|
||||
<data name="label.feedback" xml:space="preserve">
|
||||
<value>Feedback</value>
|
||||
</data>
|
||||
|
||||
@@ -229,6 +229,9 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
{
|
||||
// Construction.
|
||||
public AjaxResponse_ProfileOrganisation(SaxModel_Online model) : base(model) { }
|
||||
// Reference data.
|
||||
public List<AjaxResponse_Data.ItemCodeDesc> Categories { get; } = new List<ItemCodeDesc>();
|
||||
public List<AjaxResponse_Data.ItemCodeDesc> Types { get; } = new List<ItemCodeDesc>();
|
||||
// Organisation list.
|
||||
public ProfileOrganisationData Organisation { get; set; }
|
||||
}
|
||||
@@ -280,6 +283,19 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
// Construct response.
|
||||
responseData.Organisation = new ProfileOrganisationData();
|
||||
PopulateOrganisationResponseData(model, organisation, userOrganisation, address, responseData.Organisation);
|
||||
|
||||
// Reference data.
|
||||
foreach (TypeCodeDesc organisationCategory in OrganisationCategoryCodes)
|
||||
{
|
||||
// Categories only include Partner/Other if selected organisation has that category.
|
||||
if (organisationCategory.Type != (int)organisation.OrganisationCategory && organisationCategory.Type.In(new[] { (int)Sax.OrganisationCategory.Partner, (int)Sax.OrganisationCategory.Other }))
|
||||
continue;
|
||||
responseData.Categories.Add(new AjaxResponse_Data.ItemCodeDesc() { Code = organisationCategory.Code, Desc = Localiser.GetOrganisationCategoryCaption((Sax.OrganisationCategory)organisationCategory.Type) });
|
||||
}
|
||||
foreach (TypeCodeDesc organisationType in OrganisationTypeCodes)
|
||||
{
|
||||
responseData.Types.Add(new AjaxResponse_Data.ItemCodeDesc() { Code = organisationType.Code, Desc = Localiser.GetOrganisationTypeCaption((Sax.OrganisationType)organisationType.Type) });
|
||||
}
|
||||
}
|
||||
|
||||
// Complete response.
|
||||
@@ -409,6 +425,10 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
organisation.SportIdPrimary = model.ExtractSysId(model.Organisation.SportId);
|
||||
if (model.Organisation.RegionIdCountry != null)
|
||||
organisation.RegionIdPrimary = model.ExtractSysId(model.Organisation.RegionIdCountry);
|
||||
if (model.Organisation.About != null)
|
||||
organisation.About = model.Organisation.About;
|
||||
if (model.Organisation.Facilities != null)
|
||||
organisation.Facilities = model.Organisation.Facilities;
|
||||
if (model.Organisation.PhoneMain != null)
|
||||
organisation.PhoneMain = model.Organisation.PhoneMain;
|
||||
if (!AccountMgr.UpdateOrganisation(organisation, DbUpdateInfo))
|
||||
|
||||
@@ -22,9 +22,8 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Organisation data.
|
||||
public class OrganisationResponseData
|
||||
private class OrganisationResponseData : AjaxResponse_Data.ItemData_Base
|
||||
{
|
||||
public String Id { get; set; }
|
||||
public String Name { get; set; }
|
||||
public String RegionId { get; set; }
|
||||
public String RegionName { get; set; }
|
||||
|
||||
@@ -26,9 +26,8 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
//-------------------------------------------------------------------
|
||||
// Account - Get Organisations.
|
||||
//-------------------------------------------------------------------
|
||||
private class OrganisationListData
|
||||
private class OrganisationListData : AjaxResponse_Data.ItemData_Base
|
||||
{
|
||||
public String Id { get; set; }
|
||||
public String Name { get; set; }
|
||||
public String CategoryDesc { get; set; }
|
||||
public String SportId { get; set; }
|
||||
@@ -129,15 +128,17 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
return Json(responseData);
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
// Account - Get Organisations.
|
||||
// Account - Get Organisation.
|
||||
//-------------------------------------------------------------------
|
||||
private class OrganisationData
|
||||
private class OrganisationData : AjaxResponse_Data.ItemData_Base
|
||||
{
|
||||
public String Id { get; set; }
|
||||
public String Name { get; set; }
|
||||
public String Category { get; set; }
|
||||
public String Type { get; set; }
|
||||
public String Sport { get; set; }
|
||||
public String Location { get; set; }
|
||||
public String About { get; set; }
|
||||
public String Facilities { get; set; }
|
||||
public String Address { get; set; }
|
||||
public String PostalCode { get; set; }
|
||||
public String Phone { get; set; }
|
||||
@@ -190,8 +191,11 @@ namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
Id = model.EncryptId(organisation.Id),
|
||||
Name = organisation.Name,
|
||||
Category = Localiser.GetOrganisationCategoryCaption(organisation.OrganisationCategory),
|
||||
Type = Localiser.GetOrganisationTypeCaption(organisation.OrganisationType),
|
||||
Sport = model.GetSportCaption(organisation.SportIdPrimary),
|
||||
Location = model.GetRegionCaption(organisation.RegionIdPrimary),
|
||||
About = organisation.About,
|
||||
Facilities = organisation.Facilities,
|
||||
};
|
||||
responseData.Organisation = organisationData;
|
||||
|
||||
|
||||
@@ -41,6 +41,8 @@ namespace Saxonite.Net.Core.Web.Online.Models
|
||||
public Sax.OrganisationCategory GetOrganisationCategory() { return (Sax.OrganisationCategory)Model.OrganisationCategoryCodes.GetTypeForCode(Category); }
|
||||
public String SportId { get; set; }
|
||||
public String RegionIdCountry { get; set; }
|
||||
public String About { get; set; }
|
||||
public String Facilities { get; set; }
|
||||
public String PhoneMain { get; set; }
|
||||
// Address.
|
||||
public ModelData_Address Address { get; }
|
||||
@@ -91,6 +93,16 @@ namespace Saxonite.Net.Core.Web.Online.Models
|
||||
else if (!SysId.IsValid(Model.ExtractSysId(RegionIdCountry)))
|
||||
responseData.SetControlError(ControlNameSuffix + "RegionIdCountry", Model.Localiser["msg.validation.invalid.value"]);
|
||||
|
||||
// About - optional.
|
||||
responseData.SetControlValue(ControlNameSuffix + "About", About);
|
||||
if (StringUtil.GetLength(About) > Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.Organisation_About))
|
||||
responseData.SetControlError(ControlNameSuffix + "About", Model.Localiser["msg.validation.maximum.length", Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.Organisation_About)]);
|
||||
|
||||
// Facilities - optional.
|
||||
responseData.SetControlValue(ControlNameSuffix + "Facilities", Facilities);
|
||||
if (StringUtil.GetLength(Facilities) > Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.Organisation_Facilities))
|
||||
responseData.SetControlError(ControlNameSuffix + "Facilities", Model.Localiser["msg.validation.maximum.length", Model.GetControlMaxLength(SaxDbDfn_Core.ColumnIdx.Organisation_Facilities)]);
|
||||
|
||||
// Phone Main - optional.
|
||||
if (PhoneMain != null)
|
||||
{
|
||||
|
||||
@@ -16,23 +16,31 @@
|
||||
<div class="spacer"></div>
|
||||
|
||||
<div class="row OrganisationCategory">
|
||||
<div class="col-sm-5"><div class="sax-label text-sm-right">@Localiser["label.type"]</div></div>
|
||||
<div class="col-sm-3"><div class="sax-label text-sm-right">@Localiser["label.type"]</div></div>
|
||||
<div class="col-sm"><div class="sax-value"></div></div>
|
||||
</div>
|
||||
<div class="row OrganisationSport">
|
||||
<div class="col-sm-5"><div class="sax-label text-sm-right">@Localiser["label.sport"]</div></div>
|
||||
<div class="col-sm-3"><div class="sax-label text-sm-right">@Localiser["label.sport"]</div></div>
|
||||
<div class="col-sm"><div class="sax-value"></div></div>
|
||||
</div>
|
||||
<div class="row OrganisationLocation">
|
||||
<div class="col-sm-5"><div class="sax-label text-sm-right">@Localiser["label.location"]</div></div>
|
||||
<div class="col-sm-3"><div class="sax-label text-sm-right">@Localiser["label.location"]</div></div>
|
||||
<div class="col-sm"><div class="sax-value"></div></div>
|
||||
</div>
|
||||
<div class="row OrganisationAbout">
|
||||
<div class="col-sm-3"><div class="sax-label text-sm-right">@Localiser["label.about"]</div></div>
|
||||
<div class="col-sm"><div class="sax-value" style="max-height:240px;overflow-y:auto;"></div></div>
|
||||
</div>
|
||||
<div class="row OrganisationFacilities">
|
||||
<div class="col-sm-3"><div class="sax-label text-sm-right">@Localiser["label.facilities"]</div></div>
|
||||
<div class="col-sm"><div class="sax-value" style="max-height:240px;overflow-y:auto;"></div></div>
|
||||
</div>
|
||||
<div class="row OrganisationAddress">
|
||||
<div class="col-sm-5"><div class="sax-label text-sm-right">@Localiser["label.address"]</div></div>
|
||||
<div class="col-sm-3"><div class="sax-label text-sm-right">@Localiser["label.address"]</div></div>
|
||||
<div class="col-sm"><div class="sax-value"></div></div>
|
||||
</div>
|
||||
<div class="row OrganisationPostalCode">
|
||||
<div class="col-sm-5"><div class="sax-label text-sm-right">@Localiser["label.postal.code"]</div></div>
|
||||
<div class="col-sm-3"><div class="sax-label text-sm-right">@Localiser["label.postal.code"]</div></div>
|
||||
<div class="col-sm"><div class="sax-value"></div></div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -134,6 +134,7 @@
|
||||
}
|
||||
so.onViewItem = function (response)
|
||||
{
|
||||
sax.debug('onViewItem',response);
|
||||
if (!response.success) return;
|
||||
let dlg = $dlg.org;
|
||||
let item = so.data.organisation = response.organisation;
|
||||
@@ -141,11 +142,13 @@
|
||||
$('.OrganisationCategory', dlg).toggle(!!item.category).find('.sax-value').text(item.category);
|
||||
$('.OrganisationSport', dlg).toggle(!!item.sport).find('.sax-value').text(item.sport);
|
||||
$('.OrganisationLocation', dlg).toggle(!!item.location).find('.sax-value').text(item.location);
|
||||
$('.OrganisationAbout', dlg).toggle(!!item.about).find('.sax-value').html(item.about.replace('\n','<br/>'));
|
||||
$('.OrganisationFacilities', dlg).toggle(!!item.facilities).find('.sax-value').html(item.facilities.replace('\n', '<br/>'));
|
||||
$('.OrganisationAddress', dlg).toggle(!!item.address).find('.sax-value').html(item.address ? item.address.replace('\n', '<br/>') : '');
|
||||
$('.OrganisationPostalCode', dlg).toggle(!!item.postalCode).find('.sax-value').text(item.postalCode);
|
||||
sax.clearControlErrors();
|
||||
$dlg.org.dialog('option', 'title', item.name || sax.dlg.title.organisation);
|
||||
sax.openDialog($dlg.org, 600, 600);
|
||||
sax.openDialog($dlg.org, 720, 800);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
|
||||
@@ -100,13 +100,15 @@
|
||||
}
|
||||
po.doUpdateOrganisation = function (response)
|
||||
{
|
||||
//sax.debug('doUpdateOrganisation', response);
|
||||
sax.debug('doUpdateOrganisation', response);
|
||||
if (!response || !response.success) return;
|
||||
let item = response.organisation;
|
||||
if (!item) return;
|
||||
$('.OrganisationId', $frm.org).val(item.id);
|
||||
$('.OrganisationName', $frm.org).val(item.name);
|
||||
if (response.categories) sax.populateSelectCodeDesc($('.sax-select.OrganisationCategory', $frm.org), response.categories);
|
||||
$('.OrganisationCategory', $frm.org).val(item.categoryCode);
|
||||
if (response.types) sax.populateSelectCodeDesc($('.sax-select.OrganisationType', $frm.org), response.types);
|
||||
$('.OrganisationType', $frm.org).val(item.typeCode);
|
||||
$('.OrganisationSportId', $frm.org).val(item.sportId);
|
||||
$('.OrganisationSportCaption', $frm.org).val(item.sportName);
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
//-------------------------------------------------------------------
|
||||
public static class Version
|
||||
{
|
||||
private static String version { get; } = "1.2.6.0";
|
||||
private static String version { get; } = "1.2.6.1";
|
||||
// Retrieve version.
|
||||
public static String GetFullVersion () { return version; }
|
||||
public static String GetAppVersion ()
|
||||
@@ -40,8 +40,9 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
//-------------------------------------------------------------------
|
||||
// Version history.
|
||||
//-------------------------------------------------------------------
|
||||
// 1.2.6 ??-May-2022 Image resizing
|
||||
// 1.2.6 16-May-2022 Image resizing
|
||||
// - Profile and article images resized to maximum width/height.
|
||||
// - Organisation About and Facilities properties.
|
||||
// 1.2.5 20-Apr-2022 Article feedback
|
||||
// - Online Activity/Article feedback 5 stars, summary on Article list/popup.
|
||||
// - Online Activity filter.
|
||||
|
||||
@@ -220,6 +220,7 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
Club,
|
||||
Society,
|
||||
Education,
|
||||
SportDepartment,
|
||||
Syndicate,
|
||||
/// <summary>Commercial partner</summary>
|
||||
Partner,
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Mon 11-Apr-2022 17:51:44
|
||||
// Code generated by Sarand Database Utilities Wed 18-May-2022 18:33:47
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Base.App
|
||||
{
|
||||
@@ -160,6 +160,9 @@ namespace Saxonite.Base.App
|
||||
Organisation_OrganisationCategory,
|
||||
Organisation_SportIdPrimary,
|
||||
Organisation_RegionIdPrimary,
|
||||
Organisation_About,
|
||||
Organisation_Facilities,
|
||||
Organisation_ContactData,
|
||||
Organisation_CountryIso2Code,
|
||||
Organisation_PhoneMain,
|
||||
Organisation_PhoneAlt,
|
||||
@@ -377,7 +380,7 @@ namespace Saxonite.Base.App
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
private static readonly int tableCount = 19;
|
||||
private static readonly int columnCount = 329;
|
||||
private static readonly int columnCount = 332;
|
||||
private static ulong maxTextLen = 0;
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -685,6 +688,9 @@ namespace Saxonite.Base.App
|
||||
new ColumnDfn(7,"OrganisationCategory",0,12,false,3),
|
||||
new ColumnDfn(7,"SportIdPrimary",4,4,false,10),
|
||||
new ColumnDfn(7,"RegionIdPrimary",4,4,false,10),
|
||||
new ColumnDfn(7,"About",0,-9,false,2000),
|
||||
new ColumnDfn(7,"Facilities",0,-9,false,2000),
|
||||
new ColumnDfn(7,"ContactData",0,-9,false,0),
|
||||
new ColumnDfn(7,"CountryIso2Code",0,12,false,2),
|
||||
new ColumnDfn(7,"PhoneMain",0,-9,false,50),
|
||||
new ColumnDfn(7,"PhoneAlt",0,-9,false,50),
|
||||
|
||||
@@ -139,6 +139,7 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
organisationCategoryCodes.Add(Sax.OrganisationCategory.Club, "CLB", "Club");
|
||||
organisationCategoryCodes.Add(Sax.OrganisationCategory.Society, "SOC", "Society");
|
||||
organisationCategoryCodes.Add(Sax.OrganisationCategory.Education, "EDU", "Education");
|
||||
organisationCategoryCodes.Add(Sax.OrganisationCategory.SportDepartment, "SPD", "Sport Department");
|
||||
organisationCategoryCodes.Add(Sax.OrganisationCategory.Syndicate, "SYN", "Syndicate");
|
||||
organisationCategoryCodes.Add(Sax.OrganisationCategory.Partner, "PRT", "Partner");
|
||||
organisationCategoryCodes.Add(Sax.OrganisationCategory.Other, "OTH", "Other");
|
||||
|
||||
@@ -54,10 +54,13 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
public String Name { get; set; } = String.Empty;
|
||||
public Sax.OrganisationType OrganisationType { get; set; }
|
||||
public Sax.OrganisationCategory OrganisationCategory { get; set; }
|
||||
public String PhoneMain { get; set; } = String.Empty;
|
||||
public String PhoneAlt { get; set; } = String.Empty;
|
||||
public SysId SportIdPrimary { get; set; }
|
||||
public SysId RegionIdPrimary { get; set; }
|
||||
public String About { get; set; } = String.Empty;
|
||||
public String Facilities { get; set; } = String.Empty;
|
||||
public String ContactData { get; set; } = String.Empty;
|
||||
public String PhoneMain { get; set; } = String.Empty;
|
||||
public String PhoneAlt { get; set; } = String.Empty;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -87,16 +90,6 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
get { return data.OrganisationCategory; }
|
||||
set { CheckChangedEnum(data.OrganisationCategory, value); data.OrganisationCategory = value; }
|
||||
}
|
||||
public String PhoneMain
|
||||
{
|
||||
get { return data.PhoneMain; }
|
||||
set { CheckChanged(data.PhoneMain, value); data.PhoneMain = value; }
|
||||
}
|
||||
public String PhoneAlt
|
||||
{
|
||||
get { return data.PhoneAlt; }
|
||||
set { CheckChanged(data.PhoneAlt, value); data.PhoneAlt = value; }
|
||||
}
|
||||
public SysId SportIdPrimary
|
||||
{
|
||||
get { return data.SportIdPrimary; }
|
||||
@@ -107,16 +100,44 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
get { return data.RegionIdPrimary; }
|
||||
set { CheckChanged(data.RegionIdPrimary, value); data.RegionIdPrimary = value; }
|
||||
}
|
||||
public String About
|
||||
{
|
||||
get { return data.About; }
|
||||
set { CheckChanged(data.About, value); data.About = value; }
|
||||
}
|
||||
public String Facilities
|
||||
{
|
||||
get { return data.Facilities; }
|
||||
set { CheckChanged(data.Facilities, value); data.Facilities = value; }
|
||||
}
|
||||
public String ContactData
|
||||
{
|
||||
get { return data.ContactData; }
|
||||
set { CheckChanged(data.ContactData, value); data.ContactData = value; }
|
||||
}
|
||||
public String PhoneMain
|
||||
{
|
||||
get { return data.PhoneMain; }
|
||||
set { CheckChanged(data.PhoneMain, value); data.PhoneMain = value; }
|
||||
}
|
||||
public String PhoneAlt
|
||||
{
|
||||
get { return data.PhoneAlt; }
|
||||
set { CheckChanged(data.PhoneAlt, value); data.PhoneAlt = value; }
|
||||
}
|
||||
// Population.
|
||||
internal void PopulateFrom(Data data)
|
||||
{
|
||||
Name = data.Name;
|
||||
OrganisationType = data.OrganisationType;
|
||||
OrganisationCategory = data.OrganisationCategory;
|
||||
PhoneMain = data.PhoneMain;
|
||||
PhoneAlt = data.PhoneAlt;
|
||||
SportIdPrimary = data.SportIdPrimary;
|
||||
RegionIdPrimary = data.RegionIdPrimary;
|
||||
About = data.About;
|
||||
Facilities = data.Facilities;
|
||||
ContactData = data.ContactData;
|
||||
PhoneMain = data.PhoneMain;
|
||||
PhoneAlt = data.PhoneAlt;
|
||||
base.PopulateFrom(data);
|
||||
}
|
||||
public Data Clone()
|
||||
@@ -135,10 +156,13 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
public ValidValue Name { get; set; } = ValidValue.Valid;
|
||||
public ValidValue OrganisationType { get; set; } = ValidValue.Valid;
|
||||
public ValidValue OrganisationCategory { get; set; } = ValidValue.Valid;
|
||||
public ValidValue PhoneMain { get; set; } = ValidValue.Valid;
|
||||
public ValidValue PhoneAlt { get; set; } = ValidValue.Valid;
|
||||
public ValidValue SportIdPrimary { get; set; } = ValidValue.Valid;
|
||||
public ValidValue RegionIdPrimary { get; set; } = ValidValue.Valid;
|
||||
public ValidValue About { get; set; } = ValidValue.Valid;
|
||||
public ValidValue Facilities { get; set; } = ValidValue.Valid;
|
||||
public ValidValue ContactData { get; set; } = ValidValue.Valid;
|
||||
public ValidValue PhoneMain { get; set; } = ValidValue.Valid;
|
||||
public ValidValue PhoneAlt { get; set; } = ValidValue.Valid;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -185,7 +209,7 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
{
|
||||
if (organisationCategory == Sax.OrganisationCategory.Club) return true;
|
||||
if (organisationCategory == Sax.OrganisationCategory.Association) return true;
|
||||
if (organisationCategory == Sax.OrganisationCategory.Education) return true;
|
||||
if (organisationCategory == Sax.OrganisationCategory.SportDepartment) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -215,16 +239,6 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
get { return data.OrganisationCategory; }
|
||||
set { data.OrganisationCategory = value; }
|
||||
}
|
||||
public String PhoneMain
|
||||
{
|
||||
get { return data.PhoneMain; }
|
||||
set { data.PhoneMain = value; }
|
||||
}
|
||||
public String PhoneAlt
|
||||
{
|
||||
get { return data.PhoneAlt; }
|
||||
set { data.PhoneAlt = value; }
|
||||
}
|
||||
public SysId SportIdPrimary
|
||||
{
|
||||
get { return data.SportIdPrimary; }
|
||||
@@ -235,6 +249,31 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
get { return data.RegionIdPrimary; }
|
||||
set { data.RegionIdPrimary = value; }
|
||||
}
|
||||
public String About
|
||||
{
|
||||
get { return data.About; }
|
||||
set { data.About = value; }
|
||||
}
|
||||
public String Facilities
|
||||
{
|
||||
get { return data.Facilities; }
|
||||
set { data.Facilities = value; }
|
||||
}
|
||||
public String ContactData
|
||||
{
|
||||
get { return data.ContactData; }
|
||||
set { data.ContactData = value; }
|
||||
}
|
||||
public String PhoneMain
|
||||
{
|
||||
get { return data.PhoneMain; }
|
||||
set { data.PhoneMain = value; }
|
||||
}
|
||||
public String PhoneAlt
|
||||
{
|
||||
get { return data.PhoneAlt; }
|
||||
set { data.PhoneAlt = value; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Flags - positions 1-16 available.
|
||||
|
||||
@@ -105,6 +105,36 @@ namespace Saxonite.Net.Standard.Base.Mgr
|
||||
errField.OrganisationCategory = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return SetErrorState("Organisation category must be specified.");
|
||||
}
|
||||
// Sport.
|
||||
if (errField.SportIdPrimary != SacsHierarchyItem.ValidValue.Ignore)
|
||||
{
|
||||
if (!SysId.IsValid(data.SportIdPrimary) && SaxOrganisation.IsSportMandatory(data.OrganisationCategory))
|
||||
{
|
||||
errField.SportIdPrimary = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return SetErrorState("Sport must be specified.");
|
||||
}
|
||||
}
|
||||
// Region.
|
||||
if (errField.RegionIdPrimary != SacsHierarchyItem.ValidValue.Ignore)
|
||||
{
|
||||
if (!SysId.IsValid(data.RegionIdPrimary))
|
||||
{
|
||||
errField.RegionIdPrimary = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return SetErrorState("Region must be specified.");
|
||||
}
|
||||
}
|
||||
// About.
|
||||
if (errField.About != SacsHierarchyItem.ValidValue.Ignore && !IsValidValue(data.About, "about", (long)SaxDbDfn_Core.GetColTextLen(SaxDbDfn_Core.ColumnIdx.Organisation_About)))
|
||||
{
|
||||
errField.About = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return false;
|
||||
}
|
||||
// Facilities.
|
||||
if (errField.Facilities != SacsHierarchyItem.ValidValue.Ignore && !IsValidValue(data.Facilities, "facilities", (long)SaxDbDfn_Core.GetColTextLen(SaxDbDfn_Core.ColumnIdx.Organisation_Facilities)))
|
||||
{
|
||||
errField.Facilities = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return false;
|
||||
}
|
||||
// Main phone.
|
||||
if (errField.PhoneMain != SacsHierarchyItem.ValidValue.Ignore && !IsValidValue(data.PhoneMain, "phone", (long)SaxDbDfn_Core.GetColTextLen(SaxDbDfn_Core.ColumnIdx.Organisation_PhoneMain)))
|
||||
{
|
||||
@@ -117,14 +147,6 @@ namespace Saxonite.Net.Standard.Base.Mgr
|
||||
errField.PhoneAlt = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return false;
|
||||
}
|
||||
// Sport.
|
||||
if (errField.SportIdPrimary != SacsHierarchyItem.ValidValue.Ignore)
|
||||
{
|
||||
}
|
||||
// Region.
|
||||
if (errField.RegionIdPrimary != SacsHierarchyItem.ValidValue.Ignore)
|
||||
{
|
||||
}
|
||||
|
||||
// Common properties.
|
||||
if (errField.Notes != SacsHierarchyItem.ValidValue.Ignore && !IsValidValue(data.Notes, "notes", (long)SaxDbDfn_Core.GetColTextLen(SaxDbDfn_Core.ColumnIdx.Organisation_Notes)))
|
||||
@@ -170,10 +192,10 @@ namespace Saxonite.Net.Standard.Base.Mgr
|
||||
errField.RegionIdPrimary = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return SetErrorState("Invalid region specified");
|
||||
}
|
||||
if (region.RegionType != App.Sax.RegionType.Country)
|
||||
if (region.RegionType != App.Sax.RegionType.Country && region.RegionType != App.Sax.RegionType.Continent && region.RegionType != App.Sax.RegionType.World)
|
||||
{
|
||||
errField.RegionIdPrimary = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return SetErrorState("Region must be a country");
|
||||
return SetErrorState("Region must be a country or international region");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Mon 11-Apr-2022 17:51:44
|
||||
// Code generated by Sarand Database Utilities Wed 18-May-2022 18:33:47
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Mon 11-Apr-2022 17:51:44
|
||||
// Code generated by Sarand Database Utilities Wed 18-May-2022 18:33:47
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Mon 11-Apr-2022 17:51:44
|
||||
// Code generated by Sarand Database Utilities Wed 18-May-2022 18:33:47
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Mon 11-Apr-2022 17:51:44
|
||||
// Code generated by Sarand Database Utilities Wed 18-May-2022 18:33:47
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Mon 11-Apr-2022 17:51:44
|
||||
// Code generated by Sarand Database Utilities Wed 18-May-2022 18:33:47
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Mon 11-Apr-2022 17:51:44
|
||||
// Code generated by Sarand Database Utilities Wed 18-May-2022 18:33:47
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Mon 11-Apr-2022 17:51:44
|
||||
// Code generated by Sarand Database Utilities Wed 18-May-2022 18:33:47
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Mon 11-Apr-2022 17:51:44
|
||||
// Code generated by Sarand Database Utilities Wed 18-May-2022 18:33:47
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Mon 11-Apr-2022 17:51:44
|
||||
// Code generated by Sarand Database Utilities Wed 18-May-2022 18:33:47
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
@@ -25,6 +25,9 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
public ColumnDataString _OrganisationCategory { get; } = new ColumnDataString("OrganisationCategory");
|
||||
public ColumnDataInt32 _SportIdPrimary { get; } = new ColumnDataInt32("SportIdPrimary");
|
||||
public ColumnDataInt32 _RegionIdPrimary { get; } = new ColumnDataInt32("RegionIdPrimary");
|
||||
public ColumnDataString _About { get; } = new ColumnDataString("About");
|
||||
public ColumnDataString _Facilities { get; } = new ColumnDataString("Facilities");
|
||||
public ColumnDataString _ContactData { get; } = new ColumnDataString("ContactData");
|
||||
public ColumnDataString _CountryIso2Code { get; } = new ColumnDataString("CountryIso2Code");
|
||||
public ColumnDataString _PhoneMain { get; } = new ColumnDataString("PhoneMain");
|
||||
public ColumnDataString _PhoneAlt { get; } = new ColumnDataString("PhoneAlt");
|
||||
@@ -49,6 +52,9 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
"OrganisationCategory",
|
||||
"SportIdPrimary",
|
||||
"RegionIdPrimary",
|
||||
"About",
|
||||
"Facilities",
|
||||
"ContactData",
|
||||
"CountryIso2Code",
|
||||
"PhoneMain",
|
||||
"PhoneAlt",
|
||||
@@ -99,6 +105,9 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
public String _OrganisationCategory { get { return Cols._OrganisationCategory.Value; } set { Cols._OrganisationCategory.Value = value; } }
|
||||
public Int32 _SportIdPrimary { get { return Cols._SportIdPrimary.Value; } set { Cols._SportIdPrimary.Value = value; } }
|
||||
public Int32 _RegionIdPrimary { get { return Cols._RegionIdPrimary.Value; } set { Cols._RegionIdPrimary.Value = value; } }
|
||||
public String _About { get { return Cols._About.Value; } set { Cols._About.Value = value; } }
|
||||
public String _Facilities { get { return Cols._Facilities.Value; } set { Cols._Facilities.Value = value; } }
|
||||
public String _ContactData { get { return Cols._ContactData.Value; } set { Cols._ContactData.Value = value; } }
|
||||
public String _CountryIso2Code { get { return Cols._CountryIso2Code.Value; } set { Cols._CountryIso2Code.Value = value; } }
|
||||
public String _PhoneMain { get { return Cols._PhoneMain.Value; } set { Cols._PhoneMain.Value = value; } }
|
||||
public String _PhoneAlt { get { return Cols._PhoneAlt.Value; } set { Cols._PhoneAlt.Value = value; } }
|
||||
@@ -138,6 +147,9 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
_OrganisationCategory = GetFieldString(dbDataReader, "OrganisationCategory", _OrganisationCategory);
|
||||
_SportIdPrimary = GetFieldInt32(dbDataReader, "SportIdPrimary", _SportIdPrimary);
|
||||
_RegionIdPrimary = GetFieldInt32(dbDataReader, "RegionIdPrimary", _RegionIdPrimary);
|
||||
_About = GetFieldString(dbDataReader, "About", _About);
|
||||
_Facilities = GetFieldString(dbDataReader, "Facilities", _Facilities);
|
||||
_ContactData = GetFieldString(dbDataReader, "ContactData", _ContactData);
|
||||
_CountryIso2Code = GetFieldString(dbDataReader, "CountryIso2Code", _CountryIso2Code);
|
||||
_PhoneMain = GetFieldString(dbDataReader, "PhoneMain", _PhoneMain);
|
||||
_PhoneAlt = GetFieldString(dbDataReader, "PhoneAlt", _PhoneAlt);
|
||||
@@ -176,6 +188,9 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
if (columnNames.ContainsCI("OrganisationCategory")) AddCommandParameter(dbCommand, "@OrganisationCategory", _OrganisationCategory);
|
||||
if (columnNames.ContainsCI("SportIdPrimary")) AddCommandParameter(dbCommand, "@SportIdPrimary", _SportIdPrimary);
|
||||
if (columnNames.ContainsCI("RegionIdPrimary")) AddCommandParameter(dbCommand, "@RegionIdPrimary", _RegionIdPrimary);
|
||||
if (columnNames.ContainsCI("About")) AddCommandParameter(dbCommand, "@About", _About);
|
||||
if (columnNames.ContainsCI("Facilities")) AddCommandParameter(dbCommand, "@Facilities", _Facilities);
|
||||
if (columnNames.ContainsCI("ContactData")) AddCommandParameter(dbCommand, "@ContactData", _ContactData);
|
||||
if (columnNames.ContainsCI("CountryIso2Code")) AddCommandParameter(dbCommand, "@CountryIso2Code", _CountryIso2Code);
|
||||
if (columnNames.ContainsCI("PhoneMain")) AddCommandParameter(dbCommand, "@PhoneMain", _PhoneMain);
|
||||
if (columnNames.ContainsCI("PhoneAlt")) AddCommandParameter(dbCommand, "@PhoneAlt", _PhoneAlt);
|
||||
@@ -229,6 +244,9 @@ namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
if (columnNames.ContainsCI("OrganisationCategory")) AddCommandParameter(dbCommand, "@OrganisationCategory", _OrganisationCategory);
|
||||
if (columnNames.ContainsCI("SportIdPrimary")) AddCommandParameter(dbCommand, "@SportIdPrimary", _SportIdPrimary);
|
||||
if (columnNames.ContainsCI("RegionIdPrimary")) AddCommandParameter(dbCommand, "@RegionIdPrimary", _RegionIdPrimary);
|
||||
if (columnNames.ContainsCI("About")) AddCommandParameter(dbCommand, "@About", _About);
|
||||
if (columnNames.ContainsCI("Facilities")) AddCommandParameter(dbCommand, "@Facilities", _Facilities);
|
||||
if (columnNames.ContainsCI("ContactData")) AddCommandParameter(dbCommand, "@ContactData", _ContactData);
|
||||
if (columnNames.ContainsCI("CountryIso2Code")) AddCommandParameter(dbCommand, "@CountryIso2Code", _CountryIso2Code);
|
||||
if (columnNames.ContainsCI("PhoneMain")) AddCommandParameter(dbCommand, "@PhoneMain", _PhoneMain);
|
||||
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 Mon 11-Apr-2022 17:51:44
|
||||
// Code generated by Sarand Database Utilities Wed 18-May-2022 18:33:47
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Mon 11-Apr-2022 17:51:44
|
||||
// Code generated by Sarand Database Utilities Wed 18-May-2022 18:33:47
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Mon 11-Apr-2022 17:51:44
|
||||
// Code generated by Sarand Database Utilities Wed 18-May-2022 18:33:47
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Mon 11-Apr-2022 17:51:44
|
||||
// Code generated by Sarand Database Utilities Wed 18-May-2022 18:33:47
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Mon 11-Apr-2022 17:51:44
|
||||
// Code generated by Sarand Database Utilities Wed 18-May-2022 18:33:47
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Mon 11-Apr-2022 17:51:44
|
||||
// Code generated by Sarand Database Utilities Wed 18-May-2022 18:33:47
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Mon 11-Apr-2022 17:51:44
|
||||
// Code generated by Sarand Database Utilities Wed 18-May-2022 18:33:47
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Mon 11-Apr-2022 17:51:44
|
||||
// Code generated by Sarand Database Utilities Wed 18-May-2022 18:33:47
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Mon 11-Apr-2022 17:51:44
|
||||
// Code generated by Sarand Database Utilities Wed 18-May-2022 18:33:47
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Code generated by Sarand Database Utilities Mon 11-Apr-2022 17:51:44
|
||||
// Code generated by Sarand Database Utilities Wed 18-May-2022 18:33:47
|
||||
//---------------------------------------------------------------------------
|
||||
namespace Saxonite.Net.Standard.Dbas.Internal
|
||||
{
|
||||
|
||||
@@ -216,6 +216,9 @@ namespace Saxonite.Net.Standard.Dbas.Mgr
|
||||
dbOrganisation._OrganisationCategory = OrganisationCategoryCodes.GetCodeForType(organisation.OrganisationCategory);
|
||||
dbOrganisation._SportIdPrimary = SysId.ToInt(organisation.SportIdPrimary);
|
||||
dbOrganisation._RegionIdPrimary = SysId.ToInt(organisation.RegionIdPrimary);
|
||||
dbOrganisation._About = StringUtil.EmptyOnNull(organisation.About);
|
||||
dbOrganisation._Facilities = StringUtil.EmptyOnNull(organisation.Facilities);
|
||||
dbOrganisation._ContactData = StringUtil.EmptyOnNull(organisation.ContactData);
|
||||
dbOrganisation._PhoneMain = StringUtil.EmptyOnNull(organisation.PhoneMain);
|
||||
dbOrganisation._PhoneAlt = StringUtil.EmptyOnNull(organisation.PhoneAlt);
|
||||
dbOrganisation._Notes = StringUtil.EmptyOnNull(organisation.Notes);
|
||||
@@ -236,14 +239,15 @@ namespace Saxonite.Net.Standard.Dbas.Mgr
|
||||
//organisation.Id = new SysId(dbOrganisation._Id);
|
||||
//organisation.UserAccountId = new SysId(dbOrganisation._UserAccountId);
|
||||
organisation.Name = dbOrganisation._Name;
|
||||
organisation.PhoneMain = dbOrganisation._PhoneMain;
|
||||
organisation.PhoneAlt = dbOrganisation._PhoneAlt;
|
||||
organisation.OrganisationType = (Sax.OrganisationType)OrganisationTypeCodes.GetTypeForCode(dbOrganisation._OrganisationType);
|
||||
organisation.OrganisationCategory = (Sax.OrganisationCategory)OrganisationCategoryCodes.GetTypeForCode(dbOrganisation._OrganisationCategory);
|
||||
organisation.PhoneMain = dbOrganisation._PhoneMain;
|
||||
organisation.PhoneAlt = dbOrganisation._PhoneAlt;
|
||||
organisation.SportIdPrimary = new SysId(dbOrganisation._SportIdPrimary);
|
||||
organisation.RegionIdPrimary = new SysId(dbOrganisation._RegionIdPrimary);
|
||||
organisation.About = dbOrganisation._About;
|
||||
organisation.Facilities = dbOrganisation._Facilities;
|
||||
organisation.ContactData = dbOrganisation._ContactData;
|
||||
organisation.PhoneMain = dbOrganisation._PhoneMain;
|
||||
organisation.PhoneAlt = dbOrganisation._PhoneAlt;
|
||||
organisation.Notes = dbOrganisation._Notes;
|
||||
organisation.Status = SacsSystem.GetStatusForCode(dbOrganisation._Status);
|
||||
organisation.SetCreateStamp(dbOrganisation._CreateOn, new SysId(dbOrganisation._CreateBy), dbOrganisation._CreateHost);
|
||||
@@ -670,7 +674,7 @@ namespace Saxonite.Net.Standard.Dbas.Mgr
|
||||
queryUserCount.Columns.Add("Count(*)");
|
||||
queryUserCount.Filters.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.UserOrganisation_OrganisationId, aliasUserCount) + "=" + SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.Organisation_Id, aliasOrganisation));
|
||||
queryUserCount.Filters.Add(SaxDbDfn_Core.GetColumnNameQual(SaxDbDfn_Core.ColumnIdx.UserOrganisation_Status, aliasUserCount) + "='" + SacsSystem.GetStatusCode(SaStatus.Active) + "'");
|
||||
query.Columns.Add("(" + queryUserCount.BuildQuery() + ")", colOrganisation_Member_Count);
|
||||
query.Columns.Add("(" + queryUserCount.BuildQuery() + ")", colOrganisation_User_Count);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
@@ -153,8 +153,8 @@
|
||||
<Primary>false</Primary>
|
||||
<Clustered>false</Clustered>
|
||||
<Nullable>false</Nullable>
|
||||
<Pages>0</Pages>
|
||||
<UniqueValues>0</UniqueValues>
|
||||
<Pages>1</Pages>
|
||||
<UniqueValues>5</UniqueValues>
|
||||
<HasColumns>false</HasColumns>
|
||||
<Columns>
|
||||
<DbDfnIndexColumn>
|
||||
@@ -477,7 +477,7 @@
|
||||
<Clustered>false</Clustered>
|
||||
<Nullable>false</Nullable>
|
||||
<Pages>1</Pages>
|
||||
<UniqueValues>23</UniqueValues>
|
||||
<UniqueValues>24</UniqueValues>
|
||||
<HasColumns>false</HasColumns>
|
||||
<Columns>
|
||||
<DbDfnIndexColumn>
|
||||
@@ -931,8 +931,8 @@
|
||||
<Primary>false</Primary>
|
||||
<Clustered>false</Clustered>
|
||||
<Nullable>false</Nullable>
|
||||
<Pages>3</Pages>
|
||||
<UniqueValues>21</UniqueValues>
|
||||
<Pages>4</Pages>
|
||||
<UniqueValues>23</UniqueValues>
|
||||
<HasColumns>false</HasColumns>
|
||||
<Columns>
|
||||
<DbDfnIndexColumn>
|
||||
@@ -1983,7 +1983,7 @@
|
||||
<Clustered>false</Clustered>
|
||||
<Nullable>false</Nullable>
|
||||
<Pages>1</Pages>
|
||||
<UniqueValues>19</UniqueValues>
|
||||
<UniqueValues>25</UniqueValues>
|
||||
<HasColumns>false</HasColumns>
|
||||
<Columns>
|
||||
<DbDfnIndexColumn>
|
||||
@@ -2503,6 +2503,57 @@
|
||||
<Schema>dbo</Schema>
|
||||
<Table>Organisation</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>Organisation</Table>
|
||||
<Pos>8</Pos>
|
||||
<Name>Facilities</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>Organisation</Table>
|
||||
<Pos>9</Pos>
|
||||
<Name>ContactData</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
<DataTypeNative>-9</DataTypeNative>
|
||||
<DataTypeNameNative>nvarchar</DataTypeNameNative>
|
||||
<IsIdentity>false</IsIdentity>
|
||||
<Size>0</Size>
|
||||
<BufferLen>0</BufferLen>
|
||||
<DecimalDigits>0</DecimalDigits>
|
||||
<Nullable>Nullable</Nullable>
|
||||
<IsNullable>true</IsNullable>
|
||||
<Remarks />
|
||||
</DbDfnColumn>
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>Organisation</Table>
|
||||
<Pos>10</Pos>
|
||||
<Name>CountryIso2Code</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -2519,7 +2570,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>Organisation</Table>
|
||||
<Pos>8</Pos>
|
||||
<Pos>11</Pos>
|
||||
<Name>PhoneMain</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -2536,7 +2587,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>Organisation</Table>
|
||||
<Pos>9</Pos>
|
||||
<Pos>12</Pos>
|
||||
<Name>PhoneAlt</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -2553,7 +2604,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>Organisation</Table>
|
||||
<Pos>10</Pos>
|
||||
<Pos>13</Pos>
|
||||
<Name>Notes</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -2570,7 +2621,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>Organisation</Table>
|
||||
<Pos>11</Pos>
|
||||
<Pos>14</Pos>
|
||||
<Name>Flags</Name>
|
||||
<DataType>SmallInt</DataType>
|
||||
<DataTypeName />
|
||||
@@ -2587,7 +2638,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>Organisation</Table>
|
||||
<Pos>12</Pos>
|
||||
<Pos>15</Pos>
|
||||
<Name>Status</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -2604,7 +2655,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>Organisation</Table>
|
||||
<Pos>13</Pos>
|
||||
<Pos>16</Pos>
|
||||
<Name>CreateOn</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
@@ -2621,7 +2672,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>Organisation</Table>
|
||||
<Pos>14</Pos>
|
||||
<Pos>17</Pos>
|
||||
<Name>CreateBy</Name>
|
||||
<DataType>Int</DataType>
|
||||
<DataTypeName />
|
||||
@@ -2638,7 +2689,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>Organisation</Table>
|
||||
<Pos>15</Pos>
|
||||
<Pos>18</Pos>
|
||||
<Name>CreateHost</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -2655,7 +2706,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>Organisation</Table>
|
||||
<Pos>16</Pos>
|
||||
<Pos>19</Pos>
|
||||
<Name>UpdateOn</Name>
|
||||
<DataType>DateTime</DataType>
|
||||
<DataTypeName />
|
||||
@@ -2672,7 +2723,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>Organisation</Table>
|
||||
<Pos>17</Pos>
|
||||
<Pos>20</Pos>
|
||||
<Name>UpdateBy</Name>
|
||||
<DataType>Int</DataType>
|
||||
<DataTypeName />
|
||||
@@ -2689,7 +2740,7 @@
|
||||
<DbDfnColumn>
|
||||
<Schema>dbo</Schema>
|
||||
<Table>Organisation</Table>
|
||||
<Pos>18</Pos>
|
||||
<Pos>21</Pos>
|
||||
<Name>UpdateHost</Name>
|
||||
<DataType>VarChar</DataType>
|
||||
<DataTypeName />
|
||||
@@ -2715,7 +2766,7 @@
|
||||
<Clustered>false</Clustered>
|
||||
<Nullable>false</Nullable>
|
||||
<Pages>1</Pages>
|
||||
<UniqueValues>11</UniqueValues>
|
||||
<UniqueValues>14</UniqueValues>
|
||||
<HasColumns>false</HasColumns>
|
||||
<Columns>
|
||||
<DbDfnIndexColumn>
|
||||
@@ -5325,7 +5376,7 @@
|
||||
<Clustered>false</Clustered>
|
||||
<Nullable>false</Nullable>
|
||||
<Pages>1</Pages>
|
||||
<UniqueValues>36</UniqueValues>
|
||||
<UniqueValues>38</UniqueValues>
|
||||
<HasColumns>false</HasColumns>
|
||||
<Columns>
|
||||
<DbDfnIndexColumn>
|
||||
|
||||
Reference in New Issue
Block a user