diff --git a/app/api/qSubSection.json b/app/api/qSubSection.json index cd0b742..3970044 100644 --- a/app/api/qSubSection.json +++ b/app/api/qSubSection.json @@ -18,102 +18,41 @@ "exec": { "steps": { "name": "query", - "module": "dbconnector", - "action": "select", + "module": "dbupdater", + "action": "custom", "options": { "connection": "DB", "sql": { - "type": "SELECT", - "distinct": false, - "columns": [ - { - "table": "tblSection", - "column": "*", - "field": "*" - } - ], - "table": { - "name": "tblSection" - }, - "joins": [], - "orders": [], + "query": "\nselect *, CAST(numSection AS INTEGER) as `wNumSection` \nfrom `tblSection` where isSection = 0 AND wNumSection = ? \n", "params": [ { - "operator": "begins_with", - "type": "expression", "name": ":P1", "value": "{{$_GET.subid}}", - "test": "" + "test": "11" } - ], - "query": "select * from `tblSection` where `tblSection`.`numSection` like ? and `tblSection`.`isSection` = ?", - "wheres": { - "condition": "AND", - "rules": [ - { - "id": "tblSection.numSection", - "field": "tblSection.numSection", - "type": "string", - "operator": "begins_with", - "value": "{{$_GET.subid}}", - "data": { - "table": "tblSection", - "column": "numSection", - "type": "text", - "columnObj": { - "type": "text", - "maxLength": 255, - "primary": false, - "unique": false, - "nullable": true, - "name": "numSection" - } - }, - "operation": "LIKE" - }, - { - "id": "tblSection.isSection", - "field": "tblSection.isSection", - "type": "string", - "operator": "equal", - "value": "0", - "data": { - "table": "tblSection", - "column": "isSection", - "type": "text", - "columnObj": { - "type": "text", - "primary": false, - "unique": false, - "nullable": true, - "name": "isSection" - } - }, - "operation": "=" - } - ], - "conditional": null, - "valid": true - } + ] } }, "output": true, "meta": [ { - "type": "text", - "name": "isSection" + "name": "isSection", + "type": "text" }, { - "type": "text", - "name": "numSection" + "name": "numSection", + "type": "text" }, { - "type": "text", - "name": "txtSection" + "name": "txtSection", + "type": "text" + }, + { + "name": "wNumSection", + "type": "number" } ], - "type": "dbconnector_select", - "outputType": "array" + "type": "dbcustom_query" } } } \ No newline at end of file diff --git a/app/api/qSubSection_all.json b/app/api/qSubSection_all.json new file mode 100644 index 0000000..3970044 --- /dev/null +++ b/app/api/qSubSection_all.json @@ -0,0 +1,58 @@ +{ + "meta": { + "$_GET": [ + { + "type": "text", + "name": "sort" + }, + { + "type": "text", + "name": "dir" + }, + { + "type": "text", + "name": "subid" + } + ] + }, + "exec": { + "steps": { + "name": "query", + "module": "dbupdater", + "action": "custom", + "options": { + "connection": "DB", + "sql": { + "query": "\nselect *, CAST(numSection AS INTEGER) as `wNumSection` \nfrom `tblSection` where isSection = 0 AND wNumSection = ? \n", + "params": [ + { + "name": ":P1", + "value": "{{$_GET.subid}}", + "test": "11" + } + ] + } + }, + "output": true, + "meta": [ + { + "name": "isSection", + "type": "text" + }, + { + "name": "numSection", + "type": "text" + }, + { + "name": "txtSection", + "type": "text" + }, + { + "name": "wNumSection", + "type": "number" + } + ], + "type": "dbcustom_query" + } + } +} \ No newline at end of file diff --git a/app/api/uploadSignature.json b/app/api/uploadSignature.json new file mode 100644 index 0000000..d2b60cc --- /dev/null +++ b/app/api/uploadSignature.json @@ -0,0 +1,61 @@ +{ + "meta": { + "$_POST": [ + { + "type": "text", + "name": "image" + } + ] + }, + "exec": { + "steps": [ + { + "name": "decodedImage", + "module": "core", + "action": "setvalue", + "options": { + "key": "image", + "value": "image.replace(/^data:image\\/\\w+;base64,/, \"\")" + }, + "meta": [], + "outputType": "text" + }, + { + "name": "upload", + "module": "upload", + "action": "upload", + "options": { + "fields": "{{decodedImage}}", + "path": "/public/signatures/Sig_{{NOW.timestamp}}.png" + }, + "meta": [ + { + "name": "name", + "type": "text" + }, + { + "name": "path", + "type": "text" + }, + { + "name": "url", + "type": "text" + }, + { + "name": "type", + "type": "text" + }, + { + "name": "size", + "type": "text" + }, + { + "name": "error", + "type": "number" + } + ], + "outputType": "text" + } + ] + } +} \ No newline at end of file diff --git a/app/config/routes.json b/app/config/routes.json index 4a15bca..4ebb053 100644 --- a/app/config/routes.json +++ b/app/config/routes.json @@ -20,6 +20,21 @@ "path": "/ERTScoring", "page": "ERTScoring", "layout": "main" + }, + { + "path": "/file:///Z:/temp/ERTFastFiller/public//Signature", + "page": "file:///Z:/temp/ERTFastFiller/public//Signature", + "layout": "main" + }, + { + "path": "/signature", + "page": "signature", + "layout": "main" + }, + { + "path": "/start", + "page": "start", + "layout": "main" } ] } \ No newline at end of file diff --git a/public/.wappler_folder.json b/public/.wappler_folder.json new file mode 100644 index 0000000..e1a4696 --- /dev/null +++ b/public/.wappler_folder.json @@ -0,0 +1,6 @@ +{ + "Signature.html": { + "layoutPage": "main", + "description": "" + } +} \ No newline at end of file diff --git a/public/Signature.html b/public/Signature.html new file mode 100644 index 0000000..d5fde86 --- /dev/null +++ b/public/Signature.html @@ -0,0 +1,112 @@ + + + + + + + + Untitled Document + + + + + + + + + +
+
+

