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
be7a80c7
Commit
be7a80c7
authored
Sep 03, 2024
by
Owen Ryan Ang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inherit changes of bpo enabled to bpo enabled
parent
1d8f7f87
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
187 additions
and
31 deletions
+187
-31
rejectElement.js
WebContent/NoBpo/WebGde-Widgets/BPO/rejectElement.js
+43
-27
generateFields.js
...nt/NoBpo/WebGde-Widgets/DataInputWidget/generateFields.js
+6
-0
config.js
WebContent/NoBpo/WebGde-Widgets/config.js
+1
-1
REG-INP.json
WebContent/NoBpo/WebGde-Widgets/sample_schema/REG-INP.json
+2
-2
motoxps.json
WebContent/NoBpo/WebGde-Widgets/sample_schema/motoxps.json
+131
-0
rejectElement.js
WebContent/WebGde-Widgets/BPO/rejectElement.js
+4
-1
No files found.
WebContent/NoBpo/WebGde-Widgets/BPO/rejectElement.js
View file @
be7a80c7
import
{
resetGDE
}
from
"../../script.js"
;
import
{
submitElementToSqLite
}
from
"../DataInputWidget/AndroidInterface/androidInterface.js"
;
import
{
getDeviceId
,
submitElementToSqLite
}
from
"../DataInputWidget/AndroidInterface/androidInterface.js"
;
import
{
SCHEMA_FILE_PATH
}
from
"../DataInputWidget/config.js"
;
import
{
schema
}
from
"../DataInputWidget/generateFields.js"
;
import
{
validateInput
}
from
"../DataInputWidget/validateInput.js"
;
import
{
goBackToElementListViewer
}
from
"../ElementListWidget/ElementListWidget.js"
;
import
{
createLoadingModal
,
removeLoadingModal
}
from
"../LoadingModal/LoadingModal.js"
;
...
...
@@ -310,33 +311,48 @@ function saveExceptionToXml(){
section
=
element
.
options
[
element
.
selectedIndex
].
text
;
continue
;
}
}
let
xmlData
=
{
"projCode"
:
PROJECT_CODE
,
"userId"
:
sessionStorage
.
getItem
(
"user_id"
),
"elementId"
:
elementId
,
"schema"
:
SCHEMA_FILE_PATH
,
"totalRec"
:
1
,
"maxRec"
:
"1"
,
"totalKeystroke"
:
0
,
"procTime"
:
""
,
"procDuration"
:
0
,
"eob"
:
""
,
"exceptionRemark"
:
selected
,
"recordNo"
:
"1"
,
"totalSubRec"
:
"1"
,
"maxSubRec"
:
"1"
,
"imageName"
:
""
,
"subRecordNo"
:
"1"
,
"eor"
:
"N"
,
"fields"
:
{},
"outputDir"
:
sessionStorage
.
getItem
(
"element_file_loc"
)
+
"/"
+
(
ENCODING_PASS
==
"PASS1"
?
elementId
+
".DTA"
:
elementId
+
".DTB"
),
"doctype"
:
doctype
,
"section"
:
section
}
}
const
lookup
=
schema
[
doctype
][
section
]
var
Frm
=
document
.
getElementById
(
"fields"
);
var
Nodes
=
Frm
.
elements
;
let
fields
=
{};
for
(
var
i
=
0
;
i
<
Nodes
.
length
;
i
++
)
{
var
element
=
Nodes
[
i
];
if
(
element
.
classList
.
contains
(
'deviceid'
)){
let
fid
=
Nodes
[
i
].
id
;
let
key
=
Object
.
keys
(
lookup
[
fid
]).
includes
(
'aka'
)
?
lookup
[
fid
].
aka
.
replace
(
"field"
,
""
)
:
fid
;
fields
[
key
]
=
Nodes
[
i
].
value
;
}
}
let
xmlData
=
{
"projCode"
:
PROJECT_CODE
,
"userId"
:
sessionStorage
.
getItem
(
"user_id"
),
"elementId"
:
elementId
,
"schema"
:
SCHEMA_FILE_PATH
,
"totalRec"
:
1
,
"maxRec"
:
"1"
,
"totalKeystroke"
:
0
,
"procTime"
:
""
,
"procDuration"
:
0
,
"eob"
:
""
,
"exceptionRemark"
:
selected
,
"recordNo"
:
"1"
,
"totalSubRec"
:
"1"
,
"maxSubRec"
:
"1"
,
"imageName"
:
""
,
"subRecordNo"
:
"1"
,
"eor"
:
"N"
,
"fields"
:
fields
,
"outputDir"
:
sessionStorage
.
getItem
(
"element_file_loc"
)
+
"/"
+
(
ENCODING_PASS
==
"PASS1"
?
elementId
+
".DTA"
:
elementId
+
".DTB"
),
"doctype"
:
doctype
,
"section"
:
section
}
return
updateXMLException
(
xmlData
);
return
updateXMLException
(
xmlData
);
// return false;
}
...
...
WebContent/NoBpo/WebGde-Widgets/DataInputWidget/generateFields.js
View file @
be7a80c7
...
...
@@ -2466,6 +2466,12 @@ export async function populateFields(inputFieldData) {
console
.
log
(
"key = "
+
key
+
", value ="
+
v
);
//console.log("validation: " + schema[doctype][section][key].validation.collection);
if
(
v
===
"null"
)
{
v
=
""
;
}
else
if
(
v
==
null
&&
schema
[
doctype
][
section
][
key
].
validation
.
collection
===
'numeric'
)
{
v
=
0
;
}
fields
[
"field"
+
k
]
=
v
;
if
(
schema
[
doctype
][
section
][
key
].
hidden
)
{
...
...
WebContent/NoBpo/WebGde-Widgets/config.js
View file @
be7a80c7
...
...
@@ -27,7 +27,7 @@ export const IS_RETRIEVE_FROM_BPO = "N"
export
let
BPO_URL
=
DOMAIN
+
"bpo/"
;
export
let
CURRENT_NODE
=
""
export
const
ENCODING_PASS
=
"PASS1"
export
const
PROD_OUTPUT_UNIT
=
"
INSPECTION
"
export
const
PROD_OUTPUT_UNIT
=
"
DOC
"
export
const
NEXT_NODE
=
"INSPECTED"
export
const
EXCEPTION_NODE
=
"CANCELLED"
export
const
SHOW_ELEMENT_LIST_VIEWER
=
"N"
...
...
WebContent/NoBpo/WebGde-Widgets/sample_schema/REG-INP.json
View file @
be7a80c7
...
...
@@ -65,8 +65,8 @@
"fieldLabel"
:
"Business Permit No."
,
"aka"
:
"field7"
,
"validation"
:
{
"fieldLength"
:
1
0.0
,
"collection"
:
"numeric"
,
"fieldLength"
:
3
0.0
,
"collection"
:
"
alpha
numeric"
,
"mandatory"
:
true
},
"readOnly"
:
true
...
...
WebContent/NoBpo/WebGde-Widgets/sample_schema/motoxps.json
0 → 100644
View file @
be7a80c7
{
"_attributes"
:
{
"readOnly"
:
false
,
"docTypeHidden"
:
true
,
"sectionHidden"
:
true
},
"DOCUMENT"
:
{
"Section"
:
{
"del_receipt1"
:
{
"fieldLabel"
:
"Delivery Receipt Page 1"
,
"aka"
:
"field2"
,
"validation"
:
{
"fieldLength"
:
1.0
,
"collection"
:
"image-capture"
,
"validDate"
:
""
,
"mandatory"
:
false
}
},
"del_receipt2"
:
{
"fieldLabel"
:
"Delivery Receipt Page 2"
,
"aka"
:
"field3"
,
"validation"
:
{
"fieldLength"
:
1.0
,
"collection"
:
"image-capture"
,
"validDate"
:
""
,
"mandatory"
:
false
}
},
"del_receipt3"
:
{
"fieldLabel"
:
"Delivery Receipt Page 3"
,
"aka"
:
"field4"
,
"validation"
:
{
"fieldLength"
:
1.0
,
"collection"
:
"image-capture"
,
"validDate"
:
""
,
"mandatory"
:
false
}
},
"buyer_info"
:
{
"fieldLabel"
:
"Buyer Information Sheet"
,
"aka"
:
"field5"
,
"validation"
:
{
"fieldLength"
:
1.0
,
"collection"
:
"image-capture"
,
"validDate"
:
""
,
"mandatory"
:
false
}
},
"ltms1"
:
{
"fieldLabel"
:
"LTMS Page 1"
,
"aka"
:
"field6"
,
"validation"
:
{
"fieldLength"
:
1.0
,
"collection"
:
"file-upload"
,
"validDate"
:
""
,
"mandatory"
:
false
}
},
"ltms2"
:
{
"fieldLabel"
:
"LTMS Page 2"
,
"aka"
:
"field7"
,
"validation"
:
{
"fieldLength"
:
1.0
,
"collection"
:
"file-upload"
,
"validDate"
:
""
,
"mandatory"
:
false
}
},
"sales_invoice"
:
{
"fieldLabel"
:
"Sales Invoice"
,
"aka"
:
"field8"
,
"validation"
:
{
"fieldLength"
:
1.0
,
"collection"
:
"image-capture"
,
"validDate"
:
""
,
"mandatory"
:
false
}
},
"ctpl"
:
{
"fieldLabel"
:
"CTPL"
,
"aka"
:
"field9"
,
"validation"
:
{
"fieldLength"
:
1.0
,
"collection"
:
"image-capture"
,
"validDate"
:
""
,
"mandatory"
:
false
}
},
"affidavit"
:
{
"fieldLabel"
:
"Affidavit of Sidecar Attachment"
,
"aka"
:
"field10"
,
"validation"
:
{
"fieldLength"
:
1.0
,
"collection"
:
"image-capture"
,
"validDate"
:
""
,
"mandatory"
:
false
}
},
"loan_form1"
:
{
"fieldLabel"
:
"Loan Application Form Page 1"
,
"aka"
:
"field11"
,
"validation"
:
{
"fieldLength"
:
1.0
,
"collection"
:
"image-capture"
,
"validDate"
:
""
,
"mandatory"
:
false
}
},
"loan_form2"
:
{
"fieldLabel"
:
"Loan Application Form Page 2"
,
"aka"
:
"field12"
,
"validation"
:
{
"fieldLength"
:
1.0
,
"collection"
:
"image-capture"
,
"validDate"
:
""
,
"mandatory"
:
false
}
},
"loan_form3"
:
{
"fieldLabel"
:
"Loan Application Form Page 3"
,
"aka"
:
"field13"
,
"validation"
:
{
"fieldLength"
:
1.0
,
"collection"
:
"image-capture"
,
"validDate"
:
""
,
"mandatory"
:
false
}
}
}
}
}
WebContent/WebGde-Widgets/BPO/rejectElement.js
View file @
be7a80c7
import
{
resetGDE
}
from
"../../script.js"
;
import
{
getDeviceId
,
submitElementToSqLite
}
from
"../DataInputWidget/AndroidInterface/androidInterface.js"
;
import
{
SCHEMA_FILE_PATH
}
from
"../DataInputWidget/config.js"
;
import
{
schema
}
from
"../DataInputWidget/generateFields.js"
;
import
{
validateInput
}
from
"../DataInputWidget/validateInput.js"
;
import
{
goBackToElementListViewer
}
from
"../ElementListWidget/ElementListWidget.js"
;
import
{
createLoadingModal
,
removeLoadingModal
}
from
"../LoadingModal/LoadingModal.js"
;
...
...
@@ -310,7 +311,9 @@ function saveExceptionToXml(){
section
=
element
.
options
[
element
.
selectedIndex
].
text
;
continue
;
}
}
}
const
lookup
=
schema
[
doctype
][
section
]
var
Frm
=
document
.
getElementById
(
"fields"
);
var
Nodes
=
Frm
.
elements
;
...
...
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