Tested some PouchDB.js functions.
This commit is contained in:
parent
b46109dc90
commit
d108fe0b85
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"projectName": "ERTFastFiller",
|
"projectName": "ErtFastFill",
|
||||||
"styleFile": "/css/style.css",
|
"styleFile": "/css/style.css",
|
||||||
"assetsFolder": "/assets",
|
"assetsFolder": "/assets",
|
||||||
"designFramework": "bootstrap5",
|
"designFramework": "bootstrap5",
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
"connection": {
|
"connection": {
|
||||||
"host": "host.docker.internal",
|
"host": "host.docker.internal",
|
||||||
"port": 9913,
|
"port": 9913,
|
||||||
"user": "trainer",
|
"user": "training",
|
||||||
"password": "sGynUdlM9cuLtUdc",
|
"password": "sGynUdlM9cuLtUdc",
|
||||||
"database": "db_training"
|
"database": "db_training"
|
||||||
},
|
},
|
||||||
|
|
@ -13,16 +13,12 @@
|
||||||
"schema": {
|
"schema": {
|
||||||
"partitioned": false,
|
"partitioned": false,
|
||||||
"tables": {
|
"tables": {
|
||||||
"da": {
|
"db_training": {
|
||||||
"meta": [
|
"meta": [
|
||||||
{
|
{
|
||||||
"name": "_id",
|
"name": "_id",
|
||||||
"type": "objectId"
|
"type": "objectId"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "db_fullName",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "db_licenseNumber",
|
"name": "db_licenseNumber",
|
||||||
"type": "text"
|
"type": "text"
|
||||||
|
|
@ -31,10 +27,6 @@
|
||||||
"name": "db_employeeID",
|
"name": "db_employeeID",
|
||||||
"type": "text"
|
"type": "text"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "db_signatureData",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "db_trainerSelected",
|
"name": "db_trainerSelected",
|
||||||
"type": "text"
|
"type": "text"
|
||||||
|
|
@ -43,60 +35,10 @@
|
||||||
"name": "db_stateName",
|
"name": "db_stateName",
|
||||||
"type": "text"
|
"type": "text"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "dummy1",
|
|
||||||
"type": "text",
|
|
||||||
"ui": {
|
|
||||||
"label": "dummy"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"ert": {
|
|
||||||
"meta": [
|
|
||||||
{
|
|
||||||
"name": "_id",
|
|
||||||
"type": "objectId"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "docPDF",
|
|
||||||
"type": "text"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"db_edits": {
|
|
||||||
"name": "daData"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"driver": {
|
|
||||||
"meta": [
|
|
||||||
{
|
|
||||||
"name": "_id",
|
|
||||||
"type": "objectId"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "db_fullName",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "db_licenseNumber",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "db_employeeID",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "db_signatureData",
|
"name": "db_signatureData",
|
||||||
"type": "text"
|
"type": "text"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "db_trainerSelected",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "db_stateName",
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "dummy1",
|
"name": "dummy1",
|
||||||
"type": "text"
|
"type": "text"
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,25 @@ function myFunction() {
|
||||||
return myVar;
|
return myVar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
|
// Just simple PouchDB calls to db.info and db.get to test fetch of a document
|
||||||
|
|
||||||
|
function infoCouchDB() {
|
||||||
|
const db = new PouchDB('http://localhost:9913/db_training')
|
||||||
|
db.info().then(function (info) {
|
||||||
|
console.log(info)
|
||||||
|
})
|
||||||
|
|
||||||
|
db.get('da/1734165676725').then(function (doc) {
|
||||||
|
console.log(doc)
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
function runMyFunction() {
|
function runMyFunction() {
|
||||||
// alert("function run")
|
// alert("function run")
|
||||||
let result = generateRandomIdentifier(9);
|
let result = generateRandomIdentifier(9);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<!-- Wappler include head-page="layouts/main" fontawesome_5="cdn" bootstrap5="local" is="dmx-app" id="success" appConnect="local" components="{dmxStateManagement:{}}" -->
|
<!-- Wappler include head-page="layouts/main" fontawesome_5="cdn" bootstrap5="local" is="dmx-app" id="success" appConnect="local" components="{dmxStateManagement:{}}" -->
|
||||||
<meta name="ac:route" content="/success">
|
<meta name="ac:route" content="/success">
|
||||||
|
|
||||||
<div class="container wappler-block p-5">
|
<div class="container wappler-block p-5">
|
||||||
<div class="row text-center p-5">
|
<div class="row text-center p-5">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
|
@ -11,5 +12,8 @@
|
||||||
<a class="btn btn-primary" href="/">Return home</a>
|
<a class="btn btn-primary" href="/">Return home</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<button id="btn1" class="btn" onclick="infoCouchDB()">Button</button>
|
||||||
</div>
|
</div>
|
||||||
<script src="/js/bundle.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/pouchdb@9.0.0/dist/pouchdb.min.js"></script>
|
||||||
|
|
||||||
|
<script src="/PDF/dummyFunctions.js"></script>
|
||||||
Loading…
Reference in New Issue