Thanks @vladimir-upirov I appreciate your help regardless. This leads me on to another question then can i convert the JSON Logic i have to XML that will be compatible with the UI Builder.
define(‘./pages/Home/components/page/bundle.js’, [], () => ({
/* content /
/ handler:onEnter */
async ‘onEnter’ {
var Active_Truck, Next_Load, item, Current_Truck, Current_Targets, object, Current_Driver, Last_3_Lt, Last_3_MD, Last_Mileage_Of_This_Truck, LiveUser, Current_User;
function generateUUID() {
const chr4 = () => Math.random().toString(16).slice(-4);
const chr8 = () => ${chr4()}${chr4()}
;
const short = () => chr8();
const long = () => ${chr8()}-${chr4()}-${chr4()}-${chr4()}-${chr8()}${chr4()}
;
return { short, long, }
}
function getObjectProperty(object, propPath) {
if (typeof propPath !== ‘string’ || object[propPath] !== undefined) {
return object[propPath]
}
const propsNamesList = propPath.split(‘.’)
let result = object
for (let i = 0; i < propsNamesList.length; i++) {
if (!result || result[propsNamesList[i]] === undefined) {
return
}
result = result[propsNamesList[i]]
}
return result
}
___arguments.context.appData[‘Push_ID’] = (generateUUID().long());
___arguments.context.pageData[‘Current_User’] = (await BackendlessUI.Functions.Custom’fn_5a16854754a90b444dc8e7a6d99bb9e3’);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘b4f6b83bb7c5e5192e3b209be681abb4’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘02c145b9ce792c5ff8b850e9bf7bfd4d’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘016a464b6458cb1718cdb8bb22143bcc’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘61afc62fd67d4c6e6c482533ab87e193’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘09856cb1e0e3377d004ebe96850941f4’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘02c145b9ce792c5ff8b850e9bf7bfd4d’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘6851de2659d546c91cad0cf50f8df812’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘97d9b1b980cde38105c6358ff1767355’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘5a12309e74a3c79eddb8d0ec4d8b9787’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘c797679c6aecc33b668aed8e0dfb1e51’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘c045dae556f37e5e8509a0c96c027057’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘ac96599b2c6296b901f3f523b1a2543f’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘01d4cb6c47e6b82be389dd6929265acf’, true);
Current_User = (await BackendlessUI.Functions.Custom’fn_5a16854754a90b444dc8e7a6d99bb9e3’);
___arguments.context.pageData[‘User_Level’] = (getObjectProperty((await Backendless.UserService.getCurrentUser(false)), ‘User_level’));
___arguments.context.pageData[‘Username’] = (getObjectProperty((await Backendless.UserService.getCurrentUser(false)), ‘displayName’));
___arguments.context.pageData[‘UserDriver’] = (getObjectProperty((await Backendless.UserService.getCurrentUser(false)), ‘displayName’));
LiveUser = (getObjectProperty((await Backendless.UserService.getCurrentUser(false)), ‘objectId’));
if ((getObjectProperty(___arguments.context.pageData, ‘User_Level’)) == ‘Global’) {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘61afc62fd67d4c6e6c482533ab87e193’, true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘09856cb1e0e3377d004ebe96850941f4’, true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘02c145b9ce792c5ff8b850e9bf7bfd4d’, true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘6851de2659d546c91cad0cf50f8df812’, true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘97d9b1b980cde38105c6358ff1767355’, true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘5a12309e74a3c79eddb8d0ec4d8b9787’, true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘c797679c6aecc33b668aed8e0dfb1e51’, true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘c045dae556f37e5e8509a0c96c027057’, true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘ac96599b2c6296b901f3f523b1a2543f’, true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘01d4cb6c47e6b82be389dd6929265acf’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘b4f6b83bb7c5e5192e3b209be681abb4’, true);
} else if ((getObjectProperty(___arguments.context.pageData, ‘User_Level’)) == ‘Driver’) {
console.log(‘1’);
Current_Driver = (await Backendless.Data.of(‘Employees’).find(Backendless.DataQueryBuilder.create().setWhereClause(([‘Employee.displayName = '’,(getObjectProperty((await Backendless.UserService.getCurrentUser(false)), ‘displayName’)),‘'’].join(‘’))).setPageSize(10)))[0];
___arguments.context.pageData[‘Warehouse’] = (getObjectProperty(Current_Driver, ‘Warehouse’));
if ((getObjectProperty(___arguments.context.pageData, ‘Warehouse’)) == null || (getObjectProperty(___arguments.context.pageData, ‘Warehouse’)) == ‘In’) {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘61afc62fd67d4c6e6c482533ab87e193’, true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘61afc62fd67d4c6e6c482533ab87e193’, true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘01d4cb6c47e6b82be389dd6929265acf’, false);
} else {
Active_Truck = (await Backendless.Data.of(‘Vehicles’).find(Backendless.DataQueryBuilder.create().setWhereClause(([‘Driver_1.ownerId = '’,LiveUser,‘'’].join(‘’))).setPageSize(100)))[0];
___arguments.context.pageData[‘Got_Mileage’] = (getObjectProperty(Active_Truck, ‘objectId’));
Last_Mileage_Of_This_Truck = (await Promise.all((await Backendless.Data.of(‘Fuel’).find(Backendless.DataQueryBuilder.create().setWhereClause(([‘reg.objectId = '’,(getObjectProperty(___arguments.context.pageData, ‘Got_Mileage’)),‘'’].join(‘’))).setSortBy(‘mileage’).setPageSize(100))).map(async item => {; return ({ ‘Last Mileage’: (getObjectProperty(item, ‘mileage’)) });})));
___arguments.context.pageData[‘Final_Last_Mileage’] = (Last_Mileage_Of_This_Truck.slice(-1)[0]);
___arguments.context.pageData[‘Reflected_Mileage’] = (Number((getObjectProperty((getObjectProperty(___arguments.context.pageData, ‘Final_Last_Mileage’)), ‘Last Mileage’))));
Last_3_MD = (await Promise.all((await Backendless.Data.of(‘Fuel’).find(Backendless.DataQueryBuilder.create().setWhereClause(([‘reg.objectId = '’,(getObjectProperty(___arguments.context.pageData, ‘Got_Mileage’)),‘'’].join(‘’))).setSortBy(‘created’).setPageSize(100))).map(async item => {; return ({ ‘Mileage Differential’: (getObjectProperty(item, ‘Mileage_Differential’)) });})));
___arguments.context.pageData[‘Final_Last_MD_1’] = (Last_3_MD.slice(-1)[0]);
___arguments.context.pageData[‘Reflected_MD_1’] = (getObjectProperty((getObjectProperty(___arguments.context.pageData, ‘Final_Last_MD_1’)), ‘Mileage Differential’));
___arguments.context.pageData[‘Final_Last_MD_2’] = (Last_3_MD.slice(-2)[0]);
___arguments.context.pageData[‘Reflected_MD_2’] = (Number((getObjectProperty((getObjectProperty(___arguments.context.pageData, ‘Final_Last_MD_2’)), ‘Mileage Differential’))));
___arguments.context.pageData[‘Final_Last_MD_3’] = (Last_3_MD.slice(-3)[0]);
___arguments.context.pageData[‘Reflected_MD_3’] = (Number((getObjectProperty((getObjectProperty(___arguments.context.pageData, ‘Final_Last_MD_3’)), ‘Mileage Differential’))));
___arguments.context.pageData[‘Got_LT’] = undefined;
Last_3_Lt = (await Promise.all((await Backendless.Data.of(‘Fuel’).find(Backendless.DataQueryBuilder.create().setWhereClause(([‘reg.objectId = '’,(getObjectProperty(___arguments.context.pageData, ‘Got_Mileage’)),‘'’].join(‘’))).setSortBy(‘created’).setPageSize(100))).map(async item => {; return ({ 'Last Litres ': (getObjectProperty(item, ‘litres’)) });})));
___arguments.context.pageData[‘Final_Last_LT_1’] = (Last_3_Lt.slice(-1)[0]);
___arguments.context.pageData[‘Reflected_LT_1’] = (Number((getObjectProperty((getObjectProperty(___arguments.context.pageData, ‘Final_Last_LT_1’)), 'Last Litres '))));
___arguments.context.pageData[‘Final_Last_LT_2’] = (Last_3_Lt.slice(-2)[0]);
___arguments.context.pageData[‘Reflected_LT_2’] = (Number((getObjectProperty((getObjectProperty(___arguments.context.pageData, ‘Final_Last_LT_2’)), ‘Last Litres ‘))));
___arguments.context.pageData[‘Final_Last_LT_3’] = (Last_3_Lt.slice(-3)[0]);
___arguments.context.pageData[‘Reflected_LT_3’] = (Number((getObjectProperty((getObjectProperty(___arguments.context.pageData, ‘Final_Last_LT_3’)), ‘Last Litres ‘))));
___arguments.context.pageData[‘Last3_FC’] = (Math.round((((getObjectProperty(___arguments.context.pageData, ‘Reflected_MD_3’)) + (getObjectProperty(___arguments.context.pageData, ‘Reflected_MD_2’)) + (getObjectProperty(___arguments.context.pageData, ‘Reflected_MD_1’))) / ((getObjectProperty(___arguments.context.pageData, ‘Reflected_LT_3’)) + (getObjectProperty(___arguments.context.pageData, ‘Reflected_LT_2’)) + (getObjectProperty(___arguments.context.pageData, ‘Reflected_LT_1’)))) * 1000) / 1000);
___arguments.context.pageData[‘Current_Driver_objectId’] = (getObjectProperty(Current_Driver, ‘objectId’));
Current_Truck = (await Backendless.Data.of(‘Vehicles’).find(Backendless.DataQueryBuilder.create().setWhereClause(([‘Driver_1.objectId = '’,(getObjectProperty(___arguments.context.pageData, ‘Current_Driver_objectId’)),’'’].join(’’))).setPageSize(10)))[0];
___arguments.context.pageData[‘Horse_objectId’] = (getObjectProperty(Current_Truck, ‘objectId’));
if ((getObjectProperty(Active_Truck, ‘Load_Planner_objectId’)) == null) {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘cf92e1a8d8fc3fefef4caa4505c480e7’, false);
}
}
;(function(whereClause) {
const callback = async object => {
___arguments.context.pageData['Current_Truck_PT'] = ((await Promise.all((await Backendless.Data.of('Targets').find(Backendless.DataQueryBuilder.create().setWhereClause((['Registration.objectId = \'',(getObjectProperty(Current_Truck, 'objectId')),'\''].join(''))).setPageSize(10))).map(async item => {; return (getObjectProperty(item, 'Tonnage_Override'));})))[0] == null ? (await Promise.all((await Backendless.Data.of('Targets').find(Backendless.DataQueryBuilder.create().setWhereClause((['Registration.objectId = \'',(getObjectProperty(Current_Truck, 'objectId')),'\''].join(''))).setPageSize(10))).map(async item => {; return (getObjectProperty(item, 'Permissible_Tonnage'));})))[0] : (await Promise.all((await Backendless.Data.of('Targets').find(Backendless.DataQueryBuilder.create().setWhereClause((['Registration.objectId = \'',(getObjectProperty(Current_Truck, 'objectId')),'\''].join(''))).setPageSize(10))).map(async item => {; return (getObjectProperty(item, 'Tonnage_Override'));})))[0]);
console.log('Create');
await new Promise(r => setTimeout(r, 10000 || 0));
Next_Load = (await Promise.all((await Backendless.Data.of('Loads').find(Backendless.DataQueryBuilder.create().setWhereClause((['Horse.objectId = \'',(getObjectProperty(Current_Truck, 'objectId')),'\' And ','Completion_Status = \'0\''].join(''))).setSortBy('Planned_Delivery_Date_Time').setPageSize(10))).map(async item => {; return ({ 'Split_delivery': (getObjectProperty(item, 'Split_delivery')),'Service': (getObjectProperty(item, 'Service')),'Status': (getObjectProperty(item, 'Status')),'load_point': (getObjectProperty(item, 'load_point')),'delivery_point': (getObjectProperty(item, 'delivery_point')),'Planned_Delivery_Date_Time': (getObjectProperty(item, 'Planned_Delivery_Date_Time')) });})))[0];
if ((getObjectProperty(Active_Truck, 'Load_Planner_objectId')) == null) {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('cf92e1a8d8fc3fefef4caa4505c480e7', false);
} else {
if ((getObjectProperty(Next_Load, 'Service')) == 'Yes' && (getObjectProperty(Next_Load, 'Status')) == null) {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('cf92e1a8d8fc3fefef4caa4505c480e7', true);
___arguments.context.pageData['Next_Load'] = (String('Service at ') + String(getObjectProperty(Next_Load, 'load_point')));
} else if ((getObjectProperty(Next_Load, 'Status')) == null) {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('cf92e1a8d8fc3fefef4caa4505c480e7', true);
___arguments.context.pageData['Next_Load'] = (String('Load at ') + String(getObjectProperty(Next_Load, 'load_point')));
await Backendless.Messaging.publish((getObjectProperty(___arguments.context.appData, 'Push_ID')), (String('Load at ') + String(getObjectProperty(Next_Load, 'delivery_point'))), new Backendless.PublishOptions({ 'headers': Object.assign({ }, {}) }), null);
}
if ((getObjectProperty(Next_Load, 'Service')) == 'Yes' && (getObjectProperty(Next_Load, 'Status')) == 'Loaded') {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('cf92e1a8d8fc3fefef4caa4505c480e7', true);
___arguments.context.pageData['Next_Load'] = (String('Complete Service') + String(''));
} else if ((getObjectProperty(Next_Load, 'Status')) == 'Loaded') {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('cf92e1a8d8fc3fefef4caa4505c480e7', true);
___arguments.context.pageData['Next_Load'] = (String('Deliver to ') + String(getObjectProperty(Next_Load, 'delivery_point')));
}
}
};
const rtHandlers = Backendless.Data.of('Loads').rt();
const options = [callback];
if (whereClause) {
options.unshift(whereClause);
}
rtHandlers.addCreateListener.apply(rtHandlers, options);
})('');
;(function(whereClause) {
const callback = async object => {
___arguments.context.pageData['Current_Truck_PT'] = ((await Promise.all((await Backendless.Data.of('Targets').find(Backendless.DataQueryBuilder.create().setWhereClause((['Registration.objectId = \'',(getObjectProperty(Current_Truck, 'objectId')),'\''].join(''))).setPageSize(10))).map(async item => {; return (getObjectProperty(item, 'Tonnage_Override'));})))[0] == null ? (await Promise.all((await Backendless.Data.of('Targets').find(Backendless.DataQueryBuilder.create().setWhereClause((['Registration.objectId = \'',(getObjectProperty(Current_Truck, 'objectId')),'\''].join(''))).setPageSize(10))).map(async item => {; return (getObjectProperty(item, 'Permissible_Tonnage'));})))[0] : (await Promise.all((await Backendless.Data.of('Targets').find(Backendless.DataQueryBuilder.create().setWhereClause((['Registration.objectId = \'',(getObjectProperty(Current_Truck, 'objectId')),'\''].join(''))).setPageSize(10))).map(async item => {; return (getObjectProperty(item, 'Tonnage_Override'));})))[0]);
if ((getObjectProperty(Active_Truck, 'Load_Planner_objectId')) == null) {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('cf92e1a8d8fc3fefef4caa4505c480e7', false);
} else {
console.log('Destroy');
await new Promise(r => setTimeout(r, 10000 || 0));
Next_Load = (await Promise.all((await Backendless.Data.of('Loads').find(Backendless.DataQueryBuilder.create().setWhereClause((['Horse.objectId = \'',(getObjectProperty(Current_Truck, 'objectId')),'\' And ','Completion_Status = \'0\''].join(''))).setSortBy('Planned_Delivery_Date_Time').setPageSize(10))).map(async item => {; return ({ 'Split_delivery': (getObjectProperty(item, 'Split_delivery')),'Service': (getObjectProperty(item, 'Service')),'Status': (getObjectProperty(item, 'Status')),'load_point': (getObjectProperty(item, 'load_point')),'delivery_point': (getObjectProperty(item, 'delivery_point')),'Planned_Delivery_Date_Time': (getObjectProperty(item, 'Planned_Delivery_Date_Time')) });})))[0];
if (Next_Load == null) {
___arguments.context.pageData['Next_Load'] = (String('No Loads'));
}
if ((getObjectProperty(Next_Load, 'Service')) == 'Yes' && (getObjectProperty(Next_Load, 'Status')) == null) {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('cf92e1a8d8fc3fefef4caa4505c480e7', true);
___arguments.context.pageData['Next_Load'] = (String('Service at ') + String(getObjectProperty(Next_Load, 'load_point')));
} else if ((getObjectProperty(Next_Load, 'Status')) == null) {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('cf92e1a8d8fc3fefef4caa4505c480e7', true);
___arguments.context.pageData['Next_Load'] = (String('Load at ') + String(getObjectProperty(Next_Load, 'load_point')));
}
if ((getObjectProperty(Next_Load, 'Service')) == 'Yes' && (getObjectProperty(Next_Load, 'Status')) == 'Loaded') {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('cf92e1a8d8fc3fefef4caa4505c480e7', true);
___arguments.context.pageData['Next_Load'] = (String('Complete Service') + String(''));
} else if ((getObjectProperty(Next_Load, 'Status')) == 'Loaded') {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('cf92e1a8d8fc3fefef4caa4505c480e7', true);
___arguments.context.pageData['Next_Load'] = (String('Deliver to ') + String(getObjectProperty(Next_Load, 'delivery_point')));
}
}
};
const rtHandlers = Backendless.Data.of('Loads').rt();
const options = [callback];
if (whereClause) {
options.unshift(whereClause);
}
rtHandlers.addDeleteListener.apply(rtHandlers, options);
})('');
;(function(whereClause) {
const callback = async object => {
___arguments.context.pageData['Current_Truck_PT'] = ((await Promise.all((await Backendless.Data.of('Targets').find(Backendless.DataQueryBuilder.create().setWhereClause((['Registration.objectId = \'',(getObjectProperty(Current_Truck, 'objectId')),'\''].join(''))).setPageSize(10))).map(async item => {; return (getObjectProperty(item, 'Tonnage_Override'));})))[0] == null ? (await Promise.all((await Backendless.Data.of('Targets').find(Backendless.DataQueryBuilder.create().setWhereClause((['Registration.objectId = \'',(getObjectProperty(Current_Truck, 'objectId')),'\''].join(''))).setPageSize(10))).map(async item => {; return (getObjectProperty(item, 'Permissible_Tonnage'));})))[0] : (await Promise.all((await Backendless.Data.of('Targets').find(Backendless.DataQueryBuilder.create().setWhereClause((['Registration.objectId = \'',(getObjectProperty(Current_Truck, 'objectId')),'\''].join(''))).setPageSize(10))).map(async item => {; return (getObjectProperty(item, 'Tonnage_Override'));})))[0]);
if ((getObjectProperty(Active_Truck, 'Load_Planner_objectId')) == null) {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('cf92e1a8d8fc3fefef4caa4505c480e7', false);
} else {
Next_Load = (await Promise.all((await Backendless.Data.of('Loads').find(Backendless.DataQueryBuilder.create().setWhereClause((['Horse.objectId = \'',(getObjectProperty(Current_Truck, 'objectId')),'\' And ','Completion_Status = \'0\''].join(''))).setSortBy('Planned_Delivery_Date_Time').setPageSize(10))).map(async item => {; return ({ 'Split_delivery': (getObjectProperty(item, 'Split_delivery')),'Service': (getObjectProperty(item, 'Service')),'Status': (getObjectProperty(item, 'Status')),'load_point': (getObjectProperty(item, 'load_point')),'delivery_point': (getObjectProperty(item, 'delivery_point')),'Planned_Delivery_Date_Time': (getObjectProperty(item, 'Planned_Delivery_Date_Time')) });})))[0];
if (Next_Load.length == 0) {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('cf92e1a8d8fc3fefef4caa4505c480e7', true);
} else {
if ((getObjectProperty(Next_Load, 'Service')) == 'Yes' && (getObjectProperty(Next_Load, 'Status')) == null) {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('cf92e1a8d8fc3fefef4caa4505c480e7', true);
___arguments.context.pageData['Next_Load'] = (String('Service at ') + String(getObjectProperty(Next_Load, 'load_point')));
} else if ((getObjectProperty(Next_Load, 'Status')) == null) {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('cf92e1a8d8fc3fefef4caa4505c480e7', true);
___arguments.context.pageData['Next_Load'] = (String('Load at ') + String(getObjectProperty(Next_Load, 'load_point')));
}
if ((getObjectProperty(Next_Load, 'Service')) == 'Yes' && (getObjectProperty(Next_Load, 'Status')) == 'Loaded') {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('cf92e1a8d8fc3fefef4caa4505c480e7', true);
___arguments.context.pageData['Next_Load'] = (String('Complete Service') + String(''));
} else if ((getObjectProperty(Next_Load, 'Status')) == 'Loaded') {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('cf92e1a8d8fc3fefef4caa4505c480e7', true);
___arguments.context.pageData['Next_Load'] = (String('Deliver to ') + String(getObjectProperty(Next_Load, 'delivery_point')));
}
}
}
};
const rtHandlers = Backendless.Data.of('Loads').rt();
const options = [callback];
if (whereClause) {
options.unshift(whereClause);
}
rtHandlers.addUpdateListener.apply(rtHandlers, options);
})('');
;(function(whereClause) {
const callback = async object => {
___arguments.context.pageData['Current_Truck_PT'] = ((await Promise.all((await Backendless.Data.of('Targets').find(Backendless.DataQueryBuilder.create().setWhereClause((['Registration.objectId = \'',(getObjectProperty(Current_Truck, 'objectId')),'\''].join(''))).setPageSize(10))).map(async item => {; return (getObjectProperty(item, 'Tonnage_Override'));})))[0] == null ? (await Promise.all((await Backendless.Data.of('Targets').find(Backendless.DataQueryBuilder.create().setWhereClause((['Registration.objectId = \'',(getObjectProperty(Current_Truck, 'objectId')),'\''].join(''))).setPageSize(10))).map(async item => {; return (getObjectProperty(item, 'Permissible_Tonnage'));})))[0] : (await Promise.all((await Backendless.Data.of('Targets').find(Backendless.DataQueryBuilder.create().setWhereClause((['Registration.objectId = \'',(getObjectProperty(Current_Truck, 'objectId')),'\''].join(''))).setPageSize(10))).map(async item => {; return (getObjectProperty(item, 'Tonnage_Override'));})))[0]);
Current_Targets = (await Backendless.Data.of('Targets').find(Backendless.DataQueryBuilder.create().setWhereClause((['Registration.Horse_Registration = \'',(getObjectProperty(___arguments.context.pageData, 'Current_Truck_Horse_Registration')),'\''].join(''))).setPageSize(10)))[0];
___arguments.context.pageData['Current_Truck_Km/L'] = (getObjectProperty(Current_Targets, 'Ideal_Fuel_Consumption'));
};
const rtHandlers = Backendless.Data.of('Targets').rt();
const options = [callback];
if (whereClause) {
options.unshift(whereClause);
}
rtHandlers.addUpdateListener.apply(rtHandlers, options);
})('');
try {
if ((getObjectProperty(((await Promise.all((await Backendless.Data.of('Loads').find(Backendless.DataQueryBuilder.create().setWhereClause((['Horse.objectId = \'',(getObjectProperty(Current_Truck, 'objectId')),'\' And ','Completion_Status = \'0\''].join(''))).setSortBy('Planned_Delivery_Date_Time').setPageSize(10))).map(async item => {; return ({ 'Split_delivery': (getObjectProperty(item, 'Split_delivery')),'Service': (getObjectProperty(item, 'Service')),'Status': (getObjectProperty(item, 'Status')),'load_point': (getObjectProperty(item, 'load_point')),'delivery_point': (getObjectProperty(item, 'delivery_point')),'Planned_Delivery_Date_Time': (getObjectProperty(item, 'Planned_Delivery_Date_Time')) });})))[0]), 'Planned_Delivery_Date_Time')) == null) {
Next_Load = (await Promise.all((await Backendless.Data.of('Loads').find(Backendless.DataQueryBuilder.create().setWhereClause((['Horse.objectId = \'',(getObjectProperty(Current_Truck, 'objectId')),'\' And ','Completion_Status = \'0\''].join(''))).setSortBy('Planned_Delivery_Date_Time').setPageSize(10))).map(async item => {; return ({ 'Split_delivery': (getObjectProperty(item, 'Split_delivery')),'Service': (getObjectProperty(item, 'Service')),'Status': (getObjectProperty(item, 'Status')),'load_point': (getObjectProperty(item, 'load_point')),'delivery_point': (getObjectProperty(item, 'delivery_point')),'Planned_Delivery_Date_Time': (getObjectProperty(item, 'Planned_Delivery_Date_Time')) });})))[1];
console.log(Next_Load);
} else {
console.log(Next_Load);
Next_Load = (await Promise.all((await Backendless.Data.of('Loads').find(Backendless.DataQueryBuilder.create().setWhereClause((['Horse.objectId = \'',(getObjectProperty(Current_Truck, 'objectId')),'\' And ','Completion_Status = \'0\''].join(''))).setSortBy('Planned_Delivery_Date_Time').setPageSize(10))).map(async item => {; return ({ 'Split_delivery': (getObjectProperty(item, 'Split_delivery')),'Service': (getObjectProperty(item, 'Service')),'Status': (getObjectProperty(item, 'Status')),'load_point': (getObjectProperty(item, 'load_point')),'delivery_point': (getObjectProperty(item, 'delivery_point')),'Planned_Delivery_Date_Time': (getObjectProperty(item, 'Planned_Delivery_Date_Time')) });})))[0];
}
} catch (error) {
}
___arguments.context.pageData['Current_Truck_Horse_Registration'] = (getObjectProperty(Current_Truck, 'Horse_Registration'));
Current_Targets = (await Backendless.Data.of('Targets').find(Backendless.DataQueryBuilder.create().setWhereClause((['Registration.Horse_Registration = \'',(getObjectProperty(___arguments.context.pageData, 'Current_Truck_Horse_Registration')),'\''].join(''))).setPageSize(10)))[0];
___arguments.context.pageData['Current_Truck_Km/L'] = (getObjectProperty(Current_Targets, 'Ideal_Fuel_Consumption'));
___arguments.context.pageData['Current_Truck_PT'] = ((await Promise.all((await Backendless.Data.of('Targets').find(Backendless.DataQueryBuilder.create().setWhereClause((['Registration.objectId = \'',(getObjectProperty(Current_Truck, 'objectId')),'\''].join(''))).setPageSize(10))).map(async item => {; return (getObjectProperty(item, 'Tonnage_Override'));})))[0] == null ? (await Promise.all((await Backendless.Data.of('Targets').find(Backendless.DataQueryBuilder.create().setWhereClause((['Registration.objectId = \'',(getObjectProperty(Current_Truck, 'objectId')),'\''].join(''))).setPageSize(10))).map(async item => {; return (getObjectProperty(item, 'Permissible_Tonnage'));})))[0] : (await Promise.all((await Backendless.Data.of('Targets').find(Backendless.DataQueryBuilder.create().setWhereClause((['Registration.objectId = \'',(getObjectProperty(Current_Truck, 'objectId')),'\''].join(''))).setPageSize(10))).map(async item => {; return (getObjectProperty(item, 'Tonnage_Override'));})))[0]);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('01d4cb6c47e6b82be389dd6929265acf', false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('02c145b9ce792c5ff8b850e9bf7bfd4d', true);
if ((getObjectProperty(___arguments.context.pageData, 'Current_Truck_Horse_Registration')) != null) {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('016a464b6458cb1718cdb8bb22143bcc', true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('c797679c6aecc33b668aed8e0dfb1e51', true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('09856cb1e0e3377d004ebe96850941f4', true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('6851de2659d546c91cad0cf50f8df812', true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('97d9b1b980cde38105c6358ff1767355', false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('02c145b9ce792c5ff8b850e9bf7bfd4d', true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('5a12309e74a3c79eddb8d0ec4d8b9787', false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('61afc62fd67d4c6e6c482533ab87e193', false);
} else {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('016a464b6458cb1718cdb8bb22143bcc', false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('61afc62fd67d4c6e6c482533ab87e193', true);
}
if ((getObjectProperty(___arguments.context.pageData, 'Current_Truck_Horse_Registration')) != null) {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('016a464b6458cb1718cdb8bb22143bcc', true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('c797679c6aecc33b668aed8e0dfb1e51', true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('09856cb1e0e3377d004ebe96850941f4', true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('6851de2659d546c91cad0cf50f8df812', true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('97d9b1b980cde38105c6358ff1767355', false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('02c145b9ce792c5ff8b850e9bf7bfd4d', true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('5a12309e74a3c79eddb8d0ec4d8b9787', false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('61afc62fd67d4c6e6c482533ab87e193', false);
} else {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('016a464b6458cb1718cdb8bb22143bcc', false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('61afc62fd67d4c6e6c482533ab87e193', true);
}
if ((getObjectProperty(Next_Load, 'Service')) == 'Yes' && (getObjectProperty(Next_Load, 'Status')) == null) {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('cf92e1a8d8fc3fefef4caa4505c480e7', true);
___arguments.context.pageData['Next_Load'] = (String('Service at ') + String(getObjectProperty(Next_Load, 'load_point')));
} else if ((getObjectProperty(Next_Load, 'Status')) == null) {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('cf92e1a8d8fc3fefef4caa4505c480e7', true);
___arguments.context.pageData['Next_Load'] = (String('Load at ') + String(getObjectProperty(Next_Load, 'load_point')));
}
if ((getObjectProperty(Next_Load, 'Service')) == 'Yes' && (getObjectProperty(Next_Load, 'Status')) == 'Loaded') {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('cf92e1a8d8fc3fefef4caa4505c480e7', true);
___arguments.context.pageData['Next_Load'] = (String('Complete Service') + String(''));
} else if ((getObjectProperty(Next_Load, 'Status')) == 'Loaded') {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === 'boolean' ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })('cf92e1a8d8fc3fefef4caa4505c480e7', true);
___arguments.context.pageData['Next_Load'] = (String('Deliver to ') + String(getObjectProperty(Next_Load, 'delivery_point')));
}
} else if ((getObjectProperty(___arguments.context.pageData, ‘User_Level’)) == ‘Director’) {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘02c145b9ce792c5ff8b850e9bf7bfd4d’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘016a464b6458cb1718cdb8bb22143bcc’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘61afc62fd67d4c6e6c482533ab87e193’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘09856cb1e0e3377d004ebe96850941f4’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘6851de2659d546c91cad0cf50f8df812’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘97d9b1b980cde38105c6358ff1767355’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘5a12309e74a3c79eddb8d0ec4d8b9787’, true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘c797679c6aecc33b668aed8e0dfb1e51’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘c045dae556f37e5e8509a0c96c027057’, true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘ac96599b2c6296b901f3f523b1a2543f’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘8774b813ba8d9998e19d4fb5c15e150c’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘8b480d6e1a55cddfa5c69531c1feb3b2’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘01d4cb6c47e6b82be389dd6929265acf’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘b4f6b83bb7c5e5192e3b209be681abb4’, true);
} else if ((getObjectProperty(___arguments.context.pageData, ‘User_Level’)) == ‘Load Planner’) {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘02c145b9ce792c5ff8b850e9bf7bfd4d’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘016a464b6458cb1718cdb8bb22143bcc’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘61afc62fd67d4c6e6c482533ab87e193’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘09856cb1e0e3377d004ebe96850941f4’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘02c145b9ce792c5ff8b850e9bf7bfd4d’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘6851de2659d546c91cad0cf50f8df812’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘97d9b1b980cde38105c6358ff1767355’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘5a12309e74a3c79eddb8d0ec4d8b9787’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘c797679c6aecc33b668aed8e0dfb1e51’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘c045dae556f37e5e8509a0c96c027057’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘ac96599b2c6296b901f3f523b1a2543f’, true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘8774b813ba8d9998e19d4fb5c15e150c’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘8b480d6e1a55cddfa5c69531c1feb3b2’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘01d4cb6c47e6b82be389dd6929265acf’, false);
} else if ((getObjectProperty(___arguments.context.pageData, ‘User_Level’)) == ‘Mechanic’) {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘02c145b9ce792c5ff8b850e9bf7bfd4d’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘016a464b6458cb1718cdb8bb22143bcc’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘61afc62fd67d4c6e6c482533ab87e193’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘09856cb1e0e3377d004ebe96850941f4’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘02c145b9ce792c5ff8b850e9bf7bfd4d’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘6851de2659d546c91cad0cf50f8df812’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘97d9b1b980cde38105c6358ff1767355’, true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘5a12309e74a3c79eddb8d0ec4d8b9787’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘c797679c6aecc33b668aed8e0dfb1e51’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘c045dae556f37e5e8509a0c96c027057’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘ac96599b2c6296b901f3f523b1a2543f’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘01d4cb6c47e6b82be389dd6929265acf’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘b4f6b83bb7c5e5192e3b209be681abb4’, true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘531abda663a90464cfc9f23ba6ea6a4d’, false);
} else if ((getObjectProperty(___arguments.context.pageData, ‘User_Level’)) == ‘Admin’) {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘02c145b9ce792c5ff8b850e9bf7bfd4d’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘016a464b6458cb1718cdb8bb22143bcc’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘61afc62fd67d4c6e6c482533ab87e193’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘09856cb1e0e3377d004ebe96850941f4’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘02c145b9ce792c5ff8b850e9bf7bfd4d’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘6851de2659d546c91cad0cf50f8df812’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘97d9b1b980cde38105c6358ff1767355’, true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘5a12309e74a3c79eddb8d0ec4d8b9787’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘c797679c6aecc33b668aed8e0dfb1e51’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘c045dae556f37e5e8509a0c96c027057’, true);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘ac96599b2c6296b901f3f523b1a2543f’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘01d4cb6c47e6b82be389dd6929265acf’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘8774b813ba8d9998e19d4fb5c15e150c’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘8b480d6e1a55cddfa5c69531c1feb3b2’, false);
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘b4f6b83bb7c5e5192e3b209be681abb4’, true);
}
if ((getObjectProperty(Active_Truck, ‘Load_Planner_objectId’)) == null) {
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘cf92e1a8d8fc3fefef4caa4505c480e7’, false);
}
(function (componentUid, visible) { (function(component){ component.display = !!(typeof visible === ‘boolean’ ? visible : !component.display ) })(___arguments.context.getComponentByUid(componentUid)) })(‘01d4cb6c47e6b82be389dd6929265acf’, false);
},
/* handler:onEnter */