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 { toggleSubmit } from "../generateFields.js";
export function processCapture(key, imgFilename, imgFileSize) {
const form = document.getElementById('fields');
......@@ -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.display = '';
toggleSubmit();
document.getElementById(`${key}_container`).style.display = 'none';
function deleteImage(){
......@@ -85,6 +88,7 @@ export function processCapture(key, imgFilename, imgFileSize) {
// Clear the hidden fields
hiddenFnameInput.remove();
hiddenFileContentInput.remove();
toggleSubmit();
}
document.getElementById(`${key}_x`).addEventListener('click', ()=> {
......
......@@ -1851,7 +1851,7 @@ const handleInput = (event) => {
}
}
async function toggleSubmit(){
export async function toggleSubmit(){
let submitButton = document.getElementById("submitButton");
let validateResponse = await validateForm();
if(validateResponse){
......
......@@ -271,7 +271,7 @@ body {
align-items: center;
}
.line {
.line-pulltab {
width: 25%;
height: 7px; /* Adjust the thickness of the line as needed */
background-color: #E5E8EC;
......
......@@ -525,7 +525,7 @@ export class ElementListWidget {
// Create a div for line of the pull tab
const lineDiv = document.createElement('div');
lineDiv.classList.add('line');
lineDiv.classList.add('line-pulltab');
// Append pulltab to container
pullTab.appendChild(lineDiv);
......
......@@ -4,7 +4,7 @@ import { checkValidValues, validateInput, validateReturnInput } from "../DataInp
import { goBackToElementListViewer } from "../ElementListWidget/ElementListWidget.js";
import { uploadFile } from "../FileUpload/fileUpload.js";
import { createLoadingModal, removeLoadingModal } from "../LoadingModal/LoadingModal.js";
import { IS_RETRIEVE_FROM_BPO, SHOW_ELEMENT_LIST_VIEWER, 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 { DISPLAY_FIELD_OBJECT } from "../globalVariable.js";
import { Settings } from "./XMLWriter/Global.js";
......@@ -381,7 +381,7 @@ function validateMedia(key) {
export async function completeToNextNode(elementId) {
let requestJSON = {
"productionOutputUnits": {
"KEYSTROKE": {
[PROD_OUTPUT_UNIT]: {
"outputCount": 0,
"errorCount": 0
}
......
......@@ -24,12 +24,10 @@ export const OUTPUT_FILE_EXTENSION = ".DTA"
//BPO CONFIG
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 const CURRENT_NODE = "Web_GDE_DEV"
export let CURRENT_NODE = ""
export const ENCODING_PASS = "PASS1"
export const PROD_OUTPUT_UNIT = "INSPECTION"
export const NEXT_NODE = "INSPECTED"
export const EXCEPTION_NODE = "CANCELLED"
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
\ No newline at end of file
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAijGUjaY12S9AfkZJ4tTiSqPIBdDxWLXfkAAsKCQKstPGvd3rkPKXS+LZJzQq1nnro7pAOk1fjiqWs2TnDxuyOuDhQatSlfPQavEgSjzAC876wSXbtP8OfhPZGs+DnYSKElIUPV+mokaok2BBhmWwXbTA02Gmq30qVjzmOxppwle9XvGD1wvFVy4GlNDoFHmg8dtg7VmbGLTXc+FYOUKnFSAfW8z0KyKK53A8XR1UssO4o9gLQGP0VX0m5Mrb3D/I+vaSXcAzzyv2WRIOa49AuPx+m8IJnRb/CdY7tM0wZcrRwjC02sQk0VHG9Fg9lOk9wXytaq8GLPoRq5f4zZsPvwIDAQAB
\ No newline at end of file
import { createConfirmationModal } from "../../genericPopup/genericPopup.js";
import { toggleSubmit } from "../generateFields.js";
export function processCapture(key, imgFilename, imgFileSize) {
const form = document.getElementById('fields');
......@@ -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.display = '';
toggleSubmit();
document.getElementById(`${key}_container`).style.display = 'none';
function deleteImage(){
......@@ -85,6 +88,7 @@ export function processCapture(key, imgFilename, imgFileSize) {
// Clear the hidden fields
hiddenFnameInput.remove();
hiddenFileContentInput.remove();
toggleSubmit();
}
document.getElementById(`${key}_x`).addEventListener('click', ()=> {
......
......@@ -1851,7 +1851,7 @@ const handleInput = (event) => {
}
}
async function toggleSubmit(){
export async function toggleSubmit(){
let submitButton = document.getElementById("submitButton");
let validateResponse = await validateForm();
if(validateResponse){
......
......@@ -271,7 +271,7 @@ body {
align-items: center;
}
.line {
.line-pulltab {
width: 25%;
height: 7px; /* Adjust the thickness of the line as needed */
background-color: #E5E8EC;
......
......@@ -525,7 +525,7 @@ export class ElementListWidget {
// Create a div for line of the pull tab
const lineDiv = document.createElement('div');
lineDiv.classList.add('line');
lineDiv.classList.add('line-pulltab');
// Append pulltab to container
pullTab.appendChild(lineDiv);
......
......@@ -24,10 +24,7 @@ export const OUTPUT_FILE_EXTENSION = ".DTA"
//BPO CONFIG
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 const CURRENT_NODE = "Web_GDE_DEV"
export let CURRENT_NODE = ""
export const ENCODING_PASS = "PASS1"
export const PROD_OUTPUT_UNIT = "INSPECTION"
......@@ -37,7 +34,7 @@ export const SHOW_ELEMENT_LIST_VIEWER = "Y"
export const ADD_NEW_OPTION = "N"
export const DISPLAYED_DETAILS = "inspectionType|businessAddress" //pipe-delimited
export const USERID_FIELD = "inspectorUsername"
export const ENABLE_PRINT = "N"
export const ENABLE_PRINT = "Y"
export const PDF_EXTENSION = ".pdf"
export const JPG_EXTENSION = ".jpg"
......
......@@ -760,6 +760,12 @@
"mandatory" : false
}
},
"noise_nuisance_management": {
"fieldLabel" : "Noise Nuisance Management",
"validation" : {
"collection" : "title"
}
},
"soundproofing" : {
"fieldLabel" : "Soundproofing",
"aka" : "field75",
......@@ -770,6 +776,15 @@
"mandatory" : true
}
},
"potential_noise_source" : {
"fieldLabel" : "Potential Noise Source",
"aka" : "field178",
"validation" : {
"fieldLength" : 20.0,
"collection" : "alphanumeric",
"mandatory" : false
}
},
"permitting_requirements_header": {
"fieldLabel" : "Permitting Requirements",
"validation" : {
......@@ -860,9 +875,37 @@
"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" : {
"fieldLabel" : "LLDA Discharge Permit",
"aka" : "field85",
"aka" : "field182",
"validation" : {
"fieldLength" : 1.0,
"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