2323 <q-btn round size =" sm" color =" green" icon =" mdi-account-edit" @click =" edit(col.value,'text-positive')" >
2424 <q-tooltip class =" text-body2" >Editer l'identité</q-tooltip >
2525 </q-btn >
26- <q-btn round size =" sm" color =" green" icon =" mdi-account-multiple" >
26+ <q-btn round size =" sm" color =" green" icon =" mdi-account-multiple" @click = " fusion1(props.cols[0].value,props.cols[5].value) " >
2727 <q-tooltip class =" text-body2" >fusionner les deux identités</q-tooltip >
2828 </q-btn >
2929 <q-btn round size =" sm" color =" green" icon =" mdi-account-remove" >
3434 <q-btn round size =" sm" color =" red" icon =" mdi-account-edit" @click =" edit(col.value,'text-negative')" >
3535 <q-tooltip class =" text-body2" >Editer l'identité</q-tooltip >
3636 </q-btn >
37- <q-btn round size =" sm" color =" red" icon =" mdi-account-multiple" >
37+ <q-btn round size =" sm" color =" red" icon =" mdi-account-multiple" @click = " fusion1(props.cols[5].value,props.cols[0].value) " >
3838 <q-tooltip class =" text-body2" >fusionner les deux identités</q-tooltip >
3939 </q-btn >
4040 <q-btn round size =" sm" color =" red" icon =" mdi-account-remove" >
5757 <q-btn class =" q-mx-xs" icon =" mdi-check" color =" positive" @click =" submit" >
5858 <q-tooltip >Enregistrer</q-tooltip >
5959 </q-btn >
60- <q-btn class =" q-mx-xs" icon =" mdi-close" color =" negative" v-close-popup >
60+ <q-btn class =" q-mx-xs" icon =" mdi-close" color =" negative" @click = " closeModal " >
6161 <q-tooltip >Quitter</q-tooltip >
6262 </q-btn >
6363 </q-card-section >
@@ -82,8 +82,10 @@ const editForm=ref(false)
8282const identity = ref (null )
8383const cn = ref (" " )
8484const cnColor = ref (" text-positive" )
85+ const refreshWindows = ref (false )
8586const rows = []
8687const form = ref (null )
88+ // attention si l'ordre des colonnes changent changer le @click des boutons fusion
8789const fieldsName = [
8890 {name: ' id1' ,label: ' action' ,field: ' id1' , align: ' center' ,classes: " leftidlight" },
8991 {name: ' uid1' ,label: ' identité 1' ,field: ' uid1' , align: ' left' ,classes: " leftid" },
@@ -111,7 +113,7 @@ const { data: rows1, pending, error, refresh } = await useHttp('/management/iden
111113
112114 const allFields = result .data .map ((enr )=> {
113115 return {
114- k: enr .k + ' = ' + enr . k1 ,
116+ k: enr .k ,
115117 id1: enr .data .at (0 )._id ,
116118 uid1: enr .data .at (0 ).uid ,
117119 cn1: enr .data .at (0 ).cn ,
@@ -134,11 +136,21 @@ async function edit(id,colorClass){
134136 cnColor .value = colorClass
135137 cn .value = identity .value .inetOrgPerson .cn
136138 editForm .value = true
139+
140+ }
141+ function fusion1 (key ,k ){
142+ alert (" key :" + key + " key1 : " + k)
137143}
138144async function submit () {
139145 form .value .submit ()
146+ refreshWindows .value = true
147+ }
148+ function closeModal (){
149+ if (refreshWindows .value === true ){
150+ window .location .href = " /identities/fusion"
151+ refreshWindows .value = false
152+ }
140153 editForm .value = false
141- window .location .href = " /identities/fusion"
142154}
143155< / script>
144156< style>
0 commit comments