{"body": [{"html": "<div class=\"alert alert-info mb-4\"><span class=\"font-semibold\">Tip:</span> Pick a vendor from the dropdown to focus every tab. Use the lifecycle filter to narrow the vendor list before diving into contacts, documents, or performance.</div>", "type": "html"}, {"tabs": [{"label": "Vendors", "elements": [{"html": "<p class=\"text-sm text-gray-600 mb-3\">Use the filters above to focus on a lifecycle stage or specific vendor. Row actions open the profile or start editing without leaving this modal.</p>", "type": "html"}, {"type": "table", "options": {"addButton": false, "tableName": "vendors", "editFormId": 110, "rowActions": [{"label": "Edit", "formName": "Vendor"}, {"label": "Open Detail", "onClick": "openVendorDetail"}], "filterField": ["vendor_id", "lifecycle_status"], "columnsToShow": ["vendorname", "businessRegNumber", "lifecycle_status", "avg_rating", "last_reviewed_at"], "showGlobalSearch": true}}]}, {"label": "Contacts", "elements": [{"html": "<p class=\"text-sm text-gray-600 mb-3\">Select a vendor to see their contact roster. Mark one primary so reminders and workflows know who to reach out to.</p>", "type": "html"}, {"type": "button", "class": "btn btn-primary btn-sm mb-3", "label": "Add Contact", "formName": "Vendor Contact", "prefillFilter": "vendor_id"}, {"type": "table", "options": {"addButton": false, "tableName": "vendor_contacts", "editFormId": 610, "filterField": "vendor_id", "filterValue": {"vendor_id": "__none__"}, "columnsToShow": ["contact_name", "contact_role", "email", "phone_number", "is_primary"], "showGlobalSearch": false}}]}, {"label": "Addresses", "elements": [{"html": "<p class=\"text-sm text-gray-600 mb-3\">Track billing, shipping, and registered addresses so logistics and compliance teams stay aligned.</p>", "type": "html"}, {"type": "button", "class": "btn btn-primary btn-sm mb-3", "label": "Add Address", "formName": "Vendor Address", "prefillFilter": "vendor_id"}, {"type": "table", "options": {"addButton": false, "tableName": "vendor_addresses", "editFormId": 611, "filterField": "vendor_id", "filterValue": {"vendor_id": "__none__"}, "columnsToShow": ["address_type", "line1", "city", "state_region", "country_code", "is_primary"], "showGlobalSearch": false}}]}, {"label": "Capabilities", "elements": [{"html": "<p class=\"text-sm text-gray-600 mb-3\">Log competencies, certifications, and experience to drive better RFQ shortlists.</p>", "type": "html"}, {"type": "button", "class": "btn btn-primary btn-sm mb-3", "label": "Add Capability", "formName": "Vendor Capability", "prefillFilter": "vendor_id"}, {"type": "table", "options": {"addButton": false, "tableName": "vendor_capabilities", "editFormId": 612, "filterField": "vendor_id", "filterValue": {"vendor_id": "__none__"}, "columnsToShow": ["capability_category", "experience_years", "competency_score", "capacity_notes"], "showGlobalSearch": false}}]}, {"label": "Documents", "elements": [{"html": "<p class=\"text-sm text-gray-600 mb-3\">Keep compliance documents current. Expiring records appear here first so you can chase renewals.</p>", "type": "html"}, {"type": "button", "class": "btn btn-primary btn-sm mb-3", "label": "Add Document", "formName": "Vendor Document", "prefillFilter": "vendor_id"}, {"type": "table", "options": {"addButton": false, "tableName": "vendor_documents", "editFormId": 613, "filterField": "vendor_id", "filterValue": {"vendor_id": "__none__"}, "columnsToShow": ["doc_type", "filetype", "validity"], "showGlobalSearch": false}}]}, {"label": "Certificates", "elements": [{"html": "<p class=\"text-sm text-gray-600 mb-3\">Track certification renewals and attach evidence for compliance reviews.</p>", "type": "html"}, {"type": "button", "class": "btn btn-primary btn-sm mb-3", "label": "Add Certificate", "formName": "Vendor Certificate", "prefillFilter": "vendor_id"}, {"type": "table", "options": {"addButton": false, "tableName": "vendor_certificates", "editFormId": 616, "filterField": "vendor_id", "filterValue": {"vendor_id": "__none__"}, "columnsToShow": ["certificate_name", "issued_at", "expiry_date"], "showGlobalSearch": false}}]}, {"label": "Supporting Docs", "elements": [{"html": "<p class=\"text-sm text-gray-600 mb-3\">Store questionnaires, insurance, and policy artefacts so onboarding evidence is one click away.</p>", "type": "html"}, {"type": "button", "class": "btn btn-primary btn-sm mb-3", "label": "Add Supporting Doc", "formName": "Vendor Supporting Document", "prefillFilter": "vendor_id"}, {"type": "table", "options": {"addButton": false, "tableName": "vendor_supporting_docs", "editFormId": 614, "filterField": "vendor_id", "filterValue": {"vendor_id": "__none__"}, "columnsToShow": ["type", "filetype", "validity"], "showGlobalSearch": false}}]}, {"label": "Performance", "elements": [{"html": "<p class=\"text-sm text-gray-600 mb-3\">Log periodic KPI reviews to monitor delivery trends and trigger requalification when scores fall.</p>", "type": "html"}, {"type": "button", "class": "btn btn-primary btn-sm mb-3", "label": "Log Metric", "formName": "Vendor Performance Metric", "prefillFilter": "vendor_id"}, {"type": "table", "options": {"addButton": false, "tableName": "vendor_performance_metrics", "editFormId": 615, "filterField": "vendor_id", "filterValue": {"vendor_id": "__none__"}, "columnsToShow": ["kpi_name", "rating", "period_start", "period_end", "reviewer_id"], "showGlobalSearch": false}}]}], "type": "tabs"}], "title": "Vendor Management", "footer": [{"type": "button", "label": "Close", "onClick": "closeModal"}], "header": [{"type": "button", "label": "Add Vendor", "formName": "Vendor"}, {"id": "vendorFilter", "type": "filter-select", "options": {"data_column": "vendor_id", "placeholder": "Search vendors...", "source_table": "vendors", "default_label": "All Vendors", "source_column": "vendor_id", "display_column": "vendorname"}}, {"id": "vendorStatusFilter", "type": "filter-select", "options": {"options": [{"label": "Pending", "value": "pending"}, {"label": "Onboarding", "value": "onboarding"}, {"label": "Active", "value": "active"}, {"label": "Suspended", "value": "suspended"}, {"label": "Offboarded", "value": "offboarded"}], "data_column": "lifecycle_status", "default_label": "All Statuses"}}]}