web-mojo 2.1.219 → 2.1.244

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/admin.cjs.js +1 -1
  2. package/dist/admin.cjs.js.map +1 -1
  3. package/dist/admin.es.js +227 -50
  4. package/dist/admin.es.js.map +1 -1
  5. package/dist/auth.cjs.js +1 -1
  6. package/dist/auth.cjs.js.map +1 -1
  7. package/dist/auth.es.js +3 -3
  8. package/dist/auth.es.js.map +1 -1
  9. package/dist/charts.cjs.js +1 -1
  10. package/dist/charts.es.js +2 -2
  11. package/dist/chunks/{ContextMenu-DjS0WgXA.js → ContextMenu-CPQ_ZrT6.js} +2 -2
  12. package/dist/chunks/{ContextMenu-DjS0WgXA.js.map → ContextMenu-CPQ_ZrT6.js.map} +1 -1
  13. package/dist/chunks/{ContextMenu-BGstYX-N.js → ContextMenu-qToF2PNG.js} +2 -2
  14. package/dist/chunks/{ContextMenu-BGstYX-N.js.map → ContextMenu-qToF2PNG.js.map} +1 -1
  15. package/dist/chunks/{DataView-Dmobu7T8.js → DataView-COXtv8kh.js} +2 -2
  16. package/dist/chunks/{DataView-Dmobu7T8.js.map → DataView-COXtv8kh.js.map} +1 -1
  17. package/dist/chunks/{DataView-LCk00Xma.js → DataView-kd5iuE-9.js} +2 -2
  18. package/dist/chunks/{DataView-LCk00Xma.js.map → DataView-kd5iuE-9.js.map} +1 -1
  19. package/dist/chunks/Dialog-Bz4Z9bSO.js +2 -0
  20. package/dist/chunks/Dialog-Bz4Z9bSO.js.map +1 -0
  21. package/dist/chunks/{Dialog-Bu9EGh-z.js → Dialog-DWDn0XUt.js} +41 -34
  22. package/dist/chunks/Dialog-DWDn0XUt.js.map +1 -0
  23. package/dist/chunks/{FilePreviewView-C-VswdQl.js → FilePreviewView-CCngMe-J.js} +6 -6
  24. package/dist/chunks/{FilePreviewView-C-VswdQl.js.map → FilePreviewView-CCngMe-J.js.map} +1 -1
  25. package/dist/chunks/{FilePreviewView-CxT-vXFS.js → FilePreviewView-Dacxyem-.js} +2 -2
  26. package/dist/chunks/{FilePreviewView-CxT-vXFS.js.map → FilePreviewView-Dacxyem-.js.map} +1 -1
  27. package/dist/chunks/{FormView-DWV5Lhc3.js → FormView-CG2GC9qH.js} +2 -2
  28. package/dist/chunks/{FormView-DWV5Lhc3.js.map → FormView-CG2GC9qH.js.map} +1 -1
  29. package/dist/chunks/{FormView-DhZi_-D_.js → FormView-GxoZ1H6P.js} +2 -2
  30. package/dist/chunks/{FormView-DhZi_-D_.js.map → FormView-GxoZ1H6P.js.map} +1 -1
  31. package/dist/chunks/{MetricsChart-BOSgjGoW.js → MetricsChart-D1n5a4YY.js} +3 -3
  32. package/dist/chunks/{MetricsChart-BOSgjGoW.js.map → MetricsChart-D1n5a4YY.js.map} +1 -1
  33. package/dist/chunks/{MetricsChart-CHQmuqGa.js → MetricsChart-DDiVVisT.js} +2 -2
  34. package/dist/chunks/{MetricsChart-CHQmuqGa.js.map → MetricsChart-DDiVVisT.js.map} +1 -1
  35. package/dist/chunks/{PDFViewer-C7_03lr6.js → PDFViewer-DGAtX0Ms.js} +3 -3
  36. package/dist/chunks/{PDFViewer-C7_03lr6.js.map → PDFViewer-DGAtX0Ms.js.map} +1 -1
  37. package/dist/chunks/{PDFViewer-CTQ_WArl.js → PDFViewer-DrJPeSLI.js} +2 -2
  38. package/dist/chunks/{PDFViewer-CTQ_WArl.js.map → PDFViewer-DrJPeSLI.js.map} +1 -1
  39. package/dist/chunks/{Page-CG1u27-d.js → Page-BsqCluiN.js} +2 -2
  40. package/dist/chunks/{Page-CG1u27-d.js.map → Page-BsqCluiN.js.map} +1 -1
  41. package/dist/chunks/{Page-7mRcLFeD.js → Page-CouRTtLr.js} +2 -2
  42. package/dist/chunks/{Page-7mRcLFeD.js.map → Page-CouRTtLr.js.map} +1 -1
  43. package/dist/chunks/{TopNav-CF1Ic6Ty.js → TopNav-B0OgzwWD.js} +2 -2
  44. package/dist/chunks/{TopNav-CF1Ic6Ty.js.map → TopNav-B0OgzwWD.js.map} +1 -1
  45. package/dist/chunks/{TopNav-CprY7p9c.js → TopNav-CJGYrCmM.js} +2 -2
  46. package/dist/chunks/{TopNav-CprY7p9c.js.map → TopNav-CJGYrCmM.js.map} +1 -1
  47. package/dist/chunks/{User-DPWffTVQ.js → User-DARwVvpV.js} +2 -2
  48. package/dist/chunks/{User-DPWffTVQ.js.map → User-DARwVvpV.js.map} +1 -1
  49. package/dist/chunks/{User-CgSxo-iW.js → User-DzR9RPjg.js} +2 -2
  50. package/dist/chunks/{User-CgSxo-iW.js.map → User-DzR9RPjg.js.map} +1 -1
  51. package/dist/chunks/{WebApp-DDt4Ihy7.js → WebApp-CR6b7HZz.js} +23 -12
  52. package/dist/chunks/WebApp-CR6b7HZz.js.map +1 -0
  53. package/dist/chunks/WebApp-D_j_HtgS.js +2 -0
  54. package/dist/chunks/WebApp-D_j_HtgS.js.map +1 -0
  55. package/dist/css/web-mojo.css +1 -1
  56. package/dist/docit.cjs.js +1 -1
  57. package/dist/docit.es.js +6 -6
  58. package/dist/index.cjs.js +1 -1
  59. package/dist/index.es.js +11 -11
  60. package/dist/lightbox.cjs.js +1 -1
  61. package/dist/lightbox.es.js +4 -4
  62. package/dist/table.css +1 -8
  63. package/package.json +1 -1
  64. package/dist/chunks/Dialog-Bu9EGh-z.js.map +0 -1
  65. package/dist/chunks/Dialog-CxJjXDJ-.js +0 -2
  66. package/dist/chunks/Dialog-CxJjXDJ-.js.map +0 -1
  67. package/dist/chunks/WebApp-D35UJNMm.js +0 -2
  68. package/dist/chunks/WebApp-D35UJNMm.js.map +0 -1
  69. package/dist/chunks/WebApp-DDt4Ihy7.js.map +0 -1
