Skip to content

Commit

Permalink
Added new features / Bug fixed
Browse files Browse the repository at this point in the history
・分類項目にラジオボタンを使用する機能を追加。
・レコード単位の読み取り権限でプロセス等の条件判定が正しく行えない問題を解消。
・完了項目の既定値を無しにした際にプロセスを設置するとエラーが発生する問題を解消。
・組織、グループ、ユーザの取得APIにてTotalCountが正しく取得できない問題を解消。
・PostgreSQLの環境でユーザの選択肢をグループIDで絞り込む機能が動作しない問題を解消。
  • Loading branch information
uchi-ta committed Jan 9, 2023
1 parent f5f2373 commit a386a45
Show file tree
Hide file tree
Showing 37 changed files with 283 additions and 90 deletions.
21 changes: 12 additions & 9 deletions Implem.CodeDefiner/Functions/Rds/Parts/Columns.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ private static bool HasChanges(
{
return true;
}
if (rdsColumn["is_nullable"].ToBool() != columnDefinition.Nullable)
if (rdsColumn["is_nullable"].ToBool() != (sourceTableName.EndsWith("_match")
? columnDefinition.Nullable || columnDefinition.MatchNullable
: columnDefinition.Nullable))
{
return true;
}
Expand All @@ -75,22 +77,21 @@ internal static void CreateColumn(
sqlCreateColumnCollection.Add(Sql_Create(
factory,
columnDefinition,
noIdentity:
sourceTableName.EndsWith("_history")
noIdentity: sourceTableName.EndsWith("_history")
|| sourceTableName.EndsWith("_deleted")
|| sourceTableName.EndsWith("_match"))));
|| sourceTableName.EndsWith("_match"),
match: sourceTableName.EndsWith("_match"))));
sqlStatement.CommandText = sqlStatement.CommandText.Replace(
"#Columns#", sqlCreateColumnCollection.Join(","));
}

