@@ -127,6 +127,8 @@ export const DocumentControlProvider = ({children}) => {
127127 // only if I'm in change request mode
128128 // I do not need to reload because the schema can not change
129129 if ( ! currentChangeRequest || frames === null ) getUpdatedFrames ( )
130+ // we need in edit/insert
131+ if ( ! currentChangeRequest || documentTablesConfig === null ) getGraphqlTableConfig ( )
130132 if ( id ) {
131133 let documentID = decodeUrl ( id )
132134 getDocument ( documentID )
@@ -253,51 +255,6 @@ export const DocumentControlProvider = ({children}) => {
253255 } finally { setLoading ( false ) }
254256 }
255257
256- // function to format and display errors in document Interface
257- /* function formatErrorMessages (error) {
258-
259- if(!error.hasOwnProperty("api:message")) return error
260-
261- let message = error["api:message"]
262- let errorElements = []
263- if(error["api:error"]) {
264- if(Array.isArray(error["api:error"]["api:witnesses"])) {
265- error["api:error"]["api:witnesses"].map(err => {
266-
267- if(err.hasOwnProperty("constraint_name")) {
268- // CONSTRAINT ERRORS
269- let propertyName = err["constraint_name"]
270- let errorType = `${err["@type "]} on `
271- let message = err.message
272-
273- errorElements.push(
274- <DisplayErrorPerProperty propertyName={propertyName} message={message} errorType={errorType}/>
275- )
276- }
277- else {
278- if(err.hasOwnProperty("@type ")) {
279- errorElements.push(
280- <pre>{JSON.stringify(err, null, 2)}</pre>
281- )
282- }
283- else {
284- // OTHER TYPE ERRORS
285- for(let items in err) {
286- let propertyName = items
287- let errorType = err[propertyName].hasOwnProperty("@type ") ? `${err[propertyName]["@type "]} on ` : `Error occured on`
288- let message = JSON.stringify(err[propertyName], null, 2)
289- errorElements.push(
290- <DisplayErrorPerProperty propertyName={propertyName} message={message} errorType={errorType}/>
291- )
292- }
293- }
294- }
295- })
296- }
297- }
298- return <ErrorDisplay errorData={errorElements} message={message} css={CONST.ERROR_MORE_INFO_CLASSNAME}/>
299- }*/
300-
301258 return (
302259 < DocumentControlContext . Provider
303260 value = { {
0 commit comments