From 9c786dd27140453741b6e79e2569d3aac0fb22ad Mon Sep 17 00:00:00 2001
From: TheCodeholic
Date: Sat, 22 Jan 2022 10:00:58 +0400
Subject: [PATCH 1/7] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index d67a588..8976663 100644
--- a/README.md
+++ b/README.md
@@ -46,5 +46,5 @@ https://yoursurveys.xyz
## License
-The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
+The project is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
From 75312c03615db284b67fba579c35dca73f70f0ee Mon Sep 17 00:00:00 2001
From: Zura Sekhniashvili
Date: Sun, 23 Jan 2022 22:18:32 +0400
Subject: [PATCH 2/7] Create reusable core components
Create the following components
DashboardCard.vue
TButton.vue
TButtonLoading.vue
---
vue/src/components/core/DashboardCard.vue | 19 ++++
vue/src/components/core/TButton.vue | 118 +++++++++++++++++++++
vue/src/components/core/TButtonLoading.vue | 43 ++++++++
3 files changed, 180 insertions(+)
create mode 100644 vue/src/components/core/DashboardCard.vue
create mode 100644 vue/src/components/core/TButton.vue
create mode 100644 vue/src/components/core/TButtonLoading.vue
diff --git a/vue/src/components/core/DashboardCard.vue b/vue/src/components/core/DashboardCard.vue
new file mode 100644
index 0000000..3fad12c
--- /dev/null
+++ b/vue/src/components/core/DashboardCard.vue
@@ -0,0 +1,19 @@
+
+
+
+ {{title}}
+
+
+
+
+
+
+
+
+
diff --git a/vue/src/components/core/TButton.vue b/vue/src/components/core/TButton.vue
new file mode 100644
index 0000000..713ff57
--- /dev/null
+++ b/vue/src/components/core/TButton.vue
@@ -0,0 +1,118 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/vue/src/components/core/TButtonLoading.vue b/vue/src/components/core/TButtonLoading.vue
new file mode 100644
index 0000000..66e3692
--- /dev/null
+++ b/vue/src/components/core/TButtonLoading.vue
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
From fa54015fb9dd623835d2b959519f9977dd44fad2 Mon Sep 17 00:00:00 2001
From: Zura Sekhniashvili
Date: Sun, 23 Jan 2022 22:19:11 +0400
Subject: [PATCH 3/7] Use TButtonLoading.vue components in login and register
pages
---
vue/src/views/Login.vue | 34 +++-----------------------------
vue/src/views/Register.vue | 40 +++-----------------------------------
2 files changed, 6 insertions(+), 68 deletions(-)
diff --git a/vue/src/views/Login.vue b/vue/src/views/Login.vue
index 11456ca..92cf230 100644
--- a/vue/src/views/Login.vue
+++ b/vue/src/views/Login.vue
@@ -88,44 +88,15 @@
@@ -136,6 +107,7 @@ import store from "../store";
import { useRouter } from "vue-router";
import { ref } from "vue";
import Alert from "../components/Alert.vue";
+import TButtonLoading from "../components/core/TButtonLoading.vue";
const router = useRouter();
diff --git a/vue/src/views/Register.vue b/vue/src/views/Register.vue
index f2aa9a9..e97bde5 100644
--- a/vue/src/views/Register.vue
+++ b/vue/src/views/Register.vue
@@ -87,44 +87,9 @@
-
+
@@ -134,6 +99,7 @@ import { ref } from "vue";
import { LockClosedIcon } from "@heroicons/vue/solid";
import store from "../store";
import { useRouter } from "vue-router";
+import TButtonLoading from '../components/core/TButtonLoading.vue'
import Alert from "../components/Alert.vue";
const router = useRouter();
From a47c77d0167449c69a299a4983800e13512e240c Mon Sep 17 00:00:00 2001
From: Zura Sekhniashvili
Date: Sun, 23 Jan 2022 22:21:22 +0400
Subject: [PATCH 4/7] Use DashboardCard.vue component on dashboard
---
vue/src/views/Dashboard.vue | 57 +++++++++++++++++--------------------
1 file changed, 26 insertions(+), 31 deletions(-)
diff --git a/vue/src/views/Dashboard.vue b/vue/src/views/Dashboard.vue
index f7fae7b..2108df2 100644
--- a/vue/src/views/Dashboard.vue
+++ b/vue/src/views/Dashboard.vue
@@ -5,32 +5,27 @@
v-else
class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5 text-gray-700"
>
-
-
Total Surveys
+
+ Total Surveys
{{ data.totalSurveys }}
-
-
-
Total Answers
+
+
+ Total Answers
{{ data.totalAnswers }}
-
-
+
- Latest Survey
+ Latest Survey
![]()
Your don't have surveys yet
-
-
+
+
diff --git a/vue/src/store/index.js b/vue/src/store/index.js
index aedcb7e..5d47ed1 100644
--- a/vue/src/store/index.js
+++ b/vue/src/store/index.js
@@ -32,7 +32,7 @@ const store = createStore({
register({commit}, user) {
return axiosClient.post('/register', user)
- .then(({data}) => {
+ .then((response) => {
commit('setUser', data.user);
commit('setToken', data.token)
return data;
diff --git a/vue/src/views/Register.vue b/vue/src/views/Register.vue
index e97bde5..22fdf3b 100644
--- a/vue/src/views/Register.vue
+++ b/vue/src/views/Register.vue
@@ -1,97 +1,79 @@
-

-
-
- Or
- {{ " " }}
-
+
+
+
+ Or
+ {{ " " }}
+
+ login to your account
+
+
+
+
-
-