Добавил недостающие файлы
parent
00c8b5d800
commit
a018d182f3
@ -0,0 +1,13 @@
|
||||
{
|
||||
"lockfileVersion": 1,
|
||||
"workspaces": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"pocketbase": "^0.26.2",
|
||||
},
|
||||
},
|
||||
},
|
||||
"packages": {
|
||||
"pocketbase": ["pocketbase@0.26.2", "", {}, "sha512-WA8EOBc3QnSJh8rJ3iYoi9DmmPOMFIgVfAmIGux7wwruUEIzXgvrO4u0W2htfQjGIcyezJkdZOy5Xmh7SxAftw=="],
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>PocketBase Test</title>
|
||||
<script src="https://unpkg.com/pocketbase@latest/dist/pocketbase.umd.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>PocketBase Client Test</h1>
|
||||
<div id="test"></div>
|
||||
<script>
|
||||
(async function() {
|
||||
// Укажите адрес вашего PocketBase сервера (стандартно http://127.0.0.1:8090)
|
||||
const pb = new PocketBase('http://127.0.0.1:8090');
|
||||
//const userData = await pb.collection('rmias').authWithPassword('tad17@list.ru', '0987654321');
|
||||
const result = await pb.collection('rmias').getList(1, 10)
|
||||
console.log("result:", result)
|
||||
const ul = document.createElement('ul');
|
||||
const container = document.getElementById('test');
|
||||
for (const r of result.items) {
|
||||
const li = document.createElement('li');
|
||||
li.innerHTML = r.patientName
|
||||
ul.appendChild(li);
|
||||
}
|
||||
container.appendChild(ul);
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,5 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"pocketbase": "^0.26.2"
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,28 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((app) => {
|
||||
const collection = app.findCollectionByNameOrId("pbc_3050725192")
|
||||
|
||||
// update collection data
|
||||
unmarshal({
|
||||
"createRule": "",
|
||||
"deleteRule": "",
|
||||
"listRule": "",
|
||||
"updateRule": "",
|
||||
"viewRule": ""
|
||||
}, collection)
|
||||
|
||||
return app.save(collection)
|
||||
}, (app) => {
|
||||
const collection = app.findCollectionByNameOrId("pbc_3050725192")
|
||||
|
||||
// update collection data
|
||||
unmarshal({
|
||||
"createRule": null,
|
||||
"deleteRule": null,
|
||||
"listRule": null,
|
||||
"updateRule": null,
|
||||
"viewRule": null
|
||||
}, collection)
|
||||
|
||||
return app.save(collection)
|
||||
})
|
@ -0,0 +1,64 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((app) => {
|
||||
const collection = new Collection({
|
||||
"createRule": null,
|
||||
"deleteRule": null,
|
||||
"fields": [
|
||||
{
|
||||
"autogeneratePattern": "",
|
||||
"hidden": false,
|
||||
"id": "text3208210256",
|
||||
"max": 0,
|
||||
"min": 0,
|
||||
"name": "id",
|
||||
"pattern": "^[a-z0-9]+$",
|
||||
"presentable": false,
|
||||
"primaryKey": true,
|
||||
"required": true,
|
||||
"system": true,
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"autogeneratePattern": "",
|
||||
"hidden": false,
|
||||
"id": "_clone_5r0b",
|
||||
"max": 0,
|
||||
"min": 0,
|
||||
"name": "doctor",
|
||||
"pattern": "",
|
||||
"presentable": false,
|
||||
"primaryKey": false,
|
||||
"required": false,
|
||||
"system": false,
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"hidden": false,
|
||||
"id": "number432430951",
|
||||
"max": null,
|
||||
"min": null,
|
||||
"name": "cnt",
|
||||
"onlyInt": false,
|
||||
"presentable": false,
|
||||
"required": false,
|
||||
"system": false,
|
||||
"type": "number"
|
||||
}
|
||||
],
|
||||
"id": "pbc_2097892121",
|
||||
"indexes": [],
|
||||
"listRule": null,
|
||||
"name": "bydoctor",
|
||||
"system": false,
|
||||
"type": "view",
|
||||
"updateRule": null,
|
||||
"viewQuery": "SELECT \n (ROW_NUMBER() OVER()) as id, \n doctor, count(doctor) as cnt\nfrom rmias\n\n",
|
||||
"viewRule": null
|
||||
});
|
||||
|
||||
return app.save(collection);
|
||||
}, (app) => {
|
||||
const collection = app.findCollectionByNameOrId("pbc_2097892121");
|
||||
|
||||
return app.delete(collection);
|
||||
})
|
@ -0,0 +1,58 @@
|
||||
/// <reference path="../pb_data/types.d.ts" />
|
||||
migrate((app) => {
|
||||
const collection = app.findCollectionByNameOrId("pbc_2097892121")
|
||||
|
||||
// update collection data
|
||||
unmarshal({
|
||||
"viewQuery": "SELECT \n (ROW_NUMBER() OVER()) as id, \n doctor, count(doctor) as cnt\nfrom rmias\ngroup by doctor\n\n"
|
||||
}, collection)
|
||||
|
||||
// remove field
|
||||
collection.fields.removeById("_clone_5r0b")
|
||||
|
||||
// add field
|
||||
collection.fields.addAt(1, new Field({
|
||||
"autogeneratePattern": "",
|
||||
"hidden": false,
|
||||
"id": "_clone_hx2W",
|
||||
"max": 0,
|
||||
"min": 0,
|
||||
"name": "doctor",
|
||||
"pattern": "",
|
||||
"presentable": false,
|
||||
"primaryKey": false,
|
||||
"required": false,
|
||||
"system": false,
|
||||
"type": "text"
|
||||
}))
|
||||
|
||||
return app.save(collection)
|
||||
}, (app) => {
|
||||
const collection = app.findCollectionByNameOrId("pbc_2097892121")
|
||||
|
||||
// update collection data
|
||||
unmarshal({
|
||||
"viewQuery": "SELECT \n (ROW_NUMBER() OVER()) as id, \n doctor, count(doctor) as cnt\nfrom rmias\n\n"
|
||||
}, collection)
|
||||
|
||||
// add field
|
||||
collection.fields.addAt(1, new Field({
|
||||
"autogeneratePattern": "",
|
||||
"hidden": false,
|
||||
"id": "_clone_5r0b",
|
||||
"max": 0,
|
||||
"min": 0,
|
||||
"name": "doctor",
|
||||
"pattern": "",
|
||||
"presentable": false,
|
||||
"primaryKey": false,
|
||||
"required": false,
|
||||
"system": false,
|
||||
"type": "text"
|
||||
}))
|
||||
|
||||
// remove field
|
||||
collection.fields.removeById("_clone_hx2W")
|
||||
|
||||
return app.save(collection)
|
||||
})
|
Loading…
Reference in New Issue