{"version":3,"sources":["components/line_button.js","components/warehouse_button.js","components/nav_bar.js","components/history.js","components/employees.js","components/top_accordion.js","components/order_search.js","components/order_table.js","components/worldwise_order_table.js","components/foamCutter.js","components/foamSlitter.js","components/onTruck.js","components/production_tablet.js","components/labelsort.js","App.js","index.js"],"names":["LineButton","props","line","style","width","height","border","color","fontSize","margin","marginTop","background","name","_jsx","Button","id","type","onClick","func","children","wh","WarehouseButton","fontWeight","padding","NavBar","AppBar","position","Toolbar","_jsxs","Box","display","resetter","KeyboardBackspaceIcon","Typography","variant","locale","marginLeft","setter","HistoryTable","history","updateHistory","useState","error","changeErr","loading","setLoading","open","setOpen","useEffect","pullHistory","refresh","lang","closePopup","document","getElementById","filter","Promise","resolve","reject","url","base","group","Axios","get","mode","then","result","data","catch","console","log","err","endDayAlert","put","Moment","Date","now","tz","format","window","location","reload","endErr","flexDirection","Popup","onClose","endWarning","borderTopLeftRadius","borderBottomLeftRadius","marginRight","disabled","cancel","accept","CircularProgress","size","marginBottom","length","textAlign","float","wwTotal","end","endDayNote","TableContainer","component","Paper","LinearProgress","Alert","severity","Table","TableHead","TableRow","TableCell","order","customer","qty","TableBody","map","row","index","scope","order_number","sku","EmployeeTable","adding","setAdding","employeeId","changeId","changeError","onLunch","setLunch","onBreak","setAllBreak","updateEmployees","update","addEmployee","String","parseInt","employees","employee","removeWorker","out","i","push","errRemove","addWorker","arr","worker_id","worker_name","picture","photo_link","status","errAdd","addAllWorkers","ids","res","temp","errAddAll","removeAllWorkers","errRemoveAll","endBreakRequest","changeEmployeeStatus","value","setBreak","reason","breakRequest","getWorkers","photo","errGet","allBack","allAway","proms","all","j","endAllBreak","endBreak","allBreak","break","FormControl","OutlinedInput","onKeyPress","target","charCode","querySelector","click","borderTopRightRadius","borderBottomRightRadius","default","placeholder","onChange","e","enter","scan","alt","referrerPolicy","src","onError","bathroom","personal","ControlledAccordions","expanded","setExpanded","handleChange","panel","event","isExpanded","Accordion","AccordionSummary","AccordionDetails","workers","OrderSearch","orderNbr","changeOrderNbr","orderCanceledError","setOrderCanceledError","override","setOverride","typefunc","typeSetter","makeRequest","ordernum","replace","outurl","toggleOverride","overrideOff","overrideOn","overrideSmallsOff","overrideSmallsOn","canceledErr","fullWidth","startsWith","_result$data","orders","Type","isCanceled","orderSearch","search","OrderTable","reset","prebuilding","setPrebuilding","partials","setPartials","setErr","prebuilts","setPrebuilts","setOrder","total","setTotal","manual","setManualChange","openRow","setOpenRow","partiallyCompletedSku","setPartiallyCompletedSku","totalMax","count","ReqQty","Shipped","submit","toString","Qty","Sku","Complete","pre","body","shipmentNbr","branch","orderRequest","changePartial","val","Number","changePrebuild","key","allMax","allNonePre","handleClose","List","ListItem","ListItemText","primary","secondary","date","orderDate","totalQty","totalCurr","shipment","Dialog","DialogTitle","TextField","InputProps","inputProps","min","max","defaultValue","description","ship","ordered","prebuilt","allMaxPre","partial","allNone","nonStock","Description","finalQty","decrementPrebuilt","incrementPrebuilt","decrementPartial","incrementPartial","openPopupRow","reqEmpl","WorldWiseOrderTable","setRefresh","wwItems","texasSkus","items","qtyFulfilled","zeroOutQtyFulfilled","setWWItems","setWWTotal","onKeyDown","includes","preventDefault","Math","floor","setQtyValue","justifyContent","alignItems","decrementQtyFulfilled","incrementQtyFulfilled","setValue","CNC","setWidth","setLength","setHeight","dim","setDim","foam","setFoam","setType","shape","setShape","tempShape","setTempShape","setSize","tempSize","setTempSize","setQty","expectedQty","setExpectedQty","size_dims","querySelectorAll","forEach","node","back","label","CloseIcon","trueWidth","parseFloat","trueLength","trueHeight","saveDims","continue","Select","changeFoam","MenuItem","ortho","memory","gel","changeShape","oval","cup","slab","changeSize","xs","sm","md","lg","jm","jp","gl","expDims","saveSize","expected","Slitter","number","setNumber","trueNumber","setTrueNumber","OnTruck","truckNumber","setTruckNumber","inputTruckNumber","setInputTruckNumber","tracking","setTracking","trackingArray","setTrackingArray","debounceTimeout","setDebounceTimeout","trackingLength","setTrackingLength","carrier","os","require","api","hostname","indexOf","baseApiUrl","delay","setTimeout","splitTracking","slice","uniqueTracking","Set","checkDuplicateTracking","insertScanInfo","addTrackingToArray","clearTimeout","async","getTrackingLength","trackNumber","some","item","trackingNumber","currentDatetime","toISOString","prevArray","datetime","sx","flexShrink","flexGrow","timeout","toLowerCase","alert","truck","_Fragment","action","sort","a","b","handleRemoveTracking","delete","axios","truck_number","array_data","ProductionTablet","changeOrder","changeType","changeLocale","updateRefresh","ShipmentNbr","setShipmentNbr","openConfirmWindow","setOpenConfirmWindow","goBack","confirmGoBack","refreshToken","resetOrder","leaveBuildWarning","Total","OrderNbr","Location","Customer","Items","CustomerOrderNbr","LabelSort","file","changeFile","ordernbr","setOrderNbr","setError","labels","setLabels","sortFile","reader","FileReader","onload","readAsDataURL","toBlob","payload","createElement","objs","lastModified","getLabels","paddingBottom","Input","files","link","mod","href","download","downloadLabel","App","warehouse","changeWarehouse","changeGroup","isLabelSort","setIsLabelSort","createButton","lineOnClick","whOnClick","createWarehouse","resetWh","loc","warehouses","createWarehouses","lines","createButtons","line_data","ReactDOM","render"],"mappings":"gzEAwBeA,MApBE,SAAyCC,GACtD,IAAIC,EAAOD,EAAMC,KACbC,EAAQ,CACRC,MAAO,MACPC,OAAQ,cACRC,OAAQ,aAAeL,EAAMM,MAC7BA,MAAON,EAAMM,MACbC,SAAU,OACVC,OAAQ,OACRC,UAAW,OACXC,WAAY,SAEZC,EAAOX,EAAMW,KAEjB,OACIC,cAACC,IAAM,CAACC,GAAI,OAASb,EAAMc,KAAK,SAASb,MAAOA,EAAOc,QAASA,IAAMhB,EAAMiB,KAAKhB,GAAMiB,SAAElB,EAAMmB,GAAK,IAAMR,GAGlH,E,kBCGeS,MAtBO,SAAyCpB,GAC3D,IAAImB,EAAKnB,EAAMmB,GACXjB,EAAQ,CACRM,OAAQ,OACRC,UAAW,OACXJ,OAAQ,kBACRgB,WAAY,OACZd,SAAU,OACVJ,MAAO,MACPmB,QAAS,OACTlB,OAAQ,QACRM,WAAYV,EAAMM,MAClBA,MAAO,S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,CAAAV,SACFN,cAACoc,GAAS,MAEVrb,eAACC,IAAG,CAACC,QAAQ,OAAOqD,cAAc,SAAQhE,SAAA,CACjC,MAAR0C,EAA8B,OAAdgb,EAzB3B,SAA0BW,GACxB,OAAOA,EAAWpY,IAAIiY,EACxB,CAuBgDI,CAAiBD,EAAWA,YArC5E,SAAuBE,GACrB,OAAOA,EAAMtY,IAAI8X,EACnB,CAmC0FS,CAAcC,EAAUf,EAAU9d,IAAI2e,OApBvH7e,cAACgb,GAAgB,CAAC9Z,SAAUud,EAASle,GAAIyd,EAAWhb,MAAOA,IAqB3C,OAAdgb,EAAqBhe,cAACC,IAAM,CAACX,MAAO,CAACC,MAAM,MAAOK,OAAO,OAAQC,UAAU,OAAQ+E,YAAY,QAASvD,QAAQ,YAAY3B,MAAM,YAAYU,QAASA,KAZhK8D,OAAOC,SAASC,QAYkK,EAAA9D,SAAC,YAAmB,SAO1M,ECxEA0e,IAASC,OACLjf,cAAC+d,GAAG,CAACC,UAAU,OACjBxb,SAASC,eAAe,Q","file":"static/js/main.bc95cff2.chunk.js","sourcesContent":["import React from 'react';\nimport Button from '@mui/material/Button';\n\n\nlet LineButton = function statelessFunctionComponentClass(props) {\n let line = props.line;\n let style = {\n width: \"80%\",\n height: \"fit-content\",\n border: \"1px solid \" + props.color,\n color: props.color,\n fontSize: \"25px\",\n margin: \"auto\",\n marginTop: \"25px\",\n background: \"white\"\n };\n let name = props.name;\n \n return (\n \n );\n\n}\n\nexport default LineButton;\n","import React from 'react';\nimport Button from '@mui/material/Button';\n\nlet WarehouseButton = function statelessFunctionComponentClass(props) {\n let wh = props.wh;\n let style = {\n margin: \"auto\",\n marginTop: \"40px\",\n border: \"2px solid black\",\n fontWeight: \"bold\",\n fontSize: \"400%\",\n width: \"80%\",\n padding: \"10px\",\n height: \"185px\",\n background: props.color,\n color: 'black'\n };\n let name = props.name;\n \n return (\n \n );\n\n}\n\nexport default WarehouseButton;","import React from 'react';\nimport AppBar from '@mui/material/AppBar';\nimport Toolbar from '@mui/material/Toolbar';\nimport Typography from '@mui/material/Typography';\nimport Button from '@mui/material/Button';\nimport Box from '@mui/material/Box';\nimport KeyboardBackspaceIcon from '@mui/icons-material/KeyboardBackspace';\n\nexport default function NavBar(props) {\n \n function setEnglish() {\n props.setter(\"en\");\n }\n\n function setSpanish() {\n props.setter(\"es\");\n }\n\n return(\n \n \n \n {props.name}\n {props.locale === \"en\" ? : }\n \n \n )\n}","import React, {useState, useEffect} from \"react\";\nimport Table from '@mui/material/Table';\nimport TableBody from '@mui/material/TableBody';\nimport TableCell from '@mui/material/TableCell';\nimport TableContainer from '@mui/material/TableContainer';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport Paper from '@mui/material/Paper';\nimport Alert from '@mui/material/Alert';\nimport LinearProgress from '@mui/material/LinearProgress';\nimport Button from '@mui/material/Button';\nimport Box from '@mui/material/Box';\nimport Popup from 'reactjs-popup';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport Axios from 'axios';\nimport Moment from \"moment-timezone\";\n\nexport default function HistoryTable(props) {\n const [history, updateHistory] = useState([]);\n const [error, changeErr] = useState(false);\n const [loading, setLoading] = useState(false);\n const [open, setOpen] = useState(false);\n useEffect(() => {\n pullHistory()\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props.refresh]);\n\n const lang = {\n \"en\": {\n \"order\":\"Order Number\",\n \"customer\":\"Customer\",\n \"qty\":\"Quantity\",\n \"err\":\"Failed to refresh history.\",\n \"end\":\"End Day\",\n \"endWarning\":\"Warning: Tapping 'Accept' will log workers off of the line, clear the build history, and submit the end of day report.\",\n \"cancel\":\"Cancel\",\n \"accept\":\"Accept\",\n \"endErr\": \"Failed to end day.\",\n \"refresh\": \"Refresh\",\n \"endDayNote\": \" Build must be empty to end day\"\n },\n \"es\": {\n \"order\":\"Número de Orden\",\n \"customer\":\"Vendedor\",\n \"qty\":\"Cantidad\",\n \"err\":\"No se pudo actualizar el historial.\",\n \"end\":\"Terminar el Dia\",\n \"endWarning\":\"Advertencia: al tocar 'Aceptar', los trabajadores se desconectarán de la línea, se borrará el historial de compilación y se enviará el informe de fin del día.\",\n \"cancel\":\"Cancelar\",\n \"accept\":\"Aceptar\",\n \"endErr\": \"No se pudo finalizar el día.\",\n \"refresh\": \"refrescar\",\n \"endDayNote\": \"La construcción debe estar vacía para finalizar el día\"\n }\n }\n\n function openPopup() {\n document.getElementById(\"root\").style.filter = 'blur(4px)';\n setOpen(true);\n }\n\n function closePopup() {\n setOpen(false);\n document.getElementById(\"root\").style.filter = \"\";\n }\n\n function pullHistory() {\n updateHistory([]);\n changeErr(false);\n setLoading(true);\n historyRequest().then(function(result) {\n updateHistory(result);\n setLoading(false);\n }).catch(function(err) {console.log(err); changeErr(true); setLoading(false);})\n }\n\n function historyRequest() {\n return new Promise((resolve, reject) => {\n let url = props.base + \"/operations/getHistory?wh=\" + props.wh + \"&line=\" + props.group;\n Axios.get(url, {mode: 'no-cors'}).then((result) => {resolve(result.data)}).catch((error) => {console.log(error); reject(error)});\n })\n }\n\n function endDayRequest() {\n return new Promise((resolve, reject) => {\n let url = props.base + \"/operations/endDay\";\n Axios.put(url, {\"wh\":props.wh, \"line\":props.group, \"date\":Moment(Date.now()).tz(\"America/New_York\").format('YYYY-MM-DD HH:mm:ss')}, {mode: 'no-cors'}).then((result) => {resolve(result.data)}).catch((error) => {console.log(error); reject(error)});\n })\n }\n\n\n function endDayAlert() {\n setLoading(true);\n endDayRequest().then(function() {\n window.location.reload();\n })\n .catch(function(err) {\n console.log(err);\n // window.location.reload();\n changeErr(lang[props.locale].endErr);\n setLoading(false);\n closePopup();\n })\n }\n\n\n return (\n \n closePopup()}>\n \n {lang[props.locale].endWarning}\n \n \n \n \n \n \n {!loading ? : null}\n {history.length > 0 ? \n \n \n {props.wh === 'TX' && props.wwTotal > 0 ? {lang[props.locale].endDayNote} : null}\n
: null}\n \n {loading ? : null }\n {error ? {lang[props.locale].err} : null}\n {props.wh != 'TX' ? \n \n \n \n \n {lang[props.locale].order}\n \n \n {lang[props.locale].customer}\n \n \n {lang[props.locale].qty}\n \n \n \n \n {history.map((row, index) => (\n \n \n {row.order_number}\n \n \n {row.customer}\n \n \n {row.qty}\n \n \n ))}\n \n
\n : \n \n \n \n \n SKU\n \n \n {lang[props.locale].qty}\n \n \n \n \n {history.map((row, index) => (\n \n \n {row.sku}\n \n \n {row.qty}\n \n \n ))}\n \n
}\n \n \n \n )\n}","import React, {useEffect, useState} from \"react\";\nimport Table from '@mui/material/Table';\nimport TableBody from '@mui/material/TableBody';\nimport TableCell from '@mui/material/TableCell';\nimport TableContainer from '@mui/material/TableContainer';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport Paper from '@mui/material/Paper';\nimport Button from '@mui/material/Button';\nimport OutlinedInput from '@mui/material/OutlinedInput';\nimport Popup from 'reactjs-popup';\nimport FormControl from '@mui/material/FormControl';\nimport Box from '@mui/material/Box';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport LinearProgress from '@mui/material/LinearProgress';\nimport Alert from '@mui/material/Alert';\nimport Axios from 'axios';\n\nexport default function EmployeeTable(props) {\n const [adding, setAdding] = useState(false);\n const [loading, setLoading] = useState(false);\n const [employeeId, changeId] = useState(\"\");\n const [error, changeError] = useState(\"\");\n const [onLunch, setLunch] = useState(false);\n const [onBreak, setAllBreak] = useState(false);\n\n const updateEmployees = props.update;\n\n const lang = {\n \"en\": {\n \"id\":\"Employee ID\",\n \"name\":\"Employee Name\",\n \"statusOn\": \"Active\",\n \"statusOff\": \"Inactive\",\n \"scan\": \"Scan\",\n \"placeholder\": \"Scan Employee Number\",\n \"enter\": \"Enter\",\n \"toggle\": \"Toggle\",\n \"allAway\": \"Go to Lunch\",\n \"allBack\": \"Return from Lunch\",\n \"errRemove\": \"Failed to remove worker.\",\n \"errRemoveAll\": \"Failed to remove all workers.\",\n \"errAdd\": \"Failed to add worker.\",\n \"errAddAll\": \"Failed to add all workers.\",\n \"errGet\": \"Failed to load workers.\",\n \"errTogOn\": \"Failed to toggle worker on.\",\n \"errTogOff\": \"Failed to toggle worker off.\",\n \"bathroom\":\"Bathroom\",\n \"break\":\"Break\",\n \"personal\": \"Personal\",\n \"endBreak\": \"End Break\",\n \"refresh\": \"Refresh\"\n },\n \"es\": {\n \"id\":\"ID de Empleado\",\n \"name\":\"Nombre de Empleado\",\n \"statusOn\": \"Activo\",\n \"statusOff\": \"Inactivo\",\n \"scan\": \"Escanear\",\n \"placeholder\": \"Escanear el número de empleado\",\n \"enter\": \"Buscar\",\n \"toggle\": \"Apagar\",\n \"allAway\": \"Ir a Almorzar\",\n \"allBack\": \"Regreso del Almuerzo\",\n \"errRemove\": \"No se pudo quitar al trabajador.\",\n \"errRemoveAll\": \"No se pudo eliminar a todos los trabajadores.\",\n \"errAdd\": \"No se pudo agregar trabajador.\",\n \"errAddAll\": \"No se pudo agregar a todos los trabajadores.\",\n \"errGet\": \"No se pudo cargar a los trabajadores.\",\n \"errTogOn\": \"No se pudo activar el trabajador.\",\n \"errTogOff\": \"No se pudo desactivar al trabajador.\",\n \"bathroom\":\"Baño\",\n \"break\":\"Pausa\",\n \"personal\": \"Personal\",\n \"end break\": \"Regreso\",\n \"refresh\": \"Refrescar\"\n }\n }\n\n function addEmployee() {\n changeError(\"\");\n setLoading(true);\n let id = String(parseInt(employeeId));\n let result = props.employees.filter(employee => employee.id === id);\n if(result.length > 0) {\n removeWorker(id, props.wh, props.group)\n .then(function(result) {\n let out = [];\n for (let i = 0; i < props.employees.length; i++) {\n if(props.employees[i].id !== id) {\n out.push(props.employees[i]);\n }\n }\n updateEmployees(out)\n setLoading(false);\n closePopup();\n })\n .catch(function(err) {\n console.log(err);\n changeError(lang[props.locale].errRemove);\n setLoading(false);\n closePopup();\n })\n }\n else {\n addWorker(id, props.wh, props.group)\n .then(function(result) {\n if(result.length > 0)\n updateEmployees(arr => [...arr, {id:result[0].worker_id, name:result[0].worker_name, picture:result[0].photo_link, status:\"Active\"}])\n else\n updateEmployees(arr => [...arr, {id:id, name:\"Unknown Worker\", picture:\"\", status:\"Active\"}])\n\n setLoading(false);\n closePopup();\n }).catch(function(err) {\n console.log(err);\n changeError(lang[props.locale].errAdd);\n setLoading(false);\n closePopup();\n });\n }\n }\n\n function addAllWorkers() {\n changeError(\"\");\n setLoading(true);\n let result = props.employees.filter(employee => employee.status !== \"Active\").map(employee => employee.id);\n if(result.length > 0) {\n addAll(result, props.wh, props.group)\n .then(function(res) {\n let temp = props.employees;\n for(let i = 0; i < temp.length; i++) {\n temp[i].status = \"Active\";\n }\n updateEmployees(temp);\n setLunch(false);\n setLoading(false);\n }).catch(function(err) {\n console.log(err);\n changeError(lang[props.locale].errAddAll);\n setLoading(false);\n })\n }\n else {\n setLoading(false);\n }\n }\n\n function removeAllWorkers() {\n changeError(\"\");\n setLoading(true);\n removeAll(props.wh, props.group)\n .then(function(res) {\n let temp = props.employees;\n for(let i = 0; i < temp.length; i++) {\n temp[i].status = \"Lunch\";\n }\n updateEmployees(temp);\n setLunch(true)\n setLoading(false);\n }).catch(function(err) {\n console.log(err);\n changeError(lang[props.locale].errRemoveAll);\n setLoading(false);\n })\n }\n\n function addAll(ids, wh, group) {\n return new Promise((resolve, reject) => {\n let url = props.base + \"/operations/addWorkers\";\n Axios.put(url, {\"ids\": ids, \"wh\": wh, \"line\": group}, {mode: 'no-cors'}).then((result) => {resolve(result.data)}).catch((error) => {console.log(error); reject(error)});\n })\n }\n\n function removeAll(wh, group) {\n return new Promise((resolve, reject) => {\n let url = props.base + \"/operations/removeWorkers\";\n Axios.put(url, {\"wh\": wh, \"line\": group}, {mode: 'no-cors'}).then((result) => {resolve(result.data)}).catch((error) => {console.log(error); reject(error)});\n })\n }\n\n function removeWorker(id, wh, group) {\n return new Promise((resolve, reject) => {\n let url = props.base + \"/operations/removeWorker\";\n Axios.put(url, {\"id\": id, \"wh\": wh, \"line\": group}, {mode: 'no-cors'}).then((result) => {resolve(result.data)}).catch((error) => {console.log(error); reject(error)});\n })\n }\n\n\n function handleKey(target) {\n if(target.charCode === 13) {\n document.querySelector(\"#submitAddWorker\").click()\n } \n }\n\n function addWorker(id, wh, group) {\n return new Promise((resolve, reject) => {\n let url = props.base + \"/operations/addWorker\";\n Axios.put(url, {\"id\": id, \"wh\": wh, \"line\": group}, {mode: 'no-cors'}).then((result) => {resolve(result.data)}).catch((error) => {console.log(error); reject(error)});\n })\n }\n\n function openPopup() {\n document.getElementById(\"root\").style.filter = 'blur(4px)';\n setAdding(true);\n }\n\n function closePopup() {\n setAdding(false);\n document.getElementById(\"root\").style.filter = \"\";\n }\n\n function endBreakRequest(id) {\n return new Promise((resolve, reject) => {\n let url = props.base + \"/operations/endBreak\";\n Axios.put(url, {\"id\": id, \"wh\": props.wh, \"line\": props.group}, {mode: 'no-cors'}).then((result) => {resolve(result.data)}).catch((error) => {console.log(error); reject(error)});\n })\n }\n\n function endBreak(id) {\n setLoading(true);\n changeError(\"\")\n endBreakRequest(id).then(function(result) {\n changeEmployeeStatus(id, \"Active\");\n setLoading(false); \n })\n .catch(function(err) {\n console.log(err);\n setLoading(false);\n changeError(\"Failed to end break.\");\n })\n }\n\n function endAllBreak() {\n setLoading(true);\n changeError(\"\");\n let proms = [];\n for(let i = 0; i < props.employees.length; i++) {\n let employee = props.employees[i];\n proms.push(endBreakRequest(employee.id))\n }\n Promise.all(proms).then(function(result) {\n for(let j = 0; j < props.employees.length; j++) {\n let employee = props.employees[j];\n changeEmployeeStatus(employee.id, \"Active\");\n }\n setAllBreak(false);\n setLoading(false);\n })\n .catch(function(err) {\n console.log(err);\n setLoading(false);\n changeError(\"Failed to end break.\");\n })\n }\n \n function changeEmployeeStatus(id, value) {\n let temp = [];\n for(let i = 0; i < props.employees.length; i++) {\n let employee = props.employees[i];\n if(employee.id === id) {\n employee.status = value;\n }\n temp.push(employee);\n }\n updateEmployees(temp);\n }\n\n function allBreak() {\n setLoading(true);\n changeError(\"\");\n let proms = [];\n for(let i = 0; i < props.employees.length; i++) {\n let employee = props.employees[i];\n if(employee.status !== \"Active\") continue;\n proms.push(breakRequest(employee.id, props.group, props.wh, \"Break\"))\n }\n Promise.all(proms).then(function(result) {\n for(let j = 0; j < props.employees.length; j++) {\n let employee = props.employees[j];\n changeEmployeeStatus(employee.id, \"Break\");\n }\n setAllBreak(true);\n setLoading(false);\n })\n .catch(function(err) {\n console.log(err);\n setLoading(false);\n changeError(\"Failed to start break.\");\n })\n }\n\n function setBreak(id, reason) {\n setLoading(true);\n changeError(\"\")\n breakRequest(id, props.group, props.wh, reason).then(function(result) {\n changeEmployeeStatus(id, reason);\n setLoading(false);\n })\n .catch(function(err) {\n console.log(err);\n setLoading(false);\n changeError(\"Failed to start break.\");\n });\n }\n\n function breakRequest(id, group, wh, reason) {\n return new Promise((resolve, reject) => {\n let url = props.base + \"/operations/setBreak\";\n Axios.put(url, {\"id\": id, \"wh\": wh, \"line\": group, \"reason\": reason}, {mode: 'no-cors'}).then((result) => {resolve(result.data)}).catch((error) => {console.log(error); reject(error)});\n })\n }\n\n // function toggleStatus(employee) {\n // setLoading(true);\n // if(employee.status === \"Active\") {\n // removeWorker(employee.id, props.wh, props.group)\n // .then(function(result) {\n // let temp = props.employees;\n // for(let i = 0; i < temp.length; i++) {\n // if(temp[i].id === employee.id) temp[i].status=\"Inactive\";\n // }\n // updateEmployees(temp);\n \n // setLoading(false);\n // })\n // .catch(function(err) {\n // console.log(err);\n // changeError(lang[props.locale].errTogOff);\n // setLoading(false);\n // })\n // }\n // else {\n // addWorker(employee.id, props.wh, props.group)\n // .then(function(result) {\n // let temp = props.employees;\n // for(let i = 0; i < temp.length; i++) {\n // if(temp[i].id === employee.id) temp[i].status=\"Active\";\n // }\n // updateEmployees(temp);\n \n // setLoading(false);\n // }).catch(function(err) {\n // console.log(err);\n // changeError(lang[props.locale].errTogOn);\n // setLoading(false);\n // });\n // }\n // }\n function workerRequest() {\n return new Promise((resolve, reject) => {\n let url = props.base + \"/operations/getWorkers?wh=\" + props.wh + \"&line=\" + props.group;\n Axios.get(url, {mode: 'no-cors'}).then((result) => {resolve(result.data)}).catch((error) => {console.log(error); reject(error)});\n })\n }\n\n function getWorkers() {\n changeError(\"\");\n setLoading(true);\n updateEmployees([]);\n \n workerRequest().then(function(result) {\n if(!(result)) return;\n for(let index = 0; index < result.length; index++) {\n let name = \"Unknown Worker\";\n let photo = \"\";\n if(result[index].worker_name) {\n name = result[index].worker_name;\n }\n if(result[index].photo_link) {\n photo = result[index].photo_link;\n }\n updateEmployees(arr => [...arr, {id:result[index].worker_id, name:name, picture:photo, status:result[index].status || \"Active\"}])\n }\n \n setLoading(false);\n }).catch(function(err) {\n console.log(err);\n changeError(lang[props.locale].errGet);\n setLoading(false);\n })\n }\n useEffect(() => {\n getWorkers()\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n\n return (\n \n {!loading ? : null}\n\n \n {loading ? : null }\n \n {props.employees.length > 0 ? !onLunch && !onBreak ? : (onLunch ? : null) : null}\n {props.employees.length >0 ? !onLunch && !onBreak ? : (onBreak ? : null) :null}\n \n {error !== \"\" ? {error} : null}\n closePopup()}>\n \n \n {changeId(e.target.value)}} />\n \n \n \n \n \n \n \n \n {lang[props.locale].id}\n \n \n {lang[props.locale].name}\n \n \n {lang[props.locale].status}\n \n \n \n \n \n \n \n \n {props.employees.map((row, index) => (\n \n \n {row.id}\n \n \n {row.name}\n \n \n {row.status}\n \n \n
e.target.src = \"\"} />\n \n \n {row.status === \"Active\" ? \n \n \n :\n (row.status !== \"Lunch\" ? : null )\n }\n \n \n ))}\n \n
\n \n \n )\n}","import React, {useState} from \"react\";\nimport Accordion from '@mui/material/Accordion';\nimport AccordionDetails from '@mui/material/AccordionDetails';\nimport AccordionSummary from '@mui/material/AccordionSummary';\nimport Typography from '@mui/material/Typography';\nimport Box from '@mui/material/Box';\nimport HistoryTable from './history';\nimport EmployeeTable from './employees';\n\n\nexport default function ControlledAccordions(props) {\n const [expanded, setExpanded] = useState(false);\n\n\n const lang = {\n \"en\": {\n \"history\":\"Build History\",\n \"workers\":\"Employees\"\n },\n \"es\": {\n \"history\":\"Historia Previa\",\n \"workers\":\"Empleados\"\n }\n }\n\n const handleChange = (panel) => (event, isExpanded) => {\n setExpanded(isExpanded ? panel : false);\n };\n \n return (\n \n \n \n \n );\n }","import React, {useState} from 'react';\nimport Button from '@mui/material/Button';\nimport OutlinedInput from '@mui/material/OutlinedInput';\nimport FormControl from '@mui/material/FormControl';\nimport Box from '@mui/material/Box';\nimport Alert from '@mui/material/Alert';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport Axios from 'axios';\n// import SearchOrders from \"../microservers/search_orders\";\n\nexport default function OrderSearch(props) {\n const [orderNbr, changeOrderNbr] = useState(\"\");\n const [error, changeError] = useState(false);\n const [orderCanceledError, setOrderCanceledError] = useState(false);\n const [loading, setLoading] = useState(false);\n const [override, setOverride] = useState(false);\n\n const func = props.setter;\n const typefunc = props.typeSetter;\n\n\n const lang = {\n \"en\": {\n \"placeholder\":\"Scan Order Number\",\n \"search\":\"Search\",\n \"err\":\"Failed to find order.\",\n \"canceledErr\":\"Order Canceled\",\n \"overrideOn\":\"Show Smalls\",\n \"overrideOff\":\"Hide Smalls\",\n \"overrideSmallsOn\":\"Show Assembly\",\n \"overrideSmallsOff\":\"Hide Assembly\"\n },\n \"es\": {\n \"placeholder\":\"Número de Orden de Escaneo\",\n \"search\":\"Buscar\",\n \"err\":\"No se pudo encontrar el orden.\",\n \"canceledErr\":\"Orden cancelada\",\n \"overrideOn\":\"Mostrar Pequeños\",\n \"overrideOff\":\"Ocultar Pequeños\",\n \"overrideSmallsOn\":\"Mostrar Montaje\",\n \"overrideSmallsOff\":\"Ocultar Montaje\"\n }\n }\n\n let orderSearch = function() {\n changeError(false);\n setLoading(true); \n let type = 0;\n if(orderNbr.startsWith(\"#\")) {\n type = 1;\n }\n else if(orderNbr.startsWith(\"*\")) {\n type = 2;\n }\n makeRequest(orderNbr, type).then(function(result) {\n console.log(\"SEARCH: \", result);\n if(result.data.orders && result.data.orders.length > 0) {\n typefunc(result.data.orders[0].Type)\n func(result.data.orders);\n }\n else if(result?.data?.isCanceled === true) {\n setOrderCanceledError(true);\n }\n else{\n changeError(true);\n }\n setLoading(false);\n }).catch(function(err) {console.log(err); changeError(true); setLoading(false);});\n }\n\n let makeRequest = function(orderNbr, type) {\n return new Promise((resolve, reject) => {\n let url = props.base + \"/operations/\";\n let ordernum = orderNbr;\n if(type === 0) {\n url += \"AcumaticaSearch\";\n }\n else if(type === 1) {\n url += \"IMSSearch\";\n ordernum = ordernum.replace(\"#\", \"\");\n }\n else {\n url += \"IMS2Search\";\n ordernum = ordernum.replace(\"*\", \"\");\n }\n let outurl = url + \"?override=false&wh=\" + props.wh.id + \"&line=\" + props.group.line + \"&orderNbr=\" + ordernum +\"&override=\" + override;\n Axios.get(outurl, {mode: 'no-cors'}).then((result) => {resolve(result)}).catch((error) => {console.log(error); reject()});\n })\n }\n\n function handleKey(target) {\n if(target.charCode === 13) {\n document.querySelector(\"#submit\").click()\n } \n }\n\n \n function toggleOverride() {\n setOverride(!override);\n }\n\n\n\n return(\n \n {props.group.line !== 9 && props.wh.name === \"Kentucky\" ? : (props.wh.name === \"Kentucky\" && props.group.line === 9 ? : null) }\n {error ? {lang[props.locale].err} : null}\n {orderCanceledError ? {lang[props.locale].canceledErr} : null}\n \n \n {changeOrderNbr(e.target.value)}} />\n \n \n \n \n )\n}","import React, {useEffect, useState} from \"react\";\nimport Button from '@mui/material/Button';\nimport Table from '@mui/material/Table';\nimport TableBody from '@mui/material/TableBody';\nimport TableCell from '@mui/material/TableCell';\nimport TableContainer from '@mui/material/TableContainer';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport Paper from '@mui/material/Paper';\nimport Box from '@mui/material/Box';\nimport List from '@mui/material/List';\nimport ListItem from '@mui/material/ListItem';\nimport ListItemText from '@mui/material/ListItemText';\nimport LinearProgress from '@mui/material/LinearProgress';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport Dialog from '@mui/material/Dialog';\nimport TextField from '@mui/material/TextField';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport Alert from '@mui/material/Alert';\nimport Moment from \"moment-timezone\";\nimport Axios from \"axios\";\n\nexport default function OrderTable(props) {\n\n const reset = props.resetter;\n const [prebuilding, setPrebuilding] = useState(false);\n const [partials, setPartials] = useState(false);\n const [loading, setLoading] = useState(false);\n const [error, setErr] = useState(\"\");\n // const [partialCounts, setPartialCounts] = useState({});\n const [prebuilts, setPrebuilts] = useState({});\n const [order, setOrder] = useState(props.order);\n const [total, setTotal] = useState(0);\n const [manual, setManualChange] = useState(0);\n const [openRow, setOpenRow] = useState(null);\n const [partiallyCompletedSku, setPartiallyCompletedSku] = useState(false);\n\n const lang = {\n \"en\": {\n \"order\":\"Order Number:\",\n \"customer\":\"Customer:\",\n \"qty\":\"Quantity:\",\n \"type\":\"Type:\",\n \"date\":\"Order Date:\",\n \"total\":\"Total Pieces:\",\n \"note\":\"Note:\",\n \"sku\":\"SKU\",\n \"description\":\"Description\",\n \"ship\":\"On Shipments\",\n \"ordered\":\"Ordered Qty\",\n \"partial\":\"Mark Total Fulfilled\",\n \"complete\":\"Complete\",\n \"submit\":\"Submit Builds\",\n \"prebuilt\":\"Prebuilt\",\n \"reqEmpl\":\"Add employees to build order.\",\n \"search\":\"Search Again\",\n \"totalCurr\":\"Current Total\",\n \"shipment\":\"Shipment Number:\"\n },\n \"es\": {\n \"order\":\"Número de Orden:\",\n \"customer\":\"Vendedor:\",\n \"qty\":\"Cantidad:\",\n \"type\":\"Clase:\",\n \"date\":\"Fecha de Orden:\",\n \"total\":\"Piezas en Total:\",\n \"note\":\"Nota:\",\n \"sku\":\"SKU\",\n \"description\":\"Descripción\",\n \"ship\":\"En Envíos\",\n \"ordered\":\"Cantidad Ordenada\",\n \"partial\":\"Marcar el Total Cumplido\",\n \"complete\":\"Completo\",\n \"submit\":\"Enviar Compilaciones\",\n \"prebuilt\":\"Prediseñado\",\n \"reqEmpl\":\"Agregar empleados a la orden de construcción.\",\n \"search\":\"Busca de Nuevo\",\n \"totalCurr\": \"Total Actual\",\n \"shipment\":\"Numero de Envío:\"\n }\n }\n\n\n function totalMax() {\n let count = 0;\n for(let i = 0; i < order.length; i++) {\n count += order[i].ReqQty - order[i].Shipped;\n }\n setTotal(count);\n }\n\n function submit() {\n setLoading(true);\n setErr(\"\");\n let out = [];\n let now = Moment(Date.now()).tz(\"America/New_York\").format('YYYY-MM-DD HH:mm:ss');\n let workers = props.employees.map(employee => employee.name).toString();\n for(let i = 0; i < order.length; i++) {\n if(order[i].Shipped === order[i].ReqQty || order[i].Qty === 0) continue;\n out.push([props.orderNbr, props.customer, order[i].Sku, order[i].Qty, now, workers, props.group, props.wh]);\n order[i].Complete = true;\n }\n orderRequest(order, out, prebuilts).then(function() {\n setLoading(false)\n props.refresh();\n reset();\n }).catch(function(err) {\n console.log(err);\n setErr(err.error);\n setLoading(false);\n })\n }\n\n useEffect(() => {\n totalMax()\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n // function submitPartials() {\n // setLoading(true);\n // let out = [];\n // let now = Moment(Date.now()).format('YYYY-MM-DD HH:mm:ss');;\n // let workers = props.employees.map(employee => employee.name).toString();\n // for(let i = 0; i < order.length; i++) {\n // let qty = order[i].Qty;\n // if(order[i].Shipped === order[i].ReqQty) continue;\n // if(order[i].Sku in partialCounts) {\n // qty = partialCounts[order[i].Sku];\n // order[i].Qty = qty;\n // }\n // if(order[i].Qty === 0) continue;\n // out.push([props.orderNbr, props.customer, order[i].Sku, qty, now, workers, props.group, props.wh]);\n // order[i].Complete = (order[i].Qty + order[i].Shipped === order[i].ReqQty)\n // }\n // if(out.length == 0) return;\n // orderRequest(order, out, prebuilts).then(function() {\n // setLoading(false)\n // props.refresh();\n // reset();\n // }).catch(function(err) {\n // console.log(err);\n // setErr(err.error);\n // })\n // // reset();\n // }\n\n function changePartial(row, value) {\n let val = Number(value);\n let temp = order;\n for(let i = 0; i < temp.length; i++) {\n if(temp[i].Sku === row.Sku) {\n setTotal(total + (val - temp[i].Qty))\n temp[i].Qty = val;\n break;\n }\n }\n setOrder(temp);\n if(row.ReqQty > row.Qty && row.Qty > 0 && props.type === \"DROPSHIP\"){\n setPartiallyCompletedSku(true); \n }\n else{\n setPartiallyCompletedSku(false);\n }\n }\n\n function changePrebuild(row, value) {\n let val = Number(value);\n let temp = {};\n for(let key in prebuilts) {\n if(key === row.Sku) {\n temp[key] = val;\n }\n else {\n temp[key] = prebuilts[key];\n }\n }\n setPrebuilts(temp);\n }\n\n function startPartial() {\n setPartials(true);\n allMax();\n }\n\n function allMax() {\n let temp = order;\n for(let i = 0; i < temp.length; i++) {\n temp[i].Qty = order[i].ReqQty - order[i].Shipped;\n }\n setOrder(temp);\n // document.querySelectorAll(\".partialInput\").forEach(function(node) {\n // node.value = node.getAttribute(\"max\");\n // });\n totalMax();\n }\n\n function allNone() {\n let temp = order;\n for(let i = 0; i < temp.length; i++) {\n temp[i].Qty = 0;\n }\n setOrder(temp);\n // document.querySelectorAll(\".partialInput\").forEach(function(node) {\n // node.value = node.getAttribute(\"min\");\n // });\n setTotal(0);\n allNonePre();\n }\n\n function allMaxPre() {\n let temp = {};\n for(let i = 0; i < order.length; i++) {\n if(order[i].ReqQty === order[i].Shipped) continue;\n temp[order[i].Sku] = order[i].ReqQty - order[i].Shipped;\n }\n setPrebuilts(temp);\n allMax();\n }\n\n function allNonePre() {\n let temp = {};\n for(let i = 0; i < order.length; i++) {\n if(order[i].ReqQty === order[i].Shipped) continue;\n temp[order[i].Sku] = 0;\n }\n setPrebuilts(temp);\n }\n\n function togglePrebuilt() {\n setPrebuilding(!prebuilding);\n allNonePre();\n }\n\n function incrementPrebuilt(id, row) {\n let qty = 0;\n if(row.Sku in prebuilts) {\n qty = prebuilts[row.Sku];\n }\n let finalQty = -1;\n if(qty >= row.ReqQty - row.Shipped) {\n finalQty = row.ReqQty - row.Shipped;\n }\n else {\n finalQty = qty + 1;\n }\n if(finalQty > row.Qty) {\n changePartial(row, finalQty);\n }\n // document.getElementById(id).value = finalQty;\n changePrebuild(row, finalQty)\n }\n\n function decrementPrebuilt(id, row) {\n let qty = 0;\n if(row.Sku in prebuilts) {\n qty = prebuilts[row.Sku];\n }\n let finalQty = 0;\n if(qty > 0) {\n finalQty = qty - 1;\n }\n // document.getElementById(id).value = finalQty;\n changePrebuild(row, finalQty);\n }\n\n function decrementPartial(id, row) {\n let qty = row.Qty - 1;\n let min = 0;\n if(row.Sku in prebuilts) {\n min = prebuilts[row.Sku]\n }\n if(qty <= min) {\n qty = min;\n }\n // document.getElementById(id).value = qty;\n changePartial(row, qty);\n }\n\n function incrementPartial(id, row) {\n let qty = row.Qty + 1;\n if(qty >= row.ReqQty - row.Shipped) {\n qty = row.ReqQty - row.Shipped;\n }\n // document.getElementById(id).value = qty;\n changePartial(row, qty)\n }\n\n function setZero(row) {\n changePrebuild(row, 0);\n changePartial(row, 0);\n }\n\n function orderRequest(order, out, pre) {\n return new Promise((resolve, reject) => {\n let url = props.base + \"/operations/saveBuild\";\n let body = {\"orders\":out, \"full\":order, \"prebuilt\":pre, \"orderNbr\": props.orderNbr, \"shipmentNbr\": props.shipmentNbr, \"customer\":props.customer, \"type\":props.type, \"date\": Moment(Date.now()).tz(\"America/New_York\").format('YYYY-MM-DD'), \"location\": props.location || \"MAIN\", \"wh\": props.wh, \"line\": props.group, \"branch\": props.branch};\n Axios.put(url, body, {mode: 'no-cors'}).then(() => {resolve()}).catch((error) => {console.log(error); reject(error)});\n })\n }\n\n function handleClose(row) {\n let val = manual;\n if(manual > row.ReqQty) val = row.ReqQty;\n if(manual < 0) val = 0;\n changePartial(row, val);\n setOpenRow(null);\n setManualChange(0);\n }\n\n function openPopupRow(row) {\n setOpenRow(row);\n console.log(row);\n }\n \n return (\n \n \n {loading ? : null }\n {error !== \"\" ? {error} : null}\n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n
\n \n {props.shipmentNbr ?\n \n \n \n : null}\n {/* \n \n */}\n
\n \n {partials ? : null }\n \n \n \n \n \n \n {lang[props.locale].sku}\n \n \n {lang[props.locale].description}\n \n \n {lang[props.locale].ship}\n \n \n {lang[props.locale].ordered}\n \n {prebuilding ? {lang[props.locale].prebuilt} : null}\n {partials ? {lang[props.locale].partial} : null}\n {partials ? : null}\n \n \n \n {order.map((row, index) => (\n (!row.nonStock ? \n \n {row.Sku}\n \n \n {row.Description}\n \n \n {row.Shipped > 0 ? row.Shipped + \" Built\" : null }\n \n \n {row.ReqQty}\n \n {prebuilding ? row.Shipped !== row.ReqQty ? \n {/* changePrebuild(row, e.target.value)} value=\"0\" /> */}\n {prebuilts[row.Sku]}\n : : null}\n {partials ? row.Shipped !== row.ReqQty ? \n \n {/* changePartial(row, e.target.value)} value={row.Qty - row.Shipped} /> */}\n {row.Qty}\n : : null}\n {partials ? row.Shipped !== row.ReqQty ? : : null}\n : null )\n ))}\n \n
\n \n \n {props.employees.length > 0 ? !partials ? \n \n {/* */}\n : : {lang[props.locale].reqEmpl} }\n \n \n )\n}\n","import React, {useState, useEffect} from \"react\";\nimport Button from '@mui/material/Button';\nimport Table from '@mui/material/Table';\nimport TableBody from '@mui/material/TableBody';\nimport TableCell from '@mui/material/TableCell';\nimport TableContainer from '@mui/material/TableContainer';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport Paper from '@mui/material/Paper';\nimport Box from '@mui/material/Box';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport Dialog from '@mui/material/Dialog';\nimport TextField from '@mui/material/TextField';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport Moment from \"moment-timezone\";\nimport Axios from \"axios\";\nimport texasSkus from '../data/texasSkus.json';\n\n\nexport default function WorldWiseOrderTable(props) {\n const reset = props.resetter;\n const [openRow, setOpenRow] = useState(null);\n const [refresh, setRefresh] = useState(true);\n const [manual, setManualChange] = useState(0);\n const [loading, setLoading] = useState(false);\n const [error, setErr] = useState(\"\");\n\n const blockInvalidChar = e => ['e', 'E', '+', '-', '.'].includes(e.key) && e.preventDefault();\n\n\n const lang = {\n \"en\": {\n \"order\":\"Order Number:\",\n \"customer\":\"Customer:\",\n \"qty\":\"Quantity:\",\n \"type\":\"Type:\",\n \"date\":\"Order Date:\",\n \"total\":\"Total Pieces:\",\n \"note\":\"Note:\",\n \"sku\":\"SKU\",\n \"description\":\"Description\",\n \"ship\":\"On Shipments\",\n \"ordered\":\"Ordered Qty\",\n \"partial\":\"Mark Total Fulfilled\",\n \"complete\":\"Complete\",\n \"submit\":\"Submit Builds\",\n \"prebuilt\":\"Prebuilt\",\n \"reqEmpl\":\"Add employees to build order.\",\n \"search\":\"Search Again\",\n \"totalCurr\":\"Current Total\",\n \"shipment\":\"Shipment Number:\",\n \"setValue\": \"SET VALUE\"\n },\n \"es\": {\n \"order\":\"Número de Orden:\",\n \"customer\":\"Vendedor:\",\n \"qty\":\"Cantidad:\",\n \"type\":\"Clase:\",\n \"date\":\"Fecha de Orden:\",\n \"total\":\"Piezas en Total:\",\n \"note\":\"Nota:\",\n \"sku\":\"SKU\",\n \"description\":\"Descripción\",\n \"ship\":\"En Envíos\",\n \"ordered\":\"Cantidad Ordenada\",\n \"partial\":\"Marcar el Total Cumplido\",\n \"complete\":\"Completo\",\n \"submit\":\"Enviar Compilaciones\",\n \"prebuilt\":\"Prediseñado\",\n \"reqEmpl\":\"Agregar empleados a la orden de construcción.\",\n \"search\":\"Busca de Nuevo\",\n \"totalCurr\": \"Total Actual\",\n \"shipment\":\"Numero de Envío:\",\n \"setValue\": \"CREAR VALOR\"\n }\n }\n\n useEffect(()=> {\n props.setWWItems(texasSkus[props.group.name].items);\n }, [])\n\n function resetItems() {\n texasSkus[props.group.name].items = zeroOutQtyFulfilled(texasSkus[props.group.name].items);\n console.log(texasSkus[props.group.name].items);\n props.setWWItems(texasSkus[props.group.name].items);\n }\n\n function zeroOutQtyFulfilled(items){\n for(let i = 0; i < items.length; i++){\n items[i].qtyFulfilled = 0;\n }\n return items;\n }\n\n function setQtyValue(value, row) {\n value = Math.floor(value);\n let temp = props.wwItems;\n for(let i = 0; i < temp.length; i++) {\n if(temp[i].sku === row.sku){\n if(value >= 0) {\n props.setWWTotal(props.wwTotal + (value - temp[i].qtyFulfilled));\n temp[i].qtyFulfilled = value;\n setRefresh(!refresh);\n console.log(\"Total: \", props.wwTotal); \n }\n else{\n temp[i].qtyFulfilled = row.qtyFulfilled;\n setRefresh(!refresh);\n console.log(\"Total: \", props.wwTotal);\n }\n }\n\n }\n props.setWWItems(temp);\n setRefresh(!refresh);\n }\n\n function incrementQtyFulfilled(index) {\n let temp = props.wwItems;\n temp[index].qtyFulfilled++;\n props.setWWTotal(props.wwTotal+1);\n props.setWWItems(temp);\n setRefresh(!refresh);\n console.log(\"Total: \", props.wwTotal);\n }\n\n function decrementQtyFulfilled(index) {\n let temp = props.wwItems;\n if(temp[index].qtyFulfilled > 0){\n temp[index].qtyFulfilled--;\n props.setWWTotal(props.wwTotal-1);\n props.setWWItems(temp);\n setRefresh(!refresh);\n console.log(\"Total: \", props.wwTotal);\n }\n }\n\n function handleClose(index) {\n setOpenRow(null);\n setManualChange(0);\n }\n\n function openPopupRow(row) {\n setOpenRow(row);\n console.log(row);\n }\n\n function submit() {\n setLoading(true);\n setErr(\"\");\n saveWorldwiseBuild().then(function() {\n setLoading(false)\n props.refresh();\n resetItems();\n props.setWWTotal(0);\n }).catch(function(err) {\n console.log(err);\n setErr(err.error);\n setLoading(false);\n })\n }\n\n function saveWorldwiseBuild() {\n return new Promise((resolve, reject) => {\n let url = props.base + \"/operations/worldwiseBuild\";\n console.log(\"URL:\", url);\n let workers = props.employees.map(employee => employee.name).toString();\n let body = {\"items\":props.wwItems, \"employees\": workers, \"date\": Moment(Date.now()).tz(\"America/Chicago\").format('YYYY-MM-DD HH:mm:ss'), \"location\": props.location || \"MAIN\", \"wh\": props.wh, \"group\": props.group.line, \"branch\": props.branch, customer: \"Bulk\", orderNbr: \"Bulk\"};\n Axios.put(url, body, {mode: 'no-cors'}).then(() => {resolve()}).catch((error) => {console.log(error); reject(error)});\n })\n }\n\n return (\n \n \n \n \n \n \n \n {lang[props.locale].sku}\n \n \n {lang[props.locale].description}\n \n \n {lang[props.locale].ordered}\n \n \n \n \n {props.wwItems.map((row, index) => (\n \n \n {row.sku}\n \n \n {row.description}\n \n \n \n \n \n {row.qtyFulfilled ? row.qtyFulfilled : 0}\n \n \n \n \n \n \n \n \n ))}\n \n
\n \n \n \n \n \n \n\n \n\n )\n}\n","import React, {useEffect, useState} from \"react\";\nimport Button from '@mui/material/Button';\nimport Box from '@mui/material/Box';\nimport Select from '@mui/material/Select';\nimport MenuItem from '@mui/material/MenuItem';\nimport TextField from '@mui/material/TextField';\nimport CloseIcon from '@mui/icons-material/Close';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport Axios from 'axios';\n\nfunction CNC(props) {\n const [width, setWidth] = useState(0);\n const [length, setLength] = useState(0);\n const [height, setHeight] = useState(0);\n const [dim, setDim] = useState(0);\n const [foam, setFoam] = useState(null);\n const [type, setType] = useState(null);\n const [shape, setShape] = useState(null);\n const [tempShape, setTempShape] = useState(null);\n const [size, setSize] = useState(null);\n const [tempSize, setTempSize] = useState(null);\n const [qty, setQty] = useState(0);\n const [expectedQty, setExpectedQty] = useState(0);\n const [loading, setLoading] = useState(false);\n\n const lang = {\n \"en\": {\n \"width\":\"Width\",\n \"length\":\"Length\",\n \"height\":\"Height\",\n \"continue\":\"Continue\",\n \"back\":\"Back\",\n \"foam\":\"Foam Type\",\n \"ortho\":\"Orthopedic\",\n \"memory\":\"Memory Foam\",\n \"gel\":\"Cooling Gel\",\n \"cup\":\"Cup\",\n \"donut\":\"Donut\",\n \"slab\":\"Slab\",\n \"oval\":\"Oval\",\n \"shape\":\"Foam Shape\",\n \"size\":\"Foam Size\",\n \"xs\":\"Extra Small\",\n \"sm\":\"Small\",\n \"md\":\"Medium\",\n \"lg\":\"Large\",\n \"jm\":\"Jumbo\",\n \"jp\":\"Jumbo Plus\",\n \"gl\":\"Goliath\",\n \"qty\":\"Cut Quantity\",\n \"expected\":\"Expected Quantity:\",\n \"submit\":\"Submit\"\n },\n \"es\": {\n \"width\":\"Ancho\",\n \"length\":\"Largo\",\n \"height\":\"Altura\",\n \"continue\":\"Continuar\",\n \"back\":\"Regresa\",\n \"foam\":\"Tipo de Espuma\",\n \"ortho\":\"Ortopédico\",\n \"memory\":\"Espuma de Memoria\",\n \"gel\": \"Gel Refrescante\",\n \"cup\":\"Taza\",\n \"donut\":\"Rosquilla\",\n \"slab\":\"Losa\",\n \"oval\":\"Oval\",\n \"shape\":\"Forma de Espuma\",\n \"size\":\"Tamaño de la Espuma\",\n \"xs\":\"Extra pequeño\",\n \"sm\":\"Pequeño\",\n \"md\":\"Medio\",\n \"lg\":\"Grande\",\n \"jm\":\"Jumbo\",\n \"jp\":\"Jumbo Plus\",\n \"gl\":\"Goliat\",\n \"qty\":\"Cantidad\",\n \"expected\":\"Cantidad de Corte\",\n \"submit\":\"Enviar\"\n }\n }\n\n const size_dims = {\n \"ortho\": { \n \"slab\": {\n \"small\" : 25.5 * 34.5 * 2,\n \"medium\": 33.5 * 42.5 * 2,\n \"large\": 24 * 35 * 5.5,\n \"jumbo\": 30 * 45 * 6,\n \"jumboPlus\": 36 * 51 * 8,\n \"goliath\": 42 * 58 * 9\n }\n }\n }\n\n function saveDims() {\n let trueWidth = parseFloat(width);\n let trueLength = parseFloat(length);\n let trueHeight = parseFloat(height);\n setDim(trueWidth * trueLength * trueHeight);\n }\n\n function goBack() {\n if(size) {\n setSize(null);\n }\n else if(shape && props.line !== 14 && props.line !== 6) {\n setShape(null);\n }\n else if(type) {\n setType(null);\n }\n else {\n setDim(0);\n }\n }\n\n function changeFoam(val) {\n if(val === \"default\") {\n setFoam(null);\n }\n else {\n setFoam(val);\n }\n }\n\n function saveFoam() {\n if(foam) {\n setType(foam);\n }\n if(props.line === 6 || props.line === 14) {\n setShape(\"Slab\");\n // document.querySelector(\"#shape select\").value = \"Slab\";\n }\n }\n\n function changeShape(val) {\n if(val === \"default\") {\n setTempShape(null);\n }\n else {\n setTempShape(val);\n }\n }\n\n function saveShape() {\n if(tempShape) {\n setShape(tempShape);\n }\n }\n\n function changeSize(val) {\n if(val === \"default\") {\n setTempSize(null);\n }\n else {\n setTempSize(val);\n }\n }\n\n function saveSize() {\n if(tempSize) {\n setSize(tempSize);\n let expDims = size_dims[type][shape][tempSize]\n setExpectedQty(Math.floor(dim / expDims));\n }\n }\n \n function reset() {\n setWidth(0)\n setLength(0)\n setHeight(0)\n setDim(0)\n setFoam(null)\n setType(null)\n setShape(null)\n setTempShape(null)\n setSize(null)\n setTempSize(null)\n setQty(0)\n setExpectedQty(0)\n document.querySelectorAll(\"input\").forEach((node) => {node.value = \"\"})\n setLoading(false);\n }\n\n function submit() {\n setLoading(true);\n submitRequest().then(function() {\n reset();\n }).catch(function(err){\n console.log(err);\n reset();\n })\n }\n\n function submitRequest() {\n return new Promise((resolve, reject) => {\n let url = props.base + \"/operations/saveFoam\";\n Axios.put(url, {\"length\":length,\"width\":width,\"height\":height,\"actual\":qty,\"expected\":expectedQty,\"foam\":type,\"shape\":shape, \"size\":size}, {mode: 'no-cors'}).then((result) => {resolve(result.data.orders)}).catch((error) => {console.log(error); reject()});\n })\n }\n\n return (\n \n {dim ? : null}\n \n setWidth(e.target.value)} type=\"number\">\n \n setLength(e.target.value)} type=\"number\">\n \n setHeight(e.target.value)} type=\"number\">\n \n {!dim ? \n \n : null}\n {dim ? \n \n : null}\n {!type && dim ? \n \n : null}\n {dim && type && props.line !== 14 && props.line !== 6 ? \n \n : null}\n {!shape && type && dim && props.line !== 14 && props.line !== 6 ? \n \n : null}\n {shape && dim && type ? \n \n : null}\n {!size && shape && type && dim ? \n \n : null}\n {size && shape && dim && type ? \n {lang[props.locale].expected + \" \" + String(expectedQty)}
\n setQty(e.target.value)} type=\"number\">\n : null}\n {size && shape && type && dim ? \n \n : null}\n \n );\n\n}\n\nexport default CNC;\n","import React, {useEffect, useState} from \"react\";\nimport Button from '@mui/material/Button';\nimport Box from '@mui/material/Box';\nimport Select from '@mui/material/Select';\nimport MenuItem from '@mui/material/MenuItem';\nimport TextField from '@mui/material/TextField';\nimport CloseIcon from '@mui/icons-material/Close';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport Axios from 'axios';\n\nfunction Slitter(props) {\n const [height, setHeight] = useState(0);\n const [dim, setDim] = useState(0);\n const [foam, setFoam] = useState(null);\n const [type, setType] = useState(null);\n const [qty, setQty] = useState(0);\n const [expectedQty, setExpectedQty] = useState(1000000);\n const [loading, setLoading] = useState(false);\n const [number, setNumber] = useState(0);\n const [trueNumber, setTrueNumber] = useState(0);\n\n const lang = {\n \"en\": {\n \"width\":\"Width\",\n \"length\":\"Length\",\n \"height\":\"Height\",\n \"continue\":\"Continue\",\n \"back\":\"Back\",\n \"foam\":\"Foam Type\",\n \"ortho\":\"Orthopedic\",\n \"memory\":\"Memory Foam\",\n \"gel\":\"Cooling Gel\",\n \"cup\":\"Cup\",\n \"donut\":\"Donut\",\n \"slab\":\"Slab\",\n \"oval\":\"Oval\",\n \"shape\":\"Foam Shape\",\n \"size\":\"Foam Size\",\n \"xs\":\"Extra Small\",\n \"sm\":\"Small\",\n \"md\":\"Medium\",\n \"lg\":\"Large\",\n \"jm\":\"Jumbo\",\n \"jp\":\"Jumbo Plus\",\n \"gl\":\"Goliath\",\n \"qty\":\"Cut Quantity\",\n \"expected\":\"Expected Quantity:\",\n \"submit\":\"Submit\",\n \"number\":\"Number of Blocks\"\n },\n \"es\": {\n \"width\":\"Ancho\",\n \"length\":\"Largo\",\n \"height\":\"Altura\",\n \"continue\":\"Continuar\",\n \"back\":\"Regresa\",\n \"foam\":\"Tipo de Espuma\",\n \"ortho\":\"Ortopédico\",\n \"memory\":\"Espuma de Memoria\",\n \"gel\": \"Gel Refrescante\",\n \"cup\":\"Taza\",\n \"donut\":\"Rosquilla\",\n \"slab\":\"Losa\",\n \"oval\":\"Oval\",\n \"shape\":\"Forma de Espuma\",\n \"size\":\"Tamaño de la Espuma\",\n \"xs\":\"Extra pequeño\",\n \"sm\":\"Pequeño\",\n \"md\":\"Medio\",\n \"lg\":\"Grande\",\n \"jm\":\"Jumbo\",\n \"jp\":\"Jumbo Plus\",\n \"gl\":\"Goliat\",\n \"qty\":\"Cantidad\",\n \"expected\":\"Cantidad de Corte\",\n \"submit\":\"Enviar\",\n \"number\":\"Numero de Bloques\"\n }\n }\n\n function saveDims() {\n let trueHeight = parseFloat(height);\n setDim(trueHeight);\n }\n\n function goBack() {\n if(type) {\n setType(null);\n }\n else if(trueNumber) {\n setTrueNumber(0);\n }\n else {\n setDim(0);\n }\n }\n\n function changeFoam(val) {\n if(val === \"default\") {\n setFoam(null);\n }\n else {\n setFoam(val);\n }\n }\n\n function saveFoam() {\n if(foam) {\n setType(foam);\n }\n }\n\n function reset() {\n setHeight(0)\n setDim(0)\n setFoam(null)\n setType(null)\n setQty(0)\n setTrueNumber(0);\n setExpectedQty(1000000)\n document.querySelectorAll(\"input\").forEach((node) => {node.value = \"\"})\n setLoading(false);\n }\n\n function submit() {\n setLoading(true);\n submitRequest().then(function() {\n reset();\n }).catch(function(err){\n console.log(err);\n reset();\n })\n }\n\n function saveNumber() {\n if(number) {\n setTrueNumber(number);\n }\n }\n\n function submitRequest() {\n return new Promise((resolve, reject) => {\n let url = props.base + \"/operations/saveFoam\";\n Axios.put(url, {\"length\":1,\"width\":1,\"height\":height,\"actual\":qty,\"expected\":expectedQty,\"foam\":type,\"shape\":\"Slitter\", \"size\":\"Uniform\"}, {mode: 'no-cors'}).then((result) => {resolve(result.data.orders)}).catch((error) => {console.log(error); reject()});\n })\n }\n\n return (\n \n {dim ? : null}\n \n setHeight(e.target.value)} type=\"number\">\n \n {!dim ? \n \n : null}\n {dim ? \n setNumber(e.target.value)} type=\"number\">\n : null}\n {!trueNumber && dim? \n \n : null}\n {dim && trueNumber ? \n \n : null}\n {!type && dim && trueNumber ? \n \n : null}\n {dim && type && trueNumber ? \n {lang[props.locale].expected + \" \" + String(expectedQty)}
\n setQty(e.target.value)} type=\"number\">\n : null}\n {type && dim && trueNumber ? \n \n : null}\n \n );\n\n}\n\nexport default Slitter;\n","import React, {useEffect, useState} from \"react\";\nimport Button from '@mui/material/Button';\nimport Box from '@mui/material/Box';\nimport TextField from '@mui/material/TextField';\nimport axios from 'axios';\nimport Table from \"@mui/material/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableContainer from \"@mui/material/TableContainer\";\nimport TableHead from \"@mui/material/TableHead\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Paper from \"@mui/material/Paper\";\n\nfunction OnTruck(props) {\n\n const [truckNumber, setTruckNumber] = useState('');\n const [inputTruckNumber, setInputTruckNumber] = useState('');\n const [tracking, setTracking] = useState(null);\n const [loading, setLoading] = useState(false);\n const [trackingArray, setTrackingArray] = useState([]);\n const [debounceTimeout, setDebounceTimeout] = useState(null);\n const [trackingLength, setTrackingLength] = useState(0);\n\n const carrier = props.carrier;\n\n const os = require('os');\n let api = \"furhaven-production.com/v1\";\n if(os.hostname().indexOf(\"local\") > -1 || os.hostname().indexOf(\"leas.\") > -1 || os.hostname().indexOf(\"10.1\") > -1){\n api = \"leas.\" + api;\n }\n const baseApiUrl = \"https://api.\" + api;\n\n const lang = {\n \"en\": {\n \"enter\": \"Enter\",\n \"submit\": \"Submit\",\n \"tracking\" : \"Tracking Number\",\n \"date\" : \"Date\",\n \"delete\": \"Delete\",\n \"action\": \"Action\",\n \"truck\": \"Truck Number\"\n },\n \"es\": {\n \"submit\":\"Enviar\",\n }\n };\n\n const handleTruckChange = (e) => {\n const value = e.target.value;\n setInputTruckNumber(value);\n\n if (debounceTimeout) {\n clearTimeout(debounceTimeout);\n }\n\n const timeout = setTimeout(() => {\n console.log(carrier);\n if ((carrier === 'FedEx' && (value.toLowerCase().includes(\"usps\") || value.toLowerCase().includes(\"ups\"))) || \n (carrier === 'UPS' && value.toLowerCase().includes(\"usps\")) ||\n (carrier === 'USPS' && value.toLowerCase().includes(\"ups\")) ||\n (value.length === 12 || value.length === 18 || value.length === 22 || value.length === 30)) {\n window.alert(\"Truck Number invalid.\");\n setInputTruckNumber('');\n } else {\n setTruckNumber(value);\n }\n }, 500); \n\n setDebounceTimeout(timeout);\n };\n\n function reset() {\n setTracking(null);\n document.querySelectorAll(\"input\").forEach((node) => {node.value = \"\"});\n setLoading(false);\n };\n\n useEffect(() => {\n if (tracking) {\n const delay = setTimeout(() => {\n addTrackingToArray();\n }, 500);\n \n return () => clearTimeout(delay);\n }\n }, [tracking]);\n\n useEffect(() => {\n const getTrackingLength = async () => {\n if (carrier === 'FedEx') setTrackingLength(12);\n if (carrier === 'USPS') setTrackingLength(22);\n if (carrier === 'UPS') setTrackingLength(18);\n };\n getTrackingLength();\n }, []);\n\n const checkDuplicateTracking = (trackNumber) => {\n const isDuplicate = trackingArray.some((item) => item.trackingNumber === trackNumber);\n return isDuplicate;\n };\n\n function addTrackingToArray() {\n setLoading(true);\n if ((carrier === 'FedEx' || carrier === 'UPS') && tracking.length !== trackingLength) {\n if (tracking.length % trackingLength === 0) {\n let splitTracking = [];\n for (let i = 0; i < tracking.length; i += trackingLength) {\n splitTracking.push(tracking.slice(i, i + trackingLength));\n };\n const uniqueTracking = [... new Set(splitTracking)];\n for (let j = 0; j < uniqueTracking.length; j++) {\n const duplicate = checkDuplicateTracking(uniqueTracking[j]);\n if (duplicate) {\n console.log(\"Duplicate tracking number detected.\"); \n continue;\n };\n insertScanInfo(uniqueTracking[j]).then(function() {\n reset();\n }).catch(function(err){\n console.log(err);\n reset();\n })\n\n }\n reset();\n return;\n }\n } \n const duplicate = checkDuplicateTracking(tracking);\n if (duplicate) {\n console.log(\"Duplicate tracking number detected.\"); \n setLoading(false);\n reset();\n return;\n };\n insertScanInfo(tracking).then(function() {\n reset();\n }).catch(function(err){\n console.log(err);\n reset();\n })\n \n };\n\n function insertScanInfo(trackNumber) {\n return new Promise((resolve, reject) => {\n setTimeout(() => {\n const currentDatetime = new Date().toISOString(); \n setTrackingArray((prevArray) => [\n ...prevArray,\n { trackingNumber: trackNumber, datetime: currentDatetime },\n ]);\n resolve();\n }, 500); \n });\n };\n\n const handleRemoveTracking = (trackingNumber) => {\n setTrackingArray((prevArray) =>\n prevArray.filter((item) => item.trackingNumber !== trackingNumber)\n );\n };\n\n const submit = async () => {\n const url = baseApiUrl + \"/operations/saveOnTruck\";\n try {\n setLoading(true);\n const res = await axios.put(url, {truck_number: truckNumber, array_data: trackingArray}, {mode: 'no-cors'});\n if (res.status === 200) {\n setTrackingArray([]);\n setTruckNumber('');\n setInputTruckNumber('');\n }\n } catch (error) {\n console.log(error);\n } finally {\n setLoading(false);\n }\n }\n\n return ( \n \n { truckNumber ? (\n \n \n {'Truck Number: ' + truckNumber}\n \n \n \n setTracking(e.target.value)}\n label = {lang[props.locale].tracking}\n variant = \"outlined\"\n />\n \n \n \n ) : (\n \n \n \n \n )}\n { trackingArray.length > 0 ? \n <>\n \n \n \n \n {lang[props.locale].tracking} \n {lang[props.locale].date} \n {lang[props.locale].action} \n \n \n \n { trackingArray\n .slice()\n .sort((a, b) => new Date(b.datetime) - new Date(a.datetime))\n .map((item, index) => (\n \n {item.trackingNumber} \n {item.datetime} \n \n \n \n \n ))}\n \n
\n \n \n >\n : null}\n \n \n );\n\n}\n\nexport default OnTruck;\n","import React, {useEffect, useState} from 'react';\nimport Box from '@mui/material/Box';\nimport NavBar from './nav_bar';\nimport ControlledAccordions from './top_accordion';\nimport OrderSearch from './order_search';\nimport OrderTable from './order_table';\nimport WorldWiseOrderTable from './worldwise_order_table';\nimport CNC from './foamCutter';\nimport Slitter from './foamSlitter';\nimport Popup from 'reactjs-popup';\nimport Button from '@mui/material/Button';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport texasSkus from '../data/texasSkus.json';\nimport OnTruck from './onTruck';\n\n\nfunction ProductionTablet(props) {\n const [order, changeOrder] = useState(null);\n const [type, changeType] = useState(\"\");\n const [locale, changeLocale] = useState(\"en\");\n const [refresh, updateRefresh] = useState(0);\n const [employees, updateEmployees] = useState([]);\n const [ShipmentNbr, setShipmentNbr] = useState(null);\n const [wwItems, setWWItems] = useState([]);\n const [wwTotal, setWWTotal] = useState(0);\n const [openConfirmWindow, setOpenConfirmWindow] = useState(false);\n const [loading, setLoading] = useState(false);\n\n \n const os = require('os');\n let api = \"furhaven-production.com/v1\";\n // if(os.hostname().indexOf(\"local\") > -1 || os.hostname().indexOf(\"dev.\") > -1) {\n // api = \"dev.\" + api;\n // }\n if(os.hostname().indexOf(\"local\") > -1 || os.hostname().indexOf(\"leas.\") > -1 || os.hostname().indexOf(\"10.1\") > -1){\n api = \"leas.\" + api;\n }\n const baseApiUrl = \"https://api.\" + api;\n\n\n useEffect(()=> {\n }, [])\n\n const lang = {\n \"en\": {\n \"leaveBuildWarning\":\"Warning: There are items in your current build. Exiting will remove them. Do you still wish to continue?\",\n \"cancel\":\"Cancel\",\n \"accept\":\"Accept\"\n },\n \"es\": {\n \"leaveBuildWarning\":\"Advertencia: Hay elementos en tu compilación actual. Salir los eliminará. ¿Todavía desea continuar?\",\n \"cancel\":\"Cancelar\",\n \"accept\":\"Aceptar\",\n }\n }\n\n function goBack(confirmGoBack) {\n if(wwTotal > 0 && confirmGoBack !== true){\n setOpenConfirmWindow(true);\n }\n else{\n changeOrder(null);\n changeType(\"\");\n props.resetter();\n }\n }\n\n function refreshToken() {\n updateRefresh(refresh + 1);\n }\n\n\n function setOrder(res) {\n let out = {\n \"Customer\": \"\",\n \"CustomerOrderNbr\": \"\",\n \"OrderNbr\": \"\",\n \"Date\":\"\",\n \"Items\": [],\n \"Total\": 0,\n \"Type\": \"\",\n };\n for(let i = 0; i < res.length; i++) {\n out[\"Customer\"] += res[i].Customer;\n out[\"CustomerOrderNbr\"] += res[i].CustomerOrderNbr;\n out[\"OrderNbr\"] += res[i].OrderNbr;\n out[\"Date\"] = res[i].Date;\n out[\"Type\"] = res[i].Type;\n if(res[i].ShipmentNbr) {\n setShipmentNbr(res[i].ShipmentNbr);\n }\n else {\n setShipmentNbr(null);\n }\n if(i < res.length - 1) {\n out[\"Customer\"] += \", \";\n out[\"CustomerOrderNbr\"] += \", \";\n out[\"OrderNbr\"] += \", \";\n }\n for(let j = 0; j < res[i].Items.length; j++) {\n out[\"Items\"].push(res[i].Items[j]);\n out[\"Total\"] += res[i].Items[j].Qty;\n }\n }\n changeOrder(out);\n }\n\n function setType(res) {\n changeType(res);\n }\n\n function resetOrder() {\n changeOrder(null);\n }\n\n function updateLocale() {\n if(locale === \"en\") {\n changeLocale(\"es\");\n }\n else {\n changeLocale(\"en\");\n }\n }\n\n return (\n
\n
setOpenConfirmWindow(false)}\n >\n \n {lang[locale].leaveBuildWarning}\n \n \n \n \n \n \n
\n {(props.wh.id === \"PA\" && (props.group.line <= 11 || props.group.line > 20)) ? \n
\n \n \n
\n \n { !order ? \n \n : \n \n }\n
\n \n : (props.wh.id === \"TX\") ?\n
\n \n \n
\n \n \n
\n \n : (props.wh.id === \"SHIP\") ?\n
\n :\n
\n {\n (props.group.line === 14) || (props.wh.id === \"PA\" && props.group.line === 12) ?\n \n : \n }\n \n }\n
\n );\n};\n\nexport default ProductionTablet;\n","import React, {useState, useEffect} from \"react\";\nimport Axios from \"axios\";\nimport Box from '@mui/material/Box';\nimport Button from '@mui/material/Button';\nimport Input from '@mui/material/Input';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport Moment from \"moment\";\nimport Alert from '@mui/material/Alert';\nimport Table from '@mui/material/Table';\nimport TableBody from '@mui/material/TableBody';\nimport TableCell from '@mui/material/TableCell';\nimport TableContainer from '@mui/material/TableContainer';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport { Download } from \"@mui/icons-material\";\n\nfunction LabelSort(props) {\n const [file, changeFile] = useState(null);\n const [loading, setLoading] = useState(false);\n const [ordernbr, setOrderNbr] = useState(null);\n const [error, setError] = useState(false);\n const [labels, setLabels] = useState(null);\n const [refresh, setRefresh] = useState(false);\n\n const os = require(\"os\");\n let api = \"furhaven-production.com/v1\";\n if(os.hostname().indexOf(\"local\") > -1 || os.hostname().indexOf(\"dev.\") > -1) {\n api = \"dev.\" + api;\n }\n const baseApiUrl = \"https://api.\" + api;\n\n useEffect(() => {\n const getLabels = async() => {\n let url = baseApiUrl + \"/operations/LabelSort\"\n let res = await Axios.get(url, {mode: 'no-cors'})\n let objs = res.data.data;\n console.log(objs)\n objs.sort((a,b) => {\n return new Date(b.lastModified) - new Date(a.lastModified);\n })\n setLabels(objs);\n }\n getLabels();\n }, [refresh])\n\n function toBlob(file) {\n return new Promise((resolve, reject) => {\n let reader = new FileReader();\n reader.onload = (event) => {\n resolve(event.target.result)\n };\n reader.readAsDataURL(file);\n })\n }\n\n\n function sortFile() {\n console.log(\"Sorting...\");\n setLoading(true);\n setError(false);\n toBlob(file).then(function (res) {\n sendPromise(res).then(function(result) {\n let pom = document.createElement('a');\n let now = Moment(Date.now()).format('YYYY-MM-DD');\n // pom.setAttribute('href', result);\n // pom.setAttribute('download', \"sorted_\" + file.name.replace(\".pdf\", \"\") + \"_\" + now + \".pdf\");\n // pom.click();\n setLoading(false);\n setOrderNbr(null);\n document.getElementById(\"myFile\").value = null;\n document.getElementById(\"order\").value = null;\n changeFile(null);\n })\n .catch(function(err) {\n console.log(err);\n setLoading(false);\n setError(\"Failed to sort.\");\n })\n });\n }\n\n const downloadLabel = async(key) => {\n let url = baseApiUrl + \"/operations/LabelSort/link?key=\" + key;\n console.log(url);\n let link = await Axios.get(url, {mod:'no-cors'});\n console.log(link);\n let a = document.createElement(\"a\");\n a.href = link.data.data;\n a.target = \"_blank\";\n a.download = \"sorted_\" + key;\n a.click();\n }\n\n function sendPromise(payload) {\n return new Promise((resolve, reject) => {\n let url = baseApiUrl + \"/operations/LabelSort\"\n Axios.put(url, {\"file\":payload, \"ordernbr\":ordernbr}, {mode: 'no-cors'}).then((result) => {resolve(result.data)}).catch((error) => {console.log(error); reject(error)});\n })\n }\n\n return(\n \n Furhaven Label Sorting
\n {error ? {error} : null}\n setOrderNbr(e.target.value)} />\n \n changeFile(e.target.files[0])} name=\"filename\" />\n \n \n \n {labels ? \n\n \n \n \n \n Link\n Date\n Download\n \n \n \n {labels.map((row, index) => (\n \n {row.key}\n {row.lastModified.replace(\"T\", \" \").replace(\".000Z\", \"\")}\n \n \n ))}\n \n
\n \n \n : null}\n \n )\n\n}\n\n\n\nexport default LabelSort;\n","import React, {useState, useEffect} from \"react\";\nimport Box from '@mui/material/Box';\nimport Button from '@mui/material/Button';\nimport LineButton from \"./components/line_button\";\nimport line_data from \"./data/lines.json\"\nimport warehouses from \"./data/warehouses.json\"\nimport WarehouseButton from \"./components/warehouse_button\"\nimport ProductionTablet from \"./components/production_tablet\"\nimport LabelSort from './components/labelsort';\n\nfunction App() {\n const [warehouse, changeWarehouse] = useState(null);\n const [group, changeGroup] = useState(null);\n const [isLabelSort, setIsLabelSort] = useState(false);\n\n useEffect(() => {\n let loc = window.location.href;\n console.log(loc);\n if(loc.toLowerCase().indexOf(\"labelsort\") > -1) {\n setIsLabelSort(true);\n }\n \n }, [])\n\n function createButton(line, index) {\n return \n }\n\n function lineOnClick(line) {\n changeGroup(line);\n } \n\n function createButtons(lines) {\n return lines.map(createButton);\n }\n\n function whOnClick(warehouse) {\n changeWarehouse(warehouse);\n }\n\n function createWarehouse(warehouse, index) {\n return \n }\n\n function createWarehouses(warehouses) {\n return warehouses.map(createWarehouse);\n }\n\n function createProductionTablet() {\n return \n }\n\n function resetWh() {\n changeGroup(null);\n changeWarehouse(null);\n }\n\n function refreshPage() {\n window.location.reload();\n }\n\n return(\n \n {\n isLabelSort ?\n \n \n \n : \n {group== null ? (warehouse === null ? createWarehouses(warehouses.warehouses) : createButtons(line_data[warehouse.id].lines)) : createProductionTablet()}\n {warehouse === null ? : null}\n \n }\n\n \n )\n\n}\n\n\n\nexport default App;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\n\nReactDOM.render(\n ,\n document.getElementById('root')\n);\n"],"sourceRoot":""}