Skip to content

Commit 5c41329

Browse files
committed
delete, et dev
1 parent bcc9983 commit 5c41329

File tree

4 files changed

+43
-6
lines changed

4 files changed

+43
-6
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ dev:
1717
docker run --rm -it \
1818
-e NODE_ENV=development \
1919
-e NODE_TLS_REJECT_UNAUTHORIZED=0 \
20+
-e DEV=1 \
2021
--add-host host.docker.internal:host-gateway \
2122
--name $(APPNAME) \
2223
--network dev \
2324
-p $(APP_PORT):3000 \
2425
-p 24678:24678 \
2526
-v $(CURDIR):/data \
26-
$(IMGNAME) yarn dev
27+
$(IMGNAME)
2728

2829
prod:
2930
docker run --rm -it \

entrypoint.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash
22

33
/data/scripts/checkinstall.sh
4-
yarn run start:prod
4+
if [ "$DEV" = "1" ];then
5+
yarn dev
6+
else
7+
yarn run start:prod
8+
fi
59

src/pages/identities/fusion.vue

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<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>
29-
<q-btn round size="sm" color="green" icon="mdi-account-remove">
29+
<q-btn round size="sm" color="green" icon="mdi-account-remove" @click="deleteDialog(props.cols[0].value,props.cols[5].value)">
3030
<q-tooltip class="text-body2">supprimer l'identité</q-tooltip>
3131
</q-btn>
3232
</template>
@@ -37,7 +37,7 @@
3737
<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>
40-
<q-btn round size="sm" color="red" icon="mdi-account-remove">
40+
<q-btn round size="sm" color="red" icon="mdi-account-remove" @click="deleteDialog(props.cols[5].value,props.cols[0].value)">
4141
<q-tooltip class="text-body2">supprimer l'identité</q-tooltip>
4242
</q-btn>
4343
</template>
@@ -106,7 +106,6 @@ const actions = {
106106
return {...data._data?.data}
107107
}
108108
}
109-
110109
const { data: rows1, pending, error, refresh } = await useHttp('/management/identities/duplicates', {
111110
method: 'GET',
112111
transform: (result)=>{
@@ -173,6 +172,39 @@ function closeModal(){
173172
editForm.value=false
174173
refresh()
175174
}
175+
async function deleteDialog(id){
176+
$q.dialog({
177+
title: 'supprimer cette identité',
178+
message: 'Voulez-vous supprimer cette identité ?',
179+
persistent: true,
180+
html: true,
181+
ok: {
182+
push: true,
183+
color: 'positive',
184+
label: 'Supprimer',
185+
},
186+
cancel: {
187+
push: true,
188+
color: 'negative',
189+
label: 'Annuler',
190+
},
191+
}).onOk(async () => {
192+
const data=await deleteIdentity(id)
193+
refresh()
194+
})
195+
}
196+
async function deleteIdentity(id) {
197+
await $http.post('/core/backends/delete', {
198+
method: 'POST',
199+
body: {
200+
payload: [
201+
id,
202+
],
203+
},
204+
}).catch(error => {
205+
console.error('There was an error!', error);
206+
})
207+
}
176208
</script>
177209
<style>
178210
.leftid {

src/pages/identities/outdated.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<q-table
33
flat bordered
4-
title="Identités dons l'invitation n'est plus valide"
4+
title="Identités dont l'invitation n'est plus valide"
55
dense
66
:rows="rows1"
77
:columns="fieldsName"

0 commit comments

Comments
 (0)