Heading

+
+
+
+
+

Heading

+
+
+
+ +
+ + + + + + + + +
Popover content
+ + + + \ No newline at end of file diff --git a/public/dmxAppConnect/config.js b/public/dmxAppConnect/config.js index a9f4adc..1665921 100644 --- a/public/dmxAppConnect/config.js +++ b/public/dmxAppConnect/config.js @@ -1,76 +1,29 @@ dmx.config({ - "observationPage": { - "repeat2": { + "start": { + "repeat1": { + "meta": null, + "outputType": "text" + }, + "tableRepeat1": { "meta": [ { - "type": "number", - "name": "ID" + "name": "isSection", + "type": "text" }, { - "type": "text", - "name": "db_fullName" + "name": "numSection", + "type": "text" }, { - "type": "text", - "name": "db_licenseNumber" + "name": "txtSection", + "type": "text" }, { - "type": "text", - "name": "db_stateIssue" - }, - { - "type": "number", - "name": "db_employeeID" - }, - { - "type": "text", - "name": "owner" + "name": "wNumSection", + "type": "number" } ], - "outputType": "array" - }, - "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" - } - ], - "outputType": "array" - }, - "datastore1": [ - { - "type": "number", - "name": "numSection" - }, - { - "type": "number", - "name": "Points" - }, - { - "type": "text", - "name": "description" - } - ] + "outputType": "text" + } } }); diff --git a/public/dmxAppConnect/dmxBootstrap5Tooltips/dmxBootstrap5Tooltips.js b/public/dmxAppConnect/dmxBootstrap5Tooltips/dmxBootstrap5Tooltips.js new file mode 100644 index 0000000..89ac047 --- /dev/null +++ b/public/dmxAppConnect/dmxBootstrap5Tooltips/dmxBootstrap5Tooltips.js @@ -0,0 +1,20 @@ +dmx.Attribute('bs-tooltip', 'mounted', function(node, attr) { + let tooltip = bootstrap.Tooltip.getInstance(node); + + this.$watch(attr.value, function(value) { + node.setAttribute('data-bs-title', value || ''); + }); + + if (!tooltip) { + tooltip = new bootstrap.Tooltip(node, { + placement: () => node.getAttribute('data-bs-placement') || 'auto', + title: () => node.getAttribute('data-bs-title') || '', + }); + } + + return () => { + if (tooltip) { + tooltip.dispose(); + } + }; +}); diff --git a/public/dmxAppConnect/dmxBrowser/dmxBrowser.js b/public/dmxAppConnect/dmxBrowser/dmxBrowser.js new file mode 100644 index 0000000..ad20eb4 --- /dev/null +++ b/public/dmxAppConnect/dmxBrowser/dmxBrowser.js @@ -0,0 +1,8 @@ +/*! + App Connect Browser + Version: 3.0.0 + (c) 2024 Wappler.io + @build 2024-04-15 17:48:46 + */ +dmx.Component("browser",{initialData:{online:navigator.onLine,userAgent:navigator.userAgent,language:navigator.language,cookieEnabled:navigator.cookieEnabled,referrer:document.referrer,location:{hash:location.hash,host:location.host,hostname:location.hostname,href:location.href,origin:location.origin,pathname:location.pathname,port:location.port,protocol:location.protocol,search:location.search,pathparts:location.pathname.slice(1).split("/")},scrollX:{offset:0,direction:0,position:0},scrollY:{offset:0,direction:0,position:0},viewport:{width:0,height:0},device:{width:0,height:0,pixelRatio:1,orientation:"landscape"},document:{width:0,height:0,hidden:document.hidden,visibility:document.visibilityState}},methods:{goto(t,e,i){if(e){if(dmx.routing&&"hash"==dmx.routing.router&&(t="#!"+t),t.startsWith("./")){let e=this.parent;for(;e;){if(e.routes&&e.path){t=dmx.routing.join("./",t.replace("./",e.path));break}e=e.parent}let i=document.querySelector('meta[name="ac:route"]');if(i&&i.content){let e=i.content,n=document.querySelector('meta[name="ac:base"]');n&&n.content&&(e=n.content.replace(/\/$/,"")+e);let o=dmx.pathToRegexp(e,[],{end:!1}).exec(location.pathname);o&&(t=t.replace("./",o[0].replace(/(\/+)?$/,"/")))}else t=dmx.routing.join(dmx.routing.getBase(),t)}history.pushState({title:i||document.title},"",t),i&&(document.title=i),window.dispatchEvent(new Event("pushstate"))}else location.assign(t)},reload(){location.reload()},back(){history.back()},forward(){history.forward()},scrollTo(t,e){window.scrollTo(t,e)},scrollXTo(t,e){window.scrollTo({left:t,behavior:e})},scrollYTo(t,e){window.scrollTo({top:t,behavior:e})},scrollBy(t,e){window.scrollBy(t,e)},scrollXBy(t,e){window.scrollBy({left:t,behavior:e})},scrollYBy(t,e){window.scrollBy({top:t,behavior:e})},alert(t){window.alert(t)},print(){window.print()},writeTextToClipboard:t=>navigator.clipboard.writeText(t)},events:{scroll:Event,resize:Event,online:Event,offline:Event,popstate:Event,pushstate:Event,replacestate:Event,visibilitychange:Event,orientationchange:Event},init(t){this._loadHandler=this._loadHandler.bind(this),this._sizeHandler=dmx.throttle(this._sizeHandler.bind(this)),this._onlineHandler=this._onlineHandler.bind(this),this._locationHandler=this._locationHandler.bind(this),this._visibilityHandler=this._visibilityHandler.bind(this),this._languageHandler=this._languageHandler.bind(this),this._orientationHandler=this._orientationHandler.bind(this),window.addEventListener("load",this._loadHandler),window.addEventListener("scroll",this._sizeHandler),window.addEventListener("resize",this._sizeHandler),window.addEventListener("online",this._onlineHandler),window.addEventListener("offline",this._onlineHandler),window.addEventListener("popstate",this._locationHandler),window.addEventListener("pushstate",this._locationHandler),window.addEventListener("replacestate",this._locationHandler),window.addEventListener("hashchange",this._locationHandler),window.addEventListener("languagechange",this._languageHandler),window.addEventListener("deviceorientation",this._orientationHandler),document.addEventListener("visibilitychange",this._visibilityHandler),dmx.nextTick((()=>this._updateSize()))},destroy(){window.removeEventListener("load",this._loadHandler),window.removeEventListener("scroll",this._sizeHandler),window.removeEventListener("resize",this._sizeHandler),window.removeEventListener("online",this._onlineHandler),window.removeEventListener("offline",this._onlineHandler),window.removeEventListener("popstate",this._locationHandler),window.removeEventListener("pushstate",this._locationHandler),window.removeEventListener("replacestate",this._locationHandler),window.removeEventListener("hashchange",this._locationHandler),window.removeEventListener("languagechange",this._languageHandler),window.removeEventListener("deviceorientation",this._orientationHandler),document.removeEventListener("visibilitychange",this._visibilityHandler)},_updateSize(){const t=this._documentSize(),e=t.width-window.innerWidth,i=t.height-window.innerHeight;let n={x:this.data.scrollX.direction,y:this.data.scrollY.direction};this.data.scrollX.offsetwindow.scrollX&&(n.x=-1),this.data.scrollY.offsetwindow.scrollY&&(n.x=-1),this.set({scrollX:{offset:window.scrollX,length:Math.max(0,e),direction:n.x,position:window.scrollX>0?window.scrollX/e:0},scrollY:{offset:window.scrollY,length:Math.max(0,i),direction:n.x,position:window.scrollY>0?window.scrollY/i:0},viewport:{width:window.innerWidth,height:window.innerHeight,scrollX:window.scrollX,scrollY:window.screenY},device:{width:window.screen.width,height:window.screen.height,pixelRatio:window.devicePixelRatio,orientation:this._orientation()},document:{width:t.width,height:t.height,hidden:document.hidden,visibility:document.visibilityState}})},_updateLocation(){this.set("location",{hash:location.hash,host:location.host,hostname:location.hostname,href:location.href,origin:location.origin,pathname:location.pathname,port:location.port,protocol:location.protocol,search:location.search,pathparts:location.pathname.slice(1).split("/")})},_documentSize:()=>({width:Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth),height:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)}),_orientation:()=>window.matchMedia("(orientation: portrait)").matches?"portrait":"landscape",_loadHandler(t){this._updateSize()},_sizeHandler(t){this._updateSize(),this.dispatchEvent(t.type)},_onlineHandler(t){this.set("online","online"===t.type),this.dispatchEvent(t.type)},_locationHandler(t){this._updateLocation(),this.dispatchEvent(t.type)},_languageHandler(t){this.set("language",navigator.language)},_orientationHandler(t){this._updateSize(),this.dispatchEvent("orientationchange")},_visibilityHandler(t){const e=this._documentSize();this.set("document",{width:e.width,height:e.height,hidden:document.hidden,visibility:document.visibilityState}),this.dispatchEvent(t.type)}}); +//# sourceMappingURL=dmxBrowser.js.map diff --git a/public/dmxAppConnect/dmxBrowser/dmxBrowser.js.map b/public/dmxAppConnect/dmxBrowser/dmxBrowser.js.map new file mode 100644 index 0000000..c00c5f7 --- /dev/null +++ b/public/dmxAppConnect/dmxBrowser/dmxBrowser.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["components/browser.js"],"names":["dmx","Component","initialData","online","navigator","onLine","userAgent","language","cookieEnabled","referrer","document","location","hash","host","hostname","href","origin","pathname","port","protocol","search","pathparts","slice","split","scrollX","offset","direction","position","scrollY","viewport","width","height","device","pixelRatio","orientation","hidden","visibility","visibilityState","methods","goto","url","internal","title","routing","router","startsWith","parent","this","routes","path","join","replace","route","querySelector","content","base","match","pathToRegexp","end","exec","getBase","history","pushState","window","dispatchEvent","Event","assign","reload","back","forward","scrollTo","x","y","scrollXTo","left","behavior","scrollYTo","top","scrollBy","scrollXBy","scrollYBy","alert","message","print","writeTextToClipboard","text","clipboard","writeText","events","scroll","resize","offline","popstate","pushstate","replacestate","visibilitychange","orientationchange","init","node","_loadHandler","bind","_sizeHandler","throttle","_onlineHandler","_locationHandler","_visibilityHandler","_languageHandler","_orientationHandler","addEventListener","nextTick","_updateSize","destroy","removeEventListener","doc","_documentSize","innerWidth","innerHeight","data","set","length","Math","max","screenY","screen","devicePixelRatio","_orientation","_updateLocation","body","scrollWidth","documentElement","offsetWidth","clientWidth","scrollHeight","offsetHeight","clientHeight","matchMedia","matches","event","type"],"mappings":";;;;;;AAAAA,IAAAC,UAAA,UAAA,CAEAC,Y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esContent":["dmx.Component('browser', {\r\n\r\n initialData: {\r\n online: navigator.onLine,\r\n userAgent: navigator.userAgent,\r\n language: navigator.language,\r\n cookieEnabled: navigator.cookieEnabled,\r\n referrer: document.referrer,\r\n\r\n location: {\r\n hash: location.hash,\r\n host: location.host,\r\n hostname: location.hostname,\r\n href: location.href,\r\n origin: location.origin,\r\n pathname: location.pathname,\r\n port: location.port,\r\n protocol: location.protocol,\r\n search: location.search,\r\n pathparts: location.pathname.slice(1).split('/'),\r\n },\r\n\r\n scrollX: {\r\n offset: 0,\r\n direction: 0,\r\n position: 0,\r\n },\r\n\r\n scrollY: {\r\n offset: 0,\r\n direction: 0,\r\n position: 0,\r\n },\r\n\r\n viewport: {\r\n width: 0,\r\n height: 0,\r\n },\r\n\r\n device: {\r\n width: 0,\r\n height: 0,\r\n pixelRatio: 1,\r\n orientation: 'landscape',\r\n },\r\n\r\n document: {\r\n width: 0,\r\n height: 0,\r\n hidden: document.hidden,\r\n visibility: document.visibilityState,\r\n },\r\n },\r\n\r\n methods: {\r\n goto (url, internal, title) {\r\n if (internal) {\r\n if (dmx.routing && dmx.routing.router == 'hash') {\r\n url = '#!' + url;\r\n }\r\n\r\n if (url.startsWith('./')) {\r\n let parent = this.parent;\r\n \r\n while (parent) {\r\n if (parent.routes && parent.path) {\r\n url = dmx.routing.join('./', url.replace('./', parent.path));\r\n break;\r\n }\r\n \r\n parent = parent.parent;\r\n }\r\n \r\n let route = document.querySelector('meta[name=\"ac:route\"]');\r\n if (route && route.content) {\r\n let path = route.content;\r\n let base = document.querySelector('meta[name=\"ac:base\"]');\r\n if (base && base.content) {\r\n path = base.content.replace(/\\/$/, '') + path;\r\n }\r\n let match = dmx.pathToRegexp(path, [], { end: false }).exec(location.pathname);\r\n if (match) {\r\n url = url.replace('./', match[0].replace(/(\\/+)?$/, '/'));\r\n }\r\n } else {\r\n url = dmx.routing.join(dmx.routing.getBase(), url);\r\n }\r\n }\r\n \r\n history.pushState({ title: title || document.title }, '', url);\r\n if (title) document.title = title;\r\n window.dispatchEvent(new Event('pushstate'));\r\n } else {\r\n location.assign(url);\r\n }\r\n },\r\n\r\n reload () {\r\n location.reload();\r\n },\r\n\r\n back () {\r\n history.back();\r\n },\r\n\r\n forward () {\r\n history.forward();\r\n },\r\n\r\n scrollTo (x, y) {\r\n window.scrollTo(x, y);\r\n },\r\n\r\n scrollXTo (left, behavior) {\r\n window.scrollTo({ left, behavior });\r\n },\r\n\r\n scrollYTo (top, behavior) {\r\n window.scrollTo({ top, behavior });\r\n },\r\n\r\n scrollBy (x, y) {\r\n window.scrollBy(x, y);\r\n },\r\n\r\n scrollXBy (left, behavior) {\r\n window.scrollBy({ left, behavior });\r\n },\r\n\r\n scrollYBy (top, behavior) {\r\n window.scrollBy({ top, behavior });\r\n },\r\n\r\n alert (message) {\r\n window.alert(message);\r\n },\r\n\r\n print () {\r\n window.print();\r\n },\r\n\r\n writeTextToClipboard (text) {\r\n return navigator.clipboard.writeText(text);\r\n },\r\n },\r\n\r\n events: {\r\n scroll: Event,\r\n resize: Event,\r\n online: Event,\r\n offline: Event,\r\n popstate: Event,\r\n pushstate: Event,\r\n replacestate: Event,\r\n visibilitychange: Event,\r\n orientationchange: Event,\r\n },\r\n\r\n init (node) {\r\n this._loadHandler = this._loadHandler.bind(this);\r\n this._sizeHandler = dmx.throttle(this._sizeHandler.bind(this));\r\n this._onlineHandler = this._onlineHandler.bind(this);\r\n this._locationHandler = this._locationHandler.bind(this);\r\n this._visibilityHandler = this._visibilityHandler.bind(this);\r\n this._languageHandler = this._languageHandler.bind(this);\r\n this._orientationHandler = this._orientationHandler.bind(this);\r\n\r\n window.addEventListener('load', this._loadHandler);\r\n window.addEventListener('scroll', this._sizeHandler);\r\n window.addEventListener('resize', this._sizeHandler);\r\n window.addEventListener('online', this._onlineHandler);\r\n window.addEventListener('offline', this._onlineHandler);\r\n window.addEventListener('popstate', this._locationHandler);\r\n window.addEventListener('pushstate', this._locationHandler);\r\n window.addEventListener('replacestate', this._locationHandler);\r\n window.addEventListener('hashchange', this._locationHandler);\r\n window.addEventListener('languagechange', this._languageHandler);\r\n window.addEventListener('deviceorientation', this._orientationHandler);\r\n document.addEventListener('visibilitychange', this._visibilityHandler);\r\n\r\n dmx.nextTick(() => this._updateSize());\r\n },\r\n\r\n destroy () {\r\n window.removeEventListener('load', this._loadHandler);\r\n window.removeEventListener('scroll', this._sizeHandler);\r\n window.removeEventListener('resize', this._sizeHandler);\r\n window.removeEventListener('online', this._onlineHandler);\r\n window.removeEventListener('offline', this._onlineHandler);\r\n window.removeEventListener('popstate', this._locationHandler);\r\n window.removeEventListener('pushstate', this._locationHandler);\r\n window.removeEventListener('replacestate', this._locationHandler);\r\n window.removeEventListener('hashchange', this._locationHandler);\r\n window.removeEventListener('languagechange', this._languageHandler);\r\n window.removeEventListener('deviceorientation', this._orientationHandler);\r\n document.removeEventListener('visibilitychange', this._visibilityHandler);\r\n },\r\n\r\n _updateSize () {\r\n const doc = this._documentSize();\r\n const width = doc.width - window.innerWidth;\r\n const height = doc.height - window.innerHeight;\r\n\r\n let direction = { x: this.data.scrollX.direction, y: this.data.scrollY.direction };\r\n\r\n if (this.data.scrollX.offset < window.scrollX) {\r\n direction.x = 1;\r\n } else if (this.data.scrollX.offset > window.scrollX) {\r\n direction.x = -1;\r\n }\r\n\r\n if (this.data.scrollY.offset < window.scrollY) {\r\n direction.x = 1;\r\n } else if (this.data.scrollY.offset > window.scrollY) {\r\n direction.x = -1;\r\n }\r\n\r\n this.set({\r\n scrollX: {\r\n offset: window.scrollX,\r\n length: Math.max(0, width),\r\n direction: direction.x,\r\n position: window.scrollX > 0 ? window.scrollX / width : 0,\r\n },\r\n scrollY: {\r\n offset: window.scrollY,\r\n length: Math.max(0, height),\r\n direction: direction.x,\r\n position: window.scrollY > 0 ? window.scrollY / height : 0,\r\n },\r\n viewport: {\r\n width: window.innerWidth,\r\n height: window.innerHeight,\r\n scrollX: window.scrollX,\r\n scrollY: window.screenY,\r\n },\r\n device: {\r\n width: window.screen.width,\r\n height: window.screen.height,\r\n pixelRatio: window.devicePixelRatio,\r\n orientation: this._orientation(),\r\n },\r\n document: {\r\n width: doc.width,\r\n height: doc.height,\r\n hidden: document.hidden,\r\n visibility: document.visibilityState,\r\n }\r\n });\r\n },\r\n\r\n _updateLocation () {\r\n this.set('location', {\r\n hash: location.hash,\r\n host: location.host,\r\n hostname: location.hostname,\r\n href: location.href,\r\n origin: location.origin,\r\n pathname: location.pathname,\r\n port: location.port,\r\n protocol: location.protocol,\r\n search: location.search,\r\n pathparts: location.pathname.slice(1).split('/')\r\n });\r\n },\r\n \r\n _documentSize () {\r\n return {\r\n width: Math.max(\r\n document.body.scrollWidth, document.documentElement.scrollWidth,\r\n document.body.offsetWidth, document.documentElement.offsetWidth,\r\n document.body.clientWidth, document.documentElement.clientWidth\r\n ),\r\n height: Math.max(\r\n document.body.scrollHeight, document.documentElement.scrollHeight,\r\n document.body.offsetHeight, document.documentElement.offsetHeight,\r\n document.body.clientHeight, document.documentElement.clientHeight\r\n ),\r\n };\r\n },\r\n\r\n _orientation () {\r\n return window.matchMedia('(orientation: portrait)').matches ? 'portrait' : 'landscape';\r\n },\r\n\r\n _loadHandler (event) {\r\n this._updateSize();\r\n },\r\n\r\n _sizeHandler (event) {\r\n this._updateSize();\r\n this.dispatchEvent(event.type);\r\n },\r\n\r\n _onlineHandler (event) {\r\n this.set('online', event.type === 'online');\r\n this.dispatchEvent(event.type);\r\n },\r\n\r\n _locationHandler (event) {\r\n this._updateLocation();\r\n this.dispatchEvent(event.type);\r\n },\r\n\r\n _languageHandler (event) {\r\n this.set('language', navigator.language);\r\n },\r\n\r\n _orientationHandler (event) {\r\n this._updateSize();\r\n this.dispatchEvent('orientationchange');\r\n },\r\n\r\n _visibilityHandler (event) {\r\n const doc = this._documentSize();\r\n\r\n this.set('document', {\r\n width: doc.width,\r\n height: doc.height,\r\n hidden: document.hidden,\r\n visibility: document.visibilityState,\r\n });\r\n\r\n this.dispatchEvent(event.type);\r\n },\r\n\r\n});\r\n"]} \ No newline at end of file diff --git a/public/signatureScript.js b/public/signatureScript.js new file mode 100644 index 0000000..72c1576 --- /dev/null +++ b/public/signatureScript.js @@ -0,0 +1,62 @@ +// JavaScript Document + + +document.addEventListener("DOMContentLoaded", function () { + + console.log("DOM Loaded. Signature script loaded") + + const canvas = document.getElementById('signatureCanvas'); + const ctx = canvas.getContext('2d'); + let drawing = false; + + // Function to get the canvas offset + function getCanvasOffset() { + const rect = canvas.getBoundingClientRect(); + console.log("offsetX:", rect.left, " OffsetY:", rect.top) + return { + offsetX: rect.left, + offsetY: rect.top + }; + } + + function clearCanvas() { + ctx.clearRect(0, 0, canvas.width, canvas.height); + } + + function startDrawing(e) { + console.log("Start Drawing") + drawing = true; + draw(e); + } + + function endDrawing() { + console.log("Stopped Drawing") + drawing = false; + ctx.beginPath(); + } + + function draw(e) { + console.log(e) + if (!drawing) return; + ctx.lineWidth = 2; + ctx.lineCap = 'round'; + ctx.strokeStyle = '#000'; + + let x = e.clientX - canvas.offsetLeft; + let y = e.clientY - canvas.offsetTop; + console.log("X:", x, " Y:", y) + ctx.lineTo(x, y); + ctx.stroke(); + ctx.beginPath(); + ctx.moveTo(x, y); + } + + canvas.addEventListener('mousedown', startDrawing); + canvas.addEventListener('mouseup', endDrawing); + canvas.addEventListener('mousemove', draw); + + canvas.addEventListener('touchstart', (e) => startDrawing(e.touches[0])); + canvas.addEventListener('touchend', endDrawing); + canvas.addEventListener('touchmove', (e) => draw(e.touches[0])); + +}) \ No newline at end of file diff --git a/views/.wappler_folder.json b/views/.wappler_folder.json index ca0694b..e46f263 100644 --- a/views/.wappler_folder.json +++ b/views/.wappler_folder.json @@ -10,5 +10,13 @@ "ERTScoring.ejs": { "layoutPage": "main", "description": "" + }, + "signature.ejs": { + "layoutPage": "main", + "description": "" + }, + "start.ejs": { + "layoutPage": "main", + "description": "" } } \ No newline at end of file diff --git a/views/ERTScoring.ejs b/views/ERTScoring.ejs index 2ec1bc9..0b8fcc4 100644 --- a/views/ERTScoring.ejs +++ b/views/ERTScoring.ejs @@ -1,5 +1,4 @@ - - + \ No newline at end of file diff --git a/views/index.ejs b/views/index.ejs index 050c2e3..f1ffcd0 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -1,4 +1,6 @@ - + +
+ - Untitled Document + ERT Fast Fill @@ -32,6 +32,12 @@ + + + + + + @@ -42,7 +48,7 @@ File diff --git a/views/observationPage.ejs b/views/observationPage.ejs index 71fac05..7bdd739 100644 --- a/views/observationPage.ejs +++ b/views/observationPage.ejs @@ -1,4 +1,39 @@ - + +
+ +
+
@@ -9,7 +44,15 @@
- + +
+
+ + +
+
+ +

