Skip to content
Merged

fixes #196

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,13 @@ func (a *authenticationPageController) LoginRedirectHandler(w http.ResponseWrite
}

func (a *authenticationPageController) LogoutHandler(w http.ResponseWriter, r *http.Request) {
err := a.Authenticator.ClearFromSession(&w, r, "auth-session")
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
}

url, err := a.Authenticator.GetLogoutURL()
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}

_ = a.Authenticator.ClearFromSession(&w, r, "auth-session")

http.Redirect(w, r, url, http.StatusTemporaryRedirect)
}
15 changes: 8 additions & 7 deletions src/goapp/repository/item/item-repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,14 @@ func (r *itemRepository) GetItemById(id string) (*model.Item, error) {
}

item := model.Item{
Id: id,
Application: result[0]["Application"].(string),
Module: result[0]["Module"].(string),
ApproveText: result[0]["ApproveText"].(string),
RejectText: result[0]["RejectText"].(string),
Created: result[0]["Created"].(time.Time).String(),
RequestedBy: result[0]["RequestedBy"].(string),
Id: id,
ApplicationId: result[0]["ApplicationId"].(string),
Application: result[0]["Application"].(string),
Module: result[0]["Module"].(string),
ApproveText: result[0]["ApproveText"].(string),
RejectText: result[0]["RejectText"].(string),
Created: result[0]["Created"].(time.Time).String(),
RequestedBy: result[0]["RequestedBy"].(string),
}

if result[0]["ApproverRemarks"] != nil {
Expand Down
2 changes: 1 addition & 1 deletion src/goapp/templates/response.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ <h3 class="text-xl mb-7">{{.Data.Subject}}</h3>
<!-- Already processed -->
<div x-show="alreadyProcessed" class="w-full">
<div class="flex w-full">
<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>
<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>
<div x-data="{date: new Date('{{.Data.DateResponded}}')}"
x-text="date.toLocaleString('en-US',{dateStyle: 'medium', timeStyle: 'short'})"
class="flex-none py-0.5 text-xs/5 text-gray-500 ml-auto"></div>
Expand Down
1 change: 1 addition & 0 deletions src/sqldb/Stored Procedures/PR_Items_Select_ById.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ CREATE PROCEDURE [dbo].[PR_Items_Select_ById]
AS
SELECT
A.[Name] [Application],
dbo.UidToString(A.[Id]) AS [ApplicationId],
AM.[Name] [Module], dbo.UidToString(AM.[Id]) [ApplicationModuleId],
[Subject], Body, DateSent,
DateResponded, IsApproved, ApproverRemarks,
Expand Down