diff --git a/frontend/src/components/Controls/Grid.vue b/frontend/src/components/Controls/Grid.vue
index 519f7a1b..0515015e 100644
--- a/frontend/src/components/Controls/Grid.vue
+++ b/frontend/src/components/Controls/Grid.vue
@@ -33,7 +33,7 @@
{{ __(field.label) }}
@@ -84,36 +84,71 @@
+
+
(row[field.fieldname] = v)"
+ :placeholder="field.placeholder"
+ :hideMe="true"
+ >
+
+
+
+
+
+
+
+
+
+ {{ getUser(option.value).full_name }}
+
+
+
+
@@ -216,7 +251,9 @@ import GridRowFieldsModal from '@/components/Controls/GridRowFieldsModal.vue'
import GridRowModal from '@/components/Controls/GridRowModal.vue'
import EditIcon from '@/components/Icons/EditIcon.vue'
import Link from '@/components/Controls/Link.vue'
+import UserAvatar from '@/components/UserAvatar.vue'
import { getRandom, getFormat } from '@/utils'
+import { usersStore } from '@/stores/users'
import { getMeta } from '@/stores/meta'
import {
FeatherIcon,
@@ -224,6 +261,7 @@ import {
Checkbox,
DateTimePicker,
DatePicker,
+ Tooltip,
} from 'frappe-ui'
import Draggable from 'vuedraggable'
import { ref, reactive, computed } from 'vue'
@@ -247,6 +285,7 @@ const { getGridViewSettings, getFields, getGridSettings } = getMeta(
props.doctype,
)
getMeta(props.parentDoctype)
+const { getUser } = usersStore()
const rows = defineModel()
const showRowList = ref(new Array(rows.value?.length || []).fill(false))
@@ -273,11 +312,9 @@ const fields = computed(() => {
function getFieldObj(field) {
return {
- label: field.label,
- name: field.fieldname,
- type: field.fieldtype,
- options: field.options,
- in_list_view: field.in_list_view,
+ ...field,
+ filters: field.link_filters && JSON.parse(field.link_filters),
+ placeholder: field.placeholder || field.label,
}
}
@@ -319,8 +356,8 @@ const toggleSelectRow = (row) => {
const addRow = () => {
const newRow = {}
fields.value?.forEach((field) => {
- if (field.type === 'Check') newRow[field.name] = false
- else newRow[field.name] = ''
+ if (field.fieldtype === 'Check') newRow[field.fieldname] = false
+ else newRow[field.fieldname] = ''
})
newRow.name = getRandom(10)
showRowList.value.push(false)
diff --git a/frontend/src/stores/meta.js b/frontend/src/stores/meta.js
index 07b4d149..092c948a 100644
--- a/frontend/src/stores/meta.js
+++ b/frontend/src/stores/meta.js
@@ -75,6 +75,16 @@ export function getMeta(doctype) {
value: option,
}
})
+
+ if (f.options[0]?.value !== '') {
+ f.options.unshift({
+ label: '',
+ value: '',
+ })
+ }
+ }
+ if (f.fieldtype === 'Link' && f.options == 'User') {
+ f.fieldtype = 'User'
}
return f
})