// Copyright (c) 2019, JINGROW
// For license information, please see license.txt

jingrow.ui.form.on("Notification Settings", {
	onload: (frm) => {
		frm.set_query("subscribed_documents", () => {
			return {
				filters: {
					istable: 0,
				},
			};
		});
	},

	refresh: (frm) => {
		if (jingrow.user.has_role("System Manager")) {
			frm.add_custom_button(__("Go to Notification Settings List"), () => {
				jingrow.set_route("List", "Notification Settings");
			});
		}
	},
});
