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