@rippling/rippling-sdk 0.2.0-alpha.48 → 0.2.0-alpha.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts.map +1 -1
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/examples/manifest/dental-practice-management/dental-practice-management.ts +18 -41
- package/examples/manifest/dental-practice-management/functions/chair-schedule.ts +31 -0
- package/examples/manifest/dental-practice-management/functions/operatory-list.ts +31 -0
- package/examples/manifest/dental-practice-management/functions/patient-list.ts +31 -0
- package/examples/manifest/dental-practice-management/functions/treatment-plan-list.ts +31 -0
- package/examples/manifest/dental-practice-management/manifest.json +22 -19
- package/examples/manifest/existing-manifest-mutations/existing-manifest-mutations.ts +3 -0
- package/examples/manifest/gym-membership-management/functions/check-in-desk.ts +31 -0
- package/examples/manifest/gym-membership-management/functions/member-list.ts +31 -0
- package/examples/manifest/gym-membership-management/functions/today-schedule.ts +31 -0
- package/examples/manifest/gym-membership-management/functions/trainer-list.ts +31 -0
- package/examples/manifest/gym-membership-management/gym-membership-management.ts +28 -41
- package/examples/manifest/gym-membership-management/manifest.json +22 -19
- package/examples/manifest/simple-todo-app/functions/todo-list.ts +31 -0
- package/examples/manifest/simple-todo-app/manifest.json +429 -0
- package/examples/manifest/simple-todo-app/simple-todo-app.ts +167 -0
- package/examples/sdui/sdui-crud-todo/rippling-function.ts +14 -23
- package/examples/sdui/sdui-showcase/rippling-function.ts +8 -23
- package/examples/sdui/sdui-tab-multi-view/rippling-function.ts +276 -295
- package/examples/sdui/vote/rippling-function.ts +10 -25
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/tslib.js +4 -0
- package/internal/types.d.mts +4 -4
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +4 -4
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/lib/manifest/_existing-component-fields.d.mts +1 -0
- package/lib/manifest/_existing-component-fields.d.mts.map +1 -1
- package/lib/manifest/_existing-component-fields.d.ts +1 -0
- package/lib/manifest/_existing-component-fields.d.ts.map +1 -1
- package/lib/manifest/_existing-component-fields.js +5 -0
- package/lib/manifest/_existing-component-fields.js.map +1 -1
- package/lib/manifest/_existing-component-fields.mjs +4 -0
- package/lib/manifest/_existing-component-fields.mjs.map +1 -1
- package/lib/manifest/app.d.mts +2 -2
- package/lib/manifest/app.d.mts.map +1 -1
- package/lib/manifest/app.d.ts +2 -2
- package/lib/manifest/app.d.ts.map +1 -1
- package/lib/manifest/app.js +2 -3
- package/lib/manifest/app.js.map +1 -1
- package/lib/manifest/app.mjs +3 -4
- package/lib/manifest/app.mjs.map +1 -1
- package/lib/manifest/category.d.mts.map +1 -1
- package/lib/manifest/category.d.ts.map +1 -1
- package/lib/manifest/category.js +1 -3
- package/lib/manifest/category.js.map +1 -1
- package/lib/manifest/category.mjs +2 -4
- package/lib/manifest/category.mjs.map +1 -1
- package/lib/manifest/custom-object-field-section.d.mts.map +1 -1
- package/lib/manifest/custom-object-field-section.d.ts.map +1 -1
- package/lib/manifest/custom-object-field-section.mjs.map +1 -1
- package/lib/manifest/custom-object-page-layout.d.mts.map +1 -1
- package/lib/manifest/custom-object-page-layout.d.ts.map +1 -1
- package/lib/manifest/custom-object-page-layout.mjs.map +1 -1
- package/lib/manifest/custom-object.d.mts +2 -2
- package/lib/manifest/custom-object.d.mts.map +1 -1
- package/lib/manifest/custom-object.d.ts +2 -2
- package/lib/manifest/custom-object.d.ts.map +1 -1
- package/lib/manifest/custom-object.js +2 -3
- package/lib/manifest/custom-object.js.map +1 -1
- package/lib/manifest/custom-object.mjs +3 -4
- package/lib/manifest/custom-object.mjs.map +1 -1
- package/lib/manifest/existing-manifest-context.d.mts.map +1 -1
- package/lib/manifest/existing-manifest-context.d.ts.map +1 -1
- package/lib/manifest/existing-manifest-context.js +1 -3
- package/lib/manifest/existing-manifest-context.js.map +1 -1
- package/lib/manifest/existing-manifest-context.mjs +2 -4
- package/lib/manifest/existing-manifest-context.mjs.map +1 -1
- package/lib/manifest/field.d.mts +2 -2
- package/lib/manifest/field.d.mts.map +1 -1
- package/lib/manifest/field.d.ts +2 -2
- package/lib/manifest/field.d.ts.map +1 -1
- package/lib/manifest/field.js +2 -3
- package/lib/manifest/field.js.map +1 -1
- package/lib/manifest/field.mjs +3 -4
- package/lib/manifest/field.mjs.map +1 -1
- package/lib/manifest/index.d.mts.map +1 -1
- package/lib/manifest/index.d.ts.map +1 -1
- package/lib/manifest/index.mjs.map +1 -1
- package/lib/manifest/list-view.d.mts +2 -2
- package/lib/manifest/list-view.d.mts.map +1 -1
- package/lib/manifest/list-view.d.ts +2 -2
- package/lib/manifest/list-view.d.ts.map +1 -1
- package/lib/manifest/list-view.js +2 -4
- package/lib/manifest/list-view.js.map +1 -1
- package/lib/manifest/list-view.mjs +3 -5
- package/lib/manifest/list-view.mjs.map +1 -1
- package/lib/manifest/manifest-builder.d.mts +3 -3
- package/lib/manifest/manifest-builder.d.mts.map +1 -1
- package/lib/manifest/manifest-builder.d.ts +3 -3
- package/lib/manifest/manifest-builder.d.ts.map +1 -1
- package/lib/manifest/manifest-builder.js +3 -5
- package/lib/manifest/manifest-builder.js.map +1 -1
- package/lib/manifest/manifest-builder.mjs +3 -5
- package/lib/manifest/manifest-builder.mjs.map +1 -1
- package/lib/manifest/manifest-function.d.mts +4 -5
- package/lib/manifest/manifest-function.d.mts.map +1 -1
- package/lib/manifest/manifest-function.d.ts +4 -5
- package/lib/manifest/manifest-function.d.ts.map +1 -1
- package/lib/manifest/manifest-function.js +5 -8
- package/lib/manifest/manifest-function.js.map +1 -1
- package/lib/manifest/manifest-function.mjs +6 -9
- package/lib/manifest/manifest-function.mjs.map +1 -1
- package/lib/manifest/rule.d.mts +2 -2
- package/lib/manifest/rule.d.mts.map +1 -1
- package/lib/manifest/rule.d.ts +2 -2
- package/lib/manifest/rule.d.ts.map +1 -1
- package/lib/manifest/rule.js +2 -4
- package/lib/manifest/rule.js.map +1 -1
- package/lib/manifest/rule.mjs +3 -5
- package/lib/manifest/rule.mjs.map +1 -1
- package/lib/manifest/sdui-page.d.mts +2 -2
- package/lib/manifest/sdui-page.d.mts.map +1 -1
- package/lib/manifest/sdui-page.d.ts +2 -2
- package/lib/manifest/sdui-page.d.ts.map +1 -1
- package/lib/manifest/sdui-page.js +2 -4
- package/lib/manifest/sdui-page.js.map +1 -1
- package/lib/manifest/sdui-page.mjs +3 -5
- package/lib/manifest/sdui-page.mjs.map +1 -1
- package/lib/manifest/validation.d.mts.map +1 -1
- package/lib/manifest/validation.d.ts.map +1 -1
- package/lib/manifest/validation.mjs.map +1 -1
- package/lib/manifest.d.mts +2 -0
- package/lib/manifest.d.mts.map +1 -0
- package/lib/manifest.d.ts +2 -0
- package/lib/manifest.d.ts.map +1 -0
- package/lib/manifest.js +5 -0
- package/lib/manifest.js.map +1 -0
- package/lib/manifest.mjs +2 -0
- package/lib/manifest.mjs.map +1 -0
- package/lib/sdui/actions.mjs.map +1 -1
- package/lib/sdui/component.d.mts.map +1 -1
- package/lib/sdui/component.d.ts.map +1 -1
- package/lib/sdui/components.d.mts.map +1 -1
- package/lib/sdui/components.d.ts.map +1 -1
- package/lib/sdui/conditions.mjs.map +1 -1
- package/lib/sdui/directives.d.mts.map +1 -1
- package/lib/sdui/directives.d.ts.map +1 -1
- package/lib/sdui/directives.mjs.map +1 -1
- package/lib/sdui/index.d.mts.map +1 -1
- package/lib/sdui/index.d.ts.map +1 -1
- package/lib/sdui/index.mjs +11 -0
- package/lib/sdui/index.mjs.map +1 -1
- package/lib/sdui/props.d.mts.map +1 -1
- package/lib/sdui/props.d.ts.map +1 -1
- package/lib/sdui/props.mjs.map +1 -1
- package/lib/sdui/render.d.mts.map +1 -1
- package/lib/sdui/render.d.ts.map +1 -1
- package/lib/sdui.d.mts +3 -0
- package/lib/sdui.d.mts.map +1 -0
- package/lib/sdui.d.ts +3 -0
- package/lib/sdui.d.ts.map +1 -0
- package/lib/sdui.js +8 -0
- package/lib/sdui.js.map +1 -0
- package/lib/sdui.mjs +3 -0
- package/lib/sdui.mjs.map +1 -0
- package/package.json +1 -1
- package/pagination.d.mts +1 -0
- package/pagination.d.mts.map +1 -1
- package/pagination.d.ts +1 -0
- package/pagination.d.ts.map +1 -1
- package/pagination.mjs +1 -0
- package/pagination.mjs.map +1 -1
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/business-partner-groups.d.mts.map +1 -1
- package/resources/business-partner-groups.d.ts.map +1 -1
- package/resources/business-partner-groups.mjs.map +1 -1
- package/resources/business-partners.d.mts.map +1 -1
- package/resources/business-partners.d.ts.map +1 -1
- package/resources/business-partners.mjs.map +1 -1
- package/resources/candidate-applications.d.mts.map +1 -1
- package/resources/candidate-applications.d.ts.map +1 -1
- package/resources/candidate-applications.mjs.map +1 -1
- package/resources/candidates.d.mts.map +1 -1
- package/resources/candidates.d.ts.map +1 -1
- package/resources/candidates.mjs.map +1 -1
- package/resources/companies.d.mts.map +1 -1
- package/resources/companies.d.ts.map +1 -1
- package/resources/companies.mjs.map +1 -1
- package/resources/company-legal-entities.d.mts.map +1 -1
- package/resources/company-legal-entities.d.ts.map +1 -1
- package/resources/company-legal-entities.mjs.map +1 -1
- package/resources/company-legal-entity-workers.d.mts.map +1 -1
- package/resources/company-legal-entity-workers.d.ts.map +1 -1
- package/resources/company-legal-entity-workers.mjs.map +1 -1
- package/resources/compensation-bands-details.d.mts.map +1 -1
- package/resources/compensation-bands-details.d.ts.map +1 -1
- package/resources/compensation-bands-details.mjs.map +1 -1
- package/resources/compensations.d.mts.map +1 -1
- package/resources/compensations.d.ts.map +1 -1
- package/resources/compensations.mjs.map +1 -1
- package/resources/custom-apps.d.mts.map +1 -1
- package/resources/custom-apps.d.ts.map +1 -1
- package/resources/custom-apps.mjs.map +1 -1
- package/resources/custom-fields.d.mts.map +1 -1
- package/resources/custom-fields.d.ts.map +1 -1
- package/resources/custom-fields.mjs.map +1 -1
- package/resources/custom-objects/custom-objects.d.mts.map +1 -1
- package/resources/custom-objects/custom-objects.d.ts.map +1 -1
- package/resources/custom-objects/custom-objects.mjs.map +1 -1
- package/resources/custom-objects/fields.d.mts.map +1 -1
- package/resources/custom-objects/fields.d.ts.map +1 -1
- package/resources/custom-objects/fields.mjs.map +1 -1
- package/resources/custom-objects/index.d.mts.map +1 -1
- package/resources/custom-objects/index.d.ts.map +1 -1
- package/resources/custom-objects/index.mjs.map +1 -1
- package/resources/custom-objects/records.d.mts.map +1 -1
- package/resources/custom-objects/records.d.ts.map +1 -1
- package/resources/custom-objects/records.mjs.map +1 -1
- package/resources/custom-objects.d.mts.map +1 -1
- package/resources/custom-objects.d.ts.map +1 -1
- package/resources/custom-objects.mjs.map +1 -1
- package/resources/custom-pages.d.mts.map +1 -1
- package/resources/custom-pages.d.ts.map +1 -1
- package/resources/custom-pages.mjs.map +1 -1
- package/resources/custom-settings.d.mts.map +1 -1
- package/resources/custom-settings.d.ts.map +1 -1
- package/resources/custom-settings.mjs.map +1 -1
- package/resources/departments.d.mts.map +1 -1
- package/resources/departments.d.ts.map +1 -1
- package/resources/departments.mjs.map +1 -1
- package/resources/draft-hires.d.mts.map +1 -1
- package/resources/draft-hires.d.ts.map +1 -1
- package/resources/draft-hires.mjs.map +1 -1
- package/resources/earning-types.d.mts.map +1 -1
- package/resources/earning-types.d.ts.map +1 -1
- package/resources/earning-types.mjs.map +1 -1
- package/resources/earnings-inputs.d.mts.map +1 -1
- package/resources/earnings-inputs.d.ts.map +1 -1
- package/resources/earnings-inputs.mjs.map +1 -1
- package/resources/employment-types.d.mts.map +1 -1
- package/resources/employment-types.d.ts.map +1 -1
- package/resources/employment-types.mjs.map +1 -1
- package/resources/entitlements.d.mts.map +1 -1
- package/resources/entitlements.d.ts.map +1 -1
- package/resources/entitlements.mjs.map +1 -1
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts.map +1 -1
- package/resources/files.mjs.map +1 -1
- package/resources/functions/deployments.d.mts.map +1 -1
- package/resources/functions/deployments.d.ts.map +1 -1
- package/resources/functions/deployments.mjs.map +1 -1
- package/resources/functions/executions.d.mts.map +1 -1
- package/resources/functions/executions.d.ts.map +1 -1
- package/resources/functions/executions.mjs.map +1 -1
- package/resources/functions/functions.d.mts.map +1 -1
- package/resources/functions/functions.d.ts.map +1 -1
- package/resources/functions/functions.mjs.map +1 -1
- package/resources/functions/index.d.mts.map +1 -1
- package/resources/functions/index.d.ts.map +1 -1
- package/resources/functions/index.mjs.map +1 -1
- package/resources/functions.d.mts.map +1 -1
- package/resources/functions.d.ts.map +1 -1
- package/resources/functions.mjs.map +1 -1
- package/resources/headcount-positions.d.mts.map +1 -1
- package/resources/headcount-positions.d.ts.map +1 -1
- package/resources/headcount-positions.mjs.map +1 -1
- package/resources/headcount-priorities.d.mts.map +1 -1
- package/resources/headcount-priorities.d.ts.map +1 -1
- package/resources/headcount-priorities.mjs.map +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/job-assignments.d.mts.map +1 -1
- package/resources/job-assignments.d.ts.map +1 -1
- package/resources/job-assignments.mjs.map +1 -1
- package/resources/job-codes.d.mts.map +1 -1
- package/resources/job-codes.d.ts.map +1 -1
- package/resources/job-codes.mjs.map +1 -1
- package/resources/job-dimensions.d.mts.map +1 -1
- package/resources/job-dimensions.d.ts.map +1 -1
- package/resources/job-dimensions.mjs.map +1 -1
- package/resources/job-functions.d.mts.map +1 -1
- package/resources/job-functions.d.ts.map +1 -1
- package/resources/job-functions.mjs.map +1 -1
- package/resources/job-pay-rate-exceptions.d.mts.map +1 -1
- package/resources/job-pay-rate-exceptions.d.ts.map +1 -1
- package/resources/job-pay-rate-exceptions.mjs.map +1 -1
- package/resources/job-requisitions-write.d.mts.map +1 -1
- package/resources/job-requisitions-write.d.ts.map +1 -1
- package/resources/job-requisitions-write.mjs.map +1 -1
- package/resources/job-requisitions.d.mts.map +1 -1
- package/resources/job-requisitions.d.ts.map +1 -1
- package/resources/job-requisitions.mjs.map +1 -1
- package/resources/kiosk-badges.d.mts.map +1 -1
- package/resources/kiosk-badges.d.ts.map +1 -1
- package/resources/kiosk-badges.mjs.map +1 -1
- package/resources/leave-accruals.d.mts.map +1 -1
- package/resources/leave-accruals.d.ts.map +1 -1
- package/resources/leave-accruals.mjs.map +1 -1
- package/resources/leave-balances.d.mts.map +1 -1
- package/resources/leave-balances.d.ts.map +1 -1
- package/resources/leave-balances.mjs.map +1 -1
- package/resources/leave-requests.d.mts.map +1 -1
- package/resources/leave-requests.d.ts.map +1 -1
- package/resources/leave-requests.mjs.map +1 -1
- package/resources/leave-types.d.mts.map +1 -1
- package/resources/leave-types.d.ts.map +1 -1
- package/resources/leave-types.mjs.map +1 -1
- package/resources/legal-entities.d.mts.map +1 -1
- package/resources/legal-entities.d.ts.map +1 -1
- package/resources/legal-entities.mjs.map +1 -1
- package/resources/levels.d.mts.map +1 -1
- package/resources/levels.d.ts.map +1 -1
- package/resources/levels.mjs.map +1 -1
- package/resources/location-factors.d.mts.map +1 -1
- package/resources/location-factors.d.ts.map +1 -1
- package/resources/location-factors.mjs.map +1 -1
- package/resources/metadata/components.d.mts.map +1 -1
- package/resources/metadata/components.d.ts.map +1 -1
- package/resources/metadata/components.mjs.map +1 -1
- package/resources/metadata/index.d.mts.map +1 -1
- package/resources/metadata/index.d.ts.map +1 -1
- package/resources/metadata/index.mjs.map +1 -1
- package/resources/metadata/metadata.d.mts.map +1 -1
- package/resources/metadata/metadata.d.ts.map +1 -1
- package/resources/metadata/metadata.mjs.map +1 -1
- package/resources/metadata/summary.d.mts.map +1 -1
- package/resources/metadata/summary.d.ts.map +1 -1
- package/resources/metadata/summary.mjs.map +1 -1
- package/resources/metadata/types.d.mts.map +1 -1
- package/resources/metadata/types.d.ts.map +1 -1
- package/resources/metadata/types.mjs.map +1 -1
- package/resources/metadata.d.mts.map +1 -1
- package/resources/metadata.d.ts.map +1 -1
- package/resources/metadata.mjs.map +1 -1
- package/resources/object-categories.d.mts.map +1 -1
- package/resources/object-categories.d.ts.map +1 -1
- package/resources/object-categories.mjs.map +1 -1
- package/resources/payroll-runs/index.d.mts.map +1 -1
- package/resources/payroll-runs/index.d.ts.map +1 -1
- package/resources/payroll-runs/index.mjs.map +1 -1
- package/resources/payroll-runs/payroll-runs.d.mts.map +1 -1
- package/resources/payroll-runs/payroll-runs.d.ts.map +1 -1
- package/resources/payroll-runs/payroll-runs.mjs.map +1 -1
- package/resources/payroll-runs/worker-payroll-records.d.mts.map +1 -1
- package/resources/payroll-runs/worker-payroll-records.d.ts.map +1 -1
- package/resources/payroll-runs/worker-payroll-records.mjs.map +1 -1
- package/resources/payroll-runs.d.mts.map +1 -1
- package/resources/payroll-runs.d.ts.map +1 -1
- package/resources/payroll-runs.mjs.map +1 -1
- package/resources/platform-capabilities.d.mts.map +1 -1
- package/resources/platform-capabilities.d.ts.map +1 -1
- package/resources/platform-capabilities.mjs.map +1 -1
- package/resources/report-runs.d.mts.map +1 -1
- package/resources/report-runs.d.ts.map +1 -1
- package/resources/report-runs.mjs.map +1 -1
- package/resources/reports/available-filters.d.mts.map +1 -1
- package/resources/reports/available-filters.d.ts.map +1 -1
- package/resources/reports/available-filters.mjs.map +1 -1
- package/resources/reports/index.d.mts.map +1 -1
- package/resources/reports/index.d.ts.map +1 -1
- package/resources/reports/index.mjs.map +1 -1
- package/resources/reports/reports.d.mts.map +1 -1
- package/resources/reports/reports.d.ts.map +1 -1
- package/resources/reports/reports.mjs.map +1 -1
- package/resources/reports.d.mts.map +1 -1
- package/resources/reports.d.ts.map +1 -1
- package/resources/reports.mjs.map +1 -1
- package/resources/schedules.d.mts.map +1 -1
- package/resources/schedules.d.ts.map +1 -1
- package/resources/schedules.mjs.map +1 -1
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts.map +1 -1
- package/resources/shift-assignments.d.mts.map +1 -1
- package/resources/shift-assignments.d.ts.map +1 -1
- package/resources/shift-assignments.mjs.map +1 -1
- package/resources/shift-inputs.d.mts.map +1 -1
- package/resources/shift-inputs.d.ts.map +1 -1
- package/resources/shift-inputs.mjs.map +1 -1
- package/resources/shiftassignments.d.mts.map +1 -1
- package/resources/shiftassignments.d.ts.map +1 -1
- package/resources/shiftassignments.mjs.map +1 -1
- package/resources/sso-me.d.mts.map +1 -1
- package/resources/sso-me.d.ts.map +1 -1
- package/resources/sso-me.mjs.map +1 -1
- package/resources/supergroups/exclusion-members.d.mts.map +1 -1
- package/resources/supergroups/exclusion-members.d.ts.map +1 -1
- package/resources/supergroups/exclusion-members.mjs.map +1 -1
- package/resources/supergroups/inclusion-members.d.mts.map +1 -1
- package/resources/supergroups/inclusion-members.d.ts.map +1 -1
- package/resources/supergroups/inclusion-members.mjs.map +1 -1
- package/resources/supergroups/index.d.mts.map +1 -1
- package/resources/supergroups/index.d.ts.map +1 -1
- package/resources/supergroups/index.mjs.map +1 -1
- package/resources/supergroups/members.d.mts.map +1 -1
- package/resources/supergroups/members.d.ts.map +1 -1
- package/resources/supergroups/members.mjs.map +1 -1
- package/resources/supergroups/supergroups.d.mts.map +1 -1
- package/resources/supergroups/supergroups.d.ts.map +1 -1
- package/resources/supergroups/supergroups.mjs.map +1 -1
- package/resources/supergroups.d.mts.map +1 -1
- package/resources/supergroups.d.ts.map +1 -1
- package/resources/supergroups.mjs.map +1 -1
- package/resources/teams.d.mts.map +1 -1
- package/resources/teams.d.ts.map +1 -1
- package/resources/teams.mjs.map +1 -1
- package/resources/time-cards.d.mts.map +1 -1
- package/resources/time-cards.d.ts.map +1 -1
- package/resources/time-cards.mjs.map +1 -1
- package/resources/time-entries.d.mts.map +1 -1
- package/resources/time-entries.d.ts.map +1 -1
- package/resources/time-entries.mjs.map +1 -1
- package/resources/titles.d.mts.map +1 -1
- package/resources/titles.d.ts.map +1 -1
- package/resources/titles.mjs.map +1 -1
- package/resources/tracks.d.mts.map +1 -1
- package/resources/tracks.d.ts.map +1 -1
- package/resources/tracks.mjs.map +1 -1
- package/resources/unassigned-shifts.d.mts.map +1 -1
- package/resources/unassigned-shifts.d.ts.map +1 -1
- package/resources/unassigned-shifts.mjs.map +1 -1
- package/resources/unassignedshifts.d.mts.map +1 -1
- package/resources/unassignedshifts.d.ts.map +1 -1
- package/resources/unassignedshifts.mjs.map +1 -1
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts.map +1 -1
- package/resources/users.mjs.map +1 -1
- package/resources/work-locations.d.mts.map +1 -1
- package/resources/work-locations.d.ts.map +1 -1
- package/resources/work-locations.mjs.map +1 -1
- package/resources/workers.d.mts +1 -1
- package/resources/workers.d.mts.map +1 -1
- package/resources/workers.d.ts +1 -1
- package/resources/workers.d.ts.map +1 -1
- package/resources/workers.js +1 -1
- package/resources/workers.mjs +1 -1
- package/resources/workers.mjs.map +1 -1
- package/resources/workflow-action-executions.d.mts.map +1 -1
- package/resources/workflow-action-executions.d.ts.map +1 -1
- package/resources/workflow-action-executions.mjs.map +1 -1
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/lib/manifest/_existing-component-fields.ts +9 -0
- package/src/lib/manifest/app.ts +6 -6
- package/src/lib/manifest/category.ts +2 -4
- package/src/lib/manifest/custom-object.ts +6 -6
- package/src/lib/manifest/existing-manifest-context.ts +6 -4
- package/src/lib/manifest/field.ts +10 -6
- package/src/lib/manifest/list-view.ts +6 -5
- package/src/lib/manifest/manifest-builder.ts +5 -7
- package/src/lib/manifest/manifest-function.ts +8 -9
- package/src/lib/manifest/rule.ts +6 -6
- package/src/lib/manifest/sdui-page.ts +5 -7
- package/src/lib/manifest.ts +1 -0
- package/src/lib/sdui.ts +2 -0
- package/src/resources/workers.ts +1 -1
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/examples/sdui/sdui-crud-todo/sdui-crud-todo.ts +0 -282
- package/examples/sdui/sdui-showcase/sdui-showcase.ts +0 -346
- package/examples/sdui/sdui-tab-multi-view/sdui-tab-multi-view.ts +0 -914
- package/examples/sdui/vote/vote.ts +0 -294
|
@@ -1,914 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* **Bark & Train — Field HQ** (demo): roster, schedule, today's snapshot, trainer reference.
|
|
3
|
-
* Tabs: Home, Dogs, Schedule, Today, Resources — mock data only.
|
|
4
|
-
*
|
|
5
|
-
* Run:
|
|
6
|
-
* npx ts-node --transpile-only -r tsconfig-paths/register examples/sdui/sdui-tab-multi-view/sdui-tab-multi-view.ts
|
|
7
|
-
*
|
|
8
|
-
* Pair: rippling-function.ts uses `@rippling/sdui-builder` for paste-into-Function-editor preview.
|
|
9
|
-
*/
|
|
10
|
-
import SDUI from '../../../src/lib/sdui';
|
|
11
|
-
|
|
12
|
-
const MOCK_DOGS = [
|
|
13
|
-
{
|
|
14
|
-
id: 'dog_1',
|
|
15
|
-
_key: 'dog_1',
|
|
16
|
-
dog_name__c: 'Rex',
|
|
17
|
-
breed__c: 'Labrador',
|
|
18
|
-
age__c: 3,
|
|
19
|
-
total_training_time__c: 120,
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
id: 'dog_2',
|
|
23
|
-
_key: 'dog_2',
|
|
24
|
-
dog_name__c: 'Luna',
|
|
25
|
-
breed__c: 'Border Collie',
|
|
26
|
-
age__c: 5,
|
|
27
|
-
total_training_time__c: 340,
|
|
28
|
-
},
|
|
29
|
-
];
|
|
30
|
-
|
|
31
|
-
const MOCK_SESSIONS = [
|
|
32
|
-
{
|
|
33
|
-
id: 'sess_1',
|
|
34
|
-
_key: 'sess_1',
|
|
35
|
-
dog_id__c: 'dog_1',
|
|
36
|
-
session_date__c: '2026-04-01',
|
|
37
|
-
duration__c: 45,
|
|
38
|
-
training_type__c: 'Obedience',
|
|
39
|
-
notes__c: 'Recall work',
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
id: 'sess_2',
|
|
43
|
-
_key: 'sess_2',
|
|
44
|
-
dog_id__c: 'dog_2',
|
|
45
|
-
session_date__c: '2026-04-02',
|
|
46
|
-
duration__c: 60,
|
|
47
|
-
training_type__c: 'Agility',
|
|
48
|
-
notes__c: 'Weaves',
|
|
49
|
-
},
|
|
50
|
-
];
|
|
51
|
-
|
|
52
|
-
const SESSION_TOTAL_MIN = MOCK_SESSIONS.reduce((a, row) => a + Number(row.duration__c || 0), 0);
|
|
53
|
-
|
|
54
|
-
const PCT_TIME_OBEDIENCE = 43;
|
|
55
|
-
const PCT_TIME_AGILITY = 57;
|
|
56
|
-
|
|
57
|
-
const SESSION_TIME_SEGMENTS = [
|
|
58
|
-
{ value: PCT_TIME_OBEDIENCE, segmentColor: '#7C3AED' },
|
|
59
|
-
{ value: PCT_TIME_AGILITY, segmentColor: '#F97316' },
|
|
60
|
-
];
|
|
61
|
-
|
|
62
|
-
function renderSpec(functionId: string) {
|
|
63
|
-
const s = SDUI.createState({
|
|
64
|
-
dogs: MOCK_DOGS,
|
|
65
|
-
sessions: MOCK_SESSIONS,
|
|
66
|
-
stats: {
|
|
67
|
-
dogCount: MOCK_DOGS.length,
|
|
68
|
-
sessionCount: MOCK_SESSIONS.length,
|
|
69
|
-
totalMinutes: SESSION_TOTAL_MIN,
|
|
70
|
-
},
|
|
71
|
-
selectedDog: null as unknown,
|
|
72
|
-
selectedSession: null as unknown,
|
|
73
|
-
showCreateDogModal: false,
|
|
74
|
-
showEditDogModal: false,
|
|
75
|
-
showCreateSessionModal: false,
|
|
76
|
-
showEditSessionModal: false,
|
|
77
|
-
dogForm: { dog_name: '', breed: '', age: '' },
|
|
78
|
-
sessionForm: {
|
|
79
|
-
dog_id: '',
|
|
80
|
-
session_date: '',
|
|
81
|
-
duration: '',
|
|
82
|
-
training_type: '',
|
|
83
|
-
notes: '',
|
|
84
|
-
},
|
|
85
|
-
activeTab: 'overview',
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
// ============================================================
|
|
89
|
-
// HOME — redesigned: dashboard layout with hero stats on left,
|
|
90
|
-
// chart + recent activity stacked on right. Single content
|
|
91
|
-
// band, no purple hero background. Cleaner and more useful.
|
|
92
|
-
// ============================================================
|
|
93
|
-
const overviewPanel = SDUI.components.Layout({
|
|
94
|
-
width: '100%',
|
|
95
|
-
maxWidth: '1200px',
|
|
96
|
-
margin: { left: 'auto', right: 'auto' },
|
|
97
|
-
padding: { top: 40, bottom: 56, left: 28, right: 28 },
|
|
98
|
-
children: [
|
|
99
|
-
SDUI.components.VStack({
|
|
100
|
-
gap: 'space600',
|
|
101
|
-
align: 'stretch',
|
|
102
|
-
children: [
|
|
103
|
-
SDUI.components.VStack({
|
|
104
|
-
gap: 'space200',
|
|
105
|
-
align: 'flex-start',
|
|
106
|
-
children: [
|
|
107
|
-
SDUI.components.Text({
|
|
108
|
-
typestyle: 'bodyMdEmphasis',
|
|
109
|
-
color: 'secondary',
|
|
110
|
-
text: 'BARK & TRAIN · FIELD HQ',
|
|
111
|
-
}),
|
|
112
|
-
SDUI.components.Heading({
|
|
113
|
-
level: 1,
|
|
114
|
-
text: 'Good morning, trainer 👋',
|
|
115
|
-
}),
|
|
116
|
-
SDUI.components.Text({
|
|
117
|
-
typestyle: 'bodyLg',
|
|
118
|
-
color: 'secondary',
|
|
119
|
-
text: 'Here is what is happening across your roster and schedule.',
|
|
120
|
-
}),
|
|
121
|
-
],
|
|
122
|
-
}),
|
|
123
|
-
SDUI.components.HStack({
|
|
124
|
-
gap: 'space400',
|
|
125
|
-
wrap: 'nowrap',
|
|
126
|
-
align: 'stretch',
|
|
127
|
-
justify: 'space-between',
|
|
128
|
-
children: [
|
|
129
|
-
SDUI.components.Layout({
|
|
130
|
-
width: '32%',
|
|
131
|
-
minWidth: '260px',
|
|
132
|
-
children: [
|
|
133
|
-
SDUI.components.Card({
|
|
134
|
-
children: [
|
|
135
|
-
SDUI.components.Layout({
|
|
136
|
-
padding: { top: 24, bottom: 24, left: 24, right: 24 },
|
|
137
|
-
backgroundColor: '#EEF2FF',
|
|
138
|
-
radius: 12,
|
|
139
|
-
children: [
|
|
140
|
-
SDUI.components.VStack({
|
|
141
|
-
gap: 'space300',
|
|
142
|
-
align: 'flex-start',
|
|
143
|
-
children: [
|
|
144
|
-
SDUI.components.Text({
|
|
145
|
-
text: 'DOGS ON ROSTER',
|
|
146
|
-
typestyle: 'bodyXsEmphasis',
|
|
147
|
-
color: '#4F46E5',
|
|
148
|
-
}),
|
|
149
|
-
SDUI.components.Heading({
|
|
150
|
-
level: 1,
|
|
151
|
-
text: SDUI.template`${s.stats.dogCount}`,
|
|
152
|
-
}),
|
|
153
|
-
SDUI.components.Text({
|
|
154
|
-
text: 'Active clients',
|
|
155
|
-
color: 'secondary',
|
|
156
|
-
typestyle: 'bodySm',
|
|
157
|
-
}),
|
|
158
|
-
],
|
|
159
|
-
}),
|
|
160
|
-
],
|
|
161
|
-
}),
|
|
162
|
-
],
|
|
163
|
-
}),
|
|
164
|
-
],
|
|
165
|
-
}),
|
|
166
|
-
SDUI.components.Layout({
|
|
167
|
-
width: '32%',
|
|
168
|
-
minWidth: '260px',
|
|
169
|
-
children: [
|
|
170
|
-
SDUI.components.Card({
|
|
171
|
-
children: [
|
|
172
|
-
SDUI.components.Layout({
|
|
173
|
-
padding: { top: 24, bottom: 24, left: 24, right: 24 },
|
|
174
|
-
backgroundColor: '#ECFDF5',
|
|
175
|
-
radius: 12,
|
|
176
|
-
children: [
|
|
177
|
-
SDUI.components.VStack({
|
|
178
|
-
gap: 'space300',
|
|
179
|
-
align: 'flex-start',
|
|
180
|
-
children: [
|
|
181
|
-
SDUI.components.Text({
|
|
182
|
-
text: 'SESSIONS BOOKED',
|
|
183
|
-
typestyle: 'bodyXsEmphasis',
|
|
184
|
-
color: '#059669',
|
|
185
|
-
}),
|
|
186
|
-
SDUI.components.Heading({
|
|
187
|
-
level: 1,
|
|
188
|
-
text: SDUI.template`${s.stats.sessionCount}`,
|
|
189
|
-
}),
|
|
190
|
-
SDUI.components.Text({
|
|
191
|
-
text: 'On the calendar',
|
|
192
|
-
color: 'secondary',
|
|
193
|
-
typestyle: 'bodySm',
|
|
194
|
-
}),
|
|
195
|
-
],
|
|
196
|
-
}),
|
|
197
|
-
],
|
|
198
|
-
}),
|
|
199
|
-
],
|
|
200
|
-
}),
|
|
201
|
-
],
|
|
202
|
-
}),
|
|
203
|
-
SDUI.components.Layout({
|
|
204
|
-
width: '32%',
|
|
205
|
-
minWidth: '260px',
|
|
206
|
-
children: [
|
|
207
|
-
SDUI.components.Card({
|
|
208
|
-
children: [
|
|
209
|
-
SDUI.components.Layout({
|
|
210
|
-
padding: { top: 24, bottom: 24, left: 24, right: 24 },
|
|
211
|
-
backgroundColor: '#FFF7ED',
|
|
212
|
-
radius: 12,
|
|
213
|
-
children: [
|
|
214
|
-
SDUI.components.VStack({
|
|
215
|
-
gap: 'space300',
|
|
216
|
-
align: 'flex-start',
|
|
217
|
-
children: [
|
|
218
|
-
SDUI.components.Text({
|
|
219
|
-
text: 'PRACTICE MINUTES',
|
|
220
|
-
typestyle: 'bodyXsEmphasis',
|
|
221
|
-
color: '#EA580C',
|
|
222
|
-
}),
|
|
223
|
-
SDUI.components.Heading({
|
|
224
|
-
level: 1,
|
|
225
|
-
text: SDUI.template`${s.stats.totalMinutes}`,
|
|
226
|
-
}),
|
|
227
|
-
SDUI.components.Text({
|
|
228
|
-
text: 'Ring & field time',
|
|
229
|
-
color: 'secondary',
|
|
230
|
-
typestyle: 'bodySm',
|
|
231
|
-
}),
|
|
232
|
-
],
|
|
233
|
-
}),
|
|
234
|
-
],
|
|
235
|
-
}),
|
|
236
|
-
],
|
|
237
|
-
}),
|
|
238
|
-
],
|
|
239
|
-
}),
|
|
240
|
-
],
|
|
241
|
-
}),
|
|
242
|
-
// Chart + Quick actions row — 66% / 32%
|
|
243
|
-
SDUI.components.HStack({
|
|
244
|
-
gap: 'space400',
|
|
245
|
-
wrap: 'wrap',
|
|
246
|
-
align: 'stretch',
|
|
247
|
-
justify: 'space-between',
|
|
248
|
-
children: [
|
|
249
|
-
SDUI.components.Layout({
|
|
250
|
-
width: '66%',
|
|
251
|
-
minWidth: '420px',
|
|
252
|
-
children: [
|
|
253
|
-
SDUI.components.Card({
|
|
254
|
-
title: 'Where practice time goes',
|
|
255
|
-
children: [
|
|
256
|
-
SDUI.components.VStack({
|
|
257
|
-
gap: 'space400',
|
|
258
|
-
align: 'stretch',
|
|
259
|
-
children: [
|
|
260
|
-
SDUI.components.Text({
|
|
261
|
-
typestyle: 'bodyMd',
|
|
262
|
-
color: 'secondary',
|
|
263
|
-
text: 'Split across lesson types from your scheduled sessions.',
|
|
264
|
-
}),
|
|
265
|
-
// DistributionBar with no wrapping Layout — direct child of VStack
|
|
266
|
-
SDUI.components.DistributionBar({
|
|
267
|
-
segments: SESSION_TIME_SEGMENTS,
|
|
268
|
-
totalValue: 100,
|
|
269
|
-
size: 'standard',
|
|
270
|
-
}),
|
|
271
|
-
SDUI.components.HStack({
|
|
272
|
-
gap: 'space300',
|
|
273
|
-
wrap: 'wrap',
|
|
274
|
-
justify: 'flex-start',
|
|
275
|
-
children: [
|
|
276
|
-
SDUI.components.Badge({
|
|
277
|
-
text: SDUI.template`Obedience · ${PCT_TIME_OBEDIENCE}%`,
|
|
278
|
-
appearance: 'PRIMARY_LIGHT',
|
|
279
|
-
}),
|
|
280
|
-
SDUI.components.Badge({
|
|
281
|
-
text: SDUI.template`Agility · ${PCT_TIME_AGILITY}%`,
|
|
282
|
-
appearance: 'WARNING_LIGHT',
|
|
283
|
-
}),
|
|
284
|
-
],
|
|
285
|
-
}),
|
|
286
|
-
SDUI.components.Divider({}),
|
|
287
|
-
SDUI.components.HStack({
|
|
288
|
-
justify: 'space-between',
|
|
289
|
-
align: 'center',
|
|
290
|
-
children: [
|
|
291
|
-
SDUI.components.Text({
|
|
292
|
-
typestyle: 'bodySm',
|
|
293
|
-
color: 'secondary',
|
|
294
|
-
text: 'Want to dig in?',
|
|
295
|
-
}),
|
|
296
|
-
SDUI.components.Button({
|
|
297
|
-
label: 'Open Schedule',
|
|
298
|
-
appearance: 'OUTLINE',
|
|
299
|
-
size: 'S',
|
|
300
|
-
onPress: SDUI.actions.set(s.activeTab, 'sessions'),
|
|
301
|
-
}),
|
|
302
|
-
],
|
|
303
|
-
}),
|
|
304
|
-
],
|
|
305
|
-
}),
|
|
306
|
-
],
|
|
307
|
-
}),
|
|
308
|
-
],
|
|
309
|
-
}),
|
|
310
|
-
SDUI.components.Layout({
|
|
311
|
-
width: '32%',
|
|
312
|
-
minWidth: '280px',
|
|
313
|
-
children: [
|
|
314
|
-
SDUI.components.Card({
|
|
315
|
-
title: 'Quick actions',
|
|
316
|
-
children: [
|
|
317
|
-
SDUI.components.VStack({
|
|
318
|
-
gap: 'space300',
|
|
319
|
-
align: 'stretch',
|
|
320
|
-
children: [
|
|
321
|
-
SDUI.components.Button({
|
|
322
|
-
label: 'Add new dog',
|
|
323
|
-
appearance: 'PRIMARY',
|
|
324
|
-
size: 'M',
|
|
325
|
-
isFluid: true,
|
|
326
|
-
onPress: [
|
|
327
|
-
SDUI.actions.set(s.dogForm, { dog_name: '', breed: '', age: '' }),
|
|
328
|
-
SDUI.actions.set(s.showCreateDogModal, true),
|
|
329
|
-
],
|
|
330
|
-
}),
|
|
331
|
-
SDUI.components.Button({
|
|
332
|
-
label: 'Schedule a session',
|
|
333
|
-
appearance: 'OUTLINE',
|
|
334
|
-
size: 'M',
|
|
335
|
-
isFluid: true,
|
|
336
|
-
onPress: [
|
|
337
|
-
SDUI.actions.set(s.sessionForm, {
|
|
338
|
-
dog_id: '',
|
|
339
|
-
session_date: '',
|
|
340
|
-
duration: '',
|
|
341
|
-
training_type: '',
|
|
342
|
-
notes: '',
|
|
343
|
-
}),
|
|
344
|
-
SDUI.actions.set(s.showCreateSessionModal, true),
|
|
345
|
-
],
|
|
346
|
-
}),
|
|
347
|
-
SDUI.components.Divider({}),
|
|
348
|
-
// Use Link components instead of Button GHOST — they
|
|
349
|
-
// naturally left-align as text and look cleaner here.
|
|
350
|
-
SDUI.components.Text({
|
|
351
|
-
typestyle: 'bodyXsEmphasis',
|
|
352
|
-
color: 'secondary',
|
|
353
|
-
text: 'JUMP TO',
|
|
354
|
-
}),
|
|
355
|
-
SDUI.components.Link({
|
|
356
|
-
text: '→ View all dogs',
|
|
357
|
-
href: '#',
|
|
358
|
-
onPress: SDUI.actions.set(s.activeTab, 'dogs'),
|
|
359
|
-
}),
|
|
360
|
-
SDUI.components.Link({
|
|
361
|
-
text: '→ View today',
|
|
362
|
-
href: '#',
|
|
363
|
-
onPress: SDUI.actions.set(s.activeTab, 'today'),
|
|
364
|
-
}),
|
|
365
|
-
],
|
|
366
|
-
}),
|
|
367
|
-
],
|
|
368
|
-
}),
|
|
369
|
-
],
|
|
370
|
-
}),
|
|
371
|
-
],
|
|
372
|
-
}),
|
|
373
|
-
],
|
|
374
|
-
}),
|
|
375
|
-
],
|
|
376
|
-
});
|
|
377
|
-
const dogsGrid = SDUI.components.Grid({
|
|
378
|
-
data: s.dogs,
|
|
379
|
-
height: 520,
|
|
380
|
-
columns: [
|
|
381
|
-
{ id: 'dog_name__c', header: 'Name', data: 'dog_name__c', width: 220 },
|
|
382
|
-
{ id: 'breed__c', header: 'Breed', data: 'breed__c', width: 280 },
|
|
383
|
-
{ id: 'age__c', header: 'Age', data: 'age__c', width: 100 },
|
|
384
|
-
{ id: 'total_training_time__c', header: 'Training time', data: 'total_training_time__c', width: 160 },
|
|
385
|
-
],
|
|
386
|
-
selectedRow: s.selectedDog.$bind,
|
|
387
|
-
headerActions: [{ id: 'new_dog', label: 'Add Dog', icon: 'ADD', appearance: 'primary' }],
|
|
388
|
-
onHeaderAction: [
|
|
389
|
-
SDUI.actions.set(s.dogForm, { dog_name: '', breed: '', age: '' }),
|
|
390
|
-
SDUI.actions.set(s.showCreateDogModal, true),
|
|
391
|
-
],
|
|
392
|
-
rowActions: [
|
|
393
|
-
{ id: 'edit_dog', label: 'Edit', icon: 'EDIT_OUTLINE', placement: 'menu' },
|
|
394
|
-
{ id: 'delete_dog', label: 'Delete', icon: 'TRASH_OUTLINE', placement: 'menu' },
|
|
395
|
-
],
|
|
396
|
-
onRowAction: [
|
|
397
|
-
SDUI.actions.set(s.dogForm, {
|
|
398
|
-
dog_name: s.selectedDog['dog_name__c'],
|
|
399
|
-
breed: s.selectedDog['breed__c'],
|
|
400
|
-
age: s.selectedDog['age__c'],
|
|
401
|
-
}),
|
|
402
|
-
SDUI.actions.set(s.showEditDogModal, true),
|
|
403
|
-
],
|
|
404
|
-
});
|
|
405
|
-
|
|
406
|
-
const sessionsGrid = SDUI.components.Grid({
|
|
407
|
-
data: s.sessions,
|
|
408
|
-
height: 520,
|
|
409
|
-
columns: [
|
|
410
|
-
{ id: 'session_date__c', header: 'Date', data: 'session_date__c', width: 160 },
|
|
411
|
-
{ id: 'duration__c', header: 'Duration (min)', data: 'duration__c', width: 140 },
|
|
412
|
-
{ id: 'training_type__c', header: 'Type', data: 'training_type__c', type: 'text', width: 180 },
|
|
413
|
-
{ id: 'notes__c', header: 'Notes', data: 'notes__c', width: 320 },
|
|
414
|
-
],
|
|
415
|
-
selectedRow: s.selectedSession.$bind,
|
|
416
|
-
headerActions: [{ id: 'new_session', label: 'Add Session', icon: 'ADD', appearance: 'primary' }],
|
|
417
|
-
onHeaderAction: [
|
|
418
|
-
SDUI.actions.set(s.sessionForm, {
|
|
419
|
-
dog_id: '',
|
|
420
|
-
session_date: '',
|
|
421
|
-
duration: '',
|
|
422
|
-
training_type: '',
|
|
423
|
-
notes: '',
|
|
424
|
-
}),
|
|
425
|
-
SDUI.actions.set(s.showCreateSessionModal, true),
|
|
426
|
-
],
|
|
427
|
-
rowActions: [
|
|
428
|
-
{ id: 'edit_session', label: 'Edit', icon: 'EDIT_OUTLINE', placement: 'menu' },
|
|
429
|
-
{ id: 'delete_session', label: 'Delete', icon: 'TRASH_OUTLINE', placement: 'menu' },
|
|
430
|
-
],
|
|
431
|
-
onRowAction: [
|
|
432
|
-
SDUI.actions.set(s.sessionForm, {
|
|
433
|
-
dog_id: s.selectedSession['dog_id__c'],
|
|
434
|
-
session_date: s.selectedSession['session_date__c'],
|
|
435
|
-
duration: s.selectedSession['duration__c'],
|
|
436
|
-
training_type: s.selectedSession['training_type__c'],
|
|
437
|
-
notes: s.selectedSession['notes__c'],
|
|
438
|
-
}),
|
|
439
|
-
SDUI.actions.set(s.showEditSessionModal, true),
|
|
440
|
-
],
|
|
441
|
-
});
|
|
442
|
-
|
|
443
|
-
const dogsPanel = SDUI.components.Layout({
|
|
444
|
-
width: '100%',
|
|
445
|
-
maxWidth: '1200px',
|
|
446
|
-
margin: { left: 'auto', right: 'auto' },
|
|
447
|
-
padding: { top: 32, bottom: 48, left: 28, right: 28 },
|
|
448
|
-
children: [
|
|
449
|
-
SDUI.components.VStack({
|
|
450
|
-
gap: 'space500',
|
|
451
|
-
align: 'stretch',
|
|
452
|
-
children: [
|
|
453
|
-
SDUI.components.VStack({
|
|
454
|
-
gap: 'space200',
|
|
455
|
-
children: [
|
|
456
|
-
SDUI.components.Heading({
|
|
457
|
-
level: 1,
|
|
458
|
-
text: 'Your dogs',
|
|
459
|
-
}),
|
|
460
|
-
SDUI.components.Text({
|
|
461
|
-
typestyle: 'bodyLg',
|
|
462
|
-
color: 'secondary',
|
|
463
|
-
text: 'Add Dog or use ⋯ on a row to edit or delete.',
|
|
464
|
-
}),
|
|
465
|
-
],
|
|
466
|
-
}),
|
|
467
|
-
dogsGrid,
|
|
468
|
-
],
|
|
469
|
-
}),
|
|
470
|
-
],
|
|
471
|
-
});
|
|
472
|
-
|
|
473
|
-
const sessionsPanel = SDUI.components.Layout({
|
|
474
|
-
width: '100%',
|
|
475
|
-
maxWidth: '1200px',
|
|
476
|
-
margin: { left: 'auto', right: 'auto' },
|
|
477
|
-
padding: { top: 32, bottom: 48, left: 28, right: 28 },
|
|
478
|
-
children: [
|
|
479
|
-
SDUI.components.VStack({
|
|
480
|
-
gap: 'space500',
|
|
481
|
-
align: 'stretch',
|
|
482
|
-
children: [
|
|
483
|
-
SDUI.components.VStack({
|
|
484
|
-
gap: 'space200',
|
|
485
|
-
children: [
|
|
486
|
-
SDUI.components.Heading({
|
|
487
|
-
level: 1,
|
|
488
|
-
text: 'Session schedule',
|
|
489
|
-
}),
|
|
490
|
-
SDUI.components.Text({
|
|
491
|
-
typestyle: 'bodyLg',
|
|
492
|
-
color: 'secondary',
|
|
493
|
-
text: 'Add Session or use ⋯ on a row. Dog ID must match a roster id (e.g. dog_1).',
|
|
494
|
-
}),
|
|
495
|
-
],
|
|
496
|
-
}),
|
|
497
|
-
sessionsGrid,
|
|
498
|
-
],
|
|
499
|
-
}),
|
|
500
|
-
],
|
|
501
|
-
});
|
|
502
|
-
|
|
503
|
-
const todayPanel = SDUI.components.Layout({
|
|
504
|
-
width: '100%',
|
|
505
|
-
maxWidth: '1200px',
|
|
506
|
-
margin: { left: 'auto', right: 'auto' },
|
|
507
|
-
padding: { top: 32, bottom: 48, left: 28, right: 28 },
|
|
508
|
-
children: [
|
|
509
|
-
SDUI.components.VStack({
|
|
510
|
-
gap: 'space600',
|
|
511
|
-
align: 'stretch',
|
|
512
|
-
children: [
|
|
513
|
-
SDUI.components.VStack({
|
|
514
|
-
gap: 'space200',
|
|
515
|
-
children: [
|
|
516
|
-
SDUI.components.Heading({
|
|
517
|
-
level: 1,
|
|
518
|
-
text: 'Today & coming up',
|
|
519
|
-
}),
|
|
520
|
-
SDUI.components.Text({
|
|
521
|
-
typestyle: 'bodyLg',
|
|
522
|
-
color: 'secondary',
|
|
523
|
-
text: 'Snapshot of upcoming lessons — production would filter by “today” from your sessions.',
|
|
524
|
-
}),
|
|
525
|
-
],
|
|
526
|
-
}),
|
|
527
|
-
SDUI.components.TableBasic({
|
|
528
|
-
title: 'Who’s on deck',
|
|
529
|
-
width: 1100,
|
|
530
|
-
columns: [
|
|
531
|
-
{ header: 'When', key: 'when', width: '22%' },
|
|
532
|
-
{ header: 'Dog', key: 'dog', width: '22%' },
|
|
533
|
-
{ header: 'Type', key: 'type', width: '18%' },
|
|
534
|
-
{ header: 'Focus', key: 'focus', width: '38%' },
|
|
535
|
-
],
|
|
536
|
-
rows: [
|
|
537
|
-
{ when: 'Apr 1 · AM', dog: 'Rex', type: 'Obedience', focus: 'Recall · ring A' },
|
|
538
|
-
{ when: 'Apr 2 · PM', dog: 'Luna', type: 'Agility', focus: 'Weaves & contacts' },
|
|
539
|
-
],
|
|
540
|
-
}),
|
|
541
|
-
SDUI.components.ActionCard({
|
|
542
|
-
title: 'Need to change something?',
|
|
543
|
-
caption: 'Full calendar editing lives on Schedule; roster edits live under Dogs.',
|
|
544
|
-
icon: 'CALENDAR',
|
|
545
|
-
alignment: 'CENTER',
|
|
546
|
-
primaryActionTitle: 'Open Schedule',
|
|
547
|
-
onPressPrimary: SDUI.actions.set(s.activeTab, 'sessions'),
|
|
548
|
-
secondaryActionTitle: 'Open Dogs',
|
|
549
|
-
onPressSecondary: SDUI.actions.set(s.activeTab, 'dogs'),
|
|
550
|
-
}),
|
|
551
|
-
],
|
|
552
|
-
}),
|
|
553
|
-
],
|
|
554
|
-
});
|
|
555
|
-
|
|
556
|
-
const resourcesPanel = SDUI.components.Layout({
|
|
557
|
-
width: '100%',
|
|
558
|
-
maxWidth: '1200px',
|
|
559
|
-
margin: { left: 'auto', right: 'auto' },
|
|
560
|
-
padding: { top: 32, bottom: 48, left: 28, right: 28 },
|
|
561
|
-
children: [
|
|
562
|
-
SDUI.components.VStack({
|
|
563
|
-
gap: 'space600',
|
|
564
|
-
align: 'stretch',
|
|
565
|
-
children: [
|
|
566
|
-
SDUI.components.VStack({
|
|
567
|
-
gap: 'space200',
|
|
568
|
-
children: [
|
|
569
|
-
SDUI.components.Heading({
|
|
570
|
-
level: 1,
|
|
571
|
-
text: 'Resources & safety',
|
|
572
|
-
}),
|
|
573
|
-
SDUI.components.Text({
|
|
574
|
-
typestyle: 'bodyLg',
|
|
575
|
-
color: 'secondary',
|
|
576
|
-
text: 'Replace these with real PDFs and links — structure stays the same for handlers.',
|
|
577
|
-
}),
|
|
578
|
-
],
|
|
579
|
-
}),
|
|
580
|
-
SDUI.components.Tip({
|
|
581
|
-
title: 'Reactive dogs at the gate',
|
|
582
|
-
content:
|
|
583
|
-
'Stagger arrivals so reactive pups aren’t face-to-face in the lobby; post your muzzle policy here.',
|
|
584
|
-
}),
|
|
585
|
-
SDUI.components.Tip({
|
|
586
|
-
title: 'Emergency vet & after hours',
|
|
587
|
-
content:
|
|
588
|
-
'Pin clinic phone, poison control, and directions — trainers shouldn’t hunt for them mid-class.',
|
|
589
|
-
}),
|
|
590
|
-
SDUI.components.Card({
|
|
591
|
-
title: 'Files you’ll attach later',
|
|
592
|
-
children: [
|
|
593
|
-
SDUI.components.VStack({
|
|
594
|
-
gap: 'space400',
|
|
595
|
-
align: 'stretch',
|
|
596
|
-
children: [
|
|
597
|
-
SDUI.components.Text({
|
|
598
|
-
typestyle: 'bodyLg',
|
|
599
|
-
color: 'secondary',
|
|
600
|
-
text: 'Typical uploads: liability waiver, vaccine proof, venue rules, incident report template.',
|
|
601
|
-
}),
|
|
602
|
-
SDUI.components.HStack({
|
|
603
|
-
gap: 'space300',
|
|
604
|
-
wrap: 'wrap',
|
|
605
|
-
children: [
|
|
606
|
-
SDUI.components.Badge({ text: 'Waivers', appearance: 'PRIMARY_LIGHT' }),
|
|
607
|
-
SDUI.components.Badge({ text: 'Vaccination records', appearance: 'SUCCESS_LIGHT' }),
|
|
608
|
-
SDUI.components.Badge({ text: 'Venue map', appearance: 'WARNING_LIGHT' }),
|
|
609
|
-
SDUI.components.Badge({ text: 'Incident log', appearance: 'INFO_LIGHT' }),
|
|
610
|
-
],
|
|
611
|
-
}),
|
|
612
|
-
],
|
|
613
|
-
}),
|
|
614
|
-
],
|
|
615
|
-
}),
|
|
616
|
-
],
|
|
617
|
-
}),
|
|
618
|
-
],
|
|
619
|
-
});
|
|
620
|
-
|
|
621
|
-
const root = SDUI.components.Layout({
|
|
622
|
-
width: '100%',
|
|
623
|
-
minHeight: 920,
|
|
624
|
-
children: [
|
|
625
|
-
SDUI.components.VStack({
|
|
626
|
-
align: 'stretch',
|
|
627
|
-
gap: 'space500',
|
|
628
|
-
children: [
|
|
629
|
-
SDUI.components.Tab({
|
|
630
|
-
value: s.activeTab.$bind,
|
|
631
|
-
items: [
|
|
632
|
-
{ label: 'Home', value: 'overview' },
|
|
633
|
-
{ label: 'Dogs', value: 'dogs' },
|
|
634
|
-
{ label: 'Schedule', value: 'sessions' },
|
|
635
|
-
{ label: 'Today', value: 'today' },
|
|
636
|
-
{ label: 'Resources', value: 'resources' },
|
|
637
|
-
],
|
|
638
|
-
}),
|
|
639
|
-
SDUI.visible(SDUI.conditions.eq(s.activeTab, 'overview'), overviewPanel),
|
|
640
|
-
SDUI.visible(SDUI.conditions.eq(s.activeTab, 'dogs'), dogsPanel),
|
|
641
|
-
SDUI.visible(SDUI.conditions.eq(s.activeTab, 'sessions'), sessionsPanel),
|
|
642
|
-
SDUI.visible(SDUI.conditions.eq(s.activeTab, 'today'), todayPanel),
|
|
643
|
-
SDUI.visible(SDUI.conditions.eq(s.activeTab, 'resources'), resourcesPanel),
|
|
644
|
-
|
|
645
|
-
SDUI.components.Modal({
|
|
646
|
-
title: 'Add Dog',
|
|
647
|
-
isOpen: s.showCreateDogModal.$bind,
|
|
648
|
-
onClose: SDUI.actions.set(s.showCreateDogModal, false),
|
|
649
|
-
children: [
|
|
650
|
-
SDUI.components.VStack({
|
|
651
|
-
gap: 'space300',
|
|
652
|
-
children: [
|
|
653
|
-
SDUI.components.TextInput({
|
|
654
|
-
label: 'Dog Name',
|
|
655
|
-
name: 'dog_name',
|
|
656
|
-
value: s.dogForm.dog_name.$bind,
|
|
657
|
-
isRequired: true,
|
|
658
|
-
}),
|
|
659
|
-
SDUI.components.TextInput({
|
|
660
|
-
label: 'Breed',
|
|
661
|
-
name: 'breed',
|
|
662
|
-
value: s.dogForm.breed.$bind,
|
|
663
|
-
}),
|
|
664
|
-
SDUI.components.Number({
|
|
665
|
-
label: 'Age (years)',
|
|
666
|
-
name: 'age',
|
|
667
|
-
value: s.dogForm.age.$bind,
|
|
668
|
-
}),
|
|
669
|
-
],
|
|
670
|
-
}),
|
|
671
|
-
SDUI.components.HStack({
|
|
672
|
-
gap: 'space200',
|
|
673
|
-
justify: 'flex-end',
|
|
674
|
-
children: [
|
|
675
|
-
SDUI.components.Button({
|
|
676
|
-
label: 'Cancel',
|
|
677
|
-
appearance: 'OUTLINE',
|
|
678
|
-
onPress: SDUI.actions.set(s.showCreateDogModal, false),
|
|
679
|
-
}),
|
|
680
|
-
SDUI.components.Button({
|
|
681
|
-
label: 'Create',
|
|
682
|
-
appearance: 'PRIMARY',
|
|
683
|
-
onPress: SDUI.actions.callFunction(functionId, 'create_dog', {
|
|
684
|
-
dog_name: s.dogForm.dog_name,
|
|
685
|
-
breed: s.dogForm.breed,
|
|
686
|
-
age: s.dogForm.age,
|
|
687
|
-
responsePath: '/dogs',
|
|
688
|
-
onSuccess: { set: { '/showCreateDogModal': false } },
|
|
689
|
-
}),
|
|
690
|
-
}),
|
|
691
|
-
],
|
|
692
|
-
}),
|
|
693
|
-
],
|
|
694
|
-
}),
|
|
695
|
-
|
|
696
|
-
SDUI.components.Modal({
|
|
697
|
-
title: 'Edit Dog',
|
|
698
|
-
isOpen: s.showEditDogModal.$bind,
|
|
699
|
-
onClose: SDUI.actions.set(s.showEditDogModal, false),
|
|
700
|
-
children: [
|
|
701
|
-
SDUI.components.VStack({
|
|
702
|
-
gap: 'space300',
|
|
703
|
-
children: [
|
|
704
|
-
SDUI.components.TextInput({
|
|
705
|
-
label: 'Dog Name',
|
|
706
|
-
name: 'edit_dog_name',
|
|
707
|
-
value: s.dogForm.dog_name.$bind,
|
|
708
|
-
isRequired: true,
|
|
709
|
-
}),
|
|
710
|
-
SDUI.components.TextInput({
|
|
711
|
-
label: 'Breed',
|
|
712
|
-
name: 'edit_breed',
|
|
713
|
-
value: s.dogForm.breed.$bind,
|
|
714
|
-
}),
|
|
715
|
-
SDUI.components.Number({
|
|
716
|
-
label: 'Age (years)',
|
|
717
|
-
name: 'edit_age',
|
|
718
|
-
value: s.dogForm.age.$bind,
|
|
719
|
-
}),
|
|
720
|
-
],
|
|
721
|
-
}),
|
|
722
|
-
SDUI.components.HStack({
|
|
723
|
-
gap: 'space200',
|
|
724
|
-
justify: 'flex-end',
|
|
725
|
-
children: [
|
|
726
|
-
SDUI.components.Button({
|
|
727
|
-
label: 'Delete',
|
|
728
|
-
appearance: 'DESTRUCTIVE',
|
|
729
|
-
onPress: SDUI.actions.callFunction(functionId, 'delete_dog', {
|
|
730
|
-
id: s.selectedDog['id'],
|
|
731
|
-
responsePath: '/dogs',
|
|
732
|
-
onSuccess: { set: { '/showEditDogModal': false } },
|
|
733
|
-
}),
|
|
734
|
-
}),
|
|
735
|
-
SDUI.components.Button({
|
|
736
|
-
label: 'Cancel',
|
|
737
|
-
appearance: 'OUTLINE',
|
|
738
|
-
onPress: SDUI.actions.set(s.showEditDogModal, false),
|
|
739
|
-
}),
|
|
740
|
-
SDUI.components.Button({
|
|
741
|
-
label: 'Save',
|
|
742
|
-
appearance: 'PRIMARY',
|
|
743
|
-
onPress: SDUI.actions.callFunction(functionId, 'update_dog', {
|
|
744
|
-
id: s.selectedDog['id'],
|
|
745
|
-
dog_name: s.dogForm.dog_name,
|
|
746
|
-
breed: s.dogForm.breed,
|
|
747
|
-
age: s.dogForm.age,
|
|
748
|
-
responsePath: '/dogs',
|
|
749
|
-
onSuccess: { set: { '/showEditDogModal': false } },
|
|
750
|
-
}),
|
|
751
|
-
}),
|
|
752
|
-
],
|
|
753
|
-
}),
|
|
754
|
-
],
|
|
755
|
-
}),
|
|
756
|
-
|
|
757
|
-
SDUI.components.Modal({
|
|
758
|
-
title: 'Add Training Session',
|
|
759
|
-
isOpen: s.showCreateSessionModal.$bind,
|
|
760
|
-
onClose: SDUI.actions.set(s.showCreateSessionModal, false),
|
|
761
|
-
children: [
|
|
762
|
-
SDUI.components.VStack({
|
|
763
|
-
gap: 'space300',
|
|
764
|
-
children: [
|
|
765
|
-
SDUI.components.TextInput({
|
|
766
|
-
label: 'Dog ID',
|
|
767
|
-
name: 'dog_id',
|
|
768
|
-
value: s.sessionForm.dog_id.$bind,
|
|
769
|
-
isRequired: true,
|
|
770
|
-
}),
|
|
771
|
-
SDUI.components.TextInput({
|
|
772
|
-
label: 'Session Date',
|
|
773
|
-
name: 'session_date',
|
|
774
|
-
value: s.sessionForm.session_date.$bind,
|
|
775
|
-
isRequired: true,
|
|
776
|
-
}),
|
|
777
|
-
SDUI.components.Number({
|
|
778
|
-
label: 'Duration (min)',
|
|
779
|
-
name: 'duration',
|
|
780
|
-
value: s.sessionForm.duration.$bind,
|
|
781
|
-
}),
|
|
782
|
-
SDUI.components.Select({
|
|
783
|
-
label: 'Training Type',
|
|
784
|
-
name: 'training_type',
|
|
785
|
-
value: s.sessionForm.training_type.$bind,
|
|
786
|
-
options: [
|
|
787
|
-
{ label: 'Obedience', value: 'Obedience' },
|
|
788
|
-
{ label: 'Agility', value: 'Agility' },
|
|
789
|
-
{ label: 'Socialization', value: 'Socialization' },
|
|
790
|
-
{ label: 'Behavior', value: 'Behavior' },
|
|
791
|
-
],
|
|
792
|
-
}),
|
|
793
|
-
SDUI.components.Textarea({
|
|
794
|
-
label: 'Notes',
|
|
795
|
-
name: 'notes',
|
|
796
|
-
value: s.sessionForm.notes.$bind,
|
|
797
|
-
}),
|
|
798
|
-
],
|
|
799
|
-
}),
|
|
800
|
-
SDUI.components.HStack({
|
|
801
|
-
gap: 'space200',
|
|
802
|
-
justify: 'flex-end',
|
|
803
|
-
children: [
|
|
804
|
-
SDUI.components.Button({
|
|
805
|
-
label: 'Cancel',
|
|
806
|
-
appearance: 'OUTLINE',
|
|
807
|
-
onPress: SDUI.actions.set(s.showCreateSessionModal, false),
|
|
808
|
-
}),
|
|
809
|
-
SDUI.components.Button({
|
|
810
|
-
label: 'Create',
|
|
811
|
-
appearance: 'PRIMARY',
|
|
812
|
-
onPress: SDUI.actions.callFunction(functionId, 'create_session', {
|
|
813
|
-
dog_id: s.sessionForm.dog_id,
|
|
814
|
-
session_date: s.sessionForm.session_date,
|
|
815
|
-
duration: s.sessionForm.duration,
|
|
816
|
-
training_type: s.sessionForm.training_type,
|
|
817
|
-
notes: s.sessionForm.notes,
|
|
818
|
-
responsePath: '/sessions',
|
|
819
|
-
onSuccess: { set: { '/showCreateSessionModal': false } },
|
|
820
|
-
}),
|
|
821
|
-
}),
|
|
822
|
-
],
|
|
823
|
-
}),
|
|
824
|
-
],
|
|
825
|
-
}),
|
|
826
|
-
|
|
827
|
-
SDUI.components.Modal({
|
|
828
|
-
title: 'Edit Training Session',
|
|
829
|
-
isOpen: s.showEditSessionModal.$bind,
|
|
830
|
-
onClose: SDUI.actions.set(s.showEditSessionModal, false),
|
|
831
|
-
children: [
|
|
832
|
-
SDUI.components.VStack({
|
|
833
|
-
gap: 'space300',
|
|
834
|
-
children: [
|
|
835
|
-
SDUI.components.TextInput({
|
|
836
|
-
label: 'Dog ID',
|
|
837
|
-
name: 'edit_dog_id',
|
|
838
|
-
value: s.sessionForm.dog_id.$bind,
|
|
839
|
-
isRequired: true,
|
|
840
|
-
}),
|
|
841
|
-
SDUI.components.TextInput({
|
|
842
|
-
label: 'Session Date',
|
|
843
|
-
name: 'edit_session_date',
|
|
844
|
-
value: s.sessionForm.session_date.$bind,
|
|
845
|
-
isRequired: true,
|
|
846
|
-
}),
|
|
847
|
-
SDUI.components.Number({
|
|
848
|
-
label: 'Duration (min)',
|
|
849
|
-
name: 'edit_duration',
|
|
850
|
-
value: s.sessionForm.duration.$bind,
|
|
851
|
-
}),
|
|
852
|
-
SDUI.components.Select({
|
|
853
|
-
label: 'Training Type',
|
|
854
|
-
name: 'edit_training_type',
|
|
855
|
-
value: s.sessionForm.training_type.$bind,
|
|
856
|
-
options: [
|
|
857
|
-
{ label: 'Obedience', value: 'Obedience' },
|
|
858
|
-
{ label: 'Agility', value: 'Agility' },
|
|
859
|
-
{ label: 'Socialization', value: 'Socialization' },
|
|
860
|
-
{ label: 'Behavior', value: 'Behavior' },
|
|
861
|
-
],
|
|
862
|
-
}),
|
|
863
|
-
SDUI.components.Textarea({
|
|
864
|
-
label: 'Notes',
|
|
865
|
-
name: 'edit_notes',
|
|
866
|
-
value: s.sessionForm.notes.$bind,
|
|
867
|
-
}),
|
|
868
|
-
],
|
|
869
|
-
}),
|
|
870
|
-
SDUI.components.HStack({
|
|
871
|
-
gap: 'space200',
|
|
872
|
-
justify: 'flex-end',
|
|
873
|
-
children: [
|
|
874
|
-
SDUI.components.Button({
|
|
875
|
-
label: 'Delete',
|
|
876
|
-
appearance: 'DESTRUCTIVE',
|
|
877
|
-
onPress: SDUI.actions.callFunction(functionId, 'delete_session', {
|
|
878
|
-
id: s.selectedSession['id'],
|
|
879
|
-
responsePath: '/sessions',
|
|
880
|
-
onSuccess: { set: { '/showEditSessionModal': false } },
|
|
881
|
-
}),
|
|
882
|
-
}),
|
|
883
|
-
SDUI.components.Button({
|
|
884
|
-
label: 'Cancel',
|
|
885
|
-
appearance: 'OUTLINE',
|
|
886
|
-
onPress: SDUI.actions.set(s.showEditSessionModal, false),
|
|
887
|
-
}),
|
|
888
|
-
SDUI.components.Button({
|
|
889
|
-
label: 'Save',
|
|
890
|
-
appearance: 'PRIMARY',
|
|
891
|
-
onPress: SDUI.actions.callFunction(functionId, 'update_session', {
|
|
892
|
-
id: s.selectedSession['id'],
|
|
893
|
-
dog_id: s.sessionForm.dog_id,
|
|
894
|
-
session_date: s.sessionForm.session_date,
|
|
895
|
-
duration: s.sessionForm.duration,
|
|
896
|
-
training_type: s.sessionForm.training_type,
|
|
897
|
-
notes: s.sessionForm.notes,
|
|
898
|
-
responsePath: '/sessions',
|
|
899
|
-
onSuccess: { set: { '/showEditSessionModal': false } },
|
|
900
|
-
}),
|
|
901
|
-
}),
|
|
902
|
-
],
|
|
903
|
-
}),
|
|
904
|
-
],
|
|
905
|
-
}),
|
|
906
|
-
],
|
|
907
|
-
}),
|
|
908
|
-
],
|
|
909
|
-
});
|
|
910
|
-
|
|
911
|
-
return SDUI.render(s, root);
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
console.log(JSON.stringify(renderSpec('demo-fn'), null, 2));
|