@@ -34,20 +34,20 @@ const gridTemplate = computed(() => {
3434import { isAllowedToPerformPremiumAction } from ' @/utils/billing' ;
3535
3636const sortedProjects = computed (() => {
37- return [... props .projects ].sort ((a , b ) => {
38- // Get client names, handling null clients
39- const clientA = clients .value .find (client => client .id === a .client_id )?.name || ' ' ;
40- const clientB = clients .value .find (client => client .id === b .client_id )?.name || ' ' ;
41-
42- // First sort by client name
43- const clientComparison = clientA .localeCompare (clientB );
44- if (clientComparison !== 0 ) {
45- return clientComparison ;
46- }
47-
48- // Then sort by project name
49- return a .name .localeCompare (b .name );
50- });
37+ return [... props .projects ].sort ((a , b ) => {
38+ // Get client names, handling null clients
39+ const clientA = clients .value .find (( client ) => client .id === a .client_id )?.name || ' ' ;
40+ const clientB = clients .value .find (( client ) => client .id === b .client_id )?.name || ' ' ;
41+
42+ // First sort by client name
43+ const clientComparison = clientA .localeCompare (clientB );
44+ if (clientComparison !== 0 ) {
45+ return clientComparison ;
46+ }
47+
48+ // Then sort by project name
49+ return a .name .localeCompare (b .name );
50+ });
5151});
5252 </script >
5353
0 commit comments