Commit e4fd4ca7 by Owen Ryan Ang

added proc_time for bpo elements

parent f39b8360
......@@ -431,6 +431,14 @@ export class ElementListWidget {
// Continue with the original logic
await createWebGdeInterface(null);
// Get current timestamp
const currentTimeStamp = Date.now();
const currentDate = new Date(currentTimeStamp);
const humanReadableTime = currentDate.toLocaleString();
// Save to session storage
sessionStorage.setItem("timeStart", humanReadableTime);
// Create and style a new container for the selected element's details
const detailsContainer = document.createElement('div');
detailsContainer.classList.add('encode-details-container');
......
......@@ -153,7 +153,7 @@ async function createNonBPOXML(fields, metrics, doctype, section, fieldOrder){
"totalRec":"0",
"maxRec": "1",
"totalKeystroke": metrics[0],
"procTime": "",
"procTime": sessionStorage.getItem("timeStart") + "-" + sessionStorage.getItem("timeEnd"),
"procDuration": metrics[1],
"eob": "",
"exceptionRemark": "",
......@@ -204,7 +204,7 @@ async function createBPOXML(fields, metrics, doctype, section, fieldOrder){
"totalRec":"1",
"maxRec": "1",
"totalKeystroke": metrics[0],
"procTime": "",
"procTime": sessionStorage.getItem("timeStart") + "-" + sessionStorage.getItem("timeEnd"),
"procDuration": metrics[1],
"eob": "",
"exceptionRemark": "",
......
......@@ -4,7 +4,6 @@ import { checkValidValues, validateInput } from "../DataInputWidget/validateInpu
import { goBackToElementListViewer } from "../ElementListWidget/ElementListWidget.js";
import { uploadFile } from "../FileUpload/fileUpload.js";
import { createLoadingModal, removeLoadingModal } from "../LoadingModal/LoadingModal.js";
import { global_end_time, saveMetrics, stopMetricCapture, setGlobalEndTime, interval } from "../captureMetrics/captureMetrics.js";
import { IS_RETRIEVE_FROM_BPO, SHOW_ELEMENT_LIST_VIEWER } from "../config.js";
import { createConfirmationModal, createErrorModal, createInfoModal } from "../genericPopup/genericPopup.js";
import { DISPLAY_FIELD_OBJECT } from "../globalVariable.js";
......@@ -15,7 +14,14 @@ import { GFS_ROOT_FOLDER, GFS_URL, PROJECT_CODE, TEMPORARY_FOLDER } from "./conf
export const submitForm = async (e) => {
try {
setGlobalEndTime(new Date().toLocaleString());
// Get current timestamp
const currentTimeStamp = Date.now();
const currentDate = new Date(currentTimeStamp);
const humanReadableTime = currentDate.toLocaleString();
// Save to session storage
sessionStorage.setItem("timeEnd", humanReadableTime);
const Form = document.getElementById("fields");
const { elements } = Form
let error = false;
......
......@@ -15,7 +15,7 @@
"collection" : "alphanumeric",
"mandatory" : false
},
"readOnly" : true
"readOnly" : false
},
"evr_date" : {
"fieldLabel" : "Date",
......@@ -25,7 +25,7 @@
"collection" : "datepicker",
"mandatory" : false
},
"readOnly" : true
"readOnly" : false
},
"email_address" : {
"fieldLabel" : "Email Address",
......@@ -35,7 +35,7 @@
"collection" : "email",
"mandatory" : false
},
"readOnly" : true
"readOnly" : false
},
"material_recovery_facility" : {
"fieldLabel" : "Material recovery Facility",
......
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