Restructured files, made build script
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
let showLoginBox = () => showVirtualNumpad('Enter Login Code', 6, true, false, false, authenticate)
|
||||
|
||||
let authenticate = (input : string) => {
|
||||
let login = ajaxSync('/login/authenticateClerk', input)
|
||||
if(login === 'success'){
|
||||
location.assign('/floorplan/')
|
||||
}
|
||||
else
|
||||
showLoginBox()
|
||||
}
|
||||
|
||||
$(() => {
|
||||
showLoginBox()
|
||||
})
|
||||
@@ -1,239 +0,0 @@
|
||||
/// <reference path="./typings/currency.d.ts" />
|
||||
|
||||
const Application: ApplicationState = {
|
||||
keyboard: null,
|
||||
mode: [],
|
||||
languageVars: {}
|
||||
}
|
||||
|
||||
|
||||
/** Parses a language variable. */
|
||||
const lang = (key: string, replacements?: string[] | string) => {
|
||||
let finalValue = Application.languageVars[key] || ''
|
||||
|
||||
if (!replacements) return finalValue
|
||||
if (typeof replacements === 'string') replacements = [replacements]
|
||||
|
||||
replacements.forEach((replacement, index) => {
|
||||
const correctIndex = index + 1
|
||||
finalValue = finalValue.replace(`[${correctIndex}]`, replacement)
|
||||
})
|
||||
|
||||
return finalValue
|
||||
}
|
||||
|
||||
/** Check if a variable is defined */
|
||||
const defined = (variable: any) => {
|
||||
return typeof variable !== 'undefined'
|
||||
}
|
||||
|
||||
/** Call an Ajax function asynchronously */
|
||||
const ajax = (endpoint: string, data: any, method = 'POST', successFunction: Function, errorFunction: Function, beforeFunction: any) => {
|
||||
data = (data == null) ? data : JSON.stringify(data)
|
||||
return $.ajax({
|
||||
url: endpoint,
|
||||
method: method,
|
||||
data: data,
|
||||
success: (response: ajaxResult) => {
|
||||
if (successFunction && response.status == 'success')
|
||||
successFunction(JSON.parse(response.data))
|
||||
else if (errorFunction && response.status != 'success') {
|
||||
errorFunction(JSON.parse(response.data))
|
||||
}
|
||||
},
|
||||
error: (error) => console.log(error.statusCode),
|
||||
beforeSend: beforeFunction
|
||||
})
|
||||
}
|
||||
/*
|
||||
For the flow of the app, synchronous is commonly preferred
|
||||
though trying to keep its usage as low as possible.
|
||||
*/
|
||||
const ajaxSync = (endpoint: string, data?: any, method = 'POST') => {
|
||||
const response = JSON.parse(
|
||||
$.ajax({
|
||||
url: endpoint,
|
||||
method: method,
|
||||
data: JSON.stringify(data),
|
||||
async: false,
|
||||
}).responseText)
|
||||
|
||||
if (response.data) {
|
||||
response.data = JSON.parse(response.data)
|
||||
return response.data
|
||||
}
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
/* Redirect to a specific URL */
|
||||
const redirect = (url: string): void => location.assign(url)
|
||||
|
||||
const resize = () => {
|
||||
$('#pageContainer').height(window.innerHeight + "px");
|
||||
}
|
||||
|
||||
const setupCore = (languageVars: Record<string, string>) => {
|
||||
Application.languageVars = languageVars
|
||||
const doc = $(document)
|
||||
doc.on('click', '#alertNo, #alertOk', hideAlerts)
|
||||
doc.on('click', '.toggle', toggle)
|
||||
window.addEventListener('resize', resize)
|
||||
resize()
|
||||
|
||||
setElementVisibilityByMode()
|
||||
}
|
||||
|
||||
|
||||
const posAlert = (message: string, title = 'Message') => {
|
||||
const alertBox = $('#alert')
|
||||
alertBox.css('display', 'flex');
|
||||
alertBox.data('value', '');
|
||||
$('#alertHeading').text(title);
|
||||
$('#alertMessage').text(message);
|
||||
|
||||
$('#alertOk').css('display', 'flex');
|
||||
$('#alertYes').css('display', 'none');
|
||||
$('#alertNo').css('display', 'none');
|
||||
}
|
||||
|
||||
const confirmation = (message: string, data: any, title = 'Confirm', submitFunction = (data: any) => {hideAlerts()}) => {
|
||||
const alert = $('#alert')
|
||||
|
||||
$(document).on('click', '#alert #alertYes', () => {
|
||||
hideAlerts()
|
||||
submitFunction(data)
|
||||
$(document).off('click', '#alert #alertYes')
|
||||
})
|
||||
|
||||
alert.css('display', 'flex')
|
||||
$('#alertHeading').html(title)
|
||||
$('#alertMessage').html(message)
|
||||
|
||||
$('#alertOk').css('display', 'none')
|
||||
$('#alertYes').css('display', 'flex')
|
||||
$('#alertNo').css('display', 'flex')
|
||||
}
|
||||
|
||||
|
||||
const hideAlerts = () => $('#alert').hide()
|
||||
|
||||
const turnOnMode = (mode: PosMode) => {
|
||||
Application.mode.push(mode)
|
||||
setElementVisibilityByMode()
|
||||
}
|
||||
|
||||
const turnOffMode = (mode: PosMode) => {
|
||||
Application.mode = Application.mode.filter((value) => value != mode)
|
||||
setElementVisibilityByMode()
|
||||
}
|
||||
|
||||
const toggleMode = (mode: PosMode) => {
|
||||
if (!isInMode(mode))
|
||||
turnOnMode(mode)
|
||||
else
|
||||
turnOffMode(mode)
|
||||
}
|
||||
|
||||
const clearModes = () => {
|
||||
Application.mode = []
|
||||
setElementVisibilityByMode()
|
||||
}
|
||||
|
||||
const isInMode = (mode: PosMode) => Application.mode.includes(mode)
|
||||
|
||||
const setElementVisibilityByMode = () => {
|
||||
const mode = Application.mode
|
||||
const elements = $('[data-visible-in-mode]')
|
||||
|
||||
elements.each((index, elem) => {
|
||||
const element = $(elem)
|
||||
const visibleInModes: PosModes = element.data('visible-in-mode')
|
||||
|
||||
const showElement = visibleInModes.every(visibleMode => {
|
||||
return mode.includes(visibleMode)
|
||||
});
|
||||
|
||||
if (element.hasClass('useVisibility')) {
|
||||
if (showElement) {
|
||||
element.css('visibility', 'visible')
|
||||
} else element.css('visibility', 'hidden')
|
||||
} else element.toggle(showElement)
|
||||
})
|
||||
|
||||
const invisibleElements = $('[data-invisible-in-mode]')
|
||||
invisibleElements.each((index, elem) => {
|
||||
const element = $(elem)
|
||||
const inVisibleInModes: PosModes = element.data('invisible-in-mode')
|
||||
const hideElement = inVisibleInModes.some(invisibleMode => {
|
||||
return mode.includes(invisibleMode)
|
||||
})
|
||||
element.toggle(!hideElement)
|
||||
})
|
||||
|
||||
|
||||
$('[data-active-in-mode]').each((index, elem) => {
|
||||
const button = $(elem)
|
||||
const activeInMode: PosMode = button.data('active-in-mode')
|
||||
|
||||
mode.includes(activeInMode)
|
||||
? button.addClass('active')
|
||||
: button.removeClass('active')
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
const pulseElement = (element: JQuery) => element.addClass('pulse').on('animationend', () => element.removeClass('pulse'))
|
||||
|
||||
Array.prototype.where = function<x>(this: x[], property: string, value: any) {
|
||||
return this.filter( item => (item as any)[property] === value)[0] || null
|
||||
}
|
||||
|
||||
const money = (amount: number, fromCents=true) => currency(amount, {fromCents: fromCents})
|
||||
const moneyFromString = (amount: string) => currency(amount)
|
||||
|
||||
const toggle = (e: JQuery.TriggeredEvent) => {
|
||||
const button = $(e.target)
|
||||
const toggleGroup = button.closest('.toggleGroup')
|
||||
const input = toggleGroup.find('input.value')
|
||||
const isActive = button.hasClass('active')
|
||||
toggleGroup
|
||||
.find('.toggle')
|
||||
.removeClass('active')
|
||||
|
||||
let value = !isActive
|
||||
? button.addClass('active').data('value')
|
||||
: toggleGroup
|
||||
.find('.toggle.default')
|
||||
.addClass('active')
|
||||
.data('value')
|
||||
|
||||
input.val(value).trigger('change')
|
||||
}
|
||||
|
||||
const resetToggle = (input: JQuery) => {
|
||||
input
|
||||
.closest('.toggleGroup')
|
||||
.find('.toggle.default')
|
||||
.trigger('click')
|
||||
}
|
||||
//Id generator.
|
||||
function* newestId(){
|
||||
let id = 0
|
||||
while(true){
|
||||
id++
|
||||
yield id
|
||||
}
|
||||
}
|
||||
|
||||
const loadTemplate = (templateSelector: string) => {
|
||||
const content = $(templateSelector)
|
||||
.clone()
|
||||
.removeAttr('id')
|
||||
.prop('content')
|
||||
return $(content)
|
||||
}
|
||||
|
||||
|
||||
$(() => ajax('/ajax/languageVars', null, 'GET', setupCore, null, null))
|
||||
@@ -1,851 +0,0 @@
|
||||
/// <reference path="./typings/konva.d.ts" />
|
||||
|
||||
interface dimensions{
|
||||
height:number
|
||||
width:number
|
||||
}
|
||||
|
||||
interface floorplan{
|
||||
stage: Konva.Stage
|
||||
transformer: Konva.Transformer
|
||||
tableLayer: Konva.Layer
|
||||
rooms: room[]
|
||||
tables: floorplan_table[]
|
||||
decorations: decoration[]
|
||||
activeTableNumbers: number[]
|
||||
selectedTableNumber: number
|
||||
selectedDecorationId: number
|
||||
currentRoom: room
|
||||
roomToLoad: room
|
||||
visualScale: number
|
||||
visualScaleBasis: number
|
||||
floorplanDiv: JQuery
|
||||
reservations: reservation[]
|
||||
}
|
||||
|
||||
interface floorplan_data{
|
||||
tables: floorplan_table[]
|
||||
decorations: decoration[]
|
||||
activeTableNumbers: number[]
|
||||
rooms: room[]
|
||||
reservations:reservation[]
|
||||
}
|
||||
|
||||
|
||||
const Floorplan: floorplan = {
|
||||
rooms: [],
|
||||
tables: [],
|
||||
decorations:[],
|
||||
reservations:[],
|
||||
activeTableNumbers: [],
|
||||
stage: null,
|
||||
transformer:null,
|
||||
tableLayer: null,
|
||||
selectedTableNumber: 0,
|
||||
currentRoom: null,
|
||||
roomToLoad: null,
|
||||
visualScale: 1,
|
||||
visualScaleBasis: 1280,
|
||||
floorplanDiv: null,
|
||||
selectedDecorationId: 0
|
||||
};
|
||||
|
||||
$(() => ajax('/floorplan/getFloorplanData/1', null, 'get', setupFloorplan, null, null) )
|
||||
|
||||
|
||||
const setupFloorplanEvents = () => {
|
||||
const doc = $(document)
|
||||
doc.on('click', '.roomButton', roomButtonClicked)
|
||||
doc.on('click', '.editModeButton', editModeButtonClicked)
|
||||
doc.on('click', '.changeShapeButton', changeTableShape)
|
||||
doc.on('click', '.addTableButton', showAddTablePopup)
|
||||
doc.on('click', '.deleteTableButton', confirmDeleteTable)
|
||||
doc.on('click', '.addDecoration', showDecorator)
|
||||
doc.on('click', '.deleteDecoration', deleteDecoration)
|
||||
doc.on('click', '.decoratorItem', addDecoration)
|
||||
doc.on('click', '.mergeButton', toggleMergeMode)
|
||||
doc.on('click', '.unmergeButton', unmergeTable)
|
||||
doc.on('click', '.transferTableButton', toggleTransferMode)
|
||||
doc.on('click', '.reserveTableButton', reserveTable)
|
||||
doc.on('click', '.unreserveTableButton', unreserveTable)
|
||||
doc.on('click', '.placeOrderButton', placeOrderButtonClicked)
|
||||
}
|
||||
|
||||
const placeOrderButtonClicked = () => {
|
||||
redirect(`/order/${Floorplan.selectedTableNumber}`)
|
||||
}
|
||||
|
||||
const roomButtonClicked = (e: Event) => {
|
||||
const button = $(e.target)
|
||||
const roomId = button.data('value')
|
||||
loadRoom(getRoomById(roomId))
|
||||
}
|
||||
|
||||
const editModeButtonClicked = (e: Event) => {
|
||||
const button = $(e.target)
|
||||
button.toggleClass('active')
|
||||
toggleMode('edit')
|
||||
|
||||
if(isInMode('edit')){
|
||||
Floorplan.stage.find('Group, Image').forEach(table => table.draggable(true))
|
||||
|
||||
if(isInMode('tableSelected')){
|
||||
const selectedTableShape = getTableShapeFromTableNumber(Floorplan.selectedTableNumber)
|
||||
selectTable(selectedTableShape)
|
||||
}
|
||||
} else {
|
||||
setTransformerNodes([])
|
||||
Floorplan.stage.find('Group, Image').forEach(table => table.draggable(false))
|
||||
}
|
||||
}
|
||||
|
||||
const setupFloorplan = (floorplanData : floorplan_data) => {
|
||||
|
||||
Floorplan.tables = floorplanData.tables
|
||||
Floorplan.activeTableNumbers = floorplanData.activeTableNumbers
|
||||
Floorplan.rooms = floorplanData.rooms
|
||||
Floorplan.decorations = floorplanData.decorations
|
||||
Floorplan.reservations = floorplanData.reservations
|
||||
|
||||
getDimensions()
|
||||
setupFloorplanEvents()
|
||||
|
||||
loadRoom(Floorplan.rooms[0])
|
||||
}
|
||||
|
||||
const loadRoom = (roomToLoad: room) => {
|
||||
setRoomBackground(roomToLoad)
|
||||
setupKonva()
|
||||
|
||||
$('.roomButton').removeClass('active')
|
||||
let button = $(`.roomButton[data-value=${roomToLoad?.id}]`)
|
||||
button.addClass('active')
|
||||
|
||||
const tablesInRoom = Floorplan.tables.filter(table => table.room_id == roomToLoad.id)
|
||||
const decorationsInRoom = Floorplan.decorations.filter(decoration => decoration.decoration_room == roomToLoad.id)
|
||||
decorationsInRoom.forEach(decoration => createDecorationShape(decoration, false))
|
||||
tablesInRoom.forEach(createTableShape)
|
||||
if(!isInMode('transfer')) {
|
||||
deselectTables()
|
||||
}
|
||||
Floorplan.currentRoom = roomToLoad
|
||||
}
|
||||
|
||||
const getRoomById = (roomId: number) => {
|
||||
return Floorplan.rooms.find(
|
||||
(room) => room.id == roomId
|
||||
)
|
||||
}
|
||||
|
||||
const tableIsOpen = (table: floorplan_table) => Floorplan.activeTableNumbers.includes(table.table_number)
|
||||
|
||||
const createTableShape = (table: floorplan_table) => {
|
||||
const draggable = isInMode('edit')
|
||||
|
||||
const tableGroup = new Konva.Group({
|
||||
x: table.pos_x * Floorplan.visualScale,
|
||||
y: table.pos_y * Floorplan.visualScale,
|
||||
draggable: draggable,
|
||||
listening: true,
|
||||
id: table.table_number.toString()
|
||||
});
|
||||
|
||||
const fillColor = tableIsOpen(table)
|
||||
? 'lightblue'
|
||||
: table.status == 2
|
||||
? 'lightgreen'
|
||||
: 'gray'
|
||||
|
||||
|
||||
let tableShape: Konva.Shape
|
||||
|
||||
switch(table.shape){
|
||||
case "circle": // fall-through
|
||||
case "ellipse": // fall-through
|
||||
case "longellipse":
|
||||
tableShape = new Konva.Ellipse({
|
||||
x: 0,
|
||||
y: 0,
|
||||
radiusX: table.width * 0.5 * Floorplan.visualScale,
|
||||
radiusY: table.height * 0.5 * Floorplan.visualScale,
|
||||
rotation: table.rotation,
|
||||
fill: fillColor,
|
||||
stroke: "black",
|
||||
strokeWidth: 4,
|
||||
draggable: false,
|
||||
listening: true
|
||||
});
|
||||
break;
|
||||
default:
|
||||
tableShape = new Konva.Rect({
|
||||
x: 0,
|
||||
y: 0,
|
||||
offsetX: table.width * 0.5 * Floorplan.visualScale,
|
||||
offsetY: table.height * 0.5 * Floorplan.visualScale,
|
||||
width: table.width * Floorplan.visualScale,
|
||||
height: table.height * Floorplan.visualScale,
|
||||
rotation: table.rotation,
|
||||
fill: fillColor,
|
||||
stroke: "black",
|
||||
strokeWidth: 4,
|
||||
draggable: false,
|
||||
listening: true
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
const label = new Konva.Text({
|
||||
x: table.width * -0.5 * Floorplan.visualScale,
|
||||
y: table.height * -0.5 * Floorplan.visualScale,
|
||||
width: table.width * Floorplan.visualScale,
|
||||
height: table.height * Floorplan.visualScale,
|
||||
text: table.table_number.toString(),
|
||||
fontSize: 40 * Floorplan.visualScale,
|
||||
fill: "black",
|
||||
align: "center",
|
||||
verticalAlign: "middle",
|
||||
draggable: false,
|
||||
listening: false
|
||||
});
|
||||
|
||||
tableGroup.add(tableShape, label)
|
||||
|
||||
setupTableEvents(tableGroup)
|
||||
|
||||
Floorplan.tableLayer.add(tableGroup)
|
||||
return tableGroup
|
||||
}
|
||||
|
||||
const setupTableEvents = (tableGroup: Konva.Group) => {
|
||||
const tableShape = getTableShapeFromGroup(tableGroup)
|
||||
|
||||
tableGroup.on('click', tableClicked)
|
||||
tableGroup.on('tap', tableClicked)
|
||||
tableGroup.on('dbltap', tableDblClicked)
|
||||
tableGroup.on('dblclick', tableDblClicked)
|
||||
tableGroup.on('dragend', tableGroupTransformed)
|
||||
tableShape.on('transformend', tableShapeTransformed)
|
||||
}
|
||||
|
||||
const getTableShapeFromGroup = (group: Konva.Group) => group.getChildren()[0] as Konva.Shape
|
||||
const getTableGroupFromShape = (shape: Konva.Shape) => shape.parent as Konva.Group
|
||||
|
||||
const tableGroupTransformed = (e: Konva.KonvaEventObject<any>) => {
|
||||
saveTableTransformation(e.target as Konva.Group)
|
||||
}
|
||||
const tableShapeTransformed = (e: Konva.KonvaEventObject<any>) => {
|
||||
let shape = e.target as Konva.Shape
|
||||
let group = getTableGroupFromShape(shape)
|
||||
saveTableTransformation(group)
|
||||
}
|
||||
|
||||
const saveTableTransformation = (tableGroup: Konva.Group) => {
|
||||
const originalTable = getTableDataFromGroup(tableGroup)
|
||||
const tableShape = getTableShapeFromGroup(tableGroup)
|
||||
|
||||
const newTableInfo : floorplan_table = {
|
||||
table_number : originalTable.table_number,
|
||||
previous_state : originalTable.previous_state,
|
||||
merged_children : originalTable.merged_children,
|
||||
id : originalTable.id,
|
||||
width : Math.round(tableShape.scaleX() * tableShape.width()/Floorplan.visualScale),
|
||||
height: Math.round(tableShape.scaleY() * tableShape.height()/Floorplan.visualScale),
|
||||
pos_x: Math.round(tableGroup.x()/Floorplan.visualScale),
|
||||
pos_y: Math.round(tableGroup.y()/Floorplan.visualScale),
|
||||
rotation: Math.round(tableShape.rotation()),
|
||||
room_id: originalTable.room_id,
|
||||
status: originalTable.status,
|
||||
venue_id: originalTable.venue_id,
|
||||
shape : originalTable.shape,
|
||||
default_covers: originalTable.default_covers,
|
||||
}
|
||||
|
||||
saveTable(newTableInfo)
|
||||
redrawTable(tableGroup)
|
||||
}
|
||||
|
||||
|
||||
const saveTable = (tableToUpdate: floorplan_table) => {
|
||||
const tables =
|
||||
Floorplan
|
||||
.tables
|
||||
.filter(table => {
|
||||
return table.id != tableToUpdate.id
|
||||
})
|
||||
|
||||
tables.push(tableToUpdate)
|
||||
|
||||
Floorplan.tables = tables
|
||||
ajax("/floorplan/transformTable", tableToUpdate, 'post', null,null,null)
|
||||
}
|
||||
|
||||
const setTransformerNodes = (nodes: Konva.Shape[]) => {
|
||||
Floorplan.transformer.moveToTop()
|
||||
if (nodes.length < 1) Floorplan.transformer.moveToBottom()
|
||||
Floorplan.transformer.nodes(nodes)
|
||||
}
|
||||
|
||||
const getTableDataFromTableNumber = (tableNumber: number) => {
|
||||
return Floorplan.tables.filter(table => table.table_number == tableNumber)[0]
|
||||
}
|
||||
|
||||
const getTableDataFromGroup = (tableGroup: Konva.Node) => {
|
||||
const tableNumber = tableGroup.attrs.id
|
||||
return Floorplan.tables.find(table => tableNumber == table.table_number)
|
||||
}
|
||||
|
||||
const getTableDataFromShape = (tableShape: Konva.Shape) => getTableDataFromGroup(tableShape.parent)
|
||||
|
||||
const getTableShapeFromTableNumber = (tableNumber: number) => {
|
||||
const tableGroup = Floorplan.stage.find('Group').find((group: Konva.Shape) => {
|
||||
return group.attrs.id == tableNumber
|
||||
}) as Konva.Group
|
||||
|
||||
return tableGroup.getChildren()[0] as Konva.Shape
|
||||
}
|
||||
|
||||
const getTableGroupFromTableNumber = (tableNumber : number) => {
|
||||
const tableShape = getTableShapeFromTableNumber(tableNumber)
|
||||
return getTableGroupFromShape(tableShape)
|
||||
}
|
||||
|
||||
const setReservationStatus = (table: floorplan_table) => {
|
||||
const reservationText = $('.reservationStatus')
|
||||
const tableShape = getTableShapeFromTableNumber(table.table_number)
|
||||
reservationText.text('')
|
||||
|
||||
if(table.status == 2) {
|
||||
tableShape.fill('lightgreen')
|
||||
const reservations = Floorplan.reservations.filter(reservation => reservation.floorplan_table_id == table.id)
|
||||
if (reservations.length) {
|
||||
turnOnMode('reservedTableSelected')
|
||||
reservationText.text(lang('reserved'))
|
||||
let reservation = reservations[0]
|
||||
if (reservation.name != '') {
|
||||
reservationText.text(lang('reserved_for', reservation.name))
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let fillColor = tableIsOpen(table) ? 'lightblue' : 'gray'
|
||||
tableShape.fill(fillColor)
|
||||
turnOffMode('reservedTableSelected')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const reserveTable = () => {
|
||||
showVirtualNumpad(lang('how_many_covers'), 2, false, false, true, createEmptyReservation)
|
||||
}
|
||||
|
||||
const createEmptyReservation = (covers: number) => {
|
||||
const newReservation: reservation = {
|
||||
id: 0,
|
||||
covers: covers,
|
||||
created_at: 0,
|
||||
floorplan_table_id: getSelectedTableData().id,
|
||||
name: '',
|
||||
time: 0,
|
||||
}
|
||||
|
||||
ajax('/reservations/newEmptyReservation', newReservation,'post', emptyReservationCreated, null, null )
|
||||
}
|
||||
|
||||
const emptyReservationCreated = (reservation: reservation) => {
|
||||
Floorplan.reservations.push(reservation)
|
||||
const selectedTable = getSelectedTableData()
|
||||
selectedTable.status = 2
|
||||
selectedTable.default_covers = reservation.covers
|
||||
updateTableData(selectedTable)
|
||||
updateCoverText(selectedTable)
|
||||
setReservationStatus(getSelectedTableData())
|
||||
|
||||
showVirtualKeyboard(lang('confirm_reservation_name'), 32, false, addReservationName)
|
||||
}
|
||||
|
||||
const addReservationName = (name: string) => {
|
||||
hideVirtualKeyboard()
|
||||
const reservation = Floorplan.reservations.filter(reservation => reservation.floorplan_table_id == getSelectedTableData().id)[0]
|
||||
reservation.name = name
|
||||
ajax('/reservations/updateReservation', reservation, 'post', reservationNameAdded, null, null)
|
||||
}
|
||||
|
||||
const reservationNameAdded = (updatedReservation: reservation) => {
|
||||
console.log(updatedReservation)
|
||||
Floorplan.reservations = Floorplan.reservations.filter(reservation => reservation.id != updatedReservation.id)
|
||||
Floorplan.reservations.push(updatedReservation)
|
||||
setReservationStatus(getSelectedTableData())
|
||||
}
|
||||
|
||||
const getReservationsOnTable = (table: floorplan_table) => Floorplan.reservations.filter(reservation => reservation.floorplan_table_id == table.id)
|
||||
|
||||
const updateTableData = (tableToRemove: floorplan_table) => {
|
||||
Floorplan.tables = Floorplan.tables.filter(table => table.id != tableToRemove.id)
|
||||
Floorplan.tables.push(tableToRemove)
|
||||
}
|
||||
|
||||
const unreserveTable = () => {
|
||||
const selectedTable = getSelectedTableData()
|
||||
selectedTable.status = 0
|
||||
ajax('/reservations/unreserveTable', selectedTable, 'post', tableUnreserved, null, null)
|
||||
}
|
||||
|
||||
const tableUnreserved = (table: floorplan_table) => {
|
||||
Floorplan.reservations = Floorplan.reservations.filter(reservation => reservation.floorplan_table_id != table.id)
|
||||
updateTableData(table)
|
||||
setReservationStatus(table)
|
||||
}
|
||||
|
||||
const getSelectedTableData = () => getTableDataFromTableNumber(Floorplan.selectedTableNumber)
|
||||
|
||||
const deselectTables = () => {
|
||||
Floorplan.stage.find('Rect, Ellipse').forEach( (shape: Konva.Shape) => {
|
||||
shape.stroke('black')
|
||||
});
|
||||
|
||||
Floorplan.selectedDecorationId = 0
|
||||
Floorplan.selectedTableNumber = 0
|
||||
turnOffMode('tableSelected')
|
||||
turnOffMode('activeTableSelected')
|
||||
turnOffMode('decorationSelected')
|
||||
turnOffMode('merge')
|
||||
turnOffMode('transfer')
|
||||
|
||||
setTransformerNodes([])
|
||||
}
|
||||
|
||||
const selectTable = (tableShape: Konva.Shape) => {
|
||||
tableShape.stroke('yellow')
|
||||
const table = getTableDataFromShape(tableShape)
|
||||
Floorplan.selectedTableNumber = table.table_number
|
||||
|
||||
if(isInMode('edit')){
|
||||
setTransformerNodes([tableShape])
|
||||
}
|
||||
|
||||
if(tableIsOpen(table)){
|
||||
turnOnMode('activeTableSelected')
|
||||
}
|
||||
|
||||
$('.reservationStatus').html('<b>'+lang('active_table', table.table_number.toString()+'</b>'))
|
||||
|
||||
|
||||
updateCoverText(table)
|
||||
$('.selectedTableNumber').text(lang('active_table', table.table_number.toString()))
|
||||
setReservationStatus(table)
|
||||
|
||||
const unmergeVisibility = table.merged_children ? 'visible' : 'hidden'
|
||||
$('.unmergeButton').css('visibility', unmergeVisibility)
|
||||
turnOnMode('tableSelected')
|
||||
}
|
||||
|
||||
const updateCoverText = (table:floorplan_table) => $('.selectedTableCovers').text(lang('covers', table.default_covers.toString()))
|
||||
|
||||
const tableDblClicked = (event: Konva.KonvaEventObject<any>) => {
|
||||
let tableShape = getTableShapeFromGroup(event.currentTarget as Konva.Group)
|
||||
const table = getTableDataFromShape(tableShape)
|
||||
redirect(`/order/${table.table_number}`)
|
||||
}
|
||||
|
||||
|
||||
const tableClicked = (event: Konva.KonvaEventObject<any>) => {
|
||||
let tableShape = getTableShapeFromGroup(event.currentTarget as Konva.Group)
|
||||
const table = getTableDataFromShape(tableShape)
|
||||
|
||||
if(isInMode('merge')) {
|
||||
mergeTables(getTableDataFromTableNumber(Floorplan.selectedTableNumber), table)
|
||||
return;
|
||||
}
|
||||
|
||||
if(isInMode('transfer')){
|
||||
transferTables(getTableDataFromTableNumber(Floorplan.selectedTableNumber), table)
|
||||
}
|
||||
|
||||
const selectedTableNumber = Floorplan.selectedTableNumber
|
||||
deselectTables()
|
||||
|
||||
if(selectedTableNumber != table.table_number){
|
||||
selectTable(tableShape)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const createDecorationShape = (decoration:decoration, select?: boolean) => {
|
||||
const draggable = isInMode('edit')
|
||||
const decorationShape = new Image()
|
||||
|
||||
decorationShape.onload = () => {
|
||||
const decorationImage = new Konva.Image({
|
||||
id: decoration.id.toString(),
|
||||
x: decoration.decoration_pos_x * Floorplan.visualScale,
|
||||
y: decoration.decoration_pos_y * Floorplan.visualScale,
|
||||
image: decorationShape,
|
||||
offsetX: decoration.decoration_width * 0.5 * Floorplan.visualScale,
|
||||
offsetY: decoration.decoration_height * 0.5 * Floorplan.visualScale,
|
||||
rotation: decoration.decoration_rotation,
|
||||
width: decoration.decoration_width * Floorplan.visualScale,
|
||||
height: decoration.decoration_height * Floorplan.visualScale,
|
||||
draggable: draggable,
|
||||
});
|
||||
|
||||
// add the shape to the layer
|
||||
Floorplan.tableLayer.add(decorationImage)
|
||||
Floorplan.tableLayer.draw()
|
||||
decorationImage.moveToBottom()
|
||||
|
||||
setupDecorationEvents(decorationImage)
|
||||
|
||||
if(select){
|
||||
decorationImage.moveToTop()
|
||||
selectDecorationShape(decorationImage)
|
||||
}
|
||||
}
|
||||
|
||||
decorationShape.src = '/images/decorations/' + decoration.decoration_image
|
||||
}
|
||||
|
||||
const setupDecorationEvents = (decorationShape: Konva.Image) => {
|
||||
decorationShape.on('click', decorationClicked)
|
||||
decorationShape.on('tap', decorationClicked)
|
||||
decorationShape.on('transformend', decorationTransformed)
|
||||
decorationShape.on('dragend', decorationTransformed)
|
||||
}
|
||||
|
||||
const decorationClicked = (event: Konva.KonvaEventObject<any>) => {
|
||||
let decorationShape = event.target as Konva.Image
|
||||
if(isInMode('edit')){
|
||||
turnOffMode('tableSelected')
|
||||
if ((isInMode('decorationSelected') && Floorplan.selectedDecorationId != Number(decorationShape.id())) || !isInMode('decorationSelected')) {
|
||||
selectDecorationShape(decorationShape)
|
||||
} else {
|
||||
deselectTables()
|
||||
decorationShape.moveToBottom()
|
||||
}
|
||||
} else {
|
||||
deselectTables()
|
||||
}
|
||||
}
|
||||
|
||||
const selectDecorationShape = (decorationShape: Konva.Image) => {
|
||||
deselectTables()
|
||||
Floorplan.transformer.nodes([decorationShape])
|
||||
Floorplan.selectedDecorationId = Number(decorationShape.id())
|
||||
decorationShape.moveToTop()
|
||||
Floorplan.transformer.moveToTop()
|
||||
turnOnMode('decorationSelected')
|
||||
}
|
||||
|
||||
const getDecorationDataById = (id: number) => {
|
||||
return Floorplan.decorations.find(decoration => id == decoration.id)
|
||||
}
|
||||
|
||||
const decorationTransformed = (event: Konva.KonvaEventObject<MouseEvent>|Konva.KonvaEventObject<TouchEvent|DragEvent|MouseEvent>) => {
|
||||
let decorationShape = event.currentTarget as Konva.Image
|
||||
const oldDecorationData = getDecorationDataById(Number(decorationShape.id()))
|
||||
const newDecoration: decoration = {
|
||||
id: oldDecorationData.id,
|
||||
decoration_room: oldDecorationData.decoration_room,
|
||||
decoration_pos_x: Math.round(decorationShape.x() / Floorplan.visualScale),
|
||||
decoration_pos_y: Math.round(decorationShape.y() / Floorplan.visualScale),
|
||||
decoration_rotation: Math.round(decorationShape.rotation()),
|
||||
decoration_width: Math.round((decorationShape.scaleX() * decorationShape.width()) / Floorplan.visualScale),
|
||||
decoration_height: Math.round((decorationShape.scaleY() * decorationShape.height()) / Floorplan.visualScale),
|
||||
decoration_image: oldDecorationData.decoration_image,
|
||||
venue_id: oldDecorationData.venue_id,
|
||||
}
|
||||
|
||||
saveDecoration(newDecoration)
|
||||
}
|
||||
|
||||
const saveDecoration = (decorationToUpdate: decoration) => {
|
||||
const decorations =
|
||||
Floorplan
|
||||
.decorations
|
||||
.filter(decoration => {
|
||||
return decoration.id != decorationToUpdate.id
|
||||
})
|
||||
|
||||
decorations.push(decorationToUpdate)
|
||||
|
||||
Floorplan.decorations = decorations
|
||||
ajax("/floorplan/updateDecoration", decorationToUpdate, 'post', null,null,null)
|
||||
}
|
||||
|
||||
const showDecorator = () => $('#decorator').css('display', 'flex')
|
||||
const hideDecorator = () => $('#decorator').css('display', 'flex').hide()
|
||||
|
||||
const addDecoration = (e: Event) => {
|
||||
const button = $(e.currentTarget)
|
||||
|
||||
const newDecoration: decoration = {
|
||||
id: 0,
|
||||
decoration_room: Floorplan.currentRoom.id,
|
||||
decoration_pos_x: Floorplan.visualScaleBasis / 2,
|
||||
decoration_pos_y: Floorplan.visualScaleBasis / 2,
|
||||
decoration_rotation: 0,
|
||||
decoration_width: 200,
|
||||
decoration_height: 200,
|
||||
decoration_image: button.data('image'),
|
||||
venue_id: Floorplan.currentRoom.venue_id
|
||||
}
|
||||
|
||||
ajax('/floorplan/addDecoration', newDecoration, 'post', decorationAdded, null, null)
|
||||
}
|
||||
|
||||
const decorationAdded = (decoration: decoration) => {
|
||||
Floorplan.decorations.push(decoration)
|
||||
createDecorationShape(decoration, true)
|
||||
|
||||
hideDecorator()
|
||||
}
|
||||
|
||||
|
||||
const deleteDecoration = () => ajax(
|
||||
'/floorplan/deleteDecoration',
|
||||
getDecorationDataById(Floorplan.selectedDecorationId),
|
||||
'post', decorationDeleted, null, null)
|
||||
|
||||
const decorationDeleted = (deletedDecoration:decoration) => {
|
||||
Floorplan.decorations = Floorplan.decorations.filter(decoration => decoration.id != deletedDecoration.id)
|
||||
const decorationShape = Floorplan.stage.findOne(`#${deletedDecoration.id}`)
|
||||
decorationShape.destroy()
|
||||
deselectTables()
|
||||
}
|
||||
|
||||
const setRoomBackground = (roomToLoad: room) => {
|
||||
const width = Floorplan.floorplanDiv.width()
|
||||
const height = Floorplan.floorplanDiv.height()
|
||||
|
||||
if(roomToLoad.background_image) {
|
||||
Floorplan.floorplanDiv.css("background-image", `url(/images/rooms/${roomToLoad?.background_image})`)
|
||||
Floorplan.floorplanDiv.css("background-size", `${width}px ${height}px`)
|
||||
}
|
||||
}
|
||||
|
||||
const setupKonva = () => {
|
||||
const dimensions = getDimensions()
|
||||
|
||||
if(Floorplan.stage !== null) Floorplan.stage.destroy()
|
||||
|
||||
Floorplan.stage = new Konva.Stage({
|
||||
container: 'floorplanCanvas',
|
||||
width: dimensions.width,
|
||||
height: dimensions.height,
|
||||
})
|
||||
|
||||
const stageClick = (e: Konva.KonvaEventObject<any> ) => {
|
||||
if(e.target == Floorplan.stage){
|
||||
deselectTables()
|
||||
}
|
||||
}
|
||||
|
||||
Floorplan.stage.on('click', stageClick)
|
||||
Floorplan.stage.on('tap', stageClick)
|
||||
|
||||
Floorplan.transformer = new Konva.Transformer({
|
||||
rotationSnaps: [0, 15, 30, 45, 60, 75, 90, 105, 120, 135, 150, 165, 180, 225, 270, -15, -30, -45, -60, -75, -90, -105, -120, -135, -150, -165, -180, -225, -270, 360, -360],
|
||||
anchorSize: 30 * Floorplan.visualScale,
|
||||
ignoreStroke: true,
|
||||
centeredScaling: true,
|
||||
anchorCornerRadius: 10,
|
||||
});
|
||||
|
||||
Floorplan.tableLayer = new Konva.Layer()
|
||||
Floorplan.tableLayer.add(Floorplan.transformer)
|
||||
|
||||
Floorplan.stage.add(Floorplan.tableLayer)
|
||||
}
|
||||
|
||||
const resetKonva = setupKonva
|
||||
|
||||
const changeTableShape = () => {
|
||||
|
||||
if(!Floorplan.selectedTableNumber) return
|
||||
|
||||
const table = getTableDataFromTableNumber(Floorplan.selectedTableNumber)
|
||||
const tableGroup = getTableGroupFromTableNumber(table.table_number)
|
||||
|
||||
const order = ['square', 'rect', 'longrect', 'diamond', 'circle', 'ellipse', 'longellipse']
|
||||
if (order.indexOf(table.shape) === -1)
|
||||
table.shape = 'square'
|
||||
|
||||
const currentIndex = order.indexOf(table.shape)
|
||||
let nextIndex = currentIndex + 1
|
||||
if (nextIndex > (order.length) - 1)
|
||||
nextIndex = 0
|
||||
|
||||
table.shape = order[nextIndex]
|
||||
|
||||
switch(table.shape) {
|
||||
case 'square':
|
||||
case 'circle':
|
||||
// noinspection JSSuspiciousNameCombination
|
||||
table.height = table.width
|
||||
table.rotation = 0
|
||||
break
|
||||
case 'diamond':
|
||||
// noinspection JSSuspiciousNameCombination
|
||||
table.height = table.width
|
||||
table.rotation = 45
|
||||
break
|
||||
case 'rect':
|
||||
case 'ellipse':
|
||||
table.height = table.width * 2
|
||||
table.rotation = 0
|
||||
break
|
||||
case 'longrect':
|
||||
case 'longellipse':
|
||||
table.rotation = 90
|
||||
break
|
||||
}
|
||||
|
||||
|
||||
saveTable(table)
|
||||
deselectTables()
|
||||
redrawTable(tableGroup)
|
||||
}
|
||||
|
||||
const redrawTable = (tableGroup: Konva.Group) => {
|
||||
deselectTables()
|
||||
const draggable = tableGroup.draggable()
|
||||
const table = getTableDataFromGroup(tableGroup)
|
||||
tableGroup.destroy()
|
||||
const newTableGroup = createTableShape(table)
|
||||
const newTableShape = getTableShapeFromTableNumber(table.table_number)
|
||||
selectTable(newTableShape)
|
||||
newTableGroup.draggable(draggable)
|
||||
}
|
||||
|
||||
const showAddTablePopup = () => showVirtualNumpad(lang('new_table_number'), 4, false, false, true, addTable);
|
||||
|
||||
const addTable = (tableNumber: number) => {
|
||||
const newTable : floorplan_table = {
|
||||
id: 0,
|
||||
table_number: tableNumber,
|
||||
room_id: Floorplan.currentRoom.id,
|
||||
default_covers: 2,
|
||||
width: 200,
|
||||
height: 200,
|
||||
rotation: 0,
|
||||
pos_x: Floorplan.visualScaleBasis / 2,
|
||||
pos_y: Floorplan.visualScaleBasis / 2,
|
||||
shape: 'square',
|
||||
merged_children : '',
|
||||
previous_state: '',
|
||||
status: 0,
|
||||
venue_id: 1
|
||||
};
|
||||
|
||||
ajax('/floorplan/createTable', newTable, 'post', tableAdded, tableNotAdded, null)
|
||||
}
|
||||
|
||||
const tableAdded = (table: floorplan_table) => {
|
||||
deselectTables()
|
||||
const newTableGroup = createTableShape(table)
|
||||
Floorplan.tables.push(table)
|
||||
selectTable(getTableShapeFromGroup(newTableGroup))
|
||||
}
|
||||
|
||||
const tableNotAdded = (response: string) => {
|
||||
posAlert(response)
|
||||
}
|
||||
|
||||
const confirmDeleteTable = () => confirmation(
|
||||
lang('confirm_delete_table', Floorplan.selectedTableNumber.toString()),
|
||||
Floorplan.selectedTableNumber,
|
||||
'Confirm', deleteTable)
|
||||
|
||||
const deleteTable = (tableNumber: number) => {
|
||||
if(!tableNumber) return false
|
||||
const tableToDelete = getTableDataFromTableNumber(tableNumber)
|
||||
|
||||
if(tableIsOpen(tableToDelete)){
|
||||
posAlert(lang('error_delete_existing_table'))
|
||||
return false
|
||||
}
|
||||
|
||||
ajax(`/floorplan/deleteTable`, tableToDelete, 'post', tableDeleted, null, null);
|
||||
}
|
||||
|
||||
const tableDeleted = (deletedTable: floorplan_table) => {
|
||||
Floorplan.tables = Floorplan.tables.filter(table => table.table_number != deletedTable.table_number)
|
||||
const tableGroup = getTableGroupFromTableNumber(deletedTable.table_number)
|
||||
deselectTables()
|
||||
tableGroup.destroy()
|
||||
}
|
||||
|
||||
const toggleMergeMode = () => toggleMode('merge')
|
||||
|
||||
|
||||
const mergeTables = (table1: floorplan_table, table2: floorplan_table ) => {
|
||||
toggleMergeMode()
|
||||
if(table1.table_number == table2.table_number){
|
||||
posAlert(lang('error_self_merge'))
|
||||
return false;
|
||||
}
|
||||
ajax('/floorplan/mergeTables', [table1, table2], 'post', tablesMerged, null, null)
|
||||
}
|
||||
|
||||
const tablesMerged = (tables: Record<'child'|'parent'|'merged', floorplan_table>) => {
|
||||
tableDeleted(tables['child'])
|
||||
tableDeleted(tables['parent'])
|
||||
tableAdded(tables['merged'])
|
||||
deselectTables()
|
||||
const tableGroup = getTableGroupFromTableNumber(tables['merged'].table_number)
|
||||
selectTable(getTableShapeFromGroup(tableGroup))
|
||||
tableGroup.draggable(true)
|
||||
}
|
||||
|
||||
const unmergeTable = () => ajax(`/floorplan/unmergeTable/${Floorplan.selectedTableNumber}`, null, 'get', tablesUnmerged, null, null)
|
||||
|
||||
const tablesUnmerged = (tables: Record<'child'|'parent', floorplan_table>) => {
|
||||
const parentTable = tables['parent']
|
||||
const childTable = tables['child']
|
||||
|
||||
tableDeleted(parentTable)
|
||||
tableAdded(parentTable)
|
||||
tableAdded(childTable)
|
||||
deselectTables()
|
||||
}
|
||||
|
||||
const toggleTransferMode = () => toggleMode('transfer')
|
||||
|
||||
const transferTables = (origin: floorplan_table, destination: floorplan_table) => {
|
||||
if(origin.table_number == destination.table_number){
|
||||
posAlert(lang('transfer_self_error'))
|
||||
return
|
||||
}
|
||||
|
||||
ajax(`/floorplan/transferTable/${origin.table_number}/${destination.table_number}`, null, 'get', tableTransferred, null, null)
|
||||
}
|
||||
|
||||
const tableTransferred = (tables: Record<"origin"|"destination", floorplan_table>) => {
|
||||
const origin = tables['origin']
|
||||
const destination = tables['destination']
|
||||
|
||||
Floorplan.activeTableNumbers = Floorplan.activeTableNumbers.filter(tableNumber => tableNumber != origin.table_number)
|
||||
Floorplan.activeTableNumbers.push(destination.table_number)
|
||||
if(Floorplan.currentRoom.id == origin.room_id) {
|
||||
redrawTable(getTableGroupFromTableNumber(origin.table_number))
|
||||
}
|
||||
redrawTable(getTableGroupFromTableNumber(destination.table_number))
|
||||
}
|
||||
|
||||
const getDimensions = () => {
|
||||
|
||||
Floorplan.floorplanDiv = $('#floorplanCanvas')
|
||||
const parentDiv = $('#floorplanCenterColumn .middleCell')
|
||||
const outerWidth = parentDiv.outerWidth()
|
||||
const outerHeight = parentDiv.outerHeight()
|
||||
|
||||
|
||||
|
||||
if (outerWidth >= outerHeight) {
|
||||
Floorplan.floorplanDiv.css('height', '100%')
|
||||
} else {
|
||||
Floorplan.floorplanDiv.css('width','100%')
|
||||
}
|
||||
|
||||
Floorplan.visualScale = Floorplan.floorplanDiv.width() / Floorplan.visualScaleBasis
|
||||
|
||||
return {width: Floorplan.floorplanDiv.width(), height:Floorplan.floorplanDiv.height()}
|
||||
}
|
||||
@@ -1,604 +0,0 @@
|
||||
type OrderScreenData = {
|
||||
order_screen_pages: order_screen_page[]
|
||||
sales_categories: sales_category[]
|
||||
print_groups: print_group[]
|
||||
custom_item: item
|
||||
}
|
||||
|
||||
type OrderScreen = {
|
||||
order_screen_pages: order_screen_page[]
|
||||
last_added_item: orderItem
|
||||
order_items: orderItem[]
|
||||
sales_categories: sales_category[]
|
||||
print_groups: print_group[]
|
||||
order_item_id_generator: Generator
|
||||
selected_item_ids: number[]
|
||||
qty_override: number
|
||||
print_group_override: print_group
|
||||
custom_item: item,
|
||||
selected_cover: number
|
||||
table: floorplan_table,
|
||||
}
|
||||
|
||||
let OrderScreen : OrderScreen = {
|
||||
order_screen_pages: null,
|
||||
last_added_item: null,
|
||||
order_items: [],
|
||||
print_groups: [],
|
||||
sales_categories: [],
|
||||
order_item_id_generator: newestId(),
|
||||
selected_item_ids: [],
|
||||
qty_override: 1,
|
||||
print_group_override: null,
|
||||
custom_item: null,
|
||||
selected_cover: 0,
|
||||
table: null,
|
||||
}
|
||||
|
||||
const loadPageGroup = (e: Event) => {
|
||||
const button = $(e.target)
|
||||
const container = $('#pageGroupContainer')
|
||||
|
||||
$('.loadPageGroup').removeClass('active')
|
||||
button.addClass('active')
|
||||
|
||||
let pageGroupId = button.data('page-group-id')
|
||||
|
||||
container.find('.pageGroup').hide()
|
||||
|
||||
let activeGrid = $(`.pageGroup[data-page-group-id=${pageGroupId}]`)
|
||||
let navButtons = container.next('.pageNavigation')
|
||||
navButtons.css('display', 'flex')
|
||||
|
||||
activeGrid.find('.gridPage').length > 1
|
||||
? navButtons.show()
|
||||
: navButtons.hide()
|
||||
|
||||
activeGrid.css('display', 'inline-flex')
|
||||
}
|
||||
|
||||
const setupOrderScreen = (data: OrderScreenData) => {
|
||||
|
||||
$('.coverSelector, .gridContainer').hide()
|
||||
|
||||
OrderScreen.order_screen_pages = data.order_screen_pages
|
||||
OrderScreen.sales_categories = data.sales_categories
|
||||
OrderScreen.print_groups = data.print_groups
|
||||
OrderScreen.custom_item = data.custom_item
|
||||
|
||||
updateOrderBoxTotals()
|
||||
let doc = $(document)
|
||||
doc.on('click', '.nextButton', goToNextPage)
|
||||
doc.on('click', '.prevButton', goToPrevPage)
|
||||
doc.on('click', '.loadPageGroup', loadPageGroup)
|
||||
doc.on('click', '[data-primary-action=item]', itemButtonClicked)
|
||||
doc.on('click', '[data-primary-action=grid],[data-secondary-action=grid]', gridButtonClicked)
|
||||
doc.on('click', '.closeGrid', hideGrids)
|
||||
doc.on('click', '.freetextButton', freetext)
|
||||
doc.on('click', '.openItemButton', customItem)
|
||||
doc.on('click', '.orderBoxTable tbody tr', itemRowClicked)
|
||||
doc.on('click', '.voidButton', voidButtonClicked)
|
||||
doc.on('dblclick', '.voidButton', voidLastItem)
|
||||
doc.on('click', '.numpadButton', overrideQty)
|
||||
doc.on('click', '.accumulateButton', () => toggleMode('accumulate'))
|
||||
doc.on('click', '.changeCoverNumberButton', changeCoverNumberPrompt)
|
||||
doc.on('click', '.showCoverSelectorButton', showCoverSelector)
|
||||
doc.on('click', '.coverSelectorButton', coverSelected)
|
||||
doc.on('change', '[name=print_override]', printGroupOverride)
|
||||
|
||||
turnOnMode('accumulate')
|
||||
|
||||
$('.loadPageGroup').first().trigger('click')
|
||||
|
||||
let observer = new window.MutationObserver((mutations, observer) => updateOrderBoxTotals())
|
||||
|
||||
observer.observe($('.orderBoxTable tbody').get()[0], {
|
||||
subtree: true,
|
||||
attributes: true,
|
||||
childList: true
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param direction 1 for forward, -1 for backwards.
|
||||
* @param button
|
||||
*/
|
||||
const navigatePage = (direction: number, button: JQuery) => {
|
||||
const grid =
|
||||
button
|
||||
.parent()
|
||||
.parent()
|
||||
.find('.pageGroup:visible')
|
||||
grid.get()[0].scrollLeft += grid.width() * direction
|
||||
}
|
||||
|
||||
const goToNextPage = (e: JQuery.TriggeredEvent) => navigatePage(1, $(e.target))
|
||||
const goToPrevPage = (e: JQuery.TriggeredEvent) => navigatePage(-1, $(e.target))
|
||||
|
||||
const addItemToOrderBox = (orderItem:orderItem) => {
|
||||
const orderBox = $('.orderBoxTable tbody')
|
||||
let selectedRows = orderBox.find('tr.selected')
|
||||
let lastRow : JQuery = selectedRows.length ? getLastInstructionRow(selectedRows.first()) : orderBox.find('tr').last()
|
||||
const existingRow = orderBox
|
||||
.find('tr')
|
||||
.filterByData('item', orderItem.item)
|
||||
.filterByData('print_group', orderItem.print_group)
|
||||
.filterByData('cover', orderItem.cover)
|
||||
.last()
|
||||
|
||||
|
||||
//If accumulating, just increase the quantity of the existing row.
|
||||
if(existingRow.length > 0 && isInMode('accumulate')){
|
||||
incrementRowQty(existingRow, orderItem.qty)
|
||||
scrollToElement(existingRow)
|
||||
existingRow.pulse()
|
||||
} else {
|
||||
const newRow = createOrderRow(orderItem)
|
||||
lastRow.length > 0
|
||||
? lastRow.after(newRow)
|
||||
: orderBox.append(newRow)
|
||||
scrollToElement(newRow)
|
||||
newRow.pulse()
|
||||
}
|
||||
|
||||
deselectRow(orderBox.find('tr'))
|
||||
}
|
||||
|
||||
|
||||
const addInstructionToOrderBox = (instruction: orderItem) => {
|
||||
const orderBox = $('.orderBoxTable tbody')
|
||||
let selectedRows = orderBox.find('tr.selected')
|
||||
const newRow = createOrderRow(instruction)
|
||||
|
||||
//If no items are added, then you can't add an instruction row.
|
||||
if(!orderBox.find('tr.itemRow').length) return
|
||||
|
||||
if(selectedRows.length > 0){
|
||||
selectedRows.each( (_, row) => {
|
||||
const selectedRow = $(row)
|
||||
const parentRow = getParentRow(selectedRow)
|
||||
if(parentRow.is(selectedRow) || !parentRow.hasClass('selected')) {
|
||||
const newRow = createOrderRow(instruction)
|
||||
getLastInstructionRow(selectedRow).after(newRow)
|
||||
newRow
|
||||
.setColumnValue( lang('printgroup_header'), selectedRow.getColumnValue(lang('printgroup_header')) )
|
||||
|
||||
|
||||
if(parentRow.hasClass('selected')){
|
||||
selectRow(newRow)
|
||||
} else {
|
||||
newRow.pulse()
|
||||
}
|
||||
|
||||
scrollToElement(newRow)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const lastRow = orderBox.find('tr').last()
|
||||
newRow
|
||||
.setColumnValue(lang('printgroup_header'), lastRow.getColumnValue(lang('printgroup_header')))
|
||||
.appendTo(orderBox)
|
||||
.pulse()
|
||||
scrollToElement(newRow)
|
||||
}
|
||||
|
||||
|
||||
const addNewItem = (item: item, qty = 1) => {
|
||||
const salesCategory = OrderScreen.sales_categories.where('id', item.item_category)
|
||||
const printGroup = OrderScreen.print_group_override ?? OrderScreen.print_groups.where('id', salesCategory.print_group)
|
||||
const orderItem : orderItem = {
|
||||
id: OrderScreen.order_item_id_generator.next().value,
|
||||
item: item,
|
||||
qty: qty,
|
||||
print_group: printGroup,
|
||||
cover: OrderScreen.selected_cover,
|
||||
}
|
||||
|
||||
switch(item.item_type){
|
||||
case 'instruction':
|
||||
addInstructionToOrderBox(orderItem)
|
||||
break
|
||||
case 'item':
|
||||
default:
|
||||
addItemToOrderBox(orderItem)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
const getLastInstructionRow = (row: JQuery) => {
|
||||
let stopCounting = false
|
||||
let finalRow = row
|
||||
row.nextAll().each(function (index, activeRow){
|
||||
if(!stopCounting){
|
||||
if($(activeRow).hasClass('instructionRow')){
|
||||
finalRow = $(activeRow)
|
||||
} else {
|
||||
stopCounting = true
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
return $(finalRow)
|
||||
}
|
||||
|
||||
const getParentRow = (row: JQuery) => {
|
||||
return row.hasClass('instructionRow')
|
||||
? row.prevAll('.itemRow').first()
|
||||
: row
|
||||
}
|
||||
|
||||
const incrementRowQty = (row: JQuery, qty: number) => {
|
||||
const existingQty = Number(row.getColumnValue(lang('qty_header')))
|
||||
const newQty = qty + existingQty
|
||||
row.setColumnValue(lang('qty_header'), newQty)
|
||||
calculateRowTotal(row)
|
||||
}
|
||||
|
||||
const renderOrderBox = () => {
|
||||
const orderBox = $('.orderBoxTable')
|
||||
const tbody = orderBox.children('tbody')
|
||||
const newTbody = $('<tbody />')
|
||||
OrderScreen.order_items.forEach(orderItem => {
|
||||
const newRow = createOrderRow(orderItem)
|
||||
newTbody.append(newRow)
|
||||
newRow.pulse()
|
||||
if(OrderScreen.selected_item_ids.includes(orderItem.id)){
|
||||
selectRow(newRow)
|
||||
}
|
||||
})
|
||||
|
||||
tbody.replaceWith(newTbody)
|
||||
const element = orderBox.find('tbody tr').last().get()[0]
|
||||
element.scrollIntoView()
|
||||
OrderScreen.last_added_item = null
|
||||
}
|
||||
|
||||
const createOrderRow = (orderItem: orderItem) => {
|
||||
const row = $('.orderBoxTable').EmptyRow()
|
||||
const price = money(orderItem.item.price1)
|
||||
const itemCellText = $('<span/>').text(orderItem.item.item_name)
|
||||
row
|
||||
.addClass(`${orderItem.item.item_type}Row`)
|
||||
.setColumnValue(lang('qty_header'), orderItem.qty)
|
||||
.setColumnValue(lang('price_header'), price)
|
||||
.setColumnValue(lang('id_header'), orderItem.item.id)
|
||||
.setColumnValue(lang('total_price_header'), price.multiply(orderItem.qty))
|
||||
.setColumnValue(lang('printgroup_header'), orderItem.print_group?.name)
|
||||
.data('order-item-id', orderItem.id)
|
||||
.data('order-item-id', orderItem.id)
|
||||
.data('print_group', orderItem.print_group)
|
||||
.data('cover', orderItem.cover)
|
||||
.data('item', orderItem.item)
|
||||
.find('td.itemCell')
|
||||
.append(itemCellText)
|
||||
|
||||
changeCoverOnRow(row, orderItem.cover)
|
||||
|
||||
if(orderItem.item.item_type == 'instruction' && price.value <= 0){
|
||||
row
|
||||
.find('.totalPriceCell')
|
||||
.css('font-size', 0)
|
||||
}
|
||||
|
||||
return row
|
||||
}
|
||||
|
||||
const itemButtonClicked = (e: JQuery.TriggeredEvent) => {
|
||||
hideGrids()
|
||||
const existingItemRows = $('.itemRow')
|
||||
const button = $(e.target).closest('.posButton')
|
||||
const item : item = button.data('item')
|
||||
|
||||
if(item.item_type == 'instruction' && existingItemRows.length < 1) return
|
||||
|
||||
const qty = OrderScreen.qty_override || 1
|
||||
OrderScreen.qty_override = 1
|
||||
|
||||
addNewItem(item, qty)
|
||||
|
||||
}
|
||||
|
||||
const gridButtonClicked = (e: JQuery.TriggeredEvent) => {
|
||||
const button = $(e.target).closest('.posButton')
|
||||
const grid : number = button.data('grid')
|
||||
ajax(`/order/getGridHtml/${grid}`, null, null,gridHtmlGenerated, null, null)
|
||||
}
|
||||
|
||||
|
||||
const hideGrids = () => $('.gridContainer').hide()
|
||||
|
||||
|
||||
const gridHtmlGenerated = (gridData: {gridHtml:string, grid: grid}) => {
|
||||
const gridContainer = $('.gridContainer')
|
||||
const gridCellWidth = getGridCellWidth()
|
||||
const gridCellHeight = getGridCellHeight()
|
||||
const grid = gridData.grid
|
||||
const gridHtml = gridData.gridHtml
|
||||
|
||||
gridContainer
|
||||
.show()
|
||||
.width(gridCellWidth * grid.grid_cols)
|
||||
.children('.gridContainerHeader')
|
||||
.children('span')
|
||||
.text(grid.grid_name)
|
||||
.parent()
|
||||
.parent()
|
||||
.find('.pageGroup')
|
||||
.html(gridHtml)
|
||||
.show()
|
||||
.parent()
|
||||
.height(gridCellHeight * grid.grid_rows)
|
||||
.closest('.gridContainer')
|
||||
.find('.pageNavigation')
|
||||
.toggle(gridContainer.find('.gridPage').length > 1)
|
||||
.height(gridCellHeight)
|
||||
}
|
||||
|
||||
const itemRowClicked = (e: JQuery.TriggeredEvent) => {
|
||||
const row = $(e.target).closest('tr')
|
||||
|
||||
if(isInMode('void')){
|
||||
voidRows(row)
|
||||
turnOffMode('void')
|
||||
return
|
||||
}
|
||||
|
||||
if(!row.hasClass('selected')) selectRow(row)
|
||||
else deselectRow(row)
|
||||
|
||||
}
|
||||
|
||||
const selectRow = (row: JQuery) => {
|
||||
row.addClass('selected')
|
||||
const instructionRows = row.nextUntil('.itemRow')
|
||||
|
||||
if(row.hasClass('itemRow') && instructionRows.length){
|
||||
instructionRows.each((index, row) => {
|
||||
selectRow($(row))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const deselectRow = (row: JQuery) => {
|
||||
row.removeClass('selected')
|
||||
const instructionRows = row.nextUntil('.itemRow')
|
||||
|
||||
if(row.hasClass('itemRow') && instructionRows.length){
|
||||
deselectRow(instructionRows)
|
||||
}
|
||||
}
|
||||
|
||||
const deleteRow = (row: JQuery) => row.find('*:not(.hidden)').slideUp('fast', () => row.remove())
|
||||
|
||||
const voidInstructionRow = (row: JQuery) => {
|
||||
if(!row.prevAll('.itemRow').first().hasClass('selected'))
|
||||
deleteRow(row)
|
||||
}
|
||||
|
||||
const voidItemRow = (row : JQuery) => decrementQty(row)
|
||||
|
||||
const voidRow = (row: JQuery) => {
|
||||
if(row.hasClass('itemRow')) voidItemRow(row)
|
||||
else voidInstructionRow(row)
|
||||
}
|
||||
|
||||
const voidRows = (rows: JQuery) => rows.each((index, row) => voidRow($(row)))
|
||||
|
||||
const voidButtonClicked = () => {
|
||||
const selectedRows = $('.orderBox tr.selected')
|
||||
if(isInMode('void')){
|
||||
turnOffMode('void')
|
||||
} else if(selectedRows.length){
|
||||
voidRows(selectedRows)
|
||||
} else {
|
||||
turnOnMode('void')
|
||||
}
|
||||
}
|
||||
|
||||
const voidLastItem = () => {
|
||||
const orderBox = $('.orderBoxTable tbody')
|
||||
const allRows = orderBox.find('tr')
|
||||
if(allRows.length < 1) return
|
||||
voidRows(allRows.last())
|
||||
}
|
||||
|
||||
const updateOrderBoxTotals = () => {
|
||||
const allRows = $('.orderBoxTable tbody tr')
|
||||
const selectedRows = $('.orderBoxTable tbody tr.selected')
|
||||
const completeTotal = lang('totalPrice', getTotalOfRows(allRows))
|
||||
const selectedTotal = lang('selectedPrice', getTotalOfRows(selectedRows))
|
||||
|
||||
$('.orderBoxTotal').text(completeTotal)
|
||||
$('.orderBoxSelectedTotal').text(selectedTotal)
|
||||
}
|
||||
|
||||
const getTotalOfRows = (rows: JQuery) => {
|
||||
return money(rows
|
||||
.find('td.totalPriceCell')
|
||||
.get()
|
||||
.map(cell => Number(cell.innerText))
|
||||
.filter(number => !isNaN(number))
|
||||
.reduce( (total, number) => total + number , 0), false)
|
||||
.format()
|
||||
}
|
||||
|
||||
const getQty = (row: JQuery) => Number(row.getColumnValue(lang('qty_header')))
|
||||
const getUnitPrice = (row: JQuery) => moneyFromString(row.getColumnValue(lang('price_header')))
|
||||
const calculateRowTotal = (row: JQuery) => {
|
||||
let price = getUnitPrice(row)
|
||||
let qty = getQty(row)
|
||||
row.setColumnValue(lang('total_price_header'), price.multiply(qty))
|
||||
}
|
||||
|
||||
const decrementQty = (row: JQuery, qty=1) => {
|
||||
const existingQty = getQty(row)
|
||||
|
||||
if(existingQty <= 1){
|
||||
const childRows = row.nextUntil('.itemRow')
|
||||
deleteRow(row)
|
||||
deleteRow(childRows)
|
||||
return
|
||||
}
|
||||
row.setColumnValue(lang('qty_header'), existingQty - qty)
|
||||
calculateRowTotal(row)
|
||||
}
|
||||
|
||||
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 elemTop = element.offsetTop
|
||||
const elemBottom = elemTop + $(element).height();
|
||||
if (elemTop < containerTop) {
|
||||
$(container).scrollTop(elemTop);
|
||||
} else if (elemBottom > containerBottom) {
|
||||
$(container).scrollTop(elemBottom - $(container).height());
|
||||
}
|
||||
}
|
||||
|
||||
const overrideQty = () => showVirtualNumpad(lang('multiplier'), 4, false, true, true, qtyOverridden)
|
||||
|
||||
const qtyOverridden = (qtyString: string) => OrderScreen.qty_override = Number(qtyString)
|
||||
|
||||
const printGroupOverride = (e: JQuery.TriggeredEvent) => {
|
||||
const input = $(e.target)
|
||||
const printGroupId = Number(input.val())
|
||||
const orderBox = $('.orderBoxTable tbody')
|
||||
const selectedRows = orderBox.find('tr.selected')
|
||||
const newPrintGroup = OrderScreen.print_groups.where('id', printGroupId)
|
||||
|
||||
if(selectedRows.length && newPrintGroup){
|
||||
selectedRows.each((index, row) => {
|
||||
$(row).setColumnValue(lang('printgroup_header'), newPrintGroup.name)
|
||||
$(row).data('print_group', newPrintGroup)
|
||||
})
|
||||
|
||||
OrderScreen.print_group_override = null
|
||||
resetToggle(input)
|
||||
|
||||
} else {
|
||||
OrderScreen.print_group_override = newPrintGroup
|
||||
}
|
||||
}
|
||||
|
||||
const freetext = () => showVirtualKeyboard('', 32,false, freetextSubmitted)
|
||||
|
||||
const freetextSubmitted = (text: string) => {
|
||||
if(text.trim().length < 1) return
|
||||
|
||||
if($('.orderBoxTable tbody tr').length < 1){
|
||||
posAlert(lang('freetext_no_order'))
|
||||
}
|
||||
|
||||
const item = Object.assign({}, OrderScreen.custom_item)
|
||||
item.item_type = 'instruction'
|
||||
item.item_name = text
|
||||
|
||||
addNewItem(item)
|
||||
|
||||
}
|
||||
|
||||
const customItem = () => showVirtualKeyboard(lang('enter_item_name'), 32,false, customItemTextSubmitted)
|
||||
|
||||
const customItemTextSubmitted = (text: string) => {
|
||||
const submitFunction = (priceString: string) => {
|
||||
const price = currency(priceString, {fromCents: false})
|
||||
|
||||
const item = Object.assign({}, OrderScreen.custom_item)
|
||||
item.item_type = 'item'
|
||||
item.item_name = text
|
||||
item.price1 = price.intValue
|
||||
|
||||
addNewItem(item)
|
||||
}
|
||||
showVirtualNumpad(lang('enter_item_price'), 4, false, true, true, submitFunction)
|
||||
}
|
||||
|
||||
const getGridCellHeight = () => $('#pageGroupContainer').height()/8
|
||||
const getGridCellWidth = () => $('#pageGroupContainer').width()/6
|
||||
|
||||
|
||||
const showCoverSelector = (event: JQuery.TriggeredEvent) => {
|
||||
const button = $(event.target)
|
||||
const gridHeight = getGridCellHeight()
|
||||
|
||||
const coverSelector = $('.coverSelector')
|
||||
coverSelector
|
||||
.toggle(!coverSelector.is(':visible'))
|
||||
.width(button.width())
|
||||
.css({
|
||||
left: button.offset().left + 'px',
|
||||
top: button.offset().top + button.height() + 'px',
|
||||
})
|
||||
.find('.coverSelectorButton')
|
||||
.height(gridHeight)
|
||||
|
||||
}
|
||||
|
||||
const coverSelected = (event: JQuery.TriggeredEvent) => {
|
||||
$('.coverSelector').hide()
|
||||
const button = $(event.target)
|
||||
const cover = Number(button.data('cover'))
|
||||
const selectedRows = $('.orderBoxTable tbody').find('tr.itemRow.selected')
|
||||
|
||||
selectedRows.each( (_, selectedRow) => changeCoverOnRow($(selectedRow), cover))
|
||||
OrderScreen.selected_cover = cover
|
||||
}
|
||||
|
||||
const changeCoverOnRow = (row: JQuery, cover: number) => {
|
||||
row.data('cover', cover)
|
||||
const itemCell = row.find('.itemCell')
|
||||
const existingCoverSpan = itemCell.find('small')
|
||||
const coverSpan = existingCoverSpan.length > 0
|
||||
? existingCoverSpan
|
||||
: $('<small/>').appendTo(itemCell)
|
||||
|
||||
coverSpan.text(lang('selected_cover', cover.toString()))
|
||||
if(cover < 1 || !row.hasClass('itemRow')) {
|
||||
coverSpan.remove()
|
||||
}
|
||||
}
|
||||
|
||||
const changeCoverNumberPrompt = () =>
|
||||
showVirtualNumpad(lang('how_many_covers'), 3, false, false, true, changeCoverNumberPromptSubmitted)
|
||||
|
||||
|
||||
const changeCoverNumberPromptSubmitted = (value: string) => updateCoverNumbers(Number(value))
|
||||
|
||||
const updateCoverNumbers = (covers: number) => {
|
||||
let newTable = Object.assign({}, OrderScreen.table)
|
||||
newTable.default_covers = covers
|
||||
ajax('/order/updateCovers', newTable, 'post', coverNumbersUpdated, null, null)
|
||||
}
|
||||
|
||||
const coverNumbersUpdated = (newTable: floorplan_table) => {
|
||||
const covers = newTable.default_covers
|
||||
OrderScreen.table = newTable
|
||||
$('.changeCoverNumberButton').text(lang('covers', covers.toString()))
|
||||
generateCoverSelector()
|
||||
}
|
||||
|
||||
const generateCoverSelector = () => {
|
||||
const covers = OrderScreen.table.default_covers
|
||||
const coverSelector = $('.coverSelector')
|
||||
coverSelector.hide().children().remove()
|
||||
|
||||
for(let cover=0; cover<=covers; cover++) {
|
||||
const buttonText = cover==0 ? lang('cover_zero') : lang('selected_cover', cover.toString())
|
||||
loadTemplate('#posButtonTemplate')
|
||||
.find('a')
|
||||
.first()
|
||||
.addClass('coverSelectorButton')
|
||||
.text(buttonText)
|
||||
.data('cover', cover)
|
||||
.appendTo(coverSelector)
|
||||
}
|
||||
}
|
||||
|
||||
$(() => {
|
||||
OrderScreen.table = $('#pageContainer').data('table') || null
|
||||
ajax('/order/getOrderScreenData/1', null, 'get', setupOrderScreen, null, null)
|
||||
})
|
||||
@@ -1,53 +0,0 @@
|
||||
interface JQuery {
|
||||
getColumnValue(columnHeading: string) : string
|
||||
setColumnValue(columnHeading: string, value: any) : JQuery
|
||||
getColumnIndex(columnHeading: string) : number
|
||||
EmptyRow() : JQuery<HTMLTableRowElement>
|
||||
filterByData(prop: string, value: any) : JQuery
|
||||
pulse() : JQuery
|
||||
}
|
||||
|
||||
$.fn.pulse = function(this: JQuery) {
|
||||
pulseElement(this)
|
||||
return this
|
||||
}
|
||||
|
||||
$.fn.EmptyRow = function(this: JQuery) {
|
||||
const headingRow = this.find('th').first().closest('tr')
|
||||
const headingCells = headingRow.find('th')
|
||||
const newRow = $('<tr/>')
|
||||
headingCells.each( (index, cell) => {
|
||||
const newCell = $('<td/>')
|
||||
const attributes = Array.from(cell.attributes)
|
||||
newCell.data('column', cell.innerText.trim())
|
||||
newCell.data('column-index', index)
|
||||
attributes.forEach(attribute => newCell.attr(attribute.name, attribute.value))
|
||||
newRow.append(newCell)
|
||||
})
|
||||
|
||||
return newRow as JQuery<HTMLTableRowElement>
|
||||
}
|
||||
|
||||
$.fn.getColumnIndex = function(this: JQuery, columnHeading: string){
|
||||
return this
|
||||
.find('td')
|
||||
.filterByData('column', columnHeading)
|
||||
.data('column-index')
|
||||
}
|
||||
|
||||
$.fn.getColumnValue = function(this: JQuery, columnHeading: string){
|
||||
return this.find('td').filterByData('column', columnHeading).text()
|
||||
}
|
||||
|
||||
$.fn.setColumnValue = function(this: JQuery, columnHeading: string, value: any){
|
||||
this.find('td').filterByData('column', columnHeading).text(value)
|
||||
return this
|
||||
}
|
||||
|
||||
$.fn.filterByData = function(prop: string, val: any) {
|
||||
return this.filter(
|
||||
function() {
|
||||
return $(this).data(prop)==val
|
||||
}
|
||||
)
|
||||
}
|
||||
@@ -1,268 +0,0 @@
|
||||
type KeyboardRowName = `row${number}${"" | "_"}${string}`;
|
||||
type KeyboardRow = Partial<Record<KeyboardRowName, string[]>>
|
||||
interface VirtualKeyboard {
|
||||
[layoutName: string]: KeyboardRow;
|
||||
}
|
||||
|
||||
let showVirtualNumpad = (heading: string, maxlength = 4, isPassword: boolean, allowDecimals = true, allowClose = true, submitFunction: Function) => {
|
||||
let numpad = $('#virtualNumpad');
|
||||
let inputBox = $('#virtualNumpadInput')
|
||||
let closeKeyboardButton = $('.closeKeyboards')
|
||||
|
||||
numpad.css('display', 'flex')
|
||||
|
||||
let showCloseButton = allowClose ? 'flex' : 'none'
|
||||
closeKeyboardButton.css('display', showCloseButton)
|
||||
$('#virtualNumpadHeading').html(heading)
|
||||
|
||||
/*
|
||||
The numpad always submits to a function.
|
||||
If a function isn't specified, it will submit
|
||||
to the same function that called it
|
||||
*/
|
||||
|
||||
numpad.data('value', '');
|
||||
inputBox.text('');
|
||||
|
||||
numpad.data('maxlength', maxlength)
|
||||
numpad.data('submitfunction', submitFunction)
|
||||
numpad.data('password', isPassword);
|
||||
numpad.data('allowdecimals', allowDecimals);
|
||||
|
||||
$(document).off('keyup');
|
||||
$(document).on('keyup', e => {
|
||||
let key = e.key;
|
||||
switch (key) {
|
||||
case 'Backspace':
|
||||
case 'Delete':
|
||||
key = 'clear'
|
||||
break;
|
||||
case 'Enter':
|
||||
key = 'submit'
|
||||
break;
|
||||
}
|
||||
|
||||
virtualNumpadInput(key)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
let hideVirtualKeyboard = () => {
|
||||
let keyboard = $('#virtualKeyboard');
|
||||
keyboard.hide()
|
||||
$('#virtualKeyboardHeading').html('');
|
||||
$(document).unbind('keyup');
|
||||
}
|
||||
|
||||
let hideVirtualNumpad = () => {
|
||||
let numpad = $('#virtualNumpad')
|
||||
numpad.css('display', 'none')
|
||||
$('#virtualNumpadHeading').html('')
|
||||
$(document).unbind('keyup')
|
||||
}
|
||||
|
||||
let virtualNumpadInput = (input: string) => {
|
||||
let inputBox = $('#virtualNumpadInput')
|
||||
let numpad = $('#virtualNumpad')
|
||||
let maxlength = numpad.data('maxlength')
|
||||
let allowDecimals = numpad.data('allowdecimals')
|
||||
let submitFunction = numpad.data('submitfunction')
|
||||
let allowedValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'submit', 'clear']
|
||||
let currentValue = numpad.data('value').toString()
|
||||
|
||||
if (allowDecimals)
|
||||
allowedValues.push('.', ',')
|
||||
|
||||
let validInput = allowedValues.includes(input);
|
||||
//If the input is a valid number, decimal point or command.
|
||||
if (validInput) {
|
||||
switch (input) {
|
||||
case 'submit':
|
||||
hideVirtualNumpad()
|
||||
let numpadValue: string = numpad.data('value').length > 0 ? numpad.data('value') : "0"
|
||||
submitFunction(numpadValue)
|
||||
break;
|
||||
case 'clear':
|
||||
clearNumpadInput()
|
||||
break;
|
||||
default:
|
||||
let newText = currentValue + input
|
||||
let isPassword = numpad.data('password')
|
||||
let length = input.length + inputBox.text().length
|
||||
|
||||
if (length <= maxlength) {
|
||||
inputBox.append(isPassword ? '*' : input)
|
||||
numpad.data('value', newText)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let clearNumpadInput = () => {
|
||||
$('#virtualNumpadInput').text("")
|
||||
$('#virtualNumpad').data('value', '')
|
||||
}
|
||||
|
||||
let setupVirtualNumpad = () => {
|
||||
$(document).on('click', '.virtualNumpadButton', e => {
|
||||
virtualNumpadInput($(e.target).data('value').toString())
|
||||
})
|
||||
|
||||
$('.closeKeyboards').on('click', () => {
|
||||
hideVirtualKeyboard();
|
||||
hideVirtualNumpad()
|
||||
});
|
||||
}
|
||||
|
||||
let setupVirtualKeyboard = (keyboardLayouts: VirtualKeyboard) => {
|
||||
Application.keyboard = {
|
||||
capsLock: false,
|
||||
shift: false,
|
||||
layouts: keyboardLayouts,
|
||||
currentLayout: 'default',
|
||||
}
|
||||
|
||||
$(document).on('click', '.virtualKeyboardButton', e => {
|
||||
virtualKeyboardInput($(e.target).data('value'));
|
||||
})
|
||||
|
||||
$(document).on('click', '.forceFocus', (e) => {
|
||||
$('#virtualKeyboardInput').trigger('focus')
|
||||
})
|
||||
setKeyboardLayout('default')
|
||||
}
|
||||
|
||||
let showVirtualKeyboard = (heading: string, maxlength = 32, isPassword = false, submitFunction :Function = () => {hideVirtualKeyboard()}) => {
|
||||
let keyboard = $('#virtualKeyboard')
|
||||
let inputBox = $('#virtualKeyboardInput')
|
||||
|
||||
keyboard.css('display', 'flex')
|
||||
$('#virtualKeyboardHeading').html(heading)
|
||||
$('.forceFocus').trigger('click')
|
||||
|
||||
keyboard.data('value', '')
|
||||
inputBox.val('')
|
||||
keyboard.data('maxlength', maxlength)
|
||||
keyboard.data('password', isPassword)
|
||||
keyboard.data('submitfunction', submitFunction)
|
||||
inputBox.attr('autofocus', 'autofocus');
|
||||
inputBox.trigger('focus')
|
||||
inputBox.trigger('click')
|
||||
inputBox.trigger('select')
|
||||
$(document).on('keyup', e => {
|
||||
let key = e.key
|
||||
if (key == 'Enter' && inputBox.val().toString().length > 0) {
|
||||
key = 'submit'
|
||||
virtualKeyboardInput(key)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
let virtualKeyboardInput = (input: string) => {
|
||||
let inputBox = $('#virtualKeyboardInput')
|
||||
let keyboard = $('#virtualKeyboard');
|
||||
|
||||
let maxlength = keyboard.data('maxlength');
|
||||
let isPassword = keyboard.data('password');
|
||||
let length = input.length + inputBox.text().length
|
||||
|
||||
switch (input.toLowerCase()) {
|
||||
case 'backspace':
|
||||
case 'delete':
|
||||
let newText = inputBox.text().slice(0, -1);
|
||||
inputBox.val(newText)
|
||||
keyboard.data('value', newText);
|
||||
break;
|
||||
case 'submit':
|
||||
hideVirtualKeyboard();
|
||||
let submitFunction = keyboard.data('submitfunction')
|
||||
submitFunction(inputBox.val());
|
||||
break;
|
||||
case 'shift':
|
||||
if (Application.keyboard.capsLock) break;
|
||||
Application.keyboard.shift = !Application.keyboard.shift
|
||||
Application.keyboard.capsLock = false
|
||||
setKeyboardLayout('default', Application.keyboard.shift ? 'shift' : '')
|
||||
break;
|
||||
case 'capslock':
|
||||
Application.keyboard.shift = false
|
||||
Application.keyboard.capsLock = !Application.keyboard.capsLock
|
||||
let capsLockButton = $('[data-value="capslock"]')
|
||||
capsLockButton.toggleClass('active')
|
||||
setKeyboardLayout('default', Application.keyboard.capsLock ? 'shift' : '')
|
||||
break;
|
||||
case 'space':
|
||||
input = ' ';
|
||||
break;
|
||||
}
|
||||
|
||||
//Stops keys such as F5 being pressed.
|
||||
if (input.length == 1) {
|
||||
if (Application.keyboard.shift || Application.keyboard.capsLock) {
|
||||
input = input.toUpperCase()
|
||||
|
||||
//If shift, reload lowercase
|
||||
if (Application.keyboard.shift) {
|
||||
Application.keyboard.shift = false
|
||||
setKeyboardLayout('default');
|
||||
}
|
||||
}
|
||||
|
||||
let newText = inputBox.val() + input;
|
||||
keyboard.data('value', newText);
|
||||
inputBox.val(newText)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
let setKeyboardLayout = (layout: string, modifier = '') => {
|
||||
if (modifier != '') modifier = `_${modifier}`
|
||||
Application.keyboard.currentLayout = layout
|
||||
let layoutToLoad = Application.keyboard.layouts[layout]
|
||||
|
||||
$('.virtualKeyboardRow').each((index, row) => {
|
||||
/*
|
||||
We start at 1 instead of 0. Makes it easier for non-programmers
|
||||
and translators making their own language packs
|
||||
*/
|
||||
index = index + 1
|
||||
|
||||
let currentRow : string[] = layoutToLoad[`row${index}${modifier}`]
|
||||
|
||||
$(row).children('a').each((keyIndex, button) => {
|
||||
let key = $(button);
|
||||
let keyValue: string = currentRow[keyIndex];
|
||||
|
||||
/*
|
||||
KeyText is the text that appears
|
||||
in the button. KeyData is the value
|
||||
submitted when the button is pressed.
|
||||
*/
|
||||
let keyText = keyValue;
|
||||
let keyData = keyValue;
|
||||
|
||||
key.addClass('posButton');
|
||||
key.addClass('virtualKeyboardButton');
|
||||
|
||||
let pattern = new RegExp(/\[([^)]+)\]/);
|
||||
let matches = keyValue.match(pattern);
|
||||
|
||||
if (matches) {
|
||||
keyText = keyValue.replace(pattern, '');
|
||||
keyData = matches[1];
|
||||
}
|
||||
|
||||
key.html(keyText)
|
||||
|
||||
//Use attr() as some keys have CSS dependent on data-value
|
||||
key.attr('data-value', keyData)
|
||||
key.data('value', keyData)
|
||||
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
$(() => {
|
||||
setupVirtualNumpad()
|
||||
ajax('/ajax/getKeyboardLayout/english', null, 'get',setupVirtualKeyboard, null, null)
|
||||
})
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"name": "ts",
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"compilerOptions":{
|
||||
"lib":[
|
||||
"esnext",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny":true,
|
||||
"removeComments":false,
|
||||
"preserveConstEnums":true,
|
||||
"outDir":"../js",
|
||||
"target":"ES2016",
|
||||
"sourceMap":true,
|
||||
"moduleResolution": "node"
|
||||
},
|
||||
"include":[
|
||||
"*"
|
||||
]
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
type PosMode = "edit" | "void" | "transfer" | "default" | "tableSelected" | "decorationSelected" | "activeTableSelected" | "merge" | "reservedTableSelected" | "accumulate"
|
||||
type PosModes = PosMode[]
|
||||
|
||||
interface order {
|
||||
clerk: string
|
||||
split: boolean
|
||||
items: orderItem[]
|
||||
}
|
||||
|
||||
interface orderItem {
|
||||
id: number
|
||||
qty: number
|
||||
print_group: print_group
|
||||
item: item
|
||||
cover: number
|
||||
}
|
||||
|
||||
interface print_group {
|
||||
id: number,
|
||||
name: string,
|
||||
printer: number,
|
||||
venue_id: number,
|
||||
}
|
||||
|
||||
interface ajaxResult {
|
||||
status: string
|
||||
data : any
|
||||
}
|
||||
|
||||
interface ApplicationState {
|
||||
keyboard: keyboard
|
||||
mode: PosModes
|
||||
languageVars: Record<any, string>
|
||||
}
|
||||
|
||||
interface floorplan_table {
|
||||
table_number: number,
|
||||
room_id: number
|
||||
venue_id: number
|
||||
pos_x: number
|
||||
pos_y: number
|
||||
shape: string
|
||||
width: number
|
||||
height: number
|
||||
default_covers: number
|
||||
rotation: number
|
||||
merged_children: string
|
||||
previous_state: string
|
||||
status: number
|
||||
id: number
|
||||
}
|
||||
|
||||
interface decoration {
|
||||
id: number
|
||||
decoration_room: number
|
||||
decoration_pos_x: number
|
||||
decoration_pos_y: number
|
||||
decoration_rotation: number
|
||||
decoration_width: number
|
||||
decoration_height: number
|
||||
decoration_image: string
|
||||
venue_id: number
|
||||
}
|
||||
|
||||
interface room {
|
||||
id: number
|
||||
room_name: string
|
||||
background_image: string
|
||||
venue_id: number
|
||||
}
|
||||
|
||||
|
||||
interface reservation {
|
||||
id: number,
|
||||
name: string,
|
||||
time: number,
|
||||
covers: number,
|
||||
created_at: number,
|
||||
floorplan_table_id: number,
|
||||
}
|
||||
|
||||
interface keyboard {
|
||||
capsLock: boolean
|
||||
shift: boolean
|
||||
layouts: VirtualKeyboard
|
||||
currentLayout: string
|
||||
}
|
||||
|
||||
interface order_screen_page{id: number; order_screen_page_group_id: number; grid_id: number}
|
||||
interface grid {id: number; grid_name: string; grid_rows: number; grid_cols: number; grid_data: string}
|
||||
|
||||
interface item {
|
||||
id: number
|
||||
item_code: string
|
||||
item_category: number
|
||||
item_name: string
|
||||
item_type: string
|
||||
price1: number
|
||||
price2: number
|
||||
price3: number
|
||||
price4: number
|
||||
price5: number
|
||||
}
|
||||
|
||||
type sales_category = {
|
||||
id: number
|
||||
parent: number
|
||||
name: string
|
||||
print_group: string
|
||||
venue_id: number
|
||||
}
|
||||
|
||||
interface Array<T> {
|
||||
where(property: string, value: any): T
|
||||
}
|
||||
38
wwwroot/scripts/ts/typings/currency.d.ts
vendored
38
wwwroot/scripts/ts/typings/currency.d.ts
vendored
@@ -1,38 +0,0 @@
|
||||
declare namespace currency {
|
||||
type Any = number | string | currency;
|
||||
type Format = (currency?: currency, opts?: Options) => string;
|
||||
interface Constructor {
|
||||
(value: currency.Any, opts?: currency.Options): currency,
|
||||
new(value: currency.Any, opts?: currency.Options): currency
|
||||
}
|
||||
interface Options {
|
||||
symbol?: string,
|
||||
separator?: string,
|
||||
decimal?: string,
|
||||
errorOnInvalid?: boolean,
|
||||
precision?: number,
|
||||
increment?: number,
|
||||
useVedic?: boolean,
|
||||
pattern?: string,
|
||||
negativePattern?: string,
|
||||
format?: currency.Format,
|
||||
fromCents?: boolean
|
||||
}
|
||||
}
|
||||
|
||||
interface currency {
|
||||
add(number: currency.Any): currency;
|
||||
subtract(number: currency.Any): currency;
|
||||
multiply(number: currency.Any): currency;
|
||||
divide(number: currency.Any): currency;
|
||||
distribute(count: number): Array<currency>;
|
||||
dollars(): number;
|
||||
cents(): number;
|
||||
format(opts?: currency.Options | currency.Format): string;
|
||||
toString(): string;
|
||||
toJSON(): number;
|
||||
readonly intValue: number;
|
||||
readonly value: number;
|
||||
}
|
||||
|
||||
declare const currency: currency.Constructor;
|
||||
174
wwwroot/scripts/ts/typings/konva.d.ts
vendored
174
wwwroot/scripts/ts/typings/konva.d.ts
vendored
@@ -1,174 +0,0 @@
|
||||
// filters
|
||||
import { Blur } from 'konva/lib/filters/Blur';
|
||||
import { Brighten } from 'konva/lib/filters/Brighten';
|
||||
import { Contrast } from 'konva/lib/filters/Contrast';
|
||||
import { Emboss } from 'konva/lib/filters/Emboss';
|
||||
import { Enhance } from 'konva/lib/filters/Enhance';
|
||||
import { Grayscale } from 'konva/lib/filters/Grayscale';
|
||||
import { HSL } from 'konva/lib/filters/HSL';
|
||||
import { HSV } from 'konva/lib/filters/HSV';
|
||||
import { Invert } from 'konva/lib/filters/Invert';
|
||||
import { Kaleidoscope } from 'konva/lib/filters/Kaleidoscope';
|
||||
import { Mask } from 'konva/lib/filters/Mask';
|
||||
import { Noise } from 'konva/lib/filters/Noise';
|
||||
import { Pixelate } from 'konva/lib/filters/Pixelate';
|
||||
import { Posterize } from 'konva/lib/filters/Posterize';
|
||||
import { RGB } from 'konva/lib/filters/RGB';
|
||||
import { RGBA } from 'konva/lib/filters/RGBA';
|
||||
import { Sepia } from 'konva/lib/filters/Sepia';
|
||||
import { Solarize } from 'konva/lib/filters/Solarize';
|
||||
import { Threshold } from 'konva/lib/filters/Threshold';
|
||||
|
||||
declare global {
|
||||
export namespace Konva {
|
||||
export let enableTrace: number;
|
||||
export let pixelRatio: number;
|
||||
export let dragDistance: number;
|
||||
export let angleDeg: boolean;
|
||||
export let showWarnings: boolean;
|
||||
export let capturePointerEventsEnabled: boolean;
|
||||
export let dragButtons: Array<number>;
|
||||
export let hitOnDragEnabled: boolean;
|
||||
export const isDragging: () => boolean;
|
||||
export const isDragReady: () => boolean;
|
||||
|
||||
export type Vector2d = import('konva/lib/types').Vector2d;
|
||||
|
||||
export const Node: typeof import('konva/lib/Node').Node;
|
||||
export type Node = import('konva/lib/Node').Node;
|
||||
export type NodeConfig = import('konva/lib/Node').NodeConfig;
|
||||
|
||||
export type KonvaEventObject<EventType> =
|
||||
import('konva/lib/Node').KonvaEventObject<EventType>;
|
||||
|
||||
export type KonvaPointerEvent =
|
||||
import('konva/lib/PointerEvents').KonvaPointerEvent;
|
||||
|
||||
export type KonvaEventListener<This, EventType> =
|
||||
import('konva/lib/Node').KonvaEventListener<This, EventType>;
|
||||
|
||||
export const Container: typeof import('konva/lib/Container').Container;
|
||||
export type Container = import('konva/lib/Container').Container<Node>;
|
||||
export type ContainerConfig = import('konva/lib/Container').ContainerConfig;
|
||||
|
||||
export const Transform: typeof import('konva/lib/Util').Transform;
|
||||
export type Transform = import('konva/lib/Util').Transform;
|
||||
|
||||
export const Util: typeof import('konva/lib/Util').Util;
|
||||
|
||||
export const Context: typeof import('konva/lib/Context').Context;
|
||||
export type Context = import('konva/lib/Context').Context;
|
||||
|
||||
export const Stage: typeof import('konva/lib/Stage').Stage;
|
||||
export type Stage = import('konva/lib/Stage').Stage;
|
||||
export const stages: typeof import('konva/lib/Stage').stages;
|
||||
|
||||
export const Layer: typeof import('konva/lib/Layer').Layer;
|
||||
export type Layer = import('konva/lib/Layer').Layer;
|
||||
export type LayerConfig = import('konva/lib/Layer').LayerConfig;
|
||||
|
||||
export const FastLayer: typeof import('konva/lib/FastLayer').FastLayer;
|
||||
export type FastLayer = import('konva/lib/FastLayer').FastLayer;
|
||||
|
||||
export const Group: typeof import('konva/lib/Group').Group;
|
||||
export type Group = import('konva/lib/Group').Group;
|
||||
|
||||
export const DD: typeof import('konva/lib/DragAndDrop').DD;
|
||||
|
||||
export const Shape: typeof import('konva/lib/Shape').Shape;
|
||||
export type Shape = import('konva/lib/Shape').Shape;
|
||||
export type ShapeConfig = import('konva/lib/Shape').ShapeConfig;
|
||||
export const shapes: typeof import('konva/lib/Shape').shapes;
|
||||
|
||||
export const Animation: typeof import('konva/lib/Animation').Animation;
|
||||
export type Animation = import('konva/lib/Animation').Animation;
|
||||
|
||||
export const Tween: typeof import('konva/lib/Tween').Tween;
|
||||
export type Tween = import('konva/lib/Tween').Tween;
|
||||
export type TweenConfig = import('konva/lib/Tween').TweenConfig;
|
||||
export const Easings: typeof import('konva/lib/Tween').Easings;
|
||||
|
||||
export const Arc: typeof import('konva/lib/shapes/Arc').Arc;
|
||||
export type Arc = import('konva/lib/shapes/Arc').Arc;
|
||||
export type ArcConfig = import('konva/lib/shapes/Arc').ArcConfig;
|
||||
export const Arrow: typeof import('konva/lib/shapes/Arrow').Arrow;
|
||||
export type Arrow = import('konva/lib/shapes/Arrow').Arrow;
|
||||
export type ArrowConfig = import('konva/lib/shapes/Arrow').ArrowConfig;
|
||||
export const Circle: typeof import('konva/lib/shapes/Circle').Circle;
|
||||
export type Circle = import('konva/lib/shapes/Circle').Circle;
|
||||
export type CircleConfig = import('konva/lib/shapes/Circle').CircleConfig;
|
||||
export const Ellipse: typeof import('konva/lib/shapes/Ellipse').Ellipse;
|
||||
export type Ellipse = import('konva/lib/shapes/Ellipse').Ellipse;
|
||||
export type EllipseConfig =
|
||||
import('konva/lib/shapes/Ellipse').EllipseConfig;
|
||||
export const Image: typeof import('konva/lib/shapes/Image').Image;
|
||||
export type Image = import('konva/lib/shapes/Image').Image;
|
||||
export type ImageConfig = import('konva/lib/shapes/Image').ImageConfig;
|
||||
export const Label: typeof import('konva/lib/shapes/Label').Label;
|
||||
export type Label = import('konva/lib/shapes/Label').Label;
|
||||
export type LabelConfig = import('konva/lib/shapes/Label').LabelConfig;
|
||||
export const Tag: typeof import('konva/lib/shapes/Label').Tag;
|
||||
export type Tag = import('konva/lib/shapes/Label').Tag;
|
||||
export type TagConfig = import('konva/lib/shapes/Label').TagConfig;
|
||||
export const Line: typeof import('konva/lib/shapes/Line').Line;
|
||||
export type Line = import('konva/lib/shapes/Line').Line;
|
||||
export type LineConfig = import('konva/lib/shapes/Line').LineConfig;
|
||||
export const Path: typeof import('konva/lib/shapes/Path').Path;
|
||||
export type Path = import('konva/lib/shapes/Path').Path;
|
||||
export type PathConfig = import('konva/lib/shapes/Path').PathConfig;
|
||||
export const Rect: typeof import('konva/lib/shapes/Rect').Rect;
|
||||
export type Rect = import('konva/lib/shapes/Rect').Rect;
|
||||
export type RectConfig = import('konva/lib/shapes/Rect').RectConfig;
|
||||
export const RegularPolygon: typeof import('konva/lib/shapes/RegularPolygon').RegularPolygon;
|
||||
export type RegularPolygon =
|
||||
import('konva/lib/shapes/RegularPolygon').RegularPolygon;
|
||||
export type RegularPolygonConfig =
|
||||
import('konva/lib/shapes/RegularPolygon').RegularPolygonConfig;
|
||||
export const Ring: typeof import('konva/lib/shapes/Ring').Ring;
|
||||
export type Ring = import('konva/lib/shapes/Ring').Ring;
|
||||
export type RingConfig = import('konva/lib/shapes/Ring').RingConfig;
|
||||
export const Sprite: typeof import('konva/lib/shapes/Sprite').Sprite;
|
||||
export type Sprite = import('konva/lib/shapes/Sprite').Sprite;
|
||||
export type SpriteConfig = import('konva/lib/shapes/Sprite').SpriteConfig;
|
||||
export const Star: typeof import('konva/lib/shapes/Star').Star;
|
||||
export type Star = import('konva/lib/shapes/Star').Star;
|
||||
export type StarConfig = import('konva/lib/shapes/Star').StarConfig;
|
||||
export const Text: typeof import('konva/lib/shapes/Text').Text;
|
||||
export type Text = import('konva/lib/shapes/Text').Text;
|
||||
export type TextConfig = import('konva/lib/shapes/Text').TextConfig;
|
||||
export const TextPath: typeof import('konva/lib/shapes/TextPath').TextPath;
|
||||
export type TextPath = import('konva/lib/shapes/TextPath').TextPath;
|
||||
export type TextPathConfig =
|
||||
import('konva/lib/shapes/TextPath').TextPathConfig;
|
||||
export const Transformer: typeof import('konva/lib/shapes/Transformer').Transformer;
|
||||
export type Transformer =
|
||||
import('konva/lib/shapes/Transformer').Transformer;
|
||||
export type TransformerConfig =
|
||||
import('konva/lib/shapes/Transformer').TransformerConfig;
|
||||
export const Wedge: typeof import('konva/lib/shapes/Wedge').Wedge;
|
||||
export type Wedge = import('konva/lib/shapes/Wedge').Wedge;
|
||||
export type WedgeConfig = import('konva/lib/shapes/Wedge').WedgeConfig;
|
||||
|
||||
export const Filters: {
|
||||
Blur: typeof Blur;
|
||||
Brighten: typeof Brighten;
|
||||
Contrast: typeof Contrast;
|
||||
Emboss: typeof Emboss;
|
||||
Enhance: typeof Enhance;
|
||||
Grayscale: typeof Grayscale;
|
||||
HSL: typeof HSL;
|
||||
HSV: typeof HSV;
|
||||
Invert: typeof Invert;
|
||||
Kaleidoscope: typeof Kaleidoscope;
|
||||
Mask: typeof Mask;
|
||||
Noise: typeof Noise;
|
||||
Pixelate: typeof Pixelate;
|
||||
Posterize: typeof Posterize;
|
||||
RGB: typeof RGB;
|
||||
RGBA: typeof RGBA;
|
||||
Sepia: typeof Sepia;
|
||||
Solarize: typeof Solarize;
|
||||
Threshold: typeof Threshold;
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
\:root
|
||||
--body-background: linear-gradient(137deg, #242424 25%, #2e2e2e 25%, #2e2e2e 50%, #242424 50%, #242424 75%, #2e2e2e 75%, #2e2e2e 100%)
|
||||
--body-background-size: 58.65px 54.69px
|
||||
--global-border-color: #eee
|
||||
--global-bgcolor: #222
|
||||
--global-secondary-bgcolor: #666
|
||||
--global-text-color: #eee
|
||||
--pos-header-background: #666
|
||||
--pos-header-text-color: #fff
|
||||
--posbutton-border-color: var(--global-bgcolor)
|
||||
--posbutton-border-color-active: #fff
|
||||
--posbutton-text-color: var(--global-text-color)
|
||||
--posbutton-text-color-active: #fff
|
||||
--posbutton-background: #232B30 -webkit-linear-gradient(top, #3D4850 3%, #000 4%, #333 100%)
|
||||
--posbutton-background-active: #20282D -webkit-gradient(linear, left top, left bottom, color-stop(3%,#20282D), color-stop(51%,#252E34), color-stop(100%,#222A30)) 0 top
|
||||
--void-button-background: red -webkit-gradient(linear, left top, left bottom, color-stop(3%,darkred), color-stop(51%,darkred), color-stop(100%,red)) 0 top
|
||||
|
||||
/** Order Screen **/
|
||||
--orderbox-header-background: #888
|
||||
--orderbox-row-background: var(--pos-header-background)
|
||||
--orderbox-selected-row-background: #dd7f37
|
||||
|
||||
/** Order Box/Payment Splitter Box **/
|
||||
--pulse-first-color: #ffa93e
|
||||
--pulse-second-color: #dd7f37
|
||||
--pulse-final-color: var(--orderbox-row-background)
|
||||
@@ -1,2 +0,0 @@
|
||||
@import dredgepos.keyboards
|
||||
|
||||
@@ -1,125 +0,0 @@
|
||||
@font-face
|
||||
font-family: "manrope"
|
||||
src: url("/fonts/OpenSans-Regular.ttf") format('truetype')
|
||||
font-style: normal
|
||||
|
||||
@font-face
|
||||
font-family: "manrope"
|
||||
src: url("/fonts/OpenSans-SemiBold.ttf") format('truetype')
|
||||
font-weight: bold
|
||||
|
||||
@font-face
|
||||
font-family: "manrope"
|
||||
src: url("/fonts/OpenSans-Light.ttf") format('truetype')
|
||||
font-weight: 100
|
||||
|
||||
*
|
||||
margin: 0
|
||||
padding: 0
|
||||
box-sizing: border-box
|
||||
font-family: 'manrope', sans-serif
|
||||
scroll-behavior: smooth
|
||||
|
||||
*:not(input, textarea)
|
||||
-webkit-touch-callout: none
|
||||
-webkit-user-select: none
|
||||
-khtml-user-select: none
|
||||
-moz-user-select: none
|
||||
-ms-user-select: none
|
||||
user-select: none
|
||||
|
||||
.rtl
|
||||
direction: rtl
|
||||
|
||||
|
||||
|
||||
input[type=text], select, textarea
|
||||
padding-left: 1em
|
||||
padding-right: 1em
|
||||
|
||||
#alert, #decorator
|
||||
display: none
|
||||
|
||||
@mixin absoluteCenter
|
||||
position: absolute
|
||||
margin: auto
|
||||
top: 0
|
||||
bottom: 0
|
||||
left: 0
|
||||
right: 0
|
||||
z-index: 999
|
||||
|
||||
@mixin mobile
|
||||
@media screen and (max-width: 900px)
|
||||
@content
|
||||
|
||||
@mixin flex
|
||||
display: flex
|
||||
justify-content: center
|
||||
align-items: center
|
||||
|
||||
@mixin flex-column
|
||||
@include flex
|
||||
flex-direction: column
|
||||
|
||||
@mixin flex-item
|
||||
height: 100%
|
||||
flex: 1
|
||||
|
||||
@mixin flex-column-item
|
||||
width: 100%
|
||||
flex: 1
|
||||
|
||||
body
|
||||
background-image: var(--body-background)
|
||||
background-size: var(--body-background-size)
|
||||
color: var(--global-text-color)
|
||||
|
||||
.posButton
|
||||
color: var(--posbutton-text-color)
|
||||
background: var(--posbutton-background)
|
||||
text-shadow: 1px 1px #1f272b
|
||||
border: solid 1px var(--posbutton-border-color)
|
||||
overflow: hidden
|
||||
cursor: pointer
|
||||
text-decoration: none
|
||||
|
||||
.posHeader
|
||||
padding: 0.5em
|
||||
color: var(--pos-header-text-color)
|
||||
background: var(--pos-header-background)
|
||||
cursor: default
|
||||
|
||||
#pageContainer
|
||||
@include flex
|
||||
height: 100vh
|
||||
|
||||
.posButton, .posHeader
|
||||
@include flex
|
||||
text-align: center
|
||||
|
||||
.posButton.active, .posButton:active
|
||||
border: inset 2px
|
||||
background: var(--posbutton-background-active)
|
||||
|
||||
.posButton.voidButton
|
||||
background: var(--void-button-background)
|
||||
|
||||
.invisible
|
||||
visibility: hidden
|
||||
|
||||
.hidden
|
||||
display: none
|
||||
|
||||
.pulse
|
||||
animation-name: color
|
||||
animation-duration: 300ms
|
||||
animation-iteration-count: 1
|
||||
|
||||
@keyframes color
|
||||
0%
|
||||
background-color: var(--pulse-first-color)
|
||||
50%
|
||||
background-color: var(--pulse-second-color)
|
||||
100%
|
||||
background-color: var(--pulse-final-color)
|
||||
@@ -1,142 +0,0 @@
|
||||
@import dredgepos.keyboards
|
||||
|
||||
#floorplanLeftColumn, #floorplanRightColumn
|
||||
@include flex-column
|
||||
flex-basis: 10%
|
||||
height: 100%
|
||||
background: var(--global-bgcolor)
|
||||
|
||||
#floorplanCenterColumn
|
||||
@include flex-column
|
||||
height: 100%
|
||||
flex-basis: 80%
|
||||
|
||||
.topCell
|
||||
@include flex
|
||||
flex-basis: 10%
|
||||
width: 100%
|
||||
|
||||
.posHeader
|
||||
@include flex-item
|
||||
|
||||
.posHeader, .posButton
|
||||
border-bottom: solid 2px
|
||||
|
||||
.roomButton
|
||||
border-left: none
|
||||
border-right: none
|
||||
|
||||
.roomButton.active, .roomButton.active
|
||||
border-right: solid 1px var(--posbutton-border-color-active)
|
||||
border-left: solid 1px var(--posbutton-border-color-active)
|
||||
border-bottom: none
|
||||
|
||||
.logOut
|
||||
font-size: 3em
|
||||
|
||||
.bottomCell
|
||||
@include flex
|
||||
flex-basis: 15%
|
||||
width: 100%
|
||||
background: var(--global-bgcolor)
|
||||
|
||||
.topCell, .bottomCell
|
||||
.posButton
|
||||
@include flex-item
|
||||
flex: 1
|
||||
|
||||
.bottomCell
|
||||
.editControls
|
||||
@include flex
|
||||
@include flex-item
|
||||
|
||||
.currentTable
|
||||
@include flex-column
|
||||
@include flex-item
|
||||
|
||||
.middleCell
|
||||
@include flex-column
|
||||
flex: 1
|
||||
width: 100%
|
||||
|
||||
#floorplanCanvas
|
||||
aspect-ratio: 1/1
|
||||
background-repeat: no-repeat
|
||||
background: var(--global-secondary-bgcolor)
|
||||
|
||||
> *:not(#floorplanCanvas)
|
||||
@include flex-column-item
|
||||
flex: 1
|
||||
|
||||
.floorplanControls, .mergeControls
|
||||
@include flex-column
|
||||
> *
|
||||
@include flex-column-item
|
||||
|
||||
|
||||
#decorator
|
||||
@include flex-column
|
||||
@include absoluteCenter
|
||||
display: none
|
||||
border: solid 3px var(--global-border-color)
|
||||
background-color: var(--global-bgcolor)
|
||||
width: 30%
|
||||
height: 50%
|
||||
|
||||
> *
|
||||
@include flex-column-item
|
||||
|
||||
#decoratorHeader
|
||||
@include flex
|
||||
flex-basis: 10%
|
||||
border-bottom: solid 1px var(--global-border-color)
|
||||
|
||||
h2
|
||||
@include flex
|
||||
@include flex-item
|
||||
flex-basis: 90%
|
||||
|
||||
a
|
||||
@include flex
|
||||
@include flex-item
|
||||
flex-basis: 10%
|
||||
|
||||
#decoratorContent
|
||||
@include flex-column
|
||||
justify-content: flex-start
|
||||
flex-basis: 90%
|
||||
overflow-y: auto
|
||||
|
||||
.decoratorRow
|
||||
@include flex
|
||||
justify-content: flex-start
|
||||
flex-basis: 25%
|
||||
width: 100%
|
||||
|
||||
.decoratorItem
|
||||
@include flex-column
|
||||
flex-basis: 25%
|
||||
height: 100%
|
||||
gap: 1em
|
||||
|
||||
> a
|
||||
width: 100%
|
||||
|
||||
> a:first-of-type
|
||||
background-size: contain
|
||||
background-repeat: no-repeat
|
||||
background-position: center
|
||||
flex-basis: 80%
|
||||
|
||||
> a:last-of-type
|
||||
text-align: center
|
||||
flex-basis: 20%
|
||||
font-weight: bold
|
||||
|
||||
.decoratorRow:nth-of-type(odd)
|
||||
.decoratorItem:nth-of-type(odd)
|
||||
background-color: var(--global-secondary-bgcolor)
|
||||
|
||||
.decoratorRow:nth-of-type(even)
|
||||
.decoratorItem:nth-of-type(even)
|
||||
background-color: var(--global-secondary-bgcolor)
|
||||
@@ -1,151 +0,0 @@
|
||||
@import dredgepos.core
|
||||
|
||||
#virtualNumpad, #virtualKeyboard
|
||||
display: none
|
||||
|
||||
.headingRow
|
||||
background-color: var(--global-bgcolor)
|
||||
display: flex
|
||||
flex-basis: 10%
|
||||
border-bottom: solid 1px #fff
|
||||
|
||||
@include mobile
|
||||
font-size: 1.5em
|
||||
|
||||
*
|
||||
height: 100%
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: center
|
||||
text-align: center
|
||||
|
||||
h3
|
||||
flex: 1
|
||||
|
||||
.closeKeyboards
|
||||
flex-basis: 20%
|
||||
|
||||
#virtualNumpad
|
||||
@include absoluteCenter
|
||||
flex-direction: column
|
||||
height: 70%
|
||||
width: 25%
|
||||
border: solid 2px var(--global-border-color)
|
||||
|
||||
@include mobile
|
||||
height: 100%
|
||||
width: 100%
|
||||
|
||||
#virtualNumpadInput
|
||||
background-color: var(--global-secondary-bgcolor)
|
||||
flex-basis: 10%
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: center
|
||||
text-align: center
|
||||
font-size: 3em
|
||||
|
||||
|
||||
#virtualNumpadButtons
|
||||
display: flex
|
||||
flex-direction: column
|
||||
flex-basis: 80%
|
||||
background-color: var(--global-bgcolor)
|
||||
|
||||
.virtualNumpadRow
|
||||
display: flex
|
||||
flex: 1
|
||||
|
||||
> *
|
||||
flex: 1
|
||||
font-size: 1.5em
|
||||
|
||||
#virtualKeyboard
|
||||
@include absoluteCenter
|
||||
flex-direction: column
|
||||
width: 80%
|
||||
height: 40%
|
||||
background-color: var(--global-bgcolor)
|
||||
border: solid 2px var(--global-border-color)
|
||||
|
||||
@include mobile
|
||||
width: 100%
|
||||
height: 10%
|
||||
top: 0
|
||||
bottom: auto
|
||||
|
||||
|
||||
#virtualKeyboardInput
|
||||
flex-basis: 15%
|
||||
background-color: var(--global-secondary-bgcolor)
|
||||
font-size: 1.5em
|
||||
text-align: center
|
||||
color: var(--global-text-color)
|
||||
|
||||
@include mobile
|
||||
flex-basis: 50%
|
||||
text-align: left
|
||||
|
||||
|
||||
#virtualKeyboardButtons
|
||||
@include flex-column
|
||||
flex-basis: 75%
|
||||
|
||||
@include mobile
|
||||
display: none
|
||||
|
||||
.headingRow
|
||||
@include mobile
|
||||
flex-basis: 50%
|
||||
font-size: 1.2em
|
||||
|
||||
.closeKeyboards
|
||||
flex-basis: 10%
|
||||
|
||||
.virtualKeyboardRow
|
||||
@include flex
|
||||
@include flex-column-item
|
||||
|
||||
> *
|
||||
@include flex
|
||||
@include flex-item
|
||||
font-size: 1.5em
|
||||
|
||||
> [data-value=backspace]
|
||||
flex-basis: 10%
|
||||
|
||||
#alert
|
||||
@include flex-column
|
||||
@include absoluteCenter
|
||||
display: none
|
||||
width: 60%
|
||||
height: 40%
|
||||
background-color: var(--global-bgcolor)
|
||||
border: solid 2px var(--global-border-color)
|
||||
|
||||
@include mobile
|
||||
width: 100%
|
||||
height: 100%
|
||||
|
||||
> *
|
||||
@include flex
|
||||
@include flex-column-item
|
||||
|
||||
#alertHeading
|
||||
@include flex
|
||||
width: 100%
|
||||
flex-basis: 20%
|
||||
font-size: 2em
|
||||
|
||||
#alertMessage
|
||||
flex-basis: 60%
|
||||
font-size: 1.5em
|
||||
background-color: var(--global-secondary-bgcolor)
|
||||
|
||||
#alertButtons
|
||||
@include flex
|
||||
flex-basis: 20%
|
||||
|
||||
a
|
||||
@include flex-item
|
||||
font-size: 2em
|
||||
@@ -1,343 +0,0 @@
|
||||
@import dredgepos.keyboards
|
||||
|
||||
#leftColumn
|
||||
@include flex-column
|
||||
flex-basis: 30%
|
||||
height: 100%
|
||||
background-color: grey
|
||||
|
||||
> *
|
||||
@include flex-column-item
|
||||
|
||||
.tableHeading
|
||||
@include flex
|
||||
color: black
|
||||
background-color: white
|
||||
flex-basis: 5%
|
||||
|
||||
.tableInfo
|
||||
@include flex
|
||||
flex-basis: 5%
|
||||
|
||||
> *
|
||||
@include flex-item
|
||||
@include flex
|
||||
|
||||
.orderBox
|
||||
flex-basis: 75%
|
||||
background: var(--global-bgcolor)
|
||||
overflow-y: auto
|
||||
|
||||
.orderBoxInfo
|
||||
@include flex
|
||||
flex-basis: 5%
|
||||
background-color: white
|
||||
|
||||
.voidModeWarning
|
||||
@include flex
|
||||
@include flex-item
|
||||
color: red
|
||||
font-weight: bold
|
||||
|
||||
.orderBoxFooter
|
||||
flex-basis: 10%
|
||||
@include flex-column
|
||||
|
||||
> *
|
||||
@include flex
|
||||
@include flex-column-item
|
||||
justify-content: flex-end
|
||||
padding: 0 0.7em
|
||||
|
||||
> .orderBoxTotal
|
||||
align-items: flex-end
|
||||
font-size: 1.3em
|
||||
> .orderBoxSelectedTotal
|
||||
align-items: flex-start
|
||||
font-size: 0.9em
|
||||
|
||||
#rightColumn
|
||||
@include flex-column
|
||||
height: 100%
|
||||
flex-basis: 70%
|
||||
background-color: var(--global-bgcolor)
|
||||
border-left: 2px solid var(--global-border-color)
|
||||
|
||||
#topHalf
|
||||
@include flex-column
|
||||
@include flex-column-item
|
||||
flex-basis: 30%
|
||||
flex-grow: 0
|
||||
flex-shrink: 0
|
||||
|
||||
.functionButtons
|
||||
@include flex-column-item
|
||||
@include flex
|
||||
flex-basis: 100%
|
||||
|
||||
> .functionColumn
|
||||
@include flex-item
|
||||
@include flex-column
|
||||
flex-basis: 25%
|
||||
> *
|
||||
@include flex-column-item
|
||||
|
||||
> .printGroupButtons
|
||||
flex-basis: 25%
|
||||
height: 100%
|
||||
display: grid
|
||||
grid-template-columns: repeat(2, 1fr)
|
||||
grid-auto-rows: auto
|
||||
|
||||
> *
|
||||
padding: 0.5em
|
||||
|
||||
|
||||
#pageList
|
||||
@include flex
|
||||
@include flex-column-item
|
||||
flex-basis: 10%
|
||||
background-color: var(--global-secondary-bgcolor)
|
||||
flex-grow: 0
|
||||
flex-shrink: 0
|
||||
|
||||
> *
|
||||
@include flex-item
|
||||
border-bottom: solid 2px var(--global-border-color)
|
||||
|
||||
.active
|
||||
border-bottom: none
|
||||
|
||||
#pageGroupContainer
|
||||
@include flex-column
|
||||
@include flex-column-item
|
||||
justify-content: flex-end
|
||||
flex-basis: 45%
|
||||
height: 50%
|
||||
scrollbar-width: none
|
||||
-ms-overflow-style: none
|
||||
|
||||
::-webkit-scrollbar
|
||||
display: none
|
||||
|
||||
.pageGroup
|
||||
/*display: inline-flex*/
|
||||
@include flex-column-item
|
||||
flex-basis: 100%
|
||||
flex-grow: 0
|
||||
overflow-x: auto
|
||||
display: none
|
||||
|
||||
.gridPage
|
||||
width: 100%
|
||||
height: 100%
|
||||
flex-shrink: 0
|
||||
flex-grow: 0
|
||||
display: grid
|
||||
|
||||
.doubleWidth
|
||||
width: calc(200%)
|
||||
z-index: 10
|
||||
|
||||
.doubleHeight
|
||||
height: calc(200%)
|
||||
z-index: 10
|
||||
|
||||
.hasImage
|
||||
.buttonImg
|
||||
background-repeat: no-repeat
|
||||
background-size: contain
|
||||
background-position: center
|
||||
background-origin: content-box
|
||||
|
||||
.hasImage.normal
|
||||
font-size: 0.8em
|
||||
.buttonImg
|
||||
flex-basis: 40%
|
||||
height: 100%
|
||||
padding: 0.7em
|
||||
justify-content: flex-end
|
||||
|
||||
.text
|
||||
@include flex
|
||||
justify-content: flex-start
|
||||
flex-basis: 60%
|
||||
height: 100%
|
||||
|
||||
.hasImage.doubleHeight
|
||||
@include flex-column
|
||||
|
||||
.buttonImg
|
||||
padding: 0.6em
|
||||
flex-basis: 65%
|
||||
width: 100%
|
||||
flex-shrink: 0
|
||||
flex-grow: 0
|
||||
|
||||
.text
|
||||
@include flex
|
||||
align-items: flex-start
|
||||
flex-grow: 0
|
||||
flex-shrink: 0
|
||||
flex-basis: 35%
|
||||
width: 100%
|
||||
overflow: hidden
|
||||
font-size: 0.9em
|
||||
|
||||
.hasImage.doubleWidth
|
||||
flex-direction: row
|
||||
.buttonImg
|
||||
@include flex
|
||||
flex-basis: 30%
|
||||
height: 100%
|
||||
padding-top: 2%
|
||||
|
||||
.text
|
||||
@include flex
|
||||
flex-basis: 70%
|
||||
height: 100%
|
||||
justify-content: flex-start
|
||||
|
||||
.hasImage.doubleHeight.doubleWidth
|
||||
flex-direction: row
|
||||
|
||||
.buttonImg
|
||||
@include flex
|
||||
flex-basis: 50%
|
||||
height: 100%
|
||||
|
||||
|
||||
.text
|
||||
@include flex
|
||||
flex-basis: 50%
|
||||
height: 100%
|
||||
|
||||
|
||||
.pageNavigation
|
||||
@include flex
|
||||
@include flex-column-item
|
||||
|
||||
> *
|
||||
@include flex-item
|
||||
|
||||
|
||||
.coverSelector
|
||||
display: flex
|
||||
flex-wrap: wrap
|
||||
border: 2px solid var(--global-border-color)
|
||||
background: var(--global-bgcolor)
|
||||
position: absolute
|
||||
z-index: 100
|
||||
|
||||
.coverSelectorButton
|
||||
flex-basis: 50%
|
||||
|
||||
.coverSelectorButton:first-of-type
|
||||
flex-basis: 100%
|
||||
|
||||
|
||||
.orderBoxTable
|
||||
width: 100%
|
||||
border-collapse: collapse
|
||||
|
||||
tr
|
||||
background: var(--orderbox-row-background)
|
||||
|
||||
|
||||
.selected
|
||||
background: var(--orderbox-selected-row-background)
|
||||
|
||||
thead tr
|
||||
background: var(--orderbox-header-background)
|
||||
|
||||
th
|
||||
font-weight: normal
|
||||
text-align: center
|
||||
padding: 0.2em 0.5em
|
||||
|
||||
tr
|
||||
td, th
|
||||
text-align: center
|
||||
font-size: 0.9em
|
||||
|
||||
td
|
||||
padding: 1em 0.5em
|
||||
font-weight: bold
|
||||
|
||||
.itemCell
|
||||
text-align: center
|
||||
width: 60%
|
||||
|
||||
.qtyCell
|
||||
width: 10%
|
||||
|
||||
.printGroupCell
|
||||
width: 20%
|
||||
|
||||
.totalPriceCell
|
||||
width: 10%
|
||||
|
||||
td.itemCell
|
||||
text-align: left
|
||||
display: flex
|
||||
flex-direction: column
|
||||
|
||||
tr.instructionRow
|
||||
td
|
||||
font-weight: 100
|
||||
td.itemCell
|
||||
padding-left: 2em
|
||||
small
|
||||
font-size: 0
|
||||
|
||||
.qtyCell, .printGroupCell
|
||||
font-size: 0
|
||||
|
||||
.gridContainer
|
||||
background: var(--global-bgcolor)
|
||||
border: var(--global-border-color) solid 2px
|
||||
z-index: 500
|
||||
margin: auto
|
||||
position: absolute
|
||||
left: 0
|
||||
right: 0
|
||||
top: 50%
|
||||
transform: translateY(-50%)
|
||||
|
||||
.gridContainerHeader
|
||||
height: 3em
|
||||
width: 100%
|
||||
@include flex
|
||||
background-color: var(--global-secondary-bgcolor)
|
||||
border-bottom: solid 1px var(--global-border-color)
|
||||
|
||||
> *
|
||||
@include flex
|
||||
height: 100%
|
||||
|
||||
span
|
||||
flex-basis: 90%
|
||||
.closeGrid
|
||||
flex-basis: 10%
|
||||
|
||||
.gridContainerGrid
|
||||
width: 100%
|
||||
@include flex-column
|
||||
scrollbar-width: none
|
||||
-ms-overflow-style: none
|
||||
|
||||
::-webkit-scrollbar
|
||||
display: none
|
||||
|
||||
.pageGroup
|
||||
display: inline-flex
|
||||
flex-basis: 100%
|
||||
flex-grow: 0
|
||||
overflow-x: auto
|
||||
|
||||
.gridPage
|
||||
width: 100%
|
||||
height: 100%
|
||||
flex-shrink: 0
|
||||
flex-grow: 0
|
||||
display: grid
|
||||
@@ -1,9 +0,0 @@
|
||||
<div id="alert" >
|
||||
<div id="alertHeading"></div>
|
||||
<div id="alertMessage"></div>
|
||||
<div id="alertButtons">
|
||||
<a class="posButton" id="alertOk"><!--[lang:alert_ok]--></a>
|
||||
<a class="posButton" id="alertYes"><!--[lang:alert_yes]--></a>
|
||||
<a class="posButton" id="alertNo"><!--[lang:alert_no]--></a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,15 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><!--[var:title]--></title>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name = "viewport" content = "user-scalable = no, initial-scale=0.8,maximum-scale=0.8 ,shrink-to-fit=yes" />
|
||||
<link rel="manifest" href="/manifest.webmanifest">
|
||||
</head>
|
||||
<body>
|
||||
<div id="authenticator">
|
||||
|
||||
</div>
|
||||
<!--[template:keyboards]-->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,113 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>DredgePOS</title>
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
|
||||
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<link rel="stylesheet" type="text/css" href="themes/restaurant/theme.css?id=ax" media="screen" />
|
||||
<link rel="stylesheet" type="text/css" href="themes/restaurant/paymentSplitter.css?id=ax" media="screen" />
|
||||
<meta name = "viewport" content = "width=1280, initial-scale = 0.8, user-scalable = no, shrink-to-fit=no" />
|
||||
<script type="text/javascript" src="currency.min.js"></script>
|
||||
<script type="text/javascript" src="posFunctions.js"></script>
|
||||
<script type="text/javascript" src="paymentFunctions.js"></script>
|
||||
</head>
|
||||
<body class="darkMode">
|
||||
<div id="pageContainer">
|
||||
<div id="flexWrapper">
|
||||
<div id="header">
|
||||
<h1>Paying Table</h2>
|
||||
</div>
|
||||
<div id="stucture">
|
||||
<div id="leftColumn">
|
||||
<h2>Whole Table</h2>
|
||||
<table id="first" cellspacing="0">
|
||||
<thead>
|
||||
<th class="hide">Item Code</th>
|
||||
<th>Qty</th>
|
||||
<th>Item</th>
|
||||
<th class="hide">Unit Price</th>
|
||||
<th class="hide">Print Group</th>
|
||||
<th class="totalpriceCell">Total Price</th>
|
||||
<th class="hide">Cover</th>
|
||||
<th class="clerkCell">Clerk</th>
|
||||
<th class="hide">Selected Qty</th>
|
||||
<th class="hide">Original Qty</th>
|
||||
<th class="hide">Category</th>
|
||||
<th class="hide">Department</th>
|
||||
<th class="hide"><!--[lang:has_split_header]--></th>
|
||||
<th class="hide"><!--[lang:orig_tprice_header]--></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!--[var:tableHTML]-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="controlColumn">
|
||||
<a class="posButton" onclick="moveItems('#first', '#second')">></a>
|
||||
<a class="posButton" onclick="moveItems('#second', '#first')"><</a>
|
||||
</div>
|
||||
<div id="centerColumn">
|
||||
<h2>Partial Table</h2>
|
||||
<table id="second" cellspacing="0">
|
||||
<thead>
|
||||
<th class="hide">Item Code</th>
|
||||
<th>Qty</th>
|
||||
<th>Item</th>
|
||||
<th class="hide">Unit Price</th>
|
||||
<th class="hide">Print Group</th>
|
||||
<th class="totalpriceCell">Total Price</th>
|
||||
<th class="hide">Cover</th>
|
||||
<th class="clerkCell hide">Clerk</th>
|
||||
<th class="hide">Selected Qty</th>
|
||||
<th class="hide">Category</th>
|
||||
<th class="hide">Department</th>
|
||||
<th class="hide"><!--[lang:has_split_header]--></th>
|
||||
<th class="hide"><!--[lang:orig_tprice_header]--></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="rightColumn">
|
||||
<h2>Controls</h2>
|
||||
<div id="rightColumnContainer">
|
||||
<a class="posButton heading" onclick="">Selection Tools</a>
|
||||
<a class="posButton qtySelector" onclick="overrideQuantitySelect()">Select Quantity</a>
|
||||
<a class="posButton" onclick="overrideQuantitySelect()">Select Amount</a>
|
||||
<a class="selectDepartment posButton">Select By Department</a>
|
||||
<a class="selectCategory posButton">Select By Category</a>
|
||||
<a class="selectCovers posButton">Select by Cover #</a>
|
||||
<a class="selectPrintGroup posButton">Select by Printed With</a>
|
||||
<a class="selectAll posButton">Select All</a>
|
||||
<a class="posButton heading">Select By Fraction</a>
|
||||
<a class="posButton selectFraction" data-value="2">Select 1⁄2</a>
|
||||
<a class="posButton selectFraction" data-value="3">Select 1⁄3</a>
|
||||
<a class="posButton selectFraction" data-value="4">Select 1⁄4</a>
|
||||
<a class="posButton selectFraction" data-value="5">Select 1⁄5</a>
|
||||
<a class="posButton selectFraction" data-value="6">Select 1⁄6</a>
|
||||
<a class="posButton selectFraction" data-value="7">Select 1⁄7</a>
|
||||
<a class="posButton selectFraction" data-value="8">Select 1⁄8</a>
|
||||
<a class="posButton selectFraction" data-value="<!--[var:uniqueCovers]-->" posButton">Select 1⁄covers</a>
|
||||
|
||||
<a class="posButton heading" onclick="loadScreen('tableMap')">Exit</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="coverControls" class="popupBox"><!--[var:coverButtons]--></div>
|
||||
<div id="departmentControl" class="popupBox"><!--[var:departmentButtons]--></div>
|
||||
<div id="categoryControl" class="popupBox"><!--[var:categoryButtons]--></div>
|
||||
<div id="printGroupControl" class="popupBox"><!--[var:printGroupButtons]--></div>
|
||||
<!--[template:keyboards]-->
|
||||
<script type="text/javascript">
|
||||
$(document).ready( function () {
|
||||
covers = '<!--[var:covers]-->'
|
||||
dredgePosSetup('#pageContainer');
|
||||
setupPaymentSplitter();
|
||||
} );
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,14 +0,0 @@
|
||||
<div class="itemCellWrapper">
|
||||
<div
|
||||
class="definedButton item <!--[arr:item|button_classes]--> posButton"
|
||||
data-type="<!--[arr:item|type]-->"
|
||||
data-id="<!--[arr:item|itemid]-->"
|
||||
data-grid="<!--[arr:item|button_grid_id]-->"
|
||||
data-name="<!--[arr:item|itemname]-->"
|
||||
data-price="<!--[arr:item|price]-->"
|
||||
data-category="<!--[arr:item|c_name]-->"
|
||||
data-department="<!--[arr:item|dep_name]-->"
|
||||
data-printgroup="<!--[arr:item|pg_name]-->">
|
||||
<a><!--[arr:item|itemname]--></a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,14 +0,0 @@
|
||||
<div class="itemCellWrapper"> <div
|
||||
class="definedButton item hasImage <!--[arr:item|button_classes]--> posButton"
|
||||
data-type="<!--[arr:item|type]-->"
|
||||
data-id="<!--[arr:item|itemid]-->"
|
||||
data-name="<!--[arr:item|itemname]-->"
|
||||
data-price="<!--[arr:item|price]-->"
|
||||
data-grid="<!--[arr:item|button_grid_id]-->"
|
||||
data-category="<!--[arr:item|c_name]-->"
|
||||
data-department="<!--[arr:item|dep_name]-->"
|
||||
data-printgroup="<!--[arr:item|pg_name]-->">
|
||||
<a style="background-image:url('images/<!--[arr:item|image]-->')"></a>
|
||||
<a><!--[arr:item|itemname]--></a>
|
||||
|
||||
</div></div>
|
||||
@@ -1,67 +0,0 @@
|
||||
<div class="itemPage">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><!--[button:CRAFTBEER001]--></td>
|
||||
<td><!--[button:CRAFTBEER002]--></td>
|
||||
<td><!--[button:CRAFTBEER003]--></td>
|
||||
<td><!--[button:CRAFTBEER004]--></td>
|
||||
<td><!--[button:CRAFTBEER005]--></td>
|
||||
<td><!--[button:CRAFTBEER006]--></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><!--[button:CRAFTBEER007]--></td>
|
||||
<td><!--[button:CRAFTBEER008]--></td>
|
||||
<td><!--[button:CRAFTBEER009]--></td>
|
||||
<td><!--[button:CRAFTBEER010]--></td>
|
||||
<td><!--[button:CRAFTBEER012]--></td>
|
||||
<td><!--[button:INSTRUCTION005]--></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><!--[button:INSTRUCTION006]--></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><!--[button:CRAFTBEER013]--></td>
|
||||
<td><!--[button:CRAFTBEER014]--></td>
|
||||
<td><!--[button:CRAFTBEER015]--></td>
|
||||
<td><!--[button:CRAFTBEER016]--></td>
|
||||
<td><!--[button:CRAFTBEER017]--></td>
|
||||
<td><!--[button:CRAFTBEER018]--></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><!--[button:CRAFTBEER019]--></td>
|
||||
<td><!--[button:CRAFTBEER020]--></td>
|
||||
<td><!--[button:CRAFTBEER021]--></td>
|
||||
<td><!--[button:CRAFTBEER022]--></td>
|
||||
<td><!--[button:CRAFTBEER023]--></td>
|
||||
<td><!--[button:CRAFTBEER024]--></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table></div>
|
||||
@@ -1,67 +0,0 @@
|
||||
<div class="itemPage">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><!--[button:CRAFTBEER025]--></td>
|
||||
<td><!--[button:CRAFTBEER026]--></td>
|
||||
<td><!--[button:CRAFTBEER027]--></td>
|
||||
<td><!--[button:CRAFTBEER028]--></td>
|
||||
<td><!--[button:CRAFTBEER029]--></td>
|
||||
<td><!--[button:CRAFTBEER030]--></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><!--[button:CRAFTBEER031]--></td>
|
||||
<td><!--[button:CRAFTBEER032]--></td>
|
||||
<td><!--[button:CRAFTBEER033]--></td>
|
||||
<td><!--[button:CRAFTBEER034]--></td>
|
||||
<td><!--[button:CRAFTBEER035]--></td>
|
||||
<td><!--[button:CRAFTBEER036]--></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><!--[button:CRAFTBEER037]--></td>
|
||||
<td><!--[button:CRAFTBEER038]--></td>
|
||||
<td><!--[button:CRAFTBEER039]--></td>
|
||||
<td><!--[button:CRAFTBEER040]--></td>
|
||||
<td><!--[button:CRAFTBEER041]--></td>
|
||||
<td><!--[button:CRAFTBEER042]--></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><!--[button:CRAFTBEER043]--></td>
|
||||
<td><!--[button:CRAFTBEER044]--></td>
|
||||
<td><!--[button:CRAFTBEER045]--></td>
|
||||
<td><!--[button:CRAFTBEER046]--></td>
|
||||
<td><!--[button:CRAFTBEER047]--></td>
|
||||
<td><!--[button:CRAFTBEER048]--></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table></div>
|
||||
@@ -1,66 +0,0 @@
|
||||
<div class="itemPage"><table cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><!--[button:DESSERT001]--></td>
|
||||
<td></td>
|
||||
<td><!--[button:DESSERT002]--></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><!--[button:DESSERT004]--></td>
|
||||
<td></td>
|
||||
<td><!--[button:DESSERT003]--></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table></div>
|
||||
@@ -1,67 +0,0 @@
|
||||
<div class="itemPage"><table cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><!--[button:MAIN001]--></td>
|
||||
<td></td>
|
||||
<td><!--[button:MAIN003]--></td>
|
||||
<td></td>
|
||||
<td><!--[button:MAIN004]--></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><!--[button:MAIN005]--></td>
|
||||
<td></td>
|
||||
<td><!--[button:MAIN006]--></td>
|
||||
<td></td>
|
||||
<td><!--[button:MAIN007]--></td>
|
||||
<td></td>
|
||||
</td>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
</table></div>
|
||||
@@ -1,68 +0,0 @@
|
||||
<div class="itemPage">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><!--[button:STARTER001]--></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><!--[button:STARTER002]--></td>
|
||||
<td></td>
|
||||
<td><!--[button:DIP002]--></td>
|
||||
<td><!--[button:DIP003]--></td>
|
||||
<td><!--[button:DIP004]--></td>
|
||||
<td><!--[button:DIP005]--></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><!--[button:STARTER003]--></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><!--[button:STARTER004]--></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><!--[button:STARTER005]--></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
</table></div>
|
||||
@@ -1,67 +0,0 @@
|
||||
<div class="itemPage"><table cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><!--[button:WINE002]--></td>
|
||||
<td><!--[button:WINE001]--></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><!--[button:WINE004]--></td>
|
||||
<td><!--[button:WINE003]--></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</td>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
</table></div>
|
||||
@@ -1,3 +0,0 @@
|
||||
<a onclick="loadCategory('<!--[arr:cat|c_name]-->')" class="posButton categoryButton">
|
||||
<!--[arr:cat|c_name]-->
|
||||
</a>
|
||||
@@ -1,5 +0,0 @@
|
||||
<!--[categoryButton:1]-->
|
||||
<!--[categoryButton:2]-->
|
||||
<!--[categoryButton:4]-->
|
||||
<!--[categoryButton:3]-->
|
||||
<!--[categoryButton:5]-->
|
||||
@@ -1,3 +0,0 @@
|
||||
<a class="posButton <!--[var:classes]-->" <!--[var: attributes]-->>
|
||||
<!--[var:text]-->
|
||||
</a>
|
||||
@@ -1,4 +0,0 @@
|
||||
<div class="decoratorItem" data-image="<!--[var:image_url]-->">
|
||||
<a style="background-image:url('/images/decorations/<!--[var:image_url]-->')"></a>
|
||||
<a><!--[var:image_name]--></a>
|
||||
</div>
|
||||
@@ -1,3 +0,0 @@
|
||||
<div class="decoratorRow">
|
||||
<!--[var:decorations]-->
|
||||
</div>
|
||||
@@ -1,79 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>DredgePOS</title>
|
||||
<script src="https://unpkg.com/current-device/umd/current-device.min.js"></script>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name = "viewport" content = "user-scalable = no, initial-scale=0.8,maximum-scale=0.8 ,shrink-to-fit=yes" />
|
||||
<link rel="manifest" href="/manifest.webmanifest">
|
||||
</head>
|
||||
<body class="darkMode">
|
||||
<div id="pageContainer">
|
||||
<div id="floorplanLeftColumn">
|
||||
<div class="topCell">
|
||||
<a class="posHeader">Logged in as <!--[arr:clerk|clerk_name]--></a>
|
||||
</div>
|
||||
<div class="middleCell">
|
||||
|
||||
</div>
|
||||
<div class="bottomCell">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="floorplanCenterColumn">
|
||||
<div class="topCell">
|
||||
<!--[var:roomMenu]-->
|
||||
</div>
|
||||
<div class="middleCell">
|
||||
<div id="floorplanCanvas"></div>
|
||||
</div>
|
||||
<div class="bottomCell">
|
||||
<div class="editControls" data-visible-in-mode='["tableSelected"]'>
|
||||
<div class="posHeader currentTable">
|
||||
<b class="selectedTableNumber"></b>
|
||||
<a class="reservationStatus" data-visible-in-mode='["reservedTableSelected"]'></a>
|
||||
<small class="selectedTableCovers"></small>
|
||||
</div>
|
||||
<a class="posButton placeOrderButton"><!--[lang:order_table]--></a>
|
||||
<a class="posButton reserveTableButton" data-invisible-in-mode='["reservedTableSelected", "activeTableSelected"]'><!--[lang:reserve_table]--></a>
|
||||
<a class="posButton unreserveTableButton" data-visible-in-mode='["reservedTableSelected"]'><!--[lang:unreserve_table]--></a>
|
||||
<a class="posButton payTableButton" data-visible-in-mode='["activeTableSelected"]'><!--[lang:pay_table]--></a>
|
||||
<a class="posButton viewTableButton" data-visible-in-mode='["activeTableSelected"]'><!--[lang:view_table]--></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="floorplanRightColumn">
|
||||
<div class="topCell">
|
||||
<a class="posButton logOut" onclick="logout()">×</a>
|
||||
</div>
|
||||
<div class="middleCell">
|
||||
<a class="posButton editModeButton"><!--[lang:edit_floorplan]--></a>
|
||||
<div class="floorplanControls useVisibility" data-visible-in-mode='["edit"]'>
|
||||
<a class="posButton addTableButton" ><!--[lang:add_table]--></a>
|
||||
<a class="posButton addDecoration"><!--[lang:add_decoration]--></a>
|
||||
<a class="posButton deleteDecoration useVisibility" data-visible-in-mode='["decorationSelected", "edit"]'><!--[lang:delete_decoration]--></a>
|
||||
<a class="posButton deleteTableButton useVisibility" data-visible-in-mode='["tableSelected", "edit"]'><!--[lang:delete_table]--></a>
|
||||
<a class="posButton changeShapeButton useVisibility" data-visible-in-mode='["tableSelected", "edit"]'><!--[lang:change_shape]--></a>
|
||||
</div>
|
||||
<div class="mergeControls useVisibility" data-visible-in-mode='["tableSelected"]'>
|
||||
<a class="posButton mergeButton" data-active-in-mode="merge"><!--[lang:merge_table]--></a>
|
||||
<a class="posButton unmergeButton" data-visible-in-mode='["tableSelected"]'><!--[lang:unmerge_table]--></a>
|
||||
<a class="transferTableButton posButton" data-active-in-mode="transfer" data-visible-in-mode='["activeTableSelected"]'><!--[lang:transfer_table]--></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottomCell">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--[template:keyboards]-->
|
||||
<div id="decorator">
|
||||
<div id="decoratorHeader">
|
||||
<h2><!--[lang:choose_decoration]--></h2>
|
||||
<a class="posButton" onclick="$('#decorator').css('display','none')">×</a>
|
||||
</div>
|
||||
<div id="decoratorContent"><!--[var:decorator]--></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,3 +0,0 @@
|
||||
<!--[template:alert]-->
|
||||
<!--[template:virtualNumpad]-->
|
||||
<!--[template:virtualKeyboard]-->
|
||||
@@ -1 +0,0 @@
|
||||
<b>OrderBox Loaded</b>
|
||||
@@ -1,21 +0,0 @@
|
||||
<table cellspacing="0" id="orderBox" data-tablenumber="<!--[var:tableNumber]-->" data-covers="<!--[var:covers]-->" data-clerk="<!--[arr:clerk|clerk_name]-->" class="">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="idCell hide"><!--[lang:id_header]--></th>
|
||||
<th class="qtyCell"><!--[lang:qty_header]--></th>
|
||||
<th class="itemCell"><!--[lang:item_header]--></th>
|
||||
<th class="totalPriceCell"><!--[lang:total_price_header]--></th>
|
||||
<th class="printGroupCell"><!--[lang:printgroup_header]--></th>
|
||||
<th class="unitPriceCell hide"><!--[lang:individual_price_header]--></th>
|
||||
<th class="sortkeyCell hide"><!--[lang:sortkey_header]--></th>
|
||||
<th class="typeCell hide"><!--[lang:type_header]--></th>
|
||||
<th class="coverCell hide"><!--[lang:cover_header]--></th>
|
||||
<th class="departmentCell hide"><!--[lang:department_header]--></th>
|
||||
<th class="categoryCell hide"><!--[lang:category_header]--></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
</tfoot>
|
||||
</table>
|
||||
@@ -1,107 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>DredgePOS</title>
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
|
||||
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<link rel="stylesheet" type="text/css" href="themes/restaurant/theme.css?id=ax" media="screen" />
|
||||
<link rel="stylesheet" type="text/css" href="themes/restaurant/screen.css?id=ax" media="screen" />
|
||||
<meta name = "viewport" content = "width=1280, initial-scale = 0.8, user-scalable = no, shrink-to-fit=no" />
|
||||
<script type="text/javascript" src="posFunctions.js"></script>
|
||||
</head>
|
||||
<body class="darkMode">
|
||||
<div id="pageContainer">
|
||||
<div id="leftColumn">
|
||||
<div id="tableDetails">
|
||||
<h2><span id="activeTable"><!--[var:activeTable]--></span></h2>
|
||||
<p class="posButton coverNumbers"><span id="covers"><!--[var:covers]--></span> covers </p>
|
||||
<p class="clerk"><!--[var:loggedInAs]--></p>
|
||||
</div>
|
||||
<div id="orderBoxContainer">
|
||||
<!--[template:orderBoxTable]-->
|
||||
</div>
|
||||
<div id="leftColumnFooter">
|
||||
<p class="messageBox"></p>
|
||||
<h2>Total Price: <span class="orderBoxTotals">$0.00</span></h2>
|
||||
<p class="selectedTotal">($0.00 Selected)</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="rightColumn">
|
||||
<div id="topHalf">
|
||||
<div id="courseSelect" class="posButtonGroup">
|
||||
<h2><!--[lang:print_with]--></h2>
|
||||
<a onclick="setPrintGroupOverride(false, this)" class="toggle default posButton active"><!--[lang:print_with_category|default]--></a>
|
||||
<a onclick="setPrintGroupOverride('Starters',this)" class="posButton toggle"><!--[lang:print_with_category|Starters]--></a>
|
||||
<a onclick="setPrintGroupOverride('Mains',this)" class="posButton toggle"><!--[lang:print_with_category|Mains]--></a>
|
||||
<a onclick="setPrintGroupOverride('Desserts',this)" class="posButton toggle"><!--[lang:print_with_category|Desserts]--></a>
|
||||
<a onclick="setPrintGroupOverride('Drinks',this)" class="posButton toggle"><!--[lang:print_with_category|Drinks]--></a>
|
||||
</div>
|
||||
<div id="functions">
|
||||
<h2><!--[lang:functions_header]--></h2>
|
||||
<a onclick="loadScreen('tableMap')" class="posButton"><!--[lang:close_order_function]--></a>
|
||||
<a class="posButton accumulateButton"><!--[lang:accumulate_function]--></a>
|
||||
<a class="posButton void"><!--[lang:void]--></a>
|
||||
<a class="posButton"><!--[lang:pay_function]--></a>
|
||||
<a class="posButton saveOrder"><!--[lang:print_function]--></a>
|
||||
</div>
|
||||
<div id="positionControl">
|
||||
<a class="posButton freeText" data-type="instruction" data-id="freetext"
|
||||
data-name=""
|
||||
data-price="0"
|
||||
data-category="0"
|
||||
data-department="0"
|
||||
data-printgroup="0"><!--[lang:freetext_button]--></a>
|
||||
<div type="text" class="positionInput"><!--[lang:select_covers]--></div>
|
||||
<div id="positions">
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="topNumPad" class="numPad">
|
||||
<a class="posButton numberButton">1</a>
|
||||
<a class="posButton numberButton">2</a>
|
||||
<a class="posButton numberButton">3</a>
|
||||
<a class="posButton numberButton">4</a>
|
||||
<a class="posButton numberButton">5</a>
|
||||
<a class="posButton numberButton">6</a>
|
||||
<a class="posButton numberButton">7</a>
|
||||
<a class="posButton numberButton">8</a>
|
||||
<a class="posButton numberButton">9</a>
|
||||
<a class="posButton numberButton">0</a>
|
||||
<a class="posButton numberButton">.</a>
|
||||
<a class="posButton multiplier">×</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bottomHalf">
|
||||
<!--[template:categoryMenu]-->
|
||||
<div id="itemGrid">
|
||||
<div id="itemWrapper">
|
||||
<!--[template:categories/StartersPage1]-->
|
||||
</div>
|
||||
</div>
|
||||
<div id="innerNavigation">
|
||||
<a class="posButton" onclick="scrollPage('left')"><</a>
|
||||
<a class="posButton" onclick="scrollPage('right')">></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--[template:keyboards]-->
|
||||
<script type="text/javascript">
|
||||
$(document).ready( function () {
|
||||
//Base grid width must be defined for multipage functionality to work.
|
||||
baseGridWidth = 850;
|
||||
dredgePosSetup();
|
||||
|
||||
$("#orderBox tbody tr").on( 'click', function ( e ) {
|
||||
selectRow($(this));
|
||||
} )
|
||||
} );
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,84 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>DredgePOS</title>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name = "viewport" content = "user-scalable = no ,shrink-to-fit=yes" />
|
||||
<link rel="manifest" href="/manifest.webmanifest">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="pageContainer" <!--[var: containerAttributes]-->>
|
||||
<div id="leftColumn">
|
||||
<h1 class="tableHeading"><!--[var: orderNumber]--></h1>
|
||||
<div class="tableInfo">
|
||||
<!--[var: changeCoverNumberButton]-->
|
||||
<a class="posButton">Logged in as <!--[arr:clerk|clerk_name]--></a>
|
||||
</div>
|
||||
<div class="orderBox">
|
||||
<table class="orderBoxTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="orderBoxCell qtyCell"><!--[lang:qty_header]--></th>
|
||||
<th class="orderBoxCell itemIdCell hidden"><!--[lang:id_header]--></th>
|
||||
<th class="orderBoxCell itemCell"><!--[lang:item_header]--></th>
|
||||
<th class="orderBoxCell unitPriceCell hidden"><!--[lang:price_header]--></th>
|
||||
<th class="orderBoxCell totalPriceCell"><!--[lang:total_price_header]--></th>
|
||||
<th class="orderBoxCell printGroupCell"><!--[lang:printgroup_header]--></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="orderBoxInfo">
|
||||
<span class="voidModeWarning" data-visible-in-mode='["void"]'><!--[lang:void_mode]--></span>
|
||||
</div>
|
||||
<div class="orderBoxFooter">
|
||||
<span class="orderBoxTotal"><!--[lang:totalPrice|0.00]--></span>
|
||||
<small class="orderBoxSelectedTotal"><!--[lang:selectedPrice|0.00]--></small>
|
||||
</div>
|
||||
</div>
|
||||
<div id="rightColumn">
|
||||
<div id="topHalf">
|
||||
<div class="functionButtons">
|
||||
<div class="printGroupButtons toggleGroup">
|
||||
<input type="hidden" name="print_override" class="value" />
|
||||
<!--[var:salesCategoryOverrideButtons]-->
|
||||
</div>
|
||||
<div class="functionColumn">
|
||||
<a class="posButton accumulateButton" data-active-in-mode="accumulate"><!--[lang:accumulate_function]--></a>
|
||||
<a class="showCoverSelectorButton posButton"><!--[lang:select_covers]--></a>
|
||||
</div>
|
||||
<div class="functionColumn">
|
||||
<a class="posButton voidButton" data-active-in-mode="void"><!--[lang:void]--></a>
|
||||
<a class="posButton openItemButton"><!--[lang:custom_item_button]--></a>
|
||||
<a class="freetextButton posButton"><!--[lang:freetext_button]--></a>
|
||||
<a class="numpadButton posButton"><!--[lang:numpad_button]--></a>
|
||||
</div>
|
||||
<div class="functionColumn">
|
||||
<a class="posButton"><!--[lang:pay_function]--></a>
|
||||
<a class="posButton"><!--[lang:print_function]--></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="pageList">
|
||||
<!--[var:categoryList]-->
|
||||
</div>
|
||||
<div id="pageGroupContainer">
|
||||
<!--[var:pageGroups]-->
|
||||
</div>
|
||||
<div class="pageNavigation">
|
||||
<a class="posButton prevButton"><!--[lang:prev_page]--></a>
|
||||
<a class="posButton nextButton"><!--[lang:next_page]--></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--[template:keyboards]-->
|
||||
<!--[template:orderScreen/grid_container]-->
|
||||
<!--[template:orderScreen/cover_selector]-->
|
||||
<template id="posButtonTemplate">
|
||||
<!--[template:components/posButton]-->
|
||||
</template>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
<span class="buttonImg" style="background-image:url(/images/items/<!--[var:image]-->);"></span>
|
||||
@@ -1 +0,0 @@
|
||||
<a href="#" class="posButton changeCoverNumberButton"><!--[var:covers]--></a>
|
||||
@@ -1,3 +0,0 @@
|
||||
<div class="coverSelector">
|
||||
<!--[var:coverSelectorButtons]-->
|
||||
</div>
|
||||
@@ -1,6 +0,0 @@
|
||||
<a href="#" class="posButton <!--[var:extra_classes]-->"
|
||||
data-primary-action="<!--[var:primary_action]-->"
|
||||
data-secondary-action="<!--[var:secondary_action]-->" <!--[var: extra_data]--> <!--[var: extra_styles]-->>
|
||||
<!--[var:image]-->
|
||||
<span class="text"><!--[var:text]--></span>
|
||||
</a>
|
||||
@@ -1,13 +0,0 @@
|
||||
<div class="gridContainer">
|
||||
<div class="gridContainerHeader">
|
||||
<span></span>
|
||||
<div class="posButton closeGrid">×</div>
|
||||
</div>
|
||||
<div class="gridContainerGrid">
|
||||
<div class="pageGroup"></div>
|
||||
</div>
|
||||
<div class="pageNavigation">
|
||||
<a class="posButton prevButton"><!--[lang:prev_page]--></a>
|
||||
<a class="posButton nextButton"><!--[lang:next_page]--></a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,6 +0,0 @@
|
||||
<div class="gridPage" style="
|
||||
grid-template-columns: repeat(<!--[var:cols]-->, 1fr);
|
||||
grid-template-rows: repeat(<!--[var:rows]-->, 1fr);
|
||||
">
|
||||
<!--[var:pageButtons]-->
|
||||
</div>
|
||||
@@ -1,3 +0,0 @@
|
||||
<div class="pageGroup" data-page-group-id="<!--[var:page_group_id]-->">
|
||||
<!--[var:pages]-->
|
||||
</div>
|
||||
@@ -1,3 +0,0 @@
|
||||
<a data-page-group-id="<!--[arr:page|id]-->" class="posButton loadPageGroup">
|
||||
<!--[arr:page|label]-->
|
||||
</a>
|
||||
@@ -1,157 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>DredgePOS</title>
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
|
||||
<script src="https://unpkg.com/current-device/umd/current-device.min.js"></script>
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<link rel="stylesheet" type="text/css" href="themes/restaurant/theme.css?id=ax" media="screen" />
|
||||
<link rel="stylesheet" type="text/css" href="themes/restaurant/paymentSplitter.css?id=ax" media="screen" />
|
||||
<meta name = "viewport" content = "user-scalable = no, initial-scale=0.8 ,shrink-to-fit=yes" />
|
||||
<script type="text/javascript" src="currency.min.js"></script>
|
||||
<script type="text/javascript" src="posFunctions.js"></script>
|
||||
<script type="text/javascript" src="paymentFunctions.js"></script>
|
||||
</head>
|
||||
<body class="darkMode" data-tablenumber="<!--[var:activeTable]-->">
|
||||
<div id="pageContainer">
|
||||
<div id="flexWrapper">
|
||||
<div id="header">
|
||||
<a class="posButton"><!--[var:loggedInAs]--></a>
|
||||
<h1><!--[lang:paying_table|<!--[var:activeTable]-->]--></h1>
|
||||
<a class="posButton exit" onclick="loadScreen('tableMap')">×</a>
|
||||
</div>
|
||||
<div id="pageStructure">
|
||||
<div id="leftColumn">
|
||||
|
||||
<h2>Whole Table</h2>
|
||||
<div class="tableWrapper">
|
||||
<table id="first" cellspacing="0">
|
||||
<thead>
|
||||
<th class="hide"><!--[lang:id_header]--></th>
|
||||
<th><!--[lang:qty_header]--></th>
|
||||
<th><!--[lang:item_header]--></th>
|
||||
<th class="hide"><!--[lang:individual_price_header]--></th>
|
||||
<th class="hide"><!--[lang:printgroup_header]--></th>
|
||||
<th class="totalpriceCell"><!--[lang:total_price_header]--></th>
|
||||
<th class="hide"><!--[lang:cover_header]--></th>
|
||||
<th class="clerkCell"><!--[lang:clerk_header]--></th>
|
||||
<th class="hide"><!--[lang:orig_qty_header]--></th>
|
||||
<th class="hide"><!--[lang:category_header]--></th>
|
||||
<th class="hide"><!--[lang:department_header]--></th>
|
||||
<th class="hide"><!--[lang:orig_tprice_header]--></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!--[var:tableHTML]-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="tableFooter">
|
||||
<div class="totalsRow">
|
||||
<h3 class="firstTotal"></h3>
|
||||
<p class="firstSelectedTotal"></p>
|
||||
</div>
|
||||
<div class="controlRow">
|
||||
<a class="posButton payAll"><!--[lang:pay_all]--></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="controlColumn">
|
||||
<a class="posButton" onclick="moveItems('#first', '#second')">></a>
|
||||
<a class="posButton" onclick="moveItems('#second', '#first')"><</a>
|
||||
</div>
|
||||
<div id="centerColumn">
|
||||
<h2>Partial Table</h2>
|
||||
<div class="tableWrapper">
|
||||
<table id="second" cellspacing="0">
|
||||
<thead>
|
||||
<th class="hide"><!--[lang:id_header]--></th>
|
||||
<th><!--[lang:qty_header]--></th>
|
||||
<th><!--[lang:item_header]--></th>
|
||||
<th class="hide"><!--[lang:individual_price_header]--></th>
|
||||
<th class="hide"><!--[lang:printgroup_header]--></th>
|
||||
<th class="totalpriceCell"><!--[lang:total_price_header]--></th>
|
||||
<th class="hide"><!--[lang:cover_header]--></th>
|
||||
<th class="clerkCell"><!--[lang:clerk_header]--></th>
|
||||
<th class="hide"><!--[lang:orig_qty_header]--></th>
|
||||
<th class="hide"><!--[lang:category_header]--></th>
|
||||
<th class="hide"><!--[lang:department_header]--></th>
|
||||
<th class="hide"><!--[lang:orig_tprice_header]--></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="tableFooter">
|
||||
<div class="totalsRow">
|
||||
<h3 class="secondTotal"></h3>
|
||||
<p class="secondSelectedTotal"></p>
|
||||
</div>
|
||||
|
||||
<div class="controlRow">
|
||||
<a class="posButton payPartial"><!--[lang:pay_table]--></a>
|
||||
<a class="posButton transferPartial">Transfer to Another Table</a>
|
||||
<a class="posButton selectAllSecond">Select All</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="rightColumn">
|
||||
<h2>Controls</h2>
|
||||
<div id="rightColumnContainer">
|
||||
<div class="row">
|
||||
<a class="heading" onclick="">Selection Tools</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a class="posButton qtySelector">Select Quantity</a>
|
||||
<a class="posButton selectAmount">Select Amount</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a class="selectDepartment posButton">Select By Department</a>
|
||||
<a class="selectCategory posButton">Select By Category</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a class="selectCovers posButton">Select by Cover #</a>
|
||||
<a class="selectPrintGroup posButton">Select by Printed With</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a class="selectAll posButton">Select All</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a class="heading">Select By Fraction</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a class="posButton selectFraction" data-value="2">Select 1⁄2</a>
|
||||
<a class="posButton selectFraction" data-value="3">Select 1⁄3</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a class="posButton selectFraction" data-value="4">Select 1⁄4</a>
|
||||
<a class="posButton selectFraction" data-value="5">Select 1⁄5</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a class="posButton selectFraction" data-value="6">Select 1⁄6</a>
|
||||
<a class="posButton selectFraction" data-value="7">Select 1⁄7</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a class="posButton selectFraction" data-value="8">Select 1⁄8</a>
|
||||
<a class="posButton selectFraction" data-value="<!--[var:covers]-->">Select 1⁄covers</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="coverControls" class="popupBox"><!--[var:coverButtons]--></div>
|
||||
<div id="departmentControl" class="popupBox"><!--[var:departmentButtons]--></div>
|
||||
<div id="categoryControl" class="popupBox"><!--[var:categoryButtons]--></div>
|
||||
<div id="printGroupControl" class="popupBox"><!--[var:printGroupButtons]--></div>
|
||||
<!--[template:keyboards]-->
|
||||
<script type="text/javascript">
|
||||
$(document).ready( function () {
|
||||
covers = '<!--[var:covers]-->'
|
||||
dredgePosSetup('#pageContainer');
|
||||
setupPaymentSplitter();
|
||||
} );
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
<a data-value="<!--[var:value]-->" class="posButton <!--[var:class]-->"><!--[var:text]--></a>
|
||||
@@ -1 +0,0 @@
|
||||
<a class="posButton roomButton" data-value="<!--[var:roomId]-->"><!--[var:roomName]--></a>
|
||||
@@ -1,71 +0,0 @@
|
||||
<div id="virtualKeyboard">
|
||||
<div class="headingRow">
|
||||
<h3 id="virtualKeyboardHeading"></h3>
|
||||
<a class="posButton closeKeyboards">X</a>
|
||||
</div>
|
||||
<input type="text" name="virtualKeyboardInput" id="virtualKeyboardInput" />
|
||||
<div id="virtualKeyboardButtons">
|
||||
<div class="virtualKeyboardRow">
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
</div>
|
||||
<div class="virtualKeyboardRow">
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
</div>
|
||||
<div class="virtualKeyboardRow">
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
</div>
|
||||
<div class="virtualKeyboardRow">
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
<a></a>
|
||||
</div>
|
||||
<div class="virtualKeyboardRow">
|
||||
<a></a>
|
||||
</div>
|
||||
<span class="forceFocus"></span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,28 +0,0 @@
|
||||
<div id="virtualNumpad">
|
||||
<div class="headingRow">
|
||||
<h3 id="virtualNumpadHeading"></h3>
|
||||
<a class="posButton closeKeyboards">X</a>
|
||||
</div>
|
||||
<div id="virtualNumpadInput"></div>
|
||||
<div id="virtualNumpadButtons">
|
||||
<div class="virtualNumpadRow">
|
||||
<a href="#" data-value="1" class="posButton virtualNumpadButton">1</a>
|
||||
<a href="#" data-value="2" class="posButton virtualNumpadButton">2</a>
|
||||
<a href="#" data-value="3" class="posButton virtualNumpadButton">3</a>
|
||||
</div><div class="virtualNumpadRow">
|
||||
<a href="#" data-value="4" class="posButton virtualNumpadButton">4</a>
|
||||
<a href="#" data-value="5" class="posButton virtualNumpadButton">5</a>
|
||||
<a href="#" data-value="6" class="posButton virtualNumpadButton">6</a>
|
||||
</div><div class="virtualNumpadRow">
|
||||
<a href="#" data-value="7" class="posButton virtualNumpadButton">7</a>
|
||||
<a href="#" data-value="8" class="posButton virtualNumpadButton">8</a>
|
||||
<a href="#" data-value="9" class="posButton virtualNumpadButton">9</a>
|
||||
</div><div class="virtualNumpadRow">
|
||||
<a href="#" data-value="0" class="posButton virtualNumpadButton">0</a>
|
||||
<a href="#" data-value="." class="posButton virtualNumpadButton">.</a>
|
||||
<a href="#" data-value="clear" class="posButton virtualNumpadButton virtualNumpadClear">Clear</a>
|
||||
</div><div class="virtualNumpadRow">
|
||||
<a href="#" data-value="submit" class="posButton virtualNumpadButton virtualNumpadSubmit">Enter</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user