Browse Source

Merge pull request 'add filter asc by name_version' (#168) from dev-wahyun into staging

Reviewed-on: ordo/adw-frontend#168
pull/1/head
farhantock 1 year ago
parent
commit
ace9f2d16a
  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