Lots of work on Positions - checkpoint
This commit is contained in:
@@ -11,9 +11,24 @@ namespace Swarmops.Common.Enums
|
||||
Unknown = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Use the default title for the position type.
|
||||
/// Use the default title for the position type (commercial titles).
|
||||
/// </summary>
|
||||
Default
|
||||
Default,
|
||||
|
||||
/// <summary>
|
||||
/// Use titles that are customized for nonprofit organizations ("secretary general" instead of "ceo", etc).
|
||||
/// </summary>
|
||||
Nonprofit,
|
||||
|
||||
/// <summary>
|
||||
/// Use medieval titles (kind of humorous, not to be taken too seriously).
|
||||
/// </summary>
|
||||
Medieval,
|
||||
|
||||
/// <summary>
|
||||
/// Totally customized and not stock localized - look up in PositionTitlesCustom table
|
||||
/// </summary>
|
||||
Custom
|
||||
|
||||
// Expand with various title names
|
||||
}
|
||||
|
||||
@@ -12,7 +12,41 @@ namespace Swarmops.Common.Enums
|
||||
Unknown = 0,
|
||||
System_SysadminMain,
|
||||
System_SysadminReadWrite,
|
||||
System_SysadminAssistantReadOnly
|
||||
System_SysadminAssistantReadOnly,
|
||||
Strategic_BoardChairperson,
|
||||
Strategic_BoardChairpersonDeputy,
|
||||
Strategic_BoardMember,
|
||||
Strategic_BoardDeputy,
|
||||
Strategic_BoardAssistant,
|
||||
Strategic_Auditor,
|
||||
Strategic_AuditorDeputy,
|
||||
Strategic_AuditorAssistant,
|
||||
Strategic_Observer,
|
||||
Executive_ChiefAdminOfficer,
|
||||
Executive_ChiefExecutiveOfficer,
|
||||
Executive_CeoAssistant,
|
||||
Executive_VicePresident,
|
||||
Executive_ChiefStaff,
|
||||
Executive_ChiefHrOfficer,
|
||||
Executive_HrAssistant,
|
||||
Executive_ChiefFinancialOfficer,
|
||||
Executive_CfoAssistant,
|
||||
Executive_ChiefMarketingOfficer,
|
||||
Executive_MarketingAssistant,
|
||||
Executive_ChiefTechnologyOfficer,
|
||||
Executive_ChiefInformationOfficer,
|
||||
Executive_ChiefOperationsOfficer,
|
||||
Geographic_Leader,
|
||||
Geographic_Deputy,
|
||||
Geographic_Assistant,
|
||||
Geographic_SwarmLeader, /* dotreports to chief of staff */
|
||||
Geographic_SwarmLeaderAssistant,
|
||||
Geographic_InfoLeader, /* dotreports to CIO */
|
||||
Geographic_InfoLeaderAssistant,
|
||||
Geographic_ActivismLeader, /* dotreports to Operations */
|
||||
Geographic_ActivismLeaderAssistant,
|
||||
Geographic_OutreachLeader, /* dotreports to Marketing */
|
||||
Geographic_OutreachLeaderAssistant
|
||||
// ReSharper restore InconsistentNaming
|
||||
}
|
||||
}
|
||||
|
||||
+455
-41
@@ -1,7 +1,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18444
|
||||
// Runtime Version:4.0.30319.34209
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -60,111 +60,525 @@ namespace Swarmops.Logic.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to CEO Assistant.
|
||||
/// </summary>
|
||||
internal static string Position_Executive_CeoAssistant {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Executive_CeoAssistant", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to CEO Assistants.
|
||||
/// </summary>
|
||||
internal static string Position_Executive_CeoAssistant_Plural {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Executive_CeoAssistant_Plural", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to CFO Assistant.
|
||||
/// </summary>
|
||||
internal static string Position_Executive_CfoAssistant {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Executive_CfoAssistant", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to CFO Assistants.
|
||||
/// </summary>
|
||||
internal static string Position_Executive_CfoAssistant_Plural {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Executive_CfoAssistant_Plural", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Chief Executive Officer.
|
||||
/// </summary>
|
||||
internal static string Position_Executive_ChiefExecutiveOfficer {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Executive_ChiefExecutiveOfficer", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Chief Financial Officer.
|
||||
/// </summary>
|
||||
internal static string Position_Executive_ChiefFinancialOfficer {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Executive_ChiefFinancialOfficer", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Chief Human Resources Officer.
|
||||
/// </summary>
|
||||
internal static string Position_Executive_ChiefHrOfficer {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Executive_ChiefHrOfficer", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Chief Information Officer.
|
||||
/// </summary>
|
||||
internal static string Position_Executive_ChiefInformationOfficer {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Executive_ChiefInformationOfficer", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Chief Marketing Officer.
|
||||
/// </summary>
|
||||
internal static string Position_Executive_ChiefMarketingOfficer {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Executive_ChiefMarketingOfficer", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Chief Operations Officer.
|
||||
/// </summary>
|
||||
internal static string Position_Executive_ChiefOperationsOfficer {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Executive_ChiefOperationsOfficer", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Chief of Staff.
|
||||
/// </summary>
|
||||
internal static string Position_Executive_ChiefStaff {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Executive_ChiefStaff", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Chief Technology Officer.
|
||||
/// </summary>
|
||||
internal static string Position_Executive_ChiefTechnologyOfficer {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Executive_ChiefTechnologyOfficer", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Human Resources Assistant.
|
||||
/// </summary>
|
||||
internal static string Position_Executive_HrAssistant {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Executive_HrAssistant", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Human Resources Assistants.
|
||||
/// </summary>
|
||||
internal static string Position_Executive_HrAssistant_Plural {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Executive_HrAssistant_Plural", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Marketing Assistant.
|
||||
/// </summary>
|
||||
internal static string Position_Executive_MarketingAssistant {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Executive_MarketingAssistant", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Marketing Assistants.
|
||||
/// </summary>
|
||||
internal static string Position_Executive_MarketingAssistant_Plural {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Executive_MarketingAssistant_Plural", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to President.
|
||||
/// </summary>
|
||||
internal static string Position_Executive_President {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Executive_President", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Vice President.
|
||||
/// </summary>
|
||||
internal static string Position_Executive_VicePresident {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Executive_VicePresident", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Vice Presidents.
|
||||
/// </summary>
|
||||
internal static string Position_Executive_VicePresident_Plural {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Executive_VicePresident_Plural", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Activism Leader.
|
||||
/// </summary>
|
||||
internal static string Position_Geographic_ActivismLeader {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Geographic_ActivismLeader", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Operations Leader.
|
||||
/// </summary>
|
||||
internal static string Position_Geographic_ActivismLeader_Commercial {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Geographic_ActivismLeader_Commercial", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Activism Assistant.
|
||||
/// </summary>
|
||||
internal static string Position_Geographic_ActivismLeaderAssistant {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Geographic_ActivismLeaderAssistant", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Operations Assistant.
|
||||
/// </summary>
|
||||
internal static string Position_Geographic_ActivismLeaderAssistant_Commercial {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Geographic_ActivismLeaderAssistant_Commercial", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Operations Assistants.
|
||||
/// </summary>
|
||||
internal static string Position_Geographic_ActivismLeaderAssistant_Commercial_Plural {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Geographic_ActivismLeaderAssistant_Commercial_Plural", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Activism Assistants.
|
||||
/// </summary>
|
||||
internal static string Position_Geographic_ActivismLeaderAssistant_Plural {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Geographic_ActivismLeaderAssistant_Plural", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Assistant.
|
||||
/// </summary>
|
||||
internal static string Position_Geographic_Assistant {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Geographic_Assistant", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Assistants.
|
||||
/// </summary>
|
||||
internal static string Position_Geographic_Assistant_Plural {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Geographic_Assistant_Plural", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Deputy.
|
||||
/// </summary>
|
||||
internal static string Position_Geographic_Deputy {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Geographic_Deputy", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Deputies.
|
||||
/// </summary>
|
||||
internal static string Position_Geographic_Deputy_Plural {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Geographic_Deputy_Plural", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Information Leader.
|
||||
/// </summary>
|
||||
internal static string Position_Geographic_InfoLeader {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Geographic_InfoLeader", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Information Assistant.
|
||||
/// </summary>
|
||||
internal static string Position_Geographic_InfoLeaderAssistant {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Geographic_InfoLeaderAssistant", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Information Assistants.
|
||||
/// </summary>
|
||||
internal static string Position_Geographic_InfoLeaderAssistant_Plural {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Geographic_InfoLeaderAssistant_Plural", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Leader.
|
||||
/// </summary>
|
||||
internal static string Position_Geographic_Leader {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Geographic_Leader", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Outreach Leader.
|
||||
/// </summary>
|
||||
internal static string Position_Geographic_OutreachLeader {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Geographic_OutreachLeader", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Outreach Assistant.
|
||||
/// </summary>
|
||||
internal static string Position_Geographic_OutreachLeaderAssistant {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Geographic_OutreachLeaderAssistant", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Outreach Assistants.
|
||||
/// </summary>
|
||||
internal static string Position_Geographic_OutreachLeaderAssistant_Plural {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Geographic_OutreachLeaderAssistant_Plural", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Swarmcare Leader.
|
||||
/// </summary>
|
||||
internal static string Position_Geographic_SwarmLeader {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Geographic_SwarmLeader", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Community Care Leader.
|
||||
/// </summary>
|
||||
internal static string Position_Geographic_SwarmLeader_Commercial {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Geographic_SwarmLeader_Commercial", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Swarmcare Assistant.
|
||||
/// </summary>
|
||||
internal static string Position_Geographic_SwarmLeaderAssistant {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Geographic_SwarmLeaderAssistant", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Community Care Assistant.
|
||||
/// </summary>
|
||||
internal static string Position_Geographic_SwarmLeaderAssistant_Commercial {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Geographic_SwarmLeaderAssistant_Commercial", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Community Care Assistants.
|
||||
/// </summary>
|
||||
internal static string Position_Geographic_SwarmLeaderAssistant_Commercial_Plural {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Geographic_SwarmLeaderAssistant_Commercial_Plural", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Swarmcare Assistants.
|
||||
/// </summary>
|
||||
internal static string Position_Geographic_SwarmLeaderAssistant_Plural {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Geographic_SwarmLeaderAssistant_Plural", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Auditor.
|
||||
/// </summary>
|
||||
internal static string Position_Organization_Auditor {
|
||||
internal static string Position_Strategic_Auditor {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Organization_Auditor", resourceCulture);
|
||||
return ResourceManager.GetString("Position_Strategic_Auditor", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Auditors.
|
||||
/// </summary>
|
||||
internal static string Position_Organization_Auditor_Plural {
|
||||
internal static string Position_Strategic_Auditor_Plural {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Organization_Auditor_Plural", resourceCulture);
|
||||
return ResourceManager.GetString("Position_Strategic_Auditor_Plural", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Auditor Assistant.
|
||||
/// </summary>
|
||||
internal static string Position_Organization_AuditorAssistant {
|
||||
internal static string Position_Strategic_AuditorAssistant {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Organization_AuditorAssistant", resourceCulture);
|
||||
return ResourceManager.GetString("Position_Strategic_AuditorAssistant", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Auditor Assistants.
|
||||
/// </summary>
|
||||
internal static string Position_Organization_AuditorAssistant_Plural {
|
||||
internal static string Position_Strategic_AuditorAssistant_Plural {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Organization_AuditorAssistant_Plural", resourceCulture);
|
||||
return ResourceManager.GetString("Position_Strategic_AuditorAssistant_Plural", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Board Deputy.
|
||||
/// Looks up a localized string similar to Auditor Deputy.
|
||||
/// </summary>
|
||||
internal static string Position_Organization_BoardDeputy {
|
||||
internal static string Position_Strategic_AuditorDeputy {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Organization_BoardDeputy", resourceCulture);
|
||||
return ResourceManager.GetString("Position_Strategic_AuditorDeputy", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Board Deputies.
|
||||
/// Looks up a localized string similar to Auditor Deputies.
|
||||
/// </summary>
|
||||
internal static string Position_Organization_BoardDeputy_Plural {
|
||||
internal static string Position_Strategic_AuditorDeputy_Plural {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Organization_BoardDeputy_Plural", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Board Member.
|
||||
/// </summary>
|
||||
internal static string Position_Organization_BoardMember {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Organization_BoardMember", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Board Members.
|
||||
/// </summary>
|
||||
internal static string Position_Organization_BoardMember_Plural {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Organization_BoardMember_Plural", resourceCulture);
|
||||
return ResourceManager.GetString("Position_Strategic_AuditorDeputy_Plural", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Chairperson of the Board.
|
||||
/// </summary>
|
||||
internal static string Position_Organization_Chairperson {
|
||||
internal static string Position_Strategic_BoardChairperson {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Organization_Chairperson", resourceCulture);
|
||||
return ResourceManager.GetString("Position_Strategic_BoardChairperson", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Chairpeople of the Board.
|
||||
/// </summary>
|
||||
internal static string Position_Organization_Chairperson_Plural {
|
||||
internal static string Position_Strategic_BoardChairperson_Plural {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Organization_Chairperson_Plural", resourceCulture);
|
||||
return ResourceManager.GetString("Position_Strategic_BoardChairperson_Plural", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Chairperson Deputy.
|
||||
/// </summary>
|
||||
internal static string Position_Organization_ChairpersonDeputy {
|
||||
internal static string Position_Strategic_BoardChairpersonDeputy {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Organization_ChairpersonDeputy", resourceCulture);
|
||||
return ResourceManager.GetString("Position_Strategic_BoardChairpersonDeputy", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Chairperson Deputies.
|
||||
/// </summary>
|
||||
internal static string Position_Organization_ChairpersonDeputy_Plural {
|
||||
internal static string Position_Strategic_BoardChairpersonDeputy_Plural {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Organization_ChairpersonDeputy_Plural", resourceCulture);
|
||||
return ResourceManager.GetString("Position_Strategic_BoardChairpersonDeputy_Plural", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Board Deputy.
|
||||
/// </summary>
|
||||
internal static string Position_Strategic_BoardDeputy {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Strategic_BoardDeputy", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Board Deputies.
|
||||
/// </summary>
|
||||
internal static string Position_Strategic_BoardDeputy_Plural {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Strategic_BoardDeputy_Plural", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Board Member.
|
||||
/// </summary>
|
||||
internal static string Position_Strategic_BoardMember {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Strategic_BoardMember", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Board Members.
|
||||
/// </summary>
|
||||
internal static string Position_Strategic_BoardMember_Plural {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Strategic_BoardMember_Plural", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Observer.
|
||||
/// </summary>
|
||||
internal static string Position_Strategic_Observer {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Strategic_Observer", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Observers.
|
||||
/// </summary>
|
||||
internal static string Position_Strategic_Observer_Plural {
|
||||
get {
|
||||
return ResourceManager.GetString("Position_Strategic_Observer_Plural", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -117,42 +117,180 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Position_Organization_Auditor" xml:space="preserve">
|
||||
<data name="Position_Executive_CeoAssistant" xml:space="preserve">
|
||||
<value>CEO Assistant</value>
|
||||
</data>
|
||||
<data name="Position_Executive_CeoAssistant_Plural" xml:space="preserve">
|
||||
<value>CEO Assistants</value>
|
||||
</data>
|
||||
<data name="Position_Executive_CfoAssistant" xml:space="preserve">
|
||||
<value>CFO Assistant</value>
|
||||
</data>
|
||||
<data name="Position_Executive_CfoAssistant_Plural" xml:space="preserve">
|
||||
<value>CFO Assistants</value>
|
||||
</data>
|
||||
<data name="Position_Executive_ChiefExecutiveOfficer" xml:space="preserve">
|
||||
<value>Chief Executive Officer</value>
|
||||
</data>
|
||||
<data name="Position_Executive_ChiefFinancialOfficer" xml:space="preserve">
|
||||
<value>Chief Financial Officer</value>
|
||||
</data>
|
||||
<data name="Position_Executive_ChiefHrOfficer" xml:space="preserve">
|
||||
<value>Chief Human Resources Officer</value>
|
||||
</data>
|
||||
<data name="Position_Executive_ChiefInformationOfficer" xml:space="preserve">
|
||||
<value>Chief Information Officer</value>
|
||||
</data>
|
||||
<data name="Position_Executive_ChiefMarketingOfficer" xml:space="preserve">
|
||||
<value>Chief Marketing Officer</value>
|
||||
</data>
|
||||
<data name="Position_Executive_ChiefOperationsOfficer" xml:space="preserve">
|
||||
<value>Chief Operations Officer</value>
|
||||
</data>
|
||||
<data name="Position_Executive_ChiefStaff" xml:space="preserve">
|
||||
<value>Chief of Staff</value>
|
||||
</data>
|
||||
<data name="Position_Executive_ChiefTechnologyOfficer" xml:space="preserve">
|
||||
<value>Chief Technology Officer</value>
|
||||
</data>
|
||||
<data name="Position_Executive_HrAssistant" xml:space="preserve">
|
||||
<value>Human Resources Assistant</value>
|
||||
</data>
|
||||
<data name="Position_Executive_HrAssistant_Plural" xml:space="preserve">
|
||||
<value>Human Resources Assistants</value>
|
||||
</data>
|
||||
<data name="Position_Executive_MarketingAssistant" xml:space="preserve">
|
||||
<value>Marketing Assistant</value>
|
||||
</data>
|
||||
<data name="Position_Executive_MarketingAssistant_Plural" xml:space="preserve">
|
||||
<value>Marketing Assistants</value>
|
||||
</data>
|
||||
<data name="Position_Executive_President" xml:space="preserve">
|
||||
<value>President</value>
|
||||
</data>
|
||||
<data name="Position_Executive_VicePresident" xml:space="preserve">
|
||||
<value>Vice President</value>
|
||||
</data>
|
||||
<data name="Position_Executive_VicePresident_Plural" xml:space="preserve">
|
||||
<value>Vice Presidents</value>
|
||||
</data>
|
||||
<data name="Position_Geographic_ActivismLeader" xml:space="preserve">
|
||||
<value>Activism Leader</value>
|
||||
</data>
|
||||
<data name="Position_Geographic_ActivismLeaderAssistant" xml:space="preserve">
|
||||
<value>Activism Assistant</value>
|
||||
</data>
|
||||
<data name="Position_Geographic_ActivismLeaderAssistant_Commercial" xml:space="preserve">
|
||||
<value>Operations Assistant</value>
|
||||
</data>
|
||||
<data name="Position_Geographic_ActivismLeaderAssistant_Commercial_Plural" xml:space="preserve">
|
||||
<value>Operations Assistants</value>
|
||||
</data>
|
||||
<data name="Position_Geographic_ActivismLeaderAssistant_Plural" xml:space="preserve">
|
||||
<value>Activism Assistants</value>
|
||||
</data>
|
||||
<data name="Position_Geographic_ActivismLeader_Commercial" xml:space="preserve">
|
||||
<value>Operations Leader</value>
|
||||
</data>
|
||||
<data name="Position_Geographic_Assistant" xml:space="preserve">
|
||||
<value>Assistant</value>
|
||||
</data>
|
||||
<data name="Position_Geographic_Assistant_Plural" xml:space="preserve">
|
||||
<value>Assistants</value>
|
||||
</data>
|
||||
<data name="Position_Geographic_Deputy" xml:space="preserve">
|
||||
<value>Deputy</value>
|
||||
</data>
|
||||
<data name="Position_Geographic_Deputy_Plural" xml:space="preserve">
|
||||
<value>Deputies</value>
|
||||
</data>
|
||||
<data name="Position_Geographic_InfoLeader" xml:space="preserve">
|
||||
<value>Information Leader</value>
|
||||
</data>
|
||||
<data name="Position_Geographic_InfoLeaderAssistant" xml:space="preserve">
|
||||
<value>Information Assistant</value>
|
||||
</data>
|
||||
<data name="Position_Geographic_InfoLeaderAssistant_Plural" xml:space="preserve">
|
||||
<value>Information Assistants</value>
|
||||
</data>
|
||||
<data name="Position_Geographic_Leader" xml:space="preserve">
|
||||
<value>Leader</value>
|
||||
</data>
|
||||
<data name="Position_Geographic_OutreachLeader" xml:space="preserve">
|
||||
<value>Outreach Leader</value>
|
||||
</data>
|
||||
<data name="Position_Geographic_OutreachLeaderAssistant" xml:space="preserve">
|
||||
<value>Outreach Assistant</value>
|
||||
</data>
|
||||
<data name="Position_Geographic_OutreachLeaderAssistant_Plural" xml:space="preserve">
|
||||
<value>Outreach Assistants</value>
|
||||
</data>
|
||||
<data name="Position_Geographic_SwarmLeader" xml:space="preserve">
|
||||
<value>Swarmcare Leader</value>
|
||||
</data>
|
||||
<data name="Position_Geographic_SwarmLeaderAssistant" xml:space="preserve">
|
||||
<value>Swarmcare Assistant</value>
|
||||
</data>
|
||||
<data name="Position_Geographic_SwarmLeaderAssistant_Commercial" xml:space="preserve">
|
||||
<value>Community Care Assistant</value>
|
||||
</data>
|
||||
<data name="Position_Geographic_SwarmLeaderAssistant_Commercial_Plural" xml:space="preserve">
|
||||
<value>Community Care Assistants</value>
|
||||
</data>
|
||||
<data name="Position_Geographic_SwarmLeaderAssistant_Plural" xml:space="preserve">
|
||||
<value>Swarmcare Assistants</value>
|
||||
</data>
|
||||
<data name="Position_Geographic_SwarmLeader_Commercial" xml:space="preserve">
|
||||
<value>Community Care Leader</value>
|
||||
</data>
|
||||
<data name="Position_Strategic_Auditor" xml:space="preserve">
|
||||
<value>Auditor</value>
|
||||
</data>
|
||||
<data name="Position_Organization_AuditorAssistant" xml:space="preserve">
|
||||
<data name="Position_Strategic_AuditorAssistant" xml:space="preserve">
|
||||
<value>Auditor Assistant</value>
|
||||
</data>
|
||||
<data name="Position_Organization_AuditorAssistant_Plural" xml:space="preserve">
|
||||
<data name="Position_Strategic_AuditorAssistant_Plural" xml:space="preserve">
|
||||
<value>Auditor Assistants</value>
|
||||
</data>
|
||||
<data name="Position_Organization_Auditor_Plural" xml:space="preserve">
|
||||
<data name="Position_Strategic_AuditorDeputy" xml:space="preserve">
|
||||
<value>Auditor Deputy</value>
|
||||
</data>
|
||||
<data name="Position_Strategic_AuditorDeputy_Plural" xml:space="preserve">
|
||||
<value>Auditor Deputies</value>
|
||||
</data>
|
||||
<data name="Position_Strategic_Auditor_Plural" xml:space="preserve">
|
||||
<value>Auditors</value>
|
||||
</data>
|
||||
<data name="Position_Organization_BoardDeputy" xml:space="preserve">
|
||||
<value>Board Deputy</value>
|
||||
</data>
|
||||
<data name="Position_Organization_BoardDeputy_Plural" xml:space="preserve">
|
||||
<value>Board Deputies</value>
|
||||
</data>
|
||||
<data name="Position_Organization_BoardMember" xml:space="preserve">
|
||||
<value>Board Member</value>
|
||||
</data>
|
||||
<data name="Position_Organization_BoardMember_Plural" xml:space="preserve">
|
||||
<value>Board Members</value>
|
||||
</data>
|
||||
<data name="Position_Organization_Chairperson" xml:space="preserve">
|
||||
<data name="Position_Strategic_BoardChairperson" xml:space="preserve">
|
||||
<value>Chairperson of the Board</value>
|
||||
</data>
|
||||
<data name="Position_Organization_ChairpersonDeputy" xml:space="preserve">
|
||||
<data name="Position_Strategic_BoardChairpersonDeputy" xml:space="preserve">
|
||||
<value>Chairperson Deputy</value>
|
||||
</data>
|
||||
<data name="Position_Organization_ChairpersonDeputy_Plural" xml:space="preserve">
|
||||
<data name="Position_Strategic_BoardChairpersonDeputy_Plural" xml:space="preserve">
|
||||
<value>Chairperson Deputies</value>
|
||||
</data>
|
||||
<data name="Position_Organization_Chairperson_Plural" xml:space="preserve">
|
||||
<data name="Position_Strategic_BoardChairperson_Plural" xml:space="preserve">
|
||||
<value>Chairpeople of the Board</value>
|
||||
</data>
|
||||
<data name="Position_Strategic_BoardDeputy" xml:space="preserve">
|
||||
<value>Board Deputy</value>
|
||||
</data>
|
||||
<data name="Position_Strategic_BoardDeputy_Plural" xml:space="preserve">
|
||||
<value>Board Deputies</value>
|
||||
</data>
|
||||
<data name="Position_Strategic_BoardMember" xml:space="preserve">
|
||||
<value>Board Member</value>
|
||||
</data>
|
||||
<data name="Position_Strategic_BoardMember_Plural" xml:space="preserve">
|
||||
<value>Board Members</value>
|
||||
</data>
|
||||
<data name="Position_Strategic_Observer" xml:space="preserve">
|
||||
<value>Observer</value>
|
||||
</data>
|
||||
<data name="Position_Strategic_Observer_Plural" xml:space="preserve">
|
||||
<value>Observers</value>
|
||||
</data>
|
||||
<data name="Position_System_SysadminAssistantReadOnly" xml:space="preserve">
|
||||
<value>Sysadmin Assistant (Read-only)</value>
|
||||
</data>
|
||||
|
||||
@@ -36,6 +36,18 @@ namespace Swarmops.Logic.Support
|
||||
return result;
|
||||
}
|
||||
|
||||
public static TPlural FromArray (TSingular[] logicObjectArray)
|
||||
{
|
||||
TPlural result = new TPlural {Capacity = logicObjectArray.Length*11/10};
|
||||
|
||||
foreach (TSingular logicObject in logicObjectArray)
|
||||
{
|
||||
result.Add (logicObject);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public static TPlural FromSingle (TSingular singular)
|
||||
{
|
||||
|
||||
+27
-6
@@ -54,14 +54,35 @@ namespace Swarmops.Logic.Swarm
|
||||
"Can only create system-wide positions (e.g. sysadmin) with this organizationless Position.Create() version.");
|
||||
}
|
||||
|
||||
// Use more general Create() do to the actual work
|
||||
|
||||
return Create (null, level, createdByPerson, createdByPosition, positionType, positionTitle, volunteerable,
|
||||
overridable, reportsTo, dotReportsTo, minCount, maxCount);
|
||||
}
|
||||
|
||||
public static Position Create(Organization organization, PositionLevel level, Person createdByPerson, Position createdByPosition, PositionType positionType,
|
||||
PositionTitle positionTitle, bool volunteerable, bool overridable, Position reportsTo, Position dotReportsTo,
|
||||
int minCount, int maxCount)
|
||||
{
|
||||
if (level == PositionLevel.Geography)
|
||||
{
|
||||
throw new ArgumentException(
|
||||
"Cannot use the geographyless creator to create geography-specific positions.");
|
||||
}
|
||||
|
||||
if (organization == null && level != PositionLevel.SystemWide)
|
||||
{
|
||||
throw new ArgumentException("Cannot use null organization with any other level than PositionLevel.SystemWide");
|
||||
}
|
||||
|
||||
int positionId = SwarmDb.GetDatabaseForWriting()
|
||||
.CreatePosition(
|
||||
PositionLevel.SystemWide, 0 /*organizationId*/, 0 /* geographyId */, 0 /*overridesHigherId */,
|
||||
createdByPerson == null? 0: createdByPerson.Identity, createdByPosition == null? 0: createdByPosition.Identity,
|
||||
positionType.ToString(), positionTitle.ToString(),
|
||||
false /*inheritsDownward*/, volunteerable, overridable,
|
||||
reportsTo == null? 0: reportsTo.Identity,
|
||||
dotReportsTo == null? 0: dotReportsTo.Identity,
|
||||
level, organization == null? 0 : organization.Identity, 0 /* geographyId */, 0 /*overridesHigherId */,
|
||||
createdByPerson == null ? 0 : createdByPerson.Identity, createdByPosition == null ? 0 : createdByPosition.Identity,
|
||||
positionType.ToString(), positionTitle.ToString(),
|
||||
false /*inheritsDownward*/, volunteerable, overridable,
|
||||
reportsTo == null ? 0 : reportsTo.Identity,
|
||||
dotReportsTo == null ? 0 : dotReportsTo.Identity,
|
||||
minCount, maxCount);
|
||||
|
||||
return FromIdentityAggressive(positionId);
|
||||
|
||||
@@ -7,6 +7,7 @@ using NBitcoin.Protocol;
|
||||
using Swarmops.Basic.Types.Swarm;
|
||||
using Swarmops.Common.Enums;
|
||||
using Swarmops.Database;
|
||||
using Swarmops.Logic.Structure;
|
||||
using Swarmops.Logic.Support;
|
||||
using Swarmops.Common.Generics;
|
||||
|
||||
@@ -19,6 +20,16 @@ namespace Swarmops.Logic.Swarm
|
||||
return FromArray(SwarmDb.GetDatabaseForReading().GetPositions (PositionLevel.SystemWide));
|
||||
}
|
||||
|
||||
public static Positions ForOrganization (Organization organization)
|
||||
{
|
||||
return FromArray (SwarmDb.GetDatabaseForReading().GetPositions (organization));
|
||||
}
|
||||
|
||||
public Positions AtLevel (PositionLevel level)
|
||||
{
|
||||
return FromArray (this.Where (position => position.PositionLevel == level).ToArray());
|
||||
}
|
||||
|
||||
public PositionAssignments Assignments
|
||||
{
|
||||
get { return PositionAssignments.ForPositions(this); }
|
||||
@@ -61,6 +72,121 @@ namespace Swarmops.Logic.Swarm
|
||||
}
|
||||
}
|
||||
|
||||
public static void CreateOrganizationDefaultPositions (Organization organization, PositionTitle titleType = PositionTitle.Default)
|
||||
{
|
||||
// Verify this is indeed a bootstrap - must fail if there are already positions at this level
|
||||
|
||||
if (Positions.ForOrganization (organization).Count > 0)
|
||||
{
|
||||
throw new InvalidOperationException("Can't re-initialize organization positions - already initialized");
|
||||
}
|
||||
|
||||
/* STRATEGIC POSITIONS */
|
||||
|
||||
Position chairperson = Position.Create (organization, PositionLevel.OrganizationStrategic, null, null,
|
||||
PositionType.Strategic_BoardChairperson, titleType, false, false, null, null, 1, 1);
|
||||
|
||||
/*Position deputyChairs =*/ Position.Create (organization, PositionLevel.OrganizationStrategic, null, null,
|
||||
PositionType.Strategic_BoardChairpersonDeputy, titleType, false, false, chairperson, null, 0,
|
||||
0);
|
||||
|
||||
/*Position members =*/ Position.Create (organization, PositionLevel.OrganizationStrategic, null, null,
|
||||
PositionType.Strategic_BoardMember, titleType, false, false, null, null, 0, 0);
|
||||
|
||||
/*Position deputies =*/ Position.Create (organization, PositionLevel.OrganizationStrategic, null, null,
|
||||
PositionType.Strategic_BoardDeputy, titleType, false, false, null, null, 0, 0);
|
||||
|
||||
Position auditors = Position.Create (organization, PositionLevel.OrganizationStrategic, null, null,
|
||||
PositionType.Strategic_Auditor, titleType, false, false, null, null, 1, 0);
|
||||
|
||||
/*Position auditorDeputies =*/ Position.Create(organization, PositionLevel.OrganizationStrategic, null, null,
|
||||
PositionType.Strategic_AuditorDeputy, titleType, false, false, auditors, null, 0, 0);
|
||||
|
||||
/*Position auditorAssistants =*/ Position.Create(organization, PositionLevel.OrganizationStrategic, null, null,
|
||||
PositionType.Strategic_AuditorAssistant, titleType, false, false, auditors, null, 0, 0);
|
||||
|
||||
/*Position observers=*/ Position.Create (organization, PositionLevel.OrganizationStrategic, null, null,
|
||||
PositionType.Strategic_Observer, titleType, false, false, null, null, 0, 0);
|
||||
|
||||
|
||||
/* EXECUTIVE POSITIONS (positions at the "Global" geographic level) */
|
||||
|
||||
Position ceo = Position.Create (organization, PositionLevel.OrganizationExecutive, null, null,
|
||||
PositionType.Executive_ChiefExecutiveOfficer, titleType, false, false, null, null, 1, 1);
|
||||
|
||||
/*Position vp =*/ Position.Create(organization, PositionLevel.OrganizationExecutive, null, null,
|
||||
PositionType.Executive_CeoAssistant, titleType, false, false, ceo, null, 0, 0);
|
||||
|
||||
/*Position vp =*/ Position.Create(organization, PositionLevel.OrganizationExecutive, null, null,
|
||||
PositionType.Executive_VicePresident, titleType, false, false, ceo, null, 0, 0);
|
||||
|
||||
/*Position cto =*/
|
||||
Position.Create(organization, PositionLevel.OrganizationExecutive, null, null,
|
||||
PositionType.Executive_ChiefTechnologyOfficer, titleType, false, false, ceo, null, 0, 1);
|
||||
|
||||
Position cmo = Position.Create(organization, PositionLevel.OrganizationExecutive, null, null,
|
||||
PositionType.Executive_ChiefMarketingOfficer, titleType, false, false, ceo, null, 0, 1);
|
||||
|
||||
/*Position cmoAssistant =*/ Position.Create(organization, PositionLevel.OrganizationExecutive, null, null,
|
||||
PositionType.Executive_MarketingAssistant, titleType, false, false, cmo, null, 0, 0);
|
||||
|
||||
Position cfo = Position.Create(organization, PositionLevel.OrganizationExecutive, null, null,
|
||||
PositionType.Executive_ChiefFinancialOfficer, titleType, false, false, ceo, null, 0, 1);
|
||||
|
||||
/*Position cfoAssistant =*/ Position.Create(organization, PositionLevel.OrganizationExecutive, null, null,
|
||||
PositionType.Executive_CfoAssistant, titleType, false, false, cfo, null, 0, 0);
|
||||
|
||||
/*Position cio =*/ Position.Create(organization, PositionLevel.OrganizationExecutive, null, null,
|
||||
PositionType.Executive_ChiefInformationOfficer, titleType, false, false, ceo, null, 0, 1);
|
||||
|
||||
Position coo = Position.Create(organization, PositionLevel.OrganizationExecutive, null, null,
|
||||
PositionType.Executive_ChiefOperationsOfficer, titleType, false, false, ceo, null, 0, 1);
|
||||
|
||||
Position chiefHr = Position.Create(organization, PositionLevel.OrganizationExecutive, null, null,
|
||||
PositionType.Executive_ChiefHrOfficer, titleType, false, false, ceo, null, 0, 1);
|
||||
|
||||
/*Position staffAssistant =*/ Position.Create(organization, PositionLevel.OrganizationExecutive, null, null,
|
||||
PositionType.Executive_HrAssistant, titleType, false, false, chiefHr, null, 0, 0);
|
||||
|
||||
|
||||
/* LOCAL DEFAULT POSITIONS */
|
||||
|
||||
Position localLeader = Position.Create (organization, PositionLevel.GeographyDefault, null, null,
|
||||
PositionType.Geographic_Leader, titleType, true, false, null, null, 1, 1);
|
||||
|
||||
/*Position localDeputies =*/ Position.Create(organization, PositionLevel.GeographyDefault, null, null,
|
||||
PositionType.Geographic_Deputy, titleType, true, false, localLeader, null, 1, 0);
|
||||
|
||||
/*Position localAssistants =*/ Position.Create(organization, PositionLevel.GeographyDefault, null, null,
|
||||
PositionType.Geographic_Assistant, titleType, false, false, localLeader, null, 1, 0);
|
||||
|
||||
Position localOutreachLead = Position.Create(organization, PositionLevel.GeographyDefault, null, null,
|
||||
PositionType.Geographic_OutreachLeader, titleType, true, true, localLeader, cmo, 0, 1);
|
||||
|
||||
/*Position localOutreachAssistant =*/ Position.Create (organization, PositionLevel.GeographyDefault, null, null,
|
||||
PositionType.Geographic_OutreachLeaderAssistant, titleType, true, true, localOutreachLead, null, 0, 0);
|
||||
|
||||
Position localActivismLead = Position.Create (organization, PositionLevel.GeographyDefault, null, null,
|
||||
PositionType.Geographic_ActivismLeader, titleType, true, true, localLeader, coo, 0, 1);
|
||||
|
||||
/*Position localActivismAssistant =*/ Position.Create (organization, PositionLevel.GeographyDefault, null, null,
|
||||
PositionType.Geographic_ActivismLeaderAssistant, titleType, true, true, localActivismLead, null, 0, 0);
|
||||
|
||||
Position localSwarmLead = Position.Create(organization, PositionLevel.GeographyDefault, null, null,
|
||||
PositionType.Geographic_SwarmLeader, titleType, true, true, localLeader, chiefHr, 0, 1);
|
||||
|
||||
/*Position localSwarmLeadAssistant =*/ Position.Create(organization, PositionLevel.GeographyDefault, null, null,
|
||||
PositionType.Geographic_SwarmLeaderAssistant, titleType, true, true, localSwarmLead, null, 0, 0);
|
||||
|
||||
Position localInfoLead = Position.Create(organization, PositionLevel.GeographyDefault, null, null,
|
||||
PositionType.Geographic_InfoLeader, titleType, true, true, localLeader, chiefHr, 0, 1);
|
||||
|
||||
/*Position localInfoLeadAssistant =*/ Position.Create(organization, PositionLevel.GeographyDefault, null, null,
|
||||
PositionType.Geographic_InfoLeaderAssistant, titleType, true, true, localInfoLead, null, 0, 0);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public Tree<Position> Tree { get { return Tree<Position>.FromCollection (this); }}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,11 +20,59 @@ namespace Swarmops.Frontend.Automation
|
||||
JsonPositions rootPositions = new JsonPositions();
|
||||
_customCookieClass = "LocalPosition" + Request["Cookie"]; // may be null and that's ok
|
||||
|
||||
Tree<Position> systemPositions = Positions.ForSystem().Tree;
|
||||
PositionLevel level = (PositionLevel) Enum.Parse (typeof (PositionLevel), Request["Level"]); // may throw on invalid param but so what, that's what should happen anyway
|
||||
|
||||
Response.Output.WriteLine(RecursePositionTree (systemPositions.RootNodes));
|
||||
if (level == PositionLevel.SystemWide)
|
||||
{
|
||||
Tree<Position> systemPositions = Positions.ForSystem().Tree;
|
||||
Response.Output.WriteLine (RecursePositionTree (systemPositions.RootNodes));
|
||||
Response.End();
|
||||
return;
|
||||
}
|
||||
|
||||
else if (level == PositionLevel.OrganizationStrategic)
|
||||
{
|
||||
// If this level does not exist yet for this org, create a starting point
|
||||
|
||||
Positions orgStrategicPositions =
|
||||
Positions.ForOrganization (CurrentOrganization).AtLevel (PositionLevel.OrganizationStrategic);
|
||||
|
||||
if (orgStrategicPositions.Count == 0)
|
||||
{
|
||||
throw new InvalidOperationException("Positions are not initialized or are missing.");
|
||||
}
|
||||
|
||||
Response.Output.WriteLine(RecursePositionTree(orgStrategicPositions.Tree.RootNodes));
|
||||
}
|
||||
|
||||
else if (level == PositionLevel.OrganizationExecutive)
|
||||
{
|
||||
Positions orgExecutivePositions =
|
||||
Positions.ForOrganization(CurrentOrganization).AtLevel(PositionLevel.OrganizationExecutive);
|
||||
|
||||
if (orgExecutivePositions.Count == 0)
|
||||
{
|
||||
throw new InvalidOperationException("Positions are not initialized or are missing.");
|
||||
}
|
||||
|
||||
Response.Output.WriteLine(RecursePositionTree(orgExecutivePositions.Tree.RootNodes));
|
||||
|
||||
}
|
||||
|
||||
else if (level == PositionLevel.GeographyDefault)
|
||||
{
|
||||
Positions positions =
|
||||
Positions.ForOrganization(CurrentOrganization).AtLevel(PositionLevel.GeographyDefault);
|
||||
|
||||
if (positions.Count == 0)
|
||||
{
|
||||
throw new InvalidOperationException("Positions are not initialized or are missing.");
|
||||
}
|
||||
|
||||
Response.Output.WriteLine(RecursePositionTree(positions.Tree.RootNodes)); // TODO: turn off assignability!
|
||||
|
||||
}
|
||||
|
||||
Response.End();
|
||||
}
|
||||
|
||||
private string RecursePositionTree (List<TreeNode<Position>> positionNodes)
|
||||
@@ -46,6 +94,11 @@ namespace Swarmops.Frontend.Automation
|
||||
string action = string.Empty;
|
||||
string assignedName = string.Format("<a positionId='{3}' positionName='{4}' class='{1} LocalAssignPerson'>{2}</a> {0}", Resources.Controls.Swarm.Positions_Vacant, _customCookieClass, Resources.Controls.Swarm.Positions_AssignFirstPerson, position.Identity, JavascriptEscape(position.Localized()));
|
||||
|
||||
if (localizedPositionName == null)
|
||||
{
|
||||
localizedPositionName = @"NULL (" + position.PositionType.ToString() + ")";
|
||||
}
|
||||
|
||||
if (assignments.Count > 0)
|
||||
{
|
||||
assignedName = assignments[0].Person.Canonical;
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
</script>
|
||||
|
||||
<table id="<%=this.ClientID %>_tablePositions" title="" class="easyui-treegrid" style="width:680px;height:600px"
|
||||
url="/Automation/Json-PositionsTree.aspx?Cookie=<%=this.Cookie %>"
|
||||
url="/Automation/Json-PositionsTree.aspx?Level=<%=this.Level%>&GeographyId=<%=this.GeographyId %>&Cookie=<%=this.Cookie %>"
|
||||
rownumbers="false"
|
||||
animate="true"
|
||||
fitColumns="true"
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Swarmops.Common.Enums;
|
||||
|
||||
namespace Swarmops.Frontend.Controls.v5.Swarm
|
||||
{
|
||||
@@ -55,22 +56,11 @@ namespace Swarmops.Frontend.Controls.v5.Swarm
|
||||
|
||||
}
|
||||
|
||||
public RoleLevel Level { get; set; }
|
||||
public PositionLevel Level { get; set; }
|
||||
public int OrganizationId { get; set; }
|
||||
public int GeographyId { get; set; }
|
||||
public string Cookie { get; set; }
|
||||
|
||||
|
||||
public enum RoleLevel
|
||||
{
|
||||
Unknown = 0,
|
||||
Systemwide,
|
||||
Organizationwide,
|
||||
SuborganizationwideDefault,
|
||||
OrganizationTop,
|
||||
SuborganizationTopDefault,
|
||||
GeographicDefault,
|
||||
Geographic
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -449,7 +449,7 @@
|
||||
<UserLevel>4</UserLevel>
|
||||
<Permissions />
|
||||
<ImageUrl>iconshock-group-diversified</ImageUrl>
|
||||
<NavigateUrl>/Pages/v5/Admin/OrgStaff.aspx</NavigateUrl>
|
||||
<NavigateUrl>/Pages/v5/Admin/OrgStaffing.aspx</NavigateUrl>
|
||||
<Type>Link</Type>
|
||||
<Children />
|
||||
</MainMenuItem>
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Master-v5.master" AutoEventWireup="true" CodeFile="OrgStaffing.aspx.cs" Inherits="Swarmops.Frontend.Pages.v5.Admin.OrganizationStaffing" %>
|
||||
<%@ Register tagPrefix="Swarmops5" tagName="AjaxTextBox" src="~/Controls/v5/Base/AjaxTextBox.ascx" %>
|
||||
<%@ Register tagPrefix="Swarmops5" tagName="TreePositions" src="~/Controls/v5/Swarm/TreePositions.ascx" %>
|
||||
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderHead" Runat="Server">
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#divTabs').tabs();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderMain" Runat="Server">
|
||||
<div id="divTabs" class="easyui-tabs" data-options="tabWidth:70,tabHeight:70">
|
||||
<div title="<img src='/Images/Icons/iconshock-group-diversified-64px.png' />">
|
||||
<h2><asp:Label ID="LabelHeaderStrategic" runat="server" /></h2>
|
||||
<Swarmops5:TreePositions ID="TreePositionsStrategic" Level="OrganizationStrategic" runat="server" />
|
||||
</div>
|
||||
<div title="<img src='/Images/Icons/iconshock-group-diversified-64px.png' />">
|
||||
<h2><asp:Label ID="LabelHeaderExecutive" runat="server" /></h2>
|
||||
<Swarmops5:TreePositions ID="TreePositionsExecutive" Level="OrganizationExecutive" runat="server" />
|
||||
</div>
|
||||
<div title="<img src='/Images/Icons/iconshock-group-diversified-64px.png' />">
|
||||
<h2><asp:Label ID="LabelHeaderGeographicDefault" runat="server" /></h2>
|
||||
<Swarmops5:TreePositions ID="TreePositionsGeographic" Level="GeographyDefault" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="PlaceHolderSide" Runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Swarmops.Common.Enums;
|
||||
using Swarmops.Common.Interfaces;
|
||||
using Swarmops.Logic;
|
||||
using Swarmops.Logic.Support;
|
||||
using Swarmops.Logic.Security;
|
||||
using System.Globalization;
|
||||
using System.Web.Services;
|
||||
using System.Text.RegularExpressions;
|
||||
using Swarmops.Frontend.Controls.v5.Base;
|
||||
using Swarmops.Logic.Communications;
|
||||
using Swarmops.Logic.Structure;
|
||||
using Swarmops.Logic.Swarm;
|
||||
|
||||
namespace Swarmops.Frontend.Pages.v5.Admin
|
||||
{
|
||||
public partial class OrganizationStaffing : PageV5Base
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
// HACK: The organization part must be removed once proper access control is in place
|
||||
this.PageAccessRequired = new Access(this.CurrentOrganization, AccessAspect.System, AccessType.Write);
|
||||
this.PageTitle = Resources.Pages.Admin.SystemSettings_PageTitle;
|
||||
this.InfoBoxLiteral = Resources.Pages.Admin.SystemSettings_Info;
|
||||
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
Localize();
|
||||
}
|
||||
|
||||
CheckPositionsPopulated();
|
||||
|
||||
RegisterControl (EasyUIControl.Tabs);
|
||||
RegisterControl (IncludedControl.JsonParameters | IncludedControl.SwitchButton);
|
||||
}
|
||||
|
||||
private void CheckPositionsPopulated()
|
||||
{
|
||||
Positions orgPositions = Positions.ForOrganization(CurrentOrganization);
|
||||
|
||||
if (orgPositions.Count == 0)
|
||||
{
|
||||
// not initalized. Initialize.
|
||||
|
||||
Positions.CreateOrganizationDefaultPositions (CurrentOrganization);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private static string FormatSmtpAccessString (string user, string pass, string host, int port)
|
||||
{
|
||||
string result = host;
|
||||
if (port != 25)
|
||||
{
|
||||
result += ":" + port.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(pass))
|
||||
{
|
||||
user += ":" + pass;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(user))
|
||||
{
|
||||
result = user + "@" + result;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private void Localize()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -30,7 +30,7 @@
|
||||
<div id="divTabs" class="easyui-tabs" data-options="tabWidth:70,tabHeight:70">
|
||||
<div title="<img src='/Images/Icons/iconshock-group-diversified-64px.png' />">
|
||||
<h2><asp:Label ID="LabelHeaderSysops" runat="server" /></h2>
|
||||
<Swarmops5:TreePositions ID="TreePositions" runat="server" />
|
||||
<Swarmops5:TreePositions ID="TreePositions" Level="SystemWide" runat="server" />
|
||||
</div>
|
||||
<div title="<img src='/Images/Icons/iconshock-mail-open-64px.png' />">
|
||||
<h2><asp:Label ID="LabelHeaderCorrespondenceTransmission" runat="server" /></h2>
|
||||
|
||||
Reference in New Issue
Block a user