{
    "version": 1,
    "updatedAt": "2026-09-05T10:00:00.000Z",
    "components": {
        "cfg_table01": {
            "type": "record-table",
            "objectName": "Case",
            "title": "My cases",
            "columns": [
                { "field": "CaseNumber", "type": "link", "label": "Case" },
                { "field": "Subject", "editable": true },
                { "field": "Status", "type": "badge", "badgeMap": { "New": "badge-info", "Closed": "badge-success" } },
                { "field": "Priority", "formats": [{ "operator": "eq", "value": "High", "class": "text-error font-semibold" }] },
                { "field": "CreatedDate", "format": "relative", "hideOnMobile": true }
            ],
            "filter": "ContactId = :contactUser.Id",
            "orderBy": "CreatedDate DESC",
            "pageSize": 20,
            "paginationMode": "pages",
            "enableSearch": true,
            "enableColumnFilters": true,
            "allowInlineEdit": true,
            "mobileMode": "cards",
            "rowClick": { "type": "page", "page": "Case Detail" }
        },
        "cfg_related01": {
            "type": "related-list",
            "parentObjectName": "Contact",
            "relationshipName": "Cases",
            "objectName": "Case",
            "parentField": "ContactId",
            "columns": [{ "field": "CaseNumber" }, { "field": "Subject" }, { "field": "Status", "type": "badge" }],
            "filter": "IsClosed = false",
            "pageSize": 10
        },
        "cfg_repeater01": {
            "type": "record-repeater",
            "objectName": "Job__c",
            "fields": ["Name", "Location__c", "Salary__c", "Closing_Date__c"],
            "filter": "Status__c = 'Open'",
            "orderBy": "Closing_Date__c ASC",
            "pageSize": 12,
            "containerClass": "grid grid-cols-1 md:grid-cols-3 gap-4",
            "rowClick": { "type": "page", "page": "Job Detail" }
        },
        "cfg_form01": {
            "type": "dynamic-form",
            "objectName": "Contact",
            "mode": "input",
            "recordSource": "contactUser",
            "requireLogin": true,
            "submitLabel": "Save profile",
            "successMessage": "Your profile has been updated.",
            "surveyJson": {
                "title": "My profile",
                "pages": [
                    {
                        "name": "page1",
                        "elements": [
                            { "type": "text", "name": "FirstName", "title": "First name", "isRequired": true },
                            { "type": "text", "name": "LastName", "title": "Last name", "isRequired": true },
                            { "type": "text", "name": "Email", "title": "Email", "inputType": "email" },
                            { "type": "text", "name": "MobilePhone", "title": "Mobile", "inputType": "tel" },
                            { "type": "text", "name": "Birthdate", "title": "Date of birth", "inputType": "date" },
                            { "type": "file", "name": "file_proof", "title": "Proof of address", "storeDataAsText": false }
                        ]
                    }
                ]
            }
        },
        "cfg_path01": {
            "type": "record-path",
            "objectName": "Application__c",
            "stageField": "Status__c",
            "filter": "Candidate__c = :contactUser.Id",
            "style": "steps",
            "allowProgress": false,
            "stages": [{ "value": "Review", "label": "In review", "description": "We are checking your documents." }]
        },
        "cfg_kanban01": {
            "type": "kanban-board",
            "objectName": "Case",
            "groupField": "Status",
            "titleField": "Subject",
            "subtitleField": "CaseNumber",
            "cardFields": [{ "field": "Priority", "type": "badge" }],
            "filter": "ContactId = :contactUser.Id",
            "updateOnMove": true,
            "rowClick": { "type": "modal" }
        },
        "cfg_activity01": {
            "type": "activity-manager",
            "title": "My onboarding tasks",
            "types": ["Task", "Event"],
            "defaultTab": "open",
            "allowCreate": true,
            "allowEdit": true,
            "allowComplete": true,
            "allowDelete": false,
            "categories": ["Onboarding", "Compliance"]
        },
        "cfg_calendar01": {
            "type": "calendar-view",
            "objectName": "Event",
            "startField": "StartDateTime",
            "endField": "EndDateTime",
            "titleField": "Subject",
            "filter": "WhoId = :contactUser.Id",
            "views": ["month", "week", "agenda"],
            "defaultView": "month",
            "eventClick": { "type": "modal" }
        },
        "cfg_kpi01": {
            "type": "kpi-card",
            "label": "Open cases",
            "objectName": "Case",
            "function": "COUNT",
            "filter": "ContactId = :contactUser.Id AND IsClosed = false",
            "icon": "fa-solid fa-life-ring",
            "dateField": "CreatedDate",
            "period": "THIS_MONTH",
            "compare": true,
            "trendInverse": true
        },
        "cfg_gauge01": {
            "type": "progress-gauge",
            "label": "Onboarding",
            "objectName": "Portal_Task__c",
            "function": "COUNT",
            "filter": "Contact__c = :contactUser.Id AND Status__c = 'Completed' AND Category__c = 'Onboarding'",
            "target": { "objectName": "Portal_Task__c", "function": "COUNT", "filter": "Contact__c = :contactUser.Id AND Category__c = 'Onboarding'" },
            "style": "radial",
            "showRemaining": true
        },
        "cfg_notif01": {
            "type": "notification-centre",
            "displayMode": "bell",
            "markViewedOn": "open",
            "pollSeconds": 60,
            "pageSize": 20
        },
        "cfg_kb01": {
            "type": "knowledge-centre",
            "title": "Help centre",
            "showCategories": true,
            "showFeatured": true,
            "showRecent": true,
            "layout": "grid"
        },
        "cfg_cond01": {
            "type": "conditional-content",
            "mode": "show",
            "logic": "all",
            "conditions": [
                { "source": "contactUser", "field": "Account.Type", "operator": "eq", "value": "Partner" },
                { "source": "session", "operator": "isLoggedIn" }
            ]
        }
    }
}