Offcanvas body text goes here.

@@ -24,7 +67,21 @@
-
+ +

Who you are grading

@@ -34,19 +91,19 @@
- - + + - + - + - + @@ -57,15 +114,20 @@
- +
-
-
-
+ +
+ +
+
@@ -74,7 +136,7 @@
-
+
DA Name
Name License No. Issue StateDA Empl. IDEmployee No. Driver Trainer
@@ -91,15 +153,46 @@
-
+
+
+
+

The DT should fill out the evaluation form during the Enhanced Road Test based on the below points system and description. Every item in Section must have a score to be considered complete and valid; there should be no blank spaces. A DA candidate must have a score of total score 10 or lower to pass.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
TierPointsDescription
10DA did perform the action
21DA did perform the action after DT provides guidance
32DA failed to perform action
+
+
- - + + @@ -130,7 +223,9 @@ - + @@ -142,4 +237,71 @@
Points Is sectionNum sectionTxt sectionSection No.Section Description
$id Num section PointsDescriptionDescription  + +
-
\ No newline at end of file +
+ \ No newline at end of file diff --git a/views/partials/.wappler_folder.json b/views/partials/.wappler_folder.json new file mode 100644 index 0000000..7fcfb84 --- /dev/null +++ b/views/partials/.wappler_folder.json @@ -0,0 +1,11 @@ +{ + "getSignature.html": { + "description": "Get Sig" + }, + "getSignature.ejs": { + "description": "" + }, + "pointInstructions.html": { + "description": "How to use point sytem" + } +} \ No newline at end of file diff --git a/views/partials/getSignature.html b/views/partials/getSignature.html new file mode 100644 index 0000000..eba504e --- /dev/null +++ b/views/partials/getSignature.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/views/partials/pointInstructions.html b/views/partials/pointInstructions.html new file mode 100644 index 0000000..ab7d5bf --- /dev/null +++ b/views/partials/pointInstructions.html @@ -0,0 +1,27 @@ + +
+
+
+

Fancy display heading

+

A nice paragraph

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
\ No newline at end of file diff --git a/views/signature.ejs b/views/signature.ejs new file mode 100644 index 0000000..0cbce59 --- /dev/null +++ b/views/signature.ejs @@ -0,0 +1,101 @@ + + + +
+
+

Request Signature

+
+
+
+
+ +
+

Signature

+
+
+ +
+
+
+
+
+ + +
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/views/start.ejs b/views/start.ejs new file mode 100644 index 0000000..6c177fc --- /dev/null +++ b/views/start.ejs @@ -0,0 +1,47 @@ + + +
+ + +
+ +
+
+
+
+
+

{{txtSection}}

+
+
+
+ + + + + + + + + + + + + + + + + +
IndexIs sectionNum sectionTxt section
+
+
+ + +
+
+
+
+
\ No newline at end of file