Initial commit: Add logistics and order_detail message types
Some checks failed
Lock Threads / action (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot EE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Publish Chatwoot EE docker images / merge (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/amd64, ubuntu-latest) (push) Has been cancelled
Publish Chatwoot CE docker images / build (linux/arm64, ubuntu-22.04-arm) (push) Has been cancelled
Publish Chatwoot CE docker images / merge (push) Has been cancelled
Run Chatwoot CE spec / lint-backend (push) Has been cancelled
Run Chatwoot CE spec / lint-frontend (push) Has been cancelled
Run Chatwoot CE spec / frontend-tests (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (0, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (1, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (10, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (11, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (12, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (13, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (14, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (15, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (2, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (3, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (4, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (5, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (6, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (7, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (8, 16) (push) Has been cancelled
Run Chatwoot CE spec / backend-tests (9, 16) (push) Has been cancelled
Run Linux nightly installer / nightly (push) Has been cancelled

- Add Logistics component with progress tracking
- Add OrderDetail component for order information
- Support data-driven steps and actions
- Add blue color scale to widget SCSS
- Fix node overflow and progress bar rendering issues
- Add English translations for dashboard components

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Liang XJ
2026-01-26 11:16:56 +08:00
commit 092fb2e083
7646 changed files with 975643 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
import axios from 'axios';
import { actions } from '../../bulkActions';
import * as types from '../../../mutation-types';
import payload from './fixtures';
const commit = vi.fn();
global.axios = axios;
vi.mock('axios');
describe('#actions', () => {
describe('#create', () => {
it('sends correct actions if API is success', async () => {
axios.post.mockResolvedValue({ data: payload });
await actions.process({ commit }, payload);
expect(commit.mock.calls).toEqual([
[types.default.SET_BULK_ACTIONS_FLAG, { isUpdating: true }],
[types.default.SET_BULK_ACTIONS_FLAG, { isUpdating: false }],
]);
});
it('sends correct actions if API is error', async () => {
axios.post.mockRejectedValue({ message: 'Incorrect header' });
await expect(actions.process({ commit })).rejects.toThrow(Error);
expect(commit.mock.calls).toEqual([
[types.default.SET_BULK_ACTIONS_FLAG, { isUpdating: true }],
[types.default.SET_BULK_ACTIONS_FLAG, { isUpdating: false }],
]);
});
});
describe('#setSelectedConversationIds', () => {
it('sends correct actions if API is success', async () => {
await actions.setSelectedConversationIds({ commit }, payload.ids);
expect(commit.mock.calls).toEqual([
[types.default.SET_SELECTED_CONVERSATION_IDS, payload.ids],
]);
});
});
describe('#removeSelectedConversationIds', () => {
it('sends correct actions if API is success', async () => {
await actions.removeSelectedConversationIds({ commit }, payload.ids);
expect(commit.mock.calls).toEqual([
[types.default.REMOVE_SELECTED_CONVERSATION_IDS, payload.ids],
]);
});
});
describe('#clearSelectedConversationIds', () => {
it('sends correct actions if API is success', async () => {
await actions.clearSelectedConversationIds({ commit });
expect(commit.mock.calls).toEqual([
[types.default.CLEAR_SELECTED_CONVERSATION_IDS],
]);
});
});
});

View File

@@ -0,0 +1,5 @@
export default {
type: 'Conversation',
ids: [64, 39],
fields: { assignee_id: 6 },
};

View File

@@ -0,0 +1,20 @@
import { getters } from '../../bulkActions';
describe('#getters', () => {
it('getUIFlags', () => {
const state = {
uiFlags: {
isUpdating: false,
},
};
expect(getters.getUIFlags(state)).toEqual({
isUpdating: false,
});
});
it('getSelectedConversationIds', () => {
const state = {
selectedConversationIds: [1, 2, 3],
};
expect(getters.getSelectedConversationIds(state)).toEqual([1, 2, 3]);
});
});

View File

@@ -0,0 +1,33 @@
import types from '../../../mutation-types';
import { mutations } from '../../bulkActions';
describe('#mutations', () => {
describe('#toggleUiFlag', () => {
it('set update flags', () => {
const state = { uiFlags: { isUpdating: false } };
mutations[types.SET_BULK_ACTIONS_FLAG](state, { isUpdating: true });
expect(state.uiFlags.isUpdating).toEqual(true);
});
});
describe('#setSelectedConversationIds', () => {
it('set selected conversation ids', () => {
const state = { selectedConversationIds: [] };
mutations[types.SET_SELECTED_CONVERSATION_IDS](state, [1, 2, 3]);
expect(state.selectedConversationIds).toEqual([1, 2, 3]);
});
});
describe('#removeSelectedConversationIds', () => {
it('remove selected conversation ids', () => {
const state = { selectedConversationIds: [1, 2, 3] };
mutations[types.REMOVE_SELECTED_CONVERSATION_IDS](state, 1);
expect(state.selectedConversationIds).toEqual([2, 3]);
});
});
describe('#clearSelectedConversationIds', () => {
it('clear selected conversation ids', () => {
const state = { selectedConversationIds: [1, 2, 3] };
mutations[types.CLEAR_SELECTED_CONVERSATION_IDS](state);
expect(state.selectedConversationIds).toEqual([]);
});
});
});