221 lines
12 KiB
Plaintext
221 lines
12 KiB
Plaintext
MAIN GRID SPECS
|
|
|
|
OVERVIEW
|
|
Main grids show all the stuff people have entered in Raven and are used for selection to edit/ view, filter and sort for reporting and mass operations.
|
|
Proposed system is a hybrid grid system that has two modes to take into account the width of the display device:
|
|
- MINI mode (XS ) < 600 pixels wide (my Pixel 3a phone is 393px)
|
|
- In this mode only one column shows and it's formatted according to the Display Format Template
|
|
- DisplayFormatTemplate is specd in the core-display-format-template-system.txt doc
|
|
- So the user chooses which columns to show in a small factor themselves, default is name only or equivalent
|
|
|
|
|
|
CASES
|
|
None that are intrinsically grid related really, just 3 or so regarding specfic fields to add to grids
|
|
|
|
|
|
REQUIREMENTS
|
|
|
|
Client
|
|
- Client needs to tell the server which form of list is required, i.e. it's client window size when fetching a list
|
|
- HYBRID BIMODAL: MINI or default which is large (for now but consider maybe a medium down the road in planning)
|
|
- in MINI mode
|
|
- the client sends "mini=true" to the client with the grid data request
|
|
- Client receives two field list back (id and display field), displays the single field
|
|
- in large mode
|
|
- the client sends no mini= parameter as it's optional and understood to be full size
|
|
- the list comes back as an object with not only the actual columns but also a separate property listing the set of columns in order to be displayed
|
|
- Also their data type
|
|
- Also need what type of object if openable with an url
|
|
- Client expects an arbitrary set of columns in an arbitrary order defined by server so doesn't have a pre-ordained set of things.
|
|
- The client needs to be able to handle more columns than fit horizontally
|
|
- The client needs to not wrap any column vertically but ellipse.. it instead
|
|
- Client accepts a list of fields and types etc and generates the grid and populates the data dynamically
|
|
- This means that I can make a general purpose Vue grid component, plunk it down on a form and then wrap it with what is unique about that form
|
|
|
|
Server
|
|
- Server needs to accept a parameter from the client when a grid list is fetched that tells it if it needs to send a single column templated list
|
|
- vp="XS" I think would be sufficient (ViewPort = Extra Small)
|
|
- Grid lists need to know what their template is as more than one list might use the same template?
|
|
- SERVER SENDS LIST OF COLUMNS
|
|
- The server needs to tell the client which columns are coming back with the list and what types etc so the client can just adapt to any template setting
|
|
- column list has type of object behind each column if applicable and user has rights to open so client can make hyperlinks
|
|
- SERVER SENDS DATA
|
|
- Data in a standard for all grid lists json format, not based on set objects (I think I can do that, probably a hybrid object with JSON data)
|
|
- Each row has each column as a object comprising of:
|
|
- Display value (the data to show, not formatted yet, that's up to the client)
|
|
- Optional: ID value (if the object is openable **** MUST CHECK RIGHTS ALSO HERE **** then this is the id to open for the client to put a hyperlink on that column)
|
|
- To save bandwidth abbreviations are used in the column definitions:
|
|
- ColumnsJSON=@"{[ {""cm"":""Widget"",""dt"":""text"",""ay"":"+ AyaType.Widget.ToString()+ "}]}";
|
|
- cm=column name locale key, dt=AyDataType, ay=AyaType to open on click of that column field (optional, not present if not openable)
|
|
- For example (wide list):
|
|
data:{
|
|
columns:{[ {cm:"lt_client_name",dt:text,ay:client},{cm:"lt_client_notes",dt:text},{cm:"lt_last_workorder",dt:number,ay:workorder}]}
|
|
rows:{[ {display:"Green mechanics",id:32},"...notes...",{display:"42",id:42}, ...thousands more etc.... ]}
|
|
}
|
|
- For example (XS list)
|
|
data:{
|
|
columns:{[ {cm:"lt_client",dt:text,ay:client}]}
|
|
rows:{ {display:"Green mechanics",id:32}, ...thousands more etc.... }
|
|
}
|
|
|
|
- has separate property defining all columns in list, their datatype and ayatype if openable
|
|
|
|
|
|
|
|
Back AND front end
|
|
|
|
|
|
=========================================================== SCRATCH AREA ===============================================================
|
|
sample current response for widget list:
|
|
se body
|
|
Download
|
|
|
|
{
|
|
"data": [
|
|
{
|
|
"id": 99,
|
|
"concurrencyToken": 3902247,
|
|
"name": "Awesome Wooden Shirt 123",
|
|
"serial": 99,
|
|
"dollarAmount": 630.45,
|
|
"active": true,
|
|
"roles": 8,
|
|
"startDate": "2020-01-08T15:29:39.626944Z",
|
|
"endDate": "2020-01-08T17:37:12.605146Z",
|
|
"notes": "Praesentium quisquam sit deserunt. Perferendis explicabo ipsam odit ab sequi mollitia ut. Sunt sint natus nihil quas quas est ut et. Non sed enim ut enim ut sed nisi reprehenderit.\n\nUt distinctio non. Rerum quam beatae illo qui fugiat fugiat totam. Vitae eveniet provident et consequuntur maxime perspiciatis et. Dolores veritatis sunt. Quia quae quo pariatur consequatur quia qui dolor. Vero aliquid voluptatem eos dicta provident atque eum.\n\nEt culpa rerum quis minus cumque eius facilis. Neque ad neque ratione. Eveniet exercitationem doloremque. Aut accusantium et voluptas. Laboriosam ipsa sit voluptatum voluptatem distinctio aut iusto et et. Et dolorem labore tempore odit.",
|
|
"count": null,
|
|
"customFields": "{\"c1\":\"2020-02-21T02:43:22.9011395Z\",\"c2\":\"Totam eligendi sed repudiandae delectus autem quas. At ut quasi quia tempore. Sit omnis modi a maiores quia est. Nam dolor amet. Inventore ea aut eum iusto quasi in nostrum. Aliquid voluptatibus error exercitationem accusamus molestias dolorem reprehenderit non.\",\"c3\":29779562,\"c4\":false,\"c5\":0.494726251109841}",
|
|
"tags": [
|
|
"xanthic"
|
|
]
|
|
},
|
|
{
|
|
"id": 98,
|
|
"concurrencyToken": 3902238,
|
|
"name": "Awesome Cotton Keyboard 122",
|
|
"serial": 98,
|
|
"dollarAmount": 926.28,
|
|
"active": true,
|
|
"roles": 65536,
|
|
"startDate": "2020-01-08T15:51:11.298854Z",
|
|
"endDate": "2020-01-08T16:57:08.492466Z",
|
|
"notes": "Qui inventore dicta. In sit non ducimus doloremque iste quos aut dicta. At et impedit et. Nesciunt saepe voluptatem debitis sed.\n\nQuisquam rerum expedita omnis in sit eos itaque. Libero temporibus voluptatum laborum dolorem optio voluptas voluptates. Impedit voluptatem qui. Natus dolores maxime in harum.\n\nLibero dolor delectus. Molestiae praesentium quis autem ut. Neque dolore voluptatem omnis. Quo ut consequatur rem.",
|
|
"count": null,
|
|
"customFields": "{\"c1\":\"2019-11-05T04:23:27.6063023Z\",\"c2\":\"Commodi vitae neque sit alias cumque cupiditate. A quos dolorem qui est commodi voluptate aut facilis. Perspiciatis quasi doloribus aut autem expedita excepturi qui nesciunt officiis.\",\"c3\":98808200,\"c4\":true,\"c5\":0.369711980861478}",
|
|
"tags": [
|
|
"green",
|
|
"brown",
|
|
"zone-4"
|
|
]
|
|
},
|
|
{
|
|
"id": 97,
|
|
"concurrencyToken": 3902230,
|
|
"name": "Rustic Granite Pizza 121",
|
|
"serial": 97,
|
|
"dollarAmount": 742.41,
|
|
"active": true,
|
|
"roles": 4,
|
|
"startDate": "2020-01-08T15:45:02.554965Z",
|
|
"endDate": "2020-01-08T17:38:51.771714Z",
|
|
"notes": "Maiores rerum consequatur eligendi. Mollitia error consequuntur quis vitae. Itaque totam quae quisquam est autem. Sunt et id non cum aperiam doloremque et qui. Qui est dolores officia et dolorem consequuntur molestias blanditiis nostrum.\n\nItaque tenetur cupiditate tempora exercitationem rerum sunt. Vel sit reiciendis. Dolorem vero velit praesentium enim. Nam soluta sed et tempore sint officia at doloremque facilis. Numquam ut dicta aut alias et repellendus consequatur ducimus quod. Natus quis aspernatur ut quibusdam dolores.\n\nVelit libero labore. Fuga quasi quis veniam minima aut. Odio est ducimus consectetur mollitia hic necessitatibus quaerat. Asperiores et qui qui.",
|
|
"count": null,
|
|
"customFields": "{\"c1\":\"2020-11-09T04:44:19.7102148Z\",\"c2\":\"Quisquam qui iusto voluptatibus incidunt dolore. Placeat praesentium aperiam harum culpa quas repellat aut corporis dolor. Explicabo et voluptatem. Debitis aliquam illo dolor eius esse quaerat aliquid rerum qui. Officiis quis consectetur consequatur fuga numquam earum fuga.\",\"c3\":20027131,\"c4\":true,\"c5\":0.225979427446602}",
|
|
"tags": [
|
|
"brown",
|
|
"blue"
|
|
]
|
|
}
|
|
],
|
|
"paging": {
|
|
"count": 100,
|
|
"offset": 1,
|
|
"limit": 3,
|
|
"first": "http://localhost:7575/api/v8/Widget/ListWidgets?pageNo=1&pageSize=3",
|
|
"previous": null,
|
|
"next": "http://localhost:7575/api/v8/Widget/ListWidgets?pageNo=2&pageSize=3",
|
|
"last": "http://localhost:7575/api/v8/Widget/ListWidgets?pageNo=34&pageSize=3"
|
|
},
|
|
"columns":{
|
|
{name:"lt_client_name",datatype:text,ayatype:client},{name:"lt_client_notes",datatype:text},{name:"lt_last_workorder",datatype:number,ayatype:workorder}
|
|
}
|
|
}
|
|
|
|
|
|
{
|
|
"data": [
|
|
...all rows here ...
|
|
]
|
|
}
|
|
],
|
|
"paging": {
|
|
...paging data...
|
|
},
|
|
"columns":{
|
|
...column definitions ....
|
|
}
|
|
}
|
|
|
|
|
|
=-=-=-=-=-=-
|
|
PICKLIST FORMAT:
|
|
{
|
|
"data": [
|
|
{
|
|
"id": 93,
|
|
"name": "Awesome Cotton Sausages 117"
|
|
}
|
|
],
|
|
"paging": {
|
|
"count": 100,
|
|
"offset": 0,
|
|
"limit": 1,
|
|
"first": "http://localhost:7575/api/v8/Widget/PickList?pageNo=1&pageSize=1",
|
|
"previous": null,
|
|
"next": "http://localhost:7575/api/v8/Widget/PickList?pageNo=1&pageSize=1",
|
|
"last": "http://localhost:7575/api/v8/Widget/PickList?pageNo=100&pageSize=1"
|
|
}
|
|
}
|
|
|
|
...
|
|
|
|
LIST format:
|
|
|
|
|
|
Response body
|
|
Download
|
|
|
|
{
|
|
"data": [
|
|
{
|
|
"id": 100,
|
|
"concurrencyToken": 3903699,
|
|
"name": "Licensed Granite Cheese 124",
|
|
"serial": 100,
|
|
"dollarAmount": 764.57,
|
|
"active": true,
|
|
"roles": 8,
|
|
"startDate": "2020-01-13T11:54:35.30427Z",
|
|
"endDate": "2020-01-13T13:32:24.675256Z",
|
|
"notes": "Consequuntur odio itaque quaerat et aspernatur rerum quis. Nam et ex assumenda deleniti. Vel est eum non exercitationem doloremque eos. Nesciunt voluptas et.\n\nCupiditate voluptatem pariatur. Totam et velit labore fugiat repudiandae. Harum consequatur quaerat ducimus animi dolores repellat dolorum. Necessitatibus sapiente non eveniet fugiat. Soluta voluptatem nihil omnis. Quasi et saepe nulla alias illum dolorem necessitatibus ut veniam.\n\nId est ullam quis est velit esse accusantium voluptas consequatur. Nesciunt error ab hic officia ullam sit. Vel inventore voluptatibus nam iure aut velit ducimus repellendus enim. Quisquam consequatur unde.",
|
|
"count": null,
|
|
"customFields": "{\"c1\":\"2020-09-27T12:59:50.4196015Z\",\"c2\":\"Id voluptatem cum id veniam hic accusamus labore deserunt. Ut non et possimus maiores repudiandae quia ea. Harum quo eius dicta iste laborum culpa in cumque illo.\",\"c3\":41534342,\"c4\":true,\"c5\":0.081620920487503}",
|
|
"tags": [
|
|
"jade",
|
|
"brown",
|
|
"quince",
|
|
"zone-6",
|
|
"zone-7"
|
|
]
|
|
}
|
|
],
|
|
"paging": {
|
|
"count": 100,
|
|
"offset": 0,
|
|
"limit": 1,
|
|
"first": "http://localhost:7575/api/v8/Widget/ListWidgets?pageNo=1&pageSize=1",
|
|
"previous": null,
|
|
"next": "http://localhost:7575/api/v8/Widget/ListWidgets?pageNo=1&pageSize=1",
|
|
"last": "http://localhost:7575/api/v8/Widget/ListWidgets?pageNo=100&pageSize=1"
|
|
}
|
|
} |