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
17820fbd
Commit
17820fbd
authored
Feb 05, 2024
by
Owen Ryan Ang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extrafield update implem
parent
09e29e7a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
5 deletions
+44
-5
bpoService.js
WebGde/WebContent/WebGde-Widgets/BPO/bpoService.js
+7
-0
LoginJavaInterface.js
...bContent/WebGde-Widgets/LogInWidget/LoginJavaInterface.js
+1
-1
config.js
WebGde/WebContent/WebGde-Widgets/Submit/config.js
+2
-1
submit.js
WebGde/WebContent/WebGde-Widgets/Submit/submit.js
+32
-2
config.js
WebGde/WebContent/WebGde-Widgets/config.js
+2
-1
No files found.
WebGde/WebContent/WebGde-Widgets/BPO/bpoService.js
View file @
17820fbd
...
@@ -7,6 +7,7 @@ let urlGetWaitingElement = BPO_URL + `req/workers/{{USER_ID}}/nodes/${CURRENT_NO
...
@@ -7,6 +7,7 @@ let urlGetWaitingElement = BPO_URL + `req/workers/{{USER_ID}}/nodes/${CURRENT_NO
let
urlCompleteToNextNode
=
BPO_URL
+
`req/workers/{{USER_ID}}/nodes/
${
CURRENT_NODE
}
/{{ELEMENT_ID}}/?nextNodeId=
${
NEXT_NODE
}
`
let
urlCompleteToNextNode
=
BPO_URL
+
`req/workers/{{USER_ID}}/nodes/
${
CURRENT_NODE
}
/{{ELEMENT_ID}}/?nextNodeId=
${
NEXT_NODE
}
`
let
urlGetWorkersCurrentNode
=
BPO_URL
+
`req/nodes/
${
CURRENT_NODE
}
/workers`
let
urlGetWorkersCurrentNode
=
BPO_URL
+
`req/nodes/
${
CURRENT_NODE
}
/workers`
let
urlRejectElement
=
BPO_URL
+
`req/nodes/
${
CURRENT_NODE
}
/elements/{{elementId}}?newNodeId={{newNodeId}}`
;
let
urlRejectElement
=
BPO_URL
+
`req/nodes/
${
CURRENT_NODE
}
/elements/{{elementId}}?newNodeId={{newNodeId}}`
;
let
urlUpdateExtra
=
BPO_URL
+
`req/nodes/
${
CURRENT_NODE
}
/elements/{{elementId}}`
;
export
function
getUrlReturnElement
(
element_id
)
{
export
function
getUrlReturnElement
(
element_id
)
{
...
@@ -47,3 +48,8 @@ export function getRejectElement(){
...
@@ -47,3 +48,8 @@ export function getRejectElement(){
url
=
url
.
replace
(
"{{newNodeId}}"
,
EXCEPTION_NODE
);
url
=
url
.
replace
(
"{{newNodeId}}"
,
EXCEPTION_NODE
);
return
url
;
return
url
;
}
}
export
function
getUpdateExtra
(){
let
url
=
urlUpdateExtra
.
replace
(
"{{elementId}}"
,
sessionStorage
.
getItem
(
"element_id"
));
return
url
}
\ No newline at end of file
WebGde/WebContent/WebGde-Widgets/LogInWidget/LoginJavaInterface.js
View file @
17820fbd
...
@@ -18,7 +18,7 @@ export function loginGde(token) {
...
@@ -18,7 +18,7 @@ export function loginGde(token) {
console
.
log
(
"Bpo Domain:"
,
gde_bpo_domain
);
console
.
log
(
"Bpo Domain:"
,
gde_bpo_domain
);
console
.
log
(
"Node:"
,
gde_bpo_node
);
console
.
log
(
"Node:"
,
gde_bpo_node
);
initializeConfig
(
gde_domain
,
gde_bpo_domain
,
gde_bpo_node
);
initializeConfig
(
gde_domain
,
gde_bpo_domain
,
gde_bpo_node
);
createInfoModal
(
null
,
"OK"
,
"Success! Logged in as "
&
preferred_username
);
//
createInfoModal(null, "OK", "Success! Logged in as " & preferred_username);
initializeWebpage
();
initializeWebpage
();
// You can return these values or perform any other actions with them here
// You can return these values or perform any other actions with them here
...
...
WebGde/WebContent/WebGde-Widgets/Submit/config.js
View file @
17820fbd
export
const
PROJECT_CODE
=
"DSQC"
;
export
const
PROJECT_CODE
=
"DSQC"
;
export
const
ENCODING_PASS
=
"PASS1"
;
export
const
ENCODING_PASS
=
"PASS1"
;
export
const
GFS_URL
=
"http://107.20.193.188/gfs-explorer-ws/svc/gfs-rest/"
;
export
const
GFS_URL
=
"http://107.20.193.188/gfs-explorer-ws/svc/gfs-rest/"
;
export
const
TEMPORARY_FOLDER
=
"C:/Users/oang/Desktop/Mobile GDE/Elements"
;
export
const
TEMPORARY_FOLDER
=
"C:/Users/oang/Desktop/Mobile GDE/Elements"
;
export
const
GFS_ROOT_FOLDER
=
"/Users"
;
export
const
GFS_ROOT_FOLDER
=
"/Users"
;
\ No newline at end of file
WebGde/WebContent/WebGde-Widgets/Submit/submit.js
View file @
17820fbd
import
{
getUrlCompleteToNextNode
}
from
"../BPO/bpoService.js"
;
import
{
getU
pdateExtra
,
getU
rlCompleteToNextNode
}
from
"../BPO/bpoService.js"
;
import
{
saveForm
}
from
"../DataInputWidget/generateFields.js"
;
import
{
saveForm
}
from
"../DataInputWidget/generateFields.js"
;
import
{
checkValidValues
,
validateInput
,
validateReturnInput
}
from
"../DataInputWidget/validateInput.js"
;
import
{
checkValidValues
,
validateInput
,
validateReturnInput
}
from
"../DataInputWidget/validateInput.js"
;
import
{
goBackToElementListViewer
}
from
"../ElementListWidget/ElementListWidget.js"
;
import
{
goBackToElementListViewer
}
from
"../ElementListWidget/ElementListWidget.js"
;
import
{
uploadFile
}
from
"../FileUpload/fileUpload.js"
;
import
{
uploadFile
}
from
"../FileUpload/fileUpload.js"
;
import
{
createLoadingModal
,
removeLoadingModal
}
from
"../LoadingModal/LoadingModal.js"
;
import
{
createLoadingModal
,
removeLoadingModal
}
from
"../LoadingModal/LoadingModal.js"
;
import
{
IS_RETRIEVE_FROM_BPO
,
SHOW_ELEMENT_LIST_VIEWER
}
from
"../config.js"
;
import
{
IS_RETRIEVE_FROM_BPO
,
SHOW_ELEMENT_LIST_VIEWER
,
USERID_FIELD
}
from
"../config.js"
;
import
{
createConfirmationModal
,
createErrorModal
,
createInfoModal
}
from
"../genericPopup/genericPopup.js"
;
import
{
createConfirmationModal
,
createErrorModal
,
createInfoModal
}
from
"../genericPopup/genericPopup.js"
;
import
{
DISPLAY_FIELD_OBJECT
}
from
"../globalVariable.js"
;
import
{
DISPLAY_FIELD_OBJECT
}
from
"../globalVariable.js"
;
import
{
Settings
}
from
"./XMLWriter/Global.js"
;
import
{
Settings
}
from
"./XMLWriter/Global.js"
;
...
@@ -358,6 +358,7 @@ export async function createSubmitWindow(e) {
...
@@ -358,6 +358,7 @@ export async function createSubmitWindow(e) {
createInfoModal
(
null
,
'ok'
,
'Form Submitted.'
);
createInfoModal
(
null
,
'ok'
,
'Form Submitted.'
);
}
}
if
(
IS_RETRIEVE_FROM_BPO
===
"Y"
)
{
if
(
IS_RETRIEVE_FROM_BPO
===
"Y"
)
{
await
updateExtraDetails
(
sessionStorage
.
getItem
(
"user_id"
));
let
response
=
await
completeToNextNode
(
sessionStorage
.
getItem
(
"element_id"
));
let
response
=
await
completeToNextNode
(
sessionStorage
.
getItem
(
"element_id"
));
}
}
}
else
{
}
else
{
...
@@ -503,4 +504,32 @@ function createButtonElem(className, buttonName, icon) {
...
@@ -503,4 +504,32 @@ function createButtonElem(className, buttonName, icon) {
buttonElem
.
classList
.
add
(
className
);
buttonElem
.
classList
.
add
(
className
);
buttonElem
.
textContent
=
buttonName
;
buttonElem
.
textContent
=
buttonName
;
return
buttonElem
;
return
buttonElem
;
}
async
function
updateExtraDetails
(
userId
){
let
userIdFieldName
=
USERID_FIELD
;
let
requestJSON
=
{
"extraDetails"
:
{}
};
requestJSON
.
extraDetails
[
userIdFieldName
]
=
userId
;
const
authToken
=
sessionStorage
.
getItem
(
'token'
);
try
{
let
response
=
await
fetch
(
getUpdateExtra
(),
{
method
:
"PATCH"
,
headers
:
{
'Content-Type'
:
'application/json'
,
'Authorization'
:
`Bearer
${
authToken
}
`
},
body
:
JSON
.
stringify
(
requestJSON
)
});
if
(
!
response
.
ok
)
{
console
.
error
(
'Error while updating UserID'
,
error
);
}
return
response
;
}
catch
(
error
)
{
console
.
error
(
'Error while updating UserID'
,
error
);
}
}
}
\ No newline at end of file
WebGde/WebContent/WebGde-Widgets/config.js
View file @
17820fbd
...
@@ -32,7 +32,8 @@ export const NEXT_NODE = "Completed"
...
@@ -32,7 +32,8 @@ export const NEXT_NODE = "Completed"
export
const
EXCEPTION_NODE
=
"Exception"
export
const
EXCEPTION_NODE
=
"Exception"
export
const
SHOW_ELEMENT_LIST_VIEWER
=
"Y"
export
const
SHOW_ELEMENT_LIST_VIEWER
=
"Y"
export
const
ADD_NEW_OPTION
=
"N"
export
const
ADD_NEW_OPTION
=
"N"
export
const
DISPLAYED_DETAILS
=
"Extra1|Extra2|Extra3"
//pipe-delimited
export
const
DISPLAYED_DETAILS
=
"extra1|extra2|extra3"
//pipe-delimited
export
const
USERID_FIELD
=
"extra3"
export
const
PDF_EXTENSION
=
".pdf"
export
const
PDF_EXTENSION
=
".pdf"
export
const
JPG_EXTENSION
=
".jpg"
export
const
JPG_EXTENSION
=
".jpg"
...
...
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