setting_ui: Fix sorting by "Expires at" column.

Previously, the sorting was broken due to
incorrect referencing of the property.
The code has been updated to use the "expiry_date"
property instead of "expires_at".

Fixes #29005.

(cherry picked from commit bf464db61b)
This commit is contained in:
sujal 2024-02-23 16:52:48 +05:30 committed by Tim Abbott
parent 3c8796a2ad
commit 8b1a62f36c
2 changed files with 2 additions and 2 deletions

View File

@ -127,7 +127,7 @@ function populate_invites(invites_data: {invites: Invite[]}): void {
...ListWidget.generic_sort_functions("alphabetic", ["ref"]), ...ListWidget.generic_sort_functions("alphabetic", ["ref"]),
...ListWidget.generic_sort_functions("numeric", [ ...ListWidget.generic_sort_functions("numeric", [
"invited", "invited",
"expires_at", "expiry_date",
"invited_as", "invited_as",
]), ]),
}, },

View File

@ -19,7 +19,7 @@
<th data-sort="alphabetic" data-sort-prop="ref">{{t "Invited by" }}</th> <th data-sort="alphabetic" data-sort-prop="ref">{{t "Invited by" }}</th>
{{/if}} {{/if}}
<th data-sort="numeric" data-sort-prop="invited">{{t "Invited at" }}</th> <th data-sort="numeric" data-sort-prop="invited">{{t "Invited at" }}</th>
<th data-sort="numeric" data-sort-prop="expires_at">{{t "Expires at" }}</th> <th data-sort="numeric" data-sort-prop="expiry_date">{{t "Expires at" }}</th>
<th data-sort="numeric" data-sort-prop="invited_as">{{t "Invited as" }}</th> <th data-sort="numeric" data-sort-prop="invited_as">{{t "Invited as" }}</th>
<th class="actions">{{t "Actions" }}</th> <th class="actions">{{t "Actions" }}</th>
</thead> </thead>