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
6 changes: 6 additions & 0 deletions app/http/endpoints/api/panel/panelcreate.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ type panelBody struct {
TicketNotificationChannel *uint64 `json:"ticket_notification_channel,string"`
CooldownSeconds int `json:"cooldown_seconds"`
TicketLimit *uint8 `json:"ticket_limit"`
HideCloseButton bool `json:"hide_close_button"`
HideCloseWithReasonButton bool `json:"hide_close_with_reason_button"`
HideClaimButton bool `json:"hide_claim_button"`
}

func (p *panelBody) IntoPanelMessageData(customId string, isPremium bool) panelMessageData {
Expand Down Expand Up @@ -252,6 +255,9 @@ func CreatePanel(c *gin.Context) {
TicketNotificationChannel: data.TicketNotificationChannel,
CooldownSeconds: data.CooldownSeconds,
TicketLimit: data.TicketLimit,
HideCloseButton: data.HideCloseButton,
HideCloseWithReasonButton: data.HideCloseWithReasonButton,
HideClaimButton: data.HideClaimButton,
}

createOptions := panelCreateOptions{
Expand Down
3 changes: 3 additions & 0 deletions app/http/endpoints/api/panel/panelupdate.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,9 @@ func UpdatePanel(c *gin.Context) {
TicketNotificationChannel: data.TicketNotificationChannel,
CooldownSeconds: data.CooldownSeconds,
TicketLimit: data.TicketLimit,
HideCloseButton: data.HideCloseButton,
HideCloseWithReasonButton: data.HideCloseWithReasonButton,
HideClaimButton: data.HideClaimButton,
}

// insert mention data
Expand Down
65 changes: 44 additions & 21 deletions frontend/src/components/manage/PanelCreationForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@
ticket_limit: 0,
ticket_notification_channel: "null",
cooldown_seconds: 0,
hide_close_button: false,
hide_close_with_reason_button: false,
hide_claim_button: false,
welcome_message: {
fields: [],
colour: "#2ECC71",
Expand Down Expand Up @@ -388,6 +391,26 @@
tooltipText="Maximum tickets user can have open at once. Set to 0 to use global setting."
/>
</div>
<div class="row">
<Checkbox
label="Hide Close Button"
col4
tool
bind:value={data.hide_close_button}
/>
<Checkbox
label="Hide Close with Reason Button"
col4
tool
bind:value={data.hide_close_with_reason_button}
/>
<Checkbox
label="Hide Claim Button"
col2
tool
bind:value={data.hide_claim_button}
/>
</div>
<div class="incomplete-row">
<Dropdown col2 label="Form" bind:value={data.form_id}>
<option value="null">None</option>
Expand All @@ -396,27 +419,6 @@
{/each}
</Dropdown>
</div>
<div class="row">
<Dropdown
col2
label="Naming Scheme"
bind:value={data.use_server_default_naming_scheme}
>
<option value={true}>Use Server Default</option>
<option value={false}>Custom</option>
</Dropdown>

{#if !data.use_server_default_naming_scheme}
<Input
col2
label="Custom Naming Scheme"
bind:value={data.naming_scheme}
placeholder="ticket-%id%"
tooltipText="Click here for the full placeholder list"
tooltipLink={`${DOCS_URL}/dashboard/settings/placeholders#custom-naming-scheme-placeholders`}
/>
{/if}
</div>
<div class="row">
<Dropdown
col2
Expand Down Expand Up @@ -445,6 +447,27 @@
{/each}
</Dropdown>
</div>
<div class="row">
<Dropdown
col2
label="Naming Scheme"
bind:value={data.use_server_default_naming_scheme}
>
<option value={true}>Use Server Default</option>
<option value={false}>Custom</option>
</Dropdown>

{#if !data.use_server_default_naming_scheme}
<Input
col2
label="Custom Naming Scheme"
bind:value={data.naming_scheme}
placeholder="ticket-%id%"
tooltipText="Click here for the full placeholder list"
tooltipLink={`${DOCS_URL}/dashboard/settings/placeholders#custom-naming-scheme-placeholders`}
/>
{/if}
</div>
</div>
</Collapsible>

Expand Down
8 changes: 8 additions & 0 deletions frontend/src/components/manage/SettingsCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,14 @@
label="Store Ticket Transcripts"
bind:value={data.store_transcripts}
/>
<Checkbox
label="Hide Close Button"
bind:value={data.hide_close_button}
/>
<Checkbox
label="Hide Close with Reason Button"
bind:value={data.hide_close_with_reason_button}
/>
<Checkbox
label="Hide Claim Button"
bind:value={data.hide_claim_button}
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ toolchain go1.24.2

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

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

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

//replace github.com/TicketsBot-cloud/logarchiver => ../logarchiver
Expand All @@ -22,7 +24,7 @@ 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-20260217113520-9cc86e3b374b
github.com/TicketsBot-cloud/database v0.0.0-20260217185353-d2d1f2ab4e32
github.com/TicketsBot-cloud/gdl v0.0.0-20260213180045-11af01c262ca
github.com/TicketsBot-cloud/logarchiver v0.0.0-20251018211319-7a7df5cacbdc
github.com/TicketsBot-cloud/worker v0.0.0-20251212162840-a9cc9bbf5692
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ 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-20260217113520-9cc86e3b374b h1:nE8VAv13rUPOSMTnULKsuCDHXlWnbst7DmocviUN6I8=
github.com/TicketsBot-cloud/database v0.0.0-20260217113520-9cc86e3b374b/go.mod h1:HQXAgmNSm7/FmBYwcsa6qpZqMrDhbLoEl+AyqFQ+RwY=
github.com/TicketsBot-cloud/database v0.0.0-20260217185353-d2d1f2ab4e32 h1:II0iZ0OO5C6SRyO8nwvb8uvOcmnhl3NKg1N1RVh1pRo=
github.com/TicketsBot-cloud/database v0.0.0-20260217185353-d2d1f2ab4e32/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/logarchiver v0.0.0-20251018211319-7a7df5cacbdc h1:qTLNpCvIqM7UwZ6MdWQ9EztcDsIJfHh+VJdG+ULLEaA=
Expand Down