From 425858783e99182922c674d02c982d1cd7bfd092 Mon Sep 17 00:00:00 2001 From: raj6939 Date: Mon, 6 Feb 2023 11:44:20 +0530 Subject: [PATCH 1/4] bug fixed for file upload --- .../components/GeneralConfig.vue | 21 +++++++------- src/views/admin/setting/OrgSetting.vue | 28 ++++++++++++------- 2 files changed, 29 insertions(+), 20 deletions(-) diff --git a/src/components/admin/createProjectSlider/components/GeneralConfig.vue b/src/components/admin/createProjectSlider/components/GeneralConfig.vue index 419367c7..15904fad 100644 --- a/src/components/admin/createProjectSlider/components/GeneralConfig.vue +++ b/src/components/admin/createProjectSlider/components/GeneralConfig.vue @@ -140,24 +140,22 @@ input.largerCheckbox {
-
- Image of aspect ratio 16:9 or 4:3 -
+ Image of aspect ratio 16:9 or 4:3
- + + @@ -326,8 +324,11 @@ export default { }, methods: { + uploadBtn(){ + this.$refs.file.click(); + }, fileUploadForBanner(e) { - let file; + let file = this.$refs.file.files; if ((file = e.target.files[0])) { if (file.size > config.banner.bannersize) { return this.notifyErr("File size is more than 400kb"); diff --git a/src/views/admin/setting/OrgSetting.vue b/src/views/admin/setting/OrgSetting.vue index 06cca176..15db8257 100644 --- a/src/views/admin/setting/OrgSetting.vue +++ b/src/views/admin/setting/OrgSetting.vue @@ -52,11 +52,14 @@
-
- +
+ + {{fileName!==''?fileName : 'Maximum size 400kb'}}
-
- Preview + +
+ Preview
@@ -105,6 +108,7 @@ export default { }, data(){ return{ + fileName:"", orgSetting: { buttonBGColor: "#f1b319", buttonTextColor: "#000000", @@ -228,9 +232,13 @@ export default { } }, - methods: { - fileUpload(e) { - var file + methods: { + uploadBtn(){ + this.$refs.file.click(); + }, + fileUpload(e) { + this.fileName ="" + let file = this.$refs.file.files; if((file = e.target.files[0])) { if(file.size>config.banner.bannersize) { @@ -241,10 +249,9 @@ export default { // let dataUrl reader.onload=e=>{ this.orgSetting.logoPath= e.target.result + this.fileName = file.name } - } - - + } }, preview(){ this.$swal.fire({ @@ -329,6 +336,7 @@ export default { this.notifyErr(e) } finally { this.isLoading = false; + this.fileName = "" } } }, From ca4ff8bc44ca0057769a933172a21ee07f16b819 Mon Sep 17 00:00:00 2001 From: raj6939 Date: Mon, 6 Feb 2023 12:55:06 +0530 Subject: [PATCH 2/4] small change in UI --- .../admin/createProjectSlider/components/GeneralConfig.vue | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/components/admin/createProjectSlider/components/GeneralConfig.vue b/src/components/admin/createProjectSlider/components/GeneralConfig.vue index 15904fad..19a6147c 100644 --- a/src/components/admin/createProjectSlider/components/GeneralConfig.vue +++ b/src/components/admin/createProjectSlider/components/GeneralConfig.vue @@ -140,10 +140,7 @@ input.largerCheckbox {
-
+ - Image of aspect ratio 16:9 or 4:3 -
From a22221e82cac5d2f3d7004ee9215399553245acc Mon Sep 17 00:00:00 2001 From: raj6939 Date: Mon, 6 Feb 2023 13:11:27 +0530 Subject: [PATCH 3/4] small bug fixed --- src/views/admin/setting/OrgSetting.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/views/admin/setting/OrgSetting.vue b/src/views/admin/setting/OrgSetting.vue index 15db8257..46dd6be4 100644 --- a/src/views/admin/setting/OrgSetting.vue +++ b/src/views/admin/setting/OrgSetting.vue @@ -51,11 +51,9 @@
-
-
+
- {{fileName!==''?fileName : 'Maximum size 400kb'}} -
+
From eca7225fdeda5ee30e96cc2b758058d59cd772a0 Mon Sep 17 00:00:00 2001 From: raj6939 Date: Mon, 6 Feb 2023 14:18:33 +0530 Subject: [PATCH 4/4] alignment fix --- src/views/admin/setting/OrgSetting.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/admin/setting/OrgSetting.vue b/src/views/admin/setting/OrgSetting.vue index 46dd6be4..ccbcb88a 100644 --- a/src/views/admin/setting/OrgSetting.vue +++ b/src/views/admin/setting/OrgSetting.vue @@ -47,7 +47,7 @@