{
  "version": "2.0",
  "components": [
    {
      "id": "comp_search",
      "url": "@/lib/registry/components/v2-table-search-widget",
      "size": { "width": 1920, "height": 80 },
      "position": { "x": 0, "y": 20, "z": 1 },
      "overrides": {
        "type": "v2-table-search-widget",
        "label": "Search Filter",
        "webTypeConfig": {}
      },
      "displayOrder": 0
    },
    {
      "id": "comp_table",
      "url": "@/lib/registry/components/v2-table-list",
      "size": { "width": 1920, "height": 800 },
      "position": { "x": 0, "y": 150, "z": 1 },
      "overrides": {
        "type": "v2-table-list",
        "label": "Sales Order List",
        "filter": { "enabled": true, "filters": [] },
        "height": "auto",
        "actions": { "actions": [], "bulkActions": false, "showActions": false },
        "columns": [
          { "align": "left", "order": 0, "format": "text", "visible": true, "sortable": true, "columnName": "order_no", "searchable": true, "displayName": "Order No" },
          { "align": "left", "order": 1, "format": "text", "visible": true, "sortable": true, "columnName": "partner_id", "searchable": true, "displayName": "Customer" },
          { "align": "left", "order": 2, "format": "text", "visible": true, "sortable": true, "columnName": "part_code", "searchable": true, "displayName": "Part Code" },
          { "align": "left", "order": 3, "format": "text", "visible": true, "sortable": true, "columnName": "part_name", "searchable": true, "displayName": "Part Name" },
          { "align": "left", "order": 4, "format": "text", "visible": true, "sortable": true, "columnName": "spec", "searchable": true, "displayName": "Spec" },
          { "align": "left", "order": 5, "format": "text", "visible": true, "sortable": true, "columnName": "material", "searchable": true, "displayName": "Material" },
          { "align": "right", "order": 6, "format": "number", "visible": true, "sortable": true, "columnName": "order_qty", "searchable": false, "displayName": "Order Qty" },
          { "align": "right", "order": 7, "format": "number", "visible": true, "sortable": true, "columnName": "ship_qty", "searchable": false, "displayName": "Ship Qty" },
          { "align": "right", "order": 8, "format": "number", "visible": true, "sortable": true, "columnName": "balance_qty", "searchable": false, "displayName": "Balance" },
          { "align": "right", "order": 9, "format": "number", "visible": true, "sortable": true, "columnName": "inventory_qty", "searchable": false, "displayName": "Stock" },
          { "align": "right", "order": 10, "format": "number", "visible": true, "sortable": true, "columnName": "plan_ship_qty", "searchable": false, "displayName": "Plan Ship Qty" },
          { "align": "right", "order": 11, "format": "number", "visible": true, "sortable": true, "columnName": "unit_price", "searchable": false, "displayName": "Unit Price" },
          { "align": "right", "order": 12, "format": "number", "visible": true, "sortable": true, "columnName": "total_amount", "searchable": false, "displayName": "Amount" },
          { "align": "left", "order": 13, "format": "text", "visible": true, "sortable": true, "columnName": "delivery_partner_id", "searchable": true, "displayName": "Delivery Partner" },
          { "align": "left", "order": 14, "format": "text", "visible": true, "sortable": true, "columnName": "delivery_address", "searchable": true, "displayName": "Delivery Address" },
          { "align": "center", "order": 15, "format": "text", "visible": true, "sortable": true, "columnName": "shipping_method", "searchable": true, "displayName": "Shipping Method" },
          { "align": "center", "order": 16, "format": "date", "visible": true, "sortable": true, "columnName": "due_date", "searchable": false, "displayName": "Due Date" },
          { "align": "center", "order": 17, "format": "date", "visible": true, "sortable": true, "columnName": "order_date", "searchable": false, "displayName": "Order Date" },
          { "align": "center", "order": 18, "format": "text", "visible": true, "sortable": true, "columnName": "status", "searchable": true, "displayName": "Status" },
          { "align": "left", "order": 19, "format": "text", "visible": true, "sortable": true, "columnName": "manager_name", "searchable": true, "displayName": "Manager" },
          { "align": "left", "order": 20, "format": "text", "visible": true, "sortable": true, "columnName": "memo", "searchable": true, "displayName": "Memo" }
        ],
        "autoLoad": true,
        "checkbox": { "enabled": true, "multiple": true, "position": "left", "selectAll": true },
        "pagination": { "enabled": true, "pageSize": 20, "showPageInfo": true, "pageSizeOptions": [10, 20, 50, 100], "showSizeSelector": true },
        "showFooter": true,
        "showHeader": true,
        "tableStyle": { "theme": "default", "rowHeight": "normal", "borderStyle": "light", "headerStyle": "default", "hoverEffect": true, "alternateRows": true },
        "displayMode": "table",
        "stickyHeader": false,
        "selectedTable": "sales_order_mng",
        "webTypeConfig": {},
        "horizontalScroll": { "enabled": true, "maxColumnWidth": 300, "minColumnWidth": 80, "maxVisibleColumns": 10 }
      },
      "displayOrder": 1
    },
    {
      "id": "comp_btn_upload",
      "url": "@/lib/registry/components/v2-button-primary",
      "size": { "width": 100, "height": 40 },
      "position": { "x": 1610, "y": 30, "z": 1 },
      "overrides": {
        "text": "Excel Upload",
        "type": "v2-button-primary",
        "label": "Excel Upload Button",
        "action": { "type": "excel_upload" },
        "variant": "secondary",
        "actionType": "button",
        "webTypeConfig": { "variant": "secondary", "actionType": "custom" }
      },
      "displayOrder": 2
    },
    {
      "id": "comp_btn_download",
      "url": "@/lib/registry/components/v2-button-primary",
      "size": { "width": 110, "height": 40 },
      "position": { "x": 1720, "y": 30, "z": 1 },
      "overrides": {
        "text": "Excel Download",
        "type": "v2-button-primary",
        "label": "Excel Download Button",
        "action": { "type": "excel_download" },
        "variant": "secondary",
        "actionType": "button",
        "webTypeConfig": { "variant": "secondary", "actionType": "custom" }
      },
      "displayOrder": 3
    },
    {
      "id": "comp_btn_register",
      "url": "@/lib/registry/components/v2-button-primary",
      "size": { "width": 100, "height": 40 },
      "position": { "x": 1500, "y": 100, "z": 1 },
      "overrides": {
        "text": "New Order",
        "type": "v2-button-primary",
        "label": "New Order Button",
        "action": {
          "type": "modal",
          "modalSize": "lg",
          "modalTitle": "New Sales Order",
          "targetScreenId": 3732,
          "successMessage": "Saved successfully.",
          "errorMessage": "Error saving."
        },
        "variant": "success",
        "actionType": "button",
        "webTypeConfig": { "variant": "default", "actionType": "custom" }
      },
      "displayOrder": 4
    },
    {
      "id": "comp_btn_edit",
      "url": "@/lib/registry/components/v2-button-primary",
      "size": { "width": 80, "height": 40 },
      "position": { "x": 1610, "y": 100, "z": 1 },
      "overrides": {
        "text": "Edit",
        "type": "v2-button-primary",
        "label": "Edit Button",
        "action": {
          "type": "edit",
          "modalSize": "lg",
          "modalTitle": "Edit Sales Order",
          "targetScreenId": 3732,
          "successMessage": "Updated successfully.",
          "errorMessage": "Error updating."
        },
        "variant": "secondary",
        "actionType": "button",
        "webTypeConfig": { "variant": "secondary", "actionType": "custom" }
      },
      "displayOrder": 5
    },
    {
      "id": "comp_btn_delete",
      "url": "@/lib/registry/components/v2-button-primary",
      "size": { "width": 80, "height": 40 },
      "position": { "x": 1700, "y": 100, "z": 1 },
      "overrides": {
        "text": "Delete",
        "type": "v2-button-primary",
        "label": "Delete Button",
        "action": {
          "type": "delete",
          "successMessage": "Deleted successfully.",
          "errorMessage": "Error deleting."
        },
        "variant": "danger",
        "actionType": "button",
        "webTypeConfig": { "variant": "secondary", "actionType": "custom" }
      },
      "displayOrder": 6
    },
    {
      "id": "comp_btn_shipment",
      "url": "@/lib/registry/components/v2-button-primary",
      "size": { "width": 100, "height": 40 },
      "position": { "x": 1790, "y": 100, "z": 1 },
      "overrides": {
        "text": "Shipment Plan",
        "type": "v2-button-primary",
        "label": "Shipment Plan Button",
        "action": { "type": "custom" },
        "variant": "secondary",
        "actionType": "button",
        "webTypeConfig": { "variant": "secondary", "actionType": "custom" }
      },
      "displayOrder": 7
    }
  ]
}
