From 5a62ce10b78e91ff84693f93fd65976e0bf61bab Mon Sep 17 00:00:00 2001 From: Guillermo Giuliana Date: Tue, 21 Jul 2020 08:40:04 -0300 Subject: [PATCH] and set 4.7.0 ticket model correct (#845) --- .../dashboard-list-tickets/dashboard-list-tickets-page.js | 2 +- version_upgrades/4.7.0/models/Ticket.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/client/src/app/main/dashboard/dashboard-list-tickets/dashboard-list-tickets-page.js b/client/src/app/main/dashboard/dashboard-list-tickets/dashboard-list-tickets-page.js index 5f863a7e..eacd2d00 100644 --- a/client/src/app/main/dashboard/dashboard-list-tickets/dashboard-list-tickets-page.js +++ b/client/src/app/main/dashboard/dashboard-list-tickets/dashboard-list-tickets-page.js @@ -89,7 +89,7 @@ class DashboardListTicketsPage extends React.Component { }) API.call({ - path: 'user/get-supervised-tickets', + path: '/user/get-supervised-tickets', data: { page, showOwnTickets: ownTickets*1, diff --git a/version_upgrades/4.7.0/models/Ticket.php b/version_upgrades/4.7.0/models/Ticket.php index f6962801..b0abd046 100755 --- a/version_upgrades/4.7.0/models/Ticket.php +++ b/version_upgrades/4.7.0/models/Ticket.php @@ -14,6 +14,7 @@ * @apiParam {Boolean} unread Indicates if the user has already read the last comment. * @apiParam {Boolean} unreadStaff Indicates if the staff has already read the last comment. * @apiParam {Boolean} closed Indicates if the ticket is closed. + * @apiParam {String} priority The priority of the ticket. It can be LOW, MEDIUM or HIGH. * @apiParam {Object} author The author of the ticket. * @apiParam {Number} author.id The id of the author of the ticket. * @apiParam {String} author.name The author's name of the ticket. @@ -40,6 +41,7 @@ class Ticket extends DataStore { 'date', 'unread', 'closed', + 'priority', 'author', 'authorStaff', 'owner', @@ -88,6 +90,7 @@ class Ticket extends DataStore { public function getDefaultProps() { return array( + 'priority' => 'low', 'unread' => false, 'unreadStaff' => true, 'ticketNumber' => $this->generateUniqueTicketNumber() @@ -133,6 +136,7 @@ class Ticket extends DataStore { 'unread' => !!$this->unread, 'unreadStaff' => !!$this->unreadStaff, 'closed' => !!$this->closed, + 'priority' => $this->priority, 'author' => $this->authorToArray(), 'owner' => $this->ownerToArray(), 'events' => $minimized ? [] : $this->eventsToArray(),