fix : style and items

This commit is contained in:
zeinab.ashrafi
2025-03-26 14:30:47 +03:30
parent 34d5e53160
commit 24035f0f7f
17 changed files with 260 additions and 289 deletions
+61 -52
View File
@@ -1,54 +1,34 @@
<template> <template>
<v-navigation-drawer id="app-drawer" v-model="inputValue" app absolute dark floating persistent <v-navigation-drawer id="app-drawer" v-model="inputValue" class="black" app absolute dark floating persistent
mobile-break-point="991" mobile-break-point="991"
width="260"> width="260">
<v-img :src="image" height="100%"> <v-img :src="image" height="100%">
<v-layout class="fill-height" tag="v-list" column> <v-layout class="fill-height px-3" tag="v-list" column>
<v-list-tile avatar> <v-list-tile avatar class="px-3 pt-4">
<v-list-tile-avatar color="white">
<!-- <v-img
:src="logo"
height="34"
contain
/> -->
</v-list-tile-avatar>
<v-list-tile-title class="title "> <v-list-tile-title class="title ">
{{ $store.state.user.name }} <p class="user-name mb-0">{{ $store.state.user.name }}</p>
<br/> <p class="hospital-name mb-0">{{ $store.state.user.medical_center?.name }}</p>
{{ $store.state.user.medical_center?.name }} <v-chip small class="user-role mx-0" color="#323232" text-color="#dcdcdc">
<v-chip small class="user-role" color="#3a3a3a" text-color="#c3c3c3">
{{ $store.state.roles[0] }} {{ $store.state.roles[0] }}
</v-chip> </v-chip>
</v-list-tile-title> </v-list-tile-title>
</v-list-tile> </v-list-tile>
<v-divider/> <v-divider class="mb-1"/>
<v-list-tile v-if="responsive"> <v-list-tile v-if="responsive">
<v-text-field class="purple-input search-input" label="Search..." color="purple"/> <v-text-field class="purple-input search-input" label="Search..." color="purple"/>
</v-list-tile> </v-list-tile>
<template v-for="(link, i) in links"> <template v-for="(link, i) in links">
<v-list-tile v-if="!link.role || $hasRole(link.role)" :key="i" :to="link.to" :active-class="color" <v-list-tile v-if="!link.role || $hasRole(link.role)" :key="i" :to="link.to" :active-class="color"
avatar avatar
class="v-list-item "> class="v-list-item ">
<v-list-tile-action> <!-- <v-list-tile-action>-->
<v-icon>{{ link.icon }}</v-icon> <!-- <v-icon>{{ link.icon }}</v-icon>-->
</v-list-tile-action> <!-- </v-list-tile-action>-->
<v-list-tile-title v-text="link.text"/> <v-list-tile-title v-text="link.text"/>
</v-list-tile> </v-list-tile>
<v-divider class="my-1" v-if="(!link.role || $hasRole(link.role)) && link.line"/>
</template> </template>
<!-- <v-list-tile
disabled
active-class="primary"
class="v-list-item v-list__tile--buy"
to="/upgrade"
>
<v-list-tile-action>
<v-icon>mdi-package-up</v-icon>
</v-list-tile-action>
<v-list-tile-title class="font-weight-light">
Upgrade To PRO
</v-list-tile-title>
</v-list-tile> -->
</v-layout> </v-layout>
</v-img> </v-img>
</v-navigation-drawer> </v-navigation-drawer>
@@ -83,7 +63,8 @@ export default {
{ {
to: {name: 'AllResultTest'}, to: {name: 'AllResultTest'},
icon: 'description', icon: 'description',
text: 'All Test Result' text: 'All Test Result',
line: true
}, },
{ {
to: {name: 'ManageMedicalCenter'}, to: {name: 'ManageMedicalCenter'},
@@ -101,7 +82,8 @@ export default {
to: {name: 'ListTestType'}, to: {name: 'ListTestType'},
icon: 'fas fa-vial', icon: 'fas fa-vial',
text: 'List Test Type', text: 'List Test Type',
role: 'Admin' role: 'Admin',
line: true
}, },
{ {
to: {name: 'AllItem'}, to: {name: 'AllItem'},
@@ -109,23 +91,33 @@ export default {
text: 'Items', text: 'Items',
role: 'Admin|Supervisor|User' role: 'Admin|Supervisor|User'
}, },
{
to: {name: 'MyItem'},
icon: 'far fa-clone',
text: 'My Items',
role: 'Admin|Supervisor|User',
line: true
},
{ {
to: {name: 'AllPackage'}, to: {name: 'AllPackage'},
icon: 'fas fa-archive', icon: 'fas fa-archive',
text: 'Packages', text: 'Packages',
role: 'Admin|Supervisor|User' role: 'Admin|Supervisor|User',
line: true
}, },
{ {
to: {name: 'AllLabels'}, to: {name: 'AllLabels'},
icon: 'fas fa-inbox', icon: 'fas fa-inbox',
text: 'Labels' text: 'Labels',
line: true
}, },
{ {
to: {name: 'AllCycle'}, to: {name: 'AllCycle'},
icon: 'cached', icon: 'cached',
text: 'Cycles' text: 'Cycles',
line: true
}, },
{ /* {
to: {name: 'Statistics'}, to: {name: 'Statistics'},
icon: 'fas fa-chart-bar', icon: 'fas fa-chart-bar',
text: 'Statistics', text: 'Statistics',
@@ -134,7 +126,7 @@ export default {
to: {name: 'Tickets'}, to: {name: 'Tickets'},
icon: 'style', icon: 'style',
text: 'Tickets', text: 'Tickets',
}, },*/
], ],
responsive: false responsive: false
}), }),
@@ -174,30 +166,47 @@ export default {
<style lang="scss"> <style lang="scss">
#app-drawer { #app-drawer {
.v-list__tile { .title {
border-radius: 4px; .user-name {
line-height: 22px;
&--buy { font-size: 18px !important;
margin-top: auto;
margin-bottom: 17px;
} }
.hospital-name {
line-height: 20px;
font-family: 'Montserrat-Light';
color: #c6c6c6;
} }
.v-chip.user-role { .v-chip.user-role {
border-radius: 4px; border-radius: 4px;
height: 20px !important; height: 20px !important;
line-height: 20px; line-height: 20px;
font-size: 11px; font-size: 12px;
letter-spacing: 1px; letter-spacing: 1px;
.v-chip__content {
padding: 0 5px;
} }
} }
.v-image__image--contain { .v-list .v-list-item {
top: 9px; .v-list__tile {
height: 60%; padding-top: 0;
padding-bottom: 0;
border-radius: 5px;
.v-list__tile__title {
font-family: 'Montserrat-light';
color: #e9e9e9;
//letter-spacing: 1px !important;
}
}
.v-list__tile.v-list__tile--active .v-list__tile__title {
color: #000;
}
}
.v-list .v-list-item:not(:nth-child(3)) {
margin: 5px 15px;
} }
.search-input { .search-input {
+19 -68
View File
@@ -20,25 +20,19 @@
<v-flex xs3 md3 sm3> <v-flex xs3 md3 sm3>
<div class> <div class>
<span class="subtitle-1">ID :</span> <span class="subtitle-1">ID :</span>
<span <span class="title font-weight-bold ml-1" style="letter-spacing:0 !important">{{ data.id }}</span>
class="title font-weight-bold ml-1"
style="letter-spacing:0 !important"
>{{ data.id }}</span>
</div> </div>
</v-flex> </v-flex>
<v-flex xs3 md3 sm3> <v-flex xs3 md3 sm3>
<div class> <div class>
<span class="subtitle-1">Result :</span> <span class="subtitle-1">Result :</span>
<span v-if="data.result == 'Reject'" class="NotVerified" style="vertical-align: text-bottom;"> <span v-if="data.result == 'Reject'" class="NotVerified" style="vertical-align: text-bottom;">
<v-icon class="caption fa fa-times NotVerified"></v-icon> <v-icon class="caption fa fa-times NotVerified"/>
</span> </span>
<span v-if="data.result == 'Accept'" class=""> <span v-if="data.result == 'Accept'" class="">
<v-icon class="caption fa fa-check Verified"></v-icon> <v-icon class="caption fa fa-check Verified"/>
</span> </span>
<span <span class="title font-weight-bold ml-1" style="letter-spacing:0 !important">{{ data.result }}</span>
class="title font-weight-bold ml-1"
style="letter-spacing:0 !important"
>{{ data.result }}</span>
</div> </div>
</v-flex> </v-flex>
<v-flex xs3 md3 sm3> <v-flex xs3 md3 sm3>
@@ -50,15 +44,12 @@
style="letter-spacing:0 !important" style="letter-spacing:0 !important"
>{{ data.verified }}</span> --> >{{ data.verified }}</span> -->
<span v-if="data.verified == 'NotVerified'" class="NotVerified"> <span v-if="data.verified == 'NotVerified'" class="NotVerified">
<v-icon class="caption fa fa-times NotVerified"></v-icon> <v-icon class="caption fa fa-times NotVerified"/>
</span> </span>
<span v-if="data.verified == 'Verified'" class=""> <span v-if="data.verified == 'Verified'" class="">
<v-icon class="caption fa fa-check Verified"></v-icon> <v-icon class="caption fa fa-check Verified"/>
</span> </span>
<span <span class="title font-weight-bold ml-1" style="letter-spacing:0 !important">{{ data.verified }}</span>
class="title font-weight-bold ml-1"
style="letter-spacing:0 !important"
>{{ data.verified }}</span>
</div> </div>
</v-flex> </v-flex>
<v-flex xs3 md3 sm3> <v-flex xs3 md3 sm3>
@@ -82,10 +73,7 @@
<v-flex xs4 md4 sm4> <v-flex xs4 md4 sm4>
<div class> <div class>
<span class="subtitle-1">Medical Center :</span> <span class="subtitle-1">Medical Center :</span>
<span <span class="title font-weight-bold ml-2" style="letter-spacing:0 !important">{{ data.user.medical_center.name }}</span>
class="title font-weight-bold ml-2"
style="letter-spacing:0 !important"
>{{ data.user.medical_center.name }}</span>
</div> </div>
</v-flex> </v-flex>
</v-layout> </v-layout>
@@ -97,62 +85,35 @@
</v-flex> </v-flex>
<v-layout row wrap class="ml-4"> <v-layout row wrap class="ml-4">
<template v-if="data.inputs"> <template v-if="data.inputs">
<v-flex <v-flex xs3 md3 sm3 v-for="(inputData, keyInputs) in data.inputs" :key="keyInputs">
xs3
md3
sm3
v-for="(inputData, keyInputs) in data.inputs"
:key="keyInputs"
>
<span class="subtitle-1">{{keyInputs}} :</span> <span class="subtitle-1">{{keyInputs}} :</span>
<span <span class="title font-weight-bold ml-2" style="letter-spacing:0 !important">{{inputData}}</span>
class="title font-weight-bold ml-2"
style="letter-spacing:0 !important"
>{{inputData}}</span>
</v-flex> </v-flex>
</template> </template>
<template v-if="data.options"> <template v-if="data.options">
<v-flex <v-flex xs3 md3 sm3 v-for="(optionData, keyOptions) in data.options" :key="keyOptions">
xs3
md3
sm3
v-for="(optionData, keyOptions) in data.options"
:key="keyOptions"
>
<span class="subtitle-1">{{keyOptions}} :</span> <span class="subtitle-1">{{keyOptions}} :</span>
<span <span
style="letter-spacing:0 !important" style="letter-spacing:0 !important"
class="title font-weight-bold ml-2" class="title font-weight-bold ml-2"
v-for="(data, dataKey) in optionData" v-for="(data, dataKey) in optionData"
:key="dataKey" :key="dataKey">{{data}},</span>
>{{data}},</span>
</v-flex> </v-flex>
</template> </template>
<template v-if="data.children"> <template v-if="data.children">
<v-layout row wrap class="WM-Width-Full"> <v-layout row wrap class="WM-Width-Full">
<v-flex class="mt-4 pb-4" style="border-left:3px solid #32c5d2;border-bottom:1px solid #ddd" <v-flex class="mt-4 pb-4" style="border-left:3px solid #32c5d2;border-bottom:1px solid #ddd" xs12 md12 sm12 v-for="(formData, keyForm) in data.children" :key="keyForm">
xs12
md12
sm12
v-for="(formData, keyForm) in data.children"
:key="keyForm"
>
<h4 class="ml-4 headline CSSD-font font-weight-bold">{{keyForm}}</h4> <h4 class="ml-4 headline CSSD-font font-weight-bold">{{keyForm}}</h4>
<v-layout row wrap> <v-layout row wrap>
<v-layout row wrap v-for="(childData, keyChild) in formData" :key="keyChild"> <v-layout row wrap v-for="(childData, keyChild) in formData" :key="keyChild">
<v-flex <v-flex xs12 md12 sm12 class="ml-4">
xs12
md12
sm12
class="ml-4">
<span class="subtitle-1">{{keyChild}} :</span> <span class="subtitle-1">{{keyChild}} :</span>
<template v-if="Array.isArray(childData)"> <template v-if="Array.isArray(childData)">
<span <span
style="letter-spacing:0 !important" style="letter-spacing:0 !important"
class="title font-weight-bold ml-2" class="title font-weight-bold ml-2"
v-for="(data, dataKey) in childData" v-for="(data, dataKey) in childData"
:key="dataKey" :key="dataKey">{{data}},</span>
>{{data}},</span>
</template> </template>
<template v-else> <template v-else>
<span class="headline ml-2">{{childData}}</span> <span class="headline ml-2">{{childData}}</span>
@@ -186,24 +147,16 @@
<!-- </material-card> <!-- </material-card>
<material-card> --> <material-card> -->
<v-layout row wrap align-center justify-center class="px-5 my-3" v-if="$hasRole('Admin|Supervisor')"> <v-layout row wrap align-center justify-center class="px-5 my-3" v-if="$hasRole('Admin|Supervisor')">
<v-flex <v-flex class="WM-Align-R mr-1" xs12 md3 sm3
class="WM-Align-R mr-1"
xs12
md3
sm3
v-if="data.verified == 'None' || (data.verified == 'NotVerified' && $hasRole('Admin'))" v-if="data.verified == 'None' || (data.verified == 'NotVerified' && $hasRole('Admin'))"
@click="verify(data.id, 'Verified')" @click="verify(data.id, 'Verified')">
>
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px"> <v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px">
<v-icon class="white--text mr-2 caption">fas fa-check</v-icon> <v-icon class="white--text mr-2 caption">fas fa-check</v-icon>
<span class="white--text">Verify</span> <span class="white--text">Verify</span>
</v-btn> </v-btn>
</v-flex> </v-flex>
<v-flex class="WM-Align-R" xs6 md3 sm3 v-if="data.verified == 'None' || (data.verified == 'Verified' && $hasRole('Admin'))"> <v-flex class="WM-Align-R" xs6 md3 sm3 v-if="data.verified == 'None' || (data.verified == 'Verified' && $hasRole('Admin'))">
<v-btn <v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Gray" @click="verify(data.id, 'NotVerified')">
class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Gray"
@click="verify(data.id, 'NotVerified')"
>
<v-icon class="black--text mr-2 caption">fas fa-check</v-icon> <v-icon class="black--text mr-2 caption">fas fa-check</v-icon>
<span class="black--text">UnVerify</span> <span class="black--text">UnVerify</span>
</v-btn> </v-btn>
@@ -211,9 +164,7 @@
<v-flex xs6 md2 sm2> <v-flex xs6 md2 sm2>
<a :href="'/Show/TestResult/'+data.id"> <a :href="'/Show/TestResult/'+data.id">
<v-btn <v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Gray">
class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Gray"
>
<v-icon class="black--text mr-2 caption">fas fa-print</v-icon> <v-icon class="black--text mr-2 caption">fas fa-print</v-icon>
<span class="black--text">Go to Print Page</span> <span class="black--text">Go to Print Page</span>
</v-btn> </v-btn>
+4 -4
View File
@@ -9,9 +9,9 @@
<span class="subheading font-weight-light text-white text--darken-3" v-text="header.text" /> <span class="subheading font-weight-light text-white text--darken-3" v-text="header.text" />
</template> </template>
<template slot="items" slot-scope="{ item }"> <template slot="items" slot-scope="{ item }">
<tr :active="item.selected" @click="selectUser(item)"> <tr :active="item.selected" @click="selectUser(item)" v-if="item.id !== getModalProperties.data.user_id">
<td> <td>
<v-checkbox :input-value="item.selected" primary hide-details></v-checkbox> <v-checkbox :input-value="item.selected" primary hide-details/>
</td> </td>
<td class="headline font-weight-light"> <td class="headline font-weight-light">
{{ item.name }} {{ item.name }}
@@ -34,9 +34,9 @@
<div class="text-xs-center mt-2" v-if="lastPage > 1"> <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 color="black" v-model="currentPage" :length="lastPage" :total-visible="6"/>
</div> </div>
<v-layout row wrap align-center justify-strart class="mt-3"> <v-layout row wrap align-center class="mt-3 justify-end mr-5">
<v-btn type="submit" class="WM-CyanBlueGradient-BG ml-5 px-5"> <v-btn type="submit" class="WM-CyanBlueGradient-BG ml-5 px-5">
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon> <v-icon class="black--text mr-2 caption">fas fa-check</v-icon>
<span class="black--text">Submit</span> <span class="black--text">Submit</span>
</v-btn> </v-btn>
</v-layout> </v-layout>
+7 -4
View File
@@ -153,7 +153,7 @@ const urls = {
return "/Items" + filter; return "/Items" + filter;
}, },
listMyItem: function (filter) { listMyItem: function (filter) {
return "/my-Items" + filter; return "/MyItems" + filter;
}, },
listAllItem: function () { listAllItem: function () {
return "/GetItems"; return "/GetItems";
@@ -173,6 +173,9 @@ const urls = {
updateItem: function (id) { updateItem: function (id) {
return `/Items/${id}`; return `/Items/${id}`;
}, },
transferItem: function (id) {
return `/transfer-items/${id}`;
},
removeItem: function (id) { removeItem: function (id) {
return `Items/${id}`; return `Items/${id}`;
}, },
@@ -192,8 +195,8 @@ const urls = {
changeItemStatus: function (id) { changeItemStatus: function (id) {
return `/Items/ChangeStatus/${id}`; return `/Items/ChangeStatus/${id}`;
}, },
transferItem: function (id) { // transferItem: function (id) {
return `/transfers/${id}`; // return `/transfers/${id}`;
} // }
}; };
export { urls }; export { urls };
+2 -2
View File
@@ -292,14 +292,14 @@ export default [
title:'Tickets | CSSD Dashboard', title:'Tickets | CSSD Dashboard',
} }
}, },
{ /* {
path: '/ShowPackage/:package', path: '/ShowPackage/:package',
name: 'ShowPackage', name: 'ShowPackage',
view: 'Package/ShowPackage', view: 'Package/ShowPackage',
meta:{ meta:{
title:'Show Package | CSSD Dashboard', title:'Show Package | CSSD Dashboard',
} }
}, },*/
{ {
path: '/Intro', path: '/Intro',
name: 'Intro', name: 'Intro',
+3 -3
View File
@@ -110,9 +110,9 @@ axios.interceptors.request.use(request => {
}); });
axios.interceptors.response.use(response => { axios.interceptors.response.use(response => {
// console.log("🟢 API Response:", response.config.url); console.log("🟢 API Response:", response.config.url);
// console.log("🟢 Status:", response.status); console.log("🟢 Status:", response.status);
// console.log("🟢 Data:", response.data); console.log("🟢 Data:", response.data);
return response; return response;
}, error => { }, error => {
console.error("🔴 API Error:", error.response ? error.response.data : error); console.error("🔴 API Error:", error.response ? error.response.data : error);
+1 -1
View File
@@ -1,5 +1,5 @@
export default { export default {
drawer: null, drawer: null,
color: 'WM-CyanBlueGradient-BG', color: 'WM-BG-White',
// image: 'https://demos.creative-tim.com/vue-material-dashboard/img/sidebar-2.32103624.jpg' // image: 'https://demos.creative-tim.com/vue-material-dashboard/img/sidebar-2.32103624.jpg'
} }
+6
View File
@@ -18,6 +18,12 @@
font-weight: bold; font-weight: bold;
src: url('../../fonts/Montserrat-Bold.ttf') format('truetype'); src: url('../../fonts/Montserrat-Bold.ttf') format('truetype');
} }
@font-face {
font-family: 'Montserrat-light';
font-style: normal;
font-weight: 100;
src: url('../../fonts/Montserrat-Light.ttf') format('truetype');
}
body, body,
h1, h1,
+3 -2
View File
@@ -838,8 +838,9 @@
} }
.WM-BG-White, .WM-Link-White::after, .WM-Input.WM-White + .WM-Input100-Focus::before { .WM-BG-White, .WM-Link-White::after, .WM-Input.WM-White + .WM-Input100-Focus::before {
background-color: #fff; //background-color: #fff;
color: #fff; color: #000;
background: linear-gradient(90deg, #fff 20.5625%, #fff 20.5625%, #fff 80.5625%);
} }
.WM-Color-White, .WM-Link-White:hover, .WM-Link-White.WM-Selected, .WM-Link-White.WM-Active { .WM-Color-White, .WM-Link-White:hover, .WM-Link-White.WM-Selected, .WM-Link-White.WM-Active {
+7 -7
View File
@@ -17,7 +17,7 @@
</v-layout> </v-layout>
</material-card> </material-card>
<material-card v-if="$hasRole('Supervisor')" color="black" title="Supervisor" text=""> <material-card v-if="$hasRole('Admin|Supervisor')" color="black" title="Supervisor" text="">
<v-layout row wrap> <v-layout row wrap>
<template v-for="(SupervisorCard, Key ) in SupervisorCards"> <template v-for="(SupervisorCard, Key ) in SupervisorCards">
<v-flex v-if="!SupervisorCard.role || $hasRole(SupervisorCard.role)" <v-flex v-if="!SupervisorCard.role || $hasRole(SupervisorCard.role)"
@@ -35,7 +35,7 @@
</v-layout> </v-layout>
</material-card> </material-card>
<material-card v-if="$hasRole('User')" color="black" title="User" text=""> <material-card v-if="$hasRole('Admin|Supervisor|User')" color="black" title="User" text="">
<v-layout row wrap> <v-layout row wrap>
<template v-for="(UsersCard, Key ) in UsersCards"> <template v-for="(UsersCard, Key ) in UsersCards">
<v-flex v-if="!UsersCard.role || $hasRole(UsersCard.role)" :class="[UsersCard.column, 'pa-2']" <v-flex v-if="!UsersCard.role || $hasRole(UsersCard.role)" :class="[UsersCard.column, 'pa-2']"
@@ -104,7 +104,7 @@ export default {
aligntext: 'text-md-left', aligntext: 'text-md-left',
alignimg: 'text-md-left', alignimg: 'text-md-left',
column: 'xs12 md12 sm12', column: 'xs12 md12 sm12',
role: 'Supervisor' role: 'Admin|Supervisor'
}, },
{ {
title: 'Test to Verify', title: 'Test to Verify',
@@ -115,7 +115,7 @@ export default {
aligntext: 'text-md-left', aligntext: 'text-md-left',
alignimg: 'text-md-left', alignimg: 'text-md-left',
column: 'xs12 md12 sm12', column: 'xs12 md12 sm12',
role: 'Supervisor' role: 'Admin|Supervisor'
}, },
], ],
UsersCards: [ UsersCards: [
@@ -128,7 +128,7 @@ export default {
aligntext: 'text-md-left', aligntext: 'text-md-left',
alignimg: 'text-md-right', alignimg: 'text-md-right',
column: 'xs12 md6 sm6', column: 'xs12 md6 sm6',
role: 'User' role: 'Admin|Supervisor|User'
}, },
{ {
title: 'All Test Result', title: 'All Test Result',
@@ -139,7 +139,7 @@ export default {
aligntext: 'text-md-left', aligntext: 'text-md-left',
alignimg: 'text-md-right', alignimg: 'text-md-right',
column: 'xs12 md6 sm6', column: 'xs12 md6 sm6',
role: 'User' role: 'Admin|Supervisor|User'
}, },
{ {
title: 'Add a Test Result', title: 'Add a Test Result',
@@ -150,7 +150,7 @@ export default {
aligntext: 'text-md-left', aligntext: 'text-md-left',
alignimg: 'text-md-left', alignimg: 'text-md-left',
column: 'xs12 md12 sm12', column: 'xs12 md12 sm12',
role: 'User' role: 'Admin|Supervisor|User'
}, },
], ],
} }
+12 -13
View File
@@ -4,13 +4,13 @@
<material-card color="black" title="Add Instrument"> <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-5 my-3">
<v-flex xs12 sm6 md6 lg3 class="WM-FlexCenter"> <v-flex xs12 sm6 md6 lg3 class="WM-FlexCenter">
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon> <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" <v-text-field name="name" label="Name" color="black" v-model="formData.name"
:rules="[rules.required]" :rules="[rules.required]"
class="py-3 pr-3"></v-text-field> class="py-3 pr-3"/>
</v-flex> </v-flex>
<!-- <v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3"> <!-- <v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3">
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"></v-icon> <v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
<v-text-field <v-text-field
name="unique_id" name="unique_id"
label="Item ID" label="Item ID"
@@ -18,28 +18,28 @@
v-model="formData.unique_id" v-model="formData.unique_id"
:rules="[rules.required]" :rules="[rules.required]"
class="py-3 pr-3" class="py-3 pr-3"
></v-text-field> />
</v-flex> --> </v-flex> -->
<v-flex xs12 sm6 md6 lg3 class="WM-FlexCenter pl-3"> <v-flex xs12 sm6 md6 lg3 class="WM-FlexCenter pl-3">
<v-icon class="fas fa-check mr-2 WM-Margin-B-8"></v-icon> <v-icon class="fas fa-check mr-2 WM-Margin-B-8"/>
<v-text-field name="size" label="Size" color="black" v-model="formData.size" <v-text-field name="size" label="Size" color="black" v-model="formData.size"
class="py-3 pr-3"></v-text-field> class="py-3 pr-3"/>
</v-flex> </v-flex>
<v-flex xs12 sm6 md6 lg3 class="WM-FlexCenter pl-3"> <v-flex xs12 sm6 md6 lg3 class="WM-FlexCenter pl-3">
<v-icon class="fas fa-check mr-2 WM-Margin-B-8"></v-icon> <v-icon class="fas fa-check mr-2 WM-Margin-B-8"/>
<v-text-field name="specific" label="Specific" color="black" v-model="formData.specific" <v-text-field name="specific" label="Specific" color="black" v-model="formData.specific"
class="py-3 pr-3"></v-text-field> class="py-3 pr-3"/>
</v-flex> </v-flex>
<v-flex xs12 sm6 md6 lg3 class="WM-FlexCenter"> <v-flex xs12 sm6 md6 lg3 class="WM-FlexCenter">
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon> <v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
<v-text-field name="UDI" label="UDI" color="black" v-model="formData.udi" <v-text-field name="UDI" label="UDI" color="black" v-model="formData.udi"
:rules="[rules.required]" :rules="[rules.required]"
class="py-3 pr-3"></v-text-field> class="py-3 pr-3"/>
</v-flex> </v-flex>
<v-flex xs12 sm12 class="WM-FlexCenter" v-if="galleryDataLoaded"> <v-flex xs12 sm12 class="WM-FlexCenter" v-if="galleryDataLoaded">
<wm-Dropzone class="w-100" :Images="galleries" :BatchID="file_batch_id" <wm-Dropzone class="w-100" :Images="galleries" :BatchID="file_batch_id"
:ModelID="$route.params.Item" :ModelID="$route.params.Item||null"
ModelType="Item"></wm-Dropzone> ModelType="Item"/>
</v-flex> </v-flex>
</v-layout> </v-layout>
<v-layout align-center wrap class="px-5 mb-3"> <v-layout align-center wrap class="px-5 mb-3">
@@ -66,7 +66,6 @@
<span class="white--text">SAVE</span> <span class="white--text">SAVE</span>
</v-btn> </v-btn>
</v-flex> </v-flex>
</v-layout> </v-layout>
</material-card> </material-card>
</v-container> </v-container>
-2
View File
@@ -42,8 +42,6 @@
</v-btn> </v-btn>
</router-link> </router-link>
</v-flex> </v-flex>
</v-layout> </v-layout>
<v-layout class="px-4 my-3"> <v-layout class="px-4 my-3">
<v-divider/> <v-divider/>
+1 -1
View File
@@ -3,7 +3,7 @@
<v-container fluid> <v-container fluid>
<material-card class color="black" title="My Items" text> <material-card class color="black" title="My Items" text>
<v-tabs centered color="cyan" dark icons-and-text> <v-tabs centered color="cyan" dark icons-and-text>
<v-tabs-slider color="yellow"></v-tabs-slider> <v-tabs-slider color="yellow"/>
<v-tab href="#tab-1"> <v-tab href="#tab-1">
My Items My Items
+72 -34
View File
@@ -1,48 +1,45 @@
<template> <template>
<div> <div>
<v-layout align-center wrap class="my-3 px-5"> <v-layout align-center wrap class="my-3 px-5">
<v-flex xs12 md3 sm3 class="WM-FlexCenter"> <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-icon> <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" color="black"></v-text-field> <v-text-field class="py-3 pr-3" v-model="filter.item_id" label="Item ID" color="black"/>
</v-flex> </v-flex>
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3"> <v-flex xs12 sm4 md4 lg2 xl2 class="WM-FlexCenter pl-3">
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon> <v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
<v-text-field class="py-3 pr-3" v-model="filter.name" label="Name" color="black"></v-text-field> <v-text-field class="py-3 pr-3" v-model="filter.name" label="Name" color="black"/>
</v-flex> </v-flex>
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3" v-if="$hasRole('Admin')"> <v-flex xs12 sm4 md4 lg2 xl2 class="WM-FlexCenter pl-3" v-if="$hasRole('Admin')">
<v-icon class="fa fa-hospital-o mr-2 WM-Margin-B-8"></v-icon> <v-icon class="fa fa-hospital-o mr-2 WM-Margin-B-8"/>
<v-autocomplete class="py-3 pr-3" v-model="filter.medical_center_id" item-text="name" item-value="id" <v-autocomplete class="py-3 pr-3" v-model="filter.medical_center_id" item-text="name" item-value="id"
label="Hospital" color="black" :items="medicalCenters" :clearable="true"></v-autocomplete> label="Hospital" color="black" :items="medicalCenters" :clearable="true"/>
</v-flex> </v-flex>
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3"> <v-flex xs12 sm4 md4 lg2 xl2 class="WM-FlexCenter pl-3">
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"></v-icon> <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.size" label="Size" color="black"></v-text-field> <v-text-field class="py-3 pr-3" v-model="filter.size" label="Size" color="black"/>
</v-flex> </v-flex>
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl3"> <v-flex xs12 sm4 md4 lg2 xl2 class="WM-FlexCenter pl3">
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon> <v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
<v-text-field class="py-3 pr-3" v-model="filter.udi" label="UDI" color="black"></v-text-field> <v-text-field class="py-3 pr-3" v-model="filter.udi" label="UDI" color="black"/>
</v-flex> </v-flex>
<v-spacer/>
</v-layout> <v-flex class xs12 sm6 md6 lg2 xl1>
<v-layout class="px-5 my-3"> <v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 30px" @click="load()">
<v-flex class xs12 md2 sm3>
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px" @click="load()">
<v-icon class="white--text mr-2 caption">fas fa-search</v-icon> <v-icon class="white--text mr-2 caption">fas fa-search</v-icon>
<span class="white--text CSSD-font">Filter</span> <span class="white--text">Filter</span>
</v-btn> </v-btn>
</v-flex> </v-flex>
<v-spacer></v-spacer> <v-flex xs12 sm6 md6 lg1 xl1 class="text-xs-right">
<v-flex xs12 md2 sm2 class="text-xs-right">
<router-link :to="{ name: 'AddItem' }"> <router-link :to="{ name: 'AddItem' }">
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black"> <v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
<v-icon class="black--text mr-2 caption">fas fa-plus</v-icon> <v-icon class="black--text mr-2 caption">fas fa-plus</v-icon>
<span class="black--text CSSD-font">Add</span> <span class="black--text">Add</span>
</v-btn> </v-btn>
</router-link> </router-link>
</v-flex> </v-flex>
</v-layout> </v-layout>
<v-layout class="px-4 my-3"> <v-layout class="px-4 my-3">
<v-divider></v-divider> <v-divider/>
</v-layout> </v-layout>
<v-layout align-center wrap class="my-3 px-5"> <v-layout align-center wrap class="my-3 px-5">
<v-flex md12> <v-flex md12>
@@ -76,14 +73,34 @@
</template> </template>
<span>Generate Barcode</span> <span>Generate Barcode</span>
</v-tooltip> </v-tooltip>
<v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }">
<v-btn class="mr-2" v-bind="attrs" v-on="on" color="pink darken-1"
@click="transfer(item)">
<v-icon class="white--text mr-2 caption">fas fa-arrows-alt</v-icon>
<span class="CSSD-font">Transfer</span>
</v-btn>
</template>
<span>Transfer</span>
</v-tooltip>
<v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }">
<v-btn v-bind="attrs" v-on="on" color="red" class="WM-ActionButton mr-2"
@click="remove(item.id)">
<v-icon class="white--text mr-2 caption">fas fa-trash</v-icon>
<span>Remove</span>
</v-btn>
</template>
<span>Remove</span>
</v-tooltip>
</td> </td>
</template> </template>
</v-data-table> </v-data-table>
</v-flex> </v-flex>
</v-layout> </v-layout>
<v-divider></v-divider> <v-divider/>
<div class="text-xs-center" v-if="lastPage > 1"> <div class="text-xs-center" 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> </div>
</div> </div>
</template> </template>
@@ -153,11 +170,9 @@ export default {
} }
} }
filter += (page) ? `page=${page}` : `page=1`; filter += (page) ? `page=${page}` : `page=1`;
const result = await ApiService.get( const result = await ApiService.get(urls.listMyItem(filter));
urls.listItem(filter)
);
if (result && result.status == 200) { if (result && result.status == 200) {
this.items = result.data.data.data; this.items = result.data.data;
this.currentPage = result.data.data.current_page; this.currentPage = result.data.data.current_page;
this.lastPage = result.data.data.last_page; this.lastPage = result.data.data.last_page;
} }
@@ -177,9 +192,7 @@ export default {
} }
}, },
async show(testResultId) { async show(testResultId) {
const result = await ApiService.get( const result = await ApiService.get(urls.showItem(testResultId));
urls.showItem(testResultId)
);
if (result && result.status == 200) { if (result && result.status == 200) {
this.changeCurrentModal({ this.changeCurrentModal({
modal: "modal-item-show", modal: "modal-item-show",
@@ -202,6 +215,31 @@ export default {
} }
} }
}, },
async remove(testResultId) {
const result = await ApiService.delete(
urls.removeItem(testResultId)
);
if (result && result.status == 200) {
for (const key in this.items) {
if (
this.items.hasOwnProperty(key) &&
this.items[key].id == testResultId
) {
this.items.splice(key, 1);
}
}
}
},
async transfer(data) {
this.changeCurrentModal({
modal: "modal-user-list",
properties: {data},
});
// const result = await ApiService.post(urls.transferItem(id));
// if (result && result.status == 200) {
// console.log(result , 'transfer - result')
// }
}
}, },
watch: { watch: {
currentPage(page) { currentPage(page) {
+25 -28
View File
@@ -1,48 +1,45 @@
<template> <template>
<div> <div>
<v-layout align-center wrap class="my-3 px-5"> <v-layout align-center wrap class="my-3 px-5">
<v-flex xs12 md3 sm3 class="WM-FlexCenter"> <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-icon> <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.request_id" label="Request ID" color="black"></v-text-field> <v-text-field class="py-3 pr-3" v-model="filter.request_id" label="Request ID" color="black"/>
</v-flex> </v-flex>
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3"> <v-flex xs12 sm4 md4 lg2 xl2 class="WM-FlexCenter pl-3">
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon> <v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
<v-text-field class="py-3 pr-3" v-model="filter.name" label="Name" color="black"></v-text-field> <v-text-field class="py-3 pr-3" v-model="filter.name" label="Name" color="black"/>
</v-flex> </v-flex>
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3" v-if="$hasRole('Admin')"> <v-flex xs12 sm4 md4 lg2 xl2 class="WM-FlexCenter pl-3" v-if="$hasRole('Admin')">
<v-icon class="fa fa-hospital-o mr-2 WM-Margin-B-8"></v-icon> <v-icon class="fa fa-hospital-o mr-2 WM-Margin-B-8"/>
<v-autocomplete class="py-3 pr-3" v-model="filter.medical_center_id" item-text="name" item-value="id" <v-autocomplete class="py-3 pr-3" v-model="filter.medical_center_id" item-text="name" item-value="id"
label="Hospital" color="black" :items="medicalCenters" :clearable="true"></v-autocomplete> label="Hospital" color="black" :items="medicalCenters" :clearable="true"/>
</v-flex> </v-flex>
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3"> <v-flex xs12 sm4 md4 lg2 xl2 class="WM-FlexCenter pl-3">
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"></v-icon> <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.size" label="Size" color="black"></v-text-field> <v-text-field class="py-3 pr-3" v-model="filter.size" label="Size" color="black"/>
</v-flex> </v-flex>
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl3"> <v-flex xs12 sm4 md4 lg2 xl2 class="WM-FlexCenter pl3">
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon> <v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
<v-text-field class="py-3 pr-3" v-model="filter.udi" label="UDI" color="black"></v-text-field> <v-text-field class="py-3 pr-3" v-model="filter.udi" label="UDI" color="black"/>
</v-flex> </v-flex>
<v-spacer/>
</v-layout> <v-flex class xs12 sm6 md6 lg2 xl1>
<v-layout class="px-5 my-3"> <v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 30px" @click="load()">
<v-flex class xs12 md2 sm3>
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px" @click="load()">
<v-icon class="white--text mr-2 caption">fas fa-search</v-icon> <v-icon class="white--text mr-2 caption">fas fa-search</v-icon>
<span class="white--text CSSD-font">Filter</span> <span class="white--text">Filter</span>
</v-btn> </v-btn>
</v-flex> </v-flex>
<v-spacer></v-spacer> <v-flex xs12 sm6 md6 lg1 xl1 class="text-xs-right">
<v-flex xs12 md2 sm2 class="text-xs-right">
<router-link :to="{ name: 'AddItem' }"> <router-link :to="{ name: 'AddItem' }">
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black"> <v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
<v-icon class="black--text mr-2 caption">fas fa-plus</v-icon> <v-icon class="black--text mr-2 caption">fas fa-plus</v-icon>
<span class="black--text CSSD-font">Add</span> <span class="black--text">Add</span>
</v-btn> </v-btn>
</router-link> </router-link>
</v-flex> </v-flex>
</v-layout> </v-layout>
<v-layout class="px-4 my-3"> <v-layout class="px-4 my-3">
<v-divider></v-divider> <v-divider/>
</v-layout> </v-layout>
<v-layout align-center wrap class="my-3 px-5"> <v-layout align-center wrap class="my-3 px-5">
<v-flex md12> <v-flex md12>
@@ -81,9 +78,9 @@
</v-data-table> </v-data-table>
</v-flex> </v-flex>
</v-layout> </v-layout>
<v-divider></v-divider> <v-divider/>
<div class="text-xs-center" v-if="lastPage > 1"> <div class="text-xs-center" 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> </div>
</div> </div>
</template> </template>
@@ -157,7 +154,7 @@ export default {
urls.listItem(filter) urls.listItem(filter)
); );
if (result && result.status == 200) { if (result && result.status == 200) {
this.items = result.data.data.data; this.items = result.data.data;
this.currentPage = result.data.data.current_page; this.currentPage = result.data.data.current_page;
this.lastPage = result.data.data.last_page; this.lastPage = result.data.data.last_page;
} }
+6 -27
View File
@@ -41,9 +41,10 @@
<v-flex xs12 md3 sm3 class="WM-FlexCenter WM-DuplicateInput" <v-flex xs12 md3 sm3 class="WM-FlexCenter WM-DuplicateInput"
style="position: relative" v-for="(item, key) in formData.items" :key="key"> style="position: relative" v-for="(item, key) in formData.items" :key="key">
<div class="Inner"> <div class="Inner">
<v-icon class="fas fa-check mr-2 WM-Margin-B-8"/> <!-- <v-icon class="fas fa-check mr-2 WM-Margin-B-8"/>-->
<v-autocomplete <v-autocomplete
@keydown.enter.native.prevent="duplicateForm(key)" @keydown.enter.native.prevent="duplicateForm(key)"
@change="duplicateForm(key)"
:ref="`selectItem-${key}`" :ref="`selectItem-${key}`"
class="py-3 pr-3" class="py-3 pr-3"
:items="items" :items="items"
@@ -62,28 +63,12 @@
</template> </template>
</v-autocomplete> </v-autocomplete>
<v-btn <v-btn absolute small right bottom color="cyan" @click="duplicateForm(key)">
absolute
small
right
bottom
color="cyan"
@click="duplicateForm(key)">
<v-icon class="white--text mr-2 caption">fas fa-plus</v-icon> <v-icon class="white--text mr-2 caption">fas fa-plus</v-icon>
ADD ADD
</v-btn> </v-btn>
<v-btn <v-btn v-if="key > 0" absolute small right top color="pink" @click="removeForm(key)">
v-if="key > 0" <v-icon class="white--text mr-2 caption">fas fa-remove</v-icon>
absolute
small
right
top
color="pink"
@click="removeForm(key)"
>
<v-icon class="white--text mr-2 caption">fas fa-remove
</v-icon
>
REMOVE REMOVE
</v-btn> </v-btn>
</div> </div>
@@ -185,10 +170,6 @@ export default {
if (result.status == 200) { if (result.status == 200) {
this.items = result.data.data; this.items = result.data.data;
} }
// this.items = [
// { name: "test", udi: "23" },
// { name: "saj", udi: "43" },
// ];
}, },
async submitForm() { async submitForm() {
let result; let result;
@@ -207,9 +188,7 @@ export default {
}, },
duplicateForm(infoIndex) { duplicateForm(infoIndex) {
this.formData.items.push({ this.formData.items.push({name: "",});
name: "",
});
console.log(this.$refs[`selectItem-1`], infoIndex); console.log(this.$refs[`selectItem-1`], infoIndex);
this.$refs[`selectItem-${infoIndex}`][0].focus(); this.$refs[`selectItem-${infoIndex}`][0].focus();
}, },
-10
View File
@@ -63,7 +63,6 @@
<td class="title font-weight-light"> <td class="title font-weight-light">
{{item.user ? item.user.name : '' | text_20_letter}} {{item.user ? item.user.name : '' | text_20_letter}}
</td> </td>
<td class="title font-weight-light">{{ item.udi | text_20_letter }}</td>
<td class="title font-weight-light">{{ item.description }}</td> <td class="title font-weight-light">{{ item.description }}</td>
<td class="title font-weight-light">{{ item.status }}</td> <td class="title font-weight-light">{{ item.status }}</td>
<td class="text-xs-right FlexBtn Height-MD-60 justify-self-end"> <td class="text-xs-right FlexBtn Height-MD-60 justify-self-end">
@@ -163,11 +162,6 @@ import toast from "@/services/global/toast.service";
export default { export default {
data: () => ({ data: () => ({
headers: [ headers: [
// {
// sortable: true,
// text: " ID",
// value: " ID"
// },
{ {
sortable: true, sortable: true,
text: "Package ID", text: "Package ID",
@@ -188,10 +182,6 @@ export default {
text: "Owner", text: "Owner",
value: "User" value: "User"
}, },
{
text: "UDI",
value: "udi"
},
{ {
sortable: true, sortable: true,
text: "Description", text: "Description",