fix: inline HTML, remove render_template call

This commit is contained in:
root
2026-05-17 16:22:05 +00:00
parent 5e1486a2ba
commit 18a5bc6603
2 changed files with 9 additions and 9 deletions
@@ -8,8 +8,7 @@ frappe.pages['sales-manager'].on_page_load = function(wrapper) {
var $content = $(wrapper).find('.page-content');
$content.empty();
// Build the page HTML directly
$content.html(`
var html = `
<div class="container-fluid">
<div class="page-header">
<h2>Sales Manager — Pricing Queue</h2>
@@ -82,7 +81,7 @@ frappe.pages['sales-manager'].on_page_load = function(wrapper) {
<th>Actions</th>
</tr>
</thead>
<tbody id="pricing-tbody"><tbody>
<tbody id="pricing-tbody"></tbody>
</table>
</div>
@@ -92,8 +91,9 @@ frappe.pages['sales-manager'].on_page_load = function(wrapper) {
</div>
</div>
</div>
`);
`;
$content.html(html);
loadPricingData();
$('#btn-refresh').on('click', function() {
@@ -1,4 +1,4 @@
frappe.pages['sales_manager'].on_page_load = function(wrapper) {
frappe.pages['sales-manager'].on_page_load = function(wrapper) {
var page = frappe.ui.make_app_page({
parent: wrapper,
title: 'Sales Manager',
@@ -8,8 +8,7 @@ frappe.pages['sales_manager'].on_page_load = function(wrapper) {
var $content = $(wrapper).find('.page-content');
$content.empty();
// Build the page HTML directly
$content.html(`
var html = `
<div class="container-fluid">
<div class="page-header">
<h2>Sales Manager — Pricing Queue</h2>
@@ -82,7 +81,7 @@ frappe.pages['sales_manager'].on_page_load = function(wrapper) {
<th>Actions</th>
</tr>
</thead>
<tbody id="pricing-tbody"><tbody>
<tbody id="pricing-tbody"></tbody>
</table>
</div>
@@ -92,8 +91,9 @@ frappe.pages['sales_manager'].on_page_load = function(wrapper) {
</div>
</div>
</div>
`);
`;
$content.html(html);
loadPricingData();
$('#btn-refresh').on('click', function() {