1
0
forked from test/crm

fix: minor UI fixes

This commit is contained in:
Shariq Ansari 2023-08-11 12:36:15 +05:30
parent cd88c0d0e4
commit 360a91f8b7

View File

@ -18,45 +18,48 @@
<div <div
v-if="storage.size" v-if="storage.size"
v-for="(f, i) in storage" v-for="(f, i) in storage"
:key="f.field.fieldname" :key="i"
id="filter-list" id="filter-list"
class="flex flex-col gap-2 mb-3" class="flex items-center justify-between gap-2 mb-3"
> >
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<div class="text-gray-600 text-base pl-2 w-13 text-end"> <div class="text-gray-600 text-base pl-2 w-13 text-end">
{{ i == 0 ? 'Where' : 'And' }} {{ i == 0 ? 'Where' : 'And' }}
</div> </div>
<div id="fieldname" class="!min-w-[140px]">
<Autocomplete <Autocomplete
class="!min-w-[140px]"
:value="f.field.fieldname" :value="f.field.fieldname"
:options="filterableFields.data" :options="filterableFields.data"
@change="(e) => updateFilter(e, i)" @change="(e) => updateFilter(e, i)"
placeholder="Filter by..." placeholder="Filter by..."
/> />
</div>
<div id="operator">
<FormControl <FormControl
type="select" type="select"
v-model="f.operator" v-model="f.operator"
:options="getOperators(f.field.fieldtype)" :options="getOperators(f.field.fieldtype)"
placeholder="Operator" placeholder="Operator"
/> />
</div>
<div id="value" class="!min-w-[140px]">
<SearchComplete <SearchComplete
v-if="typeLink.includes(f.field.fieldtype)" v-if="typeLink.includes(f.field.fieldtype)"
:doctype="f.field.options" :doctype="f.field.options"
:value="f.value" :value="f.value"
@change="(v) => (f.value = v.value)" @change="(v) => (f.value = v.value)"
placeholder="Value" placeholder="Value"
class="!min-w-[140px]"
/> />
<component <component
v-else v-else
:is="getValSelect(f.field.fieldtype, f.field.options)" :is="getValSelect(f.field.fieldtype, f.field.options)"
v-model="f.value" v-model="f.value"
placeholder="Value" placeholder="Value"
class="!min-w-[140px]"
/> />
<Button variant="ghost" icon="x" @click="removeFilter(i)" />
</div> </div>
</div> </div>
<Button variant="ghost" icon="x" @click="removeFilter(i)" />
</div>
<div <div
v-else v-else
class="text-gray-600 flex items-center text-sm px-3 h-7 mb-3" class="text-gray-600 flex items-center text-sm px-3 h-7 mb-3"