// Copyright (c) 2015, JINGROW and Contributors
// MIT License. See license.txt

jingrow.query_reports["Permitted Documents For User"] = {
	filters: [
		{
			fieldname: "user",
			label: __("User"),
			fieldtype: "Link",
			options: "User",
			reqd: 1,
		},
		{
			fieldname: "pagetype",
			label: __("PageType"),
			fieldtype: "Link",
			options: "PageType",
			reqd: 1,
			get_query: function () {
				return {
					query: "jingrow.core.report.permitted_documents_for_user.permitted_documents_for_user.query_pagetypes",
					filters: {
						user: jingrow.query_report.get_filter_value("user"),
					},
				};
			},
		},
		{
			fieldname: "show_permissions",
			label: __("Show Permissions"),
			fieldtype: "Check",
		},
	],
};
