{
  "page_ir": {
    "page_id": "purchase_orders",
    "page_goal": "List, search, filter, create, edit, and delete purchase orders with order history tracking",
    "style": {
      "tone": "professional",
      "theme": "light",
      "density": "comfortable",
      "color_intent": "neutral with blue accents"
    },
    "accessibility": {
      "required_labels": [
        "Search orders",
        "Filter by vendor",
        "Filter by status",
        "Date range filter",
        "Create order button",
        "Orders table"
      ],
      "skip_navigation": true,
      "focus_management": true,
      "announce_changes": []
    },
    "responsive": {
      "breakpoints": {
        "sm": 576,
        "md": 768,
        "lg": 1024,
        "xl": 1200
      },
      "collapse_rules": [
        "filters_row collapses to vertical on sm"
      ],
      "hidden_on_small": [
        "notes_column"
      ],
      "stack_on_small": []
    },
    "constraints": [
      "Table must support pagination",
      "Modal form must validate required fields"
    ],
    "seo_title": null,
    "seo_description": null
  },
  "data_ir": {
    "types": {},
    "state": {
      "orders": {
        "type": "array",
        "initial": [],
        "required": true,
        "constraints": {},
        "item_type": null
      },
      "ordersLoading": {
        "type": "boolean",
        "initial": false,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "searchText": {
        "type": "string",
        "initial": "",
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "filterVendor": {
        "type": "string",
        "initial": "",
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "filterStatus": {
        "type": "string",
        "initial": "",
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "filterDateRange": {
        "type": "array",
        "initial": [],
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "pagination": {
        "type": "object",
        "initial": {
          "current": 1,
          "pageSize": 20,
          "total": 0
        },
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "modalVisible": {
        "type": "boolean",
        "initial": false,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "modalMode": {
        "type": "string",
        "initial": "create",
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "selectedOrder": {
        "type": "object",
        "initial": null,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "deleteConfirmVisible": {
        "type": "boolean",
        "initial": false,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "orderToDelete": {
        "type": "object",
        "initial": null,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "orderHistory": {
        "type": "array",
        "initial": [],
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "expandedRowKeys": {
        "type": "array",
        "initial": [],
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "vendors": {
        "type": "array",
        "initial": [],
        "required": false,
        "constraints": {},
        "item_type": null
      }
    },
    "derived": {
      "totalOrders": {
        "type": "number",
        "expr": "state.pagination.total",
        "deps": []
      }
    }
  },
  "data_fetch_ir": {
    "endpoints": {
      "d90cb10a43514af489e896d7e70b788c": {
        "endpoint_id": "d90cb10a43514af489e896d7e70b788c",
        "module": "Master Data",
        "endpoint": "/master-data/orders",
        "method": "GET",
        "path_params": {},
        "query_params": {
          "limit": "$state.pagination.pageSize",
          "offset": "($state.pagination.current - 1) * $state.pagination.pageSize",
          "search": "$state.searchText"
        },
        "body": null,
        "fields": [
          "id",
          "submenu_id",
          "po_number",
          "supplier_vendor",
          "notes",
          "metadata",
          "version",
          "created_at",
          "updated_at"
        ],
        "response_target": "orders",
        "response_transform": null,
        "trigger": "on_mount",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "e63c4a1a6c4a4e00aa5d45c4220ad010": {
        "endpoint_id": "e63c4a1a6c4a4e00aa5d45c4220ad010",
        "module": "Master Data",
        "endpoint": "/master-data/vendors",
        "method": "GET",
        "path_params": {},
        "query_params": {
          "limit": 100,
          "offset": 0
        },
        "body": null,
        "fields": [
          "id",
          "vendor_number"
        ],
        "response_target": "vendors",
        "response_transform": null,
        "trigger": "on_mount",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "4fa17a3b639149a58db5b28433d0a264": {
        "endpoint_id": "4fa17a3b639149a58db5b28433d0a264",
        "module": "Master Data",
        "endpoint": "/master-data/order-histories",
        "method": "GET",
        "path_params": {},
        "query_params": {
          "order_id": "$state.selectedOrder.id",
          "limit": 50,
          "offset": 0
        },
        "body": null,
        "fields": [
          "id",
          "order_id",
          "change_date",
          "change_description",
          "changed_by",
          "change_type",
          "created_at"
        ],
        "response_target": "orderHistory",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "811b0431be124c7899b5fd768f192675": {
        "endpoint_id": "811b0431be124c7899b5fd768f192675",
        "module": "Master Data",
        "endpoint": "/master-data/orders",
        "method": "POST",
        "path_params": {},
        "query_params": {},
        "body": {},
        "fields": [
          "id",
          "po_number",
          "supplier_vendor",
          "notes",
          "created_at"
        ],
        "response_target": "createOrder_data",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "bd6622968de44febad0087ffbcf2448f": {
        "endpoint_id": "bd6622968de44febad0087ffbcf2448f",
        "module": "Master Data",
        "endpoint": "/master-data/orders/{order_id}",
        "method": "PUT",
        "path_params": {
          "order_id": "$state.selectedOrder.id"
        },
        "query_params": {},
        "body": {},
        "fields": [
          "id",
          "po_number",
          "supplier_vendor",
          "notes",
          "updated_at"
        ],
        "response_target": "updateOrder_data",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "6561c2f1e7da4dadb62dc7602e8d9dba": {
        "endpoint_id": "6561c2f1e7da4dadb62dc7602e8d9dba",
        "module": "Master Data",
        "endpoint": "/master-data/orders/{order_id}",
        "method": "DELETE",
        "path_params": {
          "order_id": "$state.orderToDelete.id"
        },
        "query_params": {},
        "body": null,
        "fields": [],
        "response_target": "deleteOrder_data",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      }
    }
  },
  "data_model_ir": {
    "entities": {
      "order": {
        "name": "Purchase Order",
        "backend_module": "Master Data",
        "fields": [
          "id",
          "submenu_id",
          "po_number",
          "supplier_vendor",
          "notes",
          "metadata",
          "version",
          "deleted_at",
          "created_at",
          "updated_at"
        ],
        "computed": [],
        "display_fields": [
          "id",
          "po_number",
          "supplier_vendor",
          "created_at",
          "updated_at",
          "notes"
        ],
        "search_fields": [
          "po_number"
        ],
        "filters": [
          "supplier_vendor"
        ],
        "default_sort": null,
        "default_sort_dir": "asc"
      },
      "order_history": {
        "name": "Order History",
        "backend_module": "Master Data",
        "fields": [
          "id",
          "submenu_id",
          "order_id",
          "change_date",
          "change_description",
          "changed_by",
          "change_type",
          "created_at",
          "updated_at"
        ],
        "computed": [],
        "display_fields": [
          "change_date",
          "change_type",
          "change_description",
          "changed_by"
        ],
        "search_fields": [],
        "filters": [
          "order_id"
        ],
        "default_sort": null,
        "default_sort_dir": "asc"
      },
      "vendor": {
        "name": "Vendor",
        "backend_module": "Master Data",
        "fields": [
          "id",
          "submenu_id",
          "vendor_number",
          "notes",
          "metadata",
          "version",
          "deleted_at",
          "created_at",
          "updated_at"
        ],
        "computed": [],
        "display_fields": [
          "vendor_number"
        ],
        "search_fields": [],
        "filters": [],
        "default_sort": null,
        "default_sort_dir": "asc"
      }
    },
    "relationships": []
  },
  "behaviour_ir": {
    "events": {
      "onSearchChange": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.searchText",
            "expr": "$event.target.value"
          },
          {
            "target": "state.pagination.current",
            "expr": "1"
          }
        ],
        "description": ""
      },
      "onVendorFilterChange": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.filterVendor",
            "expr": "$event"
          },
          {
            "target": "state.pagination.current",
            "expr": "1"
          }
        ],
        "description": ""
      },
      "onStatusFilterChange": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.filterStatus",
            "expr": "$event"
          },
          {
            "target": "state.pagination.current",
            "expr": "1"
          }
        ],
        "description": ""
      },
      "onDateRangeChange": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.filterDateRange",
            "expr": "$event"
          },
          {
            "target": "state.pagination.current",
            "expr": "1"
          }
        ],
        "description": ""
      },
      "onPaginationChange": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.pagination.current",
            "expr": "$event.current"
          },
          {
            "target": "state.pagination.pageSize",
            "expr": "$event.pageSize"
          }
        ],
        "description": ""
      },
      "onExpandRow": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.expandedRowKeys",
            "expr": "$event"
          }
        ],
        "description": ""
      },
      "openCreateModal": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.modalVisible",
            "expr": "true"
          },
          {
            "target": "state.modalMode",
            "expr": "'create'"
          },
          {
            "target": "state.selectedOrder",
            "expr": "null"
          }
        ],
        "description": ""
      },
      "openEditModal": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.modalVisible",
            "expr": "true"
          },
          {
            "target": "state.modalMode",
            "expr": "'edit'"
          },
          {
            "target": "state.selectedOrder",
            "expr": "$event.record"
          }
        ],
        "description": ""
      },
      "closeModal": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.modalVisible",
            "expr": "false"
          },
          {
            "target": "state.selectedOrder",
            "expr": "null"
          }
        ],
        "description": ""
      },
      "openDeleteConfirm": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.deleteConfirmVisible",
            "expr": "true"
          },
          {
            "target": "state.orderToDelete",
            "expr": "$event.record"
          }
        ],
        "description": ""
      },
      "closeDeleteConfirm": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.deleteConfirmVisible",
            "expr": "false"
          },
          {
            "target": "state.orderToDelete",
            "expr": "null"
          }
        ],
        "description": ""
      }
    },
    "actions": {
      "6f692615a80049fabf537b48a4933666": {
        "action_id": "6f692615a80049fabf537b48a4933666",
        "trigger": "form_submit",
        "target_component_id": "order_form_modal",
        "operation": "create",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [
          {
            "rule_id": "val_0",
            "field": null,
            "type": "custom",
            "value": null,
            "expression": "{\"field\": \"po_number\", \"message\": \"PO Number is required\", \"rule_id\": \"val_po_number\", \"type\": \"required\"}",
            "message": "{\"field\": \"po_number\", \"message\": \"PO Number is required\", \"rule_id\": \"val_po_number\", \"type\": \"required\"}"
          },
          {
            "rule_id": "val_1",
            "field": null,
            "type": "custom",
            "value": null,
            "expression": "{\"field\": \"supplier_vendor\", \"message\": \"Vendor is required\", \"rule_id\": \"val_vendor\", \"type\": \"required\"}",
            "message": "{\"field\": \"supplier_vendor\", \"message\": \"Vendor is required\", \"rule_id\": \"val_vendor\", \"type\": \"required\"}"
          }
        ],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.modalVisible",
            "expr": "false"
          }
        ],
        "api_endpoint": "811b0431be124c7899b5fd768f192675",
        "api_body": "{ submenu_id: 1, po_number: $form.po_number, supplier_vendor: $form.supplier_vendor, notes: $form.notes, metadata: $form.metadata }",
        "side_effects": [
          {
            "type": "toast",
            "config": {
              "message": "Purchase order created successfully",
              "type": "success"
            }
          },
          {
            "type": "refresh",
            "config": {
              "target": "fetchOrders"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "d6ad7f13388e4d8ca9a478406600caa4": {
        "action_id": "d6ad7f13388e4d8ca9a478406600caa4",
        "trigger": "form_submit",
        "target_component_id": "order_form_modal",
        "operation": "update",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [
          {
            "rule_id": "val_0",
            "field": null,
            "type": "custom",
            "value": null,
            "expression": "{\"field\": \"po_number\", \"message\": \"PO Number is required\", \"rule_id\": \"val_po_number_edit\", \"type\": \"required\"}",
            "message": "{\"field\": \"po_number\", \"message\": \"PO Number is required\", \"rule_id\": \"val_po_number_edit\", \"type\": \"required\"}"
          },
          {
            "rule_id": "val_1",
            "field": null,
            "type": "custom",
            "value": null,
            "expression": "{\"field\": \"supplier_vendor\", \"message\": \"Vendor is required\", \"rule_id\": \"val_vendor_edit\", \"type\": \"required\"}",
            "message": "{\"field\": \"supplier_vendor\", \"message\": \"Vendor is required\", \"rule_id\": \"val_vendor_edit\", \"type\": \"required\"}"
          }
        ],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.modalVisible",
            "expr": "false"
          },
          {
            "target": "state.selectedOrder",
            "expr": "null"
          }
        ],
        "api_endpoint": "bd6622968de44febad0087ffbcf2448f",
        "api_body": "{ submenu_id: 1, po_number: $form.po_number, supplier_vendor: $form.supplier_vendor, notes: $form.notes, metadata: $form.metadata }",
        "side_effects": [
          {
            "type": "toast",
            "config": {
              "message": "Purchase order updated successfully",
              "type": "success"
            }
          },
          {
            "type": "refresh",
            "config": {
              "target": "fetchOrders"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "ac582efd730e474c95f3212c4f598245": {
        "action_id": "ac582efd730e474c95f3212c4f598245",
        "trigger": "button_click",
        "target_component_id": "delete_confirm_modal",
        "operation": "delete",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": true,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.deleteConfirmVisible",
            "expr": "false"
          },
          {
            "target": "state.orderToDelete",
            "expr": "null"
          }
        ],
        "api_endpoint": "6561c2f1e7da4dadb62dc7602e8d9dba",
        "api_body": null,
        "side_effects": [
          {
            "type": "toast",
            "config": {
              "message": "Purchase order deleted successfully",
              "type": "success"
            }
          },
          {
            "type": "refresh",
            "config": {
              "target": "fetchOrders"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "d178f2223d754de3b1b63244490b2962": {
        "action_id": "d178f2223d754de3b1b63244490b2962",
        "trigger": "row_click",
        "target_component_id": "orders_table",
        "operation": "read",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [],
        "api_endpoint": "4fa17a3b639149a58db5b28433d0a264",
        "api_body": null,
        "side_effects": [],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "a53d6af5a62045ea96f09f951cf2764e": {
        "action_id": "a53d6af5a62045ea96f09f951cf2764e",
        "trigger": "button_click",
        "target_component_id": "breadcrumb_dashboard",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [],
        "api_endpoint": null,
        "api_body": null,
        "side_effects": [
          {
            "type": "navigate",
            "config": {
              "path": "/"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "04c95168875e4bc0a4fc4e161abd3558": {
        "action_id": "04c95168875e4bc0a4fc4e161abd3558",
        "trigger": "button_click",
        "target_component_id": "vendors_link_button",
        "operation": "custom",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [],
        "api_endpoint": null,
        "api_body": null,
        "side_effects": [
          {
            "type": "navigate",
            "config": {
              "path": "/vendors"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      }
    },
    "feedback": {
      "6f692615a80049fabf537b48a4933666": {
        "action_id": "6f692615a80049fabf537b48a4933666",
        "loading_indicator": "spinner",
        "loading_text": null,
        "success_message": "Purchase order created successfully",
        "error_message": "Failed to create purchase order",
        "ui_updates": []
      },
      "d6ad7f13388e4d8ca9a478406600caa4": {
        "action_id": "d6ad7f13388e4d8ca9a478406600caa4",
        "loading_indicator": "spinner",
        "loading_text": null,
        "success_message": "Purchase order updated successfully",
        "error_message": "Failed to update purchase order",
        "ui_updates": []
      },
      "ac582efd730e474c95f3212c4f598245": {
        "action_id": "ac582efd730e474c95f3212c4f598245",
        "loading_indicator": "spinner",
        "loading_text": null,
        "success_message": "Purchase order deleted successfully",
        "error_message": "Failed to delete purchase order",
        "ui_updates": []
      },
      "d178f2223d754de3b1b63244490b2962": {
        "action_id": "d178f2223d754de3b1b63244490b2962",
        "loading_indicator": "spinner",
        "loading_text": null,
        "success_message": null,
        "error_message": "Failed to load order history",
        "ui_updates": []
      },
      "a53d6af5a62045ea96f09f951cf2764e": {
        "action_id": "a53d6af5a62045ea96f09f951cf2764e",
        "loading_indicator": null,
        "loading_text": null,
        "success_message": null,
        "error_message": null,
        "ui_updates": []
      },
      "04c95168875e4bc0a4fc4e161abd3558": {
        "action_id": "04c95168875e4bc0a4fc4e161abd3558",
        "loading_indicator": null,
        "loading_text": null,
        "success_message": null,
        "error_message": null,
        "ui_updates": []
      }
    }
  },
  "component_ir": {
    "library": "antd",
    "theme": {
      "primaryColor": "#1677ff",
      "secondaryColor": "#000000",
      "successColor": null,
      "warningColor": null,
      "errorColor": null,
      "fontFamily": "sans-serif",
      "fontSize": null,
      "borderRadius": 6
    },
    "components": {
      "main_container": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "dynamic_props": {},
        "styles": {
          "minHeight": "100vh",
          "width": "100%",
          "padding": "24px",
          "background": "#f5f5f5"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "page_header": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "dynamic_props": {},
        "styles": {
          "marginBottom": "24px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "breadcrumb_dashboard": {
        "type": "Breadcrumb",
        "label": "Breadcrumb",
        "description": null,
        "bind": null,
        "onClick": "navigateToDashboard",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "items": [
            {
              "title": "Dashboard",
              "href": "/"
            },
            {
              "title": "Purchase Orders"
            }
          ]
        },
        "dynamic_props": {},
        "styles": {
          "marginBottom": "16px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "page_title_row": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "dynamic_props": {},
        "styles": {
          "display": "flex",
          "justifyContent": "space-between",
          "alignItems": "center",
          "marginBottom": "16px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "page_title": {
        "type": "Typography.Title",
        "label": "Purchase Orders",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "level": 2
        },
        "dynamic_props": {},
        "styles": {
          "margin": 0
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "header_actions": {
        "type": "Space",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "vendors_link_button": {
        "type": "Button",
        "label": "View Vendors",
        "description": null,
        "bind": null,
        "onClick": "navigateToVendors",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "default",
          "icon": "TeamOutlined"
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "create_order_button": {
        "type": "Button",
        "label": "Create Order",
        "description": null,
        "bind": null,
        "onClick": "openCreateModal",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "primary",
          "icon": "PlusOutlined"
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "filters_row": {
        "type": "Card",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "size": "small"
        },
        "dynamic_props": {},
        "styles": {
          "marginBottom": "16px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "filters_content": {
        "type": "Space",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "wrap": true,
          "size": "middle"
        },
        "dynamic_props": {},
        "styles": {
          "width": "100%"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "search_input": {
        "type": "Input.Search",
        "label": "Search orders",
        "description": null,
        "bind": "state.searchText",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": "Search by PO Number...",
          "allowClear": true,
          "style": {
            "width": 250
          }
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "vendor_filter": {
        "type": "Select",
        "label": "Filter by vendor",
        "description": null,
        "bind": "state.filterVendor",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": "Filter by Vendor",
          "allowClear": true,
          "style": {
            "width": 200
          },
          "options": "state.vendors.map(v => ({ label: v.vendor_number, value: v.vendor_number }))"
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "status_filter": {
        "type": "Select",
        "label": "Filter by status",
        "description": null,
        "bind": "state.filterStatus",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": "Filter by Status",
          "allowClear": true,
          "style": {
            "width": 180
          },
          "options": [
            {
              "label": "Active",
              "value": "active"
            },
            {
              "label": "Completed",
              "value": "completed"
            },
            {
              "label": "Cancelled",
              "value": "cancelled"
            }
          ]
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "date_range_filter": {
        "type": "DatePicker.RangePicker",
        "label": "Date range filter",
        "description": null,
        "bind": "state.filterDateRange",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": [
            "Start Date",
            "End Date"
          ]
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "orders_table_card": {
        "type": "Card",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "orders_table": {
        "type": "Table",
        "label": "Orders table",
        "description": null,
        "bind": "state.orders",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "rowKey": "id",
          "loading": "state.ordersLoading",
          "pagination": "state.pagination",
          "expandable": true,
          "columns": [
            {
              "title": "Order ID",
              "dataIndex": "po_number",
              "key": "po_number",
              "sorter": true
            },
            {
              "title": "Vendor",
              "dataIndex": "supplier_vendor",
              "key": "supplier_vendor",
              "sorter": true
            },
            {
              "title": "Order Date",
              "dataIndex": "created_at",
              "key": "created_at",
              "sorter": true,
              "render": "date"
            },
            {
              "title": "Updated",
              "dataIndex": "updated_at",
              "key": "updated_at",
              "render": "date"
            },
            {
              "title": "Notes",
              "dataIndex": "notes",
              "key": "notes",
              "ellipsis": true
            },
            {
              "title": "Actions",
              "key": "actions",
              "render": "actions"
            }
          ],
          "actions": [
            {
              "label": "Edit",
              "event": "openEditModal",
              "type": "link"
            },
            {
              "label": "Delete",
              "event": "openDeleteConfirm",
              "type": "link",
              "danger": true
            }
          ]
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "expanded_history_section": {
        "type": "Table",
        "label": "Order History",
        "description": null,
        "bind": "state.orderHistory",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "rowKey": "id",
          "size": "small",
          "pagination": false,
          "columns": [
            {
              "title": "Date",
              "dataIndex": "change_date",
              "key": "change_date",
              "render": "datetime"
            },
            {
              "title": "Type",
              "dataIndex": "change_type",
              "key": "change_type"
            },
            {
              "title": "Description",
              "dataIndex": "change_description",
              "key": "change_description"
            },
            {
              "title": "Changed By",
              "dataIndex": "changed_by",
              "key": "changed_by"
            }
          ]
        },
        "dynamic_props": {},
        "styles": {
          "padding": "16px",
          "background": "#fafafa"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "order_form_modal": {
        "type": "Modal",
        "label": "Order Form",
        "description": null,
        "bind": "state.modalVisible",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "title": "state.modalMode === 'create' ? 'Create Purchase Order' : 'Edit Purchase Order'",
          "width": 720,
          "destroyOnClose": true,
          "onCancel": "closeModal"
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "order_form": {
        "type": "Form",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "layout": "vertical",
          "initialValues": "state.selectedOrder"
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "form_po_number": {
        "type": "Form.Item",
        "label": "PO Number",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "name": "po_number",
          "rules": [
            {
              "required": true,
              "message": "PO Number is required"
            }
          ]
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "po_number_input": {
        "type": "Input",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": "Enter PO Number"
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "form_vendor": {
        "type": "Form.Item",
        "label": "Vendor",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "name": "supplier_vendor",
          "rules": [
            {
              "required": true,
              "message": "Vendor is required"
            }
          ]
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "vendor_select": {
        "type": "Select",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": "Select Vendor",
          "showSearch": true,
          "options": "state.vendors.map(v => ({ label: v.vendor_number, value: v.vendor_number }))"
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "form_notes": {
        "type": "Form.Item",
        "label": "Notes",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "name": "notes"
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "notes_textarea": {
        "type": "Input.TextArea",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": "Enter notes...",
          "rows": 4
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "form_metadata": {
        "type": "Form.Item",
        "label": "Metadata",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "name": "metadata"
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "metadata_textarea": {
        "type": "Input.TextArea",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": "Additional metadata (JSON)",
          "rows": 3
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "form_submit_button": {
        "type": "Button",
        "label": "Submit",
        "description": null,
        "bind": null,
        "onClick": "submitCreateOrder",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "primary",
          "htmlType": "submit",
          "block": true
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "delete_confirm_modal": {
        "type": "Modal",
        "label": "Delete Confirmation",
        "description": null,
        "bind": "state.deleteConfirmVisible",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "title": "Confirm Delete",
          "okText": "Delete",
          "okType": "danger",
          "onOk": "confirmDeleteOrder",
          "onCancel": "closeDeleteConfirm"
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "delete_confirm_text": {
        "type": "Typography.Text",
        "label": "Are you sure you want to delete this purchase order? This action cannot be undone.",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      }
    }
  },
  "layout_ir": {
    "root": "main_container",
    "children": {
      "main_container": [
        "page_header",
        "filters_row",
        "orders_table_card",
        "order_form_modal",
        "delete_confirm_modal"
      ],
      "page_header": [
        "breadcrumb_dashboard",
        "page_title_row"
      ],
      "page_title_row": [
        "page_title",
        "header_actions"
      ],
      "header_actions": [
        "vendors_link_button",
        "create_order_button"
      ],
      "filters_row": [
        "filters_content"
      ],
      "filters_content": [
        "search_input",
        "vendor_filter",
        "status_filter",
        "date_range_filter"
      ],
      "orders_table_card": [
        "orders_table"
      ],
      "order_form_modal": [
        "order_form"
      ],
      "order_form": [
        "form_po_number",
        "form_vendor",
        "form_notes",
        "form_metadata",
        "form_submit_button"
      ],
      "form_po_number": [
        "po_number_input"
      ],
      "form_vendor": [
        "vendor_select"
      ],
      "form_notes": [
        "notes_textarea"
      ],
      "form_metadata": [
        "metadata_textarea"
      ],
      "delete_confirm_modal": [
        "delete_confirm_text"
      ]
    },
    "layout": {
      "main_container": {
        "type": "vertical",
        "gap": 0,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "page_header": {
        "type": "vertical",
        "gap": 8,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "page_title_row": {
        "type": "horizontal",
        "gap": 16,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "header_actions": {
        "type": "horizontal",
        "gap": 8,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "filters_row": {
        "type": "vertical",
        "gap": 0,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "filters_content": {
        "type": "horizontal",
        "gap": 12,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "orders_table_card": {
        "type": "vertical",
        "gap": 0,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "order_form_modal": {
        "type": "vertical",
        "gap": 0,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "order_form": {
        "type": "vertical",
        "gap": 16,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "form_po_number": {
        "type": "vertical",
        "gap": 0,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "form_vendor": {
        "type": "vertical",
        "gap": 0,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "form_notes": {
        "type": "vertical",
        "gap": 0,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "form_metadata": {
        "type": "vertical",
        "gap": 0,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "delete_confirm_modal": {
        "type": "vertical",
        "gap": 0,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      }
    },
    "layout_zones": [
      {
        "zone_id": "main_zone",
        "component": "main_container",
        "anchor": "top-left",
        "size_hint": "full-width",
        "z_layer": "base",
        "notes": "Main page container"
      },
      {
        "zone_id": "modal_zone",
        "component": "order_form_modal",
        "anchor": "center",
        "size_hint": "auto",
        "z_layer": "overlay",
        "notes": "Create/Edit order modal overlay"
      },
      {
        "zone_id": "delete_modal_zone",
        "component": "delete_confirm_modal",
        "anchor": "center",
        "size_hint": "auto",
        "z_layer": "overlay",
        "notes": "Delete confirmation modal overlay"
      }
    ],
    "responsive_overrides": []
  },
  "navigation_ir": {
    "tabs": [],
    "modals": {},
    "drawers": {},
    "routes": [],
    "breadcrumb": null,
    "default_tab": null
  },
  "realtime_ir": {
    "timers": {},
    "polling": {}
  },
  "metadata": {
    "ir_version": "3.5",
    "generated_at": "",
    "source_prompt": null,
    "schema_session_id": null,
    "warnings": []
  },
  "page_data_contract": null,
  "schema_ir": null
}
