Merge branch 'dev' into 8193-AddFilterInClientNotes
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jon Elias 2025-03-20 06:57:56 +00:00
commit 921af7abda
3 changed files with 24 additions and 28 deletions

2
Jenkinsfile vendored
View File

@ -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

View File

@ -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() {
</QItem>
</template>
</VnSelect>
<VnSelect
<VnSelect
:disable="!client"
:options="addressesOptions"
:fields="['id', 'nickname']"
@ -815,7 +814,7 @@ async function ticketToRestore() {
en:
addTurn: Add turn
invoiceIds: "Invoices have been generated with the following ids: {invoiceIds}"
es:
Show Delivery Note...: Ver albarán...
Send Delivery Note...: Enviar albarán...

View File

@ -340,25 +340,20 @@ async function makeInvoice(ticket) {
});
}
async function sendDocuware(ticket) {
try {
let ticketIds = ticket.map((item) => 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) {