show me fill now fields colors

pull/150/merge^2
iozeey 2 years ago
parent 8956467814
commit e50ef7f69b

@ -40,9 +40,9 @@
@pointerdown.stop @pointerdown.stop
> >
<FieldSubmitter <FieldSubmitter
v-if="!['my_text', 'my_signature', 'my_initials', 'my_date', 'my_check'].includes(field.type)"
v-model="field.submitter_uuid" v-model="field.submitter_uuid"
class="border-r" class="border-r"
:me-fields="['my_text', 'my_signature', 'my_initials', 'my_date', 'my_check'].includes(field.type)"
:compact="true" :compact="true"
:editable="editable" :editable="editable"
:menu-classes="'dropdown-content bg-white menu menu-xs p-2 shadow rounded-box w-52 rounded-t-none -left-[1px]'" :menu-classes="'dropdown-content bg-white menu menu-xs p-2 shadow rounded-box w-52 rounded-t-none -left-[1px]'"
@ -195,7 +195,7 @@
v-else v-else
class="flex items-center h-full w-full" class="flex items-center h-full w-full"
:class="[submitterIndex != 0 ? bgColors[submitterIndex] : '', field?.default_value ? '' : 'justify-center']" :class="[submitterIndex != 0 ? bgColors[submitterIndex] : '', field?.default_value ? '' : 'justify-center']"
:style="[submitterIndex == 0 ? bgColors[submitterIndex] : '']" :style="{backgroundColor: submitterIndex == 0 ? bgColors[submitterIndex] : ''}"
> >
<span <span
v-if="field" v-if="field"

@ -29,7 +29,7 @@
/> />
</label> </label>
<ul <ul
v-if="editable" v-if="editable && !meFields"
tabindex="0" tabindex="0"
class="rounded-md min-w-max mb-2" class="rounded-md min-w-max mb-2"
:class="menuClasses" :class="menuClasses"
@ -48,7 +48,8 @@
<span class="py-1 flex items-center"> <span class="py-1 flex items-center">
<span <span
class="rounded-full w-3 h-3 ml-1 mr-3" class="rounded-full w-3 h-3 ml-1 mr-3"
:class="colors[index]" :class="submitter.name !== 'Me'? colors[index] : ''"
:style="{backgroundColor: submitter.name === 'Me'? colors[index] : ''}"
/> />
<span> <span>
{{ submitter.name }} {{ submitter.name }}
@ -94,7 +95,8 @@
> >
<button <button
class="mx-1 w-3 h-3 rounded-full" class="mx-1 w-3 h-3 rounded-full"
:class="colors[submitters.indexOf(selectedSubmitter)]" :class="selectedSubmitter.name !== 'Me'? colors[submitters.indexOf(selectedSubmitter)] : ''"
:style="{backgroundColor: selectedSubmitter.name === 'Me'? colors[submitters.indexOf(selectedSubmitter)] : ''}"
/> />
</label> </label>
<div <div
@ -129,7 +131,7 @@
</label> </label>
</div> </div>
<ul <ul
v-if="editable || !compact" v-if="(editable && !meFields) || !compact"
tabindex="0" tabindex="0"
:class="menuClasses" :class="menuClasses"
@click="closeDropdown" @click="closeDropdown"
@ -147,7 +149,8 @@
<span class="py-1 flex items-center"> <span class="py-1 flex items-center">
<span <span
class="rounded-full w-3 h-3 ml-1 mr-3" class="rounded-full w-3 h-3 ml-1 mr-3"
:class="colors[index]" :class="submitter.name !== 'Me'? colors[index] : ''"
:style="{backgroundColor: submitter.name === 'Me'? colors[index] : ''}"
/> />
<span> <span>
{{ submitter.name }} {{ submitter.name }}
@ -205,6 +208,11 @@ export default {
type: Array, type: Array,
required: true required: true
}, },
meFields: {
type: Boolean,
required: false,
default: true
},
editable: { editable: {
type: Boolean, type: Boolean,
required: false, required: false,

Loading…
Cancel
Save