fix : update delete confirmation modal and test result style

This commit is contained in:
zeinab.ashrafi
2025-04-21 14:27:47 +03:30
parent 69e44905ff
commit 32e8bb910f
13 changed files with 149 additions and 267 deletions
+12 -46
View File
@@ -63,12 +63,11 @@
<span class="subheading font-weight-light text-white text--darken-3" v-text="header.text"/>
</template>
<template slot="items" slot-scope="{ item }">
<td class="headline font-weight-light">
{{ item.name }}
<br>
<span class="WM-Font-14">{{ item.cell_number }}</span>
<td class="title font-weight-light">{{ item.name }}</td>
<td class="title font-weight-light">{{ item.cell_number }}</td>
<td class="title font-weight-light">
<span class="WM-Font-14">{{ $d(new Date(item.created_at), 'long') }}</span>
</td>
<td class="title font-weight-light">{{ $d(new Date(item.created_at), 'long') }}</td>
<td class="title font-weight-light">
<span v-for="(role, key) in item.roles" :key="key">{{ role.name }}</span>
</td>
@@ -153,32 +152,12 @@ export default {
},
data: () => ({
headers: [
{
sortable: true,
text: "Operator",
value: "name"
},
{
sortable: false,
text: "Date",
value: "date"
},
{
sortable: false,
text: "Role",
value: "role"
},
{
sortable: true,
text: "Hospital",
value: "hospital"
},
{
sortable: false,
text: "Action",
value: "action",
align: "right",
}
{sortable: false, text: "Operator", value: "name",width:'25%'},
{sortable: false, text: "Cell Number", value: "cell number"},
{sortable: false, text: "Date", value: "date" ,width:'20%'},
{sortable: false, text: "Role", value: "role"},
{sortable: false, text: "Hospital", value: "hospital"},
{sortable: false, text: "Action", value: "action", align: "right",}
],
filter: {
name: "",
@@ -237,23 +216,10 @@ export default {
properties: {user}
});
},
removeModal(id) {
this.changeCurrentModal({
modal: "modal-delete-delete",
properties: {
success: () => {
this.remove(id);
},
}
});
},
async remove(userId) {
removeModal(userId) {
this.changeCurrentModal({
modal: "modal-user-confirmation",
properties: {
userId,
width: '30'
},
properties: {userId, width: '30'},
success: async () => {
const result = await ApiService.delete(urls.deleteUser(userId));
this.closeModal();