Sencha store group by id - group-by

In Sencha, I have a store with some products in. Each products has his own id, name, price...
I can add an item to a store, but when I add the same item multiple times to a store, I want the store to have only one item of the same id.
E.g. when I click an 'add' button in a product-detail-view multiple times, I want the product to only be once in the store. In MySQL it would be like 'GROUP BY id'.
I hope someone can help me with this!
Thanks in advance!

You probably need to add a listener for the Add event of the store. In the event code, check to see if the added item/items (these will be passed to the event in a parameter, see Sencha Touch API Documentation for details) are already in the store. If yes, remove the new items from the store.

Related

Ban a User in a particular firebase firestore group chat for predefined time

I am very new to coding. but i managed to build a group chat app using a low code platform called flutterflow. i managed to spend significant amount of time on it and was able to build a public group chat app except few functionalities. I am hoping to find help from here. for the following questions.
I have chat mods appointed on a group level. like if you create a group, you are a founder and you can assign mods to that perticular group chat. now i want these mods to be able to ban a user in that particular group chat.
I have tried created a subcollection in groups called "banned user" and created two feilds. one is "banned users" document reference to users. and another is "banned_till" to record a time stamp until the user gets banned.
Problem with this is when i ban a user twice, it creates two documents in the user reference with the same user. and two documents has different "banned_till" times. which one it is supposed to pick?
i tried to do this and put a conditional visibility to the chat that "if current time is less than or equal to banned_till time" it wont let user type in the textfield to chat. but this is giving me gray screen.
I am very new to this. any help would be appreciated.
there is specific way to do so. you have to set custom logic. like save all banned users in a firebase database object with thier max time and procced next.

Create Purchase Order Workflow Ignoring Items with Certain Item->Locations

When creating a Purchase Order (PO) from a Sales Order (SO) in NetSuite, desire to only populate the PO->ItemList with Items from SO which are set to a specific Item->Location even when they share Preferred Vendor.
How can we achieve this? Thinking perhaps a Workflow can check the ItemList when the Create PO link is clicked on an Item.
Our solution ended up being to identify the items which were not to be added to the PO. Then we set the quantity to 0 and added a User Error message upon saving if they were still on the PO. This could be achieved via some scripting, though this was sufficient for our needs with this workflow process.

Swift - Parse - Friend list - Possibility to create groups of friends

Could someone give me a link (github/gitlab) of a swift projet which show the possibility of managing Users on Parse.
For example , I would like for a user (who have 15 friends):
to create a group with 5 friends for example (the user could add a name for this group)
to delete if necessary the group
to send a message(textfield) to a group
to send a message (textfield) to a user
For the UI, I would like if it exists, to manager user like the Springboard (having the picture of user in round), and when you longpress on it, you have a cross to delete /and 'block sign' to block user.
And the user could drag/drop other user on his friend list to create a group (like on the Springboard when you create a group of app)
Thanks for helping me !
Have a nice day!
I've not come across such framework for parse/swift. I think you need to build it yourself.
This might help you in the direction:
Friend/de-friend people: https://stackoverflow.com/a/32557977/3314336 &
Parse Swift: User relations with a "friends request"
Send messages framework: https://github.com/slackhq/SlackTextViewController
What you're asking for is pretty general and extensive. You could use Roles and Relations to manage friend groups. You could have Group objects, give them an owner, and a relation for all the members of the group.
For chat, I'd recommend not trying to just build that directly into Parse. Twilio recently released their Programmable Chat feature, which is awesome. Sounds like it'd be beneficial for you to use that.

drupal 6 allow front end users to dynamically add fields for forms in front end

I create a drupal events website. The system will have events and people can register for events. Different events will have different registration forms. Assume we can enter any number of participants details. For a participant Name, Mobile and Email address should be entered. I need to allow the people to add participants dynamically. I like to have a option like following.
At the beginning the form should display only one row for the participant's details. If the user need to add another one he should be able to click on "Add another" button and another row of field should display. Like this he/she should be able to add many lines. Please advise me how I can do this using CCK fields?
Also using the views I need to display the participants information in the backend. I am stuck. Please help me.
I had the same problem and if you whant to solve it in Drupal 6 - you should to write your personal module with JavaScript... But in 7th Drupal we have Field collection module. You combine some field (Name, Mobile and Email) in one collection and this fields work with Views module.

friend-selector : get user ID of the selected friend

I need to create a graphical interface that displays the current user's friends and when you click one of these users need to receive in return the ID of the user so they can perform some processing based on business rule of my application. I wonder if there is any component that offers this functionality (click on a friend and get the id of my friend).
When I say "component" I mean the UI's such as friend-selector: http://developers.facebook.com/docs/reference/fbml/friend-selector/
Thanks
There are NO official plugin to do this. You need to:
Build your own (won't be hard at all)
Try googling for existing ones