diff --git a/optmanagement/opt_in_management/doctype/optlist/optlist.json b/optmanagement/opt_in_management/doctype/optlist/optlist.json index 2e3c687..7c44866 100644 --- a/optmanagement/opt_in_management/doctype/optlist/optlist.json +++ b/optmanagement/opt_in_management/doctype/optlist/optlist.json @@ -14,14 +14,13 @@ "client_name", "column_break_wrvr", "client_poc", - "cs_assigned_poc", - "status", "optin_received_date", - "column_break_tmrt", "optin_approved_date", + "status", + "column_break_tmrt", + "cs_assigned_poc", "optin_type", "data_processed_date", - "project_details", "frappe_settings_section", "is_published", "route" @@ -116,17 +115,12 @@ { "fieldname": "column_break_tmrt", "fieldtype": "Column Break" - }, - { - "fieldname": "project_details", - "fieldtype": "Data", - "label": "Project Details" } ], "is_published_field": "is_published", "is_virtual": 1, "links": [], - "modified": "2024-06-06 17:16:32.614427", + "modified": "2024-06-07 11:01:48.152600", "modified_by": "Administrator", "module": "Opt In Management", "name": "optlist", diff --git a/optmanagement/opt_in_management/doctype/optlist/optlist.py b/optmanagement/opt_in_management/doctype/optlist/optlist.py index 2a1d70b..f838d35 100644 --- a/optmanagement/opt_in_management/doctype/optlist/optlist.py +++ b/optmanagement/opt_in_management/doctype/optlist/optlist.py @@ -24,7 +24,6 @@ class optlist(Document): "project_name" : str(client["project_name"]), "client_name" : str(client["client_name"]), "client_poc" : str(client["user_name"]), - "project_details" : str(client["project_details"]), "optin_received_date" : optinReceived(str(client["project_details"]),"Opt-in Received"), "optin_approved_date" : optinReceived(str(client["project_details"]),"Opt-in Approved"), "status" : optinStatus(str(client["project_details"])), @@ -115,7 +114,6 @@ def getValues(): "project_name" : str(client["project_name"]), "client_name" : str(client["client_name"]), "client_poc" : str(client["user_name"]), - "project_details" : str(client["project_details"]), "optin_received_date" : optinReceived(str(client["project_details"]),"Opt-in Received"), "optin_approved_date" : optinReceived(str(client["project_details"]),"Opt-in Approved"), "status" : optinStatus(str(client["project_details"])), diff --git a/optmanagement/www/optlistview.html b/optmanagement/www/optlistview.html index 73806fa..b5b3962 100644 --- a/optmanagement/www/optlistview.html +++ b/optmanagement/www/optlistview.html @@ -35,12 +35,14 @@ {% block title %}Pricing{% endblock %} {% block content %} +

Opt In Data

+
{% endblock %} @@ -69,7 +71,7 @@ document.addEventListener('DOMContentLoaded', function() { for(var rec in data) { tableData.push({ - kol_id:rec.kol_id, kol_name:rec["kol_name"],project_name: rec["project_name"], client_name:rec["client_name"], client_poc:rec["client_poc"], cs_Assigned_poc:rec["cs_Assigned_poc"],optin_received_date:rec["optin_received_date"],optin_approved_date:rec["optin_approved_date"],status:rec["status"],project_details:rec["project_details"] + kol_id:rec.kol_id, kol_name:rec["kol_name"],project_name: rec["project_name"], client_name:rec["client_name"], client_poc:rec["client_poc"], cs_Assigned_poc:rec["cs_Assigned_poc"],optin_received_date:rec["optin_received_date"],optin_approved_date:rec["optin_approved_date"],status:rec["status"],optin_type:rec["optin_type"],data_processed_date:rec["data_processed_date"] }); } console.log(tableData); @@ -86,39 +88,41 @@ document.addEventListener('DOMContentLoaded', function() { // filterMode: "remote", pagination:true, paginationSize: 20, + layout:"fitDataStretch", ajaxLoaderLoading:"Loading Data", // paginationMode:"remote", paginationSizeSelector: [5, 10, 50, 100], paginationCounter: "rows", columns:[ // Define table columns - {title:"KOL ID", field:"kol_id", width:150,headerFilterPlaceholder: "Search", headerFilter: true,}, - {title:"KOL Name", field:"kol_name", width:150,headerFilterPlaceholder: "Search", headerFilter: true,}, + {title:"KOL ID", field:"kol_id",headerFilterPlaceholder: "Search", headerFilter: true,}, + {title:"KOL Name", field:"kol_name",headerFilterPlaceholder: "Search", headerFilter: true,}, {title:"Project Name", field:"project_name",headerFilterPlaceholder: "Search", headerFilter: true,}, {title:"Client Name", field:"client_name",headerFilterPlaceholder: "Search", headerFilter: true,}, {title:"Client POC", field:"client_poc",headerFilterPlaceholder: "Search", headerFilter: true,}, {title:"CS Assigned POC", field:"cs_assigned_poc",headerFilterPlaceholder: "Search", headerFilter: true,}, - {title:"Opt-in Requested", field:"optin_received_date",headerFilterPlaceholder: "Search", headerFilter: true,}, - {title:"Opt-in Approved", field:"optin_approved_date",headerFilterPlaceholder: "Search", headerFilter: true,}, + {title:"Requested Date", field:"optin_received_date",headerFilterPlaceholder: "Search", headerFilter: true,}, + {title:"Approved Date", field:"optin_approved_date",headerFilterPlaceholder: "Search", headerFilter: true,}, {title:"Status", field:"status",headerFilterPlaceholder: "Search", headerFilter: true,}, - {title:"Project Details", field:"project_details",headerFilterPlaceholder: "Search", headerFilter: true,}, + {title:"Opt-In Type", field:"optin_type",headerFilterPlaceholder: "Search", headerFilter: true,}, + {title:"Data Processed Date", field:"data_processed_date",headerFilterPlaceholder: "Search", headerFilter: true,}, ], }); document.getElementById("download-csv").addEventListener("click", function(){ - table.download("csv", "data.csv"); + table.download("csv", "optInData.csv"); }); //trigger download of data.xlsx file document.getElementById("download-xlsx").addEventListener("click", function(){ - table.download("xlsx", "data.xlsx", {sheetName:"My Data"}); + table.download("xlsx", "optInData.xlsx", {sheetName:"Opt In Data"}); }); //trigger download of data.pdf file document.getElementById("download-pdf").addEventListener("click", function(){ - table.download("pdf", "data.pdf", { + table.download("pdf", "optInData.pdf", { orientation:"portrait", //set page orientation to portrait - title:"Example Report", //add title to report + title:"opt In Data Report", //add title to report }); }); diff --git a/optmanagement/www/optlistview.py b/optmanagement/www/optlistview.py index 644e8c6..97adeb9 100644 --- a/optmanagement/www/optlistview.py +++ b/optmanagement/www/optlistview.py @@ -15,6 +15,8 @@ def fetch_data(): "optin_received_date" : str(client["optin_received_date"]), "optin_approved_date" : str(client["optin_approved_date"]), "status" : str(client["status"]), - "project_details": str(client["project_details"]) + + + } for client in records]