Skip to content

Commit f0a17ae

Browse files
committed
add new column for localStorage tickets
1 parent c5eeaad commit f0a17ae

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

src/components/NewTicket.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ export default {
230230
today = mm + "/" + dd + "/" + yyyy;
231231
232232
formData["Ticket Creation Date"] = today;
233-
formData.CustomCreated = true;
233+
formData.CustomCreated = "Yes";
234234
formData.ticket = this.ticketsLength + 1;
235235
236236
// Save the ticket in localStorage

src/components/TicketsTable/ColumnOptions.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,19 @@ export default {
119119
label: "Ticket Creation Date",
120120
field: "Ticket Creation Date",
121121
sortable: true
122+
},
123+
{
124+
label: "Local Storage",
125+
field: "CustomCreated",
126+
globalSearchDisabled: true,
127+
type: "custom",
128+
sortable: false,
129+
formatFn: this.showYesOrNoAsValue,
130+
filterOptions: {
131+
enabled: true,
132+
placeholder: "Filter",
133+
filterDropdownItems: ["Yes"]
134+
}
122135
}
123136
]
124137
};
@@ -129,6 +142,9 @@ export default {
129142
.split("-")
130143
.pop()
131144
.trim();
145+
},
146+
showYesOrNoAsValue(inputString) {
147+
return inputString ? "Yes" : "No";
132148
}
133149
}
134150
};

src/components/TicketsTable/SortFilterSearch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export default {
5555
this.filteredTickets.sort(function(a, b) {
5656
a = a[field];
5757
b = b[field];
58-
if (columnFieldType !== "number") {
58+
if (columnFieldType !== "number" && columnFieldType !== "custom") {
5959
a = a
6060
.split("-")
6161
.pop()

0 commit comments

Comments
 (0)