Commit 32f89783 by Owen Ryan Ang

schema updates. changed logic for completeness check for image fields.

parent 8b7ea4da
import { createConfirmationModal } from "../../genericPopup/genericPopup.js"; import { createConfirmationModal } from "../../genericPopup/genericPopup.js";
import { toggleSubmit } from "../generateFields.js";
export function processCapture(key, imgFilename, imgFileSize) { export function processCapture(key, imgFilename, imgFileSize) {
const form = document.getElementById('fields'); const form = document.getElementById('fields');
...@@ -74,6 +75,8 @@ export function processCapture(key, imgFilename, imgFileSize) { ...@@ -74,6 +75,8 @@ export function processCapture(key, imgFilename, imgFileSize) {
hiddenFileContentInput.value = img.src; // This will store the base64-encoded content of the file hiddenFileContentInput.value = img.src; // This will store the base64-encoded content of the file
hiddenFileContentInput.display = ''; hiddenFileContentInput.display = '';
toggleSubmit();
document.getElementById(`${key}_container`).style.display = 'none'; document.getElementById(`${key}_container`).style.display = 'none';
function deleteImage(){ function deleteImage(){
...@@ -85,6 +88,7 @@ export function processCapture(key, imgFilename, imgFileSize) { ...@@ -85,6 +88,7 @@ export function processCapture(key, imgFilename, imgFileSize) {
// Clear the hidden fields // Clear the hidden fields
hiddenFnameInput.remove(); hiddenFnameInput.remove();
hiddenFileContentInput.remove(); hiddenFileContentInput.remove();
toggleSubmit();
} }
document.getElementById(`${key}_x`).addEventListener('click', ()=> { document.getElementById(`${key}_x`).addEventListener('click', ()=> {
......
...@@ -1851,7 +1851,7 @@ const handleInput = (event) => { ...@@ -1851,7 +1851,7 @@ const handleInput = (event) => {
} }
} }
async function toggleSubmit(){ export async function toggleSubmit(){
let submitButton = document.getElementById("submitButton"); let submitButton = document.getElementById("submitButton");
let validateResponse = await validateForm(); let validateResponse = await validateForm();
if(validateResponse){ if(validateResponse){
......
...@@ -271,7 +271,7 @@ body { ...@@ -271,7 +271,7 @@ body {
align-items: center; align-items: center;
} }
.line { .line-pulltab {
width: 25%; width: 25%;
height: 7px; /* Adjust the thickness of the line as needed */ height: 7px; /* Adjust the thickness of the line as needed */
background-color: #E5E8EC; background-color: #E5E8EC;
......
...@@ -525,7 +525,7 @@ export class ElementListWidget { ...@@ -525,7 +525,7 @@ export class ElementListWidget {
// Create a div for line of the pull tab // Create a div for line of the pull tab
const lineDiv = document.createElement('div'); const lineDiv = document.createElement('div');
lineDiv.classList.add('line'); lineDiv.classList.add('line-pulltab');
// Append pulltab to container // Append pulltab to container
pullTab.appendChild(lineDiv); pullTab.appendChild(lineDiv);
......
...@@ -4,7 +4,7 @@ import { checkValidValues, validateInput, validateReturnInput } from "../DataInp ...@@ -4,7 +4,7 @@ import { checkValidValues, validateInput, validateReturnInput } from "../DataInp
import { goBackToElementListViewer } from "../ElementListWidget/ElementListWidget.js"; import { goBackToElementListViewer } from "../ElementListWidget/ElementListWidget.js";
import { uploadFile } from "../FileUpload/fileUpload.js"; import { uploadFile } from "../FileUpload/fileUpload.js";
import { createLoadingModal, removeLoadingModal } from "../LoadingModal/LoadingModal.js"; import { createLoadingModal, removeLoadingModal } from "../LoadingModal/LoadingModal.js";
import { IS_RETRIEVE_FROM_BPO, SHOW_ELEMENT_LIST_VIEWER, USERID_FIELD } from "../config.js"; import { IS_RETRIEVE_FROM_BPO, PROD_OUTPUT_UNIT, SHOW_ELEMENT_LIST_VIEWER, USERID_FIELD } from "../config.js";
import { createConfirmationModal, createErrorModal, createInfoModal } from "../genericPopup/genericPopup.js"; import { createConfirmationModal, createErrorModal, createInfoModal } from "../genericPopup/genericPopup.js";
import { DISPLAY_FIELD_OBJECT } from "../globalVariable.js"; import { DISPLAY_FIELD_OBJECT } from "../globalVariable.js";
import { Settings } from "./XMLWriter/Global.js"; import { Settings } from "./XMLWriter/Global.js";
...@@ -381,7 +381,7 @@ function validateMedia(key) { ...@@ -381,7 +381,7 @@ function validateMedia(key) {
export async function completeToNextNode(elementId) { export async function completeToNextNode(elementId) {
let requestJSON = { let requestJSON = {
"productionOutputUnits": { "productionOutputUnits": {
"KEYSTROKE": { [PROD_OUTPUT_UNIT]: {
"outputCount": 0, "outputCount": 0,
"errorCount": 0 "errorCount": 0
} }
......
...@@ -24,12 +24,10 @@ export const OUTPUT_FILE_EXTENSION = ".DTA" ...@@ -24,12 +24,10 @@ export const OUTPUT_FILE_EXTENSION = ".DTA"
//BPO CONFIG //BPO CONFIG
export const IS_RETRIEVE_FROM_BPO = "N" export const IS_RETRIEVE_FROM_BPO = "N"
// export const BPO_URL = "http://35.171.20.94:8080/bpo-sqa/"
// export const CURRENT_NODE = "Web GDE"
export let BPO_URL = DOMAIN + "bpo/"; export let BPO_URL = DOMAIN + "bpo/";
// export const CURRENT_NODE = "Web_GDE_DEV"
export let CURRENT_NODE = "" export let CURRENT_NODE = ""
export const ENCODING_PASS = "PASS1" export const ENCODING_PASS = "PASS1"
export const PROD_OUTPUT_UNIT = "INSPECTION"
export const NEXT_NODE = "INSPECTED" export const NEXT_NODE = "INSPECTED"
export const EXCEPTION_NODE = "CANCELLED" export const EXCEPTION_NODE = "CANCELLED"
export const SHOW_ELEMENT_LIST_VIEWER = "N" export const SHOW_ELEMENT_LIST_VIEWER = "N"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA23REfMQ/vghZ1EyHa4cDtSSQdcOHcqXKg7U8JPhqIs+cBt4lKWDaGmroQVxcTjIDz53ZwmmVc9KKEvAwfWM2GEl8VUM9/GszkkDHgY3qEos/4ESO2tWb8Jk6RSPUVJeXRSEOPrjUlvcXust23PXh5rInzfNNowUEkiidVX1jxdvyJq3qHMVzlMpiyJi3X7Lnb20QrMGqxUyCfmewGzlzYeCG5Wk2SjVy9Yog6p3+lbJUBUYZU+/AAtVhtT4Rj4JHtunR5ZDyjNjQkrAYNIFWYlTfZDdWZb1HLAOzpIK27QUC7q9+DzgtirE1xY3h6NJryLUX89Q9MB+VsZQX/4Mb7QIDAQAB MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAijGUjaY12S9AfkZJ4tTiSqPIBdDxWLXfkAAsKCQKstPGvd3rkPKXS+LZJzQq1nnro7pAOk1fjiqWs2TnDxuyOuDhQatSlfPQavEgSjzAC876wSXbtP8OfhPZGs+DnYSKElIUPV+mokaok2BBhmWwXbTA02Gmq30qVjzmOxppwle9XvGD1wvFVy4GlNDoFHmg8dtg7VmbGLTXc+FYOUKnFSAfW8z0KyKK53A8XR1UssO4o9gLQGP0VX0m5Mrb3D/I+vaSXcAzzyv2WRIOa49AuPx+m8IJnRb/CdY7tM0wZcrRwjC02sQk0VHG9Fg9lOk9wXytaq8GLPoRq5f4zZsPvwIDAQAB
\ No newline at end of file \ No newline at end of file
import { createConfirmationModal } from "../../genericPopup/genericPopup.js"; import { createConfirmationModal } from "../../genericPopup/genericPopup.js";
import { toggleSubmit } from "../generateFields.js";
export function processCapture(key, imgFilename, imgFileSize) { export function processCapture(key, imgFilename, imgFileSize) {
const form = document.getElementById('fields'); const form = document.getElementById('fields');
...@@ -74,6 +75,8 @@ export function processCapture(key, imgFilename, imgFileSize) { ...@@ -74,6 +75,8 @@ export function processCapture(key, imgFilename, imgFileSize) {
hiddenFileContentInput.value = img.src; // This will store the base64-encoded content of the file hiddenFileContentInput.value = img.src; // This will store the base64-encoded content of the file
hiddenFileContentInput.display = ''; hiddenFileContentInput.display = '';
toggleSubmit();
document.getElementById(`${key}_container`).style.display = 'none'; document.getElementById(`${key}_container`).style.display = 'none';
function deleteImage(){ function deleteImage(){
...@@ -85,6 +88,7 @@ export function processCapture(key, imgFilename, imgFileSize) { ...@@ -85,6 +88,7 @@ export function processCapture(key, imgFilename, imgFileSize) {
// Clear the hidden fields // Clear the hidden fields
hiddenFnameInput.remove(); hiddenFnameInput.remove();
hiddenFileContentInput.remove(); hiddenFileContentInput.remove();
toggleSubmit();
} }
document.getElementById(`${key}_x`).addEventListener('click', ()=> { document.getElementById(`${key}_x`).addEventListener('click', ()=> {
......
...@@ -1851,7 +1851,7 @@ const handleInput = (event) => { ...@@ -1851,7 +1851,7 @@ const handleInput = (event) => {
} }
} }
async function toggleSubmit(){ export async function toggleSubmit(){
let submitButton = document.getElementById("submitButton"); let submitButton = document.getElementById("submitButton");
let validateResponse = await validateForm(); let validateResponse = await validateForm();
if(validateResponse){ if(validateResponse){
......
...@@ -271,7 +271,7 @@ body { ...@@ -271,7 +271,7 @@ body {
align-items: center; align-items: center;
} }
.line { .line-pulltab {
width: 25%; width: 25%;
height: 7px; /* Adjust the thickness of the line as needed */ height: 7px; /* Adjust the thickness of the line as needed */
background-color: #E5E8EC; background-color: #E5E8EC;
......
...@@ -525,7 +525,7 @@ export class ElementListWidget { ...@@ -525,7 +525,7 @@ export class ElementListWidget {
// Create a div for line of the pull tab // Create a div for line of the pull tab
const lineDiv = document.createElement('div'); const lineDiv = document.createElement('div');
lineDiv.classList.add('line'); lineDiv.classList.add('line-pulltab');
// Append pulltab to container // Append pulltab to container
pullTab.appendChild(lineDiv); pullTab.appendChild(lineDiv);
......
...@@ -24,10 +24,7 @@ export const OUTPUT_FILE_EXTENSION = ".DTA" ...@@ -24,10 +24,7 @@ export const OUTPUT_FILE_EXTENSION = ".DTA"
//BPO CONFIG //BPO CONFIG
export const IS_RETRIEVE_FROM_BPO = "Y" export const IS_RETRIEVE_FROM_BPO = "Y"
// export const BPO_URL = "http://35.171.20.94:8080/bpo-sqa/"
// export const CURRENT_NODE = "Web GDE"
export let BPO_URL = DOMAIN + "bpo/"; export let BPO_URL = DOMAIN + "bpo/";
// export const CURRENT_NODE = "Web_GDE_DEV"
export let CURRENT_NODE = "" export let CURRENT_NODE = ""
export const ENCODING_PASS = "PASS1" export const ENCODING_PASS = "PASS1"
export const PROD_OUTPUT_UNIT = "INSPECTION" export const PROD_OUTPUT_UNIT = "INSPECTION"
...@@ -37,7 +34,7 @@ export const SHOW_ELEMENT_LIST_VIEWER = "Y" ...@@ -37,7 +34,7 @@ export const SHOW_ELEMENT_LIST_VIEWER = "Y"
export const ADD_NEW_OPTION = "N" export const ADD_NEW_OPTION = "N"
export const DISPLAYED_DETAILS = "inspectionType|businessAddress" //pipe-delimited export const DISPLAYED_DETAILS = "inspectionType|businessAddress" //pipe-delimited
export const USERID_FIELD = "inspectorUsername" export const USERID_FIELD = "inspectorUsername"
export const ENABLE_PRINT = "N" export const ENABLE_PRINT = "Y"
export const PDF_EXTENSION = ".pdf" export const PDF_EXTENSION = ".pdf"
export const JPG_EXTENSION = ".jpg" export const JPG_EXTENSION = ".jpg"
......
...@@ -760,6 +760,12 @@ ...@@ -760,6 +760,12 @@
"mandatory" : false "mandatory" : false
} }
}, },
"noise_nuisance_management": {
"fieldLabel" : "Noise Nuisance Management",
"validation" : {
"collection" : "title"
}
},
"soundproofing" : { "soundproofing" : {
"fieldLabel" : "Soundproofing", "fieldLabel" : "Soundproofing",
"aka" : "field75", "aka" : "field75",
...@@ -770,6 +776,15 @@ ...@@ -770,6 +776,15 @@
"mandatory" : true "mandatory" : true
} }
}, },
"potential_noise_source" : {
"fieldLabel" : "Potential Noise Source",
"aka" : "field178",
"validation" : {
"fieldLength" : 20.0,
"collection" : "alphanumeric",
"mandatory" : false
}
},
"permitting_requirements_header": { "permitting_requirements_header": {
"fieldLabel" : "Permitting Requirements", "fieldLabel" : "Permitting Requirements",
"validation" : { "validation" : {
...@@ -860,9 +875,37 @@ ...@@ -860,9 +875,37 @@
"mandatory" : false "mandatory" : false
} }
}, },
"certificate_of_exemption" : {
"fieldLabel" : "Certificate of Exemption",
"aka" : "field82",
"validation" : {
"fieldLength" : 1.0,
"collection" : "radiolist",
"items" : [ "Yes", "No", "Not Required" ],
"mandatory" : true
}
},
"certificate_of_exemption_issuance_date" : {
"fieldLabel" : "Certificate of Exemption Issuance Date",
"aka" : "field180",
"validation" : {
"fieldLength" : 10.0,
"collection" : "datepicker",
"mandatory" : false
}
},
"certificate_of_exemption_photo" : {
"fieldLabel" : "Capture Certificate of Exemption Photo",
"aka" : "field181",
"validation" : {
"fieldLength" : 1.0,
"collection" : "image-capture",
"mandatory" : false
}
},
"llda_discharge_permit" : { "llda_discharge_permit" : {
"fieldLabel" : "LLDA Discharge Permit", "fieldLabel" : "LLDA Discharge Permit",
"aka" : "field85", "aka" : "field182",
"validation" : { "validation" : {
"fieldLength" : 1.0, "fieldLength" : 1.0,
"collection" : "radiolist", "collection" : "radiolist",
......
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