Service - SitePage Config: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
No edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Overview =
= Overview =


Manages configuration for site pages created by users that perform actions such as create/update objects
Manages configuration for site pages created by users that can include elements such as tables, forms to create/update objects, graphs, etc


= Repository =
= Repository =
Line 39: Line 39:
<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
{
{
pageType: "xx", // "createObject"|"displayObject"
pageName: "xx", // set by the creator of the page, displayed in setup pages eg menuConfig
pageName: "xx", // set by the creator of the page, displayed in setup pages eg menuConfig
objectSchema: { // this is a catchall objectType for any fieldNames that do not match columnNames filters, used with columnNames
serviceTag: "xxx",
objectType: "xxx",
},
// grouping/row/cell/elements structure same tableConfig
// grouping/row/cell/elements structure same tableConfig
// add css theme and overwrite settings
// add css theme and overwrite settings
// standardize property names to match tableConfig structure (eg elementTypes)
// standardize property names to match tableConfig structure (eg elementTypes)
rows: {
sections: [
rowName: "xx",
{
groupings: [
sectionName: "xx",
{
groupings: [
rows: [
{
{
groupingName: "xx",
elements: [
rows: [
{
{
elementType: "freeText",
rowName: "xx",
text: "xx",
cells: [
},
{
{
cellName: "xx",
elementType: "objectField"
elements: [
fieldName: "xx",
{
displaySetting: "xx", // "input"|"displayOnly" input is not available for calculatedData
pageElementType: "table", //"table"|"formObjectCreate"|"formObjectEdit"|"freeText"
},
tableConfigId: "tableConfigId_1",
{
//optional:
elementType: "calculatedData",
overwriteFilter: ""
dataTag: "xx"
},
},
{
{
pageElementType: "formObjectCreate",
elementType: "recalculateDataLink", // links to any calculatedData for th objectType
objectCreateConfigId: "formObjectCreateConfigId_1",
dataTag: "xx"
//objectType set in formObjectCreateConfig
},
},
{
{
elementType: "submitButton",
pageElementType: "formObjectEdit",
text: "xx"
objectFormConfigId: "formObjectEditConfigId_1",
},
//optional:
//...
identifiers: { // check structure with SeaGame
]
  xx: "yy",
},
  qq: "rr"
//...
}
],
//objectType set in formObjectEditConfig
},
},
//...
{
],
pageElementType: "freeText",
},
text: "xxx",
//...
},
]
},
// ..
]
},
//...
],
},
//...
],
},
//...
]
}
}
</syntaxhighlight>
</syntaxhighlight>
= Multiple pageElements on one page =
* any number of tables or forms can be shown on a single page, presented according to groupings/rows structure
* each table and form is independent from each other, so each form has it's own submission and submits independently from other forms
* each form receives it's identifiers independently, so each form will check if identifiers sent by menuConfig, if not will show inputs for them


= Interaction with MenuConfig =
= Interaction with MenuConfig =


* MenuElements set to sitePages link to a sitePageConfigId
* MenuElements set to sitePages link to a sitePageConfigId
* if sitePageConfigId is set to "displayObject" then menuConfig offers to set identifierIds, or eg a popup to enter the identifiers
* if sitePageConfig has any "objectForm"|"objectDisplay" pageElements then menuConfig offers to hardcode identifierIds, or eg a popup to enter the identifiers
* if no identifierIds are sent to "displayObject" page then the page initially offers inputs to set the identifierIds (no pageElements shown)
* if no identifierIds are sent to "objectForm"|"objectDisplay" page then the page initially offers inputs to set the identifierIds (no pageElements shown) for that pageElement


= Authorizers =
= Authorizers =

Latest revision as of 05:21, 7 July 2023

Overview

Manages configuration for site pages created by users that can include elements such as tables, forms to create/update objects, graphs, etc

Repository

https://bitbucket.org/izara-core-shared/izara-core-shared-sitepage-config

DynamoDB tables

SitePageConfigMain

{
	sitePageConfigId: "xx", // {random uuid}
	sitePageConfig: "xx", // json encoded object of configuration
	sitePageConfigName: "yy", // user specified name of the config
	userId: "xx"
}
  • partition key: sitePageConfigId
  • sort key: {none}

UsersSitePageConfigs

{
	userId: "xx" // user who owns the sitePageConfig
	sitePageConfigId: "xx",
}
  • partition key: userId
  • sort key: sitePageConfigId

sitePageConfig Object

{
	pageName: "xx", // set by the creator of the page, displayed in setup pages eg menuConfig
	
	// grouping/row/cell/elements structure same tableConfig
	// add css theme and overwrite settings
	// standardize property names to match tableConfig structure (eg elementTypes)
	sections: [
		{
			sectionName: "xx",
			groupings: [
				{
					groupingName: "xx",
					rows: [
						{
							rowName: "xx",
							cells: [
								{
									cellName: "xx",
									elements: [
										{
											pageElementType: "table", //"table"|"formObjectCreate"|"formObjectEdit"|"freeText"
											tableConfigId: "tableConfigId_1",
											//optional:
											overwriteFilter: ""
										},
										{
											pageElementType: "formObjectCreate",
											objectCreateConfigId: "formObjectCreateConfigId_1",
											//objectType set in formObjectCreateConfig
										},
										{
											pageElementType: "formObjectEdit",
											objectFormConfigId: "formObjectEditConfigId_1",
											//optional:
											identifiers: { // check structure with SeaGame
											  xx: "yy",
											  qq: "rr"
											}
											//objectType set in formObjectEditConfig
										},
										{
											pageElementType: "freeText",
											text: "xxx",
										},					
									]
								},
								// ..
							]
						},
						//...
					],
				},
				//...
			],
		},
		//...
	]
}

Multiple pageElements on one page

  • any number of tables or forms can be shown on a single page, presented according to groupings/rows structure
  • each table and form is independent from each other, so each form has it's own submission and submits independently from other forms
  • each form receives it's identifiers independently, so each form will check if identifiers sent by menuConfig, if not will show inputs for them

Interaction with MenuConfig

  • MenuElements set to sitePages link to a sitePageConfigId
  • if sitePageConfig has any "objectForm"|"objectDisplay" pageElements then menuConfig offers to hardcode identifierIds, or eg a popup to enter the identifiers
  • if no identifierIds are sent to "objectForm"|"objectDisplay" page then the page initially offers inputs to set the identifierIds (no pageElements shown) for that pageElement

Authorizers

  • after have identifierIds we can pull the data for that object
  • also need to pull the targetId for any authorizer which will need to be sent with submissions
  • might be cases where we can edit appLevel objects? In which case tagetId not required

Create or Display/Update multiple linked objects

  • considering having new pageTypes that hook into ImportData flow for creating multiple objects according to object relationships
  • basic "createObject"|"displayObject" pages send directly to service that is responsible for objectType to perform the action
  • multiple linked object submission will format request and send to ImportData which creates PendingObject/Links and processes accordingly

Working documents

SitePage Config