Copy the Chatwoot (v4.14.0) frontend runnable subset into frontend/ for customization: - app/javascript/ (Vue SPA: dashboard, widget, sdk, portal, superadmin) - app/views/ (ERB templates for vite-plugin-ruby entrypoint resolution) - app/helpers/, app/assets/ (Rails view helpers, static assets) - enterprise/ (Enterprise edition frontend overlay) - config/vite.json, vite.config.ts, bin/vite (Vite-Rails toolchain) - package.json, pnpm-lock.yaml, tailwind/postcss/eslint configs - Gemfile, Gemfile.lock (vite_rails gem for bin/vite binstub) Excluded Rails backend: controllers, models, services, jobs, mailers, policies, db, lib, spec, public, node_modules. Update references to the new frontend location: - .gitignore: exclude frontend build artifacts (node_modules, tmp, packs), keep frontend/bin/ and frontend/vendor/ via negation - backend/scripts/parity_frontend_smoke.sh: CHATWOOT_DIR default reference/chatwoot -> ../frontend - backend/scripts/parity_frontend_browser_smoke.mjs: same default update - AGENTS.md: add frontend section with Rails/Vite coupling notes - README: architecture tree includes frontend/
37 lines
1.6 KiB
Ruby
37 lines
1.6 KiB
Ruby
json.access_token resource.access_token.token
|
|
json.account_id resource.active_account_user&.account_id
|
|
json.available_name resource.available_name
|
|
json.avatar_url resource.avatar_url
|
|
json.confirmed resource.confirmed?
|
|
json.display_name resource.display_name
|
|
json.message_signature resource.message_signature
|
|
json.email resource.email
|
|
json.hmac_identifier resource.hmac_identifier if GlobalConfig.get('CHATWOOT_INBOX_HMAC_KEY')['CHATWOOT_INBOX_HMAC_KEY'].present?
|
|
json.id resource.id
|
|
json.inviter_id resource.active_account_user&.inviter_id
|
|
json.name resource.name
|
|
json.provider resource.provider
|
|
json.pubsub_token resource.pubsub_token
|
|
json.custom_attributes resource.custom_attributes if resource.custom_attributes.present?
|
|
json.role resource.active_account_user&.role
|
|
json.ui_settings resource.ui_settings
|
|
json.uid resource.uid
|
|
json.type resource.type
|
|
json.accounts do
|
|
json.array! resource.account_users do |account_user|
|
|
json.id account_user.account_id
|
|
json.name account_user.account.name
|
|
json.status account_user.account.status
|
|
json.onboarding_step account_user.account.onboarding_step
|
|
json.active_at account_user.active_at
|
|
json.role account_user.role
|
|
json.permissions account_user.permissions
|
|
# the actual availability user has configured
|
|
json.availability account_user.availability
|
|
# availability derived from presence
|
|
json.availability_status account_user.availability_status
|
|
json.auto_offline account_user.auto_offline
|
|
json.partial! 'api/v1/models/account_user', account_user: account_user if ChatwootApp.enterprise?
|
|
end
|
|
end
|