wip: receiving dashboard, customer records, archive old 2-level paths, various fixes

This commit is contained in:
vagrant
2026-05-28 03:30:45 +00:00
parent d4ed4b1d89
commit 6fe6d61779
141 changed files with 4247 additions and 1175 deletions
@@ -0,0 +1 @@
@@ -0,0 +1,4 @@
frappe.pages["wes-ai"].on_page_load = function(wrapper) {
wrapper.innerHTML = '<div style="display:flex;align-items:center;justify-content:center;height:60vh;font-family:sans-serif;"><div style="text-align:center;"><i class="fa fa-spinner fa-spin" style="font-size:24px;color:#5b3a8c;"></i><p style="margin-top:12px;color:#555;">Redirecting to Wes AI Assistant...</p></div></div>';
setTimeout(function() { window.location.href = "https://wes.advante.ch"; }, 500);
};
@@ -0,0 +1,13 @@
{
"creation": "2026-05-09 14:00:00",
"docstatus": 0,
"doctype": "Page",
"idx": 0,
"modified": "2026-05-09 14:00:00",
"modified_by": "Administrator",
"module": "Westech R2",
"name": "wes-ai",
"owner": "Administrator",
"standard": "Yes",
"title": "Wes AI Assistant"
}
@@ -0,0 +1,5 @@
import frappe
def get_context(context):
frappe.local.flags.redirect_location = "https://wes.advante.ch"
raise frappe.Redirect
@@ -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);
};