fix : show dependence items in package list and files in item edit

This commit is contained in:
zeinab.ashrafi
2025-04-28 12:57:04 +03:30
parent 662bfd8c86
commit e693bf25f6
3 changed files with 14 additions and 4 deletions
+1 -1
View File
@@ -118,7 +118,7 @@ export default {
async load(id) {
const result = await ApiService.get(urls.editItem(id));
if (result.status == 200) {
this.galleries = result.data.data.filesPath;
this.galleries = result.data.data.files;
this.galleryDataLoaded = true;
this.formData = result.data.data;
}
+6
View File
@@ -60,6 +60,11 @@
{{ (item.user && item.user.medical_center) ? item.user.medical_center.name : '' }}
</td>
<td class="title font-weight-light">{{ item.description }}</td>
<td class="title font-weight-light">
<span v-for="(i , index) in item.items" :key="index">
{{ i.name }} <span v-if="index !== item.items.length-1">,</span>
</span>
</td>
<td class="title font-weight-light">{{ item.status }}</td>
<td class="text-xs-right FlexBtn Height-MD-60 justify-self-end">
<template v-if="$hasRole('Admin|Supervisor')">
@@ -181,6 +186,7 @@ export default {
{sortable: false, text: "Name", value: "name"},
{sortable: false, text: "Hospital", value: "Hospital"},
{sortable: false, text: "Description", value: "description"},
{sortable: false, text: "Items", value: "item"},
{sortable: false, text: "Status", value: "status"},
{sortable: false, text: "Action", value: "action", align: "center", width: '20%'}
],
+7 -3
View File
@@ -63,6 +63,11 @@
{{ item.user ? item.user.name : '' | text_20_letter }}
</td>
<td class="title font-weight-light">{{ item.description }}</td>
<td class="title font-weight-light">
<span v-for="(i , index) in item.items" :key="index">
{{ i.name }} <span v-if="index !== item.items.length-1">,</span>
</span>
</td>
<td class="title font-weight-light">{{ item.status }}</td>
<td class="text-xs-right FlexBtn Height-MD-60 justify-self-end">
<template v-if="$hasRole('Admin|Supervisor')">
@@ -185,6 +190,7 @@ export default {
{sortable: false, text: "Hospital", value: "Hospital"},
{sortable: false, text: "Owner", value: "User"},
{sortable: false, text: "Description", value: "description"},
{sortable: false, text: "Items", value: "items"},
{sortable: false, text: "Status", value: "status"},
{sortable: false, text: "Action", value: "action", align: "center", width: '20%'}
],
@@ -212,9 +218,7 @@ export default {
}
}
filter += (page) ? `page=${page}` : `page=1`;
const result = await ApiService.get(
urls.listPackage(filter)
);
const result = await ApiService.get(urls.listPackage(filter));
if (result && result.status == 200) {
const {data, meta} = result.data;
this.items = data;