feat(v4): Update the design for the contacts list page (#10501)
--------- Co-authored-by: Pranav <pranavrajs@gmail.com> Co-authored-by: Pranav <pranav@chatwoot.com>
This commit is contained in:
@@ -91,10 +91,11 @@ describe('useAccount', () => {
|
||||
it('returns an account-scoped route', () => {
|
||||
const wrapper = mount(createComponent(), mountParams);
|
||||
const { accountScopedRoute } = wrapper.vm;
|
||||
const result = accountScopedRoute('accountDetail', { userId: 456 });
|
||||
const result = accountScopedRoute('accountDetail', { userId: 456 }, {});
|
||||
expect(result).toEqual({
|
||||
name: 'accountDetail',
|
||||
params: { accountId: 123, userId: 456 },
|
||||
query: {},
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -28,10 +28,11 @@ export function useAccount() {
|
||||
return `/app/accounts/${accountId.value}/${url}`;
|
||||
};
|
||||
|
||||
const accountScopedRoute = (name, params) => {
|
||||
const accountScopedRoute = (name, params, query) => {
|
||||
return {
|
||||
name,
|
||||
params: { accountId: accountId.value, ...params },
|
||||
query: { ...query },
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user