Service - SitePage Config: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
(Created page with "= Overview = Manages configuration for site pages created by users that perform actions such as create/update objects = Repository = https://bitbucket.org/izara-core-shared/izara-core-shared-sitepage-config = DynamoDB tables = == SitePageConfigMain == <syntaxhighlight lang="JavaScript"> { sitePageConfigId: "xx", // {random uuid} sitePageConfig: "xx", // json encoded object of configuration sitePageConfigName: "yy", // user specified name of the config userId: "...")
 
No edit summary
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
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
// add css theme and overwrite settings
// standardize property names to match tableConfig structure (eg elementTypes)
rows: {
rowName: "xx",
groupings: [
{
rows: [
{
elements: [
{
elementType: "freeText",
text: "xx",
},
{
elementType: "objectField"
fieldName: "xx",
displaySetting: "xx", // "input"|"displayOnly" input is not available for calculatedData
},
{
elementType: "calculatedData",
dataTag: "xx"
},
{
elementType: "recalculateDataLink", // links to any calculatedData for th objectType
dataTag: "xx"
},
{
elementType: "submitButton",
text: "xx"
},
//...
]
},
//...
],
},
//...
],
},
//...
}
}
</syntaxhighlight>
</syntaxhighlight>
= Interaction with MenuConfig =
* 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 no identifierIds are sent to "displayObject" page then the page initially offers inputs to set the identifierIds (no pageElements shown)
= 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 =
= Working documents =

Revision as of 01:56, 9 June 2023

Overview

Manages configuration for site pages created by users that perform actions such as create/update objects

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

{
	pageType: "xx", // "createObject"|"displayObject"
	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
	// add css theme and overwrite settings
	// standardize property names to match tableConfig structure (eg elementTypes)
	rows: {
		rowName: "xx",
		groupings: [
			{
				rows: [
					{
						elements: [
							{
								elementType: "freeText",
								text: "xx",
							},
							{
								elementType: "objectField"
								fieldName: "xx",
								displaySetting: "xx", // "input"|"displayOnly" input is not available for calculatedData						
							},
							{
								elementType: "calculatedData",
								dataTag: "xx"
							},
							{
								elementType: "recalculateDataLink", // links to any calculatedData for th objectType
								dataTag: "xx"
							},
							{
								elementType: "submitButton",
								text: "xx"
							},
							//...
						]
					},
					//...
				],
			},
			//...
		],
	},
	//...
}

Interaction with MenuConfig

  • 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 no identifierIds are sent to "displayObject" page then the page initially offers inputs to set the identifierIds (no pageElements shown)

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