Create Line Items with Modifiers Through Square Connect API - square-connect

I want to create an order on a Square POS (on an iPad) for an item with modifiers (eg: a coffee with soy milk). I want the item to be added to the "Current Sale" area, so the user has to press the "Charge" button. Is this possible, and if so how?
I've looked at both the V2 API and the POS API, and can't see how to create orders with line items with modifiers. Is there a way?
I also suspect that despite the POS API going through the iPad APP (via URL schemes), it won't result in the user interface of Square popping up and the Current Sale being populated. Is this correct?

You are correct, you cannot currently inject orders into the Point of Sale app, but it is feedback we are listening to and working on addressing.
You can use the Point of Sale app to make charges and then update the item inventory amounts with the REST endpoints, however the items will not be attached to the sale.

Related

How can I collect data in SwiftUI and show it to all users?

I'm using a SwiftUI, and I want to create a list of functionality that has not yet been added to my app and allow users to vote for the functionality they want to see first.
Basically, it will be a list of labels with buttons. When the user taps a button, it should show a number (how many users voted for it too).
As I understand, I need a DB where the data will be written and from where the data will be read and displayed in the app. Can I use a CloudKit for it?

How to make rearrangeable objects and display them for every user

Title is maybe confusing but I will try to explain what is that I need.
I have application that shows tables of some place (e.g restaurant). This tables are shown to end user.
But I want owner to be able to rearrange these tables position from admin panel. He will be presented container ( just a rectangle to keep it simple ) and I want them to be able to take table (it can be icon or whatever) and place it wherever they want (literally in any direction or position in this container). They can add as many tables as they want and place them where they want. This part is for frontend and I am not too scared of this. But problem for me is how can I save this information using Laravel? because I want owner to save this position of tables and then when end user comes to page of that place I want them to see the positioning of these tables that owner provided.
How can I achieve this? Is it possible?
I don't need Laravel specific answer, just to point me in right direction so I can understand the logic of how this can be saved on backend.
I am using Vue.js on frontend and Laravel for backend.
I made this sketch so you can see what I mean : https://prnt.sc/1tcv3lf
Off the top of my head:
Frontend
In Vue, you can implement a reusable component for the tables. These components will have a top and a left props which define their absolute position from the container's top and left (CSS rules). You can easily make them draggable using jQuery by calculating mouse pointer's position relative to the container's top-left corner. Pass them as props into top and left for the table components. Store them in an array [{ top: _, left: _ }]. Append to this array whenever a new table is added.
When save button is clicked send this array to the backend.
Backend
Not sure what exactly is bothering you about this, you can simply store it in a database with top and left columns, each row representing one table in your frontend.
Then you can query this database to fetch all rows whenever users visit the page, pass it as an array to the frontend. The frontend will use this array to construct all the tables in the right positions.

HowTo: stay on account view while opening a contact on a column

I am using a simple tree view on the left side for a company to see linked entities like opportunities, contacts, etc.,
When I click on a contact, my browser gets redirected to the contact, but I want to stay on the company view and load the contact details into the second or third column or just any sector on that company view.
Getting redirected to each record every time I click a link is annoying because I lose my track and sometimes I want to see the parent details while I see the details of a child record. In this case I want to keep the company view while I can load one contact on the same view without any page load or redirection.
Note: I am using a demo access to Dynamics CRM 2015 online and installed a plugin from a third party to get a tree view. The above is not dependent on my tree view. This can also be done for activities for example which is listed on right column by default. By clicking on an activity, I would like to see the activity details loaded in some panel on the middle column or anywhere I want, without being redirected.
You probably can make do with a Quick View.
Let's say you want to do this trick with Accounts and Contacts, to display info for contacts inside an Account. It goes like this:
Create a lookup inside Account, to Contact entity. Put it on the form (you can make it not visible, doesn't matter).
Create a "Quick View" form inside Contact. They are built similar to normal forms. Include all the info you want to display.
Go back to Account form, INSERT -> Quick View. Select the lookup you made in point 1, and the quick view you just created.
The quick view will display on the Account form, grabbing info from the Contact selected inside the lookup. If you left the new lookup visible, you can play with it and see how it works.
4b. You probably will now need to "link" the treeview with the lookup somehow (since it's third-party I'm unable to offer any insight about it). It will require a bit of javascript for sure.
For more details, as usual, refer to MSDN
Ps: If you want to try it out fast, skip #1 and pick "Primary contact" as field in #3 (it's standad, and most likely already on the form)

wp7 record filtering

For a Windows Phone 7 app, I have several Customer records that I need to display based on when the customers where created, so something like a start date and end date filter (maybe some canned entries listbox that lets you pick - tomorrow, week, month, custom)
Any UI guidance of how to do this so that the interface is kept clean and still leaves enough space for the records to get displayed?
Thanks,
Pratik
You could reserve the majority of the display space for your data and show a brief indication of the current filter in place.
This filter could be an active control of your choice that when tapped takes the user to another page where you provide the criteria selection.
Initially it could show "No filter (tap for criteria)" or some such.

Core Data and poor performance

I've been working this issue for a while now and I am open to any best practices/advice.
The Example
So I created a sample Core Data application. The application is basically a mimic of the AddressBook application. I have the following Entities: Group, Contact, Address, Phone, Email, Webpage, Dates.
As you probably are guessing, a Group can have multiple Contacts, and a Contact can be in multiple groups. Contacts can also have multiple Addresses, Phones, Emails, Webpages, and Dates.
I basically imported some 600 contacts into this application from AddressBook. The user-interface is relatively simple...a Group/category list on the left and an NSCollectionView or NSTableView on the right that shows the list of contacts depending on the selected Group.(collection view or table view...as I added the ability to display either view, both of which are bound to an NSArrayController)
The Group elements I am pulling in through code as opposed to Interface Builder, becasue I wanted to playaround with a Thing's - like sidebar, and it was far easier to do it this way.
The Problem
One of the categories contains all of the contacts while the other category contains merely 2 contacts. When i select the category that has all the contacts it takes anywhere from 8-10 seconds for the information to populate the collection or tableview. However doing the same thing in AddressBook itself is very speedy, almost instant. I am using the SQLLite store type, and have tried using a number of different approaches including trying to diagnose the problem via Instruments, but nothing has worked.
I've tried setting a predicate to the defaultFetchPredicate of the Contact's array controller as opposed to setting a filter predicate, but that didn't work.
I tried preFetching and faulting but i'm not sure if I'm doing it right, and not really sure how to accomplish it if Interface Builder handles the Contact's NSArrayController.
The Other Example
I've also tried downloading a sample Core Data app...while it has a simpler relationship model than what I did(basically a Molecule has Atom objects and an Atom object has Element objects), I inserted 65,000 records and it performed like a charm.
The Question
I've basically hit a wall and I'm wondering if anyone else knows why this is happening and the best ways to fix/overcome/avoid this type of issue?
Thanks!
It turns out that it was actually the NSCollectionView that was slowing things down. I guess the creation and manipulation of views x number of collection view views adds a significant amount of overhead. IKImageBrowserView could have been used but it wasn't what I was looking for.
I ended up changing the application layout to solve this issue.
Thanks all!

Resources