From c63ed7e6d35015ce5a8d73ebc0d2ee5d3c512dd4 Mon Sep 17 00:00:00 2001 From: paoloar77 Date: Thu, 10 Feb 2022 23:31:18 +0100 Subject: [PATCH] - Se non aggiungo la foto alla competenza, prendo quella del profilo --- src/components/CGallery/CGallery.scss | 14 ++++- src/components/CGallery/CGallery.ts | 19 ++++++- src/components/CGallery/CGallery.vue | 36 +++++++++++-- .../CGridTableRec/CGridTableRec.vue | 4 +- src/components/CMyPopupEdit/CMyPopupEdit.vue | 7 +-- src/css/app.scss | 2 +- src/model/GlobalStore.ts | 1 + src/rootgen/admin/importdata/importdata.ts | 54 ++++++++++--------- src/statics/lang/it.js | 1 + src/store/Modules/fieldsTable.ts | 5 +- src/views/user/editprofile/editprofile.vue | 1 + 11 files changed, 104 insertions(+), 40 deletions(-) diff --git a/src/components/CGallery/CGallery.scss b/src/components/CGallery/CGallery.scss index 9c9a074e..0e7557e9 100755 --- a/src/components/CGallery/CGallery.scss +++ b/src/components/CGallery/CGallery.scss @@ -42,14 +42,24 @@ $grayshadow: #555; width: 100%; max-width: 300px; min-width: 200px; - padding: 1rem 1rem; + padding: 0.5rem 0.5rem; height: 350px; margin: auto; } +.my-card-gallery-noModif { + width: 100%; + max-width: 300px; + min-width: 200px; + padding: 1rem 1rem; + height: 220px; +} + + + .my-card-gallery-view { width: 100px; height: 100px; - padding: 0.5rem 0.5rem; + padding: 0.25rem 0.25rem; margin: auto; } diff --git a/src/components/CGallery/CGallery.ts b/src/components/CGallery/CGallery.ts index b6c91a78..f9934792 100755 --- a/src/components/CGallery/CGallery.ts +++ b/src/components/CGallery/CGallery.ts @@ -19,6 +19,11 @@ export default defineComponent({ type: Boolean, required: true, }, + isInModif: { + type: Boolean, + required: false, + default: false, + }, single: { type: Boolean, required: false, @@ -29,6 +34,11 @@ export default defineComponent({ type: String, required: true, }, + imagebak: { + type: String, + required: false, + default: '', + }, imgGall: { type: Object as PropType, required: true, @@ -184,7 +194,7 @@ export default defineComponent({ } function getclass() { - return (props.edit || displayGall.value) ? 'my-card-gallery' : 'my-card-gallery-view' + ' text-center' + return (props.edit || displayGall.value) ? (props.isInModif ? 'my-card-gallery' : 'my-card-gallery-noModif') : 'my-card-gallery-view' + ' text-center' } function getclimg() { @@ -247,7 +257,12 @@ export default defineComponent({ } function getfullname(rec: any) { - return costanti.DIR_UPLOAD + props.directory + '/' + rec.imagefile + if (rec) { + return costanti.DIR_UPLOAD + props.directory + '/' + rec.imagefile + } else { + return props.imagebak + } + } function copytoclipboard(rec: any) { diff --git a/src/components/CGallery/CGallery.vue b/src/components/CGallery/CGallery.vue index 92d15568..a5fe0014 100755 --- a/src/components/CGallery/CGallery.vue +++ b/src/components/CGallery/CGallery.vue @@ -1,8 +1,9 @@