투표컨펌 추가가

This commit is contained in:
khj0414 2025-04-08 16:13:07 +09:00
parent 15104c2f44
commit f37c8ec947
2 changed files with 31 additions and 25 deletions

View File

@ -184,6 +184,7 @@ const addContents = (itemList, voteId) => {
}
//
const endVoteId = (endVoteId) => {
if(confirm('투표를 종료하시겠습니까?')){
$api.patch('vote/updateEndData',{
endVoteId :endVoteId
}).then((res)=>{
@ -193,8 +194,10 @@ const endVoteId = (endVoteId) => {
}
})
}
}
//
const voteDelete =(id) =>{
if(confirm('투표를 삭제하시겠습니까?')){
$api.patch('vote/updateDeleteData',{
deleteVoteId :id
}).then((res)=>{
@ -205,6 +208,7 @@ const voteDelete =(id) =>{
}
})
}
}
// 14 ...
const truncateTitle = title => {
return title.length > 10 ? title.slice(0, 10) + '...' : title;

View File

@ -138,6 +138,7 @@ const checkedNames = (numList) => {
}
//
const endVoteId = (endVoteId) => {
if(confirm('투표를 종료하시겠습니까?')){
$api.patch('vote/updateEndData',{
endVoteId :endVoteId
}).then((res)=>{
@ -146,6 +147,7 @@ const endVoteId = (endVoteId) => {
}
})
}
}
//
const voteEnded = async (id) =>{
await endVoteId(id.id);