private static string Sql_Create(
ISqlObjectFactory factory,
ColumnDefinition columnDefinition,
bool noIdentity)
bool noIdentity,
bool match)
{
var commandText = string.Empty;
commandText = "\"{0}\" {1}".Params(
columnDefinition.ColumnName, columnDefinition.TypeName);
var commandText = "\"{0}\" {1}".Params(columnDefinition.ColumnName, columnDefinition.TypeName);
if (columnDefinition.MaxLength == -1)
{
commandText += "(max)";
Expand All @@ -110,7 +111,9 @@ private static string Sql_Create(
{
commandText += factory.Sqls.GenerateIdentity.Params(columnDefinition.Seed == 0 ? 1 : columnDefinition.Seed);
}
if (columnDefinition.Nullable)
if (match
? columnDefinition.Nullable || columnDefinition.MatchNullable
: columnDefinition.Nullable)
{
commandText += " null";
}
Expand Down
6 changes: 3 additions & 3 deletions Implem.CodeDefiner/Implem.CodeDefiner.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<TargetFramework>net6.0</TargetFramework>
<Copyright>Copyright © Implem Inc 2014 - 2022</Copyright>
<Description>This program does the automatic code creation and merging of existing code based on the definition. Also it will make the configuration change of sql server database.</Description>
<AssemblyVersion>1.3.27.1</AssemblyVersion>
<FileVersion>1.3.27.1</FileVersion>
<Version>1.3.27.1</Version>
<AssemblyVersion>1.3.28.0</AssemblyVersion>
<FileVersion>1.3.28.0</FileVersion>
<Version>1.3.28.0</Version>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>

Expand Down
11 changes: 11 additions & 0 deletions Implem.DefinitionAccessor/Def.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2333,6 +2333,11 @@ public static void SetColumnDefinition()
data.ToBool();
newColumnDefinition.SavedNullable = newColumnDefinition.Nullable;
break;
case "MatchNullable":
newColumnDefinition.MatchNullable = customDefinitionRow.Get("MatchNullable")?.ToBool() ??
data.ToBool();
newColumnDefinition.SavedMatchNullable = newColumnDefinition.MatchNullable;
break;
case "Default":
newColumnDefinition.Default = customDefinitionRow.Get("Default")?.ToString() ??
data.ToString();
Expand Down Expand Up @@ -2826,6 +2831,7 @@ private static void SetColumnTable(ColumnDefinition definition, XlsRow definitio
if (definitionRow.ContainsKey("Ix5")) { definition.Ix5 = definitionRow["Ix5"].ToInt(); definition.SavedIx5 = definition.Ix5; }
if (definitionRow.ContainsKey("Ix5OrderBy")) { definition.Ix5OrderBy = definitionRow["Ix5OrderBy"].ToString(); definition.SavedIx5OrderBy = definition.Ix5OrderBy; }
if (definitionRow.ContainsKey("Nullable")) { definition.Nullable = definitionRow["Nullable"].ToBool(); definition.SavedNullable = definition.Nullable; }
if (definitionRow.ContainsKey("MatchNullable")) { definition.MatchNullable = definitionRow["MatchNullable"].ToBool(); definition.SavedMatchNullable = definition.MatchNullable; }
if (definitionRow.ContainsKey("Default")) { definition.Default = definitionRow["Default"].ToString(); definition.SavedDefault = definition.Default; }
if (definitionRow.ContainsKey("DefaultCs")) { definition.DefaultCs = definitionRow["DefaultCs"].ToString(); definition.SavedDefaultCs = definition.DefaultCs; }
if (definitionRow.ContainsKey("DefaultNotNull")) { definition.DefaultNotNull = definitionRow["DefaultNotNull"].ToBool(); definition.SavedDefaultNotNull = definition.DefaultNotNull; }
Expand Down Expand Up @@ -5626,6 +5632,7 @@ public static void SetColumnDefinitionOption(
case "Ix5": columnDefinition.Ix5 = optionValue.ToInt(); break;
case "Ix5OrderBy": columnDefinition.Ix5OrderBy = optionValue.ToString(); break;
case "Nullable": columnDefinition.Nullable = optionValue.ToBool(); break;
case "MatchNullable": columnDefinition.MatchNullable = optionValue.ToBool(); break;
case "Default": columnDefinition.Default = optionValue.ToString(); break;
case "DefaultCs": columnDefinition.DefaultCs = optionValue.ToString(); break;
case "DefaultNotNull": columnDefinition.DefaultNotNull = optionValue.ToBool(); break;
Expand Down Expand Up @@ -8148,6 +8155,7 @@ public class ColumnDefinition
public int Ix5; public int SavedIx5;
public string Ix5OrderBy; public string SavedIx5OrderBy;
public bool Nullable; public bool SavedNullable;
public bool MatchNullable; public bool SavedMatchNullable;
public string Default; public string SavedDefault;
public string DefaultCs; public string SavedDefaultCs;
public bool DefaultNotNull; public bool SavedDefaultNotNull;
Expand Down Expand Up @@ -8287,6 +8295,7 @@ public ColumnDefinition(Dictionary<string, string> propertyCollection)
if (propertyCollection.ContainsKey("Ix5")) Ix5 = propertyCollection["Ix5"].ToInt(); else Ix5 = 0;
if (propertyCollection.ContainsKey("Ix5OrderBy")) Ix5OrderBy = propertyCollection["Ix5OrderBy"].ToString(); else Ix5OrderBy = string.Empty;
if (propertyCollection.ContainsKey("Nullable")) Nullable = propertyCollection["Nullable"].ToBool(); else Nullable = false;
if (propertyCollection.ContainsKey("MatchNullable")) MatchNullable = propertyCollection["MatchNullable"].ToBool(); else MatchNullable = false;
if (propertyCollection.ContainsKey("Default")) Default = propertyCollection["Default"].ToString(); else Default = string.Empty;
if (propertyCollection.ContainsKey("DefaultCs")) DefaultCs = propertyCollection["DefaultCs"].ToString(); else DefaultCs = string.Empty;
if (propertyCollection.ContainsKey("DefaultNotNull")) DefaultNotNull = propertyCollection["DefaultNotNull"].ToBool(); else DefaultNotNull = false;
Expand Down Expand Up @@ -8426,6 +8435,7 @@ public object this[string key]
case "Ix5": return Ix5;
case "Ix5OrderBy": return Ix5OrderBy;
case "Nullable": return Nullable;
case "MatchNullable": return MatchNullable;
case "Default": return Default;
case "DefaultCs": return DefaultCs;
case "DefaultNotNull": return DefaultNotNull;
Expand Down Expand Up @@ -8565,6 +8575,7 @@ public void RestoreBySavedMemory()
Ix5 = SavedIx5;
Ix5OrderBy = SavedIx5OrderBy;
Nullable = SavedNullable;
MatchNullable = SavedMatchNullable;
Default = SavedDefault;
DefaultCs = SavedDefaultCs;
DefaultNotNull = SavedDefaultNotNull;
Expand Down
6 changes: 3 additions & 3 deletions Implem.DefinitionAccessor/Implem.DefinitionAccessor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Copyright>Copyright © Implem Inc 2014 - 2022</Copyright>
<AssemblyVersion>1.3.27.1</AssemblyVersion>
<FileVersion>1.3.27.1</FileVersion>
<Version>1.3.27.1</Version>
<AssemblyVersion>1.3.28.0</AssemblyVersion>
<FileVersion>1.3.28.0</FileVersion>
<Version>1.3.28.0</Version>
<Nullable>disable</Nullable>
</PropertyGroup>

Expand Down
6 changes: 3 additions & 3 deletions Implem.DisplayAccessor/Implem.DisplayAccessor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Copyright>Copyright © Implem Inc 2014 - 2022</Copyright>
<AssemblyVersion>1.3.27.1</AssemblyVersion>
<FileVersion>1.3.27.1</FileVersion>
<Version>1.3.27.1</Version>
<AssemblyVersion>1.3.28.0</AssemblyVersion>
<FileVersion>1.3.28.0</FileVersion>
<Version>1.3.28.0</Version>
<Nullable>disable</Nullable>
</PropertyGroup>

Expand Down
6 changes: 3 additions & 3 deletions Implem.Factory/Implem.Factory.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Copyright>Copyright © Implem Inc 2014 - 2022</Copyright>
<AssemblyVersion>1.3.27.1</AssemblyVersion>
<FileVersion>1.3.27.1</FileVersion>
<Version>1.3.27.1</Version>
<AssemblyVersion>1.3.28.0</AssemblyVersion>
<FileVersion>1.3.28.0</FileVersion>
<Version>1.3.28.0</Version>
<Nullable>disable</Nullable>
</PropertyGroup>

Expand Down
6 changes: 3 additions & 3 deletions Implem.Libraries/Implem.Libraries.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Copyright>Copyright © Implem Inc 2014 - 2022</Copyright>
<AssemblyVersion>1.3.27.1</AssemblyVersion>
<FileVersion>1.3.27.1</FileVersion>
<Version>1.3.27.1</Version>
<AssemblyVersion>1.3.28.0</AssemblyVersion>
<FileVersion>1.3.28.0</FileVersion>
<Version>1.3.28.0</Version>
<Nullable>disable</Nullable>
</PropertyGroup>

Expand Down
6 changes: 3 additions & 3 deletions Implem.ParameterAccessor/Implem.ParameterAccessor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Copyright>Copyright © Implem Inc 2014 - 2022</Copyright>
<AssemblyVersion>1.3.27.1</AssemblyVersion>
<FileVersion>1.3.27.1</FileVersion>
<Version>1.3.27.1</Version>
<AssemblyVersion>1.3.28.0</AssemblyVersion>
<FileVersion>1.3.28.0</FileVersion>
<Version>1.3.28.0</Version>
<Nullable>disable</Nullable>
</PropertyGroup>

Expand Down
3 changes: 2 additions & 1 deletion Implem.Pleasanter.sln
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,14 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CICD", "CICD", "{EDD4BA11-3C06-4DE2-82CA-D0B945EE21E6}"
ProjectSection(SolutionItems) = preProject
.github\workflows\CI.yaml = .github\workflows\CI.yaml
.github\workflows\xUnit.yaml = .github\workflows\xUnit.yaml
EndProjectSection
EndProject
Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{10984740-E12C-427F-A980-0100734AE1B9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Implem.PleasanterTest", "Implem.PleasanterTest\Implem.PleasanterTest.csproj", "{2563902C-E1D2-4ED7-9B1B-B836C485267A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Implem.Plugins", "Implem.Plugins\Implem.Plugins.csproj", "{DB7A8513-48C4-4226-92F9-60FD4DB90DD8}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Implem.Plugins", "Implem.Plugins\Implem.Plugins.csproj", "{DB7A8513-48C4-4226-92F9-60FD4DB90DD8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
{
var where = view.Where(
context: context,
ss: ss)
ss: ss,
checkPermission: false)
.#TableName#_Creator(context.UserId);
var join = ss.MatchJoin(
context: context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"TypeCs": "CompletionTime",
"RecordingData": ".Value",
"Ix4": "3",
"MatchNullable": true,
"Required": "1",
"SearchIndexPriority": "200",
"ByForm": "new CompletionTime(context: context, ss: ss, value: value.ToDateTime(), status: Status, byForm: true); ProgressRate.CompletionTime = CompletionTime.Value",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"Ix5": "int",
"Ix5OrderBy": "string",
"Nullable": "bool",
"MatchNullable": "bool",
"Default": "string",
"DefaultCs": "string",
"DefaultNotNull": "bool",
Expand Down
33 changes: 33 additions & 0 deletions Implem.Pleasanter/App_Data/Displays/DropDownList.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"Id": "DropDownList",
"Type": 110,
"Languages": [
{
"Body": "drop-down list"
},
{
"Language": "zh",
"Body": "下拉列表"
},
{
"Language": "ja",
"Body": "ドロップダウンリスト"
},
{
"Language": "de",
"Body": "Dropdown-Liste"
},
{
"Language": "ko",
"Body": "드롭 다운 목록"
},
{
"Language": "es",
"Body": "la lista desplegable"
},
{
"Language": "vn",
"Body": "danh sách thả xuống"
}
]
}
33 changes: 33 additions & 0 deletions Implem.Pleasanter/App_Data/Displays/RadioButton.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"Id": "RadioButton",
"Type": 110,
"Languages": [
{
"Body": "Radio button"
},
{
"Language": "zh",
"Body": "单选按钮"
},
{
"Language": "ja",
"Body": "ラジオボタン"
},
{
"Language": "de",
"Body": "Radio knopf"
},
{
"Language": "ko",
"Body": "라디오 버튼"
},
{
"Language": "es",
"Body": "Boton de radio"
},
{
"Language": "vn",
"Body": "Nút radio"
}
]
}
6 changes: 3 additions & 3 deletions Implem.Pleasanter/Implem.Pleasanter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<Copyright>Copyright © Implem Inc 2014 - 2022</Copyright>
<Description>Business application platform</Description>
<AssemblyName>Implem.Pleasanter</AssemblyName>
<AssemblyVersion>1.3.27.1</AssemblyVersion>
<FileVersion>1.3.27.1</FileVersion>
<Version>1.3.27.1</Version>
<AssemblyVersion>1.3.28.0</AssemblyVersion>
<FileVersion>1.3.28.0</FileVersion>
<Version>1.3.28.0</Version>
<Nullable>disable</Nullable>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
Expand Down
25 changes: 13 additions & 12 deletions Implem.Pleasanter/Libraries/HtmlParts/HtmlControls.cs
Original file line number Diff line number Diff line change
Expand Up @@ -508,18 +508,17 @@ public static HtmlBuilder RadioButtons(
{
optionCollection
.Select((o, i) => new { Option = o, Index = i })
.ForEach(data => hb
.Input(attributes: new HtmlAttributes()
.Id(name + data.Index)
.Name(name + data.Index)
.Class(Css.Class("control-radio", controlCss))
.Type("radio")
.Value(data.Option.Key)
.Checked(data.Option.Key == selectedValue))
.Label(
attributes: new HtmlAttributes().For(name + data.Index),
action: () => hb
.Text(data.Option.Value.Text)));
.ForEach(data => hb.Label(
attributes: new HtmlAttributes().For(name + data.Index),
action: () => hb
.Input(attributes: new HtmlAttributes()
.Id(name + data.Index)
.Name(name)
.Class(Css.Class("control-radio", controlCss))
.Type("radio")
.Value(data.Option.Key)
.Checked(data.Option.Key == selectedValue))
.Text(data.Option.Value.Text)));
}
return hb;
}
Expand Down Expand Up @@ -734,6 +733,7 @@ public static HtmlBuilder Hidden(
string css = null,
string value = null,
string rawValue = null,
bool validateRequired = false,
string action = null,
string method = null,
bool alwaysSend = false,
Expand All @@ -747,6 +747,7 @@ public static HtmlBuilder Hidden(
.Type("hidden")
.Value(value)
.RawValue(rawValue)
.DataValidateRequired(validateRequired)
.DataAction(action)
.DataMethod(method)
.DataAlwaysSend(alwaysSend))
Expand Down
Loading

0 comments on commit a386a45

Please sign in to comment.