xhiveframework.listview_settings["ToDo"] = {
	hide_name_column: true,
	add_fields: ["reference_type", "reference_name"],

	onload: function (me) {
		if (!Object.keys(xhiveframework.route_options).length) {
			xhiveframework.route_options = {
				allocated_to: xhiveframework.session.user,
				status: "Open",
			};
		}
		me.page.set_title(__("To Do"));
	},

	button: {
		show: function (doc) {
			return doc.reference_name;
		},
		get_label: function () {
			return __("Open", null, "Access");
		},
		get_description: function (doc) {
			return __("Open {0}", [`${__(doc.reference_type)}: ${doc.reference_name}`]);
		},
		action: function (doc) {
			xhiveframework.set_route("Form", doc.reference_type, doc.reference_name);
		},
	},
};
