Skip to content

Commit

Permalink
Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertGrubb committed Sep 6, 2024
1 parent 0580862 commit c85fc71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 125 deletions.
126 changes: 2 additions & 124 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,135 +30,13 @@ If you need any support, feel free to reach out to us via our Discord: https://d
- Run the `__install/database.sql` file in your server's database.
- Download the main branch and drop the package into your resources folder and remember to `ensure ir8-tickets` after `ox_lib` and `oxmysql`
- Add the permissions principal to your `server.cfg`:
- Be sure to open `/shared/config.lua` and set your framework and any other settings you may need to alter.

```
# Ticket Administration Ace
add_ace group.admin ticket.admin allow
```

### Configuration

```
------------------------------------------------------------
-- Ticket Manager Configuration
------------------------------------------------------------
IR8.Config = {
-- Enables development printing
Debugging = true,
-- Server framework
Framework = "qb", -- "esx" | "qb"
-- Event related vars
ServerCallbackPrefix = "ir8-tickets:Server", -- Change this if you rename the resource folder
ClientCallbackPrefix = "ir8-tickets:Client", -- Change this if you rename the resource folder
-- Ticket Configuration Variables
TicketConfiguration = {
-- Available Categories to choose
Categories = {
"General",
"Bug Report",
"Rule Break"
},
-- Available statuses to set tickets to
-- Badge Type uses bootstraps badge classes (warning, info, success, error)
Statuses = {
{
label = "Open",
badgeType = "info",
allowReplies = true -- Participants can reply if this is true and in this state
},
{
label = "In Progress",
badgeType = "warning",
allowReplies = true -- Participants can reply if this is true and in this state
},
{
label = "Closed",
badgeType = "success",
allowReplies = false -- Participants can reply if this is true and in this state
}
},
-- Default status when a ticket is created, this should also exist in "Statuses"
DefaultStatus = "Open",
-- Disclaimer before submit button, set to false to hide.
Disclaimer = "Please allow up to 24 hours for a staff member to process your ticket."
},
-- Table definitions
DatabaseTables = {
-- Where general ticket information is stored
Tickets = "ir8_ticket",
-- Where ticket messages are stored
Messages = "ir8_ticket_message"
},
-- The following groups will have access to ticket administration
-- This uses either ESX Groups or QB Core Permissions
AdminPermissions = {
'admin'
},
-- Command information
Commands = {
-- Command to manage blips
Tickets = "tickets",
TicketsDescription = "View ticket system",
},
-- Customize NUI Theme
Theme = {
Title = {
Admin = "Ticket Manager",
Player = "My Tickets"
},
Colors = {
-- Background of the modal window
Background = "rgba(19, 22, 24, 0.9)",
-- Text color
Text = "#ffffff"
}
}
}
```

### Webhook Configuration

You can set your webhook configuration from server/main.lua at the top of the file.

### Renaming the Resource

If you rename the resource folder, make sure you set the following configuration variables to match the folder name:

```
-- Event related vars
ServerCallbackPrefix = "ir8-tickets:Server", -- Change this if you rename the resource folder
ClientCallbackPrefix = "ir8-tickets:Client", -- Change this if you rename the resource folder
```

If you are renaming the database tables, be sure to update the configuration to reflect those changes:

```
-- Table definitions
DatabaseTables = {
-- Where general ticket information is stored
Tickets = "ir8_ticket",
-- Where ticket messages are stored
Messages = "ir8_ticket_message"
},
```
You can set your webhook configuration from server/main.lua at the top of the file.
2 changes: 1 addition & 1 deletion shared/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ IR8.Config = {
Messages = "ir8_ticket_message"
},

-- The following groups will have access to ticket administration
-- Those with the following ace permissions will have admin access
AdminPermissions = { "ticket.admin" },

-- Command information
Expand Down

0 comments on commit c85fc71

Please sign in to comment.