Selaa lähdekoodia

Added a bunch of api calls and formatting of pages

master
rpm-mcarman 2 vuotta sitten
vanhempi
commit
93af4063a1
45 muutettua tiedostoa jossa 4517 lisäystä ja 720 poistoa
  1. +1
    -1
      .wappler/targets/Development/app/config/config.json
  2. +32
    -0
      app/api/BOM/copyitems.json
  3. +1986
    -0
      app/api/BOM/findbypn.json
  4. +3
    -0
      app/api/DSpec/copy.json
  5. +537
    -0
      app/api/DSpec/revup.json
  6. +4
    -3
      app/api/Users/create.json
  7. +106
    -1
      app/api/Users/delete.json
  8. +139
    -0
      app/api/Users/userroles.json
  9. +38
    -0
      app/api/apps/deleteapp.json
  10. +151
    -2
      app/api/security/confirm.json
  11. +252
    -0
      app/api/security/defalutadminapi.json
  12. +6
    -3
      app/api/security/defaultadmin.json
  13. +1
    -1
      app/config/config.json
  14. BIN
      data/authdb.sqlite3
  15. +803
    -673
      package-lock.json
  16. +13
    -0
      public/Framework7/7/css/framework7-bundle-rtl.min.css
  17. +13
    -0
      public/Framework7/7/css/framework7-bundle.min.css
  18. +13
    -0
      public/Framework7/7/css/framework7-rtl.min.css
  19. +13
    -0
      public/Framework7/7/css/framework7.min.css
  20. BIN
      public/Framework7/7/img/f7-icon-square.png
  21. BIN
      public/Framework7/7/img/f7-icon.png
  22. +40
    -0
      public/Framework7/7/js/app.js
  23. +14
    -0
      public/Framework7/7/js/framework7-bundle.min.js
  24. +1
    -0
      public/Framework7/7/js/framework7-bundle.min.js.map
  25. +14
    -0
      public/Framework7/7/js/framework7.min.js
  26. +1
    -0
      public/Framework7/7/js/framework7.min.js.map
  27. +1
    -0
      public/Framework7/7/js/routes.js
  28. +40
    -0
      public/dmxAppConnect/config.js
  29. +8
    -0
      public/dmxAppConnect/dmxBootstrap4Modal/dmxBootstrap4Modal.js
  30. +21
    -0
      public/dmxAppConnect/dmxBootstrap4Navigation/dmxBootstrap4Navigation.js
  31. +78
    -0
      public/dmxAppConnect/dmxBootstrap4TableGenerator/dmxBootstrap4TableGenerator.css
  32. +8
    -0
      public/dmxAppConnect/dmxFramework7/dmxFramework7.js
  33. +31
    -0
      public/dmxFramework7_icons/css/framework7-icons.css
  34. BIN
      public/dmxFramework7_icons/fonts/Framework7Icons-Regular.eot
  35. BIN
      public/dmxFramework7_icons/fonts/Framework7Icons-Regular.ttf
  36. BIN
      public/dmxFramework7_icons/fonts/Framework7Icons-Regular.woff
  37. BIN
      public/dmxFramework7_icons/fonts/Framework7Icons-Regular.woff2
  38. +2
    -0
      public/js/jquery-3.5.1.slim.min.js
  39. +2
    -2
      views/cnfrm.ejs
  40. +1
    -1
      views/confirm.ejs
  41. +20
    -4
      views/layouts/main.ejs
  42. +7
    -3
      views/layouts/smain.ejs
  43. +94
    -18
      views/secure/dspec.ejs
  44. +2
    -2
      views/secure/dspecgeneral.ejs
  45. +21
    -6
      views/wadmin/usermanage.ejs

+ 1
- 1
.wappler/targets/Development/app/config/config.json Näytä tiedosto

@@ -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/"
}
}

+ 32
- 0
app/api/BOM/copyitems.json Näytä tiedosto

@@ -0,0 +1,32 @@
{
"meta": {
"$_GET": [
{
"type": "text",
"name": "olddspecid"
},
{
"type": "text",
"name": "newdspecid"
}
]
},
"exec": {
"steps": {
"name": "copyitems",
"module": "api",
"action": "send",
"options": {
"url": "{{$_ENV.API_BASEURL+'boms/copy/'+$_GET.newdspecid+'/'+$_GET.olddspecid}}",
"method": "PUT"
},
"output": true,
"metaData": {
"apiUrl": {
"name": "olddspecid",
"type": "text"
}
}
}
}
}

+ 1986
- 0
app/api/BOM/findbypn.json
File diff suppressed because it is too large
Näytä tiedosto


+ 3
- 0
app/api/DSpec/copy.json Näytä tiedosto

@@ -0,0 +1,3 @@
{
"exec": {}
}

+ 537
- 0
app/api/DSpec/revup.json Näytä tiedosto

@@ -0,0 +1,537 @@
{
"meta": {
"$_GET": [
{
"type": "text",
"name": "id"
},
{
"type": "text",
"name": "userid"
}
]
},
"exec": {
"steps": {
"name": "api_revup",
"module": "api",
"action": "send",
"options": {
"url": "{{$_ENV.API_BASEURL+'designspecs/revup/'+$_GET.id+'/'+$_GET.userid}}",
"schema": [
{
"type": "object",
"name": "data",
"sub": [
{
"type": "text",
"name": "metaltag"
},
{
"type": "text",
"name": "remarks"
},
{
"type": "number",
"name": "id"
},
{
"type": "boolean",
"name": "facrequired"
},
{
"type": "text",
"name": "swtch"
},
{
"type": "text",
"name": "terminalposition"
},
{
"type": "text",
"name": "treatment"
},
{
"type": "text",
"name": "note"
},
{
"type": "text",
"name": "voltage"
},
{
"type": "boolean",
"name": "faccompleted"
},
{
"type": "object",
"name": "status",
"sub": [
{
"type": "number",
"name": "id"
}
]
},
{
"type": "text",
"name": "plrv"
},
{
"type": "text",
"name": "except"
},
{
"type": "text",
"name": "approveuserid"
},
{
"type": "text",
"name": "makefrom"
},
{
"type": "text",
"name": "pinion"
},
{
"type": "text",
"name": "box"
},
{
"type": "text",
"name": "ho"
},
{
"type": "text",
"name": "gasket"
},
{
"type": "text",
"name": "bracket"
},
{
"type": "text",
"name": "suctionfitting"
},
{
"type": "text",
"name": "rotation"
},
{
"type": "object",
"name": "partnumber",
"sub": [
{
"type": "number",
"name": "id"
}
]
},
{
"type": "text",
"name": "oereman"
},
{
"type": "text",
"name": "tagnumber"
},
{
"type": "text",
"name": "pressureport"
},
{
"type": "text",
"name": "switchposition"
},
{
"type": "text",
"name": "reasonforchange"
},
{
"type": "text",
"name": "revisionlevel"
},
{
"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": "text",
"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": "application"
},
{
"type": "text",
"name": "updatedate"
},
{
"type": "text",
"name": "pitch"
},
{
"type": "number",
"name": "createuserid"
},
{
"type": "text",
"name": "mtgh"
},
{
"type": "text",
"name": "sae"
},
{
"type": "text",
"name": "othertag"
},
{
"type": "text",
"name": "createdate"
},
{
"type": "text",
"name": "effectivedate"
},
{
"type": "number",
"name": "updateuserid"
},
{
"type": "text",
"name": "additionalparts"
},
{
"type": "text",
"name": "basicclass"
},
{
"type": "text",
"name": "pressurefitting"
}
]
}
],
"method": "PUT"
},
"output": true,
"meta": [
{
"type": "object",
"name": "data",
"sub": [
{
"type": "text",
"name": "metaltag"
},
{
"type": "text",
"name": "remarks"
},
{
"type": "number",
"name": "id"
},
{
"type": "boolean",
"name": "facrequired"
},
{
"type": "text",
"name": "swtch"
},
{
"type": "text",
"name": "terminalposition"
},
{
"type": "text",
"name": "treatment"
},
{
"type": "text",
"name": "note"
},
{
"type": "text",
"name": "voltage"
},
{
"type": "boolean",
"name": "faccompleted"
},
{
"type": "object",
"name": "status",
"sub": [
{
"type": "number",
"name": "id"
}
]
},
{
"type": "text",
"name": "plrv"
},
{
"type": "text",
"name": "except"
},
{
"type": "text",
"name": "approveuserid"
},
{
"type": "text",
"name": "makefrom"
},
{
"type": "text",
"name": "pinion"
},
{
"type": "text",
"name": "box"
},
{
"type": "text",
"name": "ho"
},
{
"type": "text",
"name": "gasket"
},
{
"type": "text",
"name": "bracket"
},
{
"type": "text",
"name": "suctionfitting"
},
{
"type": "text",
"name": "rotation"
},
{
"type": "object",
"name": "partnumber",
"sub": [
{
"type": "number",
"name": "id"
}
]
},
{
"type": "text",
"name": "oereman"
},
{
"type": "text",
"name": "tagnumber"
},
{
"type": "text",
"name": "pressureport"
},
{
"type": "text",
"name": "switchposition"
},
{
"type": "text",
"name": "reasonforchange"
},
{
"type": "text",
"name": "revisionlevel"
},
{
"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": "text",
"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": "application"
},
{
"type": "text",
"name": "updatedate"
},
{
"type": "text",
"name": "pitch"
},
{
"type": "number",
"name": "createuserid"
},
{
"type": "text",
"name": "mtgh"
},
{
"type": "text",
"name": "sae"
},
{
"type": "text",
"name": "othertag"
},
{
"type": "text",
"name": "createdate"
},
{
"type": "text",
"name": "effectivedate"
},
{
"type": "number",
"name": "updateuserid"
},
{
"type": "text",
"name": "additionalparts"
},
{
"type": "text",
"name": "basicclass"
},
{
"type": "text",
"name": "pressurefitting"
}
]
}
],
"outputType": "object",
"metaData": {
"apiUrl": {
"name": "userid",
"type": "text"
}
}
}
}
}

