refactor(labeling): moved bookin fails inside bookin as it could be off
This commit is contained in:
@@ -277,26 +277,26 @@ export const labelingProcess = async ({
|
||||
let book: any = [];
|
||||
if (bookin[0].value === "1") {
|
||||
book = await bookInLabel(label.data);
|
||||
|
||||
if (!book.success) {
|
||||
// createLog(
|
||||
// "error",
|
||||
// "labeling",
|
||||
// "ocp",
|
||||
// `Error Booking in label: ${book.errors[0].message}`
|
||||
// );
|
||||
return {
|
||||
success: false,
|
||||
message: `Error Booking in label: ${book.errors[0]?.message}`,
|
||||
data: book,
|
||||
};
|
||||
}
|
||||
} else {
|
||||
createLog("info", "labeling", "ocp", "Bookin is turned off.");
|
||||
|
||||
// will add later!!! :P
|
||||
}
|
||||
|
||||
if (!book.success) {
|
||||
// createLog(
|
||||
// "error",
|
||||
// "labeling",
|
||||
// "ocp",
|
||||
// `Error Booking in label: ${book.errors[0].message}`
|
||||
// );
|
||||
return {
|
||||
success: false,
|
||||
message: `Error Booking in label: ${book.errors[0].message}`,
|
||||
data: book,
|
||||
};
|
||||
}
|
||||
|
||||
// inhouse - if the inhouse funtion is turned on we will deliver to inhouse as long as we did not hit an error state
|
||||
const inhouseDelivery = settingData.filter(
|
||||
(s) => s.name === "inhouseDelivery"
|
||||
|
||||
Reference in New Issue
Block a user