summaryrefslogtreecommitdiff
path: root/day9/task5_vue/src/components/EditFormBox.vue
diff options
context:
space:
mode:
Diffstat (limited to 'day9/task5_vue/src/components/EditFormBox.vue')
-rw-r--r--day9/task5_vue/src/components/EditFormBox.vue9
1 files changed, 7 insertions, 2 deletions
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/',