@christianriedl/media 1.0.194 → 1.0.196

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 CHANGED
@@ -41,13 +41,12 @@ export interface IBookPlace {
41
41
  hinten: boolean;
42
42
  breite: number;
43
43
  buchstaben: string;
44
- buchstaben2: string;
45
44
  zweitBuchstaben: string;
46
- zweitBuchstaben2: string;
47
45
  firstAuthorId: number;
48
46
  firstBookId: number;
49
47
  }
50
48
  export interface IPlace {
49
+ placeName: string;
51
50
  vorne: string;
52
51
  vorne2: string;
53
52
  hinten: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@christianriedl/media",
3
- "version": "1.0.194",
3
+ "version": "1.0.196",
4
4
  "description": "RIC media interfaces",
5
5
 
6
6
  "main": "dist/index.js",
@@ -11,7 +11,6 @@
11
11
 
12
12
  interface Regal {
13
13
  faecher: IPlace[];
14
- faecher2: IPlace[];
15
14
  }
16
15
  const regalColor = "bg-brown-lighten-3";
17
16
  const doorColor = "bg-brown-darken-1";
@@ -24,35 +23,29 @@
24
23
  const maxFillPerc = ref(84);
25
24
  const minRestPerc = ref(20);
26
25
  const showDistribute = ref(false);
27
- const vohi = ref("");
26
+ const placeName = ref("");
28
27
 
29
28
  start();
30
29
 
31
30
  function initPlaces (): Regal[] {
32
31
  const initRegale: Regal[] = [];
33
32
  for (let i = 0; i < 10; i++) {
34
- let regal: Regal = { faecher: [], faecher2: [] };
33
+ let regal: Regal = { faecher: [] };
35
34
  for (let j = 0; j < 6; j++) {
36
- const fach: IPlace = { vorne: "", hinten: "", vorne2: "", hinten2: "", color: regalColor,
35
+ const fach: IPlace = { placeName: "", vorne: "", hinten: "", vorne2: "", hinten2: "", color: regalColor,
37
36
  hintenAuthorId: 0, hintenBookId: 0, vorneAuthorId: 0, vorneBookId: 0 };
38
37
  if (i < 8) {
39
38
  // Wohnzimmer
39
+ fach.placeName = `Wohnzimmer Regal ${Math.floor(i / 2 + 1)}, Fach ${j + 1} ${i % 2 ? "rechts" : "links"} `;
40
40
  if ((i < 2 || i > 5) && j > 2)
41
41
  fach.color = doorColor;
42
42
  if (i >= 2 && i <= 5 && j <= 2)
43
43
  fach.color = glassColor;
44
44
  }
45
- regal.faecher.push(fach);
46
- const fach2: IPlace = { vorne: "", hinten: "", vorne2: "", hinten2: "", color: regalColor,
47
- hintenAuthorId: 0, hintenBookId: 0, vorneAuthorId: 0, vorneBookId: 0 };
48
- if (i < 8) {
49
- // Wohnzimmer
50
- if ((i < 2 || i > 5) && j > 2)
51
- fach2.color = doorColor;
52
- if (i >= 2 && i <= 5 && j <= 2)
53
- fach2.color = glassColor;
45
+ else {
46
+ fach.placeName = `Vorzimmer Regal ${i - 8 + 1}, Fach ${j + 1} `;
54
47
  }
55
- regal.faecher2.push(fach2);
48
+ regal.faecher.push(fach);
56
49
  }
57
50
  initRegale.push(regal);
58
51
  }
@@ -83,27 +76,22 @@
83
76
  fach.vorne = place.buchstaben;
84
77
  fach.vorne2 = place.zweitBuchstaben;
85
78
  }
86
- fach = regal.faecher2[place.fachVonOben - 1];
87
- if (place.hinten) {
88
- fach.hinten = place.buchstaben2;
89
- fach.hinten2 = place.zweitBuchstaben2;
90
- }
91
- else {
92
- fach.vorne = place.buchstaben2;
93
- fach.vorne2 = place.zweitBuchstaben2;
94
- }
95
79
  }
96
80
  }
97
81
  async function select (place: IPlace, hinten: boolean) {
98
82
  books.splice (0, books.length);
99
83
  if (hinten && place.hintenAuthorId && place.hintenBookId) {
100
- vohi.value = "hinten";
84
+ placeName.value = place.placeName;
85
+ if (place.placeName.startsWith ("Wohn"))
86
+ placeName.value += hinten ? "hinten" : "vorne";
101
87
  const b = await booksService.getBooksFrom (place.hintenAuthorId, place.hintenBookId, place.hinten.length);
102
88
  if (b)
103
89
  books.splice (0, 0, ...b);
104
90
  }
105
91
  if (!hinten && place.vorneAuthorId && place.vorneBookId) {
106
- vohi.value = "vorne";
92
+ placeName.value = place.placeName;
93
+ if (place.placeName.startsWith ("Wohn"))
94
+ placeName.value += hinten ? "hinten" : "vorne";
107
95
  const b = await booksService.getBooksFrom (place.vorneAuthorId, place.vorneBookId, place.vorne.length);
108
96
  if (b)
109
97
  books.splice (0, 0, ...b);
@@ -126,7 +114,7 @@
126
114
  <v-container fluid class="bg-office" >
127
115
  <v-row dense>
128
116
  <v-col cols="9">
129
- <h2>SOLL - WOHNZIMMER</h2>
117
+ <h2>WOHNZIMMER</h2>
130
118
  </v-col>
131
119
  <v-col cols="3">
132
120
  <h2>VORZIMMER</h2>
@@ -146,29 +134,9 @@
146
134
  <book-place v-for="m in 6" :place="regale[9].faecher[m-1]" :height="placeHeight" @select="select"></book-place>
147
135
  </v-col>
148
136
  </v-row>
149
- <v-row dense>
150
- <v-col cols="9">
151
- <h2>IST - WOHNZIMMER</h2>
152
- </v-col>
153
- <v-col cols="3">
154
- <h2>VORZIMMER</h2>
155
- </v-col>
156
- </v-row>
157
- <v-row dense>
158
- <v-col v-for="n in 8" cols="1">
159
- <book-place v-for="m in 6" :place="regale[n-1].faecher2[m-1]" :height="placeHeight" @select="select"></book-place>
160
- </v-col>
161
- <v-col cols="1"></v-col>
162
- <v-col cols="1">
163
- <book-place v-for="m in 6" :place="regale[8].faecher2[m-1]" :height="placeHeight" @select="select"></book-place>
164
- </v-col>
165
- <v-col cols="2" class="pl-2">
166
- <book-place v-for="m in 6" :place="regale[9].faecher2[m-1]" :height="placeHeight" @select="select"></book-place>
167
- </v-col>
168
- </v-row>
169
137
  <v-dialog v-model="showBooks" >
170
138
  <v-card v-if="showBooks" width="800" >
171
- <v-card-title>{{"Im Fach " + vohi}}</v-card-title>
139
+ <v-card-title>{{placeName}}</v-card-title>
172
140
  <v-card-text>
173
141
  <v-container>
174
142
  <v-row dense v-for="book in books" :key="book.bookId">