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
46 changes: 24 additions & 22 deletions app/http/endpoints/api/panel/panelcreate.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,29 @@ import (
const freePanelLimit = 3

type panelBody struct {
ChannelId uint64 `json:"channel_id,string"`
MessageId uint64 `json:"message_id,string"`
Title string `json:"title"`
Content string `json:"content"`
Colour uint32 `json:"colour"`
CategoryId uint64 `json:"category_id,string"`
Emoji types.Emoji `json:"emote"`
WelcomeMessage *types.CustomEmbed `json:"welcome_message" validate:"omitempty,dive"`
Mentions []string `json:"mentions"`
WithDefaultTeam bool `json:"default_team"`
Teams []int `json:"teams"`
ImageUrl *string `json:"image_url,omitempty"`
ThumbnailUrl *string `json:"thumbnail_url,omitempty"`
ButtonStyle component.ButtonStyle `json:"button_style,string"`
ButtonLabel string `json:"button_label"`
FormId *int `json:"form_id"`
NamingScheme *string `json:"naming_scheme"`
Disabled bool `json:"disabled"`
ExitSurveyFormId *int `json:"exit_survey_form_id"`
AccessControlList []database.PanelAccessControlRule `json:"access_control_list"`
PendingCategory *uint64 `json:"pending_category,string"`
DeleteMentions bool `json:"delete_mentions"`
ChannelId uint64 `json:"channel_id,string"`
MessageId uint64 `json:"message_id,string"`
Title string `json:"title"`
Content string `json:"content"`
Colour uint32 `json:"colour"`
CategoryId uint64 `json:"category_id,string"`
Emoji types.Emoji `json:"emote"`
WelcomeMessage *types.CustomEmbed `json:"welcome_message" validate:"omitempty,dive"`
Mentions []string `json:"mentions"`
WithDefaultTeam bool `json:"default_team"`
Teams []int `json:"teams"`
ImageUrl *string `json:"image_url,omitempty"`
ThumbnailUrl *string `json:"thumbnail_url,omitempty"`
ButtonStyle component.ButtonStyle `json:"button_style,string"`
ButtonLabel string `json:"button_label"`
FormId *int `json:"form_id"`
NamingScheme *string `json:"naming_scheme"`
Disabled bool `json:"disabled"`
ExitSurveyFormId *int `json:"exit_survey_form_id"`
AccessControlList []database.PanelAccessControlRule `json:"access_control_list"`
PendingCategory *uint64 `json:"pending_category,string"`
DeleteMentions bool `json:"delete_mentions"`
TranscriptChannelId *uint64 `json:"transcript_channel_id,string"`
}

func (p *panelBody) IntoPanelMessageData(customId string, isPremium bool) panelMessageData {
Expand Down Expand Up @@ -235,6 +236,7 @@ func CreatePanel(c *gin.Context) {
ExitSurveyFormId: data.ExitSurveyFormId,
PendingCategory: data.PendingCategory,
DeleteMentions: data.DeleteMentions,
TranscriptChannelId: data.TranscriptChannelId,
}

createOptions := panelCreateOptions{
Expand Down
1 change: 1 addition & 0 deletions app/http/endpoints/api/panel/panelupdate.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ func UpdatePanel(c *gin.Context) {
ExitSurveyFormId: data.ExitSurveyFormId,
PendingCategory: data.PendingCategory,
DeleteMentions: data.DeleteMentions,
TranscriptChannelId: data.TranscriptChannelId,
}

// insert mention data
Expand Down
22 changes: 14 additions & 8 deletions frontend/src/components/manage/PanelCreationForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,20 @@
</div>
</div>
<div class="row">
<div class="col-2">
<Checkbox
label="Delete Mentions (Delete mentions after ticket opening)"
col2={true}
tool
bind:value={data.delete_mentions}
/>
</div>
<ChannelDropdown
withNull
col3
label="Transcript Channel"
allowAnnouncementChannel
{channels}
bind:value={data.transcript_channel_id}
/>
<Checkbox
label="Delete Mentions (Delete mentions after ticket opening)"
col2
tool
bind:value={data.delete_mentions}
/>
</div>
<div class="incomplete-row">
<CategoryDropdown
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ require (
github.com/BurntSushi/toml v1.2.1
github.com/TicketsBot-cloud/archiverclient v0.0.0-20250807224931-e188ad18a850
github.com/TicketsBot-cloud/common v0.0.0-20250509064208-a2d357175463
github.com/TicketsBot-cloud/database v0.0.0-20251003132259-ad2293c1fd51
github.com/TicketsBot-cloud/database v0.0.0-20251005195038-fd63a423fcb7
github.com/TicketsBot-cloud/gdl v0.0.0-20250917180424-569348f7a55b
github.com/TicketsBot-cloud/logarchiver v0.0.0-20250809082842-70aa389bcbdf
github.com/TicketsBot-cloud/worker v0.0.0-20250913112550-8d331a3f89af
Expand Down
8 changes: 2 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,8 @@ github.com/TicketsBot-cloud/archiverclient v0.0.0-20250807224931-e188ad18a850 h1
github.com/TicketsBot-cloud/archiverclient v0.0.0-20250807224931-e188ad18a850/go.mod h1:Mux1bEPpOHwRw1wo6Fa6qJLJH9Erk9qv1yAIfLi1Wmw=
github.com/TicketsBot-cloud/common v0.0.0-20250509064208-a2d357175463 h1:ZO2kw9lpsy4umoWFmAt9WKVFb3WvU5oSif2Yw4K7Lj4=
github.com/TicketsBot-cloud/common v0.0.0-20250509064208-a2d357175463/go.mod h1:PL5j/omFvU0NeyTKCESmOF+3GscaEuM0aqmI4yFcCFY=
github.com/TicketsBot-cloud/database v0.0.0-20250918212912-4cc263bc1b41 h1:X+V7IZtmDbE9h5cGSKnhCuisBFZ14Suzsdjnk8UUN3A=
github.com/TicketsBot-cloud/database v0.0.0-20250918212912-4cc263bc1b41/go.mod h1:LPDEn9e5wccH7rq/pUlVcL3UhyLnnwdM2dhj0tp/ljo=
github.com/TicketsBot-cloud/database v0.0.0-20251003132259-ad2293c1fd51 h1:xBcZ0y3cg+0QVlNdxIV4x3p1gwJaelHmYsKdy5HbppA=
github.com/TicketsBot-cloud/database v0.0.0-20251003132259-ad2293c1fd51/go.mod h1:LPDEn9e5wccH7rq/pUlVcL3UhyLnnwdM2dhj0tp/ljo=
github.com/TicketsBot-cloud/database v0.0.0-20251005195038-fd63a423fcb7 h1:TK9QTv3LeuuMcZMP/MtPsdjPazkj8MmkCRS8AU+idRk=
github.com/TicketsBot-cloud/database v0.0.0-20251005195038-fd63a423fcb7/go.mod h1:LPDEn9e5wccH7rq/pUlVcL3UhyLnnwdM2dhj0tp/ljo=
github.com/TicketsBot-cloud/gdl v0.0.0-20250917180424-569348f7a55b h1:k4kIIhpD3m0tx8Sz8gefZH8DBbuAwbeJJdV0iRr/x5Y=
github.com/TicketsBot-cloud/gdl v0.0.0-20250917180424-569348f7a55b/go.mod h1:CdwBR2egPtxUXjD2CgC9ZwfuB8dz9HPePM8nuG6dt7Y=
github.com/TicketsBot-cloud/logarchiver v0.0.0-20250809082842-70aa389bcbdf h1:InP2ht90XOkLJKLjVrsCYPJunxlLkdsorikgNRk35bQ=
Expand Down Expand Up @@ -274,7 +272,6 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0=
github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=
github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8=
Expand All @@ -295,7 +292,6 @@ github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 h1:DadwsjnMwFjfWc9y5W
github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak=
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
github.com/jackc/pgproto3 v1.1.0 h1:FYYE4yRw+AgI8wXIinMlNjBbp/UitDJwfj5LqqewP1A=
github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78=
github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA=
github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg=
Expand Down