Skip to content
Merged
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
26 changes: 14 additions & 12 deletions app/http/endpoints/api/transcripts/queryoptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type wrappedQueryOptions struct {
ClosedById uint64 `json:"closed_by_id"`
ClaimedById uint64 `json:"claimed_by_id"`
LabelIds []int `json:"label_ids"`
CloseReason string `json:"close_reason"`
}

// UnmarshalJSON dynamically handles both string and number types, treating empty strings as 0
Expand Down Expand Up @@ -140,18 +141,19 @@ func (o *wrappedQueryOptions) toQueryOptions(guildId uint64) (database.TicketQue
}

opts := database.TicketQueryOptions{
Id: o.Id,
GuildId: guildId,
UserIds: userIds,
Open: utils.BoolPtr(false),
PanelId: o.PanelId,
Rating: o.Rating,
ClosedById: o.ClosedById,
ClaimedById: o.ClaimedById,
LabelIds: o.LabelIds,
Order: database.OrderTypeDescending,
Limit: pageLimit,
Offset: offset,
Id: o.Id,
GuildId: guildId,
UserIds: userIds,
Open: utils.BoolPtr(false),
PanelId: o.PanelId,
Rating: o.Rating,
ClosedById: o.ClosedById,
ClaimedById: o.ClaimedById,
LabelIds: o.LabelIds,
CloseReasonSearch: o.CloseReason,
Order: database.OrderTypeDescending,
Limit: pageLimit,
Offset: offset,
}
return opts, nil
}
Expand Down
14 changes: 14 additions & 0 deletions frontend/src/views/Transcripts.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
let panels = [];
let selectedPanel;

// Close reason filter
let closeReasonSearch = "";

// Labels
let labels = [];
let selectedLabelIds = [];
Expand Down Expand Up @@ -273,6 +276,10 @@
settings.label_ids = selectedLabelIds;
}

if (closeReasonSearch) {
settings.close_reason = closeReasonSearch;
}

return settings;
}

Expand Down Expand Up @@ -506,6 +513,13 @@
on:input={handleInputClaimedById}
bind:value={filterSettings.claimedById}
/>

<Input
col4="true"
label="Close Reason"
placeholder="Search close reasons..."
bind:value={closeReasonSearch}
/>
</div>

