Commit e4fd4ca7 by Owen Ryan Ang

added proc_time for bpo elements

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