added date & time to meta properties

pull/49/head
A1Gard 3 months ago
parent a7cd5420cd
commit a7034eba5c

@ -20,7 +20,7 @@ class Prop extends Model
'datas'
];
public static $prop_types = ['text', 'number', 'checkbox', 'color', 'select', 'multi', 'singlemulti'];
public static $prop_types = ['text', 'number', 'checkbox', 'color', 'select', 'multi', 'singlemulti', 'date', 'time'];
public function categories()
{
@ -36,6 +36,7 @@ class Prop extends Model
return $result;
}
public function getDatasAttribute()
{
$result = [];

@ -49,6 +49,12 @@
<searchable-multi-select :items="prop.optionList" value-field="value"
v-model="meta[prop.name]"></searchable-multi-select>
</template>
<template v-if="prop.type == 'date'">
<vue-date-time-picker v-model="meta[prop.name]"></vue-date-time-picker>
</template>
<template v-if="prop.type == 'time'">
<vue-time-picker v-model="meta[prop.name]" :am-pm="false"></vue-time-picker>
</template>
</div>
</div>
</div>
@ -105,6 +111,12 @@
<searchable-multi-select xname="" :items="prop.optionList" value-field="value"
v-model="q.data[prop.name]"></searchable-multi-select>
</template>
<template v-if="prop.type == 'date'">
<vue-date-time-picker v-model="q.data[prop.name]"></vue-date-time-picker>
</template>
<template v-if="prop.type == 'time'">
<vue-time-picker v-model="q.data[prop.name]" :am-pm="false"></vue-time-picker>
</template>
</div>
</div>
</template>
@ -148,6 +160,8 @@
import {mapState} from "vuex";
import searchableMultiSelect from "./SearchableMultiSelect.vue";
import CurrencyInput from "./CurrencyInput.vue";
import VueDateTimePicker from "./vueDateTimePicker.vue";
import vueTimePicker from "./vueTimePicker.vue";
function arraysEqual(arr1, arr2) {
if (arr1.length !== arr2.length) {
@ -163,7 +177,9 @@ export default {
name: "meta-input",
components: {
searchableMultiSelect,
CurrencyInput
CurrencyInput,
VueDateTimePicker,
vueTimePicker,
},
data: () => {
return {

Loading…
Cancel
Save