Browse Source

add filter asc by name_version

pull/1/head
wahyuun 1 year ago
parent
commit
28bd0c38e0
  1. 5
      src/views/SimproV2/CreatedProyek/DialogGantt.js

5
src/views/SimproV2/CreatedProyek/DialogGantt.js

@ -92,7 +92,10 @@ const DialogGantt = ({ openDialog, closeDialog, toggleDialog, idTask, proyekName
.catch((error) => error.response);
if (result && result.status == 200) {
setDataGantt(result.data.data);
const sortedData = result.data.data.sort((a, b) => {
return a.name_version.toLowerCase().localeCompare(b.name_version.toLowerCase());
});
setDataGantt(sortedData);
} else {
NotificationManager.error(`Data gantt project gagal terload silahkan coba lagi!`, 'Failed!!');
}

Loading…
Cancel
Save