-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #842 from resilient-tech/audit-trail-report
- Loading branch information
Showing
7 changed files
with
460 additions
and
1 deletion.
There are no files selected for viewing
Empty file.
Empty file.
62 changes: 62 additions & 0 deletions
62
india_compliance/audit_trail/report/audit_trail/audit_trail.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// Copyright (c) 2023, Resilient Tech and contributors | ||
// For license information, please see license.txt | ||
/* eslint-disable */ | ||
|
||
frappe.query_reports["Audit Trail"] = { | ||
filters: [ | ||
{ | ||
fieldname: "report", | ||
label: __("Report"), | ||
fieldtype: "Select", | ||
options: "Detailed\nSummary by Doctype\nSummary by User", | ||
default: "Detailed", | ||
reqd: 1, | ||
}, | ||
{ | ||
label: __("Select Day"), | ||
fieldtype: "Select", | ||
fieldname: "date_option", | ||
default: "Today", | ||
options: | ||
"Today\nYesterday\nThis Week\nThis Month\nThis Quarter\nThis Year\nLast Week\nLast Month\nLast Quarter\nLast Year\nCustom", | ||
reqd: 1, | ||
on_change: function (report) { | ||
let selected_value = report.get_filter_value("date_option"); | ||
let date_range = report.get_filter("date_range"); | ||
|
||
if (selected_value === "Custom") { | ||
date_range.df.hidden = false; | ||
} else { | ||
date_range.df.hidden = true; | ||
} | ||
date_range.refresh(); | ||
report.refresh(); | ||
}, | ||
}, | ||
{ | ||
fieldname: "date_range", | ||
label: __("Select Date"), | ||
fieldtype: "DateRange", | ||
hidden: true, | ||
}, | ||
{ | ||
fieldname: "user", | ||
label: __("User"), | ||
fieldtype: "Link", | ||
default: "", | ||
options: "User", | ||
}, | ||
{ | ||
fieldname: "doctype", | ||
label: __("Based On"), | ||
fieldtype: "Autocomplete", | ||
default: "", | ||
get_query: function () { | ||
return { | ||
query: "india_compliance.audit_trail.utils.get_audit_trail_doctypes", | ||
filters: {}, | ||
}; | ||
}, | ||
}, | ||
], | ||
}; |
28 changes: 28 additions & 0 deletions
28
india_compliance/audit_trail/report/audit_trail/audit_trail.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"add_total_row": 0, | ||
"columns": [], | ||
"creation": "2023-07-14 18:21:29.788627", | ||
"disabled": 0, | ||
"docstatus": 0, | ||
"doctype": "Report", | ||
"filters": [], | ||
"idx": 0, | ||
"is_standard": "Yes", | ||
"modified": "2023-07-25 16:35:23.470355", | ||
"modified_by": "Administrator", | ||
"module": "Audit Trail", | ||
"name": "Audit Trail", | ||
"owner": "Administrator", | ||
"prepared_report": 0, | ||
"ref_doctype": "Version", | ||
"report_name": "Audit Trail", | ||
"report_type": "Script Report", | ||
"roles": [ | ||
{ | ||
"role": "System Manager" | ||
}, | ||
{ | ||
"role": "Administrator" | ||
} | ||
] | ||
} |
Oops, something went wrong.