Skip to content

Commit 1839a7c

Browse files
Merge pull request #197 from Avanade/sprint-43
Sprint 43
2 parents 4beafee + d0ff98d commit 1839a7c

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

src/goapp/controller/authentication/authentication-page-controller.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,16 +141,13 @@ func (a *authenticationPageController) LoginRedirectHandler(w http.ResponseWrite
141141
}
142142

143143
func (a *authenticationPageController) LogoutHandler(w http.ResponseWriter, r *http.Request) {
144-
err := a.Authenticator.ClearFromSession(&w, r, "auth-session")
145-
if err != nil {
146-
http.Error(w, err.Error(), http.StatusInternalServerError)
147-
}
148-
149144
url, err := a.Authenticator.GetLogoutURL()
150145
if err != nil {
151146
http.Error(w, err.Error(), http.StatusInternalServerError)
152147
return
153148
}
154149

150+
_ = a.Authenticator.ClearFromSession(&w, r, "auth-session")
151+
155152
http.Redirect(w, r, url, http.StatusTemporaryRedirect)
156153
}

src/goapp/repository/item/item-repository.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,14 @@ func (r *itemRepository) GetItemById(id string) (*model.Item, error) {
5353
}
5454

5555
item := model.Item{
56-
Id: id,
57-
Application: result[0]["Application"].(string),
58-
Module: result[0]["Module"].(string),
59-
ApproveText: result[0]["ApproveText"].(string),
60-
RejectText: result[0]["RejectText"].(string),
61-
Created: result[0]["Created"].(time.Time).String(),
62-
RequestedBy: result[0]["RequestedBy"].(string),
56+
Id: id,
57+
ApplicationId: result[0]["ApplicationId"].(string),
58+
Application: result[0]["Application"].(string),
59+
Module: result[0]["Module"].(string),
60+
ApproveText: result[0]["ApproveText"].(string),
61+
RejectText: result[0]["RejectText"].(string),
62+
Created: result[0]["Created"].(time.Time).String(),
63+
RequestedBy: result[0]["RequestedBy"].(string),
6364
}
6465

6566
if result[0]["ApproverRemarks"] != nil {

src/goapp/templates/response.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ <h3 class="text-xl mb-7">{{.Data.Subject}}</h3>
175175
<!-- Already processed -->
176176
<div x-show="alreadyProcessed" class="w-full">
177177
<div class="flex w-full">
178-
<div class="flex-auto py-0.5 text-xs/5 text-gray-500"><span class="font-medium text-gray-900">{{.Data.RequestedBy}}</span> {{.ApproverResponse}} the request.</div>
178+
<div class="flex-auto py-0.5 text-xs/5 text-gray-500"><span class="font-medium text-gray-900">{{.Data.RespondedBy}}</span> {{.ApproverResponse}} the request.</div>
179179
<div x-data="{date: new Date('{{.Data.DateResponded}}')}"
180180
x-text="date.toLocaleString('en-US',{dateStyle: 'medium', timeStyle: 'short'})"
181181
class="flex-none py-0.5 text-xs/5 text-gray-500 ml-auto"></div>

src/sqldb/Stored Procedures/PR_Items_Select_ById.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ CREATE PROCEDURE [dbo].[PR_Items_Select_ById]
33
AS
44
SELECT
55
A.[Name] [Application],
6+
dbo.UidToString(A.[Id]) AS [ApplicationId],
67
AM.[Name] [Module], dbo.UidToString(AM.[Id]) [ApplicationModuleId],
78
[Subject], Body, DateSent,
89
DateResponded, IsApproved, ApproverRemarks,

0 commit comments

Comments
 (0)