Skip to content

Commit c4c4c23

Browse files
authored
Merge pull request #2115 from BEXIS2/rc
Rc v4.0.2
2 parents a4b81a1 + 04a83f7 commit c4c4c23

File tree

8 files changed

+41
-11
lines changed

8 files changed

+41
-11
lines changed

Components/AAA/BExIS.Security.Services/Subjects/GroupManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public List<Group> GetGroups(FilterExpression filter, OrderByExpression orderBy,
6262
}
6363
else if (whereClause != null)
6464
{
65-
var filtered = GroupRepository.Query(whereClause);
65+
var filtered = Groups.Where(whereClause);
6666
count = filtered.Count();
6767

6868
return filtered.Skip((pageNumber - 1) * pageSize).Take(pageSize).ToList();

Components/AAA/BExIS.Security.Services/Subjects/SubjectManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public List<Subject> GetSubjects(FilterExpression filter, OrderByExpression orde
4949
{
5050
if (whereClause != null && orderBy != null)
5151
{
52-
var l = SubjectRepository.Query(whereClause);
52+
var l = Subjects.Where(whereClause);
5353
var x = l.OrderBy(orderbyClause);
5454
var y = x.Skip((pageNumber - 1) * pageSize);
5555
var z = y.Take(pageSize);

Components/AAA/BExIS.Security.Services/Subjects/UserManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public List<User> GetUsers(FilterExpression filter, OrderByExpression orderBy, i
5252
{
5353
if (whereClause != null && orderBy != null)
5454
{
55-
var l = UserRepository.Query(whereClause);
55+
var l = Users.Where(whereClause);
5656
var x = l.OrderBy(orderbyClause);
5757
var y = x.Skip((pageNumber - 1) * pageSize);
5858
var z = y.Take(pageSize);

Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Controllers/FormController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public ActionResult LoadMetadataByVersion(long entityId, int version=-1, bool lo
228228

229229
ViewBag.Title = PresentationModel.GetViewTitleForTenant("Edit Metadata", this.Session.GetTenant());
230230
ViewData["Locked"] = locked;
231-
ViewData["ShowOptional"] = false;
231+
ViewData["ShowOptional"] = fromEditMode;
232232
ViewData["EntityId"] = entityId;
233233

234234
// Set dataset Title to Model

Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Models/Metadata/MetadataAttributeModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public object Value
8888
}
8989
}
9090

91-
IsEmpty = global::System.Convert.ChangeType(_value, _value.GetType()) == null || String.IsNullOrEmpty(_value.ToString()) || _value.Equals(DefaultValue) || _value.Equals(FixedValue) ;
91+
IsEmpty = global::System.Convert.ChangeType(_value, _value.GetType()) == null || String.IsNullOrEmpty(_value.ToString()); /*|| _value.Equals(DefaultValue) || _value.Equals(FixedValue)*/ ;
9292
}
9393
}
9494

Console/BExIS.Web.Shell/Areas/DCM/BExIS.Modules.Dcm.UI/Views/Form/_metadataAttributeView.cshtml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,11 @@
143143

144144
<div id="@id" class="metadataAttributeContent" onload="metadataAttributeOnLoad(this, @hasErrors)">
145145

146-
@if (@Model != null && !(!showOptional && Model.IsEmpty && (Model.MinCardinality == 0) && locked))
146+
@if (@Model != null &&
147+
!(
148+
!showOptional &&
149+
(Model.IsEmpty && string.IsNullOrEmpty(Model.FixedValue)) &&
150+
(Model.MinCardinality == 0) && locked))
147151
{
148152
<table>
149153
<tr><td></td><td><div id="help_@idInput" class="help" style="display: none;">@Html.Raw(Model.Discription)</div></td></tr>

Console/BExIS.Web.Shell/Areas/SAM/BExIS.Modules.Sam.UI/Models/UserModels.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ public class ReadUserModel
1919
public string UserName { get; set; }
2020

2121
[JsonProperty("creationDate")]
22-
public DateTimeOffset CreationDate { get; set; }
22+
public DateTime CreationDate { get; set; }
2323

2424
[JsonProperty("modificationDate")]
25-
public DateTimeOffset ModificationDate { get; set; }
25+
public DateTime ModificationDate { get; set; }
2626

2727
public static ReadUserModel Convert(User user)
2828
{
@@ -31,8 +31,8 @@ public static ReadUserModel Convert(User user)
3131
Id = user.Id,
3232
UserName = user.UserName,
3333
Email = user.Email,
34-
CreationDate = DateTimeOffset.Now,
35-
ModificationDate = DateTimeOffset.Now
34+
CreationDate = user.RegistrationDate,
35+
ModificationDate = user.RegistrationDate
3636
};
3737
}
3838
}
@@ -83,7 +83,7 @@ public class UserGridRowModel
8383
public string Name { get; set; }
8484
public string DisplayName { get; set; }
8585
public string IsEmailConfirmed { get; set; }
86-
public DateTimeOffset RegistrationDate { get; set; }
86+
public DateTime RegistrationDate { get; set; }
8787

8888
public static UserGridRowModel Convert(User user)
8989
{

database update scripts/4.0.1-4.0.2.sql

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,32 @@ INSERT INTO public.operations (versionno, extra, module, controller, action, fea
1515
SELECT 1, NULL, 'RPM', 'File', '*', null
1616
WHERE NOT EXISTS (SELECT * FROM public.operations WHERE module='RPM' AND controller='File');
1717

18+
-- set all meanings to variable_templates
19+
INSERT INTO rpm_meanings_variables (variableref, meaningref)
20+
SELECT v.id, m.id
21+
FROM variables v, RPM_MEANINGS M
22+
WHERE v.label = m.name and
23+
v.variablestype = 'VAR_TEMPL' and
24+
NOT EXISTS (
25+
SELECT 1
26+
FROM rpm_meanings_variables mv
27+
WHERE mv.variableref = v.id
28+
AND mv.meaningref = m.id
29+
);
30+
31+
-- set all meanings from template to instance variables
32+
INSERT INTO rpm_meanings_variables (variableref, meaningref)
33+
SELECT v.id, mv.meaningref
34+
FROM variables v, rpm_meanings_variables mv
35+
WHERE v.vartemplateref = mv.variableref and
36+
v.variablestype = 'VAR_INST' and
37+
NOT EXISTS (
38+
SELECT 1
39+
FROM rpm_meanings_variables mv
40+
WHERE mv.variableref = v.id
41+
AND mv.meaningref = mv.meaningref
42+
);
43+
1844
-- BEXIS2 Version Update
1945
INSERT INTO public.versions(
2046
versionno, extra, module, value, date)

0 commit comments

Comments
 (0)