"Fix update-version endpoint URL by removing incorrect port specification in Vite configuration."

This commit is contained in:
Jeppe Bundgaard
2025-12-03 08:45:07 +01:00
parent d1446f1435
commit 7a43669ed5
2 changed files with 65 additions and 0 deletions
@@ -328,6 +328,19 @@ const defaultActions = computed(() => {
return !!props.order_id && (SessionUser.canAccessAdmin() || SessionUser.canAccessSuperUser());
},
},
{
icon: 'fas fa-paperclip',
label: 'Vedhæft vaskecertifikat',
clickAction: () => {
return SessionUser.objects.orders.functions.showAttachWashCertificateForm(props.order_id, () => {
props.refreshFunction();
});
},
showFunction: () => {
return !!props.order_id && (SessionUser.canAccessAdmin() || SessionUser.canAccessSuperUser());
},
disabled: false,
},
{
icon: 'fas fa-user-edit',
label: 'Skift kunde',
@@ -588,6 +601,16 @@ const defaultActions = computed(() => {
:click-action="() => SessionUser.functions.redirectTo.user('/orders/' + props.order_id, true)"
:disabled="false"
/>
<!-- Attach wash certificate -->
<action-settings-wheel-item
v-if="SessionUser.canAccessAdmin() || SessionUser.canAccessSuperUser()"
label="Vedhæft vaskecertifikat"
icon="fas fa-paperclip"
:click-action="() => SessionUser.objects.orders.functions.showAttachWashCertificateForm(props.order_id, () => {
props.refreshFunction();
})"
:disabled="false"
/>
<!-- Change the customer (of the order) -->
<action-settings-wheel-item
v-if="SessionUser.canAccessSuperUser()"
@@ -672,6 +672,48 @@ const showChangeOrderInvoiceCollectionForm = async (id) => {
}).catch((error) => {
console.error(error);
});
},
showAttachWashCertificateForm(order_id, onAfterSubmit = null) {
Swal.fire({
title: 'Generér vaskecertifikat',
text: 'Indtast safety seal, hvis relevant:',
input: 'text',
inputLabel: 'Safety Seal',
showCancelButton: true,
confirmButtonText: 'Generér',
cancelButtonText: 'Annuller',
preConfirm: (safety_seal) => {
return SessionUser.request(
'/order/wash-certificate',
'POST',
{
id: parseInt(order_id),
safety_seal: safety_seal
}
).then((response) => {
return response.data.data;
}).catch((error) => {
console.error(error);
Swal.showValidationMessage(
`Fejl ved generering af vaskecertifikat: ${error}`
);
});
},
heightAuto: false,
}).then((result) => {
if (result.isConfirmed) {
Swal.fire({
title: 'Vaskecertifikat genereret',
text: 'Vaskecertifikatet er blevet genereret og vedhæftet ordren.',
icon: 'success',
timer: 2000,
});
// Call the onAfterSubmit function if provided
if (onAfterSubmit) {
onAfterSubmit(result.value);
}
}
});
}
},
/**