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
d8f95776
Commit
d8f95776
authored
Feb 05, 2024
by
Owen Ryan Ang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-WG-490' into 'feature-QC'
extrafield update implem See merge request
!85
parents
c3340999
303e0609
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
4 deletions
+43
-4
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
+1
-0
No files found.
WebGde/WebContent/WebGde-Widgets/BPO/bpoService.js
View file @
d8f95776
...
...
@@ -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
urlGetWorkersCurrentNode
=
BPO_URL
+
`req/nodes/
${
CURRENT_NODE
}
/workers`
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
)
{
...
...
@@ -47,3 +48,8 @@ export function getRejectElement(){
url
=
url
.
replace
(
"{{newNodeId}}"
,
EXCEPTION_NODE
);
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 @
d8f95776
...
...
@@ -18,7 +18,7 @@ export function loginGde(token) {
console
.
log
(
"Bpo Domain:"
,
gde_bpo_domain
);
console
.
log
(
"Node:"
,
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
();
// You can return these values or perform any other actions with them here
...
...
WebGde/WebContent/WebGde-Widgets/Submit/config.js
View file @
d8f95776
export
const
PROJECT_CODE
=
"DSQC"
;
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
GFS_ROOT_FOLDER
=
"/Users"
;
\ No newline at end of file
WebGde/WebContent/WebGde-Widgets/Submit/submit.js
View file @
d8f95776
import
{
getUrlCompleteToNextNode
}
from
"../BPO/bpoService.js"
;
import
{
getU
pdateExtra
,
getU
rlCompleteToNextNode
}
from
"../BPO/bpoService.js"
;
import
{
saveForm
}
from
"../DataInputWidget/generateFields.js"
;
import
{
checkValidValues
,
validateInput
,
validateReturnInput
}
from
"../DataInputWidget/validateInput.js"
;
import
{
goBackToElementListViewer
}
from
"../ElementListWidget/ElementListWidget.js"
;
import
{
uploadFile
}
from
"../FileUpload/fileUpload.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
{
DISPLAY_FIELD_OBJECT
}
from
"../globalVariable.js"
;
import
{
Settings
}
from
"./XMLWriter/Global.js"
;
...
...
@@ -358,6 +358,7 @@ export async function createSubmitWindow(e) {
createInfoModal
(
null
,
'ok'
,
'Form Submitted.'
);
}
if
(
IS_RETRIEVE_FROM_BPO
===
"Y"
)
{
await
updateExtraDetails
(
sessionStorage
.
getItem
(
"user_id"
));
let
response
=
await
completeToNextNode
(
sessionStorage
.
getItem
(
"element_id"
));
}
}
else
{
...
...
@@ -503,4 +504,32 @@ function createButtonElem(className, buttonName, icon) {
buttonElem
.
classList
.
add
(
className
);
buttonElem
.
textContent
=
buttonName
;
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 @
d8f95776
...
...
@@ -33,6 +33,7 @@ export const EXCEPTION_NODE = "Exception"
export
const
SHOW_ELEMENT_LIST_VIEWER
=
"Y"
export
const
ADD_NEW_OPTION
=
"N"
export
const
DISPLAYED_DETAILS
=
"extra1|extra2|extra3"
//pipe-delimited
export
const
USERID_FIELD
=
"extra3"
export
const
PDF_EXTENSION
=
".pdf"
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