UMTS at Teleco 3 veckor sedan
förälder
incheckning
5407767c3c
4 ändrade filer med 34 tillägg och 5 borttagningar
  1. 1 1
      README.md
  2. 1 1
      kiosk.toml
  3. 6 1
      src/ui/categories.rs
  4. 26 2
      src/ui/templates.rs

+ 1 - 1
README.md

@@ -29,7 +29,7 @@ desktop client for the BeepZone asset management "system", built with rust + egu
 - **somewhat lightweight**: it's not fat and should run on any potato !
 
 ## disclosure !
-beepzone and its stack were all made as a passion project with initial works starting sometime in late October 2024 (more yappin and details as to why i made this ill add later maybe)
+beepzone and its stack were all made as a passion project with initial works starting sometime in late October 2025 (more yappin and details as to why i made this ill add later maybe)
 
 I fully admit that :
 - I have had zero experience in front end developer work when starting this (and still alot of times feel like i kinda dont know what im doing)

+ 1 - 1
kiosk.toml

@@ -1,5 +1,5 @@
 [kiosk]
-server_url = "http://10.50.0.62:5777"
+server_url = "http://localhost:5777"
 username = "kiosk"
 password = "kiosk"
 

+ 6 - 1
src/ui/categories.rs

@@ -240,11 +240,16 @@ impl CategoriesView {
         form_data: &serde_json::Map<String, Value>,
     ) -> serde_json::Map<String, Value> {
         let mut out = serde_json::Map::new();
+        let ignored_fields = ["parent_category_name"];
+        
         for (k, v) in form_data.iter() {
-            // Skip internal editor fields
+            // Skip internal editor fields and ignored view-only fields
             if k.starts_with("__editor_") {
                 continue;
             }
+            if ignored_fields.contains(&k.as_str()) {
+                continue;
+            }
 
             if k == "parent_id" {
                 // parent_id might be sent as "" for None. Convert to null.

+ 26 - 2
src/ui/templates.rs

@@ -962,8 +962,20 @@ impl TemplatesView {
 
                         // Filter empty strings to NULL for UPDATE too
                         let mut filtered_values = serde_json::Map::new();
+                        let ignored_fields = [
+                            "id",
+                            "created_at",
+                            "audit_task_name",
+                            "category_name",
+                            "category_code",
+                            "zone_name",
+                            "supplier_name",
+                            "label_template_name",
+                            "zone_code",
+                        ];
+
                         for (key, value) in cleaned.iter() {
-                            if key.starts_with("__editor_") {
+                            if key.starts_with("__editor_") || ignored_fields.contains(&key.as_str()) {
                                 continue;
                             }
                             match value {
@@ -1019,8 +1031,20 @@ impl TemplatesView {
                             }
                         };
                         let mut filtered_values = serde_json::Map::new();
+                        let ignored_fields = [
+                            "id",
+                            "created_at",
+                            "audit_task_name",
+                            "category_name",
+                            "category_code",
+                            "zone_name",
+                            "supplier_name",
+                            "label_template_name",
+                            "zone_code",
+                        ];
+
                         for (key, value) in values.iter() {
-                            if key.starts_with("__editor_") {
+                            if key.starts_with("__editor_") || ignored_fields.contains(&key.as_str()) {
                                 continue;
                             }
                             match value {