THIS IS NOT A FINISHED PROJECT!! DO NOT INSTALL IN A PRODUCTION ENVIROMENT!!!
I started working on this project…but my time is limited. So, I thought it would offer this to the SambaPOS community to help develop this project as a community.
This project is marking multiple tables as occupied when a large group takes up multiple tables.
Here is a sample:
As you can see from the gif, multiple tables can be selected, Ticked loaded from a combined table and a table can be removed.
What has been done thus far:
- All (or most) of the build in table functions needed to be recreated for each condition. (Load table, change table, etc.)
- A program settings called CombineTablesMode is used, with a value of “On” or “Off”,
- A new entity state was created called Combined Tables, set to the same color as New Orders.
- A custom field was added to the Tables entity called “Combined Tables”.
- I added a comment action (show message) explaining what I was hoping to accomplish with the rule.
What needs to be done (that I can think of):
- Automatically remove “Combined State” from tables when the ticket is paid.
- Automatically remove “Combined State” from tables when the Master Table is moved.
- Testing, testing, testing.
- Add any new features this community can think of.
Community/Group involvement:
- Anybody can contribute. If you have an idea of a feature to add, but do not know how to implement it, just post your thoughts.
- If you have an feature request or bug to report, also add if you are going to try to work on the feature/bug or not.
- If you do have a fix or feature to add, edit the bottom of your original post with
---- edit ----
with your changes.
You post should look something like this:
- If you would like to upload a new import file also include that.
Setup
Before or after importing, you will need to make a few changes:
- Add a custom field to the Tables entity called “Combined Tables” (this is where we will writing the master table to).
- Entity screen, All Tables view mode, needs to be set to Layout or Custom. (Needed to add a Automation Command Button to the screen)
- Also, All Tables (Appearance tab), “Use State Display Format” needs to be enabled.
Changing view mode from Automatic to Layout or Custom:
- After change navigate your tables screen. (it should be blank).
- Right click on the middle, select “Design Mode”
- Right click again and choose “Add Widget” → “Entity Grid”
- Expand the new widget to fill most of the screen, allowing enough space for button to be added later.
- Right click in the box and select “Settings (Entity Grid)”
- Fill in the the appropriate fields:
Entity Type: | Tables |
Display State: | Status |
Automation Command: | Combined Tables |
Command Value: | {ENTITY NAME} |
- Click OK on the pop-up to close it.
- Right click and select Properties (Entity Grid).
- In the Name field put “All Tables”
- Click OK to close.
- (continued below)
Existing Custom view mode
- I have not tested this with Custom view mode.
- Right click on each Entity Button and fill in the Automation Command field with “Combined Tables”.
- If you have an existing name entered into the Properties of each Entity Button, you will need to go into the action “CMBTBL - Refresh Tables Widget” and change the “All Tables” to the name you have given in the Entity Button Properties. If no name is present, enter “All Tables”.
- Add an Automation Command Button widget with these settings:
Command Name: | `Combine Mode’ |
Caption: | [= '{SETTING:CombineTablesMode}' == 'On' ? '<panel Green>Combine Tables\: <bold>On</bold><br/><size 10>Master Table set to: <bold>{LOCAL SETTING:MasterTable}</bold></size></panel>' : '<panel Gray>Combine Tables\: <bold>Off</bold></panel>'] |
Font: | 20 |
- Click Ok on the pop-up to close it.
- Right click again, select Properties (Automation Command Button)
- In the Name field enter: Master Table
- Right click on the entity grid and select Design Mode to exit design mode.
Import file:
Combine Tables.zip (2.4 KB)
Backup file (default database, version 5.3.6)
CombinedTables_202110281254SQM.zip (483.9 KB)
A personal note:
Nothing in this project is set in stone. Anything can be changed. Constraints can be improved, words/wording can be changed, the whole project could be redone if you think it can be improved.
I believe this is the first someone is relying on the community to help develop a project (usually it is one person with other people helping). I hope this goes well. For me, business has been booming and I do not have time I usually do for extra projects.
A sincere Thank You in advance for everyone who contributes to this project!