fix slicing result entry

This commit is contained in:
Hanan Askarim
2024-08-19 15:44:22 +07:00
parent b3ad260791
commit 08e181f3ce
4 changed files with 293 additions and 298 deletions

View File

@@ -1,47 +1,46 @@
<template>
<div>
<v-row>
<v-col cols="12">
<v-container class="bg-white rounded-lg">
<v-container class="bg-white rounded-lg" fluid>
<v-data-table
:headers="headers"
:items="xpatients"
return-object
hide-default-footer
>
<template v-slot:top>
<v-toolbar flat class="bg-secondary-lighten">
<v-toolbar-title>{{ $t('message.toolbalTitle') }}</v-toolbar-title>
</v-toolbar>
</template>
<v-data-table
:headers="headers"
:items="xpatients"
return-object
hide-default-footer
class="row-pointer"
>
<template v-slot:top>
<v-toolbar flat class="bg-secondary-lighten rounded-lg">
<v-toolbar-title class="text-black font-weight-bold">{{ $t('message.toolbalTitle') }}</v-toolbar-title>
</v-toolbar>
</template>
<template v-slot:item="{ item }">
<tr>
<td v-bind:class="{'blue-lighten-5':isSelected(item)}" @click="selectMe(item)">
<div>
<p class="mt-2 mb-2">{{ item.noreg }}</p>
<p class="mb-2" >
<v-chip label size="small">
{{ item.orderdate }}
</v-chip>
</p>
</div>
</td>
<td v-bind:class="{'blue-lighten-5':isSelected(item)}" @click="selectMe(item)">
<p>{{ item.name }}</p>
</td>
</tr>
</template>
</v-data-table>
</v-container>
</v-col>
</v-row>
<template v-slot:item="{ item }">
<tr v-bind:class="{'bg-primary-lighten':isSelected(item)}" @click="selectMe(item)">
<td>
<div>
<p class="mt-2 mb-2">{{ item.noreg }}</p>
<p class="mb-2" >
<v-chip label size="small">
{{ item.orderdate }}
</v-chip>
</p>
</div>
</td>
<td>
<p>{{ item.name }}</p>
</td>
</tr>
</template>
</v-data-table>
</v-container>
</div>
</template>
<style scoped>
.row-pointer >>> tbody tr :hover {
cursor: pointer;
}
</style>
<script type="module">
@@ -86,8 +85,8 @@
isSelected(p) {
return p.id == this.$store.state.entry.selected_patient.id
},
selectMe(c) {
console.log(c)
selectMe(data) {
this.$store.commit("entry/setSelectedPatient", data)
}
},
wacth: {