From e06a239a8404f55e8de643220dae0beaa6e2b3fc Mon Sep 17 00:00:00 2001 From: rpm-mcarman <65228808+rpm-mcarman@users.noreply.github.com> Date: Wed, 20 Mar 2024 06:56:44 -0400 Subject: [PATCH] Minor Changes to address part code updates --- .../Development/app/config/config.json | 2 +- app/api/Parts/asynccalls/create_part.json | 2 +- app/api/Parts/asynccalls/updatepartcode.json | 463 ++++++++++++++ app/config/config.json | 2 +- public/dmxAppConnect/config.js | 596 ++++++++++++++++++ views/layouts/newmain.ejs | 1 + views/layouts/smain.ejs | 22 +- views/secure/partinfo.ejs | 8 +- 8 files changed, 1080 insertions(+), 16 deletions(-) create mode 100644 app/api/Parts/asynccalls/updatepartcode.json diff --git a/.wappler/targets/Development/app/config/config.json b/.wappler/targets/Development/app/config/config.json index 00bfe1c..48d79c6 100644 --- a/.wappler/targets/Development/app/config/config.json +++ b/.wappler/targets/Development/app/config/config.json @@ -6,6 +6,6 @@ "methods": "GET,POST,DELETE,PATCH,PUT" }, "env": { - "API_BASEURL": "http://vapor.prelub.com/api/v1.0/" + "API_BASEURL": "http://localhost:8080/api/v1.0/" } } \ No newline at end of file diff --git a/app/api/Parts/asynccalls/create_part.json b/app/api/Parts/asynccalls/create_part.json index cfb0f7f..11800a2 100644 --- a/app/api/Parts/asynccalls/create_part.json +++ b/app/api/Parts/asynccalls/create_part.json @@ -211,7 +211,7 @@ "module": "api", "action": "send", "options": { - "url": "http://localhost:8080/api/v1.0/partnumbers/async", + "url": "{{$_ENV$_ENV.API_BASEURL+'partnumbers/async'}}", "dataType": "json", "schema": [ { diff --git a/app/api/Parts/asynccalls/updatepartcode.json b/app/api/Parts/asynccalls/updatepartcode.json new file mode 100644 index 0000000..c30d78d --- /dev/null +++ b/app/api/Parts/asynccalls/updatepartcode.json @@ -0,0 +1,463 @@ +{ + "meta": { + "$_GET": [ + { + "type": "text", + "name": "id" + }, + { + "type": "text", + "name": "cid" + } + ] + }, + "exec": { + "steps": { + "name": "api", + "module": "api", + "action": "send", + "options": { + "url": "{{$_ENV.API_BASEURL+'partnumbers/updatepartcode/'+$_GET.id+'/'+$_GET.cid}}", + "schema": [ + { + "type": "object", + "name": "data", + "sub": [ + { + "type": "object", + "name": "packinglocation", + "sub": [ + { + "type": "text", + "name": "id" + } + ] + }, + { + "type": "text", + "name": "weight" + }, + { + "type": "object", + "name": "status", + "sub": [ + { + "type": "number", + "name": "id" + } + ] + }, + { + "type": "number", + "name": "createuserid" + }, + { + "type": "text", + "name": "file" + }, + { + "type": "text", + "name": "updatedate" + }, + { + "type": "number", + "name": "updateuserid" + }, + { + "type": "text", + "name": "secondaryvendorpartnumber" + }, + { + "type": "object", + "name": "secondaryvendor", + "sub": [ + { + "type": "text", + "name": "id" + } + ] + }, + { + "type": "text", + "name": "primarycustomerpartnumber" + }, + { + "type": "object", + "name": "replaces", + "sub": [ + { + "type": "text", + "name": "id" + } + ] + }, + { + "type": "object", + "name": "replacedby", + "sub": [ + { + "type": "text", + "name": "id" + } + ] + }, + { + "type": "object", + "name": "partcode", + "sub": [ + { + "type": "number", + "name": "id" + }, + { + "type": "text", + "name": "description" + }, + { + "type": "number", + "name": "createuserid" + }, + { + "type": "text", + "name": "updatedate" + }, + { + "type": "object", + "name": "parent", + "sub": [ + { + "type": "number", + "name": "id" + } + ] + }, + { + "type": "object", + "name": "parttype", + "sub": [ + { + "type": "number", + "name": "id" + } + ] + }, + { + "type": "boolean", + "name": "ispartcode" + }, + { + "type": "text", + "name": "code" + }, + { + "type": "boolean", + "name": "isactive" + }, + { + "type": "number", + "name": "updateuserid" + }, + { + "type": "text", + "name": "createdate" + }, + { + "type": "text", + "name": "name" + } + ] + }, + { + "type": "text", + "name": "stdcost" + }, + { + "type": "text", + "name": "listprice" + }, + { + "type": "number", + "name": "id" + }, + { + "type": "text", + "name": "ppap" + }, + { + "type": "text", + "name": "number" + }, + { + "type": "object", + "name": "primaryvendor", + "sub": [ + { + "type": "text", + "name": "id" + } + ] + }, + { + "type": "text", + "name": "comments" + }, + { + "type": "text", + "name": "createdate" + }, + { + "type": "object", + "name": "primarycustomer", + "sub": [ + { + "type": "number", + "name": "id" + } + ] + }, + { + "type": "object", + "name": "pickinglocation", + "sub": [ + { + "type": "text", + "name": "id" + } + ] + }, + { + "type": "text", + "name": "primaryvendorpartnumber" + }, + { + "type": "text", + "name": "description" + } + ] + } + ], + "method": "POST" + }, + "output": true, + "meta": [ + { + "type": "object", + "name": "data", + "sub": [ + { + "type": "object", + "name": "packinglocation", + "sub": [ + { + "type": "text", + "name": "id" + } + ] + }, + { + "type": "text", + "name": "weight" + }, + { + "type": "object", + "name": "status", + "sub": [ + { + "type": "number", + "name": "id" + } + ] + }, + { + "type": "number", + "name": "createuserid" + }, + { + "type": "text", + "name": "file" + }, + { + "type": "text", + "name": "updatedate" + }, + { + "type": "number", + "name": "updateuserid" + }, + { + "type": "text", + "name": "secondaryvendorpartnumber" + }, + { + "type": "object", + "name": "secondaryvendor", + "sub": [ + { + "type": "text", + "name": "id" + } + ] + }, + { + "type": "text", + "name": "primarycustomerpartnumber" + }, + { + "type": "object", + "name": "replaces", + "sub": [ + { + "type": "text", + "name": "id" + } + ] + }, + { + "type": "object", + "name": "replacedby", + "sub": [ + { + "type": "text", + "name": "id" + } + ] + }, + { + "type": "object", + "name": "partcode", + "sub": [ + { + "type": "number", + "name": "id" + }, + { + "type": "text", + "name": "description" + }, + { + "type": "number", + "name": "createuserid" + }, + { + "type": "text", + "name": "updatedate" + }, + { + "type": "object", + "name": "parent", + "sub": [ + { + "type": "number", + "name": "id" + } + ] + }, + { + "type": "object", + "name": "parttype", + "sub": [ + { + "type": "number", + "name": "id" + } + ] + }, + { + "type": "boolean", + "name": "ispartcode" + }, + { + "type": "text", + "name": "code" + }, + { + "type": "boolean", + "name": "isactive" + }, + { + "type": "number", + "name": "updateuserid" + }, + { + "type": "text", + "name": "createdate" + }, + { + "type": "text", + "name": "name" + } + ] + }, + { + "type": "text", + "name": "stdcost" + }, + { + "type": "text", + "name": "listprice" + }, + { + "type": "number", + "name": "id" + }, + { + "type": "text", + "name": "ppap" + }, + { + "type": "text", + "name": "number" + }, + { + "type": "object", + "name": "primaryvendor", + "sub": [ + { + "type": "text", + "name": "id" + } + ] + }, + { + "type": "text", + "name": "comments" + }, + { + "type": "text", + "name": "createdate" + }, + { + "type": "object", + "name": "primarycustomer", + "sub": [ + { + "type": "number", + "name": "id" + } + ] + }, + { + "type": "object", + "name": "pickinglocation", + "sub": [ + { + "type": "text", + "name": "id" + } + ] + }, + { + "type": "text", + "name": "primaryvendorpartnumber" + }, + { + "type": "text", + "name": "description" + } + ] + } + ], + "outputType": "object" + } + } +} \ No newline at end of file diff --git a/app/config/config.json b/app/config/config.json index 00bfe1c..48d79c6 100644 --- a/app/config/config.json +++ b/app/config/config.json @@ -6,6 +6,6 @@ "methods": "GET,POST,DELETE,PATCH,PUT" }, "env": { - "API_BASEURL": "http://vapor.prelub.com/api/v1.0/" + "API_BASEURL": "http://localhost:8080/api/v1.0/" } } \ No newline at end of file diff --git a/public/dmxAppConnect/config.js b/public/dmxAppConnect/config.js index 9d08798..85beba0 100644 --- a/public/dmxAppConnect/config.js +++ b/public/dmxAppConnect/config.js @@ -15603,6 +15603,602 @@ dmx.config({ } ] } + ], + "query": [ + { + "type": "text", + "name": "pid" + } + ], + "api_getbyid": [ + { + "type": "object", + "name": "data", + "sub": [ + { + "type": "object", + "name": "packinglocation", + "sub": [ + { + "type": "text", + "name": "id" + } + ] + }, + { + "type": "text", + "name": "weight" + }, + { + "type": "object", + "name": "status", + "sub": [ + { + "type": "text", + "name": "updatedate" + }, + { + "type": "text", + "name": "createuserid" + }, + { + "type": "text", + "name": "updateuserid" + }, + { + "type": "number", + "name": "id" + }, + { + "type": "text", + "name": "name" + }, + { + "type": "text", + "name": "createdate" + } + ] + }, + { + "type": "number", + "name": "createuserid" + }, + { + "type": "text", + "name": "file" + }, + { + "type": "text", + "name": "updatedate" + }, + { + "type": "number", + "name": "updateuserid" + }, + { + "type": "text", + "name": "secondaryvendorpartnumber" + }, + { + "type": "text", + "name": "primarycustomerpartnumber" + }, + { + "type": "object", + "name": "secondaryvendor", + "sub": [ + { + "type": "text", + "name": "id" + } + ] + }, + { + "type": "object", + "name": "replaces", + "sub": [ + { + "type": "text", + "name": "id" + } + ] + }, + { + "type": "object", + "name": "replacedby", + "sub": [ + { + "type": "text", + "name": "id" + } + ] + }, + { + "type": "object", + "name": "partcode", + "sub": [ + { + "type": "number", + "name": "id" + }, + { + "type": "text", + "name": "description" + }, + { + "type": "number", + "name": "createuserid" + }, + { + "type": "text", + "name": "updatedate" + }, + { + "type": "object", + "name": "parent", + "sub": [ + { + "type": "text", + "name": "id" + } + ] + }, + { + "type": "object", + "name": "parttype", + "sub": [ + { + "type": "text", + "name": "updatedate" + }, + { + "type": "number", + "name": "ending" + }, + { + "type": "number", + "name": "id" + }, + { + "type": "number", + "name": "starting" + }, + { + "type": "number", + "name": "updateuserid" + }, + { + "type": "text", + "name": "createdate" + }, + { + "type": "text", + "name": "description" + }, + { + "type": "text", + "name": "name" + }, + { + "type": "number", + "name": "createuserid" + } + ] + }, + { + "type": "boolean", + "name": "ispartcode" + }, + { + "type": "text", + "name": "code" + }, + { + "type": "boolean", + "name": "isactive" + }, + { + "type": "number", + "name": "updateuserid" + }, + { + "type": "text", + "name": "createdate" + }, + { + "type": "text", + "name": "name" + } + ] + }, + { + "type": "text", + "name": "listprice" + }, + { + "type": "text", + "name": "stdcost" + }, + { + "type": "number", + "name": "id" + }, + { + "type": "text", + "name": "ppap" + }, + { + "type": "text", + "name": "number" + }, + { + "type": "array", + "name": "designspecs", + "sub": [ + { + "type": "text", + "name": "metaltag" + }, + { + "type": "text", + "name": "remarks" + }, + { + "type": "number", + "name": "id" + }, + { + "type": "boolean", + "name": "facrequired" + }, + { + "type": "text", + "name": "weight" + }, + { + "type": "text", + "name": "swtch" + }, + { + "type": "text", + "name": "terminalposition" + }, + { + "type": "text", + "name": "treatment" + }, + { + "type": "text", + "name": "note" + }, + { + "type": "boolean", + "name": "faccompleted" + }, + { + "type": "text", + "name": "voltage" + }, + { + "type": "object", + "name": "status", + "sub": [ + { + "type": "number", + "name": "id" + } + ] + }, + { + "type": "text", + "name": "signed" + }, + { + "type": "text", + "name": "plrv" + }, + { + "type": "text", + "name": "except" + }, + { + "type": "text", + "name": "approveuserid" + }, + { + "type": "text", + "name": "makefrom" + }, + { + "type": "text", + "name": "pinion" + }, + { + "type": "text", + "name": "signedDate" + }, + { + "type": "text", + "name": "box" + }, + { + "type": "text", + "name": "ho" + }, + { + "type": "text", + "name": "gasket" + }, + { + "type": "text", + "name": "bracket" + }, + { + "type": "text", + "name": "suctionfitting" + }, + { + "type": "object", + "name": "partnumber", + "sub": [ + { + "type": "number", + "name": "id" + } + ] + }, + { + "type": "text", + "name": "revisionlevel" + }, + { + "type": "text", + "name": "oereman" + }, + { + "type": "text", + "name": "rotation" + }, + { + "type": "text", + "name": "pressureport" + }, + { + "type": "text", + "name": "switchposition" + }, + { + "type": "text", + "name": "checked" + }, + { + "type": "text", + "name": "reasonforchange" + }, + { + "type": "text", + "name": "tagnumber" + }, + { + "type": "text", + "name": "suctionport" + }, + { + "type": "text", + "name": "rtv" + }, + { + "type": "text", + "name": "validation" + }, + { + "type": "text", + "name": "approvedate" + }, + { + "type": "text", + "name": "floatstock" + }, + { + "type": "text", + "name": "workinstruction" + }, + { + "type": "text", + "name": "frequency" + }, + { + "type": "text", + "name": "papertag" + }, + { + "type": "text", + "name": "drive" + }, + { + "type": "boolean", + "name": "customernotification" + }, + { + "type": "text", + "name": "curve" + }, + { + "type": "text", + "name": "servicereplacementref" + }, + { + "type": "text", + "name": "built" + }, + { + "type": "text", + "name": "ftf" + }, + { + "type": "text", + "name": "opening" + }, + { + "type": "text", + "name": "jsp" + }, + { + "type": "text", + "name": "updatedate" + }, + { + "type": "text", + "name": "application" + }, + { + "type": "text", + "name": "pitch" + }, + { + "type": "text", + "name": "createuserid" + }, + { + "type": "text", + "name": "mtgh" + }, + { + "type": "text", + "name": "sae" + }, + { + "type": "array", + "name": "boms" + }, + { + "type": "text", + "name": "othertag" + }, + { + "type": "text", + "name": "createdate" + }, + { + "type": "text", + "name": "effectivedate" + }, + { + "type": "text", + "name": "checkedDate" + }, + { + "type": "text", + "name": "updateuserid" + }, + { + "type": "text", + "name": "additionalparts" + }, + { + "type": "text", + "name": "pressurefitting" + }, + { + "type": "text", + "name": "basicclass" + } + ] + }, + { + "type": "object", + "name": "primaryvendor", + "sub": [ + { + "type": "text", + "name": "id" + } + ] + }, + { + "type": "text", + "name": "comments" + }, + { + "type": "text", + "name": "createdate" + }, + { + "type": "object", + "name": "pickinglocation", + "sub": [ + { + "type": "text", + "name": "id" + } + ] + }, + { + "type": "object", + "name": "primarycustomer", + "sub": [ + { + "type": "text", + "name": "updatedate" + }, + { + "type": "number", + "name": "id" + }, + { + "type": "number", + "name": "updateuserid" + }, + { + "type": "text", + "name": "createdate" + }, + { + "type": "text", + "name": "description" + }, + { + "type": "text", + "name": "name" + }, + { + "type": "number", + "name": "createuserid" + } + ] + }, + { + "type": "text", + "name": "primaryvendorpartnumber" + }, + { + "type": "text", + "name": "description" + } + ] + }, + { + "type": "object", + "name": "headers", + "sub": [ + { + "type": "text", + "name": "connection" + }, + { + "type": "text", + "name": "content-length" + }, + { + "type": "text", + "name": "content-type" + }, + { + "type": "text", + "name": "date" + } + ] + } ] }, "newpart": { diff --git a/views/layouts/newmain.ejs b/views/layouts/newmain.ejs index 7be2791..742e6be 100644 --- a/views/layouts/newmain.ejs +++ b/views/layouts/newmain.ejs @@ -111,6 +111,7 @@ +