package/dist/admin.es.js CHANGED
@@ -1,14 +1,14 @@
1
- import { P as Page } from "./chunks/Page-7mRcLFeD.js";
2
- import { V as View, h as MOJOUtils } from "./chunks/WebApp-DDt4Ihy7.js";
3
- import { B, b, a, c, e, f, W } from "./chunks/WebApp-DDt4Ihy7.js";
4
- import Dialog$1 from "./chunks/Dialog-Bu9EGh-z.js";
5
- import { M as MetricsChart, P as PieChart } from "./chunks/MetricsChart-BOSgjGoW.js";
6
- import { b as TablePage, i as EmailDomainForms, h as EmailDomainList, E as EmailDomain, l as MailboxForms, k as MailboxList, j as Mailbox, p as EmailTemplate, d as TabView, r as EmailTemplateForms, q as EmailTemplateList, I as IncidentEvent, z as IncidentEventForms, y as IncidentEventList, u as FileManagerForms, t as FileManagerList, v as File, T as TableView, x as FileForms, w as FileList, am as GeoLocatedIP, an as GeoLocatedIPList, a7 as MemberList, a6 as LogList, ap as TicketList, B as IncidentList, V as IncidentStats, N as IncidentHistoryList, K as IncidentHistory, F as FilePreviewView, A as Incident, C as IncidentForms, W as Job, a0 as JobEventList, _ as JobLogList, Y as JobForms, X as JobList, a3 as JobRunnerList, a1 as JobsEngineStats, a4 as JobRunnerForms, a2 as JobRunner, a5 as Log, M as Member, a8 as MemberForms, a9 as MetricsPermission, ab as MetricsForms, aa as MetricsPermissionList, ak as PushConfigForms, ah as PushConfigList, aj as PushDeliveryList, ad as PushDeviceList, al as PushTemplateForms, af as PushTemplateList, R as RuleSet, U as RuleList, O as RuleSetList, g as S3BucketForms, f as S3BucketList, m as SentMessage, n as SentMessageList, ar as TicketNoteList, aq as TicketNote, ao as Ticket, as as TicketForms } from "./chunks/FilePreviewView-C-VswdQl.js";
7
- import DataView from "./chunks/DataView-Dmobu7T8.js";
8
- import { C as ContextMenu } from "./chunks/ContextMenu-DjS0WgXA.js";
9
- import { C as Collection, a as Group, G as GroupList, b as GroupForms, f as UserDevice, i as UserDeviceLocationList, g as UserDeviceList, U as User, e as UserDataView, d as UserForms, c as UserList } from "./chunks/User-CgSxo-iW.js";
10
- import { L as LightboxGallery, P as PDFViewer } from "./chunks/PDFViewer-C7_03lr6.js";
11
- import { a as applyFileDropMixin } from "./chunks/FormView-DhZi_-D_.js";
1
+ import { P as Page } from "./chunks/Page-CouRTtLr.js";
2
+ import { V as View, h as MOJOUtils } from "./chunks/WebApp-CR6b7HZz.js";
3
+ import { B, b, a, c, e, f, W } from "./chunks/WebApp-CR6b7HZz.js";
4
+ import Dialog$1 from "./chunks/Dialog-DWDn0XUt.js";
5
+ import { M as MetricsChart, P as PieChart } from "./chunks/MetricsChart-D1n5a4YY.js";
6
+ import { b as TablePage, i as EmailDomainForms, h as EmailDomainList, E as EmailDomain, l as MailboxForms, k as MailboxList, j as Mailbox, p as EmailTemplate, d as TabView, r as EmailTemplateForms, q as EmailTemplateList, I as IncidentEvent, z as IncidentEventForms, y as IncidentEventList, u as FileManagerForms, t as FileManagerList, v as File, T as TableView, x as FileForms, w as FileList, am as GeoLocatedIP, an as GeoLocatedIPList, a7 as MemberList, a6 as LogList, ap as TicketList, B as IncidentList, V as IncidentStats, N as IncidentHistoryList, K as IncidentHistory, F as FilePreviewView, A as Incident, C as IncidentForms, W as Job, a0 as JobEventList, _ as JobLogList, Y as JobForms, X as JobList, a3 as JobRunnerList, a1 as JobsEngineStats, a4 as JobRunnerForms, a2 as JobRunner, a5 as Log, M as Member, a8 as MemberForms, a9 as MetricsPermission, ab as MetricsForms, aa as MetricsPermissionList, ak as PushConfigForms, ah as PushConfigList, aj as PushDeliveryList, ad as PushDeviceList, al as PushTemplateForms, af as PushTemplateList, R as RuleSet, U as RuleList, O as RuleSetList, g as S3BucketForms, f as S3BucketList, m as SentMessage, n as SentMessageList, ar as TicketNoteList, aq as TicketNote, ao as Ticket, as as TicketForms } from "./chunks/FilePreviewView-CCngMe-J.js";
7
+ import DataView from "./chunks/DataView-COXtv8kh.js";
8
+ import { C as ContextMenu } from "./chunks/ContextMenu-CPQ_ZrT6.js";
9
+ import { C as Collection, a as Group, G as GroupList, b as GroupForms, f as UserDevice, i as UserDeviceLocationList, g as UserDeviceList, U as User, e as UserDataView, d as UserForms, c as UserList } from "./chunks/User-DzR9RPjg.js";
10
+ import { L as LightboxGallery, P as PDFViewer } from "./chunks/PDFViewer-DGAtX0Ms.js";
11
+ import { a as applyFileDropMixin } from "./chunks/FormView-GxoZ1H6P.js";
12
12
  class AdminHeaderView extends View {
13
13
  constructor(options = {}) {
14
14
  super({
@@ -2169,6 +2169,7 @@ class ChatInputView extends View {
2169
2169
  ...options
2170
2170
  });
2171
2171
  this.uploads = [];
2172
+ this.buttonText = options.buttonText || "Send";
2172
2173
  }
2173
2174
  getTemplate() {
2174
2175
  return `
@@ -2176,7 +2177,7 @@ class ChatInputView extends View {
2176
2177
  <textarea class="form-control" placeholder="Type a message..." rows="3"></textarea>
2177
2178
  <div class="d-flex justify-content-between align-items-center mt-2">
2178
2179
  <small class="text-muted">Drag & drop files to attach.</small>
2179
- <button class="btn btn-primary" data-action="send-message">Send</button>
2180
+ <button class="btn btn-primary" data-action="send-message">${this.buttonText}</button>
2180
2181
  </div>
2181
2182
  <div class="uploads-container mt-2"></div>
2182
2183
  </div>
@@ -2218,6 +2219,7 @@ class ChatView extends View {
2218
2219
  });
2219
2220
  this.adapter = options.adapter;
2220
2221
  this.items = [];
2222
+ this.inputButtonText = options.inputButtonText || "Send";
2221
2223
  }
2222
2224
  getTemplate() {
2223
2225
  return `
@@ -2236,14 +2238,16 @@ class ChatView extends View {
2236
2238
  messageView.render(true, historyContainer);
2237
2239
  });
2238
2240
  const inputContainer = this.element.querySelector(".chat-input-container");
2239
- this.inputView = new ChatInputView();
2240
- this.addChild(this.inputView);
2241
+ if (!this.inputView) {
2242
+ this.inputView = new ChatInputView({ buttonText: this.inputButtonText });
2243
+ this.addChild(this.inputView);
2244
+ this.inputView.on("note:submit", async (data) => {
2245
+ await this.adapter.addNote(data);
2246
+ this.items = await this.adapter.fetch();
2247
+ this.render();
2248
+ });
2249
+ }
2241
2250
  this.inputView.render(true, inputContainer);
2242
- this.inputView.on("note:submit", async (data) => {
2243
- await this.adapter.addNote(data);
2244
- this.items = await this.adapter.fetch();
2245
- this.render();
2246
- });
2247
2251
  }
2248
2252
  }
