diff --git a/.wappler/targets/Development/app/modules/connections/DB.json b/.wappler/targets/Development/app/modules/connections/DB.json
index 12359b7..e105d6e 100644
--- a/.wappler/targets/Development/app/modules/connections/DB.json
+++ b/.wappler/targets/Development/app/modules/connections/DB.json
@@ -6,6 +6,10 @@
"client": "sqlite3",
"connection": {
"filename": "/public/ERTSQlite.db"
- }
- }
+ },
+ "meta": {}
+ },
+ "actionFilePath": "file:///Z:/temp/ERTFastFiller/app/modules/connections/DB.json",
+ "serverType": "node",
+ "fileName": "db.json"
}
\ No newline at end of file
diff --git a/app/api/insert.json b/app/api/insert.json
index 8bb1ab4..be8d5ce 100644
--- a/app/api/insert.json
+++ b/app/api/insert.json
@@ -18,11 +18,6 @@
{
"type": "number",
"fieldName": "db_employeeID",
- "options": {
- "rules": {
- "core:number": {}
- }
- },
"name": "db_employeeID"
},
{
@@ -39,6 +34,15 @@
"type": "text",
"fieldName": "db_trainerID",
"name": "db_trainerID"
+ },
+ {
+ "type": "text",
+ "fieldName": "db_signatureData",
+ "ui": {
+ "label": "Signature",
+ "help": "Base64 encoded image "
+ },
+ "name": "db_signatureData"
}
]
},
@@ -81,41 +85,42 @@
"table": "da",
"column": "db_fullName",
"type": "text",
- "value": "{{$_POST.db_fullName}}",
- "recid": 1
+ "value": "{{$_POST.db_fullName}}"
},
{
"table": "da",
"column": "db_licenseNumber",
"type": "text",
- "value": "{{$_POST.db_licenseNumber}}",
- "recid": 2
+ "value": "{{$_POST.db_licenseNumber}}"
},
{
"table": "da",
"column": "db_stateIssue",
"type": "text",
- "value": "{{$_POST.db_stateIssue}}",
- "recid": 3
+ "value": "{{$_POST.db_stateIssue}}"
},
{
"table": "da",
"column": "db_employeeID",
"type": "number",
- "value": "{{$_POST.db_employeeID}}",
- "recid": 4
+ "value": "{{$_POST.db_employeeID}}"
},
{
"table": "da",
"column": "owner",
"type": "text",
- "value": "{{$_POST.owner}}",
- "recid": 5
+ "value": "{{$_POST.owner}}"
+ },
+ {
+ "table": "da",
+ "column": "db_SignatureData",
+ "type": "text",
+ "value": "{{$_POST.db_signatureData}}"
}
],
"table": "da",
"returning": "ID",
- "query": "insert into `da` (`db_employeeID`, `db_fullName`, `db_licenseNumber`, `db_stateIssue`, `owner`) values (?, ?, ?, ?, ?) returning `ID`",
+ "query": "insert into `da` (`db_SignatureData`, `db_employeeID`, `db_fullName`, `db_licenseNumber`, `db_stateIssue`, `owner`) values (?, ?, ?, ?, ?, ?) returning `ID`",
"params": [
{
"name": ":P1",
@@ -146,6 +151,12 @@
"type": "expression",
"value": "{{$_POST.owner}}",
"test": ""
+ },
+ {
+ "name": ":P6",
+ "type": "expression",
+ "value": "{{$_POST.db_signatureData}}",
+ "test": ""
}
]
}
diff --git a/app/api/query.json b/app/api/query.json
index aa728d8..842fa5c 100644
--- a/app/api/query.json
+++ b/app/api/query.json
@@ -27,7 +27,8 @@
},
"primary": "ID",
"joins": [],
- "query": "select * from `da`"
+ "query": "select * from `da`",
+ "orders": []
}
},
"output": true,
@@ -55,6 +56,11 @@
{
"type": "text",
"name": "owner"
+ },
+ {
+ "type": "text",
+ "sub": [],
+ "name": "db_SignatureData"
}
],
"outputType": "array"
diff --git a/app/api/querySignature.json b/app/api/querySignature.json
new file mode 100644
index 0000000..cbe382d
--- /dev/null
+++ b/app/api/querySignature.json
@@ -0,0 +1,97 @@
+{
+ "meta": {
+ "$_GET": [
+ {
+ "type": "text",
+ "name": "sort"
+ },
+ {
+ "type": "text",
+ "name": "dir"
+ },
+ {
+ "type": "text",
+ "name": "id"
+ }
+ ]
+ },
+ "exec": {
+ "steps": {
+ "name": "query",
+ "module": "dbconnector",
+ "action": "single",
+ "options": {
+ "connection": "DB",
+ "sql": {
+ "type": "select",
+ "columns": [
+ {
+ "table": "da",
+ "column": "ID"
+ },
+ {
+ "table": "da",
+ "column": "db_SignatureData"
+ }
+ ],
+ "params": [
+ {
+ "operator": "equal",
+ "type": "expression",
+ "name": ":P1",
+ "value": "{{$_GET.id}}",
+ "test": "95"
+ }
+ ],
+ "table": {
+ "name": "da"
+ },
+ "primary": "ID",
+ "joins": [],
+ "query": "select `ID`, `db_SignatureData` from `da` where `da`.`ID` = ?",
+ "wheres": {
+ "condition": "AND",
+ "rules": [
+ {
+ "id": "da.ID",
+ "field": "da.ID",
+ "type": "double",
+ "operator": "equal",
+ "value": "{{$_GET.id}}",
+ "data": {
+ "table": "da",
+ "column": "ID",
+ "type": "number",
+ "columnObj": {
+ "type": "increments",
+ "primary": true,
+ "unique": false,
+ "nullable": false,
+ "name": "ID"
+ }
+ },
+ "operation": "="
+ }
+ ],
+ "conditional": null,
+ "valid": true
+ }
+ }
+ },
+ "output": true,
+ "meta": [
+ {
+ "type": "number",
+ "name": "ID"
+ },
+ {
+ "type": "text",
+ "sub": [],
+ "name": "db_SignatureData"
+ }
+ ],
+ "outputType": "object",
+ "type": "dbconnector_single"
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/modules/connections/DB.json b/app/modules/connections/DB.json
index 12359b7..e105d6e 100644
--- a/app/modules/connections/DB.json
+++ b/app/modules/connections/DB.json
@@ -6,6 +6,10 @@
"client": "sqlite3",
"connection": {
"filename": "/public/ERTSQlite.db"
- }
- }
+ },
+ "meta": {}
+ },
+ "actionFilePath": "file:///Z:/temp/ERTFastFiller/app/modules/connections/DB.json",
+ "serverType": "node",
+ "fileName": "db.json"
}
\ No newline at end of file
diff --git a/public/ERTSQlite.db b/public/ERTSQlite.db
index affe425..fed801a 100644
Binary files a/public/ERTSQlite.db and b/public/ERTSQlite.db differ
diff --git a/public/PDF/pdfLibSignature.js b/public/PDF/pdfLibSignature.js
index 3761f07..0085b67 100644
--- a/public/PDF/pdfLibSignature.js
+++ b/public/PDF/pdfLibSignature.js
@@ -98,7 +98,7 @@ function generateRandomIdentifier(size) {
// ** TOUCH EVENT LISTNERS FOR TABLETS
-//canvas.addEventListener('touchstart', (e) => startDrawing(e.touches[0]));
+//canvas.addEventListener('touchstart', (e) => startDrawing(e.touches[0]),{passive: true});
//canvas.addEventListener('touchend', endDrawing);
//canvas.addEventListener('touchmove', (e) => draw(e.touches[0]));
diff --git a/public/dmxAppConnect/config.js b/public/dmxAppConnect/config.js
index a78b474..701cb83 100644
--- a/public/dmxAppConnect/config.js
+++ b/public/dmxAppConnect/config.js
@@ -62,7 +62,41 @@ dmx.config({
"type": "text",
"name": "section"
}
- ]
+ ],
+ "data_view1": {
+ "meta": [
+ {
+ "type": "number",
+ "name": "ID"
+ },
+ {
+ "type": "text",
+ "name": "db_fullName"
+ },
+ {
+ "type": "text",
+ "name": "db_licenseNumber"
+ },
+ {
+ "type": "text",
+ "name": "db_stateIssue"
+ },
+ {
+ "type": "number",
+ "name": "db_employeeID"
+ },
+ {
+ "type": "text",
+ "name": "owner"
+ },
+ {
+ "type": "text",
+ "sub": [],
+ "name": "db_SignatureData"
+ }
+ ],
+ "outputType": "array"
+ }
},
"index": {
"flowRunPageId": {
@@ -118,6 +152,20 @@ dmx.config({
}
],
"local": {}
- }
+ },
+ "cookies": [
+ {
+ "type": "text",
+ "name": "userIdentifier"
+ }
+ ]
+ },
+ "success": {
+ "cookies": [
+ {
+ "type": "text",
+ "name": "userIdentifier"
+ }
+ ]
}
});
diff --git a/public/js/libProcessScript.js b/public/js/libProcessScript.js
index 4ac6803..aa574ca 100644
--- a/public/js/libProcessScript.js
+++ b/public/js/libProcessScript.js
@@ -200,7 +200,7 @@ function saveSignatureAsBase64() {
}
function getSignatureData() {
- dmx.global.set('canvasDataEncoded', saveSignatureAsBase64())
+ dmx.global.set('signatureDataEncoded', saveSignatureAsBase64())
dd('SignatureData:', saveSignatureAsBase64())
}
diff --git a/views/index0.ejs b/views/index0.ejs
index f95d65e..ad730b0 100644
--- a/views/index0.ejs
+++ b/views/index0.ejs
@@ -1,7 +1,10 @@
-
+
+
status messages: {{myResult}}