mirror of
https://git.meshkee.com/cssd/cssd-front.git
synced 2026-10-12 13:53:16 +03:30
fix : delete confirm modal and style
This commit is contained in:
+13
-16
@@ -2,8 +2,8 @@
|
||||
<v-form ref="form">
|
||||
<v-container grid-list-xs fluid>
|
||||
<material-card color="black" title="Add Cycle">
|
||||
<v-layout wrap class="px-5 my-3">
|
||||
<v-flex xs12 sm6 md4 class="WM-FlexCenter pl-3">
|
||||
<v-layout wrap class="px-3 my-3">
|
||||
<v-flex xs12 sm6 md4 class="WM-FlexCenter ">
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field
|
||||
name="sterilizer_id"
|
||||
@@ -12,7 +12,7 @@
|
||||
v-model="formData.sterilizer_id"
|
||||
class="py-3 pr-3"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm6 md4 class="WM-FlexCenter pl-3">
|
||||
<v-flex xs12 sm6 md4 class="WM-FlexCenter ">
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field
|
||||
name="cycle_number"
|
||||
@@ -85,20 +85,17 @@
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap justify-center align-center>
|
||||
<v-flex xs12 md2 sm2 class="text-md-center text-xs-center">
|
||||
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px" @click="submitForm()">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-check</v-icon>
|
||||
<span class="white--text">SAVE</span>
|
||||
<router-link :to="{name: 'AllCycle'}">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
||||
<v-icon class="black--text">keyboard_arrow_left</v-icon>
|
||||
<span class="black--text">Back</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
<v-flex xs12 md2 sm2 class="text-md-center text-sm-center text-xs-center">
|
||||
<router-link :to="{name: 'AllCycle'}">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
||||
<v-icon class="black--text">keyboard_arrow_left</v-icon>
|
||||
<span class="black--text">Back</span>
|
||||
</v-btn>
|
||||
</router-link>
|
||||
</v-flex>
|
||||
</router-link>
|
||||
<v-spacer/>
|
||||
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px" @click="submitForm()">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-check</v-icon>
|
||||
<span class="white--text">SAVE</span>
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</v-container>
|
||||
|
||||
+22
-18
@@ -2,7 +2,7 @@
|
||||
<div class>
|
||||
<v-container fluid>
|
||||
<material-card class color="black" title="All Cycles" text>
|
||||
<v-layout align-center wrap class="px-5 my-3">
|
||||
<v-layout align-center wrap class="px-3 my-3">
|
||||
<v-flex xs12 sm6 md6 lg3 xl2 class="WM-FlexCenter">
|
||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="py-3 pr-3" v-model="filter.cycle_id" label="Cycle ID"
|
||||
@@ -51,10 +51,10 @@
|
||||
</router-link>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout class="px-4 my-3">
|
||||
<v-layout class="px-3 my-3">
|
||||
<v-divider/>
|
||||
</v-layout>
|
||||
<v-layout align-center wrap class="px-5 my-3">
|
||||
<v-layout align-center wrap class="px-3 my-3">
|
||||
<v-flex md12>
|
||||
<v-data-table :headers="headers" :items="packages" hide-actions>
|
||||
<template slot="headerCell" slot-scope="{ header }">
|
||||
@@ -96,7 +96,7 @@
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn v-bind="attrs" v-on="on" color="pink" class="WM-ActionButton mr-2"
|
||||
@click="remove(item.id)"
|
||||
@click="removeModal(item.id)"
|
||||
v-if="$hasRole('Admin') || item.user_id == $store.state.user.id">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-trash</v-icon>
|
||||
<span>Remove</span>
|
||||
@@ -124,13 +124,14 @@
|
||||
<v-pagination color="black" v-model="currentPage" :length="lastPage"
|
||||
:total-visible="6"/>
|
||||
</div>
|
||||
<v-layout row wrap align-center justify-center class="mt-3">
|
||||
<v-layout row wrap align-center justify-center class="px-3 mt-3">
|
||||
<router-link to="/dashboard">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black ml-5">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
|
||||
<span class="black--text">Back</span>
|
||||
</v-btn>
|
||||
</router-link>
|
||||
<v-spacer/>
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</v-container>
|
||||
@@ -189,10 +190,8 @@ export default {
|
||||
}
|
||||
this.loadMedicalCenters();
|
||||
},
|
||||
async show(testResultId) {
|
||||
const result = await ApiService.get(
|
||||
urls.showCycle(testResultId)
|
||||
);
|
||||
async show(id) {
|
||||
const result = await ApiService.get(urls.showCycle(id));
|
||||
if (result && result.status == 200) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-cycle-show",
|
||||
@@ -209,16 +208,21 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
async remove(testResultId) {
|
||||
const result = await ApiService.delete(
|
||||
urls.removeCycle(testResultId)
|
||||
);
|
||||
removeModal(id) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-delete-delete",
|
||||
properties: {
|
||||
success: () => {
|
||||
this.remove(id);
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
async remove(id) {
|
||||
const result = await ApiService.delete(urls.removeCycle(id));
|
||||
if (result && result.status == 200) {
|
||||
for (const key in this.packages) {
|
||||
if (
|
||||
this.packages.hasOwnProperty(key) &&
|
||||
this.packages[key].id == testResultId
|
||||
) {
|
||||
if (this.packages.hasOwnProperty(key) && this.packages[key].id == id) {
|
||||
this.packages.splice(key, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<v-form ref="form">
|
||||
<v-container grid-list-xs fluid>
|
||||
<material-card color="black" title="Add Instrument">
|
||||
<v-layout align-center justify-center wrap class="px-5 my-3">
|
||||
<v-layout align-center justify-center wrap class="px-3 mb-3">
|
||||
<v-flex xs12 sm6 md6 lg3 class="WM-FlexCenter">
|
||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field name="name" label="Name" color="black" v-model="formData.name"
|
||||
@@ -42,7 +42,7 @@
|
||||
ModelType="Item"/>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout align-center wrap class="px-5 mb-3">
|
||||
<v-layout align-center wrap class="px-3 mb-3">
|
||||
<v-flex xs12 sm12 md12>
|
||||
<v-textarea color="black" v-model="formData.note" class="pa-2" name="address">
|
||||
<template v-slot:label>
|
||||
@@ -51,8 +51,8 @@
|
||||
</v-textarea>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap justify-center align-center>
|
||||
<v-flex xs12 md2 sm2 class="text-md-center text-sm-center text-xs-center">
|
||||
<v-layout row wrap justify-center align-center class="px-3">
|
||||
<v-flex xs12 md2 sm2 class="">
|
||||
<router-link :to="{ name: 'AllItem' }">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
||||
<v-icon class="black--text">keyboard_arrow_left</v-icon>
|
||||
@@ -60,7 +60,8 @@
|
||||
</v-btn>
|
||||
</router-link>
|
||||
</v-flex>
|
||||
<v-flex xs12 md2 sm2 class="text-md-center text-xs-center">
|
||||
<v-spacer/>
|
||||
<v-flex xs12 md2 sm2 class="">
|
||||
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px" @click="submitForm()">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-check</v-icon>
|
||||
<span class="white--text">SAVE</span>
|
||||
|
||||
+21
-20
@@ -2,7 +2,7 @@
|
||||
<div class>
|
||||
<v-container fluid>
|
||||
<material-card class color="black" title="All Items" text>
|
||||
<v-layout align-center wrap class="my-3 px-5">
|
||||
<v-layout align-center wrap class="my-3 px-3">
|
||||
<v-flex xs12 sm4 md4 lg2 xl2 class="WM-FlexCenter">
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="py-3 pr-3" v-model="filter.item_id" label="Item ID"
|
||||
@@ -43,10 +43,10 @@
|
||||
</router-link>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout class="px-4 my-3">
|
||||
<v-layout class="px-3 my-3">
|
||||
<v-divider/>
|
||||
</v-layout>
|
||||
<v-layout align-center wrap class="my-3 px-5">
|
||||
<v-layout align-center wrap class="my-3 px-3">
|
||||
<v-flex md12>
|
||||
<v-data-table :headers="headers" :items="items" hide-actions>
|
||||
<template slot="headerCell" slot-scope="{ header }">
|
||||
@@ -109,7 +109,7 @@
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn v-bind="attrs" v-on="on" color="pink" class="WM-ActionButton mr-2"
|
||||
@click="remove(item.id)"
|
||||
@click="removeModal(item.id)"
|
||||
v-if="$hasRole('Admin|Supervisor') ||( item.user_id == $store.state.user.id && !['approved', 'rejected'].includes(item.status))">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-trash</v-icon>
|
||||
<span>Remove</span>
|
||||
@@ -137,7 +137,7 @@
|
||||
<v-pagination color="black" v-model="currentPage" :length="lastPage"
|
||||
:total-visible="6"/>
|
||||
</div>
|
||||
<v-layout row wrap align-center justify-center class="mt-3">
|
||||
<v-layout row wrap align-center justify-center class="mt-3 px-3">
|
||||
<router-link to="/dashboard">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black ml-5">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
|
||||
@@ -200,9 +200,7 @@ export default {
|
||||
}
|
||||
}
|
||||
filter += (page) ? `page=${page}` : `page=1`;
|
||||
const result = await ApiService.get(
|
||||
urls.listItem(filter)
|
||||
);
|
||||
const result = await ApiService.get(urls.listItem(filter));
|
||||
if (result && result.status == 200) {
|
||||
this.items = result.data.data;
|
||||
this.currentPage = result.data.meta.current_page;
|
||||
@@ -219,10 +217,8 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
async show(testResultId) {
|
||||
const result = await ApiService.get(
|
||||
urls.showItem(testResultId)
|
||||
);
|
||||
async show(id) {
|
||||
const result = await ApiService.get(urls.showItem(id));
|
||||
if (result && result.status == 200) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-item-show",
|
||||
@@ -230,16 +226,21 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
async remove(testResultId) {
|
||||
const result = await ApiService.delete(
|
||||
urls.removeItem(testResultId)
|
||||
);
|
||||
removeModal(id) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-delete-delete",
|
||||
properties: {
|
||||
success: () => {
|
||||
this.remove(id);
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
async remove(id) {
|
||||
const result = await ApiService.delete(urls.removeItem(id));
|
||||
if (result && result.status == 200) {
|
||||
for (const key in this.items) {
|
||||
if (
|
||||
this.items.hasOwnProperty(key) &&
|
||||
this.items[key].id == testResultId
|
||||
) {
|
||||
if (this.items.hasOwnProperty(key) && this.items[key].id == id) {
|
||||
this.items.splice(key, 1);
|
||||
}
|
||||
}
|
||||
|
||||
+13
-15
@@ -2,7 +2,7 @@
|
||||
<v-form ref="form">
|
||||
<v-container grid-list-xs fluid>
|
||||
<material-card color="black" title="Add Label on Set ">
|
||||
<v-layout wrap class="px-5 my-3">
|
||||
<v-layout wrap class="px-3 my-3">
|
||||
<v-flex xs12 sm6 md4 lg3 class="WM-FlexCenter pl-3">
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field name="sterilizerId" label="Sterilizer ID" color="black"
|
||||
@@ -57,21 +57,19 @@
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
<v-layout row wrap justify-center align-center>
|
||||
<v-flex xs12 sm6 md4 lg3 class="text-md-center text-sm-center text-xs-center">
|
||||
<router-link :to="{ name: 'AllLabels' }">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
||||
<v-icon class="black--text">keyboard_arrow_left</v-icon>
|
||||
<span class="black--text">Back</span>
|
||||
</v-btn>
|
||||
</router-link>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm6 md4 lg3 class="text-md-center text-xs-center">
|
||||
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px" @click="submitForm()">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-check</v-icon>
|
||||
<span class="white--text">SAVE</span>
|
||||
<v-layout row wrap justify-center align-center class="px-3">
|
||||
|
||||
<router-link :to="{ name: 'AllLabels' }">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
||||
<v-icon class="black--text">keyboard_arrow_left</v-icon>
|
||||
<span class="black--text">Back</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
</router-link>
|
||||
<v-spacer/>
|
||||
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px" @click="submitForm()">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-check</v-icon>
|
||||
<span class="white--text">SAVE</span>
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</v-container>
|
||||
|
||||
+24
-23
@@ -2,7 +2,7 @@
|
||||
<div class>
|
||||
<v-container fluid>
|
||||
<material-card class color="black" title="All Labels" text>
|
||||
<v-layout align-center wrap class="px-5 my-3">
|
||||
<v-layout align-center wrap class="px-3 my-3">
|
||||
<v-flex xs12 sm6 md6 lg3 xl2 class="WM-FlexCenter">
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="py-3" v-model="filter.label_id" label="Label ID"
|
||||
@@ -49,10 +49,10 @@
|
||||
</router-link>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout class="px-4 my-3">
|
||||
<v-layout class="px-3 my-3">
|
||||
<v-divider/>
|
||||
</v-layout>
|
||||
<v-layout align-center wrap class="px-5 my-3">
|
||||
<v-layout align-center wrap class="px-3 my-3">
|
||||
<v-flex md12>
|
||||
<v-data-table :headers="headers" :items="items" hide-actions>
|
||||
<template slot="headerCell" slot-scope="{ header }">
|
||||
@@ -98,7 +98,7 @@
|
||||
v-bind="attrs" v-on="on"
|
||||
color="pink"
|
||||
class="WM-ActionButton mr-2"
|
||||
@click="remove(item.id)"
|
||||
@click="removeModal(item.id)"
|
||||
v-if="$hasRole('Admin') || item.user_id == $store.state.user.id">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-trash</v-icon>
|
||||
<span>Remove</span>
|
||||
@@ -126,13 +126,14 @@
|
||||
<v-pagination color="black" v-model="currentPage" :length="lastPage"
|
||||
:total-visible="6"/>
|
||||
</div>
|
||||
<v-layout row wrap align-center justify-center class="mt-3">
|
||||
<v-layout row wrap align-center justify-center class="px-3 mt-3">
|
||||
<router-link to="/dashboard">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black ml-5">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
|
||||
<span class="black--text">Back</span>
|
||||
</v-btn>
|
||||
</router-link>
|
||||
<v-spacer/>
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</v-container>
|
||||
@@ -196,15 +197,13 @@ export default {
|
||||
}
|
||||
},
|
||||
async fillUsers() {
|
||||
const result = await ApiService.get(
|
||||
urls.listOpertorMedicalCenter(this.form.medicalCenterId)
|
||||
);
|
||||
const result = await ApiService.get(urls.listOpertorMedicalCenter(this.form.medicalCenterId));
|
||||
if (result && result.status == 200) {
|
||||
this.users = result.data.data.users;
|
||||
}
|
||||
},
|
||||
async show(testResultId) {
|
||||
const result = await ApiService.get(urls.showLabel(testResultId));
|
||||
async show(id) {
|
||||
const result = await ApiService.get(urls.showLabel(id));
|
||||
if (result && result.status == 200) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-label-show",
|
||||
@@ -212,16 +211,21 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
async remove(testResultId) {
|
||||
const result = await ApiService.delete(
|
||||
urls.removeLabel(testResultId)
|
||||
);
|
||||
removeModal(id) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-delete-delete",
|
||||
properties: {
|
||||
success: () => {
|
||||
this.remove(id);
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
async remove(id) {
|
||||
const result = await ApiService.delete(urls.removeLabel(id));
|
||||
if (result && result.status == 200) {
|
||||
for (const key in this.items) {
|
||||
if (
|
||||
this.items.hasOwnProperty(key) &&
|
||||
this.items[key].id == testResultId
|
||||
) {
|
||||
if (this.items.hasOwnProperty(key) && this.items[key].id == id) {
|
||||
this.items.splice(key, 1);
|
||||
}
|
||||
}
|
||||
@@ -246,10 +250,7 @@ export default {
|
||||
},
|
||||
getModalResult(testResult) {
|
||||
for (const key in this.items) {
|
||||
if (
|
||||
this.items.hasOwnProperty(key) &&
|
||||
this.items[key].id == testResult.id
|
||||
) {
|
||||
if (this.items.hasOwnProperty(key) && this.items[key].id == testResult.id) {
|
||||
this.items[key] = testResult;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<v-form ref="form">
|
||||
<v-container grid-list-xs>
|
||||
<material-card class color="black" title="Add Medical Center" text>
|
||||
<v-layout row wrap class="px-5 mb-3">
|
||||
<v-layout row wrap class="px-3 mb-3">
|
||||
<v-flex xs12 sm6 md6 lg3>
|
||||
<v-text-field
|
||||
v-model="medicalCenter.name"
|
||||
@@ -40,27 +40,25 @@
|
||||
/>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap align-center justify-center class="mt-3">
|
||||
<v-flex xs12 sm6 md6 lg3 class="text-center">
|
||||
<router-link :to="{name:'ManageMedicalCenter'}">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
|
||||
<span class="black--text">Back</span>
|
||||
</v-btn>
|
||||
</router-link>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm6 md6 lg3 class="text-center">
|
||||
<v-btn class="WM-CyanBlueGradient-BG" @click="AddMedicalCenter" style="padding:10px 60px">
|
||||
<template v-if="$route.params.medicalCenter">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-edit</v-icon>
|
||||
<span class="white--text">Edit</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
|
||||
<span class="white--text">Add</span>
|
||||
</template>
|
||||
<v-layout row wrap align-center justify-center class="mt-3 px-3">
|
||||
|
||||
<router-link :to="{name:'ManageMedicalCenter'}">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
|
||||
<span class="black--text">Back</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
</router-link>
|
||||
<v-spacer/>
|
||||
<v-btn class="WM-CyanBlueGradient-BG" @click="AddMedicalCenter" style="padding:10px 60px">
|
||||
<template v-if="$route.params.medicalCenter">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-edit</v-icon>
|
||||
<span class="white--text">Edit</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
|
||||
<span class="white--text">Add</span>
|
||||
</template>
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</v-container>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
</v-tooltip>
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn v-bind="attrs" v-on="on" color="pink" @click="remove(item.id)"
|
||||
<v-btn v-bind="attrs" v-on="on" color="pink" @click="removeModal(item.id)"
|
||||
class="WM-ActionButton">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-trash</v-icon>
|
||||
<span>Remove</span>
|
||||
@@ -77,7 +77,7 @@
|
||||
</v-layout>
|
||||
<v-divider/>
|
||||
<div class="text-xs-center mt-2" v-if="lastPage > 1">
|
||||
<v-pagination color="black" v-model="currentPage" :length="lastPage" :total-visible="6"></v-pagination>
|
||||
<v-pagination color="black" v-model="currentPage" :length="lastPage" :total-visible="6"/>
|
||||
</div>
|
||||
<v-layout row wrap align-center justify-center class="mt-3">
|
||||
<router-link :to="{ name: 'Dashboard' }">
|
||||
@@ -129,12 +129,20 @@ export default {
|
||||
this.currentPage = result.data.data.current_page;
|
||||
this.lastPage = result.data.data.last_page;
|
||||
},
|
||||
removeModal(id) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-delete-delete",
|
||||
properties: {
|
||||
success: () => {
|
||||
this.remove(id);
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
async remove(id) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-user-confirmation",
|
||||
properties: {
|
||||
width: '30'
|
||||
},
|
||||
properties: {width: '30'},
|
||||
success: async () => {
|
||||
const result = await ApiService.delete(urls.deleteMedicalCenter(id));
|
||||
this.closeModal();
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
<v-layout row wrap class="px-5 mb-3">
|
||||
<v-flex xs12 md3 xs3>
|
||||
<v-text-field name="Name" v-model="filter.name" label="Name" class="pa-2"
|
||||
color="black"></v-text-field>
|
||||
color="black"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 xs3>
|
||||
<v-text-field name="cell_number" v-model="filter.cell_number" label="Cell Number" class="pa-2"
|
||||
color="black"></v-text-field>
|
||||
color="black"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 md2 xs3>
|
||||
<v-select :items="roles" name="roles" v-model="filter.role" label="Roles" class="pa-2"
|
||||
color="black"></v-select>
|
||||
color="black"/>
|
||||
</v-flex>
|
||||
<v-flex xs12 md2 sm2 class="text-xs-right">
|
||||
<v-btn class="WM-CyanBlueGradient-BG" @click="load" style="padding:10px 30px">
|
||||
@@ -47,11 +47,9 @@
|
||||
<td class="title font-weight-light">{{ item.cell_number }}</td>
|
||||
<td class="title font-weight-light">{{ item.status }}</td>
|
||||
<td class="text-xs-right justify-self-end">
|
||||
<v-btn
|
||||
:color="item.status == 'Active' ? 'red' : 'green'"
|
||||
<v-btn :color="item.status == 'Active' ? 'red' : 'green'"
|
||||
@click="changeStatus(item.id)"
|
||||
class="mr-2 WM-ActionButton"
|
||||
>
|
||||
class="mr-2 WM-ActionButton">
|
||||
<template v-if="item.status == 'Active'">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-user-tag</v-icon>
|
||||
<span v-if="item.status == 'Active'">Suspended</span>
|
||||
@@ -61,11 +59,9 @@
|
||||
<span>Active</span>
|
||||
</template>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
color="orange darken-1"
|
||||
<v-btn color="orange darken-1"
|
||||
@click="changeRoleModal(item)"
|
||||
class="mr-2 WM-ActionButton"
|
||||
>
|
||||
class="mr-2 WM-ActionButton">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-user-tag</v-icon>
|
||||
<span>Role</span>
|
||||
</v-btn>
|
||||
|
||||
+20
-14
@@ -2,7 +2,7 @@
|
||||
<div class>
|
||||
<v-container fluid>
|
||||
<material-card class color="black" title="My Items" text>
|
||||
<v-layout align-center wrap class="my-3 px-5">
|
||||
<v-layout align-center wrap class="my-3 px-3">
|
||||
<v-flex xs12 sm4 md4 lg2 xl2 class="WM-FlexCenter">
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="py-3 pr-3" v-model="getFilters.item_id"
|
||||
@@ -47,10 +47,10 @@
|
||||
</router-link>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout class="px-4 my-3">
|
||||
<v-layout class="px-3 my-3">
|
||||
<v-divider/>
|
||||
</v-layout>
|
||||
<v-layout align-center wrap class="my-3 px-5" v-if="getMyItems">
|
||||
<v-layout align-center wrap class="my-3 px-3" v-if="getMyItems">
|
||||
<v-flex md12>
|
||||
<v-data-table :headers="headers" :items="getMyItems" hide-actions>
|
||||
<template slot="headerCell" slot-scope="{ header }">
|
||||
@@ -110,7 +110,7 @@
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn v-bind="attrs" v-on="on" color="pink" class="WM-ActionButton mr-2"
|
||||
@click="remove(item.id)"
|
||||
@click="removeModal(item.id)"
|
||||
v-if="$hasRole('Admin|Supervisor') ||( item.user_id == $store.state.user.id && !['approved', 'rejected'].includes(item.status))">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-trash</v-icon>
|
||||
<span>Remove</span>
|
||||
@@ -148,13 +148,14 @@
|
||||
<div class="text-xs-center" v-if="lastPage > 1">
|
||||
<v-pagination color="black" v-model="currentPage" :length="lastPage" :total-visible="6"/>
|
||||
</div>
|
||||
<v-layout row wrap align-center justify-center class="mt-3">
|
||||
<v-layout row wrap align-center class="px-3 mt-3">
|
||||
<router-link to="/dashboard">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black ml-5">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
|
||||
<span class="black--text CSSD-font">Back</span>
|
||||
</v-btn>
|
||||
</router-link>
|
||||
<v-spacer/>
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</v-container>
|
||||
@@ -244,16 +245,21 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
async remove(testResultId) {
|
||||
const result = await ApiService.delete(
|
||||
urls.removeItem(testResultId)
|
||||
);
|
||||
removeModal(id) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-delete-delete",
|
||||
properties: {
|
||||
success: () => {
|
||||
this.remove(id);
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
async remove(id) {
|
||||
const result = await ApiService.delete(urls.removeItem(id));
|
||||
if (result && result.status == 200) {
|
||||
for (const key in this.items) {
|
||||
if (
|
||||
this.items.hasOwnProperty(key) &&
|
||||
this.items[key].id == testResultId
|
||||
) {
|
||||
if (this.items.hasOwnProperty(key) && this.items[key].id == id) {
|
||||
this.items.splice(key, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class>
|
||||
<v-container fluid>
|
||||
<material-card class color="black" title="My Packages" text>
|
||||
<v-layout align-center wrap class="mt-3 px-5">
|
||||
<v-layout align-center wrap class="mt-3 px-3">
|
||||
<v-flex xs12 sm6 md4 lg3 xl2 class="WM-FlexCenter">
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="py-3 pr-3" v-model="filter.package_id" label="Package ID"
|
||||
@@ -35,10 +35,10 @@
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
<v-layout class="px-4 my-3">
|
||||
<v-layout class="px-3 my-3">
|
||||
<v-divider/>
|
||||
</v-layout>
|
||||
<v-layout align-center wrap class="my-3 px-5">
|
||||
<v-layout align-center wrap class="my-3 px-3">
|
||||
<v-flex md12>
|
||||
<v-data-table :headers="headers" :items="items" hide-actions>
|
||||
<template slot="headerCell" slot-scope="{ header }">
|
||||
@@ -62,9 +62,7 @@
|
||||
<v-btn :color="status.color" class="mr-2"
|
||||
@click="changeStatus(item, status.status)" v-bind="attrs"
|
||||
v-on="on">
|
||||
<v-icon class="white--text mr-1 caption">fas {{
|
||||
status.icon
|
||||
}}
|
||||
<v-icon class="white--text mr-1 caption">fas {{ status.icon }}
|
||||
</v-icon>
|
||||
<span>{{ status.label }}</span>
|
||||
</v-btn>
|
||||
@@ -101,7 +99,7 @@
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn v-bind="attrs" v-on="on" color="pink" class="WM-ActionButton mr-2"
|
||||
@click="remove(item.id)"
|
||||
@click="removeModal(item.id)"
|
||||
v-if="$hasRole('Admin|Supervisor') ||( item.user_id == $store.state.user.id && !['approved', 'rejected'].includes(item.status))">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-trash</v-icon>
|
||||
<span>Remove</span>
|
||||
@@ -140,13 +138,14 @@
|
||||
<v-pagination color="black" v-model="currentPage" :length="lastPage"
|
||||
:total-visible="6"/>
|
||||
</div>
|
||||
<v-layout row wrap align-center justify-center class="mt-3">
|
||||
<v-layout row wrap align-center justify-center class="mt-3 px-3">
|
||||
<router-link to="/dashboard">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black ml-5">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
|
||||
<span class="black--text">Back</span>
|
||||
</v-btn>
|
||||
</router-link>
|
||||
<v-spacer/>
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</v-container>
|
||||
@@ -208,8 +207,8 @@ export default {
|
||||
}
|
||||
this.loadMedicalCenters();
|
||||
},
|
||||
async show(testResultId) {
|
||||
const result = await ApiService.get(urls.showPackage(testResultId));
|
||||
async show(id) {
|
||||
const result = await ApiService.get(urls.showPackage(id));
|
||||
if (result && result.status == 200) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-package-show",
|
||||
@@ -217,11 +216,21 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
async remove(testResultId) {
|
||||
const result = await ApiService.delete(urls.removePackage(testResultId));
|
||||
removeModal(id) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-delete-delete",
|
||||
properties: {
|
||||
success: () => {
|
||||
this.remove(id);
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
async remove(id) {
|
||||
const result = await ApiService.delete(urls.removePackage(id));
|
||||
if (result && result.status == 200) {
|
||||
for (const key in this.items) {
|
||||
if (this.items.hasOwnProperty(key) && this.items[key].id == testResultId) {
|
||||
if (this.items.hasOwnProperty(key) && this.items[key].id == id) {
|
||||
this.items.splice(key, 1);
|
||||
}
|
||||
}
|
||||
|
||||
+19
-13
@@ -2,7 +2,7 @@
|
||||
<div class>
|
||||
<v-container fluid>
|
||||
<material-card class color="black" title="All Packages" text>
|
||||
<v-layout align-center wrap class="mt-3 px-5">
|
||||
<v-layout align-center wrap class="mt-3 px-3">
|
||||
<v-flex xs12 sm6 md4 lg3 xl2 class="WM-FlexCenter">
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="py-3 pr-3" v-model="filter.package_id" label="Package ID"
|
||||
@@ -43,10 +43,10 @@
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
<v-layout class="px-4 my-3">
|
||||
<v-layout class="px-3 my-3">
|
||||
<v-divider/>
|
||||
</v-layout>
|
||||
<v-layout align-center wrap class="my-3 px-5">
|
||||
<v-layout align-center wrap class="my-3 px-3">
|
||||
<v-flex md12>
|
||||
<v-data-table :headers="headers" :items="items" hide-actions>
|
||||
<template slot="headerCell" slot-scope="{ header }">
|
||||
@@ -112,7 +112,7 @@
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn v-bind="attrs" v-on="on" color="pink" class="WM-ActionButton mr-2"
|
||||
@click="remove(item.id)"
|
||||
@click="removeModal(item.id)"
|
||||
v-if="$hasRole('Admin|Supervisor') ||( item.user_id == $store.state.user.id && !['approved', 'rejected'].includes(item.status))">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-trash</v-icon>
|
||||
<span>Remove</span>
|
||||
@@ -140,13 +140,14 @@
|
||||
<v-pagination color="black" v-model="currentPage" :length="lastPage"
|
||||
:total-visible="6"></v-pagination>
|
||||
</div>
|
||||
<v-layout row wrap align-center justify-center class="mt-3">
|
||||
<v-layout row wrap align-center justify-center class="mt-3 px-3">
|
||||
<router-link to="/dashboard">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black ml-5">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
|
||||
<span class="black--text">Back</span>
|
||||
</v-btn>
|
||||
</router-link>
|
||||
<v-spacer/>
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</v-container>
|
||||
@@ -220,16 +221,21 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
removeModal(id) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-delete-delete",
|
||||
properties: {
|
||||
success: () => {
|
||||
this.remove(id);
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
async remove(testResultId) {
|
||||
const result = await ApiService.delete(
|
||||
urls.removePackage(testResultId)
|
||||
);
|
||||
const result = await ApiService.delete(urls.removePackage(testResultId));
|
||||
if (result && result.status == 200) {
|
||||
for (const key in this.items) {
|
||||
if (
|
||||
this.items.hasOwnProperty(key) &&
|
||||
this.items[key].id == testResultId
|
||||
) {
|
||||
if (this.items.hasOwnProperty(key) && this.items[key].id == testResultId) {
|
||||
this.items.splice(key, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
<v-data-table :headers="headers" :items="items" hide-actions>
|
||||
<template slot="headerCell" slot-scope="{ header }">
|
||||
<span class="subheading font-weight-light text-white text--darken-3"
|
||||
style="border-radius: 5px;"
|
||||
v-text="header.text"/>
|
||||
</template>
|
||||
<template slot="items" slot-scope="{ item }">
|
||||
@@ -86,10 +87,10 @@
|
||||
<td class="title font-weight-light">{{ item.user.name }}</td>
|
||||
<td class="title font-weight-light">
|
||||
<span v-if="item.result == 'Reject'" class="ResultMsg Reject">
|
||||
{{item.result}}
|
||||
{{ item.result }}
|
||||
</span>
|
||||
<span v-else-if="item.result == 'Accept'" class="ResultMsg Accept">
|
||||
{{item.result}}
|
||||
{{ item.result }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="title font-weight-light">{{ $d(new Date(item.created_at), 'long') }}</td>
|
||||
@@ -141,7 +142,7 @@
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<!-- v-if="$hasRole('Admin') || item.user_id == $store.state.user.id" -->
|
||||
<v-btn color="pink" class="WM-ActionButton" @click="remove(item.id)"
|
||||
<v-btn color="pink" class="WM-ActionButton" @click="removeModal(item.id)"
|
||||
v-if="$hasRole('Admin') || (item.user_id == $store.state.user.id && item.verified == 'None')"
|
||||
v-bind="attrs" v-on="on">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-trash</v-icon>
|
||||
@@ -199,9 +200,9 @@ export default {
|
||||
{sortable: false, text: "Test Type", value: "TestType"},
|
||||
{sortable: false, text: "Hospital", value: "Hospital"},
|
||||
{sortable: false, text: "User", value: "Users"},
|
||||
{sortable: false, text: "Result", value: "result",width:'5%'},
|
||||
{sortable: false, text: "Result", value: "result", width: '5%'},
|
||||
{sortable: false, text: "Date", value: "date"},
|
||||
{sortable: false, text: "Verify", value: "verify",width:'5%'},
|
||||
{sortable: false, text: "Verify", value: "verify", width: '5%'},
|
||||
{sortable: false, text: "Action", value: "action", align: "center",}
|
||||
],
|
||||
filter: {
|
||||
@@ -291,9 +292,7 @@ export default {
|
||||
filter += `verified=${verified}&`;
|
||||
}
|
||||
filter += (page) ? `page=${page}` : `page=1`;
|
||||
const result = await ApiService.get(
|
||||
urls.listTestResult(filter)
|
||||
);
|
||||
const result = await ApiService.get(urls.listTestResult(filter));
|
||||
if (result && result.status == 200) {
|
||||
const {data, meta} = result.data;
|
||||
this.items = data;
|
||||
@@ -301,10 +300,8 @@ export default {
|
||||
this.lastPage = meta.last_page;
|
||||
}
|
||||
},
|
||||
async show(testResultId) {
|
||||
const result = await ApiService.get(
|
||||
urls.showTestResult(testResultId)
|
||||
);
|
||||
async show(id) {
|
||||
const result = await ApiService.get(urls.showTestResult(id));
|
||||
if (result && result.status == 200) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-testresult-show",
|
||||
@@ -314,16 +311,21 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
async remove(testResultId) {
|
||||
const result = await ApiService.delete(
|
||||
urls.removeTestResult(testResultId)
|
||||
);
|
||||
removeModal(id) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-delete-delete",
|
||||
properties: {
|
||||
success: () => {
|
||||
this.remove(id);
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
async remove(id) {
|
||||
const result = await ApiService.delete(urls.removeTestResult(id));
|
||||
if (result && result.status == 200) {
|
||||
for (const key in this.items) {
|
||||
if (
|
||||
this.items.hasOwnProperty(key) &&
|
||||
this.items[key].id == testResultId
|
||||
) {
|
||||
if (this.items.hasOwnProperty(key) && this.items[key].id == id) {
|
||||
this.items.splice(key, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<v-container fluid>
|
||||
<material-card class color="black" title="TestType List" text>
|
||||
<v-layout wrap class="px-5 mb-3">
|
||||
<v-layout wrap class="px-3 mb-3">
|
||||
<v-flex xs12 sm6 md6 lg3 xl2 class="WM-FlexCenter pl-3">
|
||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="py-3 pr-3" label="Name" v-model="filter.name" color="black"/>
|
||||
@@ -73,10 +73,10 @@
|
||||
</router-link>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout class="px-4 my-3">
|
||||
<v-layout class="px-3 my-3">
|
||||
<v-divider/>
|
||||
</v-layout>
|
||||
<v-layout align-center justify-center wrap class="px-5 mt-3">
|
||||
<v-layout align-center justify-center wrap class="px-3 mt-3">
|
||||
<v-flex md12>
|
||||
<v-data-table :headers="headers" :items="items" hide-actions>
|
||||
<template slot="headerCell" slot-scope="{ header }">
|
||||
@@ -132,13 +132,14 @@
|
||||
<div class="text-xs-center mt-2" v-if="lastPage > 1">
|
||||
<v-pagination color="black" v-model="currentPage" :length="lastPage" :total-visible="6"/>
|
||||
</div>
|
||||
<v-layout row wrap align-center justify-center class="mt-3">
|
||||
<v-layout row wrap align-center justify-center class="px-3 mt-3">
|
||||
<router-link to="/dashboard">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black ml-5">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
|
||||
<span class="black--text">Back</span>
|
||||
</v-btn>
|
||||
</router-link>
|
||||
<v-spacer/>
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</v-container>
|
||||
|
||||
+22
-13
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<v-container grid-list-xs>
|
||||
<material-card color="black" title="Member List">
|
||||
<v-layout align-center justify-center wrap class="px-5 mb-3">
|
||||
<v-layout align-center justify-center wrap class="px-3 mb-3">
|
||||
<v-flex xs12 sm6 md6 lg3 xl2 class="WM-FlexCenter">
|
||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
|
||||
<v-text-field class="py-3 pr-3" color="black" name="name" label="Name"
|
||||
@@ -22,8 +22,8 @@
|
||||
<v-select class="py-3 pr-3" color="black" name="role" label="Role" :items="roles"
|
||||
v-model="filter.role"/>
|
||||
</v-flex>
|
||||
<!-- </v-layout>
|
||||
<v-layout class="px-5 mb-3">-->
|
||||
<!-- </v-layout>
|
||||
<v-layout class="px-5 mb-3">-->
|
||||
<v-flex xs12 sm6 md6 lg3 xl2 class="WM-FlexCenter">
|
||||
<v-icon class="far fa-calendar-alt mr-2"/>
|
||||
<v-menu lazy :close-on-content-click="true" transition="v-scale-transition" offset-y
|
||||
@@ -44,7 +44,7 @@
|
||||
:date-format="date => new Date(date).toDateString()"/>
|
||||
</v-menu>
|
||||
</v-flex>
|
||||
<v-spacer/>
|
||||
<v-spacer/>
|
||||
<v-flex wrap xs12 sm12 class="WM-Align-R ml-4">
|
||||
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 30px" @click="load(undefined)">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-search</v-icon>
|
||||
@@ -53,10 +53,10 @@
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
<v-layout class="px-4 my-3">
|
||||
<v-layout class="px-3 my-3">
|
||||
<v-divider/>
|
||||
</v-layout>
|
||||
<v-layout align-center justify-center wrap class="px-5 my-2">
|
||||
<v-layout align-center justify-center wrap class="px-3 my-2">
|
||||
<v-flex xs12 md12 sm12>
|
||||
<v-data-table :headers="headers" :items="items" hide-actions>
|
||||
<template slot="headerCell" slot-scope="{ header }">
|
||||
@@ -107,7 +107,7 @@
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn v-bind="attrs" v-on="on" color="pink" v-if="$hasRole('Admin')"
|
||||
class="WM-ActionButton" @click="remove(item.id)">
|
||||
class="WM-ActionButton" @click="removeModal(item.id)">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-trash</v-icon>
|
||||
<span>Remove</span>
|
||||
</v-btn>
|
||||
@@ -119,19 +119,20 @@
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout class="px-4 my-3">
|
||||
<v-layout class="px-3 my-3">
|
||||
<v-divider/>
|
||||
</v-layout>
|
||||
<div class="text-xs-center mt-2" v-if="lastPage > 1">
|
||||
<v-pagination color="black" v-model="currentPage" :length="lastPage" :total-visible="6"/>
|
||||
</div>
|
||||
<v-layout row wrap align-center justify-center class="mt-3">
|
||||
<v-layout row wrap align-center justify-center class="px-3 mt-3">
|
||||
<router-link :to="{ name: 'Dashboard' }">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black ml-5">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
|
||||
<span class="black--text">Back</span>
|
||||
</v-btn>
|
||||
</router-link>
|
||||
<v-spacer/>
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</v-container>
|
||||
@@ -236,6 +237,16 @@ export default {
|
||||
properties: {user}
|
||||
});
|
||||
},
|
||||
removeModal(id) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-delete-delete",
|
||||
properties: {
|
||||
success: () => {
|
||||
this.remove(id);
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
async remove(userId) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-user-confirmation",
|
||||
@@ -248,9 +259,7 @@ export default {
|
||||
this.closeModal();
|
||||
if (result && result.status == 200) {
|
||||
for (const key in this.items) {
|
||||
if (
|
||||
this.items[key].id == userId
|
||||
) {
|
||||
if (this.items[key].id == userId) {
|
||||
this.items.splice(key, 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user