본인(creator)가 아닌 다른 user들의 row에 있는 Delete link를 누르면 다음과 같이 Delete를 confirm하도록 합니다.
OK를 누른 경우 user가 table에서 바로 삭제 되며 PATCH request를 통해 trip의 user list에서 user를 빼주도록 하였습니다. 그 결과 기존 user id 2번에 해당하는 test가 trip의 users list에 들어있지 않음을 response를 통해 확인 할 수 있습니다.
Trip Info Modification (title, sinceWhen, tilWhen)
title, sinceWhen, tilWhen의 row에 해당하는 data column은 Editable한 cell로 되어 있어 연필 아이콘을 클릭하면 아래 사진처럼 해당 내용을 수정할 수 있습니다.
내용을 수정한다음 Enter나 위의 사진에서 보이는 체크 아이콘를 누를 경우 PATCH가 성공적으로 이루어지며 이 수정된 title은 header에도 바로 반영이 됩니다.
sinceWhen과 tilWhen에 대해서도 마찬가지로 PATCH가 이루어집니다. sinceWhen과 tilWhen의 경우 yyyy-mm-dd의 형태가 아니거나 sinceWhen >= tilWhen이거나 존재하지 않는 날짜(2018-06-31)인 경우에는 수정이 되지 않으며 그러한 경우 table의 값은 원래 값으로 유지되도록 하였습니다.
Settings page UI