Skip to content

Commit

Permalink
Fix/delete error (#87)
Browse files Browse the repository at this point in the history
* refactor: optimize department upload performance

* chore: update-dependency

* refactor: add success message
  • Loading branch information
garyellow authored May 13, 2024
1 parent 07bebe0 commit 059a516
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Binary file modified bun.lockb
Binary file not shown.
7 changes: 3 additions & 4 deletions pages/admin/editDepartment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -195,16 +195,15 @@ const deleteGroupData = async () => {
ElMessage.error("刪除失敗");
})
.finally(() => {
ElMessage.success("刪除成功");
queryInput.value = "";
departmentIdStatus.value = studentIdStatusEnum.noInput;
electorCountRefresh();
electorDetailRefresh();
});
deletingDialogVisible.value = false;
ElMessage({
type: "success",
message: "刪除成功",
});
})
.catch(() => {
ElMessage({
Expand Down
5 changes: 2 additions & 3 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ model Voting {
archive Boolean @default(false)
groupId Int
group Group @relation(fields: [groupId], references: [id])
group Group @relation(fields: [groupId], references: [id], onDelete: Cascade)
votingFromGroup VotingFromGroup[]
Expand Down Expand Up @@ -66,7 +66,6 @@ model Department {
name String @unique
voters Voter[]
departmentInGroup DepartmentInGroup[]
}

Expand Down Expand Up @@ -103,4 +102,4 @@ model VotingFromGroup {

model Admin {
id Int @id
}
}

1 comment on commit 059a516

@vercel
Copy link

@vercel vercel bot commented on 059a516 May 13, 2024

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

ntpusu-vote – ./

ntpusu-vote-git-main-ntpusu.vercel.app
ntpusu-vote.vercel.app
ntpusu-vote-ntpusu.vercel.app

Please sign in to comment.