Add missing page files: eim-portal, r2-tracking, wes-ai to westech_r2 app

This commit is contained in:
Westech Admin
2026-05-21 01:19:30 +00:00
parent 8be0cf57cf
commit f48e93f96a
20 changed files with 159 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
frappe.pages["wes-ai"].on_page_load = function(wrapper) {
var page = frappe.ui.make_app_page({
parent: wrapper,
title: "Wes AI Assistant",
single_column: true
});
// Create iframe that embeds Wes AI
var $container = $(wrapper).find(".layout-main-section");
$container.css({
"position": "relative",
"overflow": "hidden"
});
// Determine Wes URL based on environment
var wes_url = "https://wes.advante.ch";
// On production VM, Wes runs locally
if (window.location.hostname === "erpnext.local" || window.location.hostname === "localhost") {
wes_url = "http://localhost:8082";
}
var $iframe = $('<iframe>', {
src: wes_url,
style: "width: 100%; height: calc(100vh - 120px); border: none; border-radius: 4px;",
id: "wes-ai-iframe"
});
$container.empty().append($iframe);
};