I have an app with multiple columns (about 3 columns as least), each column is a more detailed view of an item in a column on its left. This type of layout is similar to Asana's.
Lets take an example from 1 of the page I currently have:
Column 1 list all current users, clicking on 1 user will open a list of all sales orders of that user on column 2.
Column 2 show list of all orders of 1 selected user on column 1. Clicking on 1 order will show the details of that order
Column 3 show all details of an order selected on column 2. Clicking on a shipment in that order details will show the details of the shipment
Column 4 show all the details of a shipment selected on column 3
So on a so forth. Now there is another twist:
Column 2,3,4 show these details in a form, which mean they can be edited and submitted. Once they are submitted, it makes sense to reload all the column on the left of that edited column to refresh the info. However, for performance purpose I would like to reload them all in a single request and send them back in one json array hen update each column that has newly returned view code (lets assume the backend code is smart enough to handle all this)
I believe someone must have had this issue before, what is your solution to get around this?
Since you are loading different set of data. Its good not load them all at once. You can use ng-include and the the content of the ng-include can be triggered based on the clicks.
ng-inclue="<<scope variable>>"
For ex. In your controller,
Chnage the value of salesurl based on user action
<div class="slide-animate" ng-include="salesurl"></div>
The scope variable can be an URL, which renders the result set based on the parameters posted after user action.
Hope this help.
Related
I'm working on a screen flow. The idea is to have a lookup component the user can search a contact. Then I would like to display the information from the Contact (Account Name, Contact Name, Number Email) and I would like to be able to have the user update that information if needed. I just stomped on how it can be done. I know it should be able to be pulled from the record ID in some type of way and maybe use an Assignment to display the information. Can someone guide me on a next step or if anyone has an instructional video would be helpful.
Thanks
You wouldn't be able to display the looked up contact's fields on that screen as soon as you populate that field. That would be something only possible in code (aura component or lwc).
What you can do, however is -
Get Record element after that screen element. (Get Contact, where Id = lookupcomponent.recordId)
Then EITHER:
use the new Fields (BETA) option on another screen Fields (BETA)
(this method is easier, doesn't have as much control and is limited on fields, depending on data type, you can use)
add inputs one by one and set the default values Add Fields One By One
(this method allows more control)
Then, you will need an update element. If you used the Fields (BETA) you can just update the record variable. If you did the inputs one by one, you will need to update the contact and set fields individually.
Full Flow Example
I'm using mui-datatable to implement table in my app. I've every feature I need up and running, and I'm using server side data and pagination.
The problem is that I need to persist selection of rows when the user change the current page.
I can store the ids of the rows that where selected in an external array using onRowSelected.. but I'm not sure how to make the table render those rows as selected when user changes the page.
Bare in mind i'm using server side data, so the idea would be that in page 1, when I select row 1, a take the id of that record and add it to the array of selected ids. Then I need to check if the ids of rows that are currently displayed in the page are included in the selected array, and if so then check it as selected in the table. That way when I change the page, the same logic would run and all rows would be cleared since none of the row in the new page are selected.. I think you get the point.
I dont know where should i check if the row's id is included y my selected array and if so, how to check it in the datatable.
Thanks in advance for the help.
You can wrap your entire MUI datatable in another component which maintains the state of all selected rows
I'm stupid... I just needed some sleep xD
My problem was solved once I realized that I just needed to pass the rowsSelected option like this:
rowsSelected: this.state.pictures.filter(p=>this.state.selectedIds.includes(p.id)).map((p,i)=>i)
where this.state.picture will change when the user changes the page and rowsSelected will also changed.
Never mind... It's a rookie mistake.
I have a simple Angular-JS page that uses tr-ng-grid tag
<div ng-controller="TableDataCtrl">
<div id="tableview_element">
<table tr-ng-grid="" items="data"
ng-show="data_available()">
</table>
</div>
{{str_data}}
</div>
Whenever user clicks on a link, the application should display a different table. The controller is able to obtain the JSON data from the server using HTML get. 'str_data' is stringified form of the JSON data. That seems correct always.
But the tr-ng-grid does not ever update the table's schema. It seems to lock on to the very first table that is displayed with it. The whole table may be hidden or displayed using ng-show(), but then the column headings don't get modified to that of the newly loaded table.
To be very clear: Say you have two tables, birds and mammals. If the first table is a list of all birds and birds-attributes, tr-ng-grid displays the table by automatically figuring out the column headings. If the user clicks on mammals then on the page, the mammal data gets loaded, but tr-ng-grid is still looking for bird-attributes in a mammals table which has a different set of columns (and a few common columns like id and name)
How would one force tr-ng-grid to erase the current template and construct a whole new table?
One method is of course to keep every table in its own controller, and own HTML element. Is there a simpler way? or is there an alternative to tr-ng-grid that supports such a full-fledged table view refresh?
Seems like, grid headers are initialized only once.
One solution to solve your problem is to re-compile the grid whenever the data is changed.
Here is the updated plunker. http://plnkr.co/edit/34nUGmopB8q4GWQ9uF57?p=preview
I have Added 2 text box in product page to recive height an width from user for each product.
I have used textbox input just like quantity in The buy-block Form.
Now I want to save this textboxs in Database and use them in cart page and order page for each cart and product.
I added 2 variable in cartcontroller.php like $qty in function preProcess() .
Now how can I save them in DB?
If I understand, you want your customers to submit custom values along the product they order.
In this case, you should look for "product customization" fetaure of PrestaShop :
http://doc.prestashop.com/display/PS15/Adding+Products+and+Product+Categories#AddingProductsandProductCategories-ManagingCustomization
You can add textbox on product page, customers will type values, these values wiil be displayed on cart and order detail.
I have a Quickbase app with a form for adding records. On an intranet page, I have a link to the add record form. When a user clicks on that link, Quickbase opens the add record form. However, I would like to supply values for some of the fields on the form as parameters in the URL.
I am aware of API_AddRecord, but as I understand it, that can only be used for completely filling in all required fields and saving the record. The disprec parameter can be used to see the record, but doesn't keep the record in add mode without committing the record.
What I need to do, is to fill in a couple of the fields, but keep the record in add mode, allowing the user to fill in a couple more fields. The URLs on the intranet page are actually generated in a grid, so there are some fields that are already known then the user clicks on the link, and I don't want the user to have to type them in again.
Can this be done? Thanks for your input.
Sure. Folks do this all the time. Use a=API_GenAddRecordForm&_fid_1="foo"&_fid_2="bar" where the number are the Field IDs of the fields you want to fill out, and "foo" and "bar" are the values you want to fill in.