diff --git a/cypress/fixtures/example.json b/cypress/fixtures/example.json
new file mode 100644
index 000000000..02e425437
--- /dev/null
+++ b/cypress/fixtures/example.json
@@ -0,0 +1,5 @@
+{
+ "name": "Using fixtures to represent data",
+ "email": "hello@cypress.io",
+ "body": "Fixtures are a great way to mock data for responses to routes"
+}
diff --git a/cypress/support/commands.js b/cypress/support/commands.js
new file mode 100644
index 000000000..66ea16ef0
--- /dev/null
+++ b/cypress/support/commands.js
@@ -0,0 +1,25 @@
+// ***********************************************
+// This example commands.js shows you how to
+// create various custom commands and overwrite
+// existing commands.
+//
+// For more comprehensive examples of custom
+// commands please read more here:
+// https://on.cypress.io/custom-commands
+// ***********************************************
+//
+//
+// -- This is a parent command --
+// Cypress.Commands.add('login', (email, password) => { ... })
+//
+//
+// -- This is a child command --
+// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
+//
+//
+// -- This is a dual command --
+// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
+//
+//
+// -- This will overwrite an existing command --
+// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
\ No newline at end of file
diff --git a/cypress/support/component-index.html b/cypress/support/component-index.html
new file mode 100644
index 000000000..ac6e79fd8
--- /dev/null
+++ b/cypress/support/component-index.html
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+ Components App
+
+
+
+
+
\ No newline at end of file
diff --git a/cypress/support/component.js b/cypress/support/component.js
new file mode 100644
index 000000000..57a5f6c22
--- /dev/null
+++ b/cypress/support/component.js
@@ -0,0 +1,24 @@
+// ***********************************************************
+// This example support/component.js is processed and
+// loaded automatically before your test files.
+//
+// This is a great place to put global configuration and
+// behavior that modifies Cypress.
+//
+// You can change the location of this file or turn off
+// automatically serving support files with the
+// 'supportFile' configuration option.
+//
+// You can read more here:
+// https://on.cypress.io/configuration
+// ***********************************************************
+
+// Import commands.js using ES2015 syntax:
+import './commands'
+
+import { mount } from 'cypress/vue'
+
+Cypress.Commands.add('mount', mount)
+
+// Example use:
+// cy.mount(MyComponent)
\ No newline at end of file
diff --git a/src/components/TicketWarnings.vue b/src/components/TicketWarnings.vue
new file mode 100644
index 000000000..4f82e9daf
--- /dev/null
+++ b/src/components/TicketWarnings.vue
@@ -0,0 +1,12 @@
+
+
+
+
+
+ {{ warning.title }}
+
+
+
+
diff --git a/src/pages/Monitor/Ticket/MonitorTickets.vue b/src/pages/Monitor/Ticket/MonitorTickets.vue
index 03d751595..a5f9c1ac0 100644
--- a/src/pages/Monitor/Ticket/MonitorTickets.vue
+++ b/src/pages/Monitor/Ticket/MonitorTickets.vue
@@ -15,6 +15,7 @@ import RightMenu from 'src/components/common/RightMenu.vue';
import MonitorTicketSearchbar from './MonitorTicketSearchbar.vue';
import MonitorTicketFilter from './MonitorTicketFilter.vue';
import TicketProblems from 'src/components/TicketProblems.vue';
+import TicketWarnings from 'src/components/TicketWarnings.vue';
import VnDateBadge from 'src/components/common/VnDateBadge.vue';
import { useStateStore } from 'src/stores/useStateStore';
import useOpenURL from 'src/composables/useOpenURL';
@@ -71,6 +72,10 @@ function exprBuilder(param, value) {
}
const columns = computed(() => [
+ {
+ name: 'warnings',
+ align: 'left',
+ },
{
label: t('salesTicketsTable.problems'),
name: 'totalProblems',
@@ -421,6 +426,9 @@ const openTab = (id) => useOpenURL(`#/ticket/${id}/sale`);
{{ $t('refreshInfo') }}
+
+
+
diff --git a/src/pages/Ticket/Card/TicketSummary.vue b/src/pages/Ticket/Card/TicketSummary.vue
index a19ab3779..03c3c8951 100644
--- a/src/pages/Ticket/Card/TicketSummary.vue
+++ b/src/pages/Ticket/Card/TicketSummary.vue
@@ -322,6 +322,18 @@ onMounted(async () => {
+
+
+
+
+ {{ warning.title }}
+
+
+
+
diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue
index 307f34dc2..0ba3f0551 100644
--- a/src/pages/Ticket/TicketList.vue
+++ b/src/pages/Ticket/TicketList.vue
@@ -22,6 +22,7 @@ import ZoneDescriptorProxy from 'src/pages/Zone/Card/ZoneDescriptorProxy.vue';
import { toTimeFormat } from 'src/filters/date';
import InvoiceOutDescriptorProxy from 'src/pages/InvoiceOut/Card/InvoiceOutDescriptorProxy.vue';
import TicketProblems from 'src/components/TicketProblems.vue';
+import TicketWarnings from 'src/components/TicketWarnings.vue';
import VnSection from 'src/components/common/VnSection.vue';
import { getAddresses } from 'src/pages/Customer/composables/getAddresses';
import { getAgencies } from 'src/pages/Route/Agency/composables/getAgencies';
@@ -82,6 +83,10 @@ const dataKey = 'TicketList';
const formInitialData = ref({});
const columns = computed(() => [
+ {
+ name: 'warnings',
+ align: 'left',
+ },
{
align: 'left',
name: 'statusIcons',
@@ -302,6 +307,12 @@ function redirectToLines(id) {
window.open(url, '_blank');
}
+const onClientSelected = async (formData) => {
+ resetAgenciesSelector(formData);
+ await fetchClient(formData);
+ await fetchAddresses(formData);
+};
+
const fetchAvailableAgencies = async (formData) => {
resetAgenciesSelector(formData);
const response = await getAgencies(formData, selectedClient.value);
@@ -471,6 +482,7 @@ function setReference(data) {
@on-fetch="(data) => (accountingOptions = data)"
auto-load
/>
+
+
+ s
@@ -700,9 +715,7 @@ function setReference(data) {
icon="vn:invoice-in"
data-cy="ticketListMakeInvoiceBtn"
/>
-
- {{ t('ticketList.createInvoice') }}
-
+ {{ t('ticketList.createInvoice') }}