From 049649a81e49a9b707967ef378ec629932c7c942 Mon Sep 17 00:00:00 2001 From: Chirag <103994754+chiragnotionforms@users.noreply.github.com> Date: Sat, 28 Jan 2023 17:25:15 +0530 Subject: [PATCH] remove extra old code + fix middleware JS set layout (#82) Co-authored-by: Julien Nahum --- app/Http/Requests/UserFormRequest.php | 3 --- resources/js/components/open/forms/OpenForm.vue | 3 --- .../open/forms/fields/FormFieldOptionsModal.vue | 12 ------------ resources/js/router/index.js | 4 ---- 4 files changed, 22 deletions(-) diff --git a/app/Http/Requests/UserFormRequest.php b/app/Http/Requests/UserFormRequest.php index 74925b2..f972c57 100644 --- a/app/Http/Requests/UserFormRequest.php +++ b/app/Http/Requests/UserFormRequest.php @@ -100,13 +100,10 @@ abstract class UserFormRequest extends \Illuminate\Foundation\Http\FormRequest // Date field 'properties.*.with_time' => 'boolean|nullable', - 'properties.*.use_am_pm' => 'boolean|nullable', 'properties.*.date_range' => 'boolean|nullable', 'properties.*.prefill_today' => 'boolean|nullable', 'properties.*.disable_past_dates' => 'boolean|nullable', 'properties.*.disable_future_dates' => 'boolean|nullable', - 'properties.*.simple_date_input' => 'boolean|nullable', - 'properties.*.simple_date_input_format' => 'string|nullable', // Select / Multi Select field 'properties.*.allow_creation' => 'boolean|nullable', diff --git a/resources/js/components/open/forms/OpenForm.vue b/resources/js/components/open/forms/OpenForm.vue index 4d3e8c2..118649a 100644 --- a/resources/js/components/open/forms/OpenForm.vue +++ b/resources/js/components/open/forms/OpenForm.vue @@ -435,9 +435,6 @@ export default { } else if (field.date_range) { inputProperties.dateRange = true } - if (field.use_am_pm) { - inputProperties.amPm = true - } if (field.disable_past_dates) { inputProperties.disablePastDates = true } else if (field.disable_future_dates) { diff --git a/resources/js/components/open/forms/fields/FormFieldOptionsModal.vue b/resources/js/components/open/forms/fields/FormFieldOptionsModal.vue index b6b6347..710856f 100644 --- a/resources/js/components/open/forms/fields/FormFieldOptionsModal.vue +++ b/resources/js/components/open/forms/fields/FormFieldOptionsModal.vue @@ -419,9 +419,6 @@ export default { if (['text', 'number', 'url', 'email', 'phone_number'].includes(this.field.type) && !this.field.max_char_limit) { this.field.max_char_limit = 2000 } - if (this.field.type == 'date' && !this.field.simple_date_input_format) { - this.field.simple_date_input_format = this.dateFormatOptions[0]['value'] - } }, methods: { @@ -463,14 +460,12 @@ export default { if (this.field.date_range) { this.$set(this.field, 'with_time', false) this.$set(this.field, 'prefill_today', false) - this.$set(this.field, 'simple_date_input', false) } }, onFieldWithTimeChange(val) { this.$set(this.field, 'with_time', val) if (this.field.with_time) { this.$set(this.field, 'date_range', false) - this.$set(this.field, 'simple_date_input', false) } }, onFieldGenUIdChange(val) { @@ -538,13 +533,6 @@ export default { this.$set(this.field, 'disable_past_dates', false) this.$set(this.field, 'prefill_today', false) } - }, - onFieldSimpleDateInputChange(val) { - this.$set(this.field, 'simple_date_input', val) - if (this.field.simple_date_input) { - this.$set(this.field, 'with_time', false) - this.$set(this.field, 'date_range', false) - } } } } diff --git a/resources/js/router/index.js b/resources/js/router/index.js index 41a3ea7..bbca434 100644 --- a/resources/js/router/index.js +++ b/resources/js/router/index.js @@ -237,10 +237,6 @@ function scrollBehavior (to, from, savedPosition) { }) } -/** - * @param {Object} requireContext - * @return {Object} - */ /** * @param {Object} requireContext * @return {Object}