Migrate to Vite (#71)
* Replace DateInput * Migrate to Vite * Ecxluding optimize to fix notifs in dev * Dateinput changes * Fixs on new DateInput * wip * Updated date input + cleaning * Udpated readme Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
@@ -139,9 +139,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ProTag from '../../../common/ProTag'
|
||||
const FormBlockLogicEditor = () => import('../components/form-logic-components/FormBlockLogicEditor')
|
||||
import CodeInput from '../../../forms/CodeInput'
|
||||
import ProTag from '../../../common/ProTag.vue'
|
||||
const FormBlockLogicEditor = () => import('../components/form-logic-components/FormBlockLogicEditor.vue')
|
||||
import CodeInput from '../../../forms/CodeInput.vue'
|
||||
|
||||
export default {
|
||||
name: 'FormBlockOptionsModal',
|
||||
|
||||
@@ -150,15 +150,6 @@
|
||||
<p class="text-gray-400 mb-5">
|
||||
Include time. Or not. This cannot be used with the date range option yet.
|
||||
</p>
|
||||
<v-checkbox v-if="field.with_time"
|
||||
v-model="field.use_am_pm"
|
||||
name="use_am_pm"
|
||||
>
|
||||
Use 12h AM/PM format
|
||||
</v-checkbox>
|
||||
<p v-if="field.with_time" class="text-gray-400 mb-5">
|
||||
By default, input uses the 24 hours format
|
||||
</p>
|
||||
|
||||
<select-input v-if="field.with_time" name="timezone" class="mt-4"
|
||||
:form="field" :options="timezonesOptions"
|
||||
@@ -188,18 +179,6 @@
|
||||
>
|
||||
Disable future dates
|
||||
</v-checkbox>
|
||||
|
||||
<v-checkbox v-model="field.simple_date_input"
|
||||
name="simple_date_input" class="mb-3"
|
||||
@input="onFieldSimpleDateInputChange"
|
||||
>
|
||||
Simple date input
|
||||
</v-checkbox>
|
||||
<select-input v-if="field.simple_date_input" v-model="field.simple_date_input_format"
|
||||
name="simple_date_input_format"
|
||||
class="mt-4" :form="field" :options="dateFormatOptions"
|
||||
label="Date format"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- select/multiselect Options -->
|
||||
@@ -264,7 +243,7 @@
|
||||
:multiple="field.type==='multi_select'"
|
||||
/>
|
||||
<date-input v-else-if="field.type==='date' && field.prefill_today!==true" name="prefill" class="mt-4"
|
||||
:form="field" :with-time="field.with_time===true" :am-pm="field.use_am_pm===true"
|
||||
:form="field" :with-time="field.with_time===true"
|
||||
:date-range="field.date_range===true"
|
||||
label="Pre-filled value"
|
||||
/>
|
||||
@@ -370,10 +349,10 @@
|
||||
<script>
|
||||
|
||||
import timezones from '../../../../../data/timezones.json'
|
||||
import ProTag from "../../../common/ProTag"
|
||||
import ProTag from "../../../common/ProTag.vue"
|
||||
|
||||
const FormBlockLogicEditor = () => import('../components/form-logic-components/FormBlockLogicEditor')
|
||||
import ChangeFieldType from "./components/ChangeFieldType"
|
||||
const FormBlockLogicEditor = () => import('../components/form-logic-components/FormBlockLogicEditor.vue')
|
||||
import ChangeFieldType from "./components/ChangeFieldType.vue"
|
||||
|
||||
export default {
|
||||
name: 'FormFieldOptionsModal',
|
||||
@@ -432,16 +411,6 @@ export default {
|
||||
return option.name
|
||||
}).join("\n")
|
||||
},
|
||||
dateFormatOptions() {
|
||||
if (this.field.type !== 'date') return []
|
||||
let formats = ['DD/MM/YYYY', 'MM/DD/YYYY', 'YYYY/MM/DD']
|
||||
return formats.map((format) => {
|
||||
return {
|
||||
name: format,
|
||||
value: format
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
watch: {},
|
||||
@@ -495,7 +464,6 @@ export default {
|
||||
},
|
||||
onFieldWithTimeChange(val) {
|
||||
this.$set(this.field, 'with_time', val)
|
||||
this.$set(this.field, 'use_am_pm', false)
|
||||
if (this.field.with_time) {
|
||||
this.$set(this.field, 'date_range', false)
|
||||
this.$set(this.field, 'simple_date_input', false)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Dropdown from '../../../../common/Dropdown'
|
||||
import Dropdown from '../../../../common/Dropdown.vue'
|
||||
|
||||
export default {
|
||||
name: 'ChangeFieldType',
|
||||
|
||||
Reference in New Issue
Block a user