From bca39a475dfd3aab0b31709b2c4873398901b00c Mon Sep 17 00:00:00 2001
From: Andrew <saintruler@gmail.com>
Date: Fri, 19 Jul 2019 00:11:33 +0400
Subject: =?UTF-8?q?=D0=9A=D0=BD=D0=BE=D0=BF=D0=BA=D0=B0=20=D1=83=D0=B4?=
 =?UTF-8?q?=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=80=D1=8F=D0=B4=D0=B0?=
 =?UTF-8?q?=20=D1=82=D0=B5=D0=BF=D0=B5=D1=80=D1=8C=20=D0=B4=D0=B5=D0=B9?=
 =?UTF-8?q?=D1=81=D1=82=D0=B2=D0=B8=D1=82=D0=B5=D0=BB=D1=8C=D0=BD=D0=BE=20?=
 =?UTF-8?q?=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=D0=B5=D1=82.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 day9/task5_vue/src/components/AddNewEntryButton.vue | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

(limited to 'day9/task5_vue/src/components/AddNewEntryButton.vue')

diff --git a/day9/task5_vue/src/components/AddNewEntryButton.vue b/day9/task5_vue/src/components/AddNewEntryButton.vue
index fa52f8b..dc86907 100644
--- a/day9/task5_vue/src/components/AddNewEntryButton.vue
+++ b/day9/task5_vue/src/components/AddNewEntryButton.vue
@@ -2,7 +2,7 @@
     <button
             @mouseenter="isHovered = true"
             @mouseleave="isHovered = false"
-            @click="showCreateForm">
+            @click="showForm">
         <div v-if="isHovered">Add new entry</div>
         <div v-else>+</div>
     </button>
@@ -13,17 +13,24 @@
 
     export default {
         name: "AddNewEntryButton",
+        props: ['showFormCallback'],
         components: {EditFormBox},
 
         data() {
             return {
-                isHovered: false
+                isHovered: false,
             }
         },
 
         methods: {
-            showCreateForm() {
-
+            showForm() {
+                this.showFormCallback('create', {
+                    service_id: '', servtype: '', subtype: '',
+                    user_id: '', referrer_user_id: '', state: '',
+                    creation_date: '', creation_time: '',
+                    creation_request_sent_date: '',
+                    notified_about_expiration: ''
+                })
             }
         }
     }
-- 
cgit v1.2.3

