diff --git a/Jenkinsfile b/Jenkinsfile index 2f11556b5d7..7f4144a5485 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -115,6 +115,7 @@ pipeline { steps { script { sh 'rm -f junit/e2e-*.xml' + sh 'rm -rf test/cypress/screenshots' env.COMPOSE_TAG = PROTECTED_BRANCH.contains(env.CHANGE_TARGET) ? env.CHANGE_TARGET : 'dev' def image = docker.build('lilium-dev', '-f docs/Dockerfile.dev docs') @@ -132,6 +133,7 @@ pipeline { post { always { sh "docker-compose ${env.COMPOSE_PARAMS} down -v" + archiveArtifacts artifacts: 'test/cypress/screenshots/**/*', allowEmptyArchive: true junit( testResults: 'junit/e2e-*.xml', allowEmptyResults: true diff --git a/src/components/common/VnLog.vue b/src/components/common/VnLog.vue index 8f106a9f124..136dbf2a438 100644 --- a/src/components/common/VnLog.vue +++ b/src/components/common/VnLog.vue @@ -10,7 +10,7 @@ import { useColor } from 'src/composables/useColor'; import { useCapitalize } from 'src/composables/useCapitalize'; import { useValidator } from 'src/composables/useValidator'; import VnAvatar from '../ui/VnAvatar.vue'; -import VnJsonValue from '../common/VnJsonValue.vue'; +import VnLogValue from './VnLogValue.vue'; import FetchData from '../FetchData.vue'; import VnSelect from './VnSelect.vue'; import VnUserLink from '../ui/VnUserLink.vue'; @@ -560,10 +560,11 @@ watch( value.nameI18n }}: - @@ -614,7 +615,11 @@ watch( > {{ prop.nameI18n }}: - + + - → - - +import { useDescriptorStore } from 'src/stores/useDescriptorStore'; +import VnJsonValue from './VnJsonValue.vue'; +import { computed } from 'vue'; +const descriptorStore = useDescriptorStore(); + +const $props = defineProps({ + name: { type: [String], default: undefined }, +}); + +const descriptor = computed(() => descriptorStore.has($props.name)); + + + + + + diff --git a/src/components/common/__tests__/VnLogValue.spec.js b/src/components/common/__tests__/VnLogValue.spec.js new file mode 100644 index 00000000000..c23743a02e8 --- /dev/null +++ b/src/components/common/__tests__/VnLogValue.spec.js @@ -0,0 +1,26 @@ +import { describe, it, expect } from 'vitest'; +import VnLogValue from 'src/components/common/VnLogValue.vue'; +import { createWrapper } from 'app/test/vitest/helper'; + +const buildComponent = (props) => { + return createWrapper(VnLogValue, { + props, + global: {}, + }).wrapper; +}; + +describe('VnLogValue', () => { + const id = 1; + it('renders without descriptor', async () => { + expect(getIcon('inventFk').exists()).toBe(false); + }); + + it('renders with descriptor', async () => { + expect(getIcon('claimFk').text()).toBe('launch'); + }); + + function getIcon(name) { + const wrapper = buildComponent({ value: { val: id }, name }); + return wrapper.find('.q-icon'); + } +}); diff --git a/src/pages/Account/Card/AccountDescriptorProxy.vue b/src/pages/Account/Card/AccountDescriptorProxy.vue new file mode 100644 index 00000000000..de3220fea32 --- /dev/null +++ b/src/pages/Account/Card/AccountDescriptorProxy.vue @@ -0,0 +1,14 @@ + + + + + + diff --git a/src/pages/Claim/Card/ClaimDescriptorProxy.vue b/src/pages/Claim/Card/ClaimDescriptorProxy.vue new file mode 100644 index 00000000000..78e6867456c --- /dev/null +++ b/src/pages/Claim/Card/ClaimDescriptorProxy.vue @@ -0,0 +1,14 @@ + + + + + + diff --git a/src/pages/Ticket/Card/TicketDescriptorMenu.vue b/src/pages/Ticket/Card/TicketDescriptorMenu.vue index 63e45c8abea..f7389b59220 100644 --- a/src/pages/Ticket/Card/TicketDescriptorMenu.vue +++ b/src/pages/Ticket/Card/TicketDescriptorMenu.vue @@ -32,7 +32,7 @@ onMounted(() => { watch( () => props.ticket, - () => restoreTicket + () => restoreTicket, ); const { push, currentRoute } = useRouter(); @@ -58,7 +58,7 @@ const hasDocuwareFile = ref(); const quasar = useQuasar(); const canRestoreTicket = ref(false); -const onClientSelected = async(clientId) =>{ +const onClientSelected = async (clientId) => { client.value = clientId; await fetchClient(); await fetchAddresses(); @@ -66,10 +66,10 @@ const onClientSelected = async(clientId) =>{ const onAddressSelected = (addressId) => { address.value = addressId; -} +}; const fetchClient = async () => { - const response = await getClient(client.value) + const response = await getClient(client.value); if (!response) return; const [retrievedClient] = response.data; selectedClient.value = retrievedClient; @@ -151,7 +151,7 @@ function openDeliveryNote(type = 'deliveryNote', documentType = 'pdf') { recipientId: ticket.value.clientFk, type: type, }, - '_blank' + '_blank', ); } @@ -297,8 +297,8 @@ async function transferClient() { clientFk: client.value, addressFk: address.value, }; - - await axios.patch( `Tickets/${ticketId.value}/transferClient`, params ); + + await axios.patch(`Tickets/${ticketId.value}/transferClient`, params); window.location.reload(); } @@ -339,7 +339,7 @@ async function changeShippedHour(time) { const { data } = await axios.post( `Tickets/${ticketId.value}/updateEditableTicket`, - params + params, ); if (data) window.location.reload(); @@ -405,8 +405,7 @@ async function uploadDocuware(force) { uploadDocuware(true); }); - const { data } = await axios.post(`Docuwares/upload`, { - fileCabinet: 'deliveryNote', + const { data } = await axios.post(`Docuwares/upload-delivery-note`, { ticketIds: [parseInt(ticketId.value)], }); @@ -500,7 +499,7 @@ async function ticketToRestore() { - item.id); +async function sendDocuware(tickets) { + let ticketIds = tickets.map((item) => item.id); - const { data } = await axios.post(`Docuwares/upload`, { - fileCabinet: 'deliveryNote', - ticketIds, - }); + const { data } = await axios.post(`Docuwares/upload-delivery-note`, { + ticketIds, + }); - for (let ticket of ticketIds) { - ticket.stateFk = data.id; - ticket.state = data.name; - ticket.alertLevel = data.alertLevel; - ticket.alertLevelCode = data.code; - } - notify('globals.dataSaved', 'positive'); - } catch (err) { - console.err('err: ', err); + for (let ticket of tickets) { + ticket.stateFk = data.id; + ticket.state = data.name; + ticket.alertLevel = data.alertLevel; + ticket.alertLevelCode = data.code; } + notify('globals.dataSaved', 'positive'); } function openBalanceDialog(ticket) { diff --git a/src/pages/Zone/Card/ZoneEventExclusionForm.vue b/src/pages/Zone/Card/ZoneEventExclusionForm.vue index 3828c998f2f..582a8bbadd7 100644 --- a/src/pages/Zone/Card/ZoneEventExclusionForm.vue +++ b/src/pages/Zone/Card/ZoneEventExclusionForm.vue @@ -1,16 +1,18 @@ @@ -206,6 +225,28 @@ const exprBuilder = (param, value) => { }" > + + + + + {{ t('list.includeEvent') }} + + + {{ t('list.excludeEvent') }} + + + + { formInitialData: {}, }" table-height="85vh" + v-model:selected="selectedRows" + :table="{ + 'row-key': 'id', + selection: 'multiple', + }" > {{ dashIfEmpty(formatRow(row)) }} @@ -271,6 +317,21 @@ const exprBuilder = (param, value) => { + + + +