Skip to content

Commit 4086ad0

Browse files
committed
Update fusion.vue
1 parent 78a9b99 commit 4086ad0

File tree

1 file changed

+28
-7
lines changed

1 file changed

+28
-7
lines changed

src/pages/identities/fusion.vue

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,21 +136,42 @@ async function edit(id,colorClass){
136136
cnColor.value=colorClass
137137
cn.value=identity.value.inetOrgPerson.cn
138138
editForm.value=true
139-
140139
}
141-
function fusion1(key,k){
142-
alert("key :" + key +" key1 : "+k)
140+
141+
async function fusion1(id1,id2){
142+
$q.dialog({
143+
title: 'Fusion des deux identités',
144+
message: 'Voulez-vous fusionner ces deux identités ?',
145+
persistent: true,
146+
html: true,
147+
ok: {
148+
push: true,
149+
color: 'positive',
150+
label: 'Fusionner',
151+
},
152+
cancel: {
153+
push: true,
154+
color: 'negative',
155+
label: 'Annuler',
156+
},
157+
}).onOk(async () => {
158+
const requestOptions={method: 'POST',
159+
body:JSON.stringify({id1:id1,id2:id2})}
160+
const data=await $http.post('/management/identities/fusion', requestOptions)
161+
.catch(error => {
162+
console.error('There was an error!', error);
163+
})
164+
edit(data._data.newId,"dark")
165+
})
143166
}
167+
144168
async function submit() {
145169
form.value.submit()
146170
refreshWindows.value=true
147171
}
148172
function closeModal(){
149-
if (refreshWindows.value === true){
150-
window.location.href="/identities/fusion"
151-
refreshWindows.value=false
152-
}
153173
editForm.value=false
174+
refresh()
154175
}
155176
</script>
156177
<style>

0 commit comments

Comments
 (0)