diff --git a/src/components/common/VnDate.vue b/src/components/common/VnDate.vue
new file mode 100644
index 000000000..761ac995e
--- /dev/null
+++ b/src/components/common/VnDate.vue
@@ -0,0 +1,29 @@
+
+
+
+
+
diff --git a/src/components/common/VnInputDate.vue b/src/components/common/VnInputDate.vue
index 3d5afaf80..1aa797ab7 100644
--- a/src/components/common/VnInputDate.vue
+++ b/src/components/common/VnInputDate.vue
@@ -3,6 +3,7 @@ import { onMounted, watch, computed, ref } from 'vue';
import { date } from 'quasar';
import { useI18n } from 'vue-i18n';
import { useAttrs } from 'vue';
+import VnDate from './VnDate.vue';
const model = defineModel({ type: [String, Date] });
const $props = defineProps({
@@ -87,6 +88,11 @@ const styleAttrs = computed(() => {
}
: {};
});
+
+const manageDate = (date) => {
+ formattedDate.value = date;
+ isPopupOpen.value = false;
+};
@@ -129,6 +135,7 @@ const styleAttrs = computed(() => {
/>
{
:no-focus="true"
:no-parent-event="true"
>
- {
- formattedDate = date;
- isPopupOpen = false;
- }
- "
- />
+
+
+
+
diff --git a/src/components/common/VnInputTime.vue b/src/components/common/VnInputTime.vue
index a5e7d3002..6d69bc4a5 100644
--- a/src/components/common/VnInputTime.vue
+++ b/src/components/common/VnInputTime.vue
@@ -3,6 +3,8 @@ import { computed, ref, useAttrs } from 'vue';
import { useI18n } from 'vue-i18n';
import { date } from 'quasar';
import { useValidator } from 'src/composables/useValidator';
+import VnTime from './VnTime.vue';
+
const { validations } = useValidator();
const $attrs = useAttrs();
const model = defineModel({ type: String });
@@ -107,6 +109,7 @@ function dateToTime(newDate) {
/>
-
+
+
+
+
diff --git a/src/components/common/VnTime.vue b/src/components/common/VnTime.vue
new file mode 100644
index 000000000..369f80432
--- /dev/null
+++ b/src/components/common/VnTime.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
diff --git a/src/components/ui/VnImg.vue b/src/components/ui/VnImg.vue
index ceb4e8468..1b57c20d0 100644
--- a/src/components/ui/VnImg.vue
+++ b/src/components/ui/VnImg.vue
@@ -58,7 +58,7 @@ defineExpose({
:class="{ zoomIn: zoom }"
:src="getUrl()"
v-bind="$attrs"
- @click.stop="show = $props.zoom ? true : false"
+ @click.stop="show = $props.zoom"
spinner-color="primary"
/>
diff --git a/test/cypress/integration/ticket/ticketDescriptor.spec.js b/test/cypress/integration/ticket/ticketDescriptor.spec.js
index cc3a1d65a..0ba2723a2 100644
--- a/test/cypress/integration/ticket/ticketDescriptor.spec.js
+++ b/test/cypress/integration/ticket/ticketDescriptor.spec.js
@@ -1,7 +1,8 @@
///
describe('Ticket descriptor', () => {
- const toCloneOpt = '[role="menu"] .q-list > :nth-child(8)';
- const setWeightOpt = '[role="menu"] .q-list > :nth-child(13)';
+ const listItem = '[role="menu"] .q-list .q-item';
+ const toCloneOpt = 'To clone ticket';
+ const setWeightOpt = 'Set weight';
const warehouseValue = ':nth-child(1) > :nth-child(6) > .value > span';
const summaryHeader = '.summaryHeader > div';
const weight = 25;
@@ -14,7 +15,7 @@ describe('Ticket descriptor', () => {
it('should clone the ticket without warehouse', () => {
cy.visit('/#/ticket/1/summary');
cy.openActionsDescriptor();
- cy.get(toCloneOpt).click();
+ cy.contains(listItem, toCloneOpt).click();
cy.clickConfirm();
cy.get(warehouseValue).contains('Warehouse One');
cy.get(summaryHeader)
@@ -28,7 +29,7 @@ describe('Ticket descriptor', () => {
it('should set the weight of the ticket', () => {
cy.visit('/#/ticket/10/summary');
cy.openActionsDescriptor();
- cy.get(setWeightOpt).click();
+ cy.contains(listItem, setWeightOpt).click();
cy.intercept('POST', /\/api\/Tickets\/\d+\/setWeight/).as('weight');
cy.get('.q-dialog input').type(weight);
cy.clickConfirm();
diff --git a/test/cypress/integration/vnComponent/vnLocation.spec.js b/test/cypress/integration/vnComponent/vnLocation.spec.js
index 78dc38899..c1b0cf929 100644
--- a/test/cypress/integration/vnComponent/vnLocation.spec.js
+++ b/test/cypress/integration/vnComponent/vnLocation.spec.js
@@ -64,7 +64,7 @@ describe('VnLocation', () => {
`${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix} > :nth-child(3) > .q-icon`
).click();
cy.get(
- `#q-portal--dialog--4 > .q-dialog > ${createForm.prefix} > .vn-row > .q-select > ${createForm.sufix} > :nth-child(1) input`
+ `#q-portal--dialog--5 > .q-dialog > ${createForm.prefix} > .vn-row > .q-select > ${createForm.sufix} > :nth-child(1) input`
).should('have.value', province);
});
});
@@ -133,6 +133,8 @@ describe('VnLocation', () => {
);
cy.get('.q-mt-lg > .q-btn--standard').click();
cy.get(`${createForm.prefix}`).should('not.exist');
+ cy.waitForElement('.q-form');
+
checkVnLocation(postCode, province);
});
it('Create city', () => {
@@ -144,10 +146,12 @@ describe('VnLocation', () => {
cy.get(
`${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix} > :nth-child(2) > .q-icon`
).click();
- cy.selectOption('#q-portal--dialog--2 .q-select', 'one');
- cy.get('#q-portal--dialog--2 .q-input').type(province);
- cy.get('#q-portal--dialog--2 .q-btn--standard').click();
+ cy.selectOption('#q-portal--dialog--3 .q-select', 'one');
+ cy.get('#q-portal--dialog--3 .q-input').type(province);
+ cy.get('#q-portal--dialog--3 .q-btn--standard').click();
cy.get('#q-portal--dialog--1 .q-btn--standard').click();
+ cy.waitForElement('.q-form');
+
checkVnLocation(postCode, province);
});