fix : style , errors

This commit is contained in:
Ashrafi
2025-04-13 13:10:15 +03:30
parent 90b0e0dc65
commit 2e98810cf0
6 changed files with 77 additions and 29 deletions
+7 -1
View File
@@ -67,6 +67,11 @@
{{ (item.user && item.user.medical_center) ? item.user.medical_center.name : '' }}
</td>
<td class="title font-weight-light">{{ item.sterilizer_id }}</td>
<td class="title font-weight-light">
<span v-for="(label , index) in item.labels" :key="index">
{{ label.id }} <span v-if="index !== item.labels.length-1">,</span>
</span>
</td>
<td class="title font-weight-light">{{ item.cycle_number }}</td>
<td class="title font-weight-light">{{ item.date }}</td>
<td class="text-xs-right FlexBtn Height-MD-60 justify-self-end">
@@ -155,9 +160,10 @@ export default {
{sortable: false, text: "ID", value: "Cycle ID"},
{sortable: false, text: "Hospital", value: "Hospital"},
{sortable: false, text: "Sterilizer ID", value: "Sterilizer ID"},
{sortable: false, text: "Label IDs", value: "Label IDs"},
{sortable: false, text: "Cycle Number", value: "Cycle Number"},
{sortable: false, text: "Date", value: "date"},
{sortable: false, text: "Action", value: "action", align: "center"}
{sortable: false, text: "Action", value: "action", align: "center",width:'10%'}
],
filter: {},
Menu: false,
+4 -2
View File
@@ -67,6 +67,7 @@
<td class="title font-weight-light">{{ item.user ? item.user.name : '' }}</td>
<td class="title font-weight-light">{{ item.cycle_number }}</td>
<td class="title font-weight-light">{{ item.sterilizer_id }}</td>
<td class="title font-weight-light">{{ item.package_id }}</td>
<td class="text-xs-right FlexBtn Height-MD-60 justify-self-end">
<v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }">
@@ -158,8 +159,9 @@ export default {
{sortable: false, text: "Hospital", value: "Hospital"},
{sortable: false, text: "Owner", value: "User"},
{sortable: false, text: "Cycle Number", value: "Cycle Number"},
{sortable: false, text: "SterilizerID", value: "SterilizerID"},
{sortable: false, text: "Action", value: "action", align: "center"}
{sortable: false, text: "Sterilizer ID", value: "Sterilizer ID"},
{sortable: false, text: "Package ID", value: "Package ID"},
{sortable: false, text: "Action", value: "action", align: "center",width:'10%'}
],
filter: {},
items: [],
+11 -2
View File
@@ -149,10 +149,11 @@ export default {
};
},
created() {
this.loadItems();
if (this.$route.params.package) {
this.load(this.$route.params.package);
}
this.loadItems();
},
methods: {
customFilter(item, queryText) {
@@ -168,6 +169,14 @@ export default {
const result = await ApiService.get(urls.editPackage(id));
if (result.status == 200) {
this.formData = result.data.data;
const usedItems = this.formData.items.filter(i => i.id && i.name);
const existingIds = this.items.map(i => i.id);
usedItems.forEach(ui => {
if (!existingIds.includes(ui.id)) {
this.items.push(ui);
}
});
}
},
async loadItems() {
@@ -177,6 +186,7 @@ export default {
}
},
async submitForm() {
this.formData.items = this.formData.items.filter(item => item.id);
let result;
if (this.$route.params.package) {
result = await ApiService.put(urls.updatePackage(this.$route.params.package), this.formData);
@@ -191,7 +201,6 @@ export default {
duplicateForm(infoIndex) {
this.formData.items.push({name: "",});
console.log(this.$refs[`selectItem-1`], infoIndex);
this.$refs[`selectItem-${infoIndex}`][0].focus();
},
removeForm(infoIndex) {