@christianriedl/media 1.0.193 → 1.0.194
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.js +1 -1
- package/package.json +1 -1
- package/src/views/BooksPlacePage.vue +33 -1
package/dist/booksService.js
CHANGED
|
@@ -94,7 +94,7 @@ export class BooksService {
|
|
|
94
94
|
this.log.info(`Add book ${id} : ${r.result}`);
|
|
95
95
|
return r.result;
|
|
96
96
|
}
|
|
97
|
-
async distributeBooks(mmPerBook = 27, maxFillPerc =
|
|
97
|
+
async distributeBooks(mmPerBook = 27, maxFillPerc = 84, minRestPerc = 20) {
|
|
98
98
|
const url = `apibooks/books/distribute?mmPerBook=${mmPerBook}&marFillPerc=${maxFillPerc}&minRestPerc=${minRestPerc}`;
|
|
99
99
|
const res = await this.rest.postDataEx(url);
|
|
100
100
|
const status = this.rest.toStringValue(res);
|
package/package.json
CHANGED
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
const regale = reactive<Regal[]>(initPlaces());
|
|
21
21
|
const books = reactive<IFullBook[]>([]);
|
|
22
22
|
const showBooks = ref(false);
|
|
23
|
+
const mmPerBook = ref(27);
|
|
24
|
+
const maxFillPerc = ref(84);
|
|
25
|
+
const minRestPerc = ref(20);
|
|
26
|
+
const showDistribute = ref(false);
|
|
23
27
|
const vohi = ref("");
|
|
24
28
|
|
|
25
29
|
start();
|
|
@@ -107,10 +111,14 @@
|
|
|
107
111
|
showBooks.value = true;
|
|
108
112
|
}
|
|
109
113
|
async function distribute () {
|
|
114
|
+
showDistribute.value = true;
|
|
115
|
+
}
|
|
116
|
+
async function startDistribute() {
|
|
110
117
|
if (!window.confirm(`Willst du wirklich die B�cher neu anordnen ?`))
|
|
111
118
|
return;
|
|
112
|
-
const result = await booksService.distributeBooks();
|
|
119
|
+
const result = await booksService.distributeBooks(mmPerBook.value, maxFillPerc.value, minRestPerc.value);
|
|
113
120
|
alert (result);
|
|
121
|
+
showDistribute.value = false;
|
|
114
122
|
}
|
|
115
123
|
</script>
|
|
116
124
|
|
|
@@ -174,5 +182,29 @@
|
|
|
174
182
|
</v-card-actions>
|
|
175
183
|
</v-card>
|
|
176
184
|
</v-dialog>
|
|
185
|
+
<v-dialog v-model="showDistribute" >
|
|
186
|
+
<v-card v-if="showDistribute" width="800" >
|
|
187
|
+
<v-card-title>Buchverteilung auf die Regale</v-card-title>
|
|
188
|
+
<v-card-text>
|
|
189
|
+
<v-container>
|
|
190
|
+
<v-row dense>
|
|
191
|
+
<v-col cols="4">
|
|
192
|
+
<v-text-field v-model="mmPerBook" label="mm per book" type="number" ></v-text-field>
|
|
193
|
+
</v-col>
|
|
194
|
+
<v-col cols="4">
|
|
195
|
+
<v-text-field v-model="maxFillPerc" label="Max fill in %" type="number" ></v-text-field>
|
|
196
|
+
</v-col>
|
|
197
|
+
<v-col cols="4">
|
|
198
|
+
<v-text-field v-model="minRestPerc" label="Min rest in %" type="number" ></v-text-field>
|
|
199
|
+
</v-col>
|
|
200
|
+
</v-row>
|
|
201
|
+
</v-container>
|
|
202
|
+
</v-card-text>
|
|
203
|
+
<v-card-actions>
|
|
204
|
+
<v-btn prepend-icon="$back" @click="showDistribute = false">CLOSE</v-btn>
|
|
205
|
+
<v-btn prepend-icon="$play" @click="startDistribute">START</v-btn>
|
|
206
|
+
</v-card-actions>
|
|
207
|
+
</v-card>
|
|
208
|
+
</v-dialog>
|
|
177
209
|
</v-container>
|
|
178
210
|
</template>
|