mirror of
https://github.com/abhinavxd/libredesk.git
synced 2025-11-03 13:33:32 +00:00
feat: new package report, move exisiting report code from conversations pkg to report package
- new sla performance overview cards.
This commit is contained in:
@@ -549,30 +549,6 @@ func handleUpdateContactCustomAttributes(r *fastglue.Request) error {
|
||||
return r.SendEnvelope(true)
|
||||
}
|
||||
|
||||
// handleDashboardCounts retrieves general dashboard counts for all users.
|
||||
func handleDashboardCounts(r *fastglue.Request) error {
|
||||
var (
|
||||
app = r.Context.(*App)
|
||||
)
|
||||
counts, err := app.conversation.GetDashboardCounts(0, 0)
|
||||
if err != nil {
|
||||
return sendErrorEnvelope(r, err)
|
||||
}
|
||||
return r.SendEnvelope(counts)
|
||||
}
|
||||
|
||||
// handleDashboardCharts retrieves general dashboard chart data.
|
||||
func handleDashboardCharts(r *fastglue.Request) error {
|
||||
var (
|
||||
app = r.Context.(*App)
|
||||
)
|
||||
charts, err := app.conversation.GetDashboardChart(0, 0)
|
||||
if err != nil {
|
||||
return sendErrorEnvelope(r, err)
|
||||
}
|
||||
return r.SendEnvelope(charts)
|
||||
}
|
||||
|
||||
// enforceConversationAccess fetches the conversation and checks if the user has access to it.
|
||||
func enforceConversationAccess(app *App, uuid string, user umodels.User) (*cmodels.Conversation, error) {
|
||||
conversation, err := app.conversation.GetConversation(0, uuid)
|
||||
|
||||
Reference in New Issue
Block a user