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'); var $content = $(wrapper).find('.page-content');
$content.empty(); $content.empty();
// Build the page HTML directly var html = `
$content.html(`
<div class="container-fluid"> <div class="container-fluid">
<div class="page-header"> <div class="page-header">
<h2>Sales Manager — Pricing Queue</h2> <h2>Sales Manager — Pricing Queue</h2>
@@ -82,7 +81,7 @@ frappe.pages['sales-manager'].on_page_load = function(wrapper) {
<th>Actions</th> <th>Actions</th>
</tr> </tr>
</thead> </thead>
<tbody id="pricing-tbody"><tbody> <tbody id="pricing-tbody"></tbody>
</table> </table>
</div> </div>
@@ -92,8 +91,9 @@ frappe.pages['sales-manager'].on_page_load = function(wrapper) {
</div> </div>
</div> </div>
</div> </div>
`); `;
$content.html(html);
loadPricingData(); loadPricingData();
$('#btn-refresh').on('click', function() { $('#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({ var page = frappe.ui.make_app_page({
parent: wrapper, parent: wrapper,
title: 'Sales Manager', title: 'Sales Manager',
@@ -8,8 +8,7 @@ frappe.pages['sales_manager'].on_page_load = function(wrapper) {
var $content = $(wrapper).find('.page-content'); var $content = $(wrapper).find('.page-content');
$content.empty(); $content.empty();
// Build the page HTML directly var html = `
$content.html(`
<div class="container-fluid"> <div class="container-fluid">
<div class="page-header"> <div class="page-header">
<h2>Sales Manager — Pricing Queue</h2> <h2>Sales Manager — Pricing Queue</h2>
@@ -82,7 +81,7 @@ frappe.pages['sales_manager'].on_page_load = function(wrapper) {
<th>Actions</th> <th>Actions</th>
</tr> </tr>
</thead> </thead>
<tbody id="pricing-tbody"><tbody> <tbody id="pricing-tbody"></tbody>
</table> </table>
</div> </div>
@@ -92,8 +91,9 @@ frappe.pages['sales_manager'].on_page_load = function(wrapper) {
</div> </div>
</div> </div>
</div> </div>
`); `;
$content.html(html);
loadPricingData(); loadPricingData();
$('#btn-refresh').on('click', function() { $('#btn-refresh').on('click', function() {