diff --git a/.gitignore b/.gitignore
index 3aafa7b..5e766c3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,8 @@
tags
node_modules
__pycache__
+venv/
+.venv/
*dist/
.vscode/
\ No newline at end of file
diff --git a/custom_ui/api/proxy.py b/custom_ui/api/proxy.py
index bfa25d9..d84c4eb 100644
--- a/custom_ui/api/proxy.py
+++ b/custom_ui/api/proxy.py
@@ -5,28 +5,27 @@ from urllib.parse import urlparse
allowed_hosts = ["api.zippopotam.us"] # Update this list with trusted domains as needed
@frappe.whitelist(allow_guest=True)
-def proxy_request(url, method="GET", data=None, headers=None):
+def request(url, method="GET", data=None, headers=None):
"""
Generic proxy for external API requests.
WARNING: Only allow requests to trusted domains.
"""
parsed_url = urlparse(url)
if parsed_url.hostname not in allowed_hosts:
- frappe.throw(f"Rquests to {parsed_url.hostname} are not allowed.", frappe.PermissionError)
-
+ frappe.throw(f"Requests to {parsed_url.hostname} are not allowed.", frappe.PermissionError)
+ try:
+ resp = requests.request(
+ method=method.upper(),
+ url=url,
+ json=frappe.parse_json(data) if data else None,
+ headers=frappe.parse_json(headers) if headers else None,
+ timeout=10
+ )
+ resp.raise_for_status()
try:
- resp = requests.request(
- method=method.upper(),
- url=url,
- json=frappe.parse_json(data) if data else None,
- headers=frappe.parse_json(headers) if headers else None,
- timeout=10
- )
- resp.raise_for_status()
- try:
- return resp.json()
- except ValueError:
- return {"text": resp.text}
- except requests.exceptions.RequestException as e:
- frappe.log_error(message=str(e), title="Proxy Request Failed")
- frappe.throw("Failed to fetch data from external API.")
\ No newline at end of file
+ return resp.json()
+ except ValueError:
+ return {"text": resp.text}
+ except requests.exceptions.RequestException as e:
+ frappe.log_error(message=str(e), title="Proxy Request Failed")
+ frappe.throw("Failed to fetch data from external API.")
\ No newline at end of file
diff --git a/frontend/documentation/components/Form.md b/frontend/documentation/components/Form.md
index e69bf3f..cf8d4f4 100644
--- a/frontend/documentation/components/Form.md
+++ b/frontend/documentation/components/Form.md
@@ -1,8 +1,17 @@
+````markdown
# Form Component Documentation
## Overview
-A highly flexible and configurable dynamic form component built with Vuetify. This component generates forms based on field configuration objects and supports various input types, validation, responsive layouts, and both controlled and uncontrolled form state management.
+A highly flexible and configurable dynamic form component built with **PrimeVue**. This component generates forms based on field configuration objects and supports various input types including **AutoComplete with custom values**, validation, responsive layouts, and both controlled and uncontrolled form state management.
+
+## ✨ New Features (PrimeVue Migration)
+
+- **AutoComplete component** - Users can select from suggestions OR enter completely custom values
+- **Better date/time pickers** with calendar popup and time selection
+- **Improved accessibility** with ARIA support
+- **More flexible styling** with CSS custom properties
+- **Enhanced mobile responsiveness** with CSS Grid
## Basic Usage
@@ -17,92 +26,116 @@ A highly flexible and configurable dynamic form component built with Vuetify. Th
```
## Props
### `fields` (Array) - Required
+
- **Description:** Array of field configuration objects that define the form structure
- **Type:** `Array