2249
2253
  class IncidentView extends View {
@@ -6887,8 +6891,8 @@ class TicketNoteAdapter {
6887
6891
  type: "user_comment",
6888
6892
  // Ticket notes are always user comments
6889
6893
  author: {
6890
- name: note.get("author.display_name") || "System",
6891
- avatarUrl: note.get("author.avatar.url")
6894
+ name: note.get("user.display_name") || "System",
6895
+ avatarUrl: note.get("user.avatar.url")
6892
6896
  },
6893
6897
  timestamp: note.get("created"),
6894
6898
  content: note.get("note"),
@@ -6896,12 +6900,12 @@ class TicketNoteAdapter {
6896
6900
  };
6897
6901
  }
6898
6902
  async addNote(data) {
6899
- const note = new TicketNote({
6900
- ticket: this.ticketId,
6903
+ const note = new TicketNote();
6904
+ const resp = await note.save({
6905
+ parent: this.ticketId,
6901
6906
  note: data.text,
6902
6907
  media: data.files && data.files.length > 0 ? data.files[0].id : null
6903
6908
  });
6904
- const resp = await note.save();
6905
6909
  if (resp.success) {
6906
6910
  await this.collection.fetch();
6907
6911
  }
@@ -6916,31 +6920,79 @@ class TicketView extends View {
6916
6920
  });
6917
6921
  this.model = options.model || new Ticket(options.data || {});
6918
6922
  this.template = `
6919
- <div class="ticket-view-container p-3">
6920
- <!-- Header -->
6921
- <div class="d-flex justify-content-between align-items-center mb-4">
6922
- <div>
6923
- <h3 class="mb-1">Ticket #{{model.id}}: {{model.title}}</h3>
6924
- <span class="badge {{model.status|badge}}">{{model.status|capitalize}}</span>
6925
- <span class="ms-2">Priority: {{model.priority}}</span>
6923
+ <div class="ticket-view-container">
6924
+ <!-- Ticket Header -->
6925
+ <div class="d-flex justify-content-between align-items-start mb-4">
6926
+ <!-- Left Side: Primary Identity -->
6927
+ <div class="d-flex align-items-center gap-3">
6928
+ <div class="avatar-placeholder rounded-circle bg-light d-flex align-items-center justify-content-center" style="width: 80px; height: 80px;">
6929
+ <i class="bi bi-ticket-perforated text-secondary" style="font-size: 40px;"></i>
6930
+ </div>
6931
+ <div>
6932
+ <h3 class="mb-1">{{model.title|truncate(50)|default('Untitled Ticket')}}</h3>
6933
+ <div class="text-muted small">
6934
+ <span>Ticket #{{model.id}}</span>
6935
+ <span class="mx-2">|</span>
6936
+ <span>Priority: {{model.priority|capitalize}}</span>
6937
+ {{#model.assignee}}
6938
+ <span class="mx-2">|</span>
6939
+ <span>Assigned to: {{model.assignee.display_name}}</span>
6940
+ {{/model.assignee}}
6941
+ </div>
6942
+ {{#model.incident}}
6943
+ <div class="text-muted small mt-1">
6944
+ <i class="bi bi-exclamation-triangle"></i> Related to incident: {{model.incident}}
6945
+ </div>
6946
+ {{/model.incident}}
6947
+ </div>
6926
6948
  </div>
6927
- <div data-container="ticket-context-menu"></div>
6928
- </div>
6929
6949
 
6930
- <div class="row">
6931
- <div class="col-md-8">
6932
- <h5>Description</h5>
6933
- <div class="border p-3 rounded bg-light mb-4">{{{model.description}}}</div>
6934
- </div>
6935
- <div class="col-md-4">
6936
- <h5>Details</h5>
6937
- <div data-container="details-view"></div>
6950
+ <!-- Right Side: Status & Actions -->
6951
+ <div class="d-flex align-items-start gap-4">
6952
+ <div class="text-end">
6953
+ <div class="d-flex align-items-center gap-2">
6954
+ <span class="badge {{model.status|badgeClass}}">{{model.status|capitalize}}</span>
6955
+ </div>
6956
+ {{#model.created}}
6957
+ <div class="text-muted small mt-1">Created {{model.created|relative}}</div>
6958
+ {{/model.created}}
6959
+ {{#model.modified}}
6960
+ <div class="text-muted small">Updated {{model.modified|relative}}</div>
6961
+ {{/model.modified}}
6962
+ </div>
6963
+ <div data-container="ticket-context-menu"></div>
6938
6964
  </div>
6939
6965
  </div>
6966
+
6967
+ <!-- Content Area -->
6940
6968
  <div class="row">
6941
- <div class="col-12">
6942
- <h5>Activity & Notes</h5>
6943
- <div data-container="chat-view"></div>
6969
+ <div class="col-lg-8">
6970
+ <!-- Description Section -->
6971
+ <div class="mb-4">
6972
+ <h5 class="border-bottom pb-2 mb-3">Description</h5>
6973
+ <div class="border rounded p-3 bg-light">
6974
+ {{#model.description}}
6975
+ {{{model.description}}}
6976
+ {{/model.description}}
6977
+ {{^model.description}}
6978
+ <em class="text-muted">No description provided</em>
6979
+ {{/model.description}}
6980
+ </div>
6981
+ </div>
6982
+
6983
+ <!-- Activity & Notes Section -->
6984
+ <div>
6985
+ <h5 class="border-bottom pb-2 mb-3">Activity & Notes</h5>
6986
+ <div data-container="chat-view"></div>
6987
+ </div>
6988
+ </div>
6989
+
6990
+ <div class="col-lg-4">
6991
+ <!-- Details Sidebar -->
6992
+ <div class="border rounded p-3 bg-light">
6993
+ <h5 class="mb-3">Ticket Details</h5>
6994
+ <div data-container="details-view"></div>
6995
+ </div>
6944
6996
  </div>
6945
6997
  </div>
6946
6998
  </div>
@@ -6961,29 +7013,153 @@ class TicketView extends View {
6961
7013
  const adapter = new TicketNoteAdapter(this.model.get("id"));
6962
7014
  this.chatView = new ChatView({
6963
7015
  containerId: "chat-view",
6964
- adapter
7016
+ adapter,
7017
+ inputButtonText: "Add Note"
6965
7018
  });
6966
7019
  this.addChild(this.chatView);
6967
- const contextMenu = new ContextMenu({
7020
+ const ticketMenu = new ContextMenu({
6968
7021
  containerId: "ticket-context-menu",
7022
+ className: "context-menu-view header-menu-absolute",
6969
7023
  context: this.model,
6970
7024
  config: {
6971
7025
  icon: "bi-three-dots-vertical",
6972
7026
  items: [
7027
+ { label: "Edit Ticket", action: "edit-ticket", icon: "bi-pencil" },
6973
7028
  { label: "Change Status", action: "change-status", icon: "bi-tag" },
6974
7029
  { label: "Set Priority", action: "set-priority", icon: "bi-flag" },
6975
- { label: "Assign User", action: "assign-user", icon: "bi-person" }
7030
+ { label: "Assign User", action: "assign-user", icon: "bi-person" },
7031
+ { type: "divider" },
7032
+ { label: "Close Ticket", action: "close-ticket", icon: "bi-x-circle" }
6976
7033
  ]
6977
7034
  }
6978
7035
  });
6979
- this.addChild(contextMenu);
7036
+ this.addChild(ticketMenu);
7037
+ }
7038
+ // Context Menu Action Handlers
7039
+ async onActionEditTicket() {
7040
+ const resp = await Dialog$1.showModelForm({
7041
+ title: `Edit Ticket #${this.model.get("id")} - ${this.model.get("title")}`,
7042
+ model: this.model,
7043
+ size: "lg",
7044
+ fields: [
7045
+ { name: "title", label: "Title", type: "text", required: true },
7046
+ { name: "description", label: "Description", type: "textarea", rows: 4 },
7047
+ {
7048
+ name: "status",
7049
+ label: "Status",
7050
+ type: "select",
7051
+ options: ["open", "in_progress", "pending", "resolved", "closed"]
7052
+ },
7053
+ {
7054
+ name: "priority",
7055
+ label: "Priority",
7056
+ type: "select",
7057
+ options: ["low", "normal", "high", "urgent"]
7058
+ },
7059
+ { name: "assignee_id", label: "Assignee", type: "user_select" }
7060
+ ]
7061
+ });
7062
+ if (resp) {
7063
+ this.render();
7064
+ }
7065
+ }
7066
+ async onActionChangeStatus() {
7067
+ const statuses = ["open", "in_progress", "pending", "resolved", "closed"];
7068
+ const currentStatus = this.model.get("status");
7069
+ const result = await Dialog$1.showForm({
7070
+ title: "Change Ticket Status",
7071
+ size: "sm",
7072
+ fields: [
7073
+ {
7074
+ name: "status",
7075
+ label: "New Status",
7076
+ type: "select",
7077
+ options: statuses.map((s) => ({ value: s, label: s.replace("_", " ").toUpperCase() })),
7078
+ value: currentStatus,
7079
+ required: true
7080
+ }
7081
+ ]
7082
+ });
7083
+ if (result) {
7084
+ try {
7085
+ await this.model.save({ status: result.status });
7086
+ this.render();
7087
+ } catch (error) {
7088
+ Dialog$1.alert({
7089
+ type: "error",
7090
+ title: "Error",
7091
+ message: "Failed to update ticket status: " + error.message
7092
+ });
7093
+ }
7094
+ }
7095
+ }
7096
+ async onActionSetPriority() {
7097
+ const priorities = ["low", "normal", "high", "urgent"];
7098
+ const currentPriority = this.model.get("priority");
7099
+ const result = await Dialog$1.showForm({
7100
+ title: "Set Ticket Priority",
7101
+ size: "sm",
7102
+ fields: [
7103
+ {
7104
+ name: "priority",
7105
+ label: "Priority Level",
7106
+ type: "select",
7107
+ options: priorities.map((p) => ({ value: p, label: p.toUpperCase() })),
7108
+ value: currentPriority,
7109
+ required: true
7110
+ }
7111
+ ]
7112
+ });
7113
+ if (result) {
7114
+ try {
7115
+ await this.model.save({ priority: result.priority });
7116
+ this.render();
7117
+ } catch (error) {
7118
+ Dialog$1.alert({
7119
+ type: "error",
7120
+ title: "Error",
7121
+ message: "Failed to update ticket priority: " + error.message
7122
+ });
7123
+ }
7124
+ }
7125
+ }
7126
+ async onActionAssignUser() {
7127
+ console.log("TODO: Implement assign user dialog with user selector");
7128
+ Dialog$1.alert({
7129
+ title: "Coming Soon",
7130
+ message: "User assignment feature will be implemented soon."
7131
+ });
7132
+ }
7133
+ async onActionCloseTicket() {
7134
+ const confirmed = await Dialog$1.confirm({
7135
+ title: "Close Ticket",
7136
+ message: `Are you sure you want to close ticket #${this.model.get("id")}?`,
7137
+ confirmText: "Close Ticket",
7138
+ confirmClass: "btn-warning"
7139
+ });
7140
+ if (confirmed) {
7141
+ try {
7142
+ await this.model.save({ status: "closed" });
7143
+ this.render();
7144
+ Dialog$1.alert({
7145
+ type: "success",
7146
+ title: "Success",
7147
+ message: "Ticket has been closed successfully."
7148
+ });
7149
+ } catch (error) {
7150
+ Dialog$1.alert({
7151
+ type: "error",
7152
+ title: "Error",
7153
+ message: "Failed to close ticket: " + error.message
7154
+ });
7155
+ }
7156
+ }
6980
7157
  }
6981
7158
  }
6982
7159
  Ticket.VIEW_CLASS = TicketView;
6983
7160
  class TicketTablePage extends TablePage {
6984
7161
  constructor(options = {}) {
6985
7162
  super({
6986
- ...options,
6987
7163
  name: "admin_tickets",
6988
7164
  pageName: "Tickets",
6989
7165
  router: "admin/tickets",
@@ -7037,7 +7213,8 @@ class TicketTablePage extends TablePage {
7037
7213
  bordered: false,
7038
7214
  hover: true,
7039
7215
  responsive: false
7040
- }
7216
+ },
7217
+ ...options
7041
7218
  });
7042
7219
  }
7043
7220
  }