| | |
| | | users = JSON.parse(users) |
| | | } |
| | | else { |
| | | // TODO zweite möglichkeit "readFromApi" implementieren |
| | | console.log("~~~ reading users from DB ... ~~~") |
| | | const db = require("./db") |
| | | const {data} = await db.getUsers(0, 100000) |
| | | users = data |
| | | } |
| | | |
| | | for (const user of users) { |
| | |
| | | "password": "paaa322ss" |
| | | }, |
| | | "search": { |
| | | "readFromFile": true, |
| | | "readFromFile": false, |
| | | "file": "users-local.json" |
| | | } |
| | | } |
| | |
| | | total: Number, |
| | | offset: Number, |
| | | limit: Number, |
| | | current: Number, |
| | | }) |
| | | |
| | | const emit = defineEmits(["go"]) |
| | |
| | | |
| | | <div class="pagination"> |
| | | <div class="pagination-buttons"> |
| | | <!-- <pre>--{{current}}--</pre>--> |
| | | <input type="button" @click="goStart()" class="start" value="«"> |
| | | <input type="button" @click="goPrev()" class="prev" value="‹"> |
| | | <span class="current">{{ offset }} - {{ offset + limit }} / {{ total }}</span> |
| | | <span class="current">{{ offset }} - {{ offset + current }} / {{ total }}</span> |
| | | <input type="button" @click="goNext()" class="next" value="›"> |
| | | <input type="button" @click="goEnd()" class="end" value="»"> |
| | | <KeyboardToggle :initial="false" @toggle="toggleKeyboard" style="color: #666" /> |
| | |
| | | <div style="transform:scale(1.4); font-weight: bold;">×</div> |
| | | </button> |
| | | </div> |
| | | <Pagination :offset="users.offset" :limit="users.limit" :total="users.total" @go="go" /> |
| | | <Pagination :offset="users.offset" :limit="users.limit" :total="users.total" :current="users.data.length" @go="go" /> |
| | | </div> |
| | | |
| | | <table class="w100p"> |