{#if labels.length > 0}
Expand Down
14 changes: 6 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/TicketsBot-cloud/dashboard

go 1.24.0

toolchain go1.24.2
go 1.25.0

//replace github.com/TicketsBot-cloud/database => ../database

Expand All @@ -22,10 +20,10 @@ require (
github.com/BurntSushi/toml v1.2.1
github.com/TicketsBot-cloud/archiverclient v0.0.0-20251015181023-f0b66a074704
github.com/TicketsBot-cloud/common v0.0.0-20260210203202-54154661338e
github.com/TicketsBot-cloud/database v0.0.0-20260224195559-d1e01011ada7
github.com/TicketsBot-cloud/gdl v0.0.0-20260213180045-11af01c262ca
github.com/TicketsBot-cloud/database v0.0.0-20260306193605-6370670408d6
github.com/TicketsBot-cloud/gdl v0.0.0-20260306134952-cccb0116fef6
github.com/TicketsBot-cloud/logarchiver v0.0.0-20251018211319-7a7df5cacbdc
github.com/TicketsBot-cloud/worker v0.0.0-20251212162840-a9cc9bbf5692
github.com/TicketsBot-cloud/worker v0.0.0-20260301212853-f5f9e1ebbfc2
github.com/apex/log v1.1.2
github.com/caarlos0/env/v11 v11.2.2
github.com/getsentry/sentry-go v0.33.0
Expand All @@ -47,7 +45,7 @@ require (
github.com/penglongli/gin-metrics v0.1.10
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.22.0
github.com/sirupsen/logrus v1.9.3
github.com/sirupsen/logrus v1.9.4
github.com/stretchr/testify v1.10.0
github.com/weppos/publicsuffix-go v0.20.0
go.uber.org/zap v1.27.1
Expand Down Expand Up @@ -137,7 +135,7 @@ require (
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/arch v0.17.0 // indirect
golang.org/x/crypto v0.48.0 // indirect
golang.org/x/exp v0.0.0-20251209150349-8475f28825e9 // indirect
golang.org/x/exp v0.0.0-20260218203240-3dfff04db8fa // indirect
golang.org/x/net v0.49.0 // indirect
golang.org/x/sys v0.41.0 // indirect
golang.org/x/term v0.40.0 // indirect
Expand Down
21 changes: 10 additions & 11 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ github.com/TicketsBot-cloud/archiverclient v0.0.0-20251015181023-f0b66a074704 h1
github.com/TicketsBot-cloud/archiverclient v0.0.0-20251015181023-f0b66a074704/go.mod h1:Mux1bEPpOHwRw1wo6Fa6qJLJH9Erk9qv1yAIfLi1Wmw=
github.com/TicketsBot-cloud/common v0.0.0-20260210203202-54154661338e h1:nFKV7yEm8MWbCP7dtsJ88+agcxDUD0YKIotVHMVvytw=
github.com/TicketsBot-cloud/common v0.0.0-20260210203202-54154661338e/go.mod h1:tGrTHFz09OM3eDWF+62hIi9ELpT4igCFi868FKSvKBg=
github.com/TicketsBot-cloud/database v0.0.0-20260224195559-d1e01011ada7 h1:OBjtVnQ+h6Hec6psRgClafcA32y2xYImlgyBu/eIhDM=
github.com/TicketsBot-cloud/database v0.0.0-20260224195559-d1e01011ada7/go.mod h1:HQXAgmNSm7/FmBYwcsa6qpZqMrDhbLoEl+AyqFQ+RwY=
github.com/TicketsBot-cloud/gdl v0.0.0-20260213180045-11af01c262ca h1:/HRqcgOPfv6d9NzE6CqHXN4U1QgElyJ9DcxNNT8kV6g=
github.com/TicketsBot-cloud/gdl v0.0.0-20260213180045-11af01c262ca/go.mod h1:CdwBR2egPtxUXjD2CgC9ZwfuB8dz9HPePM8nuG6dt7Y=
github.com/TicketsBot-cloud/database v0.0.0-20260306193605-6370670408d6 h1:uj6sFHKmM9DheqmCzs6pQzIdDMguZTdLd2URC7/UDAA=
github.com/TicketsBot-cloud/database v0.0.0-20260306193605-6370670408d6/go.mod h1:HQXAgmNSm7/FmBYwcsa6qpZqMrDhbLoEl+AyqFQ+RwY=
github.com/TicketsBot-cloud/gdl v0.0.0-20260306134952-cccb0116fef6 h1:ucG0xLPt7xixW7/LvL0hXDBDouDRS1Nf+77qP8iJ/X0=
github.com/TicketsBot-cloud/gdl v0.0.0-20260306134952-cccb0116fef6/go.mod h1:CdwBR2egPtxUXjD2CgC9ZwfuB8dz9HPePM8nuG6dt7Y=
github.com/TicketsBot-cloud/logarchiver v0.0.0-20251018211319-7a7df5cacbdc h1:qTLNpCvIqM7UwZ6MdWQ9EztcDsIJfHh+VJdG+ULLEaA=
github.com/TicketsBot-cloud/logarchiver v0.0.0-20251018211319-7a7df5cacbdc/go.mod h1:pZqkzPNNTqnwKZvCT8kCaTHxrG7HJbxZV83S0p7mmzM=
github.com/TicketsBot-cloud/worker v0.0.0-20251212162840-a9cc9bbf5692 h1:80COkRlCghOngYJYHE6lyxQteldz30LpEfjxoPrFlxM=
github.com/TicketsBot-cloud/worker v0.0.0-20251212162840-a9cc9bbf5692/go.mod h1:mL0jcnGqmNZEGw2M6IZIgiX7rkEYj26IF5EglEwVGYY=
github.com/TicketsBot-cloud/worker v0.0.0-20260301212853-f5f9e1ebbfc2 h1:mFNFfu/blbdHDvlG4b/gtEMDx+7RufpTARAOjzwcxEs=
github.com/TicketsBot-cloud/worker v0.0.0-20260301212853-f5f9e1ebbfc2/go.mod h1:XwwzC6kkENskFCEM+X8F2PSQmMqfqocaFrJBVynFz1I=
github.com/TicketsBot/common v0.0.0-20241117150316-ff54c97b45c1 h1:FqC1KGOsmB+ikvbmDkyNQU6bGUWyfYq8Ip9r4KxTveY=
github.com/TicketsBot/common v0.0.0-20241117150316-ff54c97b45c1/go.mod h1:N7zwetwx8B3RK/ZajWwMroJSyv2ZJ+bIOZWv/z8DhaM=
github.com/TicketsBot/ttlcache v1.6.1-0.20200405150101-acc18e37b261 h1:NHD5GB6cjlkpZFjC76Yli2S63/J2nhr8MuE6KlYJpQM=
Expand Down Expand Up @@ -505,8 +505,8 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w=
github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g=
github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM=
github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM=
github.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs=
Expand Down Expand Up @@ -622,8 +622,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
golang.org/x/exp v0.0.0-20251209150349-8475f28825e9 h1:MDfG8Cvcqlt9XXrmEiD4epKn7VJHZO84hejP9Jmp0MM=
golang.org/x/exp v0.0.0-20251209150349-8475f28825e9/go.mod h1:EPRbTFwzwjXj9NpYyyrvenVh9Y+GFeEvMNh7Xuz7xgU=
golang.org/x/exp v0.0.0-20260218203240-3dfff04db8fa h1:Zt3DZoOFFYkKhDT3v7Lm9FDMEV06GpzjG2jrqW+QTE0=
golang.org/x/exp v0.0.0-20260218203240-3dfff04db8fa/go.mod h1:K79w1Vqn7PoiZn+TkNpx3BUWUQksGO3JcVX6qIjytmA=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
Expand Down Expand Up @@ -759,7 +759,6 @@ golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
Expand Down