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/
186 lines
4.0 KiB
JavaScript
186 lines
4.0 KiB
JavaScript
export const conversationData = {
|
|
meta: {
|
|
sender: {
|
|
additional_attributes: {
|
|
created_at_ip: '127.0.0.1',
|
|
},
|
|
availability_status: 'offline',
|
|
email: null,
|
|
id: 5017687,
|
|
name: 'long-flower-143',
|
|
phone_number: null,
|
|
thumbnail: '',
|
|
custom_attributes: {},
|
|
},
|
|
channel: 'Channel::WebWidget',
|
|
assignee: {
|
|
account_id: 1,
|
|
availability_status: 'offline',
|
|
confirmed: true,
|
|
email: 'muhsin@chatwoot.com',
|
|
available_name: 'Muhsin Keloth',
|
|
id: 21,
|
|
name: 'Muhsin Keloth',
|
|
role: 'administrator',
|
|
thumbnail: 'http://example.com/image.png',
|
|
},
|
|
},
|
|
id: 5815,
|
|
messages: [
|
|
{
|
|
id: 438072,
|
|
content: 'Campaign after 5 seconds',
|
|
account_id: 1,
|
|
inbox_id: 37,
|
|
conversation_id: 5811,
|
|
message_type: 1,
|
|
created_at: 1620980262,
|
|
updated_at: '2021-05-14T08:17:42.041Z',
|
|
private: false,
|
|
status: 'sent',
|
|
source_id: null,
|
|
content_type: null,
|
|
content_attributes: {},
|
|
sender_type: 'User',
|
|
sender_id: 1,
|
|
external_source_ids: {},
|
|
},
|
|
{
|
|
id: 4382131101,
|
|
content: 'Hello',
|
|
account_id: 1,
|
|
inbox_id: 37,
|
|
conversation_id: 5815,
|
|
message_type: 0,
|
|
created_at: 1621145476,
|
|
updated_at: '2021-05-16T05:48:43.910Z',
|
|
private: false,
|
|
status: 'sent',
|
|
source_id: null,
|
|
content_type: 'text',
|
|
content_attributes: {},
|
|
sender_type: null,
|
|
sender_id: null,
|
|
external_source_ids: {},
|
|
},
|
|
{
|
|
id: 438100,
|
|
content: 'Hey',
|
|
account_id: 1,
|
|
inbox_id: 37,
|
|
conversation_id: 5815,
|
|
message_type: 0,
|
|
created_at: 1621145476,
|
|
updated_at: '2021-05-16T05:48:43.910Z',
|
|
private: false,
|
|
status: 'sent',
|
|
source_id: null,
|
|
content_type: 'text',
|
|
content_attributes: {},
|
|
sender_type: null,
|
|
sender_id: null,
|
|
external_source_ids: {},
|
|
},
|
|
],
|
|
inbox_id: 37,
|
|
status: 'open',
|
|
muted: false,
|
|
can_reply: true,
|
|
timestamp: 1621144123,
|
|
contact_last_seen_at: 0,
|
|
agent_last_seen_at: 1621144123,
|
|
unread_count: 0,
|
|
additional_attributes: {
|
|
browser: {
|
|
device_name: 'Unknown',
|
|
browser_name: 'Chrome',
|
|
platform_name: 'macOS',
|
|
browser_version: '90.0.4430.212',
|
|
platform_version: '10.15.7',
|
|
},
|
|
widget_language: null,
|
|
browser_language: 'en',
|
|
},
|
|
account_id: 1,
|
|
labels: [],
|
|
};
|
|
|
|
export const lastMessageData = {
|
|
id: 438100,
|
|
content: 'Hey',
|
|
account_id: 1,
|
|
inbox_id: 37,
|
|
conversation_id: 5815,
|
|
message_type: 0,
|
|
created_at: 1621145476,
|
|
updated_at: '2021-05-16T05:48:43.910Z',
|
|
private: false,
|
|
status: 'sent',
|
|
source_id: null,
|
|
content_type: 'text',
|
|
content_attributes: {},
|
|
sender_type: null,
|
|
sender_id: null,
|
|
external_source_ids: {},
|
|
};
|
|
|
|
export const readMessagesData = [
|
|
{
|
|
id: 438072,
|
|
content: 'Campaign after 5 seconds',
|
|
account_id: 1,
|
|
inbox_id: 37,
|
|
conversation_id: 5811,
|
|
message_type: 1,
|
|
created_at: 1620980262,
|
|
updated_at: '2021-05-14T08:17:42.041Z',
|
|
private: false,
|
|
status: 'sent',
|
|
source_id: null,
|
|
content_type: null,
|
|
content_attributes: {},
|
|
sender_type: 'User',
|
|
sender_id: 1,
|
|
external_source_ids: {},
|
|
},
|
|
];
|
|
|
|
export const unReadMessagesData = [
|
|
{
|
|
id: 4382131101,
|
|
content: 'Hello',
|
|
account_id: 1,
|
|
inbox_id: 37,
|
|
conversation_id: 5815,
|
|
message_type: 0,
|
|
created_at: 1621145476,
|
|
updated_at: '2021-05-16T05:48:43.910Z',
|
|
private: false,
|
|
status: 'sent',
|
|
source_id: null,
|
|
content_type: 'text',
|
|
content_attributes: {},
|
|
sender_type: null,
|
|
sender_id: null,
|
|
external_source_ids: {},
|
|
},
|
|
{
|
|
id: 438100,
|
|
content: 'Hey',
|
|
account_id: 1,
|
|
inbox_id: 37,
|
|
conversation_id: 5815,
|
|
message_type: 0,
|
|
created_at: 1621145476,
|
|
updated_at: '2021-05-16T05:48:43.910Z',
|
|
private: false,
|
|
status: 'sent',
|
|
source_id: null,
|
|
content_type: 'text',
|
|
content_attributes: {},
|
|
sender_type: null,
|
|
sender_id: null,
|
|
external_source_ids: {},
|
|
},
|
|
];
|