@@ -41,8 +41,8 @@ const cities = ref();
@@ -53,20 +53,20 @@ const cities = ref();
@@ -77,33 +77,33 @@ const cities = ref();
-
+
-
+
diff --git a/src/pages/Customer/CustomerPayments.vue b/src/pages/Customer/Payments/CustomerPayments.vue
similarity index 99%
rename from src/pages/Customer/CustomerPayments.vue
rename to src/pages/Customer/Payments/CustomerPayments.vue
index 24e5efa39..b4a907665 100644
--- a/src/pages/Customer/CustomerPayments.vue
+++ b/src/pages/Customer/Payments/CustomerPayments.vue
@@ -7,7 +7,7 @@ import { useStateStore } from 'stores/useStateStore';
import { useArrayData } from 'composables/useArrayData';
import VnPaginate from 'components/ui/VnPaginate.vue';
import VnConfirm from 'components/ui/VnConfirm.vue';
-import CustomerDescriptorProxy from './Card/CustomerDescriptorProxy.vue';
+import CustomerDescriptorProxy from '../Card/CustomerDescriptorProxy.vue';
import { toDate, toCurrency } from 'filters/index';
import CustomerPaymentsFilter from './CustomerPaymentsFilter.vue';
diff --git a/src/pages/Customer/CustomerPaymentsFilter.vue b/src/pages/Customer/Payments/CustomerPaymentsFilter.vue
similarity index 100%
rename from src/pages/Customer/CustomerPaymentsFilter.vue
rename to src/pages/Customer/Payments/CustomerPaymentsFilter.vue
diff --git a/src/router/modules/customer.js b/src/router/modules/customer.js
index 04cbf42b3..51511bcbf 100644
--- a/src/router/modules/customer.js
+++ b/src/router/modules/customer.js
@@ -15,6 +15,7 @@ export default {
'CustomerPayments',
'CustomerExtendedList',
'CustomerNotifications',
+ 'CustomerDefaulter',
],
card: ['CustomerBasicData'],
},
@@ -49,7 +50,8 @@ export default {
title: 'webPayments',
icon: 'vn:onlinepayment',
},
- component: () => import('src/pages/Customer/CustomerPayments.vue'),
+ component: () =>
+ import('src/pages/Customer/Payments/CustomerPayments.vue'),
},
{
path: 'extendedList',
@@ -59,7 +61,9 @@ export default {
icon: 'vn:client',
},
component: () =>
- import('src/pages/Customer/CustomerExtendedList.vue'),
+ import(
+ 'src/pages/Customer/ExtendedList/CustomerExtendedList.vue'
+ ),
},
{
path: 'notifications',
@@ -69,7 +73,19 @@ export default {
icon: 'notifications',
},
component: () =>
- import('src/pages/Customer/CustomerNotifications.vue'),
+ import(
+ 'src/pages/Customer/Notifications/CustomerNotifications.vue'
+ ),
+ },
+ {
+ path: 'defaulter',
+ name: 'CustomerDefaulter',
+ meta: {
+ title: 'defaulter',
+ icon: 'vn:risk',
+ },
+ component: () =>
+ import('src/pages/Customer/Defaulter/CustomerDefaulter.vue'),
},
],
},
diff --git a/test/vitest/__tests__/pages/Customer/CustomerPayments.spec.js b/test/vitest/__tests__/pages/Customer/CustomerPayments.spec.js
index 5d096f113..13293f596 100644
--- a/test/vitest/__tests__/pages/Customer/CustomerPayments.spec.js
+++ b/test/vitest/__tests__/pages/Customer/CustomerPayments.spec.js
@@ -1,11 +1,10 @@
import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest';
import { createWrapper, axios } from 'app/test/vitest/helper';
-import CustomerPayments from 'pages/Customer/CustomerPayments.vue';
+import CustomerPayments from 'src/pages/Customer/Payments/CustomerPayments.vue';
describe('CustomerPayments', () => {
let vm;
-
beforeAll(() => {
vm = createWrapper(CustomerPayments, {
global: {
@@ -13,7 +12,7 @@ describe('CustomerPayments', () => {
mocks: {
fetch: vi.fn(),
},
- }
+ },
}).vm;
});
@@ -28,11 +27,10 @@ describe('CustomerPayments', () => {
await vm.confirmTransaction({ id: 1 });
-
expect(vm.quasar.notify).toHaveBeenCalledWith(
expect.objectContaining({
message: 'Payment confirmed',
- type: 'positive'
+ type: 'positive',
})
);
});