From 3bc79068d5d7bae4bb4ecd3a50ff1c7cade4a3a7 Mon Sep 17 00:00:00 2001
From: Andrew <saintruler@gmail.com>
Date: Sun, 21 Jul 2019 13:39:12 +0400
Subject: =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B0?=
 =?UTF-8?q?=20=D0=B2=D0=B0=D0=BB=D0=B8=D0=B4=D0=B0=D1=86=D0=B8=D1=8F=20?=
 =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D0=B2=D1=81=D0=B5=D1=85=20=D0=B7=D0=B0?=
 =?UTF-8?q?=D0=BF=D1=80=D0=BE=D1=81=D0=BE=D0=B2=20=D0=BD=D0=B0=20=D0=B8?=
 =?UTF-8?q?=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B1=D0=B4?=
 =?UTF-8?q?.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 day9/task5_vue/src/components/EditFormBox.vue | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

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

diff --git a/day9/task5_vue/src/components/EditFormBox.vue b/day9/task5_vue/src/components/EditFormBox.vue
index 46438d4..861a82d 100644
--- a/day9/task5_vue/src/components/EditFormBox.vue
+++ b/day9/task5_vue/src/components/EditFormBox.vue
@@ -141,6 +141,11 @@
                 let creation_date = this.$refs.creation_request_sent_date.value;
                 let creation_time = this.$refs.creation_request_sent_time.value;
 
+                let creation_request_sent_date = null;
+
+                if (creation_date !== '' && creation_time !== '')
+                    creation_request_sent_date = creation_date + ' ' + creation_time;
+
                 let formData = {
                     service_id: parseInt(this.$refs.service_id.value),
                     servtype: this.$refs.servtype.value,
@@ -150,7 +155,7 @@
                     state: this.$refs.state.value,
                     creation_date: this.$refs.creation_date.value,
                     creation_time: this.$refs.creation_time.value,
-                    creation_request_sent_date: (creation_date + ' ' + creation_time),
+                    creation_request_sent_date: creation_request_sent_date,
                     notified_about_expiration: parseInt(this.$refs.notified_about_expiration.value)
                 };
 
@@ -165,7 +170,7 @@
                         this.validationResponse = response.data;
                     });
 
-                if (this.validationResponse.error !== null) {
+                if (this.validationResponse.error === false) {
                     axios
                         .request({
                             url: '/api/update/',
-- 
cgit v1.2.3

