Fixed slight bug in void system
This commit is contained in:
15
Program.fs
15
Program.fs
@@ -17,11 +17,14 @@ module Program =
|
||||
forward "/install" DredgePos.Installer.Router.router
|
||||
}
|
||||
|
||||
let app = application {
|
||||
use_mime_types [(".woff", "application/font-woff")]
|
||||
use_static "wwwroot"
|
||||
use_router router
|
||||
url "http://0.0.0.0:5001"
|
||||
}
|
||||
let app =
|
||||
let ipAddress = System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName()).AddressList[2];
|
||||
printf $"DredgePOS is now running at http://{ipAddress}:5001\n"
|
||||
application {
|
||||
use_mime_types [(".woff", "application/font-woff")]
|
||||
use_static "wwwroot"
|
||||
use_router router
|
||||
url "http://0.0.0.0:5001"
|
||||
}
|
||||
|
||||
run app
|
||||
|
||||
@@ -123,7 +123,9 @@ const setItemQty = (orderItem: orderItem, qty: number) => {
|
||||
const instructionIds = getInstructionItems(orderItem.id).map(orderItem => orderItem.id)
|
||||
|
||||
if(qty < 1){
|
||||
const newItems = OrderScreen.order_items.filter(existingOrderItem => existingOrderItem.id != orderItem.id)
|
||||
const newItems = OrderScreen.order_items.filter(existingOrderItem =>
|
||||
(existingOrderItem.id != orderItem.id) && !instructionIds.includes(existingOrderItem.id)
|
||||
)
|
||||
|
||||
OrderScreen.selected_item_ids = array_remove(OrderScreen.selected_item_ids, orderItem.id)
|
||||
if(orderItem.item.item_type == "item") {
|
||||
@@ -459,13 +461,13 @@ const scrollToElement = (JQueryElement: JQuery) => {
|
||||
const element = JQueryElement.get()[0]
|
||||
const container = JQueryElement.closest('.orderBox').get()[0]
|
||||
const containerTop = $(container).scrollTop()
|
||||
const containerBottom = containerTop + $(container).height();
|
||||
const containerBottom = containerTop + $(container).height()
|
||||
const elemTop = element.offsetTop
|
||||
const elemBottom = elemTop + $(element).height();
|
||||
const elemBottom = elemTop + $(element).height()
|
||||
if (elemTop < containerTop) {
|
||||
$(container).scrollTop(elemTop);
|
||||
$(container).scrollTop(elemTop)
|
||||
} else if (elemBottom > containerBottom) {
|
||||
$(container).scrollTop(elemBottom - $(container).height());
|
||||
$(container).scrollTop(elemBottom - $(container).height())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user