@christianriedl/media 1.0.187 → 1.0.188
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/iBooks.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/BookPlace.vue +12 -7
- package/src/views/BooksPlacePage.vue +41 -28
package/dist/iBooks.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import { StyleValue } from 'vue';
|
|
2
3
|
import { IPlace } from '@christianriedl/media';
|
|
3
4
|
const props = defineProps<{ place: IPlace, height: number }>();
|
|
4
5
|
const place: IPlace = props.place;
|
|
5
|
-
const heightStyle: StyleValue = { height: height + "px" }
|
|
6
|
+
const heightStyle: StyleValue = { height: props.height + "px" };
|
|
6
7
|
</script>
|
|
7
8
|
|
|
8
9
|
<template>
|
|
9
|
-
<v-row dense :class="[place.color,
|
|
10
|
+
<v-row dense :class="[place.color,'place']" :style="heightStyle" >
|
|
10
11
|
<v-col cols="12" >
|
|
11
|
-
<p v-if="place.vorne" class="vorne">
|
|
12
|
+
<p v-if="place.vorne" class="vorne">{{"V: " + place.vorne}}</p>
|
|
12
13
|
</v-col>
|
|
13
14
|
<v-col cols="12" >
|
|
14
|
-
<p v-if="place.hinten" class="hinten">
|
|
15
|
+
<p v-if="place.hinten" class="hinten">{{"H: " + place.hinten}}</p>
|
|
15
16
|
</v-col>
|
|
16
17
|
</v-row>
|
|
17
18
|
<v-divider></v-divider>
|
|
@@ -19,12 +20,16 @@
|
|
|
19
20
|
|
|
20
21
|
<style scoped>
|
|
21
22
|
.place {
|
|
22
|
-
border-style: solid
|
|
23
|
+
border-style: solid;
|
|
24
|
+
border-color: black;
|
|
25
|
+
border-width: medium;
|
|
23
26
|
}
|
|
24
27
|
.vorne {
|
|
25
|
-
|
|
28
|
+
font-size: small;
|
|
29
|
+
background-color: white;
|
|
26
30
|
}
|
|
27
31
|
.hinten {
|
|
28
|
-
|
|
32
|
+
font-size: small;
|
|
33
|
+
background-color: lightgrey;
|
|
29
34
|
}
|
|
30
35
|
</style>
|
|
@@ -11,17 +11,18 @@
|
|
|
11
11
|
faecher: IPlace[];
|
|
12
12
|
faecher2: IPlace[];
|
|
13
13
|
}
|
|
14
|
-
const regale: Regal[] = []:
|
|
15
14
|
const regalColor = "bg-brown-lighten-3";
|
|
16
15
|
const doorColor = "bg-brown-darken-1";
|
|
17
16
|
const glassColor = "bg-blue-grey-lighten-1";
|
|
18
|
-
const placeHeight = ref(
|
|
17
|
+
const placeHeight = ref(80);
|
|
18
|
+
const regale = reactive<Regal[]>(initPlaces());
|
|
19
19
|
|
|
20
20
|
start();
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
function initPlaces (): Regal[] {
|
|
23
|
+
const initRegale: Regal[] = [];
|
|
23
24
|
for (let i = 0; i < 10; i++) {
|
|
24
|
-
|
|
25
|
+
let regal: Regal = { faecher: [], faecher2: [] };
|
|
25
26
|
for (let j = 0; j < 6; j++) {
|
|
26
27
|
const fach: IPlace = { vorne: "", hinten: "", color: regalColor };
|
|
27
28
|
if (i < 8) {
|
|
@@ -42,71 +43,83 @@
|
|
|
42
43
|
}
|
|
43
44
|
regal.faecher2.push(fach2);
|
|
44
45
|
}
|
|
45
|
-
|
|
46
|
+
initRegale.push(regal);
|
|
46
47
|
}
|
|
48
|
+
return initRegale;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
async function start() {
|
|
47
52
|
const places = await booksService.getBookPlaces();
|
|
48
53
|
for (let i = 0; i < places.length; i++) {
|
|
49
54
|
const place = places[i];
|
|
50
55
|
let regal: Regal;
|
|
51
|
-
if (place.
|
|
56
|
+
if (place.vorzimmer) {
|
|
52
57
|
regal = regale[8 + place.regalVonLinks - 1];
|
|
53
58
|
}
|
|
54
59
|
else {
|
|
55
|
-
regal = regale [(place.regalVonLinks - 1) * 2 + place.rechts ? 1 : 0];
|
|
60
|
+
regal = regale [(place.regalVonLinks - 1) * 2 + (place.rechts ? 1 : 0)];
|
|
56
61
|
}
|
|
57
|
-
|
|
58
|
-
if (place.hinten)
|
|
62
|
+
let fach = regal.faecher[place.fachVonOben - 1];
|
|
63
|
+
if (place.hinten) {
|
|
59
64
|
fach.hinten = place.buchstaben;
|
|
60
|
-
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
61
67
|
fach.vorne = place.buchstaben;
|
|
62
|
-
|
|
63
|
-
|
|
68
|
+
}
|
|
69
|
+
fach = regal.faecher2[place.fachVonOben - 1];
|
|
70
|
+
if (place.hinten) {
|
|
64
71
|
fach.hinten = place.buchstaben2;
|
|
65
|
-
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
66
74
|
fach.vorne = place.buchstaben2;
|
|
75
|
+
}
|
|
67
76
|
}
|
|
68
77
|
}
|
|
69
78
|
</script>
|
|
70
79
|
|
|
71
80
|
<template>
|
|
72
81
|
<v-container fluid class="bg-office" >
|
|
73
|
-
<
|
|
82
|
+
<h1>SOLL</h1>
|
|
74
83
|
<v-row dense>
|
|
75
84
|
<v-col cols="9">
|
|
76
|
-
|
|
85
|
+
<h2>WOHNZIMMER</h2>
|
|
77
86
|
</v-col>
|
|
78
87
|
<v-col cols="3">
|
|
79
|
-
|
|
80
|
-
|
|
88
|
+
<h2>VORZIMMER</h2>
|
|
89
|
+
</v-col>
|
|
81
90
|
</v-row>
|
|
82
91
|
<v-row dense>
|
|
83
92
|
<v-col v-for="n in 8" cols="1">
|
|
84
93
|
<book-place v-for="m in 6" :place="regale[n-1].faecher[m-1]" :height="placeHeight" ></book-place>
|
|
85
94
|
</v-col>
|
|
95
|
+
<v-col cols="1"></v-col>
|
|
86
96
|
<v-col cols="1">
|
|
97
|
+
<book-place v-for="m in 6" :place="regale[8].faecher[m-1]" :height="placeHeight" ></book-place>
|
|
98
|
+
</v-col>
|
|
99
|
+
<v-col cols="2" class="pl-2">
|
|
100
|
+
<book-place v-for="m in 6" :place="regale[9].faecher[m-1]" :height="placeHeight" ></book-place>
|
|
87
101
|
</v-col>
|
|
88
|
-
<v-col v-for="n in 2" cols="1">
|
|
89
|
-
<book-place v-for="m in 6" :place="regale[n-1 + 8].faecher[m-1]" :height="placeHeight" ></book-place>
|
|
90
|
-
<v-col>
|
|
91
102
|
</v-row>
|
|
92
|
-
<
|
|
103
|
+
<h1>IST</h1>
|
|
93
104
|
<v-row dense>
|
|
94
105
|
<v-col cols="9">
|
|
95
|
-
|
|
106
|
+
<h2>WOHNZIMMER</h2>
|
|
96
107
|
</v-col>
|
|
97
108
|
<v-col cols="3">
|
|
98
|
-
|
|
99
|
-
|
|
109
|
+
<h2>VORZIMMER</h2>
|
|
110
|
+
</v-col>
|
|
100
111
|
</v-row>
|
|
101
112
|
<v-row dense>
|
|
102
113
|
<v-col v-for="n in 8" cols="1">
|
|
103
|
-
<book-place v-for="m in 6" :place="regale[n-1].
|
|
114
|
+
<book-place v-for="m in 6" :place="regale[n-1].faecher2[m-1]" :height="placeHeight" ></book-place>
|
|
104
115
|
</v-col>
|
|
116
|
+
<v-col cols="1"></v-col>
|
|
105
117
|
<v-col cols="1">
|
|
118
|
+
<book-place v-for="m in 6" :place="regale[8].faecher2[m-1]" :height="placeHeight" ></book-place>
|
|
119
|
+
</v-col>
|
|
120
|
+
<v-col cols="2" class="pl-2">
|
|
121
|
+
<book-place v-for="m in 6" :place="regale[9].faecher2[m-1]" :height="placeHeight" ></book-place>
|
|
106
122
|
</v-col>
|
|
107
|
-
<v-col v-for="n in 2" cols="1">
|
|
108
|
-
<book-place v-for="m in 6" :place="regale[n-1 + 8].faecher2[m-1]" :height="placeHeight" ></book-place>
|
|
109
|
-
<v-col>
|
|
110
123
|
</v-row>
|
|
111
124
|
</v-container>
|
|
112
125
|
</template>
|