Commit dd374a8a by Owen Ryan Ang

Added implementation for checkbox and radiolist. Config cleanup

parent a43103ae
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="Payara Server 5 (5.2022.2)"/>
<runtime name="Payara Server 5 (5.2022.5)"/>
<fixed facet="jst.web"/>
<fixed facet="java"/>
<fixed facet="wst.jsdt.web"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Web-GDE</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Ending session...</title>
</head>
<body>
<div class="dv_body">
<div class="content">
<div class="panel-widget" style="display: flex;justify-content: center;padding: 100px 0;">
<div class="panel-body">
<div class="logout-icon">
<img src="https://static.vecteezy.com/system/resources/thumbnails/000/593/212/small/40_350.jpg" width="200px" height="200px" alt="logout icon" style="display: block;margin-left: auto;margin-right: auto;width: 50%;">
</div>
<h1 style="text-align: center;font-family: sans-serif; font-size: 36px;color: rgb(54,54,54); max-width: 500px; min-width: 100px;">Session has been successfully ended</h1>
<h3 style="text-align: center;font-family: sans-serif;color: rgb(54,54,54); max-width: 500px; min-width: 100px;">Thank you for using GDE Tool</h3>
<h5 style="text-align: center;font-family: sans-serif;color: rgb(54,54,54); max-width: 500px; min-width: 100px;">Please click <a href="./login.html">here</a> to return to the GDE Login</h5>
</div>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
/**
* for testing purposes, below are different files to be used showing
* some possible configurations of the file
*/
// schema with no "SECTION" key
// const SCHEMA_FILE = "./src/sample_schema/no_section.json"
// schema with missing fields (fieldLabel, validation)
// const SCHEMA_FILE = "./src/sample_schema/missing_fields.json"
// schema with 20 fields
// const SCHEMA_FILE = "./src/sample_schema/20_field_schema.json"
// schema with 15 fields
// const SCHEMA_FILE = "./src/sample_schema/15_field_schema.json"
// schema with 10 fields
// const SCHEMA_FILE = "./src/sample_schema/10_field_schema.json"
// schema with 5 fields and all possible collections
//const SCHEMA_FILE = "./src/sample_schema/5_field_schema.json"
/*var SCHEMA_FILE = "./src/sample_schema/SC Schema.json"*/
var SCHEMA_FILE = "./src/sample_schema/HR Speed Test schema.json"
//const INPUT_FILES = ["./input/Ong, Mae Janica - Application Form.TIFF","./input/Magalona, Rowell James - Application Form.TIFF","./input/Felizardo, Brylle Theodure - Application Form.TIFF","./input/Laxamana, Conrad John - Application Form.TIFF"] // list of URLs
var INPUT_FOLDER = "./input/"
var OUTPUT_FILES = "../../output/"
var METRIC_FILES = "../../metrics/"
var HIGH_LIGHT_SCHEMA = "./src/highlight/dbSchema_anno.xlsx"
//this determines if the images will be retrieved from the gfs
var DOMAIN = "http://18.208.163.99:8080"
var CONTEXTROOT = "gfs-explorer-ws"
var GFS_URL = "http://18.208.163.99:8080" + "/WebGdeDev/svc/gfs-rest"
var FOLDER_URL = DOMAIN + "/" + CONTEXTROOT + "/svc/gfs-rest/get-folder?parentPath=/Users/"
var DOWNLOAD_URL = DOMAIN + "/" + CONTEXTROOT + "/svc/gfs-rest/get-download-link"
var IS_RETRIEVE_FROM_GFS = "N"
var INVALID_KEYS = "F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12,PrintScreen,ScrollLock,Pause,PageUp,PageDown,Insert,Delete,Control"
//BPO CONFIG
var IS_RETRIEVE_FROM_BPO = "Y"
var BPO_URL = "http://18.208.163.99:8080/bpo/"
var CURRENT_NODE = "Web GDE"
var ENCODING_PASS = "PASS1"
var NEXT_NODE = "Complete"
var EXCEPTION_NODE = "Exception"
var PDF_EXTENSION = ".pdf"
var JPG_EXTENSION = ".jpg"
var PNG_EXTENSION = ".png"
var REASON_LIST = "Reason1,Reason2,Reason3,Reason4"
//KEYCLOAK CONFIG
const REDIRECT_URL = 'http://auth-server/auth/realms/GFS/protocol/openid-connect/logout?redirect_uri=encodedRedirectUri';
var credObj =
[
{
"username": "worker1",
"password": "passw0rd"
},
{
"username": "sample2",
"password": "passw0rd"
},
{
"username": "sample3",
"password": "passw0rd"
},
{
"username": "demo",
"password": "passw0rd"
}
];
\ No newline at end of file
const disableTiffButtons = () => {
var element = document.getElementById("TiffViewer_ButtonContainer");
element.style.visibility = 'hidden';
}
const enableTiffButtons = () => {
var element = document.getElementById("TiffViewer_ButtonContainer");
element.style.visibility = 'visible';
}
\ No newline at end of file
Body {
font-family: Calibri, Helvetica, sans-serif;
background-color: rgb(255, 255, 255);
}
.main-div{
margin: 0;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
button{
background-color: #EB9B3E;
width: 100%;
color: rgb(0, 0, 0);
padding: 15px;
margin: 10px 0px;
border: none;
cursor: pointer;
}
input[type=text], input[type=password] {
width: 100%;
margin: 8px 0;
padding: 12px 20px;
display: inline-block;
border: 2px solid #ff8800;
box-sizing: border-box;
}
button:hover {
background-color: #ff8800;
}
.cancelbtn {
width: auto;
padding: 10px 18px;
margin: 10px 5px;
}
.container {
padding: 25px;
background-color: #0F2853;
max-width: 600px;
border: 3px solid #0F2853;
color:white;
}
.popup{
display:none;
margin: 0;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 9999;
width: 700px;
background-color: white;
padding: 20px;
border: 1px solid rgb(179, 176, 176);
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title> Login Page </title>
<link rel="stylesheet" href="./login.css">
<script src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script src="./src/fetchConfig/fetchConfig.js"></script>
<script>
if(sessionStorage.getItem('user_id') !== null ) {
window.location.href = "./index.html";
} else {
fetchConfig();
}
</script>
</head>
<body>
<div class="main-div">
<form name="loginForm">
<div class="container">
<h2><center>Sign in to your account</center></h2>
<label>Username : </label>
<input type="text" placeholder="Enter Username" name="username" id="username" required>
<label>Password : </label>
<input type="password" placeholder="Enter Password" name="password" id="password" required>
<button type="button" onclick="validateForm(); return false; ">Sign in</button>
<input type="checkbox" checked="checked"> Remember me
</div>
</form>
</div>
<div class="popup" id="popup">
<div>
<p>Minimum display must be 1366x768</p>
<p>Use "Chrome" Browser for this app</p>
<p>Additional Req: Use Keyboard with Num Pad</p>
</div>
<div>
<button type="button" onclick="hideNotice(); return false; ">Ok</button>
</div>
</div>
</body>
<script src="./config.js"></script>
<script src="./creds.js"></script>
<script src="./script.js"></script>
</html>
\ No newline at end of file
record_no,filename,speed,eoe_timestamp,avg_speed
1,0001SVI_0037.tif,10796.401199600134,1/9/2023 4:50:33 PM,10796.401199600134
\ No newline at end of file
record_no,filename,speed,eoe_timestamp,avg_speed
1,0001SVI_0037.tif,5435.393258426966,1/9/2023 4:54:50 PM,5435.393258426966
\ No newline at end of file
record_no,filename,speed,eoe_timestamp,avg_speed
1,0001SVI_0037.tif,9446.06413994169,1/10/2023 11:08:43 AM,9446.06413994169
2,0001SVI_0038.tif,10027.855153203343,1/10/2023 11:39:04 AM,9736.959646572517
\ No newline at end of file
const ALLOWED_KPH = 8000;
const ALLOWED_DIMENSION_WIDTH = 1366;
const ALLOWED_DIMENSION_HEIGHT = 728;
const ALLOWED_BROWSERS = "Chrome";
var PROJECT_CODE = "PROJCODE01";
\ No newline at end of file
function getWindowWidth(){
return window.outerWidth;
}
function getWindowHeight(){
return window.outerHeight;
}
console.log(getWindowWidth() + "x" + getWindowHeight());
console.log(getBrowserName());
function validateForm() {
const reqWindowWidth = ALLOWED_DIMENSION_WIDTH;
const reqWindowHeight = ALLOWED_DIMENSION_HEIGHT;
const reqBrowser = ALLOWED_BROWSERS;
var windowWidth = getWindowWidth();
var windowHeight = getWindowHeight();
var browser = getBrowserName();
var un = document.forms['loginForm'].elements['username'].value
var pw = document.forms['loginForm'].elements['password'].value
var isGranted = true;
if(windowWidth >= reqWindowWidth && windowHeight >= reqWindowHeight && browser == reqBrowser){
for (let i = 0; i < credObj.length; i++) {
// console.log(credObj[i].username + " " + credObj[i].password);
if ((un == credObj[i].username) && (pw == credObj[i].password)) {
sessionStorage.setItem('user_id', un);
window.location = "index.html";
return false;
}
else {
isGranted = false;
}
}
console.log(isGranted);
if(isGranted == false){
alert ("Login denied, please check your username and password");
}
}
else{
showNotice();
}
}
function showNotice(){
var popup = document.getElementById('popup');
popup.style.display = 'block';
}
function hideNotice(){
var popup = document.getElementById('popup');
popup.style.display = 'none';
}
function getBrowserName(){
var nVer = navigator.appVersion;
var nAgt = navigator.userAgent;
var browserName = navigator.appName;
var fullVersion = ''+parseFloat(navigator.appVersion);
var majorVersion = parseInt(navigator.appVersion,10);
var nameOffset,verOffset,ix;
let ieCheck = /Edg/.test(navigator.userAgent);
// In Opera, the true version is after "Opera" or after "Version"
if ((verOffset=nAgt.indexOf("Opera"))!=-1) {
browserName = "Opera";
}
if ((verOffset=nAgt.indexOf("Version"))!=-1){
}
//In Edge, the true version is after "Edge"
if (ieCheck) {
browserName = "Edge";
}
//If Opera
var isChromium = window.chrome,
isOpera = window.navigator.userAgent.indexOf("OPR") > -1 || window.navigator.userAgent.indexOf("Opera") > -1;
if(isChromium !== null && isOpera == true) {
browserName = "Opera";
}
// In MSIE, the true version is after "MSIE" in userAgent
else if ((verOffset=nAgt.indexOf("MSIE"))!=-1) {
browserName = "Microsoft Internet Explorer";
}
// In Chrome, the true version is after "Chrome"
else if ((verOffset=nAgt.indexOf("Chrome"))!=-1) {
browserName = "Chrome";
}
// In Safari, the true version is after "Safari" or after "Version"
else if ((verOffset=nAgt.indexOf("Safari"))!=-1) {
browserName = "Safari";
}
// In Firefox, the true version is after "Firefox"
else if ((verOffset=nAgt.indexOf("Firefox"))!=-1) {
browserName = "Firefox";
}
// In most other browsers, "name/version" is at the end of userAgent
else if ( (nameOffset=nAgt.lastIndexOf(' ')+1) < (verOffset=nAgt.lastIndexOf('/')) ) {
browserName = nAgt.substring(nameOffset,verOffset);
if (browserName.toLowerCase()==browserName.toUpperCase()) {
browserName = navigator.appName;
}
}
return browserName;
}
\ No newline at end of file
let urlReturnElement = BPO_URL + `req/workers/{{USER_ID}}/nodes/${CURRENT_NODE}/{{ELEMENT_ID}}/return`;
let urlGetWorkload= BPO_URL + `req/workers/{{USER_ID}}/nodes/${CURRENT_NODE}/workload?sort=priority`;
let urlGetReturnedElement = BPO_URL + `req/workers/{{USER_ID}}/nodes/${CURRENT_NODE}/returned-elements/{{ELEMENT_ID}}`;
let urlGetWaitingElement = BPO_URL + `req/workers/{{USER_ID}}/nodes/${CURRENT_NODE}/elements`;
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}}`;
function getUrlReturnElement(element_id) {
let url = urlReturnElement.replace("{{USER_ID}}", sessionStorage.getItem("user_id"));
url = url.replace("{{ELEMENT_ID}}", element_id);
return url;
}
function getUrlGetWorkload() {
let url = urlGetWorkload.replace("{{USER_ID}}", sessionStorage.getItem("user_id"));
return url;
}
function getUrlGetReturnedElement(element_id) {
let url = urlGetReturnedElement.replace("{{USER_ID}}", sessionStorage.getItem("user_id"));
url = url.replace("{{ELEMENT_ID}}", element_id);
return url;
}
function getUrlGetWaitingElement() {
let url = urlGetWaitingElement.replace("{{USER_ID}}", sessionStorage.getItem("user_id"));
return url;
}
function getUrlCompleteToNextNode(element_id) {
let url = urlCompleteToNextNode.replace("{{USER_ID}}", sessionStorage.getItem("user_id"));
url = url.replace("{{ELEMENT_ID}}", element_id);
return url;
}
function getUrlGetWorkersCurrentNode() {
let url = urlGetWorkersCurrentNode.replace("{{USER_ID}}", sessionStorage.getItem("user_id"));
return url;
}
function getRejectElement(){
let url = urlRejectElement.replace("{{elementId}}", sessionStorage.getItem("element_id"));
url = url.replace("{{newNodeId}}", EXCEPTION_NODE);
return url;
}
let urlGetIfExisting = GFS_URL + "/" + "get-if-existing";
let urlGetXml = GFS_URL + "/" + "get-xml";
let urlWriteXml = GFS_URL + "/" + "write-xml";
let urlUpdateEob = GFS_URL + "/" + "update-eob";
let urlUpdateException = GFS_URL + "/" + "update-exception";
let urlWriteMetrics = GFS_URL + "/" + "write-metrics";
let urlGetFields = GFS_URL + "/" + "get-fields";
\ No newline at end of file
async function returnElementBPO(elementId) {
let response = await fetch(getUrlReturnElement(elementId), {method: "POST"});
if (response.status == 200) {
/*returnSaveXML();*/
const indexedDB =
window.indexedDB ||
window.mozIndexedDB ||
window.webkitIndexedDB ||
window.msIndexedDB ||
window.shimIndexedDB;
const request = indexedDB.open("ImageDatabase", 1);
request.onsuccess = function () {
const db = request.result;
const delRequest = db.transaction("image", 'readwrite')
.objectStore("image")
.clear();
};
[...document.getElementsByClassName("TiffModalContent")].forEach(el => {
while (el.children[1].hasChildNodes()) {
el.children[1].removeChild(el.children[1].firstChild);
}
while (el.children[2].hasChildNodes()) {
el.children[2].removeChild(el.children[2].firstChild);
}
while (el.children[3].hasChildNodes()) {
el.children[3].removeChild(el.children[3].firstChild);
}
});
[...document.getElementsByClassName("bar")].forEach(el => {
el.style.removeProperty('display');
});
document.getElementById("counter").innerHTML = "";
clearTimeout(interval);
sessionStorage.removeItem("section");
sessionStorage.removeItem("doctype");
isCanvasNotCreated = true;
localStorage.clear();
//localStorage.sfIndex = 1;
await loadWaitingElement();
init();
alert('Element Returned');
}else{
alert(`Error ${response.status}: Returning element`);
logoutKeycloak();
}
return response.status;
}
async function returnElementLogout(elementId) {
let response = await fetch(getUrlReturnElement(elementId), {method: "POST"});
if (response.status == 200) {
console.log('Element Returned');
}else{
alert(`Error ${response.status}: Returning element`);
logoutKeycloak();
}
return response.status;
}
var returnButton = document.getElementById('return');
returnButton.addEventListener("click", function () {
createReturnWindow();
if(currentWindow){currentWindow.close();}
});
window.addEventListener('keydown', function(e) {
if (e.altKey == true && e.keyCode == 85){
createReturnWindow();
}
});
async function loadWaitingElement(){
while (true) {
const element = await getWaitingElement();
if (element.errorCode == 0) {
const lst = await isLSTExisting(element.element);
if (lst.isExisting) {
let dir = await lst.data;
Dirfiles = [...dir];
sessionStorage.setItem("dir_files", JSON.stringify(Dirfiles));
sessionStorage.setItem("element_id", element.element.elementId);
sessionStorage.setItem("element_file_loc", element.element.fileLocation);
break;
} else {
await returnElement(element.element);
}
} else if (element.errorCode == 463) {
/*alert("No more available element");*/
promptNoFilesLeft();
/* sessionStorage.clear();
localStorage.clear();
logoutKeycloak();*/
break;
} else {
alert(`Error ${element.errorCode}: Fetching waiting element`);
}
}
}
function returnSaveXML(){
var elementId = sessionStorage.getItem("element_id");
let doctype;
let section;
// Validate all elements again
for(let element of document.getElementById("fields").elements) {
if (element.style.display === 'none') continue
const { id, value,type } = element
const { valid } = validateInput(id, value)
// Skip submit button
if(type==='submit') continue
if(id==='DocType') {
doctype = element.options[element.selectedIndex].text;
continue;
}
if(id==='Section') {
section = element.options[element.selectedIndex].text;
continue;
}
}
let xmlData = {
"projCode": PROJECT_CODE,
"userId": sessionStorage.getItem("user_id"),
"elementId": elementId,
"schema": SCHEMA_FILE,
"totalRec": Dirfiles.length,
"maxRec": "1",
"totalKeystroke": 0,
"procTime": "",
"procDuration": 0,
"eob": "",
"exceptionRemark": "",
"recordNo": "1",
"totalSubRec": "1",
"maxSubRec": "1",
"imageName": File_Path,
"subRecordNo": "1",
"eor": "",
"fields": {},
"outputDir": sessionStorage.getItem("element_file_loc") + "/" + (ENCODING_PASS == "PASS1" ? elementId + ".DTA" : elementId + ".DTB"),
"doctype": doctype,
"section": section
}
updateXMLException(xmlData);
return false;
}
function createReturnWindow() {
let overlay = document.createElement("div");
overlay.classList.add("genericPopup");
let endWindow = document.createElement('div');
endWindow.id = 'end_window';
endWindow.classList.add("parent_Window")
let endBodyDiv = document.createElement('div');
endBodyDiv.id = 'endBodyDiv';
let endLabel = document.createElement('p');
endLabel.innerText = "Current Element will be Returned.";
let endContinue = document.createElement('p');
endContinue.innerText = "Continue Y/N?";
let endOkCnclDiv = document.createElement('div');
endOkCnclDiv.id = 'endOkCnclCont';
let okEnd = document.createElement('button');
okEnd.classList.add("emphasizeButton");
okEnd.innerHTML = 'ok';
okEnd.id = 'okEndButtn';
okEnd.onclick = function() {
returnElementBPO(sessionStorage.getItem("element_id"));
var fileName = sessionStorage.getItem("file_Name");
if(fileName !== null && fileName !== undefined){
if(document.getElementById("controlsContainer") !== null) {
document.getElementById("controlsContainer").outerHTML="";
}
}else{
if(document.getElementById("TiffViewer_ButtonContainer") !== null) {
document.getElementById("TiffViewer_ButtonContainer").outerHTML="";
}
}
overlay.remove();
}
let cancelEnd = document.createElement('button');
cancelEnd.classList.add("normalButton");
cancelEnd.innerHTML = 'cancel';
cancelEnd.id = 'cnclEndButton';
endOkCnclDiv.appendChild(okEnd);
endOkCnclDiv.appendChild(cancelEnd);
endBodyDiv.appendChild(endLabel);
endBodyDiv.appendChild(endContinue);
endBodyDiv.appendChild(endOkCnclDiv);
endWindow.appendChild(endBodyDiv);
cancelEnd.addEventListener("click", function() {
overlay.remove();
});
overlay.append(endWindow);
document.body.append(overlay);
}
\ No newline at end of file
<?php
$projCode = json_decode($_POST['data'], true)["projCode"];
$userId = json_decode($_POST['data'], true)["userId"];
$elementId = json_decode($_POST['data'], true)["elementId"];
$schema = json_decode($_POST['data'], true)["schema"];
$totalRec = json_decode($_POST['data'], true)["totalRec"];
$maxRec = json_decode($_POST['data'], true)["maxRec"];
$totalKeystroke = json_decode($_POST['data'], true)["totalKeystroke"];
$procTime = json_decode($_POST['data'], true)["procTime"];
$procDuration = json_decode($_POST['data'], true)["procDuration"];
$eob = json_decode($_POST['data'], true)["eob"];
$exceptionRemark = json_decode($_POST['data'], true)["exceptionRemark"];
$recordNo = json_decode($_POST['data'], true)["recordNo"];
$totalSubRec = json_decode($_POST['data'], true)["totalSubRec"];
$maxSubRec = json_decode($_POST['data'], true)["maxSubRec"];
$imageName = json_decode($_POST['data'], true)["imageName"];
$subRecordNo = json_decode($_POST['data'], true)["subRecordNo"];
$eor = json_decode($_POST['data'], true)["eor"];
$fields = json_decode($_POST['data'], true)["fields"];
$outputDir = json_decode($_POST['data'], true)["outputDir"];
$doctype = json_decode($_POST['data'], true)["doctype"];
$section = json_decode($_POST['data'], true)["section"];
$dom = new DOMDocument('1.0', 'UTF-8');
$dom->preserveWhiteSpace = false;
$dom->load($outputDir);
$root = $dom->getElementsByTagName($projCode)->item(0);
$dom->getElementsByTagName('eob')->item(0)->nodeValue = "Y";
$dom->formatOutput = true;
file_put_contents($outputDir, preg_replace_callback('/^( +)</m',
function($a) {
return str_repeat(' ',intval(strlen($a[1]) / 2) * 4).'<';
}, $dom->saveXML()));
echo $dom->saveXML();
?>
function JSettings()
{
this.IE=document.all?true:false;
this.MouseX=_JSettings_MouseX;
this.MouseY=_JSettings_MouseY;
this.SrcElement=_JSettings_SrcElement;
this.Parent=_JSettings_Parent;
this.RunOnLoad=_JSettings_RunOnLoad;
this.FindParent=_JSettings_FindParent;
this.FindChild=_JSettings_FindChild;
this.FindSibling=_JSettings_FindSibling;
this.FindParentTag=_JSettings_FindParentTag;
}
function _JSettings_MouseX(e)
{return this.IE?event.clientX:e.clientX;}
function _JSettings_MouseY(e)
{return this.IE?event.clientY:e.clientY;}
function _JSettings_SrcElement(e)
{return this.IE?event.srcElement:e.target;}
function _JSettings_Parent(Node)
{return this.IE?Node.parentNode:Node.parentElement;}
function _JSettings_RunOnLoad(Meth){var Prev=(window.onload)?window.onload:function(){};window.onload=function(){Prev();Meth();};}
function _JSettings_FindParent(Node, Attrib, Value)
{var Root = document.getElementsByTagName("BODY")[0];
Node = Node.parentNode; while (Node != Root && Node.getAttribute(Attrib) != Value){Node=Node.parentNode;}
if (Node.getAttribute(Attrib) == Value) {return Node;} else {return null;}}
function _JSettings_FindParentTag(Node, TagName)
{var Root = document.getElementsByTagName("BODY")[0];
TagName=TagName.toLowerCase();
Node = Node.parentNode; while (Node != Root && Node.tagName.toLowerCase() != TagName){Node=Node.parentNode;}
if (Node.tagName.toLowerCase() == TagName) {return Node;} else {return null;}}
function _JSettings_FindChild(Node, Attrib, Value)
{
if (Node.getAttribute)
if (Node.getAttribute(Attrib) == Value) return Node;
var I=0;
var Ret = null;
for (I=0;I<Node.childNodes.length;I++)
{
Ret = FindChildByAttrib(Node.childNodes[I]);
if (Ret) return Ret;
}
return null;
}
function _JSettings_FindSibling(Node, Attrib, Value)
{
var Nodes=Node.parentNode.childNodes;
var I=0;
for (I=0;I<Nodes.length;I++)
{
if (Nodes[I].getAttribute)
{
if (Nodes[I].getAttribute(Attrib) == Value)
{return Nodes[I];}
}
}
return null;
}
var Settings = new JSettings();
\ No newline at end of file
function XMLWriter()
{
this.XML=[];
this.Nodes=[];
this.State="";
this.FormatXML = function(Str)
{
if (Str)
return Str.replace(/&/g, "&amp;").replace(/\"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
return ""
}
this.BeginNode = function(Name)
{
if (!Name) return;
if (this.State=="beg") this.XML.push(">");
this.State="beg";
this.Nodes.push(Name);
this.XML.push("<"+Name);
}
this.EndNode = function()
{
if (this.State=="beg")
{
this.XML.push("/>");
this.Nodes.pop();
}
else if (this.Nodes.length>0)
this.XML.push("</"+this.Nodes.pop()+">");
this.State="";
}
this.Attrib = function(Name, Value)
{
if (this.State!="beg" || !Name) return;
this.XML.push(" "+Name+"=\""+this.FormatXML(Value)+"\"");
}
this.WriteString = function(Value)
{
if (this.State=="beg") this.XML.push(">");
this.XML.push(this.FormatXML(Value));
this.State="";
}
this.Node = function(Name, Value)
{
if (!Name) return;
if (this.State=="beg") this.XML.push(">");
this.XML.push((Value=="" || !Value)?"<"+Name+"/>":"<"+Name+">"+this.FormatXML(Value)+"</"+Name+">");
this.State="";
}
this.Close = function()
{
while (this.Nodes.length>0)
this.EndNode();
this.State="closed";
}
this.ToString = function(){return this.XML.join("");}
}
\ No newline at end of file
async function WriteForm(e,metrics,doctype,section) {
try {
var Frm=Settings.SrcElement(e);
var Nodes=Frm.elements;
const myArray = Object.values(metrics);
const lookup = schema[doctype][section]
localStorage.setItem("submit", "1");
if (IS_RETRIEVE_FROM_BPO == "Y") {
let fields = {};
for (var i=0;i<Nodes.length;i++) {
if (Nodes[i].style.display === 'none') continue
let fid = Nodes[i].id;
if (fid == 'DocType' || fid == 'Section' || fid == '' || fid == "submitButton") continue
fields[Object.keys(lookup[fid]).includes('aka') ? lookup[fid].aka.replace("field", "") : fid] = Nodes[i].value;
}
createOutputXml(fields, myArray, doctype, section);
} else {
const lookup = schema[doctype][section]
const myArray = Object.values(metrics);
localStorage.setItem("submit", "1");
var Frm=Settings.SrcElement(e);
var XML=new XMLWriter();
XML.WriteString('<?xml version="1.0" encoding="UTF-8" standalone="no"?>');
XML.BeginNode(Frm.name);
var Nodes=Frm.elements;
XML.Node("Image_Source_Path",File_Path);
XML.Node("No_of_Keystrokes",JSON.stringify(myArray[0]));
XML.Node("Processing_Time_Seconds",JSON.stringify(myArray[1]));
XML.Node("DocType", doctype);
XML.Node("Section", section);
for (var i=0;i<Nodes.length;i++){
if (Nodes[i].style.display === 'none') continue
let fid = Nodes[i].id;
if (fid == 'DocType' || fid == 'Section' || fid == '') continue
XML.Node(Object.keys(lookup[fid]).includes('aka') ? lookup[fid].aka : fid,
Nodes[i].value);
// console.log(Nodes[i]);
}
XML.EndNode();
XML.Close();
var final_xml=XML.ToString().replace(/</g,"\n<").replace(/&lt;/g,"\<").replace(/&quot;/g,'"').replace(/&gt;/g,">").replace(/\n<\//g,"</").replace(/<\/xml>/g,"\n</xml>");
var myFile = new File([final_xml], sessionStorage.getItem('user_id') + "_" + File_Name + ".xml", {type: "text/plain;charset=utf-8"});
// saveAs(myFile);
let formData = new FormData();
formData.append("file", myFile);
let data = {};
sessionStorage.getItem('outputXmlDir') == null ? data.outputDir = null : data.outputDir = sessionStorage.getItem('outputXmlDir');
formData.append("data", JSON.stringify(data));
const outputXmlDir = await fetch('./src/XMLWriter/upload.php', {
method: "POST",
body: formData
});
sessionStorage.setItem('outputXmlDir', await outputXmlDir.text());
}
}
catch(Err) {
alert("Error: " + Err.description);
}
return false;
}
<?php
date_default_timezone_set('Asia/Manila');
$t = time();
$outputDir = json_decode($_POST['data'], true)["outputDir"];
/* Get the name of the uploaded file */
$filename = $_FILES['file']['name'];
/* Choose where to save the uploaded file */
if ($outputDir == null) {
$outputDir = "../../output/".substr($filename, 0, strpos($filename, "_"))."_".date("m-d-Y_H.i.s",$t);
mkdir($outputDir);
}
$location = $outputDir."/".$filename;
/* Save the uploaded file to the local filesystem */
if ( move_uploaded_file($_FILES['file']['tmp_name'], $location) ) {
echo $outputDir;
} else {
// echo 'Failure';
}
?>
\ No newline at end of file
<?php
$dir = json_decode($_POST['data'], true)['dir'];
$handle = fopen($dir, "rb");
$contents = fread($handle, filesize($dir));
fclose($handle);
header("Content-type: application/octet-stream");
header("Content-length: " . filesize($dir));
echo $contents;
?>
\ No newline at end of file
<?php
/* Get the name of the uploaded file */
$filename = $_FILES['file']['name'];
/* Choose where to save the uploaded file */
$location = "./uploadimg/".$filename;
/* Save the uploaded file to the local filesystem */
if ( move_uploaded_file($_FILES['file']['tmp_name'], $location) ) {
echo 'Success';
} else {
echo 'Failure';
}
?>
\ No newline at end of file
<?php
$dir = json_decode($_POST['data'], true)['metrics_dir'];
$start_time = json_decode($_POST['data'], true)['start_time'];
$end_time = json_decode($_POST['data'], true)['end_time'];
$rows = [
["\n"],
["\n"],
["Start Time: ".$start_time],
["\n"],
["End Time: ".$end_time]
];
$fp = fopen($dir, 'a');
foreach ($rows as $row) {
fwrite($fp, implode("|", $row));
}
fclose($fp);
?>
<?php
date_default_timezone_set('Asia/Manila');
$t = time();
$outputDir = json_decode($_POST['data'], true)["outputDir"];
$dir = json_decode($_POST['data'], true)['metrics_dir'];
/* Get the name of the uploaded file */
$filename = $_FILES['file']['name'];
/* Choose where to save the uploaded file */
if ($outputDir == null) {
$outputDir = $dir.substr($filename, 0, strpos($filename, "_"))."_".date("m-d-Y_H.i.s",$t);
mkdir($outputDir);
}
$location = $outputDir."/".$filename;
/* Save the uploaded file to the local filesystem */
if ( move_uploaded_file($_FILES['file']['tmp_name'], $location) ) {
echo $outputDir;
} else {
echo 'Failure';
}
?>
\ No newline at end of file
const form = document.getElementById("fields");
let closerWindow;
let endButton = document.getElementById("endBtn");
function checkForm(form) {
var inputs = form.getElementsByTagName("input");
var selects = form.getElementsByTagName("select");
inputsBlankCount = inputs.length;
selectsBlankCount = selects.length - 2;
for (var i = 0; i < inputs.length; i++) {
if (inputs[i].value == "") inputsBlankCount--;
}
for (var i = 0; i < selects.length; i++) {
if (selects[i].options[selects[i].selectedIndex].value === "null") selectsBlankCount--;
}
if (inputsBlankCount == 0 && selectsBlankCount == 0) return true;
}
/*endButton.addEventListener("click", function(){
let endWindow = document.getElementById('end_window');
endWindow.style.display = 'block';
});
*/
function createEndSessionWindow() {
let overlay = document.createElement("div");
overlay.classList.add("genericPopup");
let endWindow = document.createElement('div');
endWindow.id = 'end_window';
endWindow.classList.add("parent_Window")
let endBodyDiv = document.createElement('div');
endBodyDiv.id = 'endBodyDiv';
let endLabel = document.createElement('p');
endLabel.innerText = "Session will end. Current Element will be Returned.";
let endContinue = document.createElement('p');
endContinue.innerText = "Continue Y/N?";
let endOkCnclDiv = document.createElement('div');
endOkCnclDiv.id = 'endOkCnclCont';
let okEnd = document.createElement('button');
okEnd.classList.add("emphasizeButton");
okEnd.innerHTML = 'ok';
okEnd.id = 'okEndButtn';
okEnd.onclick = async function() {
if (checkForm(form)) {
var DBdeleteRequest = window.indexedDB.deleteDatabase("ImageDatabase");
DBdeleteRequest.addEventListener('blocked', function(e) {
console.log("Database cleared.");
});
DBdeleteRequest.addEventListener('upgradeneeded', function(e) {
console.log("Upgrade needed in deleting database");
});
DBdeleteRequest.addEventListener('error', function(e) {
console.log("Error in deleting database");
});
DBdeleteRequest.addEventListener('success', function(e) {
console.log("Database cleared.");
});
let returnElem = await returnElementLogout(sessionStorage.getItem("element_id"));
if (returnElem == 200) {
/*returnSaveXML();*/
endWindow.style.display = 'none';
localStorage.clear();
sessionStorage.clear();
logoutKeycloak();
submitted = false;
if(currentWindow){currentWindow.close();}
}
} else {
alert("Fields are not empty. Submit or clear fields first.");
overlay.remove();
}
endWindow.style.display = 'none';
}
let cancelEnd = document.createElement('button');
cancelEnd.classList.add("normalButton");
cancelEnd.innerHTML = 'cancel';
cancelEnd.id = 'cnclEndButton';
endOkCnclDiv.appendChild(okEnd);
endOkCnclDiv.appendChild(cancelEnd);
endBodyDiv.appendChild(endLabel);
endBodyDiv.appendChild(endContinue);
endBodyDiv.appendChild(endOkCnclDiv);
endWindow.appendChild(endBodyDiv);
cancelEnd.addEventListener("click", function() {
overlay.remove();
});
overlay.append(endWindow);
document.body.append(overlay);
}
\ No newline at end of file
var found = true; //variable to return
var embed = 0; //checker if which file is using the function
const fetchConfig = () => {
$.ajax({ //locates the config file
url: './config.js',
async: false,
success: function (data) { },
error: function (data) {
handleError("application config");
},
})
$.ajax({ //locates the project config file
url: './project_config.js',
async: false,
success: function (data) { },
error: function (data) {
handleError("project config");
},
})
}
const handleError = (file) => {
if (embed == 0) {//to ensure the prompt appears only once
if (confirm(`${file} not found, application will not commence`)) { }
}
found = false;
}
/**
* will fetch the json file containing the schema.
* update the value of the variable file to the path/url of the json file
*/
// const file = "./fetchSchema/5_field_schema.json"
let schema = {}
const fetchSchema = async () => {
await fetch(SCHEMA_FILE)
.then(res => res.json())
.then(data => {
schema = data;
})
.catch(schema = {})
}
\ No newline at end of file
var displayImg = function(doc){ //test display image
//Create all Elements
const container = document.createElement('div');
container.setAttribute('id', 'img-container');
container.style.textAlign = 'center';
let tiffHeader = document.getElementById("TiffModalHeader");
var tiffbody = document.getElementById("TiffModalBody");
var tiffFooter = document.getElementById("TiffModalFooter");
var controllsContainer = document.createElement("div");
controllsContainer.setAttribute('id', 'controlsContainerImg');
//Info Section
var pageButtonInfoContainer = document.createElement("div");
pageButtonInfoContainer.classList.add("pageButtonInfoContainer");
//Buttons Section
let centerContainer = document.createElement("div");
centerContainer.classList.add("footerCenterContainer");
var fitContentButton = document.createElement("div");
fitContentButton.setAttribute('id', 'fit-content');
fitContentButton.classList.add("TiffViewer_ButtonClass");
const fitContentIcon = addIcon("Fit Content", "full_content_icon.png");
var zoomInButton = document.createElement('div');
zoomInButton.setAttribute('id', 'zoom-in');
zoomInButton.classList.add("TiffViewer_ButtonClass");
const zoomInIcon = addIcon("Zoom In", "zoom_in_icon.png");
var zoomOutButton = document.createElement('div');
zoomOutButton.setAttribute('id', 'zoom-out');
zoomOutButton.classList.add("TiffViewer_ButtonClass");
const zoomOutIcon = addIcon("Zoom Out", "zoom_out_icon.png");
var zoomInfo = document.createElement('span');
zoomInfo.setAttribute('id', 'zoom-level');
var rotateRightButton = document.createElement('div');
rotateRightButton.setAttribute('id', 'rotate-right');
rotateRightButton.classList.add("TiffViewer_ButtonClass");
const rotateRightIcon = addIcon("Rotate Right", "rotate_right_icon.png");
var rotateLeftButton = document.createElement('div');
rotateLeftButton.setAttribute('id', 'rotate-left');
rotateLeftButton.classList.add("TiffViewer_ButtonClass");
const rotateLeftIcon = addIcon("Rotate Left", "rotate_left_icon.png");
var flipVerticalButton = document.createElement('div');
flipVerticalButton.setAttribute('id', 'flip-vertical');
flipVerticalButton.classList.add("TiffViewer_ButtonClass");
const flipVerticalIcon = addIcon("Flip Vertical", "flip_vertical_icon.png");
var flipHorizontalButton = document.createElement('div');
flipHorizontalButton.setAttribute('id', 'flip-horizontal');
flipHorizontalButton.classList.add("TiffViewer_ButtonClass");
const flipHorizontalIcon = addIcon("Flip Horizontal", "flip_horizontal_icon.png");
//canva's
var canvas = document.createElement('canvas');
var img = new Image();
img.src = doc;
img.width = 900;
img.height = 1200;
var scale = 1;
// Set zoom level to 30%
var fitContent = false;
var zoom = 1;
var originalWidth = 0;
var originalHeight = 0;
// Set initial rotation angle to 0 degrees
var rotationAngle = 0;
// Set initial flip flags to false
var flipHorizontal = false;
var flipVertical = false;
var ctx = canvas.getContext('2d');
img.onload = function() {
canvas.width = img.width;
canvas.height = img.height;
originalWidth = img.width;
originalHeight = img.height;
ctx.drawImage(img, 0, 0, img.width * zoom, img.height * zoom);
initHighlight();
};
//Body
container.appendChild(canvas);
tiffbody.appendChild(container);
//Footer
controllsContainer.appendChild(centerContainer);
tiffFooter.appendChild(controllsContainer);
//Header
pageButtonInfoContainer.append(zoomInfo);
tiffHeader.append(pageButtonInfoContainer);
//Icons
fitContentButton.append(fitContentIcon);
zoomInButton.append(zoomInIcon);
zoomOutButton.append(zoomOutIcon);
rotateRightButton.append(rotateRightIcon);
rotateLeftButton.append(rotateLeftIcon);
flipVerticalButton.append(flipVerticalIcon);
flipHorizontalButton.append(flipHorizontalIcon);
centerContainer.appendChild(fitContentButton);
centerContainer.appendChild(zoomInButton);
centerContainer.appendChild(zoomOutButton);
centerContainer.appendChild(rotateRightButton);
centerContainer.appendChild(rotateLeftButton);
centerContainer.appendChild(flipVerticalButton);
centerContainer.appendChild(flipHorizontalButton);
//Events Function
fitContentButton.addEventListener('click', function() {
toggleFitContent();
});
document.addEventListener("keydown", function(e) {
if (e.shiftKey && e.key == 'F') {
toggleFitContent();
}
});
function toggleFitContent() {
fitContent = !fitContent;
if (fitContent) {
// Calculate zoom level to fit image to canvas
var zoomX = canvas.width / img.width;
var zoomY = canvas.height / img.height;
zoom = Math.min(zoomX, zoomY);
// Center image on canvas
var offsetX = (canvas.width - img.width * zoom) / 2;
var offsetY = (canvas.height - img.height * zoom) / 2;
// Draw image on canvas with new zoom level and offset
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.save();
ctx.scale(scale, scale);
ctx.drawImage(img, offsetX, offsetY, img.width * zoom, img.height * zoom);
ctx.restore();
} else {
// Reset zoom level and redraw image on canvas
zoom = 1;
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.save();
ctx.scale(scale, scale);
ctx.drawImage(img, 0, 0, img.width * zoom, img.height * zoom);
ctx.restore();
}
// Update zoom info display
document.getElementById('zoom-level').innerHTML = `Zoom: ${(zoom * 100).toFixed(0)}%`;
initHighlight();
}
zoomInButton.addEventListener('click', function() {
zoomIn();
});
document.addEventListener("keydown", (e) => {
if (e.ctrlKey && e.key === "=") {
e.preventDefault();
zoomIn();
}
})
zoomOutButton.addEventListener('click', function() {
zoomOut();
});
document.addEventListener("keydown", (e) => {
if (e.ctrlKey && e.key === "-") {
e.preventDefault();
zoomOut()
}
})
function zoomIn() {
zoom += 0.1;
drawScaled(zoom);
}
function zoomOut() {
// Decrease zoom level by 0.1 (10%)
zoom -= 0.1;
// Draw image on canvas with new zoom level
drawScaled(zoom);
}
rotateLeftButton.addEventListener('click', function() {
rotationAngle -= 90;
rotationAngle = (rotationAngle + 360) % 360;
drawImage();
});
document.addEventListener("keydown", (e) => {
if (e.shiftKey && e.code === 'ArrowDown') {
e.preventDefault();
rotationAngle -= 90;
rotationAngle = (rotationAngle + 360) % 360;
drawImage();
}
})
rotateRightButton.addEventListener('click', function() {
rotationAngle += 90;
rotationAngle = (rotationAngle + 360) % 360;
drawImage();
});
document.addEventListener("keydown", (e) => {
if (e.shiftKey && e.code === 'ArrowUp') {
e.preventDefault();
rotationAngle += 90;
rotationAngle = (rotationAngle + 360) % 360;
drawImage();
}
})
flipHorizontalButton.addEventListener('click', function() {
flipHorizontal = !flipHorizontal;
drawImage();
});
document.addEventListener("keydown", (e) => {
if (e.ctrlKey && e.shiftKey && e.key.toUpperCase() === "H") {
e.preventDefault();
flipHorizontal = !flipHorizontal;
drawImage();
}
})
flipVerticalButton.addEventListener('click', function() {
flipVertical = !flipVertical;
drawImage();
});
document.addEventListener("keydown", (e) => {
if (e.ctrlKey && e.shiftKey && e.key.toUpperCase() === "V") {
e.preventDefault();
flipVertical = !flipVertical;
drawImage();
}
})
function drawImage() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.setTransform(
flipHorizontal ? -zoom : zoom,
0,
0,
flipVertical ? -zoom : zoom,
canvas.width / 2,
canvas.height / 2
);
ctx.rotate(rotationAngle * Math.PI / 180);
ctx.drawImage(img, -img.width / 2, -img.height / 2, img.width, img.height);
ctx.setTransform(1, 0, 0, 1, 0, 0);
document.getElementById('zoom-level').innerHTML = `Zoom: ${(zoom * 100).toFixed(0)}%`;
initHighlight();
}
function drawScaled(zoomLvl) {
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.save();
ctx.scale(scale, scale);
ctx.drawImage(img, 0, 0, img.width * zoomLvl, img.height * zoomLvl);
ctx.restore();
document.getElementById('zoom-level').textContent = `Zoom: ${(zoomLvl * 100).toFixed(0)}%`;
initHighlight();
}
}
\ No newline at end of file
const init = async () => {
let started_flag = false;
accessFile();
window.onkeydown = (key) => {
if (!started_flag) {
if (searchStringInArray(`${key.key}`, keyArray) == true || key.ctrlKey && key.key) {
console.log('Invalid key cannot Start');
} else {
started_flag = true;
startMetricCapture();
}
}
}
}
const refresh = () => {
if (IS_RETRIEVE_FROM_BPO == "Y") {
Dirfiles = JSON.parse(sessionStorage.getItem('dir_files'));
}
let started_flag = false;
displayFields("fields");
refreshImage();
window.onkeydown = (key) => {
if (!started_flag) {
if (searchStringInArray(`${key.key}`, keyArray) == true || key.ctrlKey && key.key) {
console.log('Invalid key cannot Start');
} else {
started_flag = true;
startMetricCapture();
}
}
}
}
function searchStringInArray(str, strArray) {
for (var j = 0; j < strArray.length; j++) {
if (strArray[j] == str) return true;
}
return false;
}
{
"SECTION":
{
"Surname":
{
"fieldLabel": "Surname",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*._={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Religion":
{
"fieldLabel": "Religion",
"validation":
{
"fieldLength": 30,
"collection": "alphabet"
}
},
"Place_of_Birth":
{
"fieldLabel": "Place of Birth",
"validation":
{
"fieldLength": 50,
"collection": "alphanumeric",
"mandatory": true,
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>"
}
},
"Birthdate":
{
"fieldLabel": "Birthdate",
"validation":
{
"fieldLength": 10,
"collection": "datepicker",
"regexformat": "(^0[0-9]|^1[012])[-](0[0-9]|[12][0-9]|3[01])[-]((19\\d\\d)|(200[0-9])|(201[0-9])|(202[0])|0000)",
"mandatory": true
}
},
"Age":
{
"fieldLabel": "Age",
"validation":
{
"fieldLength": 2,
"collection": "numeric",
"mandatory": true
}
},
"Gender":
{
"fieldLabel": "Gender",
"validation":
{
"fieldLength": 1,
"collection": "dropdown",
"options": ["M", "F"],
"mandatory": true
}
},
"Civil_Status":
{
"fieldLabel": "Civil Status",
"validation":
{
"fieldLength": 15,
"collection": "dropdown",
"options": ["Single", "Married", "Widowed"],
"mandatory": true
}
},
"Nationality":
{
"fieldLabel": "Nationality",
"validation":
{
"fieldLength": 15,
"collection": "dropdown",
"options": ["Filipino", "Foreigner"],
"mandatory": true
}
},
"Height_in_Cm":
{
"fieldLabel": "Height (in cm)",
"validation":
{
"fieldLength": 3,
"collection": "numeric"
}
},
"Weight_in_Kg":
{
"fieldLabel": "Weight (in kg)",
"validation":
{
"fieldLength": 3,
"collection": "numeric"
}
}
}
}
\ No newline at end of file
{
"SECTION":
{
"Surname":
{
"fieldLabel": "Surname",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*._={}[]:;/\"|\\<>",
"mandatory": true
}
},
"House_Number":
{
"fieldLabel": "House Number",
"validation":
{
"fieldLength": 15,
"collection": "alphanumeric",
"invalidchar": "`~!@&$%^*_={}[]:;\"|\\<>"
}
},
"Street":
{
"fieldLabel": "Street",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>"
}
},
"Village_Subdivision":
{
"fieldLabel": "Village/Subdivision",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>"
}
},
"Municipality_City_Province":
{
"fieldLabel": "Municipality/City/Province",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"mandatory": true,
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>"
}
},
"Years_of_Stay":
{
"fieldLabel": "Years of Stay",
"validation":
{
"fieldLength": 2,
"collection": "numeric"
}
},
"Religion":
{
"fieldLabel": "Religion",
"validation":
{
"fieldLength": 30,
"collection": "alphabet"
}
},
"Place_of_Birth":
{
"fieldLabel": "Place of Birth",
"validation":
{
"fieldLength": 50,
"collection": "alphanumeric",
"mandatory": true,
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>"
}
},
"Birthdate":
{
"fieldLabel": "Birthdate",
"validation":
{
"fieldLength": 10,
"collection": "datepicker",
"regexformat": "(^0[0-9]|^1[012])[-](0[0-9]|[12][0-9]|3[01])[-]((19\\d\\d)|(200[0-9])|(201[0-9])|(202[0])|0000)",
"mandatory": true
}
},
"Age":
{
"fieldLabel": "Age",
"validation":
{
"fieldLength": 2,
"collection": "numeric",
"mandatory": true
}
},
"Gender":
{
"fieldLabel": "Gender",
"validation":
{
"fieldLength": 1,
"collection": "dropdown",
"options": ["M", "F"],
"mandatory": true
}
},
"Civil_Status":
{
"fieldLabel": "Civil Status",
"validation":
{
"fieldLength": 15,
"collection": "dropdown",
"options": ["Single", "Married", "Widowed"],
"mandatory": true
}
},
"Nationality":
{
"fieldLabel": "Nationality",
"validation":
{
"fieldLength": 15,
"collection": "dropdown",
"options": ["Filipino", "Foreigner"],
"mandatory": true
}
},
"Height_in_Cm":
{
"fieldLabel": "Height (in cm)",
"validation":
{
"fieldLength": 3,
"collection": "numeric"
}
},
"Weight_in_Kg":
{
"fieldLabel": "Weight (in kg)",
"validation":
{
"fieldLength": 3,
"collection": "numeric"
}
}
}
}
\ No newline at end of file
{
"SECTION":
{
"Surname":
{
"fieldLabel": "Surname",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*._={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Middle_Name":
{
"fieldLabel": "Middle Name",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Nickname":
{
"fieldLabel": "Nickname",
"validation":
{
"fieldLength": 15,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>"
}
},
"Email_Address":
{
"fieldLabel": "Email Address",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric"
}
},
"Mobile_Number":
{
"fieldLabel": "Mobile Number",
"validation":
{
"fieldLength": 15,
"collection": "numeric"
}
},
"Telephone_Number":
{
"fieldLabel": "Telephone Number",
"validation":
{
"fieldLength": 15,
"collection": "numeric"
}
},
"House_Number":
{
"fieldLabel": "House Number",
"validation":
{
"fieldLength": 15,
"collection": "alphanumeric",
"invalidchar": "`~!@&$%^*_={}[]:;\"|\\<>"
}
},
"Street":
{
"fieldLabel": "Street",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>"
}
},
"Village_Subdivision":
{
"fieldLabel": "Village/Subdivision",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>"
}
},
"Municipality_City_Province":
{
"fieldLabel": "Municipality/City/Province",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"mandatory": true,
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>"
}
},
"Years_of_Stay":
{
"fieldLabel": "Years of Stay",
"validation":
{
"fieldLength": 2,
"collection": "numeric"
}
},
"Religion":
{
"fieldLabel": "Religion",
"validation":
{
"fieldLength": 30,
"collection": "alphabet"
}
},
"Place_of_Birth":
{
"fieldLabel": "Place of Birth",
"validation":
{
"fieldLength": 50,
"collection": "alphanumeric",
"mandatory": true,
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>"
}
},
"Birthdate":
{
"fieldLabel": "Birthdate",
"validation":
{
"fieldLength": 10,
"collection": "datepicker",
"regexformat": "(^0[0-9]|^1[012])[-](0[0-9]|[12][0-9]|3[01])[-]((19\\d\\d)|(200[0-9])|(201[0-9])|(202[0])|0000)",
"mandatory": true
}
},
"Age":
{
"fieldLabel": "Age",
"validation":
{
"fieldLength": 2,
"collection": "numeric",
"mandatory": true
}
},
"Gender":
{
"fieldLabel": "Gender",
"validation":
{
"fieldLength": 1,
"collection": "dropdown",
"options": ["M","F"],
"mandatory": true
}
},
"Civil_Status":
{
"fieldLabel": "Civil Status",
"validation":
{
"fieldLength": 15,
"collection": "dropdown",
"options": ["Single", "Married", "Widowed"]
}
},
"Nationality":
{
"fieldLabel": "Nationality",
"validation":
{
"fieldLength": 15,
"collection": "dropdown",
"options": ["Filipino", "Foreigner"],
"mandatory": true
}
},
"Height_in_Cm":
{
"fieldLabel": "Height (in cm)",
"validation":
{
"fieldLength": 3,
"collection": "numeric"
}
},
"Weight_in_Kg":
{
"fieldLabel": "Weight (in kg)",
"validation":
{
"fieldLength": 3,
"collection": "numeric"
}
}
}
}
\ No newline at end of file
{
"SECTION":
{
"Surname":
{
"fieldLabel": "Surname",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*._={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Religion":
{
"fieldLabel": "Religion",
"validation":
{
"fieldLength": 30,
"collection": "alphabet"
}
},
"Birthdate":
{
"fieldLabel": "Birthdate",
"validation":
{
"fieldLength": 10,
"collection": "datepicker",
"mandatory": true
}
},
"Age":
{
"fieldLabel": "Age",
"validation":
{
"fieldLength": 2,
"collection": "numeric",
"mandatory": true
}
},
"Civil_Status":
{
"fieldLabel": "Civil Status",
"validation":
{
"fieldLength": 15,
"collection": "dropdown",
"options": ["Single", "Married", "Widowed"],
"mandatory": true
}
}
}
}
\ No newline at end of file
{
"SECTION":
{
"Payee":
{
"fieldLabel": "Payee",
"page": 1,
"validation":
{
"fieldLength": 50,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*._={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Particulars":
{
"fieldLabel": "Particulars",
"validation":
{
"fieldLength": 200,
"collection": "alphanumeric",
"mandatory": true
}
},
"Account_No":
{
"fieldLabel": "Account No",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Transaction_Date":
{
"fieldLabel": "Transaction Date",
"validation":
{
"fieldLength": 10,
"collection": "datepicker",
"mandatory": true
}
}
}
}
{
"ACCOUNTING DOCUMENTS":
{
"SECTION1":
{
"Name":
{
"fieldLabel": "Name",
"aka": "field7",
"validation":
{
"fieldLength": 100,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Subject":
{
"fieldLabel": "Subject",
"aka": "field8",
"validation":
{
"fieldLength": 200,
"collection": "alphanumeric",
"mandatory": true
}
},
"Gender":
{
"fieldLabel": "Gender",
"aka": "field27",
"source": "s",
"validation":
{
"fieldLength": 10,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": true,
"validvalues": ["Male","Female"]
}
},
"Document_No":
{
"fieldLabel": "Document No",
"aka": "field6",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Date":
{
"fieldLabel": "Date",
"aka": "field5",
"validation":
{
"fieldLength": 20,
"collection": "datepicker",
"mandatory": false
}
},
"Civil_Status":
{
"fieldLabel": "Civil Status",
"aka": "field28",
"source":"s",
"validation":
{
"fieldLength": 15,
"collection": "dropdown",
"options": ["Single", "Married", "Widowed"],
"mandatory": true
}
},
"Mother's_Name":
{
"fieldLabel": "Mother's Name",
"aka": "field31",
"source":"s",
"validation":
{
"fieldLength": 100,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": true
},
"childof": "Civil_Status",
"parentvalue": ["Single"]
},
"Spouse_Name":
{
"fieldLabel": "Spouse Name",
"aka": "field29",
"source":"s",
"validation":
{
"fieldLength": 100,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": true
},
"childof": "Civil_Status",
"parentvalue": ["Married","Widowed"]
},
"Date_of_Marriage":
{
"fieldLabel": "Date of Marriage",
"aka": "field30",
"source":"s",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": true
},
"childof": "Civil_Status",
"parentvalue": ["Married","Widowed"]
}
},
"SECTIONNEXT":
{
"Name":
{
"fieldLabel": "Name",
"aka": "field7",
"validation":
{
"fieldLength": 100,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Subject":
{
"fieldLabel": "Subject",
"aka": "field8",
"validation":
{
"fieldLength": 200,
"collection": "alphanumeric",
"mandatory": true
}
},
"Document_No":
{
"fieldLabel": "Document No",
"aka": "field6",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Date":
{
"fieldLabel": "Date",
"aka": "field5",
"validation":
{
"fieldLength": 20,
"collection": "datepicker",
"mandatory": false
}
}
}
},
"BANK APPLICATION FORMS":
{
"SECTION2":
{
"Name":
{
"fieldLabel": "Name",
"aka": "field3",
"validation":
{
"fieldLength": 100,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Account_No":
{
"fieldLabel": "Account No",
"aka": "field4",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": false
}
},
"Date":
{
"fieldLabel": "Date",
"aka": "field2",
"validation":
{
"fieldLength": 20,
"collection": "datepicker",
"mandatory": false
}
}
}
},
"HR FILES":
{
"SECTION3":
{
"Name":
{
"fieldLabel": "Name",
"aka": "field10",
"validation":
{
"fieldLength": 100,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Subject":
{
"fieldLabel": "Subject",
"aka": "field12",
"validation":
{
"fieldLength": 200,
"collection": "alphanumeric",
"mandatory": true
}
},
"Employee_No":
{
"fieldLabel": "Employee No",
"aka": "field11",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": false
}
},
"Date":
{
"fieldLabel": "Date",
"aka": "field9",
"validation":
{
"fieldLength": 20,
"collection": "datepicker",
"mandatory": false
}
}
}
}
}
{
"SECTION":
{
"Surname":
{
"fieldLabel": "Surname",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*._={}[]:;/\"|\\<>",
"mandatory": true
}
},
"First_Name":
{
"fieldLabel": "First Name",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Middle_Name":
{
"fieldLabel": "Middle Name",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Nickname":
{
"fieldLabel": "Nickname",
"validation":
{
"fieldLength": 15,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>"
}
},
"Email_Address":
{
"fieldLabel": "Email Address",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric"
}
},
"Mobile_Number":
{
"fieldLabel": "Mobile Number",
"validation":
{
"fieldLength": 15,
"collection": "numeric"
}
},
"Telephone_Number":
{
"fieldLabel": "Telephone Number",
"validation":
{
"fieldLength": 15,
"collection": "numeric"
}
},
"House_Number":
{
"fieldLabel": "House Number",
"validation":
{
"fieldLength": 15,
"collection": "alphanumeric",
"invalidchar": "`~!@&$%^*_={}[]:;\"|\\<>"
}
},
"Street":
{
"fieldLabel": "Street",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>"
}
},
"Village_Subdivision":
{
"fieldLabel": "Village/Subdivision",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>"
}
},
"Municipality_City_Province":
{
"fieldLabel": "Municipality/City/Province",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"mandatory": true,
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>"
}
},
"Years_of_Stay":
{
"fieldLabel": "Years of Stay",
"validation":
{
"fieldLength": 2,
"collection": "numeric"
}
},
"Religion":
{
"fieldLabel": "Religion",
"validation":
{
"fieldLength": 30,
"collection": "alphabet"
}
},
"Place_of_Birth":
{
"fieldLabel": "Place of Birth",
"validation":
{
"fieldLength": 50,
"collection": "alphanumeric",
"mandatory": true,
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>"
}
},
"Birthdate":
{
"fieldLabel": "Birthdate",
"validation":
{
"fieldLength": 10,
"collection": "datepicker",
"regexformat": "(^0[0-9]|^1[012])[-](0[0-9]|[12][0-9]|3[01])[-]((19\\d\\d)|(200[0-9])|(201[0-9])|(202[0])|0000)",
"mandatory": true
}
},
"Age":
{
"fieldLabel": "Age",
"validation":
{
"fieldLength": 2,
"collection": "numeric",
"mandatory": true
}
},
"Gender":
{
"fieldLabel": "Gender",
"validation":
{
"fieldLength": 1,
"collection": "dropdown",
"options": ["M", "F"],
"mandatory": true
}
},
"Civil_Status":
{
"fieldLabel": "Civil Status",
"validation":
{
"fieldLength": 15,
"collection": "dropdown",
"options": ["Single", "Married", "Widowed"],
"mandatory": true
}
},
"Nationality":
{
"fieldLabel": "Nationality",
"validation":
{
"fieldLength": 15,
"collection": "dropdown",
"options": ["Filipino", "Foreigner"],
"mandatory": true
}
},
"Height_in_Cm":
{
"fieldLabel": "Height (in cm)",
"validation":
{
"fieldLength": 3,
"collection": "numeric"
}
},
"Weight_in_Kg":
{
"fieldLabel": "Weight (in kg)",
"validation":
{
"fieldLength": 3,
"collection": "numeric"
}
}
}
}
\ No newline at end of file
{
"APPLICATION_FORM":
{
"SECTION1":
{
"Date":
{
"fieldLabel": "Date",
"aka": "field2",
"validation":
{
"fieldLength": 20,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"Position Applied For":
{
"fieldLabel": "Pos Applied For",
"aka": "field3",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"Surname":
{
"fieldLabel": "Surname",
"aka": "field4",
"validation":
{
"fieldLength": 50,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"First Name":
{
"fieldLabel": "First Name",
"aka": "field5",
"validation":
{
"fieldLength": 50,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"Middle Name":
{
"fieldLabel": "Mid Name",
"aka": "field6",
"validation":
{
"fieldLength": 50,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"Mother's Maiden Name":
{
"fieldLabel": "Mother's Maiden Name",
"aka": "field7",
"validation":
{
"fieldLength": 100,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"Nickname":
{
"fieldLabel": "Nickname",
"aka": "field8",
"validation":
{
"fieldLength": 20,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"Email Address":
{
"fieldLabel": "Email",
"aka": "field9",
"validation":
{
"fieldLength": 50,
"collection": "alphanumeric",
"mandatory": false
}
},
"Mobile Number":
{
"fieldLabel": "Mobile No.",
"aka": "field10",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"Telephone Number":
{
"fieldLabel": "Tel. No.",
"aka": "field11",
"validation":
{
"fieldLength": 20,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"Present Address House No":
{
"fieldLabel": "Pres Add House No",
"aka": "field13",
"validation":
{
"fieldLength": 20,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"Present Address Street":
{
"fieldLabel": "Pres Add Street",
"aka": "field14",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"mandatory": false
}
},
"Present Address Village/Subd":
{
"fieldLabel": "Pres Add Vill/Subd",
"aka": "field15",
"validation":
{
"fieldLength": 50,
"collection": "alphanumeric",
"invalidchar": "`",
"mandatory": false
}
},
"Present Address Municipality/City/Province":
{
"fieldLabel": "Pres Add Mun/City/Prov",
"aka": "field16",
"validation":
{
"fieldLength": 60,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"Years of Stay":
{
"fieldLabel": "Yrs of Stay",
"aka": "field17",
"validation":
{
"fieldLength": 3,
"collection": "numeric",
"mandatory": false
}
},
"Provincial Address House No":
{
"fieldLabel": "Prov Add House No",
"aka": "field19",
"validation":
{
"fieldLength": 20,
"collection": "alphanumeric",
"invalidchar": "`",
"mandatory": false
}
},
"Provincial Address Street":
{
"fieldLabel": "Prov Add Street",
"aka": "field20",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"mandatory": false
}
},
"Provincial Address Village/Subd":
{
"fieldLabel": "Prov Add Vill/Subd",
"aka": "field21",
"validation":
{
"fieldLength": 50,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"Provincial Address Municipality/City/Province":
{
"fieldLabel": "Prov Add Mun/City/Prov",
"aka": "field22",
"validation":
{
"fieldLength": 60,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"Religion":
{
"fieldLabel": "Religion",
"aka": "field23",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"Place of Birth":
{
"fieldLabel": "Place of Birth",
"aka": "field24",
"validation":
{
"fieldLength": 50,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"Date of Birth":
{
"fieldLabel": "Date of Birth",
"aka": "field25",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"Age":
{
"fieldLabel": "Age",
"aka": "field26",
"validation":
{
"fieldLength": 3,
"collection": "numeric",
"mandatory": false
}
},
"Gender":
{
"fieldLabel": "Gender",
"aka": "field27",
"validation":
{
"fieldLength": 10,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"Civil Status":
{
"fieldLabel": "Civil Status",
"aka": "field28",
"validation":
{
"fieldLength": 10,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"Nationality":
{
"fieldLabel": "Nationality",
"aka": "field29",
"validation":
{
"fieldLength": 20,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"SSS Number":
{
"fieldLabel": "SSS No",
"aka": "field30",
"validation":
{
"fieldLength": 20,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"TIN":
{
"fieldLabel": "TIN",
"aka": "field31",
"validation":
{
"fieldLength": 20,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"Commmunity Tax Number":
{
"fieldLabel": "Comm Tax No",
"aka": "field32",
"validation":
{
"fieldLength": 20,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"Place of Issue":
{
"fieldLabel": "Place of Issue",
"aka": "field33",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"Date of Issue":
{
"fieldLabel": "Date of Issue",
"aka": "field34",
"validation":
{
"fieldLength": 25,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"Height":
{
"fieldLabel": "Height",
"aka": "field35",
"validation":
{
"fieldLength": 10,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"Weight":
{
"fieldLabel": "Weight",
"aka": "field36",
"validation":
{
"fieldLength": 10,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"Spoken Languages":
{
"fieldLabel": "Spoken Languages",
"aka": "field38",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
},
"Written Languages":
{
"fieldLabel": "Written Languages",
"aka": "field39",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "",
"mandatory": false
}
}
}
}
}
{
"APPLICATION FORM":
{
"SECTION1":
{
"Date":
{
"fieldLabel": "Date",
"aka": "field2",
"validation":
{
"fieldLength": 20,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Position Applied For":
{
"fieldLabel": "Pos Applied For",
"aka": "field3",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Surname":
{
"fieldLabel": "Surname",
"aka": "field4",
"validation":
{
"fieldLength": 50,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": true
}
},
"First Name":
{
"fieldLabel": "First Name",
"aka": "field5",
"validation":
{
"fieldLength": 50,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Middle Name":
{
"fieldLabel": "Mid Name",
"aka": "field6",
"validation":
{
"fieldLength": 50,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Mother's Maiden Name":
{
"fieldLabel": "Mother's Maiden Name",
"aka": "field7",
"validation":
{
"fieldLength": 100,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Nickname":
{
"fieldLabel": "Nickname",
"aka": "field8",
"validation":
{
"fieldLength": 20,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Email Address":
{
"fieldLabel": "Email",
"aka": "field9",
"validation":
{
"fieldLength": 50,
"collection": "alphanumeric",
"mandatory": true
}
},
"Mobile Number":
{
"fieldLabel": "Mobile No.",
"aka": "field10",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Telephone Number":
{
"fieldLabel": "Tel. No.",
"aka": "field11",
"validation":
{
"fieldLength": 20,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": false
}
},
"Present Address House No":
{
"fieldLabel": "Pres Add House No",
"aka": "field13",
"validation":
{
"fieldLength": 20,
"collection": "alphanumeric",
"invalidchar": "`~!@&$%^*={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Present Address Street":
{
"fieldLabel": "Pres Add Street",
"aka": "field14",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"mandatory": true
}
},
"Present Address Village/Subd":
{
"fieldLabel": "Pres Add Vill/Subd",
"aka": "field15",
"validation":
{
"fieldLength": 50,
"collection": "alphanumeric",
"invalidchar": "`~!@&$%^*={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Present Address Municipality/City/Province":
{
"fieldLabel": "Pres Add Mun/City/Prov",
"aka": "field16",
"validation":
{
"fieldLength": 60,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Years of Stay":
{
"fieldLabel": "Yrs of Stay",
"aka": "field17",
"validation":
{
"fieldLength": 3,
"collection": "numeric",
"mandatory": true
}
},
"Provincial Address House No":
{
"fieldLabel": "Prov Add House No",
"aka": "field19",
"validation":
{
"fieldLength": 20,
"collection": "alphanumeric",
"invalidchar": "`~!@&$%^*={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Provincial Address Street":
{
"fieldLabel": "Prov Add Street",
"aka": "field20",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"mandatory": true
}
},
"Provincial Address Village/Subd":
{
"fieldLabel": "Prov Add Vill/Subd",
"aka": "field21",
"validation":
{
"fieldLength": 50,
"collection": "alphanumeric",
"invalidchar": "`~!@&$%^*={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Provincial Address Municipality/City/Province":
{
"fieldLabel": "Prov Add Mun/City/Prov",
"aka": "field22",
"validation":
{
"fieldLength": 60,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Religion":
{
"fieldLabel": "Religion",
"aka": "field23",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Place of Birth":
{
"fieldLabel": "Place of Birth",
"aka": "field24",
"validation":
{
"fieldLength": 50,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Date of Birth":
{
"fieldLabel": "Date of Birth",
"aka": "field25",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Age":
{
"fieldLabel": "Age",
"aka": "field26",
"validation":
{
"fieldLength": 3,
"collection": "numeric",
"mandatory": true
}
},
"Gender":
{
"fieldLabel": "Gender",
"aka": "field27",
"validation":
{
"fieldLength": 10,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Civil Status":
{
"fieldLabel": "Civil Status",
"aka": "field28",
"validation":
{
"fieldLength": 10,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Nationality":
{
"fieldLabel": "Nationality",
"aka": "field29",
"validation":
{
"fieldLength": 20,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": true
}
},
"SSS Number":
{
"fieldLabel": "SSS No",
"aka": "field30",
"validation":
{
"fieldLength": 20,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": false
}
},
"TIN":
{
"fieldLabel": "TIN",
"aka": "field31",
"validation":
{
"fieldLength": 20,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": false
}
},
"Commmunity Tax Number":
{
"fieldLabel": "Comm Tax No",
"aka": "field32",
"validation":
{
"fieldLength": 20,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": false
}
},
"Place of Issue":
{
"fieldLabel": "Place of Issue",
"aka": "field33",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": false
}
},
"Date of Issue":
{
"fieldLabel": "Date of Issue",
"aka": "field34",
"validation":
{
"fieldLength": 25,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": false
}
},
"Height":
{
"fieldLabel": "Height",
"aka": "field35",
"validation":
{
"fieldLength": 10,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Weight":
{
"fieldLabel": "Weight",
"aka": "field36",
"validation":
{
"fieldLength": 10,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Spoken Languages":
{
"fieldLabel": "Spoken Languages",
"aka": "field38",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Written Languages":
{
"fieldLabel": "Written Languages",
"aka": "field39",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*={}[]:;/\"|\\<>",
"mandatory": true
}
}
}
}
}
{
"ACCOUNTS PAYABLE":
{
"SECTION1":
{
"Business Name":{
"fieldLabel": "Business Name",
"aka": "field110",
"validation":{
"fieldLength": 30,
"collection": "dropdown",
"options": ["Antel", "BDO_CC", "CIAC", "Converge", "Crayon_Software_Experts", "Electric_Bill", "F.A._Bautista_And_Partners", "Globe", "Gsantiago_Commercial_Building", "HSBC", "Payroll", "PLDT", "Sir_Patrick_Security_Services", "Smart", "Source_Telecomms", "UPB_CC", "UPB_Interest_On_Loan", "Vengons_Bldg", "Water_Bill"],
"mandatory": true
}
},
"Date":{
"fieldLabel": "Date",
"aka": "field120",
"validation":{
"fieldLength": 10,
"collection": "datepicker",
"mandatory": true
}
},
"Project Classification":{
"fieldLabel": "Project Classification",
"aka": "field130",
"validation":{
"fieldLength": 0,
"collection": "alphanumeric",
"mandatory": false
}
},
"Amount Due":{
"fieldLabel": "Amt Due/Total Amt/Bal Due",
"aka": "field140",
"validation":{
"fieldLength": 16,
"collection": "alphanumeric",
"invalidchar": "abcdefghijklmnoprqstuvwxzyABCDEFGHIJKLMNOPQRSTUVWXYZ~!@$%^*_+={}[]:;\"|\\<>",
"mandatory": true
}
},
"Due Date":{
"fieldLabel": "Due Date",
"aka": "field150",
"validation":{
"fieldLength": 10,
"collection": "datepicker",
"mandatory": true
}
},
"Description":{
"fieldLabel": "Description",
"aka": "field160",
"validation":{
"fieldLength": 100,
"collection": "alphanumeric",
"mandatory": true
}
},
"Vat Amount":{
"fieldLabel": "VAT/Tax Amt",
"aka": "field170",
"validation":{
"fieldLength": 16,
"collection": "alphanumeric",
"invalidchar": "abcdefghijklmnoprqstuvwxzyABCDEFGHIJKLMNOPQRSTUVWXYZ~!@$%^*_+={}[]:;\"|\\<>",
"mandatory": true
}
}
}
},
"ACCOUNTS RECEIVABLE":{
"SECTION2":{
"To":{
"fieldLabel": "To",
"aka": "field210",
"validation":{
"fieldLength": 50,
"collection": "alphanumeric",
"mandatory": true
}
},
"Project Classification":{
"fieldLabel": "Project Classification",
"aka": "field220",
"validation":{
"fieldLength": 15,
"collection": "dropdown",
"options": ["BPI_KYC", "BPI_CC", "BPI_Banko_KYC", "SEC_ODRS", "SEC_Manual", "PHC", "Culion", "CDC", "Advantage", "Prisma", "NEA", "PHIVOLCS"],
"mandatory": true
}
},
"Date":{
"fieldLabel": "Date",
"aka": "field230",
"validation":{
"fieldLength": 10,
"collection": "datepicker",
"mandatory": true
}
},
"Address":{
"fieldLabel": "Address",
"aka": "field240",
"validation":{
"fieldLength": 100,
"collection": "alphanumeric",
"mandatory": true
}
},
"Invoice number":{
"fieldLabel": "Invoice Number",
"aka": "field250",
"validation":{
"fieldLength": 10,
"collection": "numeric",
"invalidchar": "abcdefghijklmnoprqstuvwxzyABCDEFGHIJKLMNOPQRSTUVWXYZ.,'~!@$%^*_+={}[]:;\"|\\<>",
"mandatory": true
}
},
"P.O. Number":{
"fieldLabel": "P.O. Number",
"aka": "field260",
"validation":{
"fieldLength": 10,
"collection": "numeric",
"invalidchar": "abcdefghijklmnoprqstuvwxzyABCDEFGHIJKLMNOPQRSTUVWXYZ.,'~!@$%^*_+={}[]:;\"|\\<>",
"mandatory": false
}
},
"Description":{
"fieldLabel": "Description",
"aka": "field270",
"validation":{
"fieldLength": 100,
"collection": "alphanumeric",
"mandatory": true
}
},
"Amount 1":{
"fieldLabel": "Amount 1",
"aka": "field280",
"validation":{
"fieldLength": 16,
"collection": "alphanumeric",
"invalidchar": "abcdefghijklmnoprqstuvwxzyABCDEFGHIJKLMNOPQRSTUVWXYZ~!@$%^*_+={}[]:;\"|\\<>",
"mandatory": true
}
},
"Amount 2":{
"fieldLabel": "Amount 2",
"aka": "field281",
"validation":{
"fieldLength": 16,
"collection": "alphanumeric",
"invalidchar": "abcdefghijklmnoprqstuvwxzyABCDEFGHIJKLMNOPQRSTUVWXYZ~!@$%^*_+={}[]:;\"|\\<>",
"mandatory": true
}
},
"Amount 3":{
"fieldLabel": "Amount 3",
"aka": "field282",
"validation":{
"fieldLength": 16,
"collection": "alphanumeric",
"invalidchar": "abcdefghijklmnoprqstuvwxzyABCDEFGHIJKLMNOPQRSTUVWXYZ~!@$%^*_+={}[]:;\"|\\<>",
"mandatory": true
}
},
"Amount 4":{
"fieldLabel": "Amount 4",
"aka": "field283",
"validation":{
"fieldLength": 16,
"collection": "alphanumeric",
"invalidchar": "abcdefghijklmnoprqstuvwxzyABCDEFGHIJKLMNOPQRSTUVWXYZ~!@$%^*_+={}[]:;\"|\\<>",
"mandatory": true
}
},
"Amount 5":{
"fieldLabel": "Amount 5",
"aka": "field284",
"validation":{
"fieldLength": 16,
"collection": "alphanumeric",
"invalidchar": "abcdefghijklmnoprqstuvwxzyABCDEFGHIJKLMNOPQRSTUVWXYZ~!@$%^*_+={}[]:;\"|\\<>",
"mandatory": true
}
}
}
}
}
\ No newline at end of file
{
"SECTION":
{
"Surname":
{
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*._={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Gender":
{
"fieldLabel": "Gender",
"validation":
{
"fieldLength": 1,
"collection": "dropdown",
"options": [],
"mandatory": true
}
},
"Middle_Name":
{
"fieldLabel": "Middle Name"
},
"fieldLabel": "Nickname",
"validation":
{
"fieldLength": 15,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>"
},
"Email_Address":
{
"fieldLabel": "Email Address",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric"
}
}
}
}
\ No newline at end of file
{
"Surname":
{
"fieldLabel": "Surname",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*._={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Middle_Name":
{
"fieldLabel": "Middle Name",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>",
"mandatory": true
}
},
"Nickname":
{
"fieldLabel": "Nickname",
"validation":
{
"fieldLength": 15,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>"
}
},
"Email_Address":
{
"fieldLabel": "Email Address",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric"
}
},
"Mobile_Number":
{
"fieldLabel": "Mobile Number",
"validation":
{
"fieldLength": 15,
"collection": "numeric"
}
},
"Telephone_Number":
{
"fieldLabel": "Telephone Number",
"validation":
{
"fieldLength": 15,
"collection": "numeric"
}
},
"House_Number":
{
"fieldLabel": "House Number",
"validation":
{
"fieldLength": 15,
"collection": "alphanumeric",
"invalidchar": "`~!@&$%^*_={}[]:;\"|\\<>"
}
},
"Street":
{
"fieldLabel": "Street",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>"
}
},
"Village_Subdivision":
{
"fieldLabel": "Village/Subdivision",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>"
}
},
"Municipality_City_Province":
{
"fieldLabel": "Municipality/City/Province",
"validation":
{
"fieldLength": 30,
"collection": "alphanumeric",
"mandatory": true,
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>"
}
},
"Years_of_Stay":
{
"fieldLabel": "Years of Stay",
"validation":
{
"fieldLength": 2,
"collection": "numeric"
}
},
"Religion":
{
"fieldLabel": "Religion",
"validation":
{
"fieldLength": 30,
"collection": "alphabet"
}
},
"Place_of_Birth":
{
"fieldLabel": "Place of Birth",
"validation":
{
"fieldLength": 50,
"collection": "alphanumeric",
"mandatory": true,
"invalidchar": "`~!@#&$%^*_={}[]:;/\"|\\<>"
}
},
"Birthdate":
{
"fieldLabel": "Birthdate",
"validation":
{
"fieldLength": 10,
"collection": "datepicker",
"regexformat": "(^0[0-9]|^1[012])[-](0[0-9]|[12][0-9]|3[01])[-]((19\\d\\d)|(200[0-9])|(201[0-9])|(202[0])|0000)",
"mandatory": true
}
},
"Age":
{
"fieldLabel": "Age",
"validation":
{
"fieldLength": 2,
"collection": "numeric",
"mandatory": true
}
},
"Gender":
{
"fieldLabel": "Gender",
"validation":
{
"fieldLength": 1,
"collection": "dropdown",
"options": [],
"mandatory": true
}
},
"Civil_Status":
{
"fieldLabel": "Civil Status",
"validation":
{
"fieldLength": 15,
"collection": "dropdown",
"options": ["Single", "Married", "Widowed"],
"mandatory": true
}
},
"Nationality":
{
"fieldLabel": "Nationality",
"validation":
{
"fieldLength": 15,
"collection": "dropdown",
"options": ["Filipino", "Foreigner"],
"mandatory": true
}
},
"Height_in_Cm":
{
"fieldLabel": "Height (in cm)",
"validation":
{
"fieldLength": 3,
"collection": "numeric"
}
},
"Weight_in_Kg":
{
"fieldLabel": "Weight (in kg)",
"validation":
{
"fieldLength": 3,
"collection": "numeric"
}
}
}
\ No newline at end of file
const submitForm = (e) => {
try {
global_end_time = new Date().toLocaleString();
let eoe_ts = new Date().toLocaleString();
const Form = Settings.SrcElement(e);
const { elements } = Form
let error = false;
let errorMsg = null;
let doctype;
let section;
// Validate all elements again
for(let element of elements) {
if (element.style.display === 'none') continue
const { id, value,type } = element
const { valid } = validateInput(id, value)
// Skip submit button
if(type==='submit') continue
if(id==='DocType') {
doctype = element.options[element.selectedIndex].text;
continue;
}
if(id==='Section') {
section = element.options[element.selectedIndex].text;
continue;
}
var { isValidValue, errMsg } = checkValidValues(id, value);
if (typeof errMsg !== "undefined") {
errorMsg = errMsg;
}
// Update display of input field if input is not valid
if(!valid) {
error = true
if(type==='select-one') {
continue
}
const field = document.getElementById(id)
const newEvent = new Event('focusout')
field.dispatchEvent(newEvent)
}
if(!isValidValue) {
error = true
const field = document.getElementById(id);
field.classList.remove('input-valid');
field.classList.add('input-invalid');
field.select();
}
}
// Update display of dropdown field if input is not valid
const dropdowns = $('.dropdown-input').select2();
for(let dropdown of dropdowns) {
const newEvent = new Event('select2:close')
dropdown.dispatchEvent(newEvent)
}
if(error) {
if (errorMsg !== null) {
alert(errorMsg);
} else {
alert('Invalid or Missing data on highlighted fields!')
}
return false
}
else {
if(IS_RETRIEVE_FROM_GFS == "Y"){
const container = document.querySelector('#containerModal' + sessionStorage.getItem('gfsCounter'));
const label = container.querySelector("div.tiffViewerHeader .tiffViewerPageInfo label");
File_Name = label.innerText;
File_Path = label.innerText;
}
const metrics = stopMetricCapture();
WriteForm(e, metrics, doctype, section);9
saveMetrics(metrics, eoe_ts);
saveForm(localStorage.getItem("sfIndex"));
[...document.getElementsByClassName("TiffModalContent")].forEach(el => {
while (el.children[1].hasChildNodes()) {
el.children[1].removeChild(el.children[1].firstChild);
}
while (el.children[2].hasChildNodes()) {
el.children[2].removeChild(el.children[2].firstChild);
}
while (el.children[3].hasChildNodes()) {
el.children[3].removeChild(el.children[3].firstChild);
}
});
[...document.getElementsByClassName("bar")].forEach(el => {
el.style.removeProperty('display');
});
document.getElementById("counter").innerHTML = "";
clearTimeout(interval);
isCanvasNotCreated = true;
if(IS_RETRIEVE_FROM_GFS != "Y"){
init();
}else{
var current = document.getElementById('containerModal' + sessionStorage.getItem('gfsCounter'));
current.style.display = 'none';
var next = document.getElementById('containerModal' + (parseInt(sessionStorage.getItem('gfsCounter')) + 1));
if(next){
next.style.display = 'block';
}else{
promptNoFilesLeft();
//disableForm();
}
var counter = parseInt(sessionStorage.getItem('gfsCounter'));
sessionStorage.setItem('gfsCounter', counter + 1);
refresh();
if(currentWindow){currentWindow.close();}
}
return true
}
} catch(err) {
console.log(err)
return false
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
function tiffViewerTest(xhr, overlay, name){
let images = [];
let imagesTranformVal = [];
let tiff = new Tiff({ buffer: xhr });
let pageFlag = 0;
let pages = tiff.countDirectory();
console.log(pages);
let header = document.createElement("div");
header.classList.add("tiffViewerHeader");
let container = document.createElement("div");
container.classList.add("tiffViewerContainer");
let footer = document.createElement("div");
footer.classList.add("tiffViewerFooter");
for (var i = 0; i <= pages; i++) {
let img = document.createElement('img');
img.classList.add("tiffViewerImg");
tiff.setDirectory(i);
var canvas = tiff.toCanvas().toDataURL();
img.src = canvas;
if(i != 0){
img.style.display = "none";
}
images.push(img);
imagesTranformVal.push({scaleX:1,scaleY:1,rotate:0});
container.append(img);
}
overlay.append(header);
overlay.append(container);
overlay.append(footer);
//create Header
let tiffInfoContainer = document.createElement("div");
tiffInfoContainer.classList.add("tiffViewerPageInfo");
let infoLabel = document.createElement("label");
infoLabel.textContent = name;
let pagerContainer = document.createElement("div");
pagerContainer.classList.add("tiffViewerPagePagerContainer");
let prevPage = document.createElement("div");
prevPage.textContent = "<";
let pageLabel = document.createElement("label");
pageLabel.textContent = (pageFlag + 1) + "/" + (images.length - 1);
let nextPage = document.createElement("div");
nextPage.textContent = ">";
tiffInfoContainer.append(infoLabel);
pagerContainer.append(prevPage);
pagerContainer.append(pageLabel);
pagerContainer.append(nextPage);
header.append(tiffInfoContainer);
header.append(pagerContainer);
//create Footer
let fullscreen = document.createElement("button");
fullscreen.textContent = "Fullscreen";
let rotateLeft = document.createElement("button");
rotateLeft.textContent = "Rotate left";
let rotateRight = document.createElement("button");
rotateRight.textContent = "Rotate right";
let flipH = document.createElement("button");
flipH.textContent = "Flip Horizontal";
let flipV = document.createElement("button");
flipV.textContent = "Flip Vertical";
let fitContentButton = document.createElement("button");
fitContentButton.textContent = "Fit Content";
let zoomInButton = document.createElement("button");
zoomInButton.textContent = "Zoom in";
let zoomOutButton = document.createElement("button");
zoomOutButton.textContent = "Zoom out";
footer.append(fullscreen);
footer.append(rotateLeft);
footer.append(rotateRight);
footer.append(flipH);
footer.append(flipV);
footer.append(fitContentButton);
footer.append(zoomInButton);
footer.append(zoomOutButton);
//events
nextPage.addEventListener("click", function(){
if(pageFlag < (images.length - 2) ){
pageFlag++;
}else{
pageFlag = 0;
}
for(let image of images){
image.style.display = "none";
}
console.log(pageFlag);
images[pageFlag].style.display = "block";
pageLabel.textContent = (pageFlag + 1) + "/" + (images.length - 1);
});
prevPage.addEventListener("click", function(){
if(pageFlag != 0 ){
pageFlag--;
}else{
pageFlag = images.length - 2;
}
for(let image of images){
image.style.display = "none";
}
console.log(pageFlag);
images[pageFlag].style.display = "block";
pageLabel.textContent = (pageFlag + 1) + "/" + (images.length - 1);
});
zoomInButton.addEventListener("click", function(){
console.log(images[pageFlag].style.width);
let newWidth = images[pageFlag].width + (images[pageFlag].width * .10);
images[pageFlag].style.width = newWidth + "px";
});
zoomOutButton.addEventListener("click", function(){
console.log(images[pageFlag].style.width);
let newWidth = images[pageFlag].width - (images[pageFlag].width * .10);
if(newWidth< 0){
newWidth = 100;
}
images[pageFlag].style.width = newWidth + "px";
});
fitContentButton.addEventListener("click", function(){
images[pageFlag].style.width = "100%";
});
flipH.addEventListener("click", function(){
let transformVal = imagesTranformVal[pageFlag];
console.log(transformVal);
let scaleX = transformVal.scaleX;
let scaleY = transformVal.scaleY;
let rotate = transformVal.rotate;
if(scaleX === 1){
transformVal.scaleX = -1;
}else{
transformVal.scaleX = 1;
}
images[pageFlag].style.msTransform = "rotate(" + rotate + "deg) scale("+ transformVal.scaleX + ","+ scaleY +")";
images[pageFlag].style.transform = "rotate(" + rotate + "deg) scale("+ transformVal.scaleX + ","+ scaleY +")";
});
flipV.addEventListener("click", function(){
let transformVal = imagesTranformVal[pageFlag];
console.log(transformVal);
let scaleX = transformVal.scaleX;
let scaleY = transformVal.scaleY;
let rotate = transformVal.rotate;
if(scaleY === 1){
transformVal.scaleY = -1;
}else{
transformVal.scaleY = 1;
}
images[pageFlag].style.msTransform = "rotate(" + rotate + "deg) scale("+ scaleX + ","+ transformVal.scaleY +")";
images[pageFlag].style.transform = "rotate(" + rotate + "deg) scale("+ scaleX + ","+ transformVal.scaleY +")";
});
rotateLeft.addEventListener("click", function(){
let transformVal = imagesTranformVal[pageFlag];
console.log(transformVal);
let scaleX = transformVal.scaleX;
let scaleY = transformVal.scaleY;
let rotate = transformVal.rotate;
if(rotate == -270){
transformVal.rotate = 0;
}else{
transformVal.rotate = rotate - 90;
}
images[pageFlag].style.msTransform = "rotate(" + transformVal.rotate + "deg) scale("+ scaleX + ","+ scaleY +")";
images[pageFlag].style.transform = "rotate(" + transformVal.rotate + "deg) scale("+ scaleX + ","+ scaleY +")";
});
rotateRight.addEventListener("click", function(){
let transformVal = imagesTranformVal[pageFlag];
console.log(transformVal);
let scaleX = transformVal.scaleX;
let scaleY = transformVal.scaleY;
let rotate = transformVal.rotate;
if(rotate == 270){
transformVal.rotate = 0;
}else{
transformVal.rotate = rotate + 90;
}
images[pageFlag].style.msTransform = "rotate(" + transformVal.rotate + "deg) scale("+ scaleX + ","+ scaleY +")";
images[pageFlag].style.transform = "rotate(" + transformVal.rotate + "deg) scale("+ scaleX + ","+ scaleY +")";
});
fullscreen.addEventListener("click", function(){
if (overlay.requestFullscreen) {
overlay.requestFullscreen();
} else if (overlay.webkitRequestFullscreen) { /* Safari */
overlay.webkitRequestFullscreen();
} else if (overlay.msRequestFullscreen) { /* IE11 */
overlay.msRequestFullscreen();
}
});
}
\ No newline at end of file
.tiffViewerContainer {
margin: auto;
/* height: calc(100% - 60px); */
width: 70%;
position: relative;
display: block;
overflow: auto;
}
.tiffViewerHeader {
margin: auto;
height: 30px;
width: 70%;
display: block;
background-color: #686868;
}
.tiffViewerFooter{
margin: auto;
height: 30px;
width: 70%;
display: block;
background-color: #ffffff;
}
.tiffViewerImg{
display: block;
width: 100%;
margin-bottom: 4px;
margin: auto;
}
.tiffViewerPageInfo{
height: calc(100% - 4px);
text-align: left;
text-indent: 7px;
padding-top: 4px;
display: inline-block;
width: calc(100% - 200px);
position: relative;
vertical-align: top;
}
.tiffViewerPageInfo label{
color: white;
font-size: 18px;
}
.tiffViewerPagePagerContainer{
width: 200px;
display: inline-block;
height: 100%;
}
.tiffViewerPagePagerContainer div{
width: 30px;
height: calc(100% - 3px);
font-size: 20px;
font-weight: bolder;
color: white;
padding-top: 3px;
display: inline-block;
background-color: #353535;
cursor: pointer;
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Old versions of Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently
supported by Chrome, Edge, Opera and Firefox */
}
.tiffViewerPagePagerContainer div:hover{
-webkit-transform: scale(1.1);
transform: scale(1.1);
}
.tiffViewerPagePagerContainer div:active{
-webkit-transform: scale(1.0);
transform: scale(1.0);
}
.tiffViewerPagePagerContainer label{
font-size: 17px;
font-weight: bolder;
color: white;
padding-top: 3px;
display: inline-block;
cursor: pointer;
margin-left: 10px;
margin-right: 10px;
}
.tiffViewerFooter button{
border: 1px solid gray;
width: fit-content;
height: 26px;
font-size: 15px;
margin-top: 2px;
cursor:pointer;
}
.tiffViewerFooter button:hover{
-webkit-transform: scale(1.1);
transform: scale(1.1);
}
.tiffViewerFooter button:active{
-webkit-transform: scale(1.0);
transform: scale(1.0);
}
/**
* AUTHOR: btsfelizardo
* DATE: 15 July 2022
* DESCRIPTION: WG-20: User: Validate input based on lookup tables and rules in schema. The main function
* is validateInput(fieldID, value), which checks if the validation is available for a given field
* fieldID then validates the value based on the collection stated in the validation. The function
* will always return an object with at keys: valid (Boolean) and errors (List). Value will specify
* whether the given parameter value is valid or not. errors will contain all errors detected if
* valid is false.
*/
/**
*
* @param {*} fieldID
* Key of input field in schema. Expected to be ID of the element.
* @param {*} value
* Actual input value
* @returns
* object containg:
* valid - true if no errors found after validation
* errors - list of errors found during validation
*/
// const validateInput = (fieldName, value, schema) => {
const validateInput = (fieldID, value) => {
try {
const { valid, error } = validateSchema()
if(!valid) return { valid: false, error: [`${error}`]}
const validation = getValidation(fieldID)
if(!validation) return { valid: false, error: [`FieldName: '${fieldID}' not in schema`] }
switch(validation.collection) {
case 'alphanumeric':
return validateAlphanumeric(validation, value)
case 'alphabet':
return validateAlphabet(validation, value)
case 'specific':
case 'dropdown':
return validateSpecific(validation, value)
case 'numeric':
return validateNumeric(validation, value)
case 'date':
case 'datepicker':
// console.log('date')
return validateDate(validation, value)
break
default:
return { valid: false, error: [`Collection of allowed values for field: ${fieldID} not found`]}
}
} catch(err) {
return { valid: false, error: [err]}
}
}
/**
*
* @param {*} fieldID
* Key of input field in schema. Expected to be ID of the element.
* @returns
* validation of given key in schema
*/
const getValidation = (fieldID) => {
// const { SECTION } = schema
let section = schema[sessionStorage.getItem("currentDoctype").replaceAll("_"," ")][sessionStorage.getItem("currentSection").replaceAll("_"," ")];
try{
if (Object.keys(section).includes(fieldID)) return section[fieldID].validation;
return null;
} catch(err) {
return null
}
}
/**
*
* @param {*} validation
* object containing rules for validating alphanumeric inputs
* @param {*} value
* input to be checked
* @returns
* object containg:
* valid - true if no errors found after validation
* errors - list of errors found during validation
*/
const validateAlphanumeric = (validation, value) => {
let errors = []
const { mandatory, fieldLength, invalidchar } = validation
try {
if(mandatory && (value.length===0 || !value.match(/\S/g))) return { valid: false, errors: ['Field is empty'] }
if(fieldLength && value.length>fieldLength) errors = [...errors, 'Input exceed maximum characters']
if(invalidchar) {
// method for escaping characters
// source: https://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
const escaped_pattern = invalidchar.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g, '\\$&')
const pattern = new RegExp(`[${escaped_pattern}]`)
if(pattern.test(value)) errors = [...errors, 'Contain invalid character/s']
}
return {
valid: errors.length===0,
errors
}
} catch(err) {
throw err
}
}
/**
*
* @param {*} validation
* object containing rules for validating alphabet inputs
* @param {*} value
* input to be checked
* @returns
* object containg:
* valid - true if no errors found after validation
* errors - list of errors found during validation
*/
const validateAlphabet = (validation, value) => {
const PATTERN_ALPHABET = /[^A-Za-z\s]/g
let errors = []
const { mandatory, fieldLength } = validation
if(mandatory && (value.length===0 || !value.match(/\S/g))) return { valid: false, errors: ['Field is empty'] }
if(fieldLength && value.length>fieldLength) errors = [...errors, 'Input exceed maximum characters']
if(PATTERN_ALPHABET.test(value)) errors = [...errors, 'Contain invalid character/s']
return {
valid: errors.length===0,
errors
}
}
/**
*
* @param {*} validation
* object containing rules for validating numeric inputs
* @param {*} value
* input to be checked
* @returns
* object containg:
* valid - true if no errors found after validation
* errors - list of errors found during validation
*/
const validateNumeric = (validation, value) => {
const PATTERN_NUMERIC = /[^0-9/-]/g
let errors = []
const { mandatory, fieldLength } = validation
try {
if(mandatory && (value.length===0 || !value.match(/\S/g))) return { valid: false, errors: ['Field is empty'] }
if(fieldLength && value.length>fieldLength) errors = [...errors, 'Input exceed maximum characters']
if(PATTERN_NUMERIC.test(value)) errors = [...errors, 'Contain invalid character/s']
return {
valid: errors.length===0,
errors
}
} catch(err) {
throw err
}
}
/**
*
* @param {*} validation
* object containing rules for validating date inputs
* @param {*} value
* input to be checked
* @returns
* object containg:
* valid - true if no errors found after validation
* errors - list of errors found during validation
*/
const validateDate = (validation, value) => {
const { mandatory, regexformat } = validation
try{
if(mandatory && (value.length===0 || !value.match(/\S/g))) return { valid: false, errors: ['Field is empty'] }
return { valid: true }
} catch(err) {
throw err
}
}
/**
*
* @param {*} validation
* object containing rules for validating specific or dropdown inputs
* @param {*} value
* input to be checked
* @returns
* object containg:
* valid - true if no errors found after validation
* errors - list of errors found during validation
*/
const validateSpecific = (validation, value) => {
const { mandatory, validchars, options } = validation
try {
if(mandatory && (value.length===0 || !value.match(/\S/g))) return { valid: false, errors: ['Field is empty'] }
if(validchars && validchars.includes(value)) return { valid: true }
if(options && options.includes(value)) return {valid: true }
if(!mandatory) return { valid: true }
return { valid: false, errors: ['Not an option'] }
} catch(err) {
throw err
}
}
const checkValidValues = (fieldID, value) => {
try {
const validation = getValidation(fieldID);
if(!validation) return { isValidValue: false, errMsg: [`FieldName: '${fieldID}' not in schema`] };
if(typeof validation.validvalues !== "undefined") {
let validValues = validation.validvalues;
const result = validValues.findIndex(item => value.toUpperCase() === item.toUpperCase());
if (result !== -1) {
return { isValidValue: true };
} else {
return { isValidValue: false, errMsg: [`'${value}' is not a valid value. Choose between ${validValues}`] };
}
}
return { isValidValue: true };
} catch(err) {
return { isValidValue: false, errMsg: [err]}
}
}
const getSource = (fieldID) => {
// const { SECTION } = schema
let section = schema[sessionStorage.getItem("currentDoctype").replaceAll("_"," ")][sessionStorage.getItem("currentSection").replaceAll("_"," ")];
try{
if (Object.keys(section).includes(fieldID)) return section[fieldID].source;
return null;
} catch(err) {
return null
}
}
\ No newline at end of file
const validateSchema = () => {
const validate = schema[sessionStorage.getItem("currentDoctype").replaceAll("_"," ")]
if(!validate) return { valid: false, error: 'SECTION is missing!' }
return { valid: true }
}
\ No newline at end of file
import { createLoadingScreen, resetGDE } from "../../script.js";
import { SCHEMA_FILE_PATH } from "../DataInputWidget/config.js";
import { validateInput } from "../DataInputWidget/validateInput.js";
import { PROJECT_CODE } from "../Submit/config.js";
import { ENCODING_PASS, REASON_LIST, SCHEMA_FILE } from "../config.js";
import { ENCODING_PASS, REASON_LIST } from "../config.js";
import { createInfoModal, createModal } from "../genericPopup/genericPopup.js";
import { BPO_OBJECT, IMAGE_VIEWER_OBJECT, INDEXED_DB_STORAGE } from "../globalVariable.js";
import { getRejectElement } from "./bpoService.js";
......@@ -321,7 +322,7 @@ function saveExceptionToXml(){
"projCode": PROJECT_CODE,
"userId": sessionStorage.getItem("user_id"),
"elementId": elementId,
"schema": SCHEMA_FILE,
"schema": SCHEMA_FILE_PATH,
"totalRec": urls.length,
"maxRec": "1",
"totalKeystroke": 0,
......
import { createLoadingScreen, removeLoadingScreen, resetGDE } from "../../script.js";
import { SCHEMA_FILE_PATH } from "../DataInputWidget/config.js";
import { validateInput } from "../DataInputWidget/validateInput.js";
import { PROJECT_CODE } from "../Submit/config.js";
import { interval } from "../captureMetrics/captureMetrics.js";
import { SCHEMA_FILE } from "../config.js";
import { createInfoModal, createModal } from "../genericPopup/genericPopup.js";
import { BPO_OBJECT, IMAGE_VIEWER_OBJECT, INDEXED_DB_STORAGE } from "../globalVariable.js";
import { getUrlReturnElement } from "./bpoService.js";
......@@ -59,7 +59,7 @@ function returnSaveXML(){
"projCode": PROJECT_CODE,
"userId": sessionStorage.getItem("user_id"),
"elementId": elementId,
"schema": SCHEMA_FILE,
"schema": SCHEMA_FILE_PATH,
"totalRec": filePaths.length,
"maxRec": "1",
"totalKeystroke": 0,
......
//Data Input Field Config
export var SCHEMA_FILE_PATH = "./WebGde-Widgets/sample_schema/HR Speed Test schema.json";
export var SCHEMA_FILE_PATH = "./WebGde-Widgets/sample_schema/NKTI_Schema.json";
//DBLookup Webservice URL
export var DB_URL = "http://localhost:8080/WebGde/svc/gfs-rest/db-lookup"
\ No newline at end of file
......@@ -337,6 +337,96 @@ const inputNumeric = (key, validation) => {
* @returns
* created input field element
*/
const inputTime = (key, validation) => {
try {
const {
mandatory,
fieldLength
} = validation
//input element with type time
const input = document.createElement('input')
input.setAttribute('id', `${key}`)
input.setAttribute('name', `${key}`)
input.setAttribute('type', 'time')
input.addEventListener('focusout', handleInput)
mandatory ? input.setAttribute('required', 'true') : null
return input
} catch (err) {
throw err
}
}
/**
*
* @param {*} key
* will serve as id of input field
* @param {*} validation
* validation of field from schema
* @returns
* created input field element
*/
const inputDateRange = (key, validation) => { //Input date range is a field mainly consist of input element of type time.
try {
const {
mandatory,
fieldLength
} = validation
const dateRangePicker = document.createElement('div')
const dateRange = document.createElement('div')
const input = document.createElement('input')
const startDate = document.createElement('div')
const dash = document.createElement('label')
const input2 = document.createElement('input')
const endDate = document.createElement('div')
dateRangePicker.classList.add('date-rangepicker');
dateRange.classList.add('date-range');
//Attributes of the start date
input.setAttribute('id', `${key}`)
input.setAttribute('name', 'startDate')
input.setAttribute('type', 'date')
input.addEventListener('focusout', handleInput)
mandatory ? input.setAttribute('required', 'true') : null
startDate.setAttribute('class', 'dateContainer')
// "TO" Label
dash.setAttribute('class', 'dash')
dash.innerHTML = ' to '
//Attributes of the end date
input2.setAttribute('id', `${key}`)
input2.setAttribute('name', 'endDate')
input2.setAttribute('type', 'date')
input2.addEventListener('focusout', handleInput)
mandatory ? input2.setAttribute('required', 'true') : null
endDate.setAttribute('class', 'dateContainer')
dateRangePicker.appendChild(dateRange);
startDate.appendChild(input);
dateRange.appendChild(startDate);
dateRange.appendChild(dash)
endDate.appendChild(input2);
dateRange.appendChild(endDate);
return dateRangePicker
} catch (err) {
throw err
}
}
/**
*
* @param {*} key
* will serve as id of input field
* @param {*} validation
* validation of field from schema
* @returns
* created input field element
*/
const inputDate = (key, validation) => {
try {
const {
......@@ -367,6 +457,164 @@ const inputDate = (key, validation) => {
* @returns
* created input field element
*/
const inputChecklist = (key, validation) => {
try {
const { mandatory, items } = validation;
var dropdown1 = document.createElement('div');
dropdown1.classList.add('dropdown');
var dropdownContent = document.createElement('div');
dropdownContent.classList.add('dropdown-content');
dropdown1.appendChild(dropdownContent);
// Create the checkboxes for each item
items.forEach(function (item, index) {
var div = document.createElement('div');
div.classList.add('checkbox');
var checkbox = document.createElement('input');
checkbox.type = 'checkbox';
checkbox.name = 'checkboxChoices';
checkbox.value = item;
if (index == 0) checkbox.setAttribute('id', `${key}`);
div.appendChild(checkbox);
var label = document.createTextNode(item);
div.appendChild(label);
dropdownContent.appendChild(div)
})
// Create the checkbox dependent on an input text value
var dependentDiv = document.createElement('div');
dependentDiv.classList.add('checkbox');
var dependentCheckbox = document.createElement('input');
dependentCheckbox.type = 'checkbox';
dependentCheckbox.name = 'checkboxChoices';
dependentCheckbox.id = 'checkDP';
dependentCheckbox.value = ''; // Set the value here based on the input text
dependentDiv.appendChild(dependentCheckbox);
var dependentLabel = document.createTextNode('other');
dependentDiv.appendChild(dependentLabel);
dropdownContent.appendChild(dependentDiv);
// Initially hide the input text box
var inputTextBox = document.createElement('input');
inputTextBox.type = 'text';
inputTextBox.id = 'dependentTB';
inputTextBox.style.display = 'none';
inputTextBox.style.padding = '0px';
dropdownContent.appendChild(inputTextBox);
// Add event listener to the "other" checkbox
dependentCheckbox.addEventListener('change', function () {
if (dependentCheckbox.checked) {
inputTextBox.style.display = 'inline-block';
} else {
inputTextBox.style.display = 'none'; // Hide the input text box when "other" checkbox is unchecked
}
// Update the value of the dependentCheckbox when the input value changes
dependentCheckbox.value = inputTextBox.value;
});
inputTextBox.addEventListener("input", event => {
dependentCheckbox.value = event.target.value;
});
return dropdown1;
} catch (err) {
throw err;
}
}
/**
*
* @param {*} key
* will serve as id of input field
* @param {*} validation
* validation of field from schema
* @returns
* created input field element
*/
const inputRadiolist = (key, validation) => {
try {
const { mandatory, items } = validation;
var dropdown1 = document.createElement('div');
dropdown1.classList.add('dropdown');
var dropdownContent = document.createElement('div');
dropdownContent.classList.add('dropdown-content');
dropdown1.appendChild(dropdownContent);
// Create radio buttons for each item
items.forEach((item, index) => {
var radioDiv = document.createElement('div');
radioDiv.classList.add('radio-like-checkbox');
var radio = document.createElement('input');
radio.type = 'radio';
radio.name = 'radioChoices';
radio.value = item;
if (index == 0) radio.setAttribute('id', `${key}`);
var label = document.createTextNode(item);
radioDiv.appendChild(radio);
radioDiv.appendChild(label);
dropdownContent.appendChild(radioDiv);
});
// Create the radio button dependent on an input text value
var dependentDiv = document.createElement('div');
dependentDiv.classList.add('radio-like-checkbox');
var dependentRadio = document.createElement('input');
dependentRadio.type = 'radio';
dependentRadio.name = 'radioChoices';
dependentRadio.value = '';
dependentDiv.appendChild(dependentRadio);
var dependentLabel = document.createTextNode('other');
dependentDiv.appendChild(dependentLabel);
dropdownContent.appendChild(dependentDiv);
var inputTextBox = document.createElement('input');
inputTextBox.type = 'text';
inputTextBox.id = 'dependentTB';
inputTextBox.style.display = 'none';
inputTextBox.style.padding = '0px';
dropdownContent.appendChild(inputTextBox);
// Add event listener to the "other" radio button
dependentRadio.addEventListener('change', function () {
if (dependentRadio.checked) {
inputTextBox.style.display = 'inline-block';
} else {
inputTextBox.style.display = 'none'; // Hide the input text box when "other" radio button is unchecked
}
});
inputTextBox.addEventListener("input", event => {
if (dependentRadio.checked) {
dependentRadio.value = event.target.value;
}
});
return dropdown1;
} catch (err) {
throw err;
}
}
/**
*
* @param {*} key
* will serve as id of input field
* @param {*} validation
* validation of field from schema
* @returns
* created input field element
*/
const inputDropdown = (key, validation) => {
try {
const {
......@@ -583,6 +831,18 @@ const deconstruct = async (section, container, classAttribute) => {
case 'dblookup':
input = await inputDbLookup(key, validation)
break
case 'checklist':
input = inputChecklist(key, validation)
break
case 'radiolist':
input = inputRadiolist(key, validation)
break
case 'timepicker':
input = inputTime(key, validation)
break
case 'daterange':
input = inputDateRange(key, validation)
break
default:
input = noValidation()
break
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment