투표컨펌 추가가

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,26 +184,30 @@ const addContents = (itemList, voteId) => {
} }
// //
const endVoteId = (endVoteId) => { const endVoteId = (endVoteId) => {
$api.patch('vote/updateEndData',{ if(confirm('투표를 종료하시겠습니까?')){
endVoteId :endVoteId $api.patch('vote/updateEndData',{
}).then((res)=>{ endVoteId :endVoteId
if(res.data.status === 'OK'){ }).then((res)=>{
getvoteList(); if(res.data.status === 'OK'){
isModalOpen.value = false; getvoteList();
} isModalOpen.value = false;
}) }
})
}
} }
// //
const voteDelete =(id) =>{ const voteDelete =(id) =>{
$api.patch('vote/updateDeleteData',{ if(confirm('투표를 삭제하시겠습니까?')){
deleteVoteId :id $api.patch('vote/updateDeleteData',{
}).then((res)=>{ deleteVoteId :id
if(res.data.status === 'OK'){ }).then((res)=>{
toastStore.onToast('투표가 삭제되었습니다.', 's'); if(res.data.status === 'OK'){
getvoteList(); toastStore.onToast('투표가 삭제되었습니다.', 's');
isModalOpen.value = false; getvoteList();
} isModalOpen.value = false;
}) }
})
}
} }
// 14 ... // 14 ...
const truncateTitle = title => { const truncateTitle = title => {

View File

@ -138,13 +138,15 @@ const checkedNames = (numList) => {
} }
// //
const endVoteId = (endVoteId) => { const endVoteId = (endVoteId) => {
$api.patch('vote/updateEndData',{ if(confirm('투표를 종료하시겠습니까?')){
endVoteId :endVoteId $api.patch('vote/updateEndData',{
}).then((res)=>{ endVoteId :endVoteId
if(res.data.status === 'OK'){ }).then((res)=>{
getvoteList(); if(res.data.status === 'OK'){
} getvoteList();
}) }
})
}
} }
// //
const voteEnded = async (id) =>{ const voteEnded = async (id) =>{
@ -152,7 +154,7 @@ const voteEnded = async (id) =>{
} }
// //
const voteDelete =(id) =>{ const voteDelete =(id) =>{
if(confirm('투표를 삭제 하시겠습니까?')){ if(confirm('투표를 삭제하시겠습니까?')){
$api.patch('vote/updateDeleteData',{ $api.patch('vote/updateDeleteData',{
deleteVoteId :id deleteVoteId :id
}).then((res)=>{ }).then((res)=>{