fix : edit pages will show images from now on

This commit is contained in:
zeinab.ashrafi
2025-04-30 11:49:09 +03:30
parent e693bf25f6
commit 35d8327a77
12 changed files with 29 additions and 42 deletions
+3 -2
View File
@@ -41,14 +41,15 @@ export default {
}),
mounted() {
this.loadImages();
console.log(this.Images , 'Images ------------------')
},
methods: {
loadImages() {
let vm = this;
if (vm.Images != null) {
vm.Images.forEach(function (image, key) {
var file = {name: image.file_name, size: '1024', type: ' ', id: image.id};
vm.$refs.myVueDropzone.manuallyAddFile(file, '/' + image.path);
var file = {name: image.thumbnail, size: image.size, type: image.mime_type, id: image.id};
vm.$refs.myVueDropzone.manuallyAddFile(file, image.thumbnail);
});
}
},
+2 -6
View File
@@ -13,16 +13,12 @@
color="black"
:rules="[rules.required, rules.cellNumberCounter]"
mask="#### ### ####"
></v-text-field>
/>
</v-flex>
</v-layout>
<v-layout row wrap class="px-3">
<v-flex xs12 md6 sm6 class="text-md-left text-sm-center text-xs-center">
<v-btn
class="WM-CyanBlueGradient-BG"
style="padding:10px 60px"
@click="handleSubmit"
>
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px" @click="handleSubmit">
<v-icon class="white--text mr-2 caption">fas fa-sign-in-alt</v-icon>
<span class="white--text">Send</span>
</v-btn>
+3 -5
View File
@@ -3,9 +3,7 @@
<v-container grid-list-xs>
<v-layout row wrap class="justify-center">
<v-flex xs12 md3 sm3 class="WM-WidthScreen-SM WM-WidthScreen-XS">
<material-card
color="black"
title="Login Page">
<material-card color="black" title="Login Page">
<v-layout row wrap class="px-3">
<v-flex xs12 md12 sm12>
<v-text-field
@@ -15,7 +13,7 @@
color="black"
:rules="[rules.required, rules.cellNumberCounter]"
mask="#### ### ####"
></v-text-field>
/>
</v-flex>
</v-layout>
<v-layout row wrap class="px-3">
@@ -30,7 +28,7 @@
:rules="[rules.required, rules.passCounter]"
color="black"
class="pa-2"
></v-text-field>
/>
</v-flex>
</v-layout>
<v-layout row wrap class="px-3">
+6 -12
View File
@@ -13,7 +13,7 @@
color="black"
class="pa-2"
:rules="[rules.required, rules.nameCounter]"
></v-text-field>
/>
</v-flex>
<v-flex xs12 md2 sm2>
<v-select
@@ -25,7 +25,7 @@
class="pa-2"
color="black"
:rules="[rules.required]"
></v-select>
/>
</v-flex>
<v-flex xs2 md2 sm2>
<v-text-field
@@ -35,7 +35,7 @@
color="black"
:rules="[rules.required, rules.countryCode]"
mask="####"
></v-text-field>
/>
</v-flex>
<v-flex xs10 md10 sm10>
<v-text-field
@@ -45,7 +45,7 @@
color="black"
:rules="[rules.required, rules.cellNumberCounter]"
mask="#### ### ####"
></v-text-field>
/>
</v-flex>
<v-flex xs12 md2 sm2>
<v-text-field
@@ -58,7 +58,7 @@
color="black"
class="pa-2"
:rules="[rules.required, rules.passCounter]"
></v-text-field>
/>
</v-flex>
</v-layout>
<v-layout row wrap>
@@ -68,13 +68,7 @@
<span class="white--text">Register</span>
</v-btn>
</v-flex>
<v-flex
v-if="!isLogin"
xs12
md6
sm6
class="text-md-right text-sm-center text-xs-center"
>
<v-flex v-if="!isLogin" xs12 md6 sm6 class="text-md-right text-sm-center text-xs-center">
<router-link to="/login">
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
<v-icon class="black--text mr-2 caption">fas fa-sign-in-alt</v-icon>
+1 -1
View File
@@ -35,7 +35,7 @@
</template>
<template slot="items" slot-scope="{ item }">
<td class="title font-weight-light WM-NoLetterSpacing">{{ item.name }}</td>
<td class="title font-weight-light">{{ $d(new Date(item.created_at), 'long') }}</td>
<td class="headline font-weight-light">{{ $d(new Date(item.created_at), 'long') }}</td>
<td class="title font-weight-light">{{ item.users_count }} Operator</td>
<td class="text-xs-right FlexBtn Height-MD-80 Height-SM-48 justify-self-end">
<v-tooltip bottom open-on-hover>
+7 -9
View File
@@ -20,7 +20,7 @@
<span class="white--text">Filter</span>
</v-btn>
</v-flex>
<v-spacer></v-spacer>
<v-spacer/>
<v-flex xs12 md2 sm2 class="text-xs-right">
<router-link :to="`/add-operator/${$route.params.medicalCenter}`">
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
@@ -34,10 +34,8 @@
<v-flex md12>
<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"
v-text="header.text"
/>
<span class="subheading font-weight-light text-white text--darken-3"
v-text="header.text"/>
</template>
<template slot="items" slot-scope="{ item }">
<td class="headline font-weight-light">{{ item.name }}</td>
@@ -48,8 +46,8 @@
<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'"
@click="changeStatus(item.id)"
class="mr-2 WM-ActionButton">
@click="changeStatus(item.id)"
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>
@@ -60,8 +58,8 @@
</template>
</v-btn>
<v-btn color="orange darken-1"
@click="changeRoleModal(item)"
class="mr-2 WM-ActionButton">
@click="changeRoleModal(item)"
class="mr-2 WM-ActionButton">
<v-icon class="white--text mr-2 caption">fas fa-user-tag</v-icon>
<span>Role</span>
</v-btn>
+1 -1
View File
@@ -62,7 +62,7 @@
<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>
{{ i.id }} <span v-if="index !== item.items.length-1">,</span>
</span>
</td>
<td class="title font-weight-light">{{ item.status }}</td>
+1 -1
View File
@@ -175,7 +175,7 @@ export default {
const result = await ApiService.get(urls.editPackage(id));
if (result.status == 200) {
this.formData = result.data.data;
console.log('')
const usedItems = this.formData.items.filter(i => i.id && i.name);
const existingIds = this.items.map(i => i.id);
usedItems.forEach(ui => {
+1 -1
View File
@@ -65,7 +65,7 @@
<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>
{{ i.id }} <span v-if="index !== item.items.length-1">,</span>
</span>
</td>
<td class="title font-weight-light">{{ item.status }}</td>
+1 -1
View File
@@ -99,7 +99,7 @@
{{ item.result }}
</span>
</td>
<td class="title font-weight-light">{{ $d(new Date(item.created_at), 'long') }}</td>
<td class="headline font-weight-light">{{ $d(new Date(item.created_at), 'long') }}</td>
<td class="title font-weight-light text-center">
<span v-if="item.verified == 'NotVerified'" class="NotVerified">
<v-icon class="caption fa fa-times NotVerified"/>
+2 -2
View File
@@ -86,10 +86,10 @@
<span class="subheading font-weight-light text-white text--darken-3" v-text="header.text"/>
</template>
<template slot="items" slot-scope="{ item }">
<td class="headline font-weight-light">{{ item.name }}</td>
<td class="title font-weight-light">{{ item.name }}</td>
<td class="title font-weight-light">{{ item.unique_code }}</td>
<td class="title font-weight-light">{{ item.user.name }}</td>
<td class="title font-weight-light">{{ $d(new Date(item.created_at), 'long') }}</td>
<td class="headline font-weight-light">{{ $d(new Date(item.created_at), 'long') }}</td>
<td class="text-xs-right FlexBtn justify-self-end">
<v-tooltip bottom open-on-hover>
<template v-slot:activator="{ on, attrs }">
+1 -1
View File
@@ -67,7 +67,7 @@
<template slot="items" slot-scope="{ item }">
<td class="title font-weight-light">{{ item.name }}</td>
<td class="title font-weight-light">{{ item.cell_number }}</td>
<td class="title font-weight-light">
<td class="headline font-weight-light">
<span class="WM-Font-14">{{ $d(new Date(item.created_at), 'long') }}</span>
</td>
<td class="title font-weight-light">