Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
web-ui
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
WEBGDE-Components
web-ui
Commits
d3e9a81d
Commit
d3e9a81d
authored
Feb 09, 2023
by
Jorem Magcawas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix saving of xml
parent
071dfd76
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
54 deletions
+37
-54
returnElement.js
WebGde/WebContent/src/BPO/returnElement.js
+1
-2
getFields.js
WebGde/WebContent/src/getFields/getFields.js
+36
-52
No files found.
WebGde/WebContent/src/BPO/returnElement.js
View file @
d3e9a81d
...
@@ -56,8 +56,7 @@ async function returnElementBPO(elementId) {
...
@@ -56,8 +56,7 @@ async function returnElementBPO(elementId) {
async
function
returnElementLogout
(
elementId
)
{
async
function
returnElementLogout
(
elementId
)
{
let
response
=
await
fetch
(
getUrlReturnElement
(
elementId
),
{
method
:
"POST"
});
let
response
=
await
fetch
(
getUrlReturnElement
(
elementId
),
{
method
:
"POST"
});
if
(
response
.
status
==
200
)
{
if
(
response
.
status
==
200
)
{
returnSaveXML
();
//save xml
alert
(
'Element Returned'
);
alert
(
'Element Returned'
);
}
else
{
}
else
{
alert
(
`Error
${
response
.
status
}
: Returning element`
);
alert
(
`Error
${
response
.
status
}
: Returning element`
);
...
...
WebGde/WebContent/src/getFields/getFields.js
View file @
d3e9a81d
...
@@ -50,58 +50,42 @@ const displayFields = async (parentID) => {
...
@@ -50,58 +50,42 @@ const displayFields = async (parentID) => {
let
doctype
=
sessionStorage
.
getItem
(
'doctype'
);
let
doctype
=
sessionStorage
.
getItem
(
'doctype'
);
let
section
=
sessionStorage
.
getItem
(
'section'
);
let
section
=
sessionStorage
.
getItem
(
'section'
);
Object
.
keys
(
schema
).
every
(
function
(
key
)
{
if
(
doctype
==
null
&&
section
==
null
)
{
let
doctypes
=
schema
[
key
];
Object
.
keys
(
schema
).
every
(
function
(
key
)
{
sessionStorage
.
setItem
(
"currentDoctype"
,
key
);
let
doctypes
=
schema
[
key
];
const
{
valid
,
error
}
=
validateSchema
()
sessionStorage
.
setItem
(
"currentDoctype"
,
key
);
if
(
!
valid
){
const
{
div
.
textContent
=
error
valid
,
div
.
style
.
color
=
'#ff3333'
error
}
}
=
validateSchema
()
if
(
!
valid
)
{
for
(
let
key
in
doctypes
)
{
div
.
textContent
=
error
if
(
doctype
==
null
&&
section
==
null
)
{
div
.
style
.
color
=
'#ff3333'
sessionStorage
.
setItem
(
"currentSection"
,
key
);
}
createDocTypeDropdown
(
'DocType'
,
div
,
schema
);
for
(
let
key
in
doctypes
)
{
createSection
(
'Section'
,
div
,
doctypes
,
key
);
sessionStorage
.
setItem
(
"currentSection"
,
key
);
div
=
deconstruct
(
doctypes
[
key
],
div
,
key
)
createDocTypeDropdown
(
'DocType'
,
div
,
schema
);
createSection
(
'Section'
,
div
,
doctypes
,
key
);
/* const submit = document.createElement('input')
div
=
deconstruct
(
doctypes
[
key
],
div
,
key
)
submit.className = key;
return
false
;
submit.type = 'submit'
}
div.appendChild(submit)*/
});
return
false
;
}
else
{
}
let
doctypes
=
schema
[
doctype
];
}
sessionStorage
.
setItem
(
"currentDoctype"
,
doctype
);
return
true
;
const
{
});
valid
,
error
$
(
document
.
body
).
on
(
"change"
,
"#DocType"
,
function
(){
}
=
validateSchema
()
const
elements
=
document
.
getElementsByClassName
(
sessionStorage
.
getItem
(
"currentSection"
));
if
(
!
valid
)
{
while
(
elements
.
length
>
0
){
div
.
textContent
=
error
elements
[
0
].
parentNode
.
removeChild
(
elements
[
0
]);
div
.
style
.
color
=
'#ff3333'
}
}
sessionStorage
.
setItem
(
"currentSection"
,
section
);
let
doctypes
=
schema
[
this
.
value
];
createDocTypeDropdown
(
'DocType'
,
div
,
schema
);
sessionStorage
.
setItem
(
"currentDoctype"
,
this
.
value
);
createSection
(
'Section'
,
div
,
doctypes
,
section
);
const
{
valid
,
error
}
=
validateSchema
()
div
=
deconstruct
(
doctypes
[
section
],
div
,
section
)
if
(
!
valid
){
}
div
.
textContent
=
error
div
.
style
.
color
=
'#ff3333'
}
for
(
let
key
in
doctypes
)
{
sessionStorage
.
setItem
(
"currentSection"
,
key
);
createSection
(
'Section'
,
div
,
doctypes
,
key
);
div
=
deconstruct
(
doctypes
[
key
],
div
,
key
)
const
submit
=
document
.
createElement
(
'input'
)
submit
.
className
=
key
;
submit
.
type
=
'submit'
div
.
appendChild
(
submit
)
break
;
}
});
/* const { ACCOUNTING_DOCUMENTS } = schema
/* const { ACCOUNTING_DOCUMENTS } = schema
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment