diff --git a/src/components/common/VnDateBadge.vue b/src/components/common/VnDateBadge.vue
new file mode 100644
index 00000000000..fd6c9e8a4bd
--- /dev/null
+++ b/src/components/common/VnDateBadge.vue
@@ -0,0 +1,31 @@
+
+
+
+ {{ formatShippedDate(date) }}
+
+
diff --git a/src/components/ui/CardDescriptor.vue b/src/components/ui/CardDescriptor.vue
index 83af774426c..f4c0091d2c1 100644
--- a/src/components/ui/CardDescriptor.vue
+++ b/src/components/ui/CardDescriptor.vue
@@ -222,8 +222,8 @@ const toModule = computed(() =>
/>
-
-
diff --git a/src/pages/Item/Card/ItemSummary.vue b/src/pages/Item/Card/ItemSummary.vue
index 7606e6a22db..e1b97d7c994 100644
--- a/src/pages/Item/Card/ItemSummary.vue
+++ b/src/pages/Item/Card/ItemSummary.vue
@@ -46,7 +46,7 @@ const getUrl = (id, param) => `#/Item/${id}/${param}`;
[
},
]);
-const getBadgeAttrs = (date) => {
- let today = Date.vnNew();
- today.setHours(0, 0, 0, 0);
- let timeTicket = new Date(date);
- timeTicket.setHours(0, 0, 0, 0);
-
- let timeDiff = today - timeTicket;
-
- if (timeDiff == 0) return { color: 'warning', 'text-color': 'black' };
- if (timeDiff < 0) return { color: 'success', 'text-color': 'black' };
- return { color: 'transparent', 'text-color': 'white' };
-};
-
let refreshTimer = null;
const autoRefreshHandler = (value) => {
@@ -322,14 +309,6 @@ const totalPriceColor = (ticket) => {
if (total > 0 && total < 50) return 'warning';
};
-const formatShippedDate = (date) => {
- if (!date) return '-';
- const dateSplit = date.split('T');
- const [year, month, day] = dateSplit[0].split('-');
- const newDate = new Date(year, month - 1, day);
- return toDateFormat(newDate);
-};
-
const openTab = (id) =>
window.open(`#/ticket/${id}/sale`, '_blank', 'noopener, noreferrer');
@@ -443,13 +422,7 @@ const openTab = (id) =>
-
- {{ formatShippedDate(row.shippedDate) }}
-
+
diff --git a/src/pages/Worker/Card/WorkerDescriptor.vue b/src/pages/Worker/Card/WorkerDescriptor.vue
index 73ea34fe90c..f09aec81607 100644
--- a/src/pages/Worker/Card/WorkerDescriptor.vue
+++ b/src/pages/Worker/Card/WorkerDescriptor.vue
@@ -10,6 +10,7 @@ import { useState } from 'src/composables/useState';
import axios from 'axios';
import VnImg from 'src/components/ui/VnImg.vue';
import EditPictureForm from 'components/EditPictureForm.vue';
+import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue';
const $props = defineProps({
id: {
@@ -143,10 +144,14 @@ const handlePhotoUpdated = (evt = false) => {
:value="entity.user?.emailUser?.email"
copy
/>
-
+
+
+
+
+
+
{{ t('globals.phone') }}
diff --git a/test/cypress/integration/item/itemLastEntries.spec.js b/test/cypress/integration/item/itemLastEntries.spec.js
new file mode 100644
index 00000000000..c94cfa4800f
--- /dev/null
+++ b/test/cypress/integration/item/itemLastEntries.spec.js
@@ -0,0 +1,20 @@
+describe('ItemLastEntries', () => {
+ beforeEach(() => {
+ cy.viewport(1280, 720);
+ cy.login('buyer');
+ cy.visit('/#/item/1/last-entries');
+ cy.intercept('GET', /.*lastEntriesFilter/).as('item');
+ cy.waitForElement('tbody');
+ });
+
+ it('should filter by agency', () => {
+ cy.get('tbody > tr')
+ .its('length')
+ .then((rowCount) => {
+ cy.get('[data-cy="hideInventory"]').click();
+ cy.wait('@item');
+ cy.waitForElement('tbody');
+ cy.get('tbody > tr').should('have.length.greaterThan', rowCount);
+ });
+ });
+});