+ 4
- 3
app/api/Users/create.json Näytä tiedosto

@@ -113,7 +113,7 @@
"meta": [
{
"name": "identity",
"type": "number"
"type": "text"
},
{
"name": "affected",
@@ -228,10 +228,11 @@
"instance": "mail",
"subject": "Validation Code",
"fromName": "RPM Access",
"fromEmail": "no-reply@rpmindustries.com",
"fromEmail": "no-reply@access2.prelub.com",
"toName": "New User",
"toEmail": "{{$_POST.email}}",
"body": "<p>Here are your credentials to login for the first time and your registration code to validate your account.</p>\n<p>Your username is: {{$_POST.email}}</p>\n<p>Your password is: P@$$w0rd</p>\n<p>Your validation code is: {{regcode}}</p>\n<br/>\n<p>Once you login you will be prompted for the validation code.</p>"
"body": "<p>\nHere are your credentials to login for the first time and your registration code to validate your account.\nYour username is: {{$_POST.email}}\nYour password is: P@$$w0rd\nYour validation code is: {{regcode}}\n</p><Br/>\n<p>Click <a href='http://access2.prelub.com'>here</a> to be directed to the website.\n Then click the account menu and login.\n Once you login you will be prompted for the validation code.\n</p>\n\n\n\n",
"contentType": "html"
},
"metaData": {
"sendToEmail": {


+ 106
- 1
app/api/Users/delete.json Näytä tiedosto

@@ -1,3 +1,108 @@
{
"exec": {}
"meta": {
"$_GET": [
{
"type": "text",
"name": "id"
}
]
},
"exec": {
"steps": [
{
"name": "delete",
"module": "dbupdater",
"action": "delete",
"options": {
"connection": "authdb",
"sql": {
"type": "delete",
"table": "xuserrole",
"wheres": {
"condition": "AND",
"rules": [
{
"id": "userid",
"field": "userid",
"type": "double",
"operator": "equal",
"value": "{{$_GET.id}}",
"data": {
"column": "userid"
},
"operation": "="
}
],
"conditional": null,
"valid": true
},
"returning": "id",
"query": "delete from `xuserrole` where `userid` = ?",
"params": [
{
"operator": "equal",
"type": "expression",
"name": ":P1",
"value": "{{$_GET.id}}",
"test": ""
}
]
}
},
"meta": [
{
"name": "affected",
"type": "number"
}
]
},
{
"name": "delete1",
"module": "dbupdater",
"action": "delete",
"options": {
"connection": "authdb",
"sql": {
"type": "delete",
"table": "users",
"wheres": {
"condition": "AND",
"rules": [
{
"id": "id",
"field": "id",
"type": "double",
"operator": "equal",
"value": "{{$_GET.id}}",
"data": {
"column": "id"
},
"operation": "="
}
],
"conditional": null,
"valid": true
},
"returning": "id",
"query": "delete from `users` where `id` = ?",
"params": [
{
"operator": "equal",
"type": "expression",
"name": ":P1",
"value": "{{$_GET.id}}",
"test": ""
}
]
}
},
"meta": [
{
"name": "affected",
"type": "number"
}
]
}
]
}
}

+ 139
- 0
app/api/Users/userroles.json Näytä tiedosto

@@ -0,0 +1,139 @@
{
"meta": {
"$_GET": [
{
"type": "text",
"name": "sort"
},
{
"type": "text",
"name": "dir"
},
{
"type": "text",
"name": "userid"
}
]
},
"exec": {
"steps": [
{
"name": "userroles",
"module": "dbconnector",
"action": "select",
"options": {
"connection": "authdb",
"sql": {
"type": "select",
"columns": [
{
"table": "xuserrole",
"column": "userid",
"recid": 1
},
{
"table": "roles",
"column": "id",
"recid": 2
},
{
"table": "roles",
"column": "name",
"recid": 3
},
{
"table": "roles",
"column": "isDepartment",
"recid": 4
}
],
"params": [],
"table": {
"name": "roles"
},
"primary": "id",
"joins": [
{
"table": "xuserrole",
"column": "*",
"type": "INNER",
"clauses": {
"condition": "AND",
"rules": [
{
"table": "xuserrole",
"column": "roleid",
"operator": "equal",
"operation": "=",
"value": {
"table": "roles",
"column": "id"
}
}
]
},
"primary": "id"
}
],
"query": "select `xuserrole`.`userid`, `roles`.`id`, `roles`.`name`, `roles`.`isDepartment` from `roles` inner join `xuserrole` on `xuserrole`.`roleid` = `roles`.`id`"
}
},
"meta": [
{
"type": "number",
"name": "userid"
},
{
"type": "number",
"name": "id"
},
{
"type": "text",
"name": "name"
},
{
"type": "boolean",
"name": "isDepartment"
}
],
"outputType": "array",
"output": true
},
{
"name": "dbvals",
"module": "core",
"action": "setvalue",
"options": {
"key": "g_dbvals",
"value": "{{userroles}}"
},
"meta": [
{
"name": "userid",
"type": "number"
},
{
"name": "id",
"type": "number"
},
{
"name": "name",
"type": "text"
},
{
"name": "isDepartment",
"type": "boolean"
}
],
"outputType": "array",
"metaData": {
"setValueExpression": {
"name": "userroles",
"type": "array"
}
},
"output": true
}
]
}
}

+ 38
- 0
app/api/apps/deleteapp.json Näytä tiedosto

@@ -0,0 +1,38 @@
{
"meta": {
"$_GET": [
{
"type": "text",
"name": "id"
}
]
},
"exec": {
"steps": [
{
"name": "delete",
"module": "api",
"action": "send",
"options": {
"url": "{{$_ENV.API_BASEURL+'applications/'+$_GET.id}}",
"method": "DELETE"
},
"metaData": {
"apiUrl": {
"name": "id",
"type": "text"
}
}
},
{
"name": "OK",
"module": "core",
"action": "response",
"options": {
"status": 200,
"data": "OK"
}
}
]
}
}

+ 151
- 2
app/api/security/confirm.json Näytä tiedosto

@@ -4,6 +4,16 @@
"linkedFile": "/views/cnfrm.ejs",
"linkedForm": "frm_cnfrm"
},
"$_GET": [
{
"type": "text",
"name": "sort"
},
{
"type": "text",
"name": "dir"
}
],
"$_POST": [
{
"type": "text",
@@ -182,6 +192,84 @@
}
]
},
{
"name": "query",
"module": "dbconnector",
"action": "select",
"options": {
"connection": "authdb",
"sql": {
"type": "select",
"columns": [
{
"table": "xuserrole",
"column": "userid",
"recid": 1
},
{
"table": "xuserrole",
"column": "roleid",
"recid": 2
}
],
"params": [
{
"operator": "equal",
"type": "expression",
"name": ":P1",
"value": "{{$_POST.id}}",
"test": ""
}
],
"table": {
"name": "xuserrole"
},
"primary": "id",
"joins": [],
"wheres": {
"condition": "AND",
"rules": [
{
"id": "xuserrole.userid",
"field": "xuserrole.userid",
"type": "double",
"operator": "equal",
"value": "{{$_POST.id}}",
"data": {
"table": "xuserrole",
"column": "userid",
"type": "number",
"columnObj": {
"type": "integer",
"primary": false,
"unique": false,
"nullable": true,
"name": "userid"
}
},
"operation": "=",
"table": "xuserrole"
}
],
"conditional": null,
"valid": true
},
"query": "select `userid`, `roleid` from `xuserrole` where `xuserrole`.`userid` = ?"
}
},
"output": true,
"meta": [
{
"type": "number",
"name": "userid"
},
{
"type": "number",
"name": "roleid"
}
],
"outputType": "array"
},
{
"name": "api",
"module": "api",
@@ -284,11 +372,11 @@
"method": "POST",
"data": {
"isactive": true,
"id": "{{$_POST.id}}",
"id": "{{$_POST.id.toString()}}",
"firstname": "{{$_POST.firstname}}",
"email": "{{$_POST.email}}",
"lastname": "{{$_POST.lastname1}}",
"username": "",
"username": null,
"password": "{{hash}}",
"updateuserid": "{{identity}}",
"createuserid": "{{identity}}"
@@ -389,6 +477,67 @@
}
],
"outputType": "object"
},
{
"name": "repeat",
"module": "core",
"action": "repeat",
"options": {
"repeat": "{{query.count()}}",
"outputFields": [],
"exec": {
"steps": {
"name": "addroles",
"module": "api",
"action": "send",
"options": {
"url": "{{$_ENV.API_BASEURL+'xuserroles/add/'+$_POST.id+'/'+roleid}}",
"method": "POST"
},
"output": true,
"metaData": {
"apiUrl": {
"name": "roleid",
"type": "number"
}
}
}
}
},
"output": true,
"meta": [
{
"name": "$index",
"type": "number"
},
{
"name": "$number",
"type": "number"
},
{
"name": "$name",
"type": "text"
},
{
"name": "$value",
"type": "object"
},
{
"name": "userid",
"type": "number"
},
{
"name": "roleid",
"type": "number"
}
],
"outputType": "array",
"metaData": {
"repeatExpression": {
"name": "query",
"type": "array"
}
}
}
]
},


+ 252
- 0
app/api/security/defalutadminapi.json Näytä tiedosto

@@ -0,0 +1,252 @@
{
"meta": {
"$_GET": [
{
"type": "text",
"name": "id"
}
]
},
"exec": {
"steps": [
{
"name": "gettheuser",
"module": "dbconnector",
"action": "single",
"options": {
"connection": "authdb",
"sql": {
"type": "select",
"columns": [
{
"table": "users",
"column": "id"
},
{
"table": "users",
"column": "email"
},
{
"table": "users",
"column": "pwd"
},
{
"table": "users",
"column": "firstname"
},
{
"table": "users",
"column": "lastname"
}
],
"params": [
{
"operator": "equal",
"type": "expression",
"name": ":P1",
"value": "{{$_GET.id}}",
"test": ""
}
],
"table": {
"name": "users"
},
"primary": "id",
"joins": [],
"wheres": {
"condition": "AND",
"rules": [
{
"id": "users.id",
"field": "users.id",
"type": "double",
"operator": "equal",
"value": "{{$_GET.id}}",
"data": {
"table": "users",
"column": "id",
"type": "number",
"columnObj": {
"type": "increments",
"primary": true,
"unique": false,
"nullable": false,
"name": "id"
}
},
"operation": "="
}
],
"conditional": null,
"valid": true
},
"query": "select `id`, `email`, `pwd`, `firstname`, `lastname` from `users` where `users`.`id` = ?"
}
},
"output": true,
"meta": [
{
"type": "number",
"name": "id"
},
{
"type": "text",
"name": "email"
},
{
"type": "text",
"name": "pwd"
},
{
"type": "text",
"name": "firstname"
},
{
"type": "text",
"name": "lastname"
}
],
"outputType": "object"
},
{
"name": "insertuser",
"module": "api",
"action": "send",
"options": {
"url": "{{$_ENV.API_BASEURL+'users/insert'}}",
"method": "POST",
"schema": [
{
"type": "object",
"name": "data",
"sub": [
{
"type": "text",
"name": "updatedate"
},
{
"type": "text",
"name": "password"
},
{
"type": "boolean",
"name": "isactive"
},
{
"type": "number",
"name": "id"
},
{
"type": "text",
"name": "lastname"
},
{
"type": "number",
"name": "updateuserid"
},
{
"type": "text",
"name": "firstname"
},
{
"type": "text",
"name": "username"
},
{
"type": "text",
"name": "email"
},
{
"type": "text",
"name": "createdate"
},
{
"type": "number",
"name": "createuserid"
}
]
}
],
"dataType": "json",
"data": {
"id": "{{gettheuser.id.toString()}}",
"firstname": "{{gettheuser.firstname}}",
"lastname": "{{gettheuser.lastname}}",
"email": "{{gettheuser.email}}",
"password": "{{gettheuser.password}}",
"isactive": true,
"createuserid": -1,
"updateuserid": -1,
"username": null
}
},
"output": true,
"meta": [
{
"type": "object",
"name": "data",
"sub": [
{
"type": "text",
"name": "updatedate"
},
{
"type": "text",
"name": "password"
},
{
"type": "boolean",
"name": "isactive"
},
{
"type": "number",
"name": "id"
},
{
"type": "text",
"name": "lastname"
},
{
"type": "number",
"name": "updateuserid"
},
{
"type": "text",
"name": "firstname"
},
{
"type": "text",
"name": "username"
},
{
"type": "text",
"name": "email"
},
{
"type": "text",
"name": "createdate"
},
{
"type": "number",
"name": "createuserid"
}
]
}
],
"outputType": "object"
},
{
"name": "addrole",
"module": "api",
"action": "send",
"options": {
"url": "{{$_ENV.API_BASEURL+'xuserroles/add/'+gettheuser.id+'/1'}}",
"method": "POST",
"dataType": "json"
},
"output": true,
"metaData": {}
}
]
}
}

+ 6
- 3
app/api/security/defaultadmin.json Näytä tiedosto

@@ -180,13 +180,15 @@
"table": "xuserrole",
"column": "userid",
"type": "number",
"value": "{{insert.identity}}"
"value": "{{insert.identity}}",
"recid": 1
},
{
"table": "xuserrole",
"column": "roleid",
"type": "number",
"value": "1"
"value": "1",
"recid": 2
}
],
"table": "xuserrole",
@@ -211,7 +213,8 @@
"name": "affected",
"type": "number"
}
]
],
"output": true
}
]
}


+ 1
- 1
app/config/config.json Näytä tiedosto

@@ -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/"
}
}

BIN
data/authdb.sqlite3 Näytä tiedosto


+ 803
- 673
package-lock.json
File diff suppressed because it is too large
Näytä tiedosto


+ 13
- 0
public/Framework7/7/css/framework7-bundle-rtl.min.css
File diff suppressed because it is too large
Näytä tiedosto


+ 13
- 0
public/Framework7/7/css/framework7-bundle.min.css
File diff suppressed because it is too large
Näytä tiedosto


+ 13
- 0
public/Framework7/7/css/framework7-rtl.min.css
File diff suppressed because it is too large
Näytä tiedosto


+ 13
- 0
public/Framework7/7/css/framework7.min.css
File diff suppressed because it is too large
Näytä tiedosto


BIN
public/Framework7/7/img/f7-icon-square.png Näytä tiedosto

Before After
Leveys: 200  |  Korkeus: 200  |  Koko: 31 KiB

BIN
public/Framework7/7/img/f7-icon.png Näytä tiedosto

Before After
Leveys: 100  |  Korkeus: 100  |  Koko: 13 KiB

+ 40
- 0
public/Framework7/7/js/app.js Näytä tiedosto

@@ -0,0 +1,40 @@
// Dom7
var $ = Dom7;

// Theme
var theme = 'auto';
if (document.location.search.indexOf('theme=') >= 0) {
theme = document.location.search.split('theme=')[1].split('&')[0];
}

// Init App
var app = new Framework7({
id: 'io.framework7.testapp',
el: '#app',
theme: theme,
on: {
pageMounted: function (page) {
if (window.dmx && dmx.app) {
dmx.app.$parse(page.el);
dmx.app.$update();
}
}
},
routes: window.routes ? window.routes : [],
popup: {
closeOnEscape: true,
},
sheet: {
closeOnEscape: true,
},
popover: {
closeOnEscape: true,
},
actions: {
closeOnEscape: true,
}
});

if (document.querySelector('.view-main')) {
var mainView = app.views.create('.view-main');
}

+ 14
- 0
public/Framework7/7/js/framework7-bundle.min.js
File diff suppressed because it is too large
Näytä tiedosto


+ 1
- 0
public/Framework7/7/js/framework7-bundle.min.js.map
File diff suppressed because it is too large
Näytä tiedosto


+ 14
- 0
public/Framework7/7/js/framework7.min.js
File diff suppressed because it is too large
Näytä tiedosto


+ 1
- 0
public/Framework7/7/js/framework7.min.js.map
File diff suppressed because it is too large
Näytä tiedosto


+ 1
- 0
public/Framework7/7/js/routes.js Näytä tiedosto

@@ -0,0 +1 @@
var routes = []

+ 40
- 0
public/dmxAppConnect/config.js Näytä tiedosto

@@ -7775,6 +7775,42 @@ dmx.config({
}
],
"outputType": "array"
},
"var_dspecid": {
"meta": null,
"outputType": "number"
},
"api_postdspec": [
{
"type": "object",
"name": "data",
"sub": [
{
"type": "text",
"name": "effectivedate"
},
{
"type": "number",
"name": "id"
},
{
"type": "text",
"name": "reasonforchange"
},
{
"type": "text",
"name": "validation"
},
{
"type": "text",
"name": "revisionlevel"
}
]
}
],
"var_bomdspecid": {
"meta": null,
"outputType": "number"
}
},
"repeattest": {
@@ -13851,6 +13887,10 @@ dmx.config({
"type": "number",
"name": "id"
},
{
"type": "number",
"name": "roleid"
},
{
"type": "text",
"name": "name"


+ 8
- 0
public/dmxAppConnect/dmxBootstrap4Modal/dmxBootstrap4Modal.js Näytä tiedosto

@@ -0,0 +1,8 @@
/*!
DMXzone Bootstrap 4 Modal
Version: 1.0.1
(c) 2019 DMXzone.com
@build 2019-04-02 10:36:56
*/
dmx.Component("bs4-modal",{attributes:{nobackdrop:{type:Boolean,default:!1},nocloseonclick:{type:Boolean,default:!1},nokeyboard:{type:Boolean,default:!1},nofocus:{type:Boolean,default:!1},show:{type:Boolean,default:!1}},methods:{toggle:function(){jQuery(this.$node).modal("toggle")},show:function(){jQuery(this.$node).modal("show")},hide:function(){jQuery(this.$node).modal("hide")},update:function(){jQuery(this.$node).modal("handleUpdate")}},events:{show:Event,shown:Event,hide:Event,hidden:Event},render:function(o){this.$node=o,this.$parse(),jQuery(o).on("show.bs.modal",this.dispatchEvent.bind(this,"show")),jQuery(o).on("shown.bs.modal",this.dispatchEvent.bind(this,"shown")),jQuery(o).on("hide.bs.modal",this.dispatchEvent.bind(this,"hide")),jQuery(o).on("hidden.bs.modal",this.dispatchEvent.bind(this,"hidden")),this.update({})},update:function(o){JSON.stringify(o)!=JSON.stringify(this.props)&&jQuery(this.$node).modal({backdrop:!this.props.nobackdrop&&this.props.nocloseonclick?"static":!this.props.nobackdrop,keyboard:!this.props.nokeyboard,focus:!this.props.nofocus,show:!!this.props.show})},beforeDestroy:function(){jQuery(this.$node).off(".bs.modal"),jQuery(this.$node).modal("dispose")}});
//# sourceMappingURL=../maps/dmxBootstrap4Modal.js.map

+ 21
- 0
public/dmxAppConnect/dmxBootstrap4Navigation/dmxBootstrap4Navigation.js Näytä tiedosto

@@ -0,0 +1,21 @@
jQuery(document).ready(function($) {
$(window).on('popstate pushstate', _update);
_update();
function _update() {
var url = window.location.href;
$('a.nav-link:not([data-toggle]), a.dropdown-item').map(function() {
$(this).toggleClass('active', this.href == url || this.href == url.split("?")[0].split("#")[0]);
});
$('a.dropdown-item.active').map(function() {
$(this).closest('.nav-item.dropdown').find('.dropdown-toggle').toggleClass('active');
});
}
});

+ 78
- 0
public/dmxAppConnect/dmxBootstrap4TableGenerator/dmxBootstrap4TableGenerator.css Näytä tiedosto

@@ -0,0 +1,78 @@
table.table thead>tr>th.sorting_asc,
table.table thead>tr>th.sorting_desc,
table.table thead>tr>th.sorting,
table.table thead>tr>td.sorting_asc,
table.table thead>tr>td.sorting_desc,
table.table thead>tr>td.sorting {
padding-right: 30px
}
table.table thead>tr>th:active,
table.table thead>tr>td:active {
outline: none
}
table.table thead .sorting,
table.table thead .sorting_asc,
table.table thead .sorting_desc,
table.table thead .sorting_asc_disabled,
table.table thead .sorting_desc_disabled {
cursor: pointer;
position: relative
}
table.table thead .sorting:before,
table.table thead .sorting:after,
table.table thead .sorting_asc:before,
table.table thead .sorting_asc:after,
table.table thead .sorting_desc:before,
table.table thead .sorting_desc:after,
table.table thead .sorting_asc_disabled:before,
table.table thead .sorting_asc_disabled:after,
table.table thead .sorting_desc_disabled:before,
table.table thead .sorting_desc_disabled:after {
position: absolute;
bottom: 0.9em;
display: block;
opacity: 0.3
}
table.table-sm thead .sorting:before,
table.table-sm thead .sorting:after,
table.table-sm thead .sorting_asc:before,
table.table-sm thead .sorting_asc:after,
table.table-sm thead .sorting_desc:before,
table.table-sm thead .sorting_desc:after,
table.table-sm thead .sorting_asc_disabled:before,
table.table-sm thead .sorting_asc_disabled:after,
table.table-sm thead .sorting_desc_disabled:before,
table.table-sm thead .sorting_desc_disabled:after {
bottom: 0.3em;
}
table.table thead .sorting:before,
table.table thead .sorting_asc:before,
table.table thead .sorting_desc:before,
table.table thead .sorting_asc_disabled:before,
table.table thead .sorting_desc_disabled:before {
right: 1em;
content: "\2191"
}
table.table thead .sorting:after,
table.table thead .sorting_asc:after,
table.table thead .sorting_desc:after,
table.table thead .sorting_asc_disabled:after,
table.table thead .sorting_desc_disabled:after {
right: 0.5em;
content: "\2193"
}
table.table thead .sorting_asc:before,
table.table thead .sorting_desc:after {
opacity: 1
}
table.table thead .sorting_asc_disabled:before,
table.table thead .sorting_desc_disabled:after {
opacity: 0
}

+ 8
- 0
public/dmxAppConnect/dmxFramework7/dmxFramework7.js
File diff suppressed because it is too large
Näytä tiedosto


+ 31
- 0
public/dmxFramework7_icons/css/framework7-icons.css Näytä tiedosto

@@ -0,0 +1,31 @@
@font-face {
font-family: 'Framework7 Icons';
font-style: normal;
font-weight: 400;
src: url("../fonts/Framework7Icons-Regular.eot");
src: url("../fonts/Framework7Icons-Regular.woff2") format("woff2"),
url("../fonts/Framework7Icons-Regular.woff") format("woff"),
url("../fonts/Framework7Icons-Regular.ttf") format("truetype");
}

.f7-icons, .framework7-icons {
font-family: 'Framework7 Icons';
font-weight: normal;
font-style: normal;
font-size: 28px;
line-height: 1;
letter-spacing: normal;
text-transform: none;
display: inline-block;
white-space: nowrap;
word-wrap: normal;
direction: ltr;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
-moz-osx-font-smoothing: grayscale;
-webkit-font-feature-settings: "liga";
-moz-font-feature-settings: "liga=1";
-moz-font-feature-settings: "liga";
font-feature-settings: "liga";
text-align: center;
}

BIN
public/dmxFramework7_icons/fonts/Framework7Icons-Regular.eot Näytä tiedosto


BIN
public/dmxFramework7_icons/fonts/Framework7Icons-Regular.ttf Näytä tiedosto


BIN
public/dmxFramework7_icons/fonts/Framework7Icons-Regular.woff Näytä tiedosto


BIN
public/dmxFramework7_icons/fonts/Framework7Icons-Regular.woff2 Näytä tiedosto


+ 2
- 0
public/js/jquery-3.5.1.slim.min.js
File diff suppressed because it is too large
Näytä tiedosto


+ 2
- 2
views/cnfrm.ejs Näytä tiedosto

@@ -10,8 +10,8 @@
<div class="container">
<div class="row">
<div class="col">
<form id="frm_cnfrm" is="dmx-serverconnect-form" method="post" action="/api/security/confirm" dmx-on:success="notifies1.success('Good Job');browser1.goto('/partinfo')">
<p><input id="id" name="id" value="" dmx-bind:value="whoami.data.identity"></p>
<form id="frm_cnfrm" is="dmx-serverconnect-form" method="post" action="/api/security/confirm" dmx-on:success="browser1.goto('/partinfo')">
<p><input id="id" name="id" value="" dmx-bind:value="whoami.data.identity" type="hidden"></p>
<p><label for="confirmation">Confirmation:</label><input id="confirmation" name="confirmation" type="text" value="" required=""></p>
<p><label for="firstname">Firstname:</label><input id="firstname" name="firstname" type="text" value="" required=""></p>
<p><label for="lastname1">Lastname:</label><input id="lastname1" name="lastname1" type="text" value="" required=""></p>


+ 1
- 1
views/confirm.ejs Näytä tiedosto

@@ -6,7 +6,7 @@
<div class="container">
<div class="row">
<div class="col">
<form id="frm_confirm" is="dmx-serverconnect-form" action="/api/security/confirm">
<form id="frm_confirm" is="dmx-serverconnect-form" action="/api/security/confirm" dmx-on:success="browser1.goto('/partinfo')">
<div class="row">
<input id="inp_id" name="id" class="form-control">
<div class="col">


+ 20
- 4
views/layouts/main.ejs Näytä tiedosto

@@ -11,8 +11,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="/bootstrap/5/css/bootstrap.min.css" />
<link rel="stylesheet" href="/css/style.css" />
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js" integrity="sha256-CutOzxCRucUsn6C6TcEYsauvvYilEniTXldPa6/wu0k=" crossorigin="anonymous"></script>
<script src="/js/jquery-3.5.1.slim.min.js"></script>
<script src="/js/moment.js/2/moment.min.js"></script>
<script src="/dmxAppConnect/dmxRouting/dmxRouting.js" defer></script>
<script src="/dmxAppConnect/dmxDataTraversal/dmxDataTraversal.js" defer></script>
<script src="/dmxAppConnect/dmxTyped/dmxTyped.js" defer></script>
@@ -44,6 +44,20 @@
<script src="/dmxAppConnect/dmxBootbox5/bootstrap-modbox.min.js" defer></script>
<script src="/dmxAppConnect/dmxBootbox5/dmxBootbox5.js" defer></script>
<script src="/dmxAppConnect/dmxBootstrap5Alert/dmxBootstrap5Alert.js" defer></script>
<link rel="stylesheet" href="/css/bootstrap-icons.min.css" />
<link rel="stylesheet" href="/dmxFramework7_icons/css/framework7-icons.css" />


<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta http-equiv="Content-Security-Policy" content="default-src * 'self' 'unsafe-inline' 'unsafe-eval' data: gap: content:">
<link rel="stylesheet" href="/Framework7/7/css/framework7-bundle-rtl.min.css" />
<script src="/Framework7/7/js/framework7-bundle.min.js"></script>
<script src="/dmxAppConnect/dmxFramework7/dmxFramework7.js" defer></script>
<script src="/Framework7/7/js/framework7-bundle-rtl.min.js"></script>
</head>

<body is="dmx-app" id="main">
@@ -93,12 +107,13 @@
</div>
</div>
</div>
<dmx-serverconnect id="conn_useonce" url="/api/security/defaultadmin"></dmx-serverconnect>
<dmx-serverconnect id="conn_useonce" url="/api/security/defaultadmin" dmx-on:success="conn_uploadtoapi.load({id: conn_useonce.data.insert.identity})"></dmx-serverconnect>
<dmx-serverconnect id="conn_uploadtoapi" noload="true" url="/api/security/defalutadminapi"></dmx-serverconnect>
<div class="container">
<dmx-value id="var_userinfo"></dmx-value>
<dmx-value id="pg_apiurl" dmx-bind:value="conn_urls.data.apiurl"></dmx-value>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<div class="container-md">
<a class="navbar-brand" href="#">RPM Studio</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar1_collapse" aria-controls="navbar1_collapse" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
<div class="collapse navbar-collapse" id="navbar1_collapse">
@@ -130,6 +145,7 @@
<%- await include(content, locals); %>
</div>
<script src="/bootstrap/5/js/bootstrap.bundle.min.js"></script>
<script src="/Framework7/7/js/app.js"></script>
</body>

</html>

+ 7
- 3
views/layouts/smain.ejs Näytä tiedosto

@@ -7,7 +7,6 @@
<meta charset="UTF-8">
<title>Untitled Document</title>

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.14.0/css/all.css" integrity="sha384-HzLeBuhoNPvSl5KYnjx0BT+WB0QEEqLprO+NBkkk5gbc67FTaL7XIGa2w1L0Xbgc" crossorigin="anonymous" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="/bootstrap/5/css/bootstrap.min.css" />
<link rel="stylesheet" href="/css/style.css" />
@@ -44,6 +43,10 @@
<script src="/dmxAppConnect/dmxBootbox5/bootstrap-modbox.min.js" defer></script>
<script src="/dmxAppConnect/dmxBootbox5/dmxBootbox5.js" defer></script>
<script src="/dmxAppConnect/dmxBootstrap5Alert/dmxBootstrap5Alert.js" defer></script>
<link rel="stylesheet" href="/fontawesome6/css/all.min.css" />
<script src="/dmxAppConnect/dmxBootstrap4Navigation/dmxBootstrap4Navigation.js" defer></script>
<script src="/dmxAppConnect/dmxBootstrap4Modal/dmxBootstrap4Modal.js" defer></script>
<link rel="stylesheet" href="/dmxAppConnect/dmxBootstrap4TableGenerator/dmxBootstrap4TableGenerator.css" />
</head>

<body is="dmx-app" id="main">
@@ -57,7 +60,8 @@
<dmx-serverconnect id="conn_isauthenticated" url="/api/security/isauthenticated" dmx-on:forbidden="browser1.goto('/cnfrm',true)" dmx-on:unauthorized="browser1.goto('/',true)"></dmx-serverconnect>
<dmx-serverconnect id="conn_logout" url="/api/security/logout" dmx-on:success="browser1.goto('/')" noload="true"></dmx-serverconnect>
<dmx-serverconnect id="conn_newpart" url="/api/Parts/newpart" noload="true" dmx-param:description="modal_newpart.inp_description.value" dmx-param:comments="modal_newpart.inp_comments.value" dmx-param:partcodeid="modal_newpart.new_partcode.value" dmx-param:parttypeid="modal_newpart.new_parttype.value" dmx-on:success="run([{condition:{outputType:'boolean',if:`(modal_newpart.new_parttype.value == 1)`,then:{steps:{run:{name:'routeToMotorDspec',outputType:'text',action:`browser1.goto(\'/dspecm?id=\'+conn_newpart.data.insertpart.data.id,true,\'Motor Dspec\')`}}},else:{steps:{condition:{outputType:'boolean',if:`(modal_newpart.new_parttype.value == 2)`,then:{steps:{run:{name:'routeToKitDspec',outputType:'text',action:`browser1.goto(\'/dspec?id=\'+conn_newpart.data.insertpart.data.id,true,\'Kit Dspec\')`}}},else:{steps:{condition:{outputType:'boolean',if:`(modal_newpart.new_parttype.value == 3)`,then:{steps:{run:{name:'routeToKitDspec_copy',outputType:'text',action:`browser1.goto(\'/dspec\',true,\'Kit Dspec\')`}}},else:{steps:{condition:{outputType:'boolean',if:`(modal_newpart.new_partcode.value == 174)`,then:{steps:{run:{name:'routeToKitDspec_copy_copy',outputType:'text',action:`browser1.goto(\'/dspec?id=\'+conn_newpart.data.insertpart.data.id,true,\'Kit Dspec\')`}}},else:{steps:{run:{name:'routeToGeneralDspec',outputType:'text',action:`browser1.goto(\'/dspecg?id=\'+conn_newpart.data.insertpart.data.id,true,\'General Dspec\')`}}}}}}}}}}}}}},{run:{outputType:'text',action:`modal_newpart.new_parttype.setValue(0);modal_newpart.new_partcode.setValue(0);modal_newpart.inp_description.setValue(\'\');modal_newpart.inp_comments.setValue(\'\');modal_newpart.hide()`}}])" dmx-param:createuserid="conn_isauthenticated.data.identity"></dmx-serverconnect>
<dmx-serverconnect id="conn_search" url="/api/Parts/Seach" dmx-param:input="var_ptsearch.value"></dmx-serverconnect>
<dmx-serverconnect id="conn_searchforbom" url="/api/BOM/findbypn" noload="true"></dmx-serverconnect>
<dmx-serverconnect id="conn_search" url="/api/Parts/Seach" dmx-param:input="var_ptsearch.value" noload="true"></dmx-serverconnect>
<div is="dmx-browser" id="browser1"></div>

<div class="container">
@@ -75,7 +79,7 @@
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" id="dropdown1" role="button" aria-haspopup="true" aria-expanded="false">Actions</a>
<div class="dropdown-menu" aria-labelledby="dropdown1">
<a class="dropdown-item" internal="true" dmx-on:click="modal_newpart.show()">New Part</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="/wadmin/usermanage" id="lnk_admin" dmx-show="conn_isauthenticated.data.administrator">User Management</a>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</div>


+ 94
- 18
views/secure/dspec.ejs Näytä tiedosto

@@ -1,12 +1,16 @@
<!-- Wappler include head-page="layouts/smain" fontawesome_5="cdn" bootstrap5="local" is="dmx-app" id="dspec" appConnect="local" components="{dmxStateManagement:{},dmxAutocomplete:{},dmxDatePicker:{},dmxBootstrap5Navigation:{},dmxFormatter:{},dmxBootstrap5Modal:{}}" jquery_slim_35="cdn" moment_2="cdn" -->
<!-- Wappler include head-page="layouts/smain" is="dmx-app" id="dspec" appConnect="local" components="{dmxStateManagement:{},dmxAutocomplete:{},dmxDatePicker:{},dmxBootstrap5Navigation:{},dmxFormatter:{},dmxBootstrap5Modal:{},dmxBootstrap4Navigation:{},dmxBootstrap4Modal:{},dmxBootstrap4TableGenerator:{}}" jquery_slim_35="cdn" moment_2="cdn" bootstrap4="cdn" fontawesome_5pro="cdn" -->
<dmx-query-manager id="query_partid"></dmx-query-manager>
<dmx-serverconnect id="conn_dspecinfo" url="/api/DSpec/searchpn" dmx-param:pn="query_partid.data.id"></dmx-serverconnect>
<dmx-serverconnect id="conn_dspecinfo" url="/api/DSpec/searchpn" dmx-param:pn="query_partid.data.id" dmx-on:success="pt_rev.setValue(conn_dspecinfo.data.dspec.data.rev)"></dmx-serverconnect>
<dmx-serverconnect id="conn_copybomitems" url="/api/BOM/copyitems" dmx-param:olddspecid="conn_dspecinfo.data.dspec.data.id" dmx-param:newdspecid="var_dspecid.value" dmx-on:success="conn_dspecinfo.load({})" noload="true"></dmx-serverconnect>
<dmx-serverconnect id="conn_copybomfromotherpart" url="/api/BOM/copyitems" dmx-param:olddspecid="var_bomdspecid.value" dmx-param:newdspecid="conn_dspecinfo.data.dspec.data.id" dmx-on:success="conn_dspecinfo.load({})" noload="true"></dmx-serverconnect>
<dmx-serverconnect id="conn_revup" url="/api/DSpec/revup" dmx-param:id="conn_dspecinfo.data.dspec.data.id" dmx-param:userid="whoami.data.identity" dmx-on:success="conn_dspecinfo.load({pn: query_partid.data.id})" noload="true"></dmx-serverconnect>

<dmx-api-action id="api_postdspec" noload="true" method="post" dmx-data:revisionlevel="pt_rev.value" dmx-data:partnumberid="conn_dspecinfo.data.part.data.id" dmx-data:statusidpn="conn_dspecinfo.data.part.data.status.id.toString()" dmx-data:partcodeid="conn_dspecinfo.data.part.data.partcode.id.toString()" dmx-data:parttypeid="conn_dspecinfo.data.part.data.partcode.parttype.id.toString()" dmx-data:statusiddspec="4" dmx-data:effectivedate="ds_effectivedate.value" dmx-data:reasonforchange="ds_reasonforchange.value" dmx-data:validation="ds_validation.value" dmx-data:note="ds_notes.value" dmx-bind:url="pg_apiurl.value.concat('designspecs/alt')" dmx-on:success="conn_dspecinfo.load({})" dmx-data:id="conn_dspecinfo.data.dspec.data.id"></dmx-api-action>
<dmx-api-action id="api_postdspec" noload="true" method="post" dmx-data:revisionlevel="pt_rev.value" dmx-data:partnumberid="conn_dspecinfo.data.part.data.id" dmx-data:statusidpn="conn_dspecinfo.data.part.data.status.id.toString()" dmx-data:partcodeid="conn_dspecinfo.data.part.data.partcode.id.toString()" dmx-data:parttypeid="conn_dspecinfo.data.part.data.partcode.parttype.id.toString()" dmx-data:statusiddspec="4" dmx-data:effectivedate="ds_effectivedate.value" dmx-data:reasonforchange="ds_reasonforchange.value" dmx-data:validation="ds_validation.value" dmx-data:note="ds_notes.value" dmx-bind:url="pg_apiurl.value.concat('designspecs/alt')" dmx-on:success="conn_dspecinfo.load({})" dmx-data:id="var_dspecid.value"></dmx-api-action>

<dmx-api-action id="api_bominsertitem" noload="true" url="http://vapor.prelub.com/api/v1.0/boms/wapplerinsert" method="post" data-type="json" dmx-bind:url="pg_apiurl.value.concat('boms/wapplerinsert')" dmx-data:updatedate="NOW" dmx-data:viewlocationid="var_viewlocationid.value.toString()" dmx-data:old="var_bominsertold.value.toString()" dmx-data:createdate="NOW" dmx-data:designspecid="conn_dspecinfo.data.dspec.data.id.toString()" dmx-data:createuserid="whoami.data.identity.toString()" dmx-data:new="var_bominsertnew.value.toString()" dmx-data:updateuserid="whoami.data.identity.toString()" dmx-data:partnumberid="var_bominsertpnid.value.toString()" dmx-on:success="api_loadbombydspec.load({},true);conn_dspecinfo.load({})"></dmx-api-action>

<dmx-api-action id="api_deletethisitem" noload="true" method="delete" dmx-bind:url="pg_apiurl.value.concat('boms/'.concat(var_partidtodelete.value))" dmx-data:id=""></dmx-api-action>
<dmx-serverconnect id="conn_deleteapp" url="/api/apps/deleteapp" dmx-on:success="conn_dspecinfo.load({pn: query_partid.data.id},true)" noload="true"></dmx-serverconnect>


<dmx-value id="var_viewlocationid"></dmx-value>
@@ -14,8 +18,69 @@
<dmx-value id="var_bominsertnew"></dmx-value>
<dmx-value id="var_bominsertpnid"></dmx-value>
<dmx-value id="var_partidtodelete" dmx-on:updated="run([{run:{outputType:'text',action:`api_deletethisitem.load({})`}},{wait:{delay:1000}},{run:{outputType:'text',action:`conn_dspecinfo.load({pn: query_partid.data.id},true)`}}])"></dmx-value>
<dmx-value id="var_deleteapp"></dmx-value>
<dmx-value id="var_deleteapp" dmx-on:updated="conn_deleteapp.load({id: value})"></dmx-value>
<dmx-value id="var_revup" dmx-on:updated="run([{run:{outputType:'text',action:`var_dspecid.setValue(null)`}},{run:{outputType:'text',action:`api_postdspec.load({})`}},{run:{outputType:'text',action:`var_dspecid.setValue(api_postdspec.data.id)`}},{run:{outputType:'text',action:`conn_copybomitems.load({})`}}])"></dmx-value>
<dmx-value id="var_dspecid" dmx-bind:value="conn_dspecinfo.data.dspec.data.id"></dmx-value>

<div class="modal rounded rounded-3 border-dark" id="mdl_cpybom" is="dmx-bs5-modal" tabindex="-1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Seach by Part#</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<dmx-value id="var_bomdspecid" dmx-bind:value="conn_searchforbom.data.dspec.data.id"></dmx-value>
<div class="container">
<div class="row">
<div class="col-9"><input id="txt_searchforbom" name="searchbom" type="text" class="form-control" placeholder="Part#"></div>
<div class="col">
<button id="btn_search" class="btn btn-primary" dmx-on:click="conn_search.load({input: txt_searchforbom.value});var_dspecid.setValue(conn_search.data.api.data.id)">
<i class="fas fa-search" dmx-on:click="conn_searchforbom.load({pn: txt_searchforbom.value},true)"></i>
</button>
<button id="btn_copyfromotherpart" class="btn btn-primary" dmx-on:click="conn_copybomfromotherpart.load({olddspecid: var_bomdspecid.value, newdspecid: conn_dspecinfo.data.dspec.data.id});mdl_cpybom.hide();conn_dspecinfo.load({})">
<i class="fas fa-copy" dmx-on:click="conn_copybomfromotherpart.load({});conn_dspecinfo.load({})"></i>
</button>
</div>
</div>
<div class="row">
<div class="col">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover table-sm">
<thead>
<tr>
<th class="visually-hidden">Id</th>
<th class="visually-hidden">Partnumberid</th>
<th class="visually-hidden">Tab</th>
<th>Partnumber</th>
<th>Description</th>
<th>Old</th>
<th>New</th>
</tr>
</thead>
<tbody is="dmx-repeat" dmx-generator="bs4table" dmx-bind:repeat="conn_searchforbom.data.boms.data" id="tableRepeat1">
<tr>
<td dmx-text="id" class="visually-hidden"></td>
<td dmx-text="partnumberid" class="visually-hidden"></td>
<td dmx-text="tab" class="visually-hidden"></td>
<td dmx-text="partnumber"></td>
<td dmx-text="description"></td>
<td dmx-text="old"></td>
<td dmx-text="new"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>

</div>
</div>
</div>
<div class="modal rounded rounded-3 border-dark" id="mdl_app" is="dmx-bs5-modal" tabindex="-1">
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable modal-xl" role="document">
<div class="modal-content">
@@ -220,12 +285,13 @@
</div>
</div>


<header>
<h1 class="mt-3 ms-4">Kit DSpec</h1>


</header>
<div class="w-100 rounded-3 rounded border-secondary border-5 bg-info container-xxl text-start ms-auto me-auto pt-0 pb-0 ps-0 pe-0">
<div class="container bg-secondary-subtle">
<h1 class="text-center">Part Info</h1>
<div class="row">
<div class="col">
@@ -256,7 +322,8 @@
<label for="rev" class="col-sm-2 col-form-label" style="width: fit-content;">Rev:</label>
<div class="ms-2 col-sm-6" style="display:inline-block;">
<input type="text" class="form-control" id="pt_rev" name="ptrev" aria-describedby="input1_help" style="width: fit-content; display:inline-block;" dmx-bind:value="conn_dspecinfo.data.dspec.data.rev">
<button id="btn_newrev" class="btn btn-secondary btn-sm" style="display:inline-block;">New Rev</button>
<button id="btn_newrev" class="btn btn-secondary btn-sm" style="display:inline-block;" dmx-on:click="conn_revup.load({id: conn_dspecinfo.data.dspec.data.id, userid: whoami.data.identity},true)" dmx-show="conn_dspecinfo.data.dspec.data.id">
New Rev</button>
</div>
</div>
</div>
@@ -299,7 +366,7 @@
</div>
</div>
</div>
<div class="w-100 rounded-3 rounded border-secondary border-5 bg-warning-subtle container-xxl ms-auto me-auto pt-0 pb-0 ps-0 pe-0">
<div class="container bg-secondary-subtle">
<h1 class="text-center">Design Spec</h1>
<div class="row w-100 pt-0 pb-0 ps-0 pe-0">
<div class="col w-100 ms-1 pt-0 pb-0 pe-0">
@@ -343,15 +410,17 @@
</div>
<div class="row pb-2">
<div class="col align-self-center text-end">
<button id="btn_savedspec" class="btn btn-success" dmx-on:click="api_postdspec.load({})">Save DSPEC</button>
<button id="btn_savedspec" class="btn btn-success" dmx-on:click="api_postdspec.load({})">
Save DSPEC</button>
</div>
</div>
</div>
<div class="container-xxl bg-success-subtle mt-3 mb-4 ms-auto me-auto pb-3 ps-0 pe-0">
<div class="container bg-secondary-subtle">
<h1 class="text-center">BOMS</h1>
<div class="row">
<div class="col">
<button id="btn_copybom" class="btn btn-secondary shadow-lg">Copy BOM</button>
<button id="btn_copybom" class="btn btn-secondary shadow-lg mb-3" dmx-on:click="mdl_cpybom.show()">
<i class="fas fa-copy" dmx-on:click=""></i></button>
</div>
</div>
<div class="row">
@@ -370,7 +439,7 @@
<a class="nav-link bg-primary text-white me-2" id="navTabs1_4_tab" data-bs-toggle="tab" href="#" data-bs-target="#navTabs1_4" role="tab" aria-controls="navTabs1_4" aria-selected="false" dmx-on:click="var_viewlocationid.setValue(11)">Instructions</a>
</li>
<li class="nav-item">
<a class="nav-link text-white bg-primary me-2" id="navTabs1_5_tab" data-bs-toggle="tab" href="#" data-bs-target="#navTabs1_5" role="tab" aria-controls="navTabs1_5" aria-selected="false" dmx-on:click="var_viewlocationid.setValue(21)">Applications</a>
<a class="nav-link text-white bg-primary me-2" id="navTabs1_5_tab" data-bs-toggle="tab" href="#" data-bs-target="#navTabs1_5" role="tab" aria-controls="navTabs1_5" aria-selected="false">Applications</a>
</li>
</ul>
<div class="tab-content" id="navTabs1_content">
@@ -403,7 +472,8 @@
<input id="bom_partnew" name="bompartnew" type="text" class="form-control">
</th>
<th scope="row">
<button id="btn_newbomitem" class="btn btn-dark" dmx-on:click="var_viewlocationid.setValue(14);var_bominsertold.setValue(bom_partold.value);var_bominsertnew.setValue(bom_partnew.value);var_bominsertpnid.setValue(bom_partid.value);api_bominsertitem.load({})">Add</button>
<button id="btn_newbomitem" class="btn btn-dark" dmx-on:click="var_viewlocationid.setValue(14);var_bominsertold.setValue(bom_partold.value);var_bominsertnew.setValue(bom_partnew.value);var_bominsertpnid.setValue(bom_partid.value);api_bominsertitem.load({})">
+</button>
</th>
</tr>
</thead>
@@ -416,7 +486,9 @@
<td dmx-text="old"></td>
<td dmx-text="new"></td>
<td>
<button id="btn_deleteitem" class="btn btn-danger" dmx-on:click="var_partidtodelete.setValue(id)">X</button>
<button id="btn_deleteitem" class="btn btn-danger shadow" dmx-on:click="var_partidtodelete.setValue(id)">
<i class="fas fa-trash-alt"></i>
</button>
</td>
</tr>
</tbody>
@@ -465,7 +537,7 @@
<td dmx-text="old"></td>
<td dmx-text="new"></td>
<td>
<button id="btn_deleteelecitem" class="btn btn-danger" dmx-on:click="var_partidtodelete.setValue(id)">X</button>
<button id="btn_deleteelecitem" class="btn btn-danger" dmx-on:click="var_partidtodelete.setValue(id)"><i class="fas fa-trash-alt"></i></button>
</td>
</tr>
</tbody>
@@ -514,7 +586,7 @@
<td dmx-text="old"></td>
<td dmx-text="new"></td>
<td>
<button id="btn_deleteplumbitem" class="btn btn-danger" dmx-on:click="var_partidtodelete.setValue(id)">X</button>
<button id="btn_deleteplumbitem" class="btn btn-danger" dmx-on:click="var_partidtodelete.setValue(id)"><i class="fas fa-trash-alt"></i></button>
</td>
</tr>
</tbody>
@@ -563,7 +635,7 @@
<td dmx-text="old"></td>
<td dmx-text="new"></td>
<td>
<button id="btn_deleteinsitem" class="btn btn-danger" dmx-on:click="var_partidtodelete.setValue(id)">X</button>
<button id="btn_deleteinsitem" class="btn btn-danger" dmx-on:click="var_partidtodelete.setValue(id)"><i class="fas fa-trash-alt"></i></button>
</td>
</tr>
</tbody>
@@ -591,8 +663,12 @@
<tbody is="dmx-repeat" dmx-generator="bs5table" dmx-bind:repeat="conn_dspecinfo.data.apps.data" id="tableRepeat5">
<tr>
<td style="display: inline-block;">
<button id="btn_viewapp" class="btn btn-primary btn-sm" dmx-bind:value="id" dmx-on:click="mdl_app.var_appid.setValue(id);mdl_app.show()">View</button>
<button id="btn_deleteapp" class="btn btn-danger btn-sm" dmx-bind:value="id" dmx-on:click="var_deleteapp.setValue(value)">X</button>
<button id="btn_viewapp" class="btn btn-primary btn-sm" dmx-bind:value="id" dmx-on:click="mdl_app.var_appid.setValue(id);mdl_app.show()">
<i class="fas fa-edit"></i>
</button>
<button id="btn_deleteapp" class="btn btn-danger btn-sm" dmx-bind:value="id" dmx-on:click="var_deleteapp.setValue(value)">
<i class="fas fa-trash-alt"></i>
</button>
</td>
<td dmx-text="serialprefix"></td>
<td dmx-text="startingserial"></td>


+ 2
- 2
views/secure/dspecgeneral.ejs Näytä tiedosto

@@ -1,4 +1,4 @@
<!-- Wappler include head-page="layouts/smain" fontawesome_5="cdn" bootstrap5="local" is="dmx-app" id="dspec" appConnect="local" components="{dmxStateManagement:{},dmxAutocomplete:{},dmxDatePicker:{},dmxBootstrap5Navigation:{},dmxFormatter:{}}" jquery_slim_35="cdn" moment_2="cdn" -->
<!-- Wappler include head-page="layouts/smain" bootstrap5="local" is="dmx-app" id="dspec" appConnect="local" components="{dmxStateManagement:{},dmxAutocomplete:{},dmxDatePicker:{},dmxBootstrap5Navigation:{},dmxFormatter:{}}" jquery_slim_35="cdn" moment_2="cdn" -->
<dmx-query-manager id="query_partid"></dmx-query-manager>
<dmx-serverconnect id="conn_dspecinfo" url="/api/DSpec/searchpn" dmx-param:pn="query_partid.data.id"></dmx-serverconnect>
<dmx-api-action id="api_postdspec" noload="true" method="post" dmx-data:revisionlevel="pt_rev.value" dmx-data:partnumberid="conn_dspecinfo.data.part.data.id" dmx-data:statusidpn="conn_dspecinfo.data.part.data.status.id.toString()" dmx-data:partcodeid="conn_dspecinfo.data.part.data.partcode.id.toString()" dmx-data:parttypeid="conn_dspecinfo.data.part.data.partcode.parttype.id.toString()" dmx-data:statusiddspec="4" dmx-data:effectivedate="ds_effectivedate.value" dmx-data:reasonforchange="ds_reasonforchange.value" dmx-data:validation="ds_validation.value" dmx-data:note="ds_notes.value" dmx-bind:url="pg_apiurl.value.concat('designspecs/alt')" dmx-on:success="conn_dspecinfo.load({})" dmx-data:id="conn_dspecinfo.data.dspec.data.id"></dmx-api-action>
@@ -133,7 +133,7 @@
<h1 class="text-center">BOMS</h1>
<div class="row">
<div class="col">
<button id="btn_copybom" class="btn btn-secondary shadow-lg">Copy BOM</button>
<button id="btn_copybom" class="btn btn-secondary shadow-lg mt-2 mb-2">Copy BOM</button>
</div>
</div>
<div class="row">


+ 21
- 6
views/wadmin/usermanage.ejs Näytä tiedosto

@@ -1,5 +1,6 @@
<!-- Wappler include head-page="layouts/admin" is="dmx-app" id="usermanage" appConnect="local" components="{dmxBootstrap5TableGenerator:{},dmxTyped:{},dmxBootstrap5Modal:{},dmxFormRepeat:{},dmxFormatter:{},dmxAutocomplete:{},dmxValidator:{}}" bootstrap5="cdn" bootstrap_icons="cdn" fontawesome_5="cdn" -->
<dmx-serverconnect id="conn_deleterole" url="/api/roles/delete"></dmx-serverconnect>
<dmx-value id="var_deleteuser" dmx-on:updated=""></dmx-value>
<dmx-serverconnect id="conn_deleterole" url="/api/roles/delete" dmx-on:done="conn_users.load({},true)"></dmx-serverconnect>
<dmx-serverconnect id="conn_userinrole" url="/api/Users/userinrole" noload="true"></dmx-serverconnect>
<dmx-serverconnect id="conn_permissions" url="/api/roles/permissions"></dmx-serverconnect>
<dmx-serverconnect id="conn_depts" url="/api/roles/depts"></dmx-serverconnect>
@@ -8,6 +9,8 @@
<dmx-serverconnect id="conn_singleuser" url="/api/Users/read" noload="true"></dmx-serverconnect>
<meta name="ac:route" content="/wadmin/usermanage">
<dmx-serverconnect id="conn_users" url="/api/Users/search" dmx-param:filter="inp_search.value"></dmx-serverconnect>
<dmx-serverconnect id="conn_deleteuser" url="/api/Users/delete" dmx-param:id="var_deleteuser.value"></dmx-serverconnect>
<dmx-serverconnect id="conn_userroles" url="/api/Users/userroles"></dmx-serverconnect>
<div class="modal" id="modal1" is="dmx-bs5-modal" tabindex="-1" dmx-on:hide-bs-modal="serverconnectform1.reset()">
<div class="modal-dialog" role="document">
<div class="modal-content">
@@ -183,7 +186,7 @@
</div>
<div class="row">
<div class="col">
<button id="btn_newuser" class="btn" dmx-on:click="modal_newuser.show()">New User</button>
<button id="btn_newuser" class="btn btn-secondary mt-3 mb-3 ms-1 me-1" dmx-on:click="modal_newuser.show()">New User</button>
</div>
</div>
<div class="row">
@@ -200,19 +203,23 @@
<th>Last Name</th>
<th>Email</th>
<th>Validated</th>
<th scope="row">Dept</th>
<th scope="row">Roles</th>
</tr>
</thead>
<tbody is="dmx-repeat" dmx-generator="bs5table" dmx-bind:repeat="conn_users.data.query" id="tableRepeat1">
<tr>
<td>
<button id="btn_edituser" class="btn btn-success w-100" dmx-bind:value="id" dmx-on:click="conn_singleuser.load({id: id});modal1.show();conn_userroles.load({id: id})">Edit
</button>
<button id="btn_edituser" class="btn btn-success w-100" dmx-bind:value="id" dmx-on:click="conn_singleuser.load({id: id});modal1.show();conn_userroles.load({id: id})">
<i class="fas fa-edit"></i></button>
</td>
<td>
<button id="btn_deleteuser" class="btn btn-danger w-100">Delete</button>
<button id="btn_deleteuser" class="btn btn-danger w-100" dmx-on:click="var_deleteuser.setValue(id)">
<i class="fas fa-trash-alt"></i></button>
</td>
<td>
<button id="btn_userpermissions" class="btn w-100 btn-warning" dmx-on:click="modal_permissiosn.show();conn_userroles.load({id: id},true);conn_userdepts.load({userid: id});modal_permissiosn.frm_dept.inp_deptuserid.setValue(id);modal_permissiosn.frm_role.inp_roleuserid.setValue(id)">Roles</button>
<button id="btn_userpermissions" class="btn w-100 btn-warning" dmx-on:click="modal_permissiosn.show();conn_userroles.load({id: id},true);conn_userdepts.load({userid: id});modal_permissiosn.frm_dept.inp_deptuserid.setValue(id);modal_permissiosn.frm_role.inp_roleuserid.setValue(id)">
<i class="fas fa-user-tag"></i></button>
</td>
<td dmx-text="id"></td>
<td dmx-text="firstname"></td>
@@ -220,6 +227,14 @@
<td dmx-text="email"></td>
<td dmx-text="validated">
</td>
<td>
<ul class="list-group">
<li class="list-group-item" id="rpt_departments">
<div id="repeat1" is="dmx-repeat"></div>List item
</li>
</ul>
</td>
<td></td>
</tr>
</tbody>
</table>


Ladataan…
Peruuta
Tallenna