fix: allow saving/updating group_by view

This commit is contained in:
Shariq Ansari 2024-06-01 14:23:46 +05:30
parent faad7699fe
commit 1717ec0fa8
3 changed files with 8 additions and 1 deletions

View File

@ -27,6 +27,7 @@ def create(view):
doc = frappe.new_doc("CRM View Settings")
doc.name = view.label
doc.label = view.label
doc.type = view.type or 'list'
doc.icon = view.icon
doc.dt = view.doctype
doc.user = frappe.session.user
@ -53,6 +54,7 @@ def update(view):
doc = frappe.get_doc("CRM View Settings", view.name)
doc.label = view.label
doc.type = view.type or 'list'
doc.icon = view.icon
doc.route_name = view.route_name or ""
doc.load_default_columns = view.load_default_columns or False

View File

@ -75,6 +75,7 @@ const duplicateMode = ref(false)
const _view = ref({
name: '',
label: '',
type: 'list',
icon: '',
filters: {},
order_by: 'modified desc',

View File

@ -227,7 +227,11 @@
afterCreate: async (v) => {
await reloadView()
viewUpdated = false
router.push({ name: route.name, query: { view: v.name } })
router.push({
name: route.name,
params: { viewType: v.type || 'list' },
query: { view: v.name },
})
},
afterUpdate: () => {
viewUpdated = false