Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. <div class="tab-content">
  2.  
  3. <div class="tab-pane active ticketTab col-xs-12 col-sm-12 " id="threads">
  4.  
  5. <div class="voffset-3 vmargin-bottom-3"
  6. ng-show="formTicketData.ticket_status_id != 8 && !tempData.ticketUpdateAlert">
  7. <button class="btn btn-primary" ui-sref='update-ticket({ entityId: entityId })'
  8. ui-sref-opts="{reload:true}" ui-sref-active="active">
  9. <i class="fa fa-refresh"></i> Refresh</button>
  10. <button class="btn btn-primary" ng-click="openReplyPost(); setSummerNoteFocus()">Post Reply</button>
  11. </div>
  12.  
  13. <div ng-show="formTicketData.ticket_status_id == 6 && tempData.showAutoCloseAlert"
  14. class="alert alert-danger" role="alert">
  15. <p>
  16. <span>Please note that this ticket will auto close in {{tempData.autoClosedDaysLeft}} days. If you require more time on this ticket, please respond to prevent it from being closed.</span>
  17. <button class="btn btn-success btn-xs" ng-click="UpdateTicket()">Set to In Progress with
  18. Customer</button>
  19. </p>
  20. </div>
  21.  
  22. if ($scope.entityId != null) {
  23.  
  24. spyderResource.query({ resource: 'ticket_status' }, function (status) {
  25. $scope.statuses = status;
  26. });
  27.  
  28. spyderP1Api.get({ resource: 'tickets', action: 'lastEvent', id: $scope.entityId }, function (lastEvent) {
  29.  
  30. $scope.tempData.autoClosedDaysLeft = moment().diff(moment(lastEvent.event_date_time), 'days') + 7;
  31.  
  32. if ($scope.tempData.autoClosedDaysLeft > 14) {
  33. $scope.tempData.showAutoCloseAlert = true;
  34. } else {
  35. $scope.tempData.showAutoCloseAlert = false;
  36. }
  37. $scope.tempData.prevoisEvent = lastEvent;
  38. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement