Skip to content

Conversation

@hikahana
Copy link
Collaborator

@hikahana hikahana commented Jun 5, 2024

対応Issue

resolve #769

概要

teacherのカラムにis_deletedを追加し、これのbooleanで論理削除を行うようにした。
sql文のgetでis_deletedがfalseのものを取得するように修正した。
MultiDestoryを追加し、複数削除をできるようにした。
上に伴い、teachersの削除を複数で行えるようにチェックボックスを配置した。

画面スクリーンショット等

  • URL
    スクリーンショット
    image

テスト項目

  • -v からのmake buildでteacherのカラムにis_deletedが追加されているか
  • swaggerでteacherのget,delete,multiDeleteの操作が正常に行えるか(is_deletedがfalseのものが取得できるかなど)
  • localhost:3000/teachersにアクセスし、教員の複数削除が行えるか

備考

API作って満足してました。
これから削除するページ作ります。
ps.
teachersはあった。複数削除できるようにしてみた

@hikahana hikahana self-assigned this Jun 5, 2024
@hikahana hikahana changed the title Feat/hikahana/769 teacher logical delete 教員の論理削除を追加 Jun 6, 2024
Copy link
Collaborator

@Kubosaka Kubosaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

いくつかコメントしました

→指摘してるくせに自分のコードができていなかったみたいです

Comment on lines 65 to 76

export const del = async (url: string, data: number[]) => {
const res = await fetch(url, {
method: 'DELETE',
mode: 'cors',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ deleteIDs: data }),
});
return await res.status;
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これusersと共有みたいだし、まとめてもらってもいい?

Copy link
Collaborator

@Kubosaka Kubosaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメントしました

return res;
};

export const dels = async (url: string, data: number[]) => {
Copy link
Collaborator

@Kubosaka Kubosaka Jun 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

関数名が分かりにくいので、multiDelとかにして欲しいです

@Kubosaka
Copy link
Collaborator

コンフリクトの解消と、
UIなんとかなりませんかね、、、、
スクリーンショット 2024-06-27 0 37 47
自分は右端より少し左のほうがいいかと思いました

Copy link
Collaborator

@Kubosaka Kubosaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Kubosaka Kubosaka merged commit ec320e2 into develop Jul 1, 2024
@Kubosaka Kubosaka deleted the feat/hikahana/769-teacher-logical-delete branch July 1, 2024 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

教員に論理削除の実装

3 participants