Skip to content

Commit

Permalink
Merge pull request #2236 from bcgov/1.10.10
Browse files Browse the repository at this point in the history
1.10.10: Fixed TH-114320, TH-113933, TH-114422 401 login error
  • Loading branch information
bcgov-brwang authored May 10, 2024
2 parents aed97c3 + 774bbf9 commit cdbd925
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 8 deletions.
3 changes: 3 additions & 0 deletions Server/HetsApi/Helpers/UserAccountHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ public static HetUser GetUser(DbAppContext context, string username, string guid
updUser.AppLastUpdateUserGuid = guid;
updUser.AppLastUpdateUserid = username;
updUser.AppLastUpdateTimestamp = DateTime.UtcNow;
updUser.AppCreateTimestamp = updUser.AppCreateTimestamp.ToUniversalTime();
updUser.DbCreateTimestamp = updUser.DbCreateTimestamp.ToUniversalTime();
updUser.DbLastUpdateTimestamp = updUser.DbLastUpdateTimestamp.ToUniversalTime();

context.HetUsers.Update(updUser);

Expand Down
2 changes: 1 addition & 1 deletion Server/HetsApi/HetsApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PropertyGroup>
<VersionPrefix>1.0.0.0</VersionPrefix>
<VersionSuffix>sprint1</VersionSuffix>
<Version>1.10.9.0</Version>
<Version>1.10.10.0</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
4 changes: 2 additions & 2 deletions Server/HetsApi/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"LogoffUrl-Training": "https://logontest.gov.bc.ca/clp-cgi/logoff.cgi?returl=https://trn-hets.th.gov.bc.ca&retnow=1",
"LogoffUrl-UAT": "https://logontest.gov.bc.ca/clp-cgi/logoff.cgi?returl=https://uat-hets.th.gov.bc.ca&retnow=1",
"LogoffUrl-Production": "https://logon.gov.bc.ca/clp-cgi/logoff.cgi?returl=https://hets.th.gov.bc.ca&retnow=1",
"Version-Application": "Release 1.10.9.0",
"Version-Database": "Release 1.10.9.0",
"Version-Application": "Release 1.10.10.0",
"Version-Database": "Release 1.10.10.0",
"Maximum-Blank-Agreements": "3",
"ExceptionDescriptions": {
"HETS-01": "Record not found",
Expand Down
13 changes: 10 additions & 3 deletions Server/HetsData/Repositories/RentalRequestRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,18 @@ public RentalRequestDto GetRecordWithRotationList(int id, SeniorityScoringRules
}
}
}
// TH-112626
// Sorting the RentalRequestRotationList based on Equipment.Seniority
//// TH-112626
//// Sorting the RentalRequestRotationList based on Equipment.Seniority
//var sortedList = request.HetRentalRequestRotationLists
// .OrderByDescending(x => x.Equipment.Seniority)
// .ToList();

// Sorting the RotationList by block number first then by equipment seniority
var sortedList = request.HetRentalRequestRotationLists
.OrderByDescending(x => x.Equipment.Seniority)
.OrderBy(x => x.BlockNumber)
.ThenByDescending(x => x.Equipment.Seniority)
.ToList();

// Updating RotationListSortOrder based on the sorted list
for (int i = 0; i < sortedList.Count; i++)
{
Expand Down
13 changes: 12 additions & 1 deletion client/src/js/views/RentalRequests.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,16 @@ class RentalRequests extends React.Component {
this.setState({ showAddDialog: false });
};


handleNewAddedRequestId = (id) => {
this.setState({ newAddedRequestId: id });
const currentPathname = this.props.location.pathname;
const newUrl = `${currentPathname}/${id}`;
this.props.history.push(newUrl);
};



newRentalAdded = async (rentalRequest) => {
await this.props.dispatch(Log.rentalRequestAdded(rentalRequest));
this.props.history.push(`${Constant.RENTAL_REQUESTS_PATHNAME}/${rentalRequest.id}`);
Expand Down Expand Up @@ -373,7 +383,7 @@ class RentalRequests extends React.Component {
CUSTOM,
]}
/>
<Button id="search-button" variant="primary" type="submit">
<Button id="search-button" variant="primary" type="submit" >
Search
</Button>
<Button className="btn-custom" id="clear-search-button" onClick={this.clearSearch}>
Expand Down Expand Up @@ -477,6 +487,7 @@ class RentalRequests extends React.Component {
viewOnly={this.state.addViewOnly}
onRentalAdded={this.newRentalAdded}
onClose={this.closeAddDialog}
onNewRentalQuestIdGenerated={this.handleNewAddedRequestId}
/>
)}
</div>
Expand Down
3 changes: 2 additions & 1 deletion client/src/js/views/dialogs/RentalRequestsAddDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,9 @@ class RentalRequestsAddDialog extends React.Component {

try {
const response = await dispatch(Api.addRentalRequest(request, this.props.viewOnly));
this.setState({ isSaving: false });
this.setState({ isSaving: false, newAddedRequestId: response.id});
this.props.onRentalAdded(response);
this.props.onNewRentalQuestIdGenerated(response.id);
this.props.onClose();
} catch (error) {
this.setState({ isSaving: false });
Expand Down

0 comments on commit cdbd925

Please sign in to comment.