Skip to content

Commit

Permalink
fix(com-pwa): admin sort
Browse files Browse the repository at this point in the history
  • Loading branch information
njfamirm committed Jun 8, 2023
1 parent 3398aae commit f4050a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions uniquely/com-pwa/src/ui/page/admin-order-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,11 @@ export class AlwatrPageAdminOrderList extends ScheduleUpdateToFrameMixin(

const orderStorageList = Object.values(userStorage.data).sort((u1, u2) => {
const lastU1Order = Object.values(u1.orderList).sort((o1, o2) => {
return (o1.meta?.updated || 0) - (o2.meta?.updated || 0);
return (o2.meta?.updated || 0) - (o1.meta?.updated || 0);
})[0];

const lastU2Order = Object.values(u2.orderList).sort((o1, o2) => {
return (o1.meta?.updated || 0) - (o2.meta?.updated || 0);
return (o2.meta?.updated || 0) - (o1.meta?.updated || 0);
})[0];

return (lastU2Order?.meta?.updated || 0) - (lastU1Order?.meta?.updated || 0);
Expand Down

0 comments on commit f4050a3

Please sign in to comment.