@christianriedl/media 1.0.190 → 1.0.191
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/booksService.d.ts +2 -0
- package/dist/booksService.js +12 -4
- package/dist/booksService.js.map +1 -1
- package/dist/iBooks.d.ts +7 -0
- package/package.json +1 -1
- package/src/components/BookLine.vue +5 -0
- package/src/components/BookPlace.vue +8 -1
- package/src/views/BooksPage.vue +30 -2
- package/src/views/BooksPlacePage.vue +47 -6
package/dist/booksService.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export declare class BooksService implements IBooksService {
|
|
|
8
8
|
user: string;
|
|
9
9
|
log: ILogger;
|
|
10
10
|
cachedAuthors?: IAuthorShort[];
|
|
11
|
+
cachedPlaces?: IBookPlace[];
|
|
11
12
|
categories: string[];
|
|
12
13
|
flags: string[];
|
|
13
14
|
selectedAuthorId: number;
|
|
@@ -20,6 +21,7 @@ export declare class BooksService implements IBooksService {
|
|
|
20
21
|
deleteAuthor(id: number): Promise<boolean>;
|
|
21
22
|
getBooks(authorId?: number, bookId?: number): Promise<IBook[]>;
|
|
22
23
|
getFullBooks(surName?: string, givenName?: string, title?: string, flags?: string, minRating?: number): Promise<IFullBook[]>;
|
|
24
|
+
getBooksFrom(firstAuthorId: number, firstBookId?: number, count?: number): Promise<IFullBook[]>;
|
|
23
25
|
getBookPlaces(): Promise<IBookPlace[]>;
|
|
24
26
|
addBook(book: IBook): Promise<number>;
|
|
25
27
|
updateBook(book: IBook): Promise<boolean>;
|
package/dist/booksService.js
CHANGED
|
@@ -5,6 +5,7 @@ export class BooksService {
|
|
|
5
5
|
user;
|
|
6
6
|
log;
|
|
7
7
|
cachedAuthors;
|
|
8
|
+
cachedPlaces;
|
|
8
9
|
categories;
|
|
9
10
|
flags;
|
|
10
11
|
selectedAuthorId;
|
|
@@ -14,8 +15,8 @@ export class BooksService {
|
|
|
14
15
|
this.rest = rest;
|
|
15
16
|
this.user = user;
|
|
16
17
|
this.mediaUrl = rest.serviceUrl;
|
|
17
|
-
this.categories = ["Literatur", "Geschichte", "Philosophie", "Naturwissenschaft"];
|
|
18
|
-
this.flags = ["liesC", "liesH", "ausgeborgt"];
|
|
18
|
+
this.categories = ["Literatur", "Geschichte", "Philosophie", "Naturwissenschaft", "Reisen"];
|
|
19
|
+
this.flags = ["liesC", "liesH", "ausgeborgt", "neuesFach"];
|
|
19
20
|
this.selectedAuthorId = 0;
|
|
20
21
|
this.selectedBookId = 0;
|
|
21
22
|
}
|
|
@@ -61,10 +62,17 @@ export class BooksService {
|
|
|
61
62
|
const info = await this.rest.getData('apibooks/books/full', { surName, givenName, title, flags, minRating });
|
|
62
63
|
return info.result;
|
|
63
64
|
}
|
|
64
|
-
async
|
|
65
|
-
const info = await this.rest.getData('apibooks/books/
|
|
65
|
+
async getBooksFrom(firstAuthorId, firstBookId, count) {
|
|
66
|
+
const info = await this.rest.getData('apibooks/books/from', { firstAuthorId, firstBookId, count });
|
|
66
67
|
return info.result;
|
|
67
68
|
}
|
|
69
|
+
async getBookPlaces() {
|
|
70
|
+
if (!this.cachedPlaces) {
|
|
71
|
+
const info = await this.rest.getData('apibooks/books/places');
|
|
72
|
+
this.cachedPlaces = info.result;
|
|
73
|
+
}
|
|
74
|
+
return this.cachedPlaces;
|
|
75
|
+
}
|
|
68
76
|
async addBook(book) {
|
|
69
77
|
const url = `apibooks/books`;
|
|
70
78
|
const res = await this.rest.postDataEx(url, book);
|
package/dist/booksService.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"booksService.js","sourceRoot":"","sources":["../src/booksService.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,cAAc,GAAqC,MAAM,CAAC,WAAW,CAAC,CAAC;AACpF,MAAM,OAAO,YAAY;IACrB,IAAI,CAAQ;IACZ,QAAQ,CAAS;IACjB,IAAI,CAAS;IACb,GAAG,CAAU;IACb,aAAa,CAAkB;IAC/B,UAAU,CAAW;IACrB,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MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAiC,GAAG,CAAC,CAAC;QAC5E,MAAM,CAAC,GAAG,GAAG,CAAC,MAA+B,CAAC;QAC9C,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,CAAC,CAAA;QAC7C,OAAO,CAAC,CAAC,MAAM,CAAC;IACpB,CAAC;CACJ"}
|
package/dist/iBooks.d.ts
CHANGED
|
@@ -44,6 +44,8 @@ export interface IBookPlace {
|
|
|
44
44
|
buchstaben2: string;
|
|
45
45
|
zweitBuchstaben: string;
|
|
46
46
|
zweitBuchstaben2: string;
|
|
47
|
+
firstAuthorId: number;
|
|
48
|
+
firstBookId: number;
|
|
47
49
|
}
|
|
48
50
|
export interface IPlace {
|
|
49
51
|
vorne: string;
|
|
@@ -51,6 +53,10 @@ export interface IPlace {
|
|
|
51
53
|
hinten: string;
|
|
52
54
|
hinten2: string;
|
|
53
55
|
color: string;
|
|
56
|
+
hintenAuthorId: number;
|
|
57
|
+
hintenBookId: number;
|
|
58
|
+
vorneAuthorId: number;
|
|
59
|
+
vorneBookId: number;
|
|
54
60
|
}
|
|
55
61
|
export interface IBooksService {
|
|
56
62
|
categories: string[];
|
|
@@ -67,5 +73,6 @@ export interface IBooksService {
|
|
|
67
73
|
updateBook(book: IBook): Promise<boolean>;
|
|
68
74
|
deleteBook(id: number): Promise<boolean>;
|
|
69
75
|
getFullBooks(surName?: string, givenName?: string, title?: string, flags?: string, minRating?: number): Promise<IFullBook[]>;
|
|
76
|
+
getBooksFrom(firstAuthorId: number, firstBookId?: number, count?: number): Promise<IFullBook[]>;
|
|
70
77
|
getBookPlaces(): Promise<IBookPlace[]>;
|
|
71
78
|
}
|
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
const emits = defineEmits<{
|
|
8
8
|
(e: 'selectbook', id: number, func: () => void): void,
|
|
9
9
|
(e: 'deletebook', id: number): void,
|
|
10
|
+
(e: 'showplace', id: number): void,
|
|
10
11
|
(e: 'savebook', book: IBook): void
|
|
11
12
|
}>();
|
|
12
13
|
|
|
@@ -47,6 +48,9 @@
|
|
|
47
48
|
emits("savebook", book);
|
|
48
49
|
showSave.value = false;
|
|
49
50
|
}
|
|
51
|
+
function onShowPlace () {
|
|
52
|
+
emits("showplace", book.id);
|
|
53
|
+
}
|
|
50
54
|
function fieldChanged () {
|
|
51
55
|
showSave.value = true;
|
|
52
56
|
}
|
|
@@ -83,6 +87,7 @@
|
|
|
83
87
|
</v-col>
|
|
84
88
|
<v-col cols="2">
|
|
85
89
|
<v-btn v-if="showSave" icon="$save" :class="classObject" :disabled="props.readonly" @click="onSave"></v-btn>
|
|
90
|
+
<v-btn v-else icon="$gps" :class="classObject" @click="onShowPlace"></v-btn>
|
|
86
91
|
<v-btn v-if="showDelete" icon="$delete" :class="classObject" :disabled="props.readonly" @click="onDelete"></v-btn>
|
|
87
92
|
</v-col>
|
|
88
93
|
</v-row>
|
|
@@ -2,12 +2,19 @@
|
|
|
2
2
|
import { StyleValue } from 'vue';
|
|
3
3
|
import { IPlace } from '@christianriedl/media';
|
|
4
4
|
const props = defineProps<{ place: IPlace, height: number }>();
|
|
5
|
+
const emits = defineEmits<{
|
|
6
|
+
(e: 'select', place: IPlace): void
|
|
7
|
+
}>();
|
|
5
8
|
const place: IPlace = props.place;
|
|
6
9
|
const heightStyle: StyleValue = { height: props.height + "px" };
|
|
10
|
+
|
|
11
|
+
function select () {
|
|
12
|
+
emits('select', place);
|
|
13
|
+
}
|
|
7
14
|
</script>
|
|
8
15
|
|
|
9
16
|
<template>
|
|
10
|
-
<v-row dense :class="[place.color,'place']" :style="heightStyle" >
|
|
17
|
+
<v-row dense :class="[place.color,'place']" :style="heightStyle" @click="select">
|
|
11
18
|
<v-col v-if="place.vorne" cols="12" >
|
|
12
19
|
<p class="vorne">{{place.vorne}}<br>{{place.vorne2}}</p>
|
|
13
20
|
</v-col>
|
package/src/views/BooksPage.vue
CHANGED
|
@@ -213,6 +213,30 @@
|
|
|
213
213
|
alert ('UpdateBook - error');
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
|
+
async function showPlace (bookId: string) {
|
|
217
|
+
const places = await booksService.getBookPlaces();
|
|
218
|
+
const firstLetter = currentAuthor.surName.substring(0,1);
|
|
219
|
+
for (let i = 0; i < places.length; i++) {
|
|
220
|
+
const place = places[i];
|
|
221
|
+
if (place.buchstaben.includes(firstLetter) && place.firstAuthorId && place.firstBookId) {
|
|
222
|
+
const books = await booksService.getBooksFrom (place.firstAuthorId, place.firstBookId, place.buchstaben.length);
|
|
223
|
+
if (books) {
|
|
224
|
+
for (let j = 0; j < books.length; j++) {
|
|
225
|
+
const book = books[i];
|
|
226
|
+
if (book.authorId == currentAuthor.id && book.bookId == bookId) {
|
|
227
|
+
// Found !!
|
|
228
|
+
let text = `GEFUNDEN : ${place.vorzimmer ? "Vorzimmer" : "Wohnzimmer"} ${place.regalVonLinks}. Regal von links, ${place.fachVonOben}. Fach von oben, \n`;
|
|
229
|
+
if (!place.vorzimmer)
|
|
230
|
+
text += `${place.rechts ? "rechts" : "links"} ${place.hinten ? "hinten": "vorne" }, ${j + 1}. Buch von links`;
|
|
231
|
+
alert (text);
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
alert ("NICHT GEFUNDEN !!");
|
|
239
|
+
}
|
|
216
240
|
function checkAuthor (author: IAuthor): boolean {
|
|
217
241
|
if (!author.surName || !author.givenName) {
|
|
218
242
|
alert("Vor oder Nachname fehlt !");
|
|
@@ -451,8 +475,12 @@
|
|
|
451
475
|
<v-btn v-if="showAddBookLine" class="bg-office" @click="cancelAddNewBook" :disabled="readonly" icon="$cancel"></v-btn>
|
|
452
476
|
</v-col>
|
|
453
477
|
</v-row>
|
|
454
|
-
<book-line v-if="showAddBookLine" :book="newBook" :flags="booksService.flags" :add="true" :allbooks="allBooks" :readonly="readonly"
|
|
455
|
-
|
|
478
|
+
<book-line v-if="showAddBookLine" :book="newBook" :flags="booksService.flags" :add="true" :allbooks="allBooks" :readonly="readonly"
|
|
479
|
+
:ismobile="isMobile" @selectbook="selectBook" @deletebook="deleteBook" @savebook="saveBook">
|
|
480
|
+
</book-line>
|
|
481
|
+
<book-line v-for="book in currentAuthor.books" :key="book.id" :book="book" :flags="booksService.flags" :readonly="readonly"
|
|
482
|
+
:selected="selectedBook == book" :ismobile="isMobile" @selectbook="selectBook" @deletebook="deleteBook" @savebook="saveBook" @showplace="showPlace">
|
|
483
|
+
</book-line>
|
|
456
484
|
<v-textarea v-if="showSelectedBook" clearable auto-grow variant="outlined" label="Beschreibung" :disabled="isMobile" class="bg-office pt-2" v-model="selectedBook.description" @update:modelValue="descriptionChanged">
|
|
457
485
|
</v-textarea>
|
|
458
486
|
<v-textarea v-if="showSelectedBook" clearable auto-grow variant="outlined" label="Kommentar" :disabled="isMobile" class="bg-office" v-model="selectedBook.comment" @update:modelValue="descriptionChanged">
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
const glassColor = "bg-blue-grey-lighten-1";
|
|
17
17
|
const placeHeight = ref(120);
|
|
18
18
|
const regale = reactive<Regal[]>(initPlaces());
|
|
19
|
+
const booksVorne = reactive<IFullBook[]>([]);
|
|
20
|
+
const booksHinten = reactive<IFullBook[]>([]);
|
|
21
|
+
const showBooks = ref(false);
|
|
19
22
|
|
|
20
23
|
start();
|
|
21
24
|
|
|
@@ -61,10 +64,14 @@
|
|
|
61
64
|
}
|
|
62
65
|
let fach = regal.faecher[place.fachVonOben - 1];
|
|
63
66
|
if (place.hinten) {
|
|
67
|
+
fach.hintenAuthorId = place.firstAuthorId;
|
|
68
|
+
fach.hintenBookId = place.firstBookId;
|
|
64
69
|
fach.hinten = place.buchstaben;
|
|
65
70
|
fach.hinten2 = place.zweitBuchstaben;
|
|
66
71
|
}
|
|
67
72
|
else {
|
|
73
|
+
fach.vorneAuthorId = place.firstAuthorId;
|
|
74
|
+
fach.vorneBookId = place.firstBookId;
|
|
68
75
|
fach.vorne = place.buchstaben;
|
|
69
76
|
fach.vorne2 = place.zweitBuchstaben;
|
|
70
77
|
}
|
|
@@ -79,6 +86,21 @@
|
|
|
79
86
|
}
|
|
80
87
|
}
|
|
81
88
|
}
|
|
89
|
+
async function select (place: IPlace) {
|
|
90
|
+
booksVorne.splice (0, booksVorne.length);
|
|
91
|
+
booksHinten.splice (0, booksHinten.length);
|
|
92
|
+
if (place.hintenAuthorId && place.hintenBookId) {
|
|
93
|
+
const books = await booksService.getBooksFrom (place.hintenAuthorId, place.hintenBookId, place.hinten.length);
|
|
94
|
+
if (books)
|
|
95
|
+
booksHinten.splice (0, 0, ...books);
|
|
96
|
+
}
|
|
97
|
+
if (place.vorneAuthorId && place.vorneBookId) {
|
|
98
|
+
const books = await booksService.getBooksFrom (place.vorneAuthorId, place.vorneBookId, place.vorne.length);
|
|
99
|
+
if (books)
|
|
100
|
+
booksVorne.splice (0, 0, ...books);
|
|
101
|
+
}
|
|
102
|
+
showBooks.value = true;
|
|
103
|
+
}
|
|
82
104
|
</script>
|
|
83
105
|
|
|
84
106
|
<template>
|
|
@@ -93,14 +115,14 @@
|
|
|
93
115
|
</v-row>
|
|
94
116
|
<v-row dense>
|
|
95
117
|
<v-col v-for="n in 8" cols="1">
|
|
96
|
-
<book-place v-for="m in 6" :place="regale[n-1].faecher[m-1]" :height="placeHeight" ></book-place>
|
|
118
|
+
<book-place v-for="m in 6" :place="regale[n-1].faecher[m-1]" :height="placeHeight" @select="select" ></book-place>
|
|
97
119
|
</v-col>
|
|
98
120
|
<v-col cols="1"></v-col>
|
|
99
121
|
<v-col cols="1">
|
|
100
|
-
<book-place v-for="m in 6" :place="regale[8].faecher[m-1]" :height="placeHeight" ></book-place>
|
|
122
|
+
<book-place v-for="m in 6" :place="regale[8].faecher[m-1]" :height="placeHeight" @select="select"></book-place>
|
|
101
123
|
</v-col>
|
|
102
124
|
<v-col cols="2" class="pl-2">
|
|
103
|
-
<book-place v-for="m in 6" :place="regale[9].faecher[m-1]" :height="placeHeight" ></book-place>
|
|
125
|
+
<book-place v-for="m in 6" :place="regale[9].faecher[m-1]" :height="placeHeight" @select="select"></book-place>
|
|
104
126
|
</v-col>
|
|
105
127
|
</v-row>
|
|
106
128
|
<v-row dense>
|
|
@@ -113,15 +135,34 @@
|
|
|
113
135
|
</v-row>
|
|
114
136
|
<v-row dense>
|
|
115
137
|
<v-col v-for="n in 8" cols="1">
|
|
116
|
-
<book-place v-for="m in 6" :place="regale[n-1].faecher2[m-1]" :height="placeHeight" ></book-place>
|
|
138
|
+
<book-place v-for="m in 6" :place="regale[n-1].faecher2[m-1]" :height="placeHeight" @select="select"></book-place>
|
|
117
139
|
</v-col>
|
|
118
140
|
<v-col cols="1"></v-col>
|
|
119
141
|
<v-col cols="1">
|
|
120
|
-
<book-place v-for="m in 6" :place="regale[8].faecher2[m-1]" :height="placeHeight" ></book-place>
|
|
142
|
+
<book-place v-for="m in 6" :place="regale[8].faecher2[m-1]" :height="placeHeight" @select="select"></book-place>
|
|
121
143
|
</v-col>
|
|
122
144
|
<v-col cols="2" class="pl-2">
|
|
123
|
-
<book-place v-for="m in 6" :place="regale[9].faecher2[m-1]" :height="placeHeight" ></book-place>
|
|
145
|
+
<book-place v-for="m in 6" :place="regale[9].faecher2[m-1]" :height="placeHeight" @select="select"></book-place>
|
|
124
146
|
</v-col>
|
|
125
147
|
</v-row>
|
|
148
|
+
<v-dialog v-model="showBooks" >
|
|
149
|
+
<v-container>
|
|
150
|
+
<h2>Hinten</h2>
|
|
151
|
+
<v-row dense v-for="book in booksHinten" :key="book.bookId">
|
|
152
|
+
<v-col cols="5"><p class="font-weight-bold">{{book.givenName + ' ' + book.surName}}</p></v-col>
|
|
153
|
+
<v-col cols="7"><p>{{book.title}}</p></v-col>
|
|
154
|
+
</v-row>
|
|
155
|
+
<h2>Vorne</h2>
|
|
156
|
+
<v-row dense v-for="book in booksVorne" :key="book.bookId">
|
|
157
|
+
<v-col cols="5"><p class="font-weight-bold">{{book.givenName + ' ' + book.surName}}</p></v-col>
|
|
158
|
+
<v-col cols="7"><p>{{book.title}}</p></v-col>
|
|
159
|
+
</v-row>
|
|
160
|
+
<v-row dense>
|
|
161
|
+
<v-col cols="2">
|
|
162
|
+
<v-btn prepend-icon="$back" @click="showBocks = false">CLOSE</v-btn>
|
|
163
|
+
</v-col>
|
|
164
|
+
</v-row>
|
|
165
|
+
</v-container>
|
|
166
|
+
</v-dialog>
|
|
126
167
|
</v-container>
|
|
127
168
|
</template>
|