diff --git a/jsconfig.json b/jsconfig.json
index ee1a17d04..d2a56002e 100644
--- a/jsconfig.json
+++ b/jsconfig.json
@@ -5,6 +5,7 @@
"src/*": ["src/*"],
"app/*": ["*"],
"components/*": ["src/components/*"],
+ "composables/*": ["src/composables/*"],
"layouts/*": ["src/layouts/*"],
"pages/*": ["src/pages/*"],
"assets/*": ["src/assets/*"],
diff --git a/quasar.config.js b/quasar.config.js
index 828633cf6..83265295f 100644
--- a/quasar.config.js
+++ b/quasar.config.js
@@ -9,8 +9,8 @@
// https://v2.quasar.dev/quasar-cli-webpack/quasar-config-js
const ESLintPlugin = require('eslint-webpack-plugin');
-
const { configure } = require('quasar/wrappers');
+const path = require('path');
module.exports = configure(function (ctx) {
return {
@@ -68,15 +68,23 @@ module.exports = configure(function (ctx) {
chainWebpack(chain) {
chain.module
- .rule("i18n")
+ .rule('i18n')
.resourceQuery(/blockType=i18n/)
.type('javascript/auto')
- .use("i18n")
- .loader("@intlify/vue-i18n-loader")
+ .use('i18n')
+ .loader('@intlify/vue-i18n-loader')
.end();
- chain.plugin('eslint-webpack-plugin')
- .use(ESLintPlugin, [{ extensions: ['js', 'vue'] }]);
+ chain.plugin('eslint-webpack-plugin').use(ESLintPlugin, [{ extensions: ['js', 'vue'] }]);
+ },
+ extendWebpack(cfg) {
+ cfg.resolve.alias = {
+ ...cfg.resolve.alias, // This adds the existing alias
+
+ // Add your own alias like this
+ composables: path.resolve(__dirname, './src/composables'),
+ filters: path.resolve(__dirname, './src/filters'),
+ };
},
},
@@ -91,7 +99,7 @@ module.exports = configure(function (ctx) {
target: 'http://0.0.0.0:3000',
logLevel: 'debug',
changeOrigin: true,
- secure: false
+ secure: false,
},
},
},
@@ -100,9 +108,9 @@ module.exports = configure(function (ctx) {
framework: {
config: {
brand: {
- primary: 'orange'
+ primary: 'orange',
},
- dark: 'auto'
+ dark: 'auto',
},
lang: 'es',
diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue
index d36f8c4ea..2426be1c7 100644
--- a/src/components/FormModel.vue
+++ b/src/components/FormModel.vue
@@ -6,7 +6,7 @@ import axios from 'axios';
import { useState } from 'src/composables/useState';
import { useValidator } from 'src/composables/useValidator';
-import SkeletonForm from 'src/components/SkeletonForm.vue';
+import SkeletonForm from 'components/ui/SkeletonForm.vue';
const quasar = useQuasar();
const { t } = useI18n();
diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue
index e5c5676f7..c4c1e9892 100644
--- a/src/components/Navbar.vue
+++ b/src/components/Navbar.vue
@@ -2,7 +2,7 @@
import { useI18n } from 'vue-i18n';
import { useState } from 'src/composables/useState';
import { useSession } from 'src/composables/useSession';
-import UserPanel from 'src/components/UserPanel.vue';
+import UserPanel from 'components/UserPanel.vue';
import FavoriteModules from './FavoriteModules.vue';
const { t } = useI18n();
diff --git a/src/components/common/SendEmailDialog.vue b/src/components/common/SendEmailDialog.vue
new file mode 100644
index 000000000..f8d80ac06
--- /dev/null
+++ b/src/components/common/SendEmailDialog.vue
@@ -0,0 +1,72 @@
+
+
+
+
+
+ {{ t('sendEmailNotification') }}
+
+
+
+
+ {{ t('notifyAddress') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{
+ "en": {
+ "sendEmailNotification": "Send email notification",
+ "notifyAddress": "The notification will be sent to the following address"
+ },
+ "es": {
+ "sendEmailNotification": "Enviar notificación por correo",
+ "notifyAddress": "La notificación se enviará a la siguiente dirección"
+ }
+}
+
diff --git a/src/components/ui/CardDescriptor.vue b/src/components/ui/CardDescriptor.vue
index 34575cfb4..d80c0498c 100644
--- a/src/components/ui/CardDescriptor.vue
+++ b/src/components/ui/CardDescriptor.vue
@@ -98,9 +98,5 @@ const { t } = useI18n();
justify-content: space-between;
align-items: stretch;
}
-
- #descriptor-skeleton .q-card__actions {
- justify-content: space-between;
- }
}
diff --git a/src/components/ui/SkeletonDescriptor.vue b/src/components/ui/SkeletonDescriptor.vue
new file mode 100644
index 000000000..03623f4d1
--- /dev/null
+++ b/src/components/ui/SkeletonDescriptor.vue
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/SkeletonForm.vue b/src/components/ui/SkeletonForm.vue
similarity index 100%
rename from src/components/SkeletonForm.vue
rename to src/components/ui/SkeletonForm.vue
diff --git a/src/components/SkeletonSummary.vue b/src/components/ui/SkeletonSummary.vue
similarity index 100%
rename from src/components/SkeletonSummary.vue
rename to src/components/ui/SkeletonSummary.vue
diff --git a/src/composables/usePrintService.js b/src/composables/usePrintService.js
new file mode 100644
index 000000000..110e4d864
--- /dev/null
+++ b/src/composables/usePrintService.js
@@ -0,0 +1,36 @@
+import { useSession } from './useSession';
+import axios from 'axios';
+import { useQuasar } from 'quasar';
+
+export function usePrintService() {
+ const quasar = useQuasar();
+ const { getToken } = useSession();
+
+ function sendEmail(path, params) {
+ return axios.post(path, params).then(() =>
+ quasar.notify({
+ message: 'Notification sent',
+ type: 'positive',
+ icon: 'check',
+ })
+ );
+ }
+
+ function openReport(path, params) {
+ params = Object.assign(
+ {
+ access_token: getToken(),
+ },
+ params
+ );
+
+ const query = new URLSearchParams(params).toString();
+
+ window.open(`api/${path}?${query}`);
+ }
+
+ return {
+ sendEmail,
+ openReport,
+ };
+}
diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js
index 857df8d89..352a80263 100644
--- a/src/i18n/en/index.js
+++ b/src/i18n/en/index.js
@@ -13,12 +13,14 @@ export default {
darkMode: 'Dark mode',
logOut: 'Log out',
dataSaved: 'Data saved',
+ dataDeleted: 'Data deleted',
add: 'Add',
create: 'Create',
save: 'Save',
remove: 'Remove',
reset: 'Reset',
cancel: 'Cancel',
+ confirm: 'Confirm',
yes: 'Yes',
no: 'No',
noChanges: 'No changes to save',
@@ -26,10 +28,10 @@ export default {
confirmRemove: 'You are about to delete this row. Are you sure?',
rowAdded: 'Row added',
rowRemoved: 'Row removed',
- pleaseWait: 'Please wait...'
+ pleaseWait: 'Please wait...',
},
moduleIndex: {
- allModules: 'All modules'
+ allModules: 'All modules',
},
errors: {
statusUnauthorized: 'Access denied',
@@ -45,12 +47,12 @@ export default {
keepLogin: 'Keep me logged in',
loginSuccess: 'You have successfully logged in',
loginError: 'Invalid username or password',
- fieldRequired: 'This field is required'
+ fieldRequired: 'This field is required',
},
dashboard: {
pageTitles: {
dashboard: 'Dashboard',
- }
+ },
},
customer: {
pageTitles: {
@@ -58,13 +60,13 @@ export default {
list: 'List',
createCustomer: 'Create customer',
summary: 'Summary',
- basicData: 'Basic Data'
+ basicData: 'Basic Data',
},
list: {
phone: 'Phone',
email: 'Email',
customerOrders: 'Display customer orders',
- moreOptions: 'More options'
+ moreOptions: 'More options',
},
card: {
customerList: 'Customer list',
@@ -78,7 +80,7 @@ export default {
isFrozen: 'Customer is frozen',
hasDebt: 'Customer has debt',
notChecked: 'Customer not checked',
- noWebAccess: 'Web access is disabled'
+ noWebAccess: 'Web access is disabled',
},
summary: {
basicData: 'Basic data',
@@ -145,8 +147,8 @@ export default {
phone: 'Phone',
mobile: 'Mobile',
salesPerson: 'Sales person',
- contactChannel: 'Contact channel'
- }
+ contactChannel: 'Contact channel',
+ },
},
ticket: {
pageTitles: {
@@ -155,7 +157,7 @@ export default {
createTicket: 'Create ticket',
summary: 'Summary',
basicData: 'Basic Data',
- boxing: 'Boxing'
+ boxing: 'Boxing',
},
list: {
nickname: 'Nickname',
@@ -163,7 +165,7 @@ export default {
shipped: 'Shipped',
landed: 'Landed',
salesPerson: 'Sales person',
- total: 'Total'
+ total: 'Total',
},
card: {
ticketId: 'Ticket ID',
@@ -173,7 +175,7 @@ export default {
agency: 'Agency',
shipped: 'Shipped',
warehouse: 'Warehouse',
- customerCard: 'Customer card'
+ customerCard: 'Customer card',
},
boxing: {
expedition: 'Expedition',
@@ -182,8 +184,8 @@ export default {
worker: 'Worker',
selectTime: 'Select time:',
selectVideo: 'Select video:',
- notFound: 'No videos available'
- }
+ notFound: 'No videos available',
+ },
},
claim: {
pageTitles: {
@@ -193,21 +195,21 @@ export default {
rmaList: 'RMA',
summary: 'Summary',
basicData: 'Basic Data',
- rma: 'RMA'
+ rma: 'RMA',
},
list: {
customer: 'Customer',
assignedTo: 'Assigned',
created: 'Created',
- state: 'State'
+ state: 'State',
},
rmaList: {
code: 'Code',
- records: 'records'
+ records: 'records',
},
rma: {
user: 'User',
- created: 'Created'
+ created: 'Created',
},
card: {
claimId: 'Claim ID',
@@ -216,7 +218,7 @@ export default {
state: 'State',
ticketId: 'Ticket ID',
customerSummary: 'Customer summary',
- claimedTicket: 'Claimed ticket'
+ claimedTicket: 'Claimed ticket',
},
summary: {
customer: 'Customer',
@@ -236,7 +238,7 @@ export default {
actions: 'Actions',
responsibility: 'Responsibility',
company: 'Company',
- person: 'Employee/Customer'
+ person: 'Employee/Customer',
},
basicData: {
customer: 'Customer',
@@ -245,7 +247,7 @@ export default {
state: 'State',
packages: 'Packages',
picked: 'Picked',
- returnOfMaterial: 'Return of material authorization (RMA)'
+ returnOfMaterial: 'Return of material authorization (RMA)',
},
},
components: {
@@ -258,12 +260,12 @@ export default {
noData: 'No data to display',
openCard: 'View card',
openSummary: 'Open summary',
- viewDescription: 'View description'
+ viewDescription: 'View description',
},
cardDescriptor: {
mainList: 'Main list',
summary: 'Summary',
- moreOptions: 'More options'
- }
+ moreOptions: 'More options',
+ },
},
};
diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js
index 57ed01b0d..b326af337 100644
--- a/src/i18n/es/index.js
+++ b/src/i18n/es/index.js
@@ -13,12 +13,14 @@ export default {
darkMode: 'Modo oscuro',
logOut: 'Cerrar sesión',
dataSaved: 'Datos guardados',
+ dataDeleted: 'Data deleted',
add: 'Añadir',
create: 'Crear',
save: 'Guardar',
remove: 'Eliminar',
reset: 'Restaurar',
cancel: 'Cancelar',
+ confirm: 'Confirmar',
yes: 'Si',
no: 'No',
noChanges: 'Sin cambios que guardar',
@@ -26,10 +28,10 @@ export default {
confirmRemove: 'Vas a eliminar este registro. ¿Continuar?',
rowAdded: 'Fila añadida',
rowRemoved: 'Fila eliminada',
- pleaseWait: 'Por favor, espera...'
+ pleaseWait: 'Por favor, espera...',
},
moduleIndex: {
- allModules: 'Todos los módulos'
+ allModules: 'Todos los módulos',
},
errors: {
statusUnauthorized: 'Acceso denegado',
@@ -45,12 +47,12 @@ export default {
keepLogin: 'Mantener sesión iniciada',
loginSuccess: 'Inicio de sesión correcto',
loginError: 'Nombre de usuario o contraseña incorrectos',
- fieldRequired: 'Este campo es obligatorio'
+ fieldRequired: 'Este campo es obligatorio',
},
dashboard: {
pageTitles: {
dashboard: 'Tablón',
- }
+ },
},
customer: {
pageTitles: {
@@ -58,13 +60,13 @@ export default {
list: 'Listado',
createCustomer: 'Crear cliente',
summary: 'Resumen',
- basicData: 'Datos básicos'
+ basicData: 'Datos básicos',
},
list: {
phone: 'Teléfono',
email: 'Email',
customerOrders: 'Mostrar órdenes del cliente',
- moreOptions: 'Más opciones'
+ moreOptions: 'Más opciones',
},
card: {
customerId: 'ID cliente',
@@ -77,7 +79,7 @@ export default {
isFrozen: 'El cliente está congelado',
hasDebt: 'El cliente tiene riesgo',
notChecked: 'El cliente no está comprobado',
- noWebAccess: 'El acceso web está desactivado'
+ noWebAccess: 'El acceso web está desactivado',
},
summary: {
basicData: 'Datos básicos',
@@ -144,8 +146,8 @@ export default {
phone: 'Teléfono',
mobile: 'Móvil',
salesPerson: 'Comercial',
- contactChannel: 'Canal de contacto'
- }
+ contactChannel: 'Canal de contacto',
+ },
},
ticket: {
pageTitles: {
@@ -154,7 +156,7 @@ export default {
createTicket: 'Crear ticket',
summary: 'Resumen',
basicData: 'Datos básicos',
- boxing: 'Encajado'
+ boxing: 'Encajado',
},
list: {
nickname: 'Alias',
@@ -162,7 +164,7 @@ export default {
shipped: 'Enviado',
landed: 'Entregado',
salesPerson: 'Comercial',
- total: 'Total'
+ total: 'Total',
},
card: {
ticketId: 'ID ticket',
@@ -172,7 +174,7 @@ export default {
agency: 'Agencia',
shipped: 'Enviado',
warehouse: 'Almacén',
- customerCard: 'Ficha del cliente'
+ customerCard: 'Ficha del cliente',
},
boxing: {
expedition: 'Expedición',
@@ -181,8 +183,8 @@ export default {
worker: 'Trabajador',
selectTime: 'Seleccionar hora:',
selectVideo: 'Seleccionar vídeo:',
- notFound: 'No hay vídeos disponibles'
- }
+ notFound: 'No hay vídeos disponibles',
+ },
},
claim: {
pageTitles: {
@@ -192,21 +194,21 @@ export default {
rmaList: 'RMA',
summary: 'Resumen',
basicData: 'Datos básicos',
- rma: 'RMA'
+ rma: 'RMA',
},
list: {
customer: 'Cliente',
assignedTo: 'Asignada a',
created: 'Creada',
- state: 'Estado'
+ state: 'Estado',
},
rmaList: {
code: 'Código',
- records: 'registros'
+ records: 'registros',
},
rma: {
user: 'Usuario',
- created: 'Creado'
+ created: 'Creado',
},
card: {
claimId: 'ID reclamación',
@@ -215,7 +217,7 @@ export default {
state: 'Estado',
ticketId: 'ID ticket',
customerSummary: 'Resumen del cliente',
- claimedTicket: 'Ticket reclamado'
+ claimedTicket: 'Ticket reclamado',
},
summary: {
customer: 'Cliente',
@@ -235,7 +237,7 @@ export default {
actions: 'Acciones',
responsibility: 'Responsabilidad',
company: 'Empresa',
- person: 'Comercial/Cliente'
+ person: 'Comercial/Cliente',
},
basicData: {
customer: 'Cliente',
@@ -244,8 +246,8 @@ export default {
state: 'Estado',
packages: 'Bultos',
picked: 'Recogida',
- returnOfMaterial: 'Autorización de retorno de materiales (RMA)'
- }
+ returnOfMaterial: 'Autorización de retorno de materiales (RMA)',
+ },
},
components: {
topbar: {},
@@ -257,12 +259,12 @@ export default {
noData: 'Sin datos que mostrar',
openCard: 'Ver ficha',
openSummary: 'Abrir detalles',
- viewDescription: 'Ver descripción'
+ viewDescription: 'Ver descripción',
},
cardDescriptor: {
mainList: 'Listado principal',
summary: 'Resumen',
moreOptions: 'Más opciones',
- }
+ },
},
};
diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue
index 0418c8f3b..be47ccbae 100644
--- a/src/layouts/MainLayout.vue
+++ b/src/layouts/MainLayout.vue
@@ -1,5 +1,5 @@
diff --git a/src/pages/Claim/Card/ClaimBasicData.vue b/src/pages/Claim/Card/ClaimBasicData.vue
index cffaa79f7..284fbdfca 100644
--- a/src/pages/Claim/Card/ClaimBasicData.vue
+++ b/src/pages/Claim/Card/ClaimBasicData.vue
@@ -4,8 +4,8 @@ import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { useSession } from 'src/composables/useSession';
-import FetchData from 'src/components/FetchData.vue';
-import FormModel from 'src/components/FormModel.vue';
+import FetchData from 'components/FetchData.vue';
+import FormModel from 'components/FormModel.vue';
const route = useRoute();
const { t } = useI18n();
diff --git a/src/pages/Claim/Card/ClaimCard.vue b/src/pages/Claim/Card/ClaimCard.vue
index d85469571..32dd3f24e 100644
--- a/src/pages/Claim/Card/ClaimCard.vue
+++ b/src/pages/Claim/Card/ClaimCard.vue
@@ -1,6 +1,6 @@
+
+
+
+
diff --git a/src/pages/Claim/Card/ClaimDescriptorMenu.vue b/src/pages/Claim/Card/ClaimDescriptorMenu.vue
new file mode 100644
index 000000000..4753fab3a
--- /dev/null
+++ b/src/pages/Claim/Card/ClaimDescriptorMenu.vue
@@ -0,0 +1,132 @@
+
+
+
+
+
+
+ {{ t('pickupOrder') }}
+
+
+
+
+
+
+
+
+
+ {{ t('openPickupOrder') }}
+
+
+
+
+
+ {{ t('sendPickupOrder') }}
+
+
+
+
+
+
+
+
+
+ {{ t('deleteClaim') }}
+
+
+
+
+
+ {{ t('confirmDeletion') }}
+
+
+
+ {{ t('confirmDeletionMessage') }}
+
+
+
+
+
+
+
+
+
+{
+ "en": {
+ "pickupOrder": "Pickup order",
+ "openPickupOrder": "Open pickup order",
+ "sendPickupOrder": "Send pickup order",
+ "deleteClaim": "Delete claim",
+ "confirmDeletion": "Confirm deletion",
+ "confirmDeletionMessage": "Are you sure you want to delete this claim?"
+ },
+ "es": {
+ "pickupOrder": "Orden de recogida",
+ "openPickupOrder": "Abrir orden de recogida",
+ "sendPickupOrder": "Enviar orden de recogida",
+ "deleteClaim": "Eliminar reclamación",
+ "confirmDeletion": "Confirmar eliminación",
+ "confirmDeletionMessage": "Seguro que quieres eliminar esta reclamación?"
+ }
+}
+
diff --git a/src/pages/Claim/Card/ClaimRma.vue b/src/pages/Claim/Card/ClaimRma.vue
index 4162d5acf..63b6f1bc5 100644
--- a/src/pages/Claim/Card/ClaimRma.vue
+++ b/src/pages/Claim/Card/ClaimRma.vue
@@ -4,8 +4,8 @@ import { useI18n } from 'vue-i18n';
import { useQuasar } from 'quasar';
import { useRoute } from 'vue-router';
import axios from 'axios';
-import Paginate from 'src/components/Paginate.vue';
-import FetchData from 'src/components/FetchData.vue';
+import Paginate from 'components/Paginate.vue';
+import FetchData from 'components/FetchData.vue';
import { toDate } from 'src/filters';
const quasar = useQuasar();
diff --git a/src/pages/Claim/Card/ClaimSummary.vue b/src/pages/Claim/Card/ClaimSummary.vue
index b02137f22..7c6eeb6d7 100644
--- a/src/pages/Claim/Card/ClaimSummary.vue
+++ b/src/pages/Claim/Card/ClaimSummary.vue
@@ -4,7 +4,7 @@ import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import axios from 'axios';
import { toDate, toCurrency } from 'src/filters';
-import SkeletonSummary from 'src/components/SkeletonSummary';
+import SkeletonSummary from 'components/ui/SkeletonSummary.vue';
onMounted(() => fetch());
diff --git a/src/pages/Claim/ClaimList.vue b/src/pages/Claim/ClaimList.vue
index 93c656d38..29ec4adb4 100644
--- a/src/pages/Claim/ClaimList.vue
+++ b/src/pages/Claim/ClaimList.vue
@@ -2,7 +2,7 @@
import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router';
import { useQuasar } from 'quasar';
-import Paginate from 'src/components/Paginate.vue';
+import Paginate from 'components/Paginate.vue';
import { toDate } from 'src/filters/index';
import ClaimSummaryDialog from './Card/ClaimSummaryDialog.vue';
import CustomerDescriptorPopover from 'src/pages/Customer/Card/CustomerDescriptorPopover.vue';
diff --git a/src/pages/Claim/ClaimMain.vue b/src/pages/Claim/ClaimMain.vue
index 099e82879..fd50f1521 100644
--- a/src/pages/Claim/ClaimMain.vue
+++ b/src/pages/Claim/ClaimMain.vue
@@ -1,6 +1,6 @@
diff --git a/src/pages/Claim/ClaimRmaList.vue b/src/pages/Claim/ClaimRmaList.vue
index 195d3d2ca..df1e4cf69 100644
--- a/src/pages/Claim/ClaimRmaList.vue
+++ b/src/pages/Claim/ClaimRmaList.vue
@@ -3,7 +3,7 @@ import { ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { useQuasar } from 'quasar';
import axios from 'axios';
-import Paginate from 'src/components/Paginate.vue';
+import Paginate from 'components/Paginate.vue';
const quasar = useQuasar();
const { t } = useI18n();
diff --git a/src/pages/Claim/__tests__/ClaimDescriptorMenu.spec.js b/src/pages/Claim/__tests__/ClaimDescriptorMenu.spec.js
new file mode 100644
index 000000000..12f980774
--- /dev/null
+++ b/src/pages/Claim/__tests__/ClaimDescriptorMenu.spec.js
@@ -0,0 +1,63 @@
+import { jest, describe, expect, it, beforeAll } from '@jest/globals';
+import { createWrapper, axios } from 'app/tests/jest/jestHelpers';
+import ClaimDescriptorMenu from '../Card/ClaimDescriptorMenu.vue';
+
+const mockPush = jest.fn();
+
+jest.mock('vue-router', () => ({
+ useRouter: () => ({
+ push: mockPush,
+ currentRoute: {
+ value: {
+ params: {
+ id: 1,
+ },
+ },
+ },
+ }),
+}));
+
+describe('ClaimDescriptorMenu', () => {
+ let vm;
+ beforeAll(() => {
+ vm = createWrapper(ClaimDescriptorMenu).vm;
+ });
+
+ afterEach(() => {
+ jest.clearAllMocks();
+ });
+
+ describe('getVideoList()', () => {
+ it('should when response videoList use to list', async () => {
+ const expeditionId = 1;
+ const timed = {
+ min: 1,
+ max: 2,
+ };
+ const videoList = ['2022-01-01T01-01-00.mp4', '2022-02-02T02-02-00.mp4', '2022-03-03T03-03-00.mp4'];
+
+ jest.spyOn(axios, 'get').mockResolvedValue({ data: videoList });
+ jest.spyOn(vm.quasar, 'notify');
+
+ await vm.getVideoList(expeditionId, timed);
+
+ expect(vm.videoList.length).toEqual(videoList.length);
+ expect(vm.slide).toEqual(videoList.reverse()[0]);
+ });
+
+ it('should if not have video show notify', async () => {
+ const expeditionId = 1;
+ const timed = {
+ min: 1,
+ max: 2,
+ };
+
+ jest.spyOn(axios, 'get').mockResolvedValue({ data: [] });
+ jest.spyOn(vm.quasar, 'notify');
+
+ await vm.getVideoList(expeditionId, timed);
+
+ expect(vm.quasar.notify).toHaveBeenCalledWith(expect.objectContaining({ type: 'negative' }));
+ });
+ });
+});
diff --git a/src/pages/Customer/Card/CustomerBasicData.vue b/src/pages/Customer/Card/CustomerBasicData.vue
index 3df10a095..17a92d6aa 100644
--- a/src/pages/Customer/Card/CustomerBasicData.vue
+++ b/src/pages/Customer/Card/CustomerBasicData.vue
@@ -4,8 +4,8 @@ import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { useSession } from 'src/composables/useSession';
-import FetchData from 'src/components/FetchData.vue';
-import FormModel from 'src/components/FormModel.vue';
+import FetchData from 'components/FetchData.vue';
+import FormModel from 'components/FormModel.vue';
const route = useRoute();
const { t } = useI18n();
diff --git a/src/pages/Customer/Card/CustomerDescriptor.vue b/src/pages/Customer/Card/CustomerDescriptor.vue
index 62804d43a..778c5071d 100644
--- a/src/pages/Customer/Card/CustomerDescriptor.vue
+++ b/src/pages/Customer/Card/CustomerDescriptor.vue
@@ -4,7 +4,8 @@ import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { toCurrency } from 'src/filters';
import axios from 'axios';
-import CardDescriptor from 'src/components/ui/CardDescriptor.vue';
+import CardDescriptor from 'components/ui/CardDescriptor.vue';
+import SkeletonDescriptor from 'components/ui/SkeletonDescriptor.vue';
const $props = defineProps({
id: {
@@ -34,6 +35,7 @@ async function fetch() {
+