mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-09-22 02:23:32 +00:00
feat: add conversation status categories and update related logic.
- Introduced a new category field for conversation statuses to classify them as 'open', 'waiting', or 'resolved'. Which allows max assignment limits in team to work with custom statuses as well.
This commit is contained in:
+2
-2
@@ -33,7 +33,7 @@ func handleCreateStatus(r *fastglue.Request) error {
|
||||
return r.SendErrorEnvelope(fasthttp.StatusBadRequest, app.i18n.Ts("globals.messages.empty", "name", "`name`"), nil, envelope.InputError)
|
||||
}
|
||||
|
||||
createdStatus, err := app.status.Create(status.Name)
|
||||
createdStatus, err := app.status.Create(status.Name, status.Category)
|
||||
if err != nil {
|
||||
return sendErrorEnvelope(r, err)
|
||||
}
|
||||
@@ -74,7 +74,7 @@ func handleUpdateStatus(r *fastglue.Request) error {
|
||||
return r.SendErrorEnvelope(fasthttp.StatusBadRequest, app.i18n.Ts("globals.messages.empty", "name", "`name`"), nil, envelope.InputError)
|
||||
}
|
||||
|
||||
updatedStatus, err := app.status.Update(id, status.Name)
|
||||
updatedStatus, err := app.status.Update(id, status.Name, status.Category)
|
||||
if err != nil {
|
||||
return sendErrorEnvelope(r, err)
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ var migList = []migFunc{
|
||||
{"v0.10.0", migrations.V0_10_0},
|
||||
{"v1.0.1", migrations.V1_0_1},
|
||||
{"v2.0.0", migrations.V2_0_0},
|
||||
{"v2.2.0", migrations.V2_2_0},
|
||||
}
|
||||
|
||||
// upgrade upgrades the database to the current version by running SQL migration files
|
||||
|
||||
Reference in New Issue
Block a user