update Seiten für alle ausprägungen angepasst

This commit is contained in:
Thomas Mack 2022-04-23 15:31:49 +02:00
parent ebc08ce2d6
commit d76ed1882d
37 changed files with 1457 additions and 258 deletions

View File

@ -102,9 +102,10 @@ export default class App extends Vue {}
grid-area: seite
}
.billi-read-detail section {
.billi-read-detail > section {
border-left: 1px solid grey;
z-index: 0;
padding-left: 1rem;
grid-area: haupt
}

View File

@ -19,7 +19,7 @@
<section>
<button @click="toggleEdit">Bearbeiten</button>
<InventoryItemHead :item="item"></InventoryItemHead>
<CameraTechnicalDetail :item="item"></CameraTechnicalDetail>
<CameraTechnicalDetail :globalEdit="globalEdit" :item="item"></CameraTechnicalDetail>
<InventoryItemCollectionInfo :globalEdit="globalEdit" :item="item"></InventoryItemCollectionInfo>
<InventoryItemDescription :globalEdit="globalEdit" :item="item" @changedDescription="handleChangeEvent"></InventoryItemDescription>
</section>

View File

@ -16,10 +16,12 @@
<img src="https://dummyimage.com/600x400/#b2b1b1/fff" class="card-img" />
</aside>
<section>
<InventoryItemHead :item="item"></InventoryItemHead>
<LensTechnicalDetail :item="item"></LensTechnicalDetail>
<InventoryItemCollectionInfo :item="item"></InventoryItemCollectionInfo>
<InventoryItemDescription :item="item"></InventoryItemDescription>
<button @click="toggleEdit">Bearbeiten</button>
<InventoryItemHead :globalEdit="globalEdit" :item="item"></InventoryItemHead>
<LensTechnicalDetail :globalEdit="globalEdit" :item="item"></LensTechnicalDetail>
<InventoryItemCollectionInfo :globalEdit="globalEdit" :item="item"></InventoryItemCollectionInfo>
<InventoryItemDescription :globalEdit="globalEdit" :item="item"></InventoryItemDescription>
</section>
</article>
</transition>
@ -48,6 +50,12 @@ export default {
type:Lens,
required: true
}
},
data() {
return {
globalEdit: false,
}
},
computed: {
...mapGetters(["activeItem", "brand", "manufacturer", "mount", "getIconName"]),
@ -60,6 +68,17 @@ export default {
methods: {
editCamera() {
this.$store.dispatch("setCameraEditState", {cameraId:this.activeCamera.id, edit:true})
},
toggleEdit() {
this.globalEdit = !this.globalEdit;
if (this.globalEdit) {
this.newCamera = this.item;
}
},
handleChangeEvent(value) {
console.log("handleChangedDescription" , value)
this.newCamera[value.field] = value.value.trim();
console.log("newCamera", this.newCamera);
}
}
}

View File

@ -1,85 +1,187 @@
<template>
<section class="billi-box">
<div class="billi-box-header billi-bg-50">Technische Details</div>
<div class="billi-box-icon billi-bg-50">
<font-awesome-icon @click="toggleEdit" :icon="getIconName" color="#fff" />
</div>
<div class="card billi-bg-transparent">
<div class="card-header billi-bg-50"> Technische Details</div>
<div v-if="true" class="card-body billi-bg-transparent">
<div v-if="item.brand_key" class="row">
<div class="col-6">
<div v-if="isEdit" class="billi-box-content billi-bg-transparent">
<div class="billi-row-50-50">
<div class="billi-label">
Marke
</div>
<div class="col-6">
<div class="billi-value">
<select v-model="newItem.brand_key">
<option v-for="brand in brands" :key="brand.schluessel" :value="brand.schluessel">
{{ brand.name }}
</option>
</select>
</div>
</div>
<div class="billi-row-50-50">
<div class="billi-label">
Hersteller
</div>
<div class="billi-value">
<select v-model="newItem.manufacturer_key">
<option v-for="item in manufacturers" :key="item.schluessel" :value="item.schluessel">
{{ item.name }}
</option>
</select>
</div>
</div>
<div class="billi-row-50-50">
<div class="billi-label">
Bauform
</div>
<div class="billi-value">
<select v-model="newItem.buildtype_key">
<option v-for="item in buildtypes" :key="item.schluessel" :value="item.schluessel">
{{ item.name }}
</option>
</select>
</div>
</div>
<div class="billi-row-50-50">
<div class="billi-label">
Anschluss
</div>
<div class="billi-value">
<select v-model="newItem.mount_key">
<option v-for="item in mounts" :key="item.schluessel" :value="item.schluessel">
{{ item.name }}
</option>
</select>
</div>
</div>
<div class="billi-row-50-50">
<div class="billi-label">
Medium
</div>
<div class="billi-value">
<select v-model="newItem.media_key">
<option v-for="item in medias" :key="item.schluessel" :value="item.schluessel">
{{ item.name }}
</option>
</select> </div>
</div>
<div class="billi-row-50-50">
<div class="billi-label">
Belichtungsmessung
</div>
<div class="billi-value">
<input name="light_measure_method" id="light_measure_method" v-model="newItem.light_measure_method" type="text"/>
</div>
</div>
<div class="billi-row-50-50">
<div class="billi-label">
Baujahr
</div>
<div class="billi-value">
<input name="year_of_producation" id="year_of_production" v-model="newItem.year_of_production" type="number"/>
</div>
</div>
<div class="billi-row-50-50">
<div class="billi-label">
Produktion von
</div>
<div class="billi-value">
<input name="year_manufactured_from" id="year_manufactured_from" v-model="newItem.year_manufactured_from" type="number"/>
</div>
</div>
<div class="billi-row-50-50">
<div class="billi-label">
Produktion bis
</div>
<div class="billi-value">
<input name="year_manufactured_to" id="year_manufactured_to" v-model="newItem.year_manufactured_to" type="number"/>
</div>
</div>
</div>
<div v-else class="billi-box-content billi-bg-transparent">
<div v-if="item.brand_key" class="billi-row-50-50">
<div class="billi-label">
Marke
</div>
<div class="billi-value">
{{ brand(item.brand_key).name }}
</div>
</div>
<div v-if="item.manufacturer_key" class="row">
<div class="col-6">
<div v-if="item.manufacturer_key" class="billi-row-50-50">
<div class="billi-label">
Hersteller
</div>
<div class="col-6">
<div class="billi-value">
{{ manufacturer(item.manufacturer_key).name }}
</div>
</div>
<div v-if="item.buildtype_key" class="row">
<div class="col-6">
<div v-if="item.buildtype_key" class="billi-row-50-50">
<div class="billi-label">
Bauform
</div>
<div class="col-6">
<div class="billi-value">
{{ buildtype(item.buildtype_key).name }}
</div>
</div>
<div v-if="item.mount_key" class="row">
<div class="col-6">
<div v-if="item.mount_key" class="billi-row-50-50">
<div class="billi-label">
Anschluss
</div>
<div class="col-6">
<div class="billi-value">
{{ mount(item.mount_key).name }}
</div>
</div>
<div v-if="item.media_key" class="row">
<div class="col-6">
<div v-if="item.media_key" class="billi-row-50-50">
<div class="billi-label">
Medium
</div>
<div class="col-6">
<div class="billi-value">
{{ media(item.media_key).name }}
</div>
</div>
<div v-if="true" class="row">
<div class="col-6">
<div v-if="true" class="billi-row-50-50">
<div class="billi-label">
Belichtungsmessung
</div>
<div class="col-6">
<div class="billi-value">
{{ item.light_measure_method }}
</div>
</div>
<div v-if="true" class="row">
<div class="col-6">
<div v-if="true" class="billi-row-50-50">
<div class="billi-label">
Baujahr
</div>
<div class="col-6">
<div class="billi-value">
{{ item.year_of_production }}
</div>
</div>
<div v-if="item.year_manufactured_from || item.year_manufactured_to " class="row">
<div class="col-6">
<div v-if="item.year_manufactured_from || item.year_manufactured_to " class="billi-row-50-50">
<div class="billi-label">
Produktionszeitraum
</div>
<div class="col-6">
<div class="billi-value">
{{ item.year_manufactured_from }} - {{item.year_manufactured_to}}
</div>
</div>
</div>
</div>
</section>
</template>
<script>
@ -92,10 +194,55 @@ export default {
item: {
type:Camera,
required: true
},
globalEdit: {
type: Boolean,
required: false,
default: false
}
},
data() {
return {
edit: false,
newItem: {
brand_key: this.item.brand_key,
manufacturer_key: this.item.manufacturer_key,
mount_key: this.item.mount_key,
buildtype_key: this.item.buildtype_key,
media_key: this.item.media_key,
year_of_production: this.item.year_of_production,
year_manufactured_from: this.item.year_manufactured_from,
year_manufactured_to: this.item.year_manufactured_to,
light_measure_method: this.item.light_measure_method
}
}
},
computed: {
...mapGetters(["activeItem", "brand", "manufacturer", "mount", "buildtype", "media"]),
...mapGetters(["activeItem",
"brands", "brand",
"manufacturers", "manufacturer",
"mounts", "mount",
"buildtypes", "buildtype",
"medias", "media"]),
getIconName() {
if (!this.edit) return "pen"
else return "floppy-disk"
},
isEdit() {
return this.edit || this.globalEdit;
},
},
methods: {
toggleEdit() {
this.edit = !this.edit;
if (!this.edit) {
this.$store.dispatch("storeInventoryCameraDetails", {
key: this.item.key,
item: this.newItem
})
}
},
}
}
</script>

View File

@ -76,12 +76,21 @@
<input name="year_of_purchase" id="year_of_purchase" v-model="newItem.year_of_purchase" type="number"/>
</div>
</div>
<div v-if="item.condition_key" class="billi-row-50-50">
<div class="billi-row-50-50">
<div class="billi-label">
Zustand
</div>
<div class="billi-value">
{{ condition(item.condition_key).name }}
<select v-model="newItem.condition_key">
<option v-for="con in conditions" :key="con.schluessel" :value="con.schluessel">
{{ con.name }}
</option>
</select>
<!-- <FilteringSelect v-model="newItem.condition_key" :modelValue="this.newItem.condition_key" :modelList="this.conditions"></FilteringSelect>-->
<!--{{ condition(item.condition_key).name }}-->
</div>
</div>
<div class="billi-row-50-50">
@ -119,9 +128,11 @@
<script>
import InventoryItem from "@/store/classes/InventoryItem";
import {mapGetters} from "vuex";
//import FilteringSelect from "@/components/input/FilteringSelect";
export default {
name: "InventoryItemCollectionInfo",
//components: {FilteringSelect},
props: {
item: {
type: InventoryItem,
@ -136,6 +147,7 @@ export default {
},
data() {
return {
edit: false,
newItem: {
year_of_purchase: this.item.year_of_purchase,
price_current: this.item.price_current,
@ -147,7 +159,7 @@ export default {
},
computed: {
...mapGetters(["condition", "set"]),
...mapGetters(["condition", "conditions", "set"]),
getIconName() {
if (!this.edit) return "pen"
else return "floppy-disk"
@ -156,6 +168,17 @@ export default {
return this.edit || this.globalEdit;
},
},
methods: {
toggleEdit() {
this.edit = !this.edit;
if (!this.edit) {
this.$store.dispatch("storeInventoryCollectionInfo", {
key: this.item.key,
item: this.newItem
})
}
},
}
}
</script>

View File

@ -1,73 +1,176 @@
<template>
<section class="billi-box">
<div class="billi-box-header billi-bg-50">Technische Details</div>
<div class="billi-box-icon billi-bg-50">
<font-awesome-icon @click="toggleEdit" :icon="getIconName" color="#fff" />
</div>
<div class="card billi-bg-transparent">
<div class="card-header billi-bg-50"> Technische Details</div>
<div class="card-body billi-bg-transparent">
<div v-if="item.brand_key" class="row">
<div class="col-6">
<div v-if="isEdit" class="billi-box-content billi-bg-transparent">
<div class="billi-row-50-50">
<div class="billi-label">
Marke
</div>
<div class="col-6">
<div class="billi-value">
<select v-model="newItem.brand_key">
<option v-for="brand in brands" :key="brand.schluessel" :value="brand.schluessel">
{{ brand.name }}
</option>
</select>
</div>
</div>
<div class="billi-row-50-50">
<div class="billi-label">
Hersteller
</div>
<div class="billi-value">
<select v-model="newItem.manufacturer_key">
<option v-for="item in manufacturers" :key="item.schluessel" :value="item.schluessel">
{{ item.name }}
</option>
</select>
</div>
</div>
<div v-if="true" class="billi-row-50-50">
<div class="billi-label">
Lichtstärke
</div>
<div class="billi-value">
<input name="aperture_max" id="aperture_max" v-model="newItem.aperture_max" type="number"/>
</div>
</div>
<div v-if="true" class="billi-row-50-50">
<div class="billi-label">
Brennweite
</div>
<div class="billi-value">
<input name="focal_length_min" id="focal_length_min" v-model="newItem.focal_length_min" type="number"/>
-
<input name="focal_length_max" id="focal_length_max" v-model="newItem.focal_length_max" type="number"/>
</div>
</div>
<div v-if="true" class="billi-row-50-50">
<div class="billi-label">
Autofocus
</div>
<div class="billi-value">
<input name="autofocus" id="autofocus" v-model="newItem.autofocus" type="checkbox"/>
</div>
</div>
<div class="billi-row-50-50">
<div class="billi-label">
Anschluss
</div>
<div class="billi-value">
<select v-model="newItem.mount_key">
<option v-for="item in mounts" :key="item.schluessel" :value="item.schluessel">
{{ item.name }}
</option>
</select>
</div>
</div>
<div class="billi-row-50-50">
<div class="billi-label">
Filtergewinde
</div>
<div class="billi-value">
<select v-model="newItem.filtermount_key">
<option v-for="item in mounts" :key="item.schluessel" :value="item.schluessel">
{{ item.name }}
</option>
</select>
</div>
</div>
<div class="billi-row-50-50">
<div class="billi-label">
Baujahr
</div>
<div class="billi-value">
<input name="year_of_producation" id="year_of_production" v-model="newItem.year_of_production" type="number"/>
</div>
</div>
</div>
<div v-else class="billi-box-content billi-bg-transparent">
<div v-if="item.brand_key" class="billi-row-50-50">
<div class="billi-label">
Marke
</div>
<div class="billi-value">
{{ brand(item.brand_key).name }}
</div>
</div>
<div v-if="item.manufacturer_key" class="row">
<div class="col-6">
<div v-if="item.manufacturer_key" class="billi-row-50-50">
<div class="billi-label">
Hersteller
</div>
<div class="col-6">
<div class="billi-value">
{{ manufacturer(item.manufacturer_key).name }}
</div>
</div>
<div v-if="true" class="row">
<div class="col-6">
<div v-if="true" class="billi-row-50-50">
<div class="billi-label">
Lichtstärke
</div>
<div class="col-6">
<div class="billi-value">
{{ item.aperture_max }}
</div>
</div>
<div v-if="true" class="row">
<div class="col-6">
<div v-if="true" class="billi-row-50-50">
<div class="billi-label">
Brennweite
</div>
<div class="col-3">
{{ item.focal_length_min }}
</div>
<div class="col-3">
{{ item.focal_length_max }}
<div class="billi-value">
{{ item.focal_length_min }} - {{ item.focal_length_max }}
</div>
</div>
<div v-if="true" class="row">
<div class="col-6">
<div v-if="true" class="billi-row-50-50">
<div class="billi-label">
Autofocus
</div>
<div class="col-6">
<div class="billi-value">
{{ item.autofocus }}
</div>
</div>
<div v-if="item.mount_key" class="row">
<div class="col-6">
<div v-if="item.mount_key" class="billi-row-50-50">
<div class="billi-label">
Anschluss
</div>
<div class="col-6">
<div class="billi-value">
{{ mount(item.mount_key).name }}
</div>
</div>
<div v-if="true" class="row">
<div class="col-6">
<div v-if="item.filtermount_key" class="billi-row-50-50">
<div class="billi-label">
Filtergewinde
</div>
<div class="billi-value">
{{ mount(item.filtermount_key).name }}
</div>
</div>
<div v-if="true" class="billi-row-50-50">
<div class="billi-label">
Baujahr
</div>
<div class="col-6">
<div class="billi-value">
{{ item.year_of_production }}
</div>
</div>
</div>
</div>
</section>
</template>
@ -81,10 +184,55 @@ export default {
item: {
type:Lens,
required: true
},
globalEdit: {
type: Boolean,
required: false,
default: false
}
},
data() {
return {
edit: false,
newItem: {
brand_key: this.item.brand_key,
manufacturer_key: this.item.manufacturer_key,
autofocus: this.item.autofocus,
mount_key: this.item.mount_key,
filtermount_key: this.item.filtermount_key,
aperture_max: this.item.aperture_max,
focal_length_min: this.item.focal_length_min,
focal_length_max: this.item.focal_length_max,
year_of_production: this.item.year_of_production,
}
}
},
computed: {
...mapGetters(["activeItem", "brand", "manufacturer", "mount"]),
...mapGetters(["activeItem",
"brands", "brand",
"manufacturers", "manufacturer",
"filtermounts", "filtermount",
"mounts", "mount",
]),
getIconName() {
if (!this.edit) return "pen"
else return "floppy-disk"
},
isEdit() {
return this.edit || this.globalEdit;
},
},
methods: {
toggleEdit() {
this.edit = !this.edit;
if (!this.edit) {
this.$store.dispatch("storeInventoryLensDetail", {
key: this.item.key,
item: this.newItem
})
}
},
}
}
</script>

View File

@ -0,0 +1,40 @@
<template>
<select v-model="value">
<option v-for="item in modelList" :key="item.schluessel" :value="item.schluessel">
{{ item.name }}
</option>
</select>
</template>
<script>
export default {
name: "FilteringSelect",
props: {
modelValue: {
type: String,
required: true
},
modelList: {
type: Array,
required: true
}
},
emits: ['update:modelValue'],
computed: {
value: {
get() {
return this.modelValue
},
set(value) {
this.$emit('update:modelValue', value)
}
}
}
}
</script>
<style scoped>
</style>

View File

@ -5,7 +5,7 @@ export default class BilliDB {
this.DB_NAME = dbName;
this.DB_VERSION = dbVersion;
}
async getDb() {
async initDb(stores) {
return new Promise((resolve, reject) => {
const request = window.indexedDB.open(this.DB_NAME, this.DB_VERSION);
request.onerror = e => {
@ -21,14 +21,23 @@ export default class BilliDB {
console.log("onupgradeneeded");
// @ts-ignore
const db = e.target.result;
db.createObjectStore("inventory", { autoIncrement: false, keyPath: 'id' });
db.createObjectStore("sets", { autoIncrement: false, keyPath: 'id' });
db.createObjectStore("conditions", { autoIncrement: false, keyPath: 'key' });
db.createObjectStore("buildtypes", { autoIncrement: false, keyPath: 'key' });
db.createObjectStore("mounts", { autoIncrement: false, keyPath: 'key' });
db.createObjectStore("brands", { autoIncrement: false, keyPath: 'key' });
db.createObjectStore("manufacturers", { autoIncrement: false, keyPath: 'key' });
db.createObjectStore("medias", { autoIncrement: false, keyPath: 'key' });
stores.forEach((store) => {
db.createObjectStore(store.id, { autoIncrement: false, keyPath: store.identifier });
});
};
});
}
async getDb() {
return new Promise((resolve, reject) => {
const request = window.indexedDB.open(this.DB_NAME, this.DB_VERSION);
request.onerror = e => {
console.log("Error opening db", e);
reject("Error");
};
request.onsuccess = e => {
console.log("connect erfolgreich");
// @ts-ignore
resolve(e.target.result);
};
});
}
@ -46,7 +55,8 @@ export default class BilliDB {
reject(e);
};
const store = trans.objectStore(storeId);
store.add(item);
console.log("ITEM.STRING", JSON.stringify(item.getDBVersion()));
store.put(item.getDBVersion());
store.onerror = (e) => {
console.log("Error on Store", e);
};
@ -87,14 +97,13 @@ export default class BilliDB {
});
}
async getItems(storeId) {
console.log("DB-getItems", storeId);
const db = await this.getDb();
return new Promise((resolve, reject) => {
console.log("DB-getItems: Starting Get Transaction");
const items = [];
// @ts-ignore
const trans = db.transaction([storeId], 'readonly');
trans.oncomplete = (e) => {
trans.oncomplete = (_) => {
console.log(`${storeId}: oncomplete`, items.length);
resolve(items);
};
trans.onerror = (e) => {
@ -102,16 +111,12 @@ export default class BilliDB {
reject(e);
};
const store = trans.objectStore(storeId);
console.log("--> We have try to get a cursor");
store.openCursor().onsuccess = (e) => {
console.log("--> We have a cursor", e.target.result);
const cursor = e.target.result;
if (cursor) {
items.push(cursor.value);
cursor.continue();
}
console.log("onsuccess on getAll", items);
// resolve(e.target.result);
};
store.onerror = (e) => {
console.log("Error on getAll", e);

File diff suppressed because one or more lines are too long

View File

@ -3,9 +3,27 @@ import App from './App.vue';
import store from './store';
import router from './router';
import VueKeyCloak from '@dsb-norge/vue-keycloak-js';
import { library } from "@fortawesome/fontawesome-svg-core";
import { faUserSecret, faTelescope, faCamera, faAperture, faBoxFull, faTag, faToggleOff, faPlus, faXmark, faPen, faFloppyDisk, faToggleOn } from "@fortawesome/pro-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
library.add(faUserSecret);
//
//
library.add(faTelescope);
library.add(faCamera);
library.add(faAperture);
library.add(faBoxFull);
library.add(faTag);
library.add(faToggleOff);
library.add(faToggleOn);
library.add(faPlus);
library.add(faXmark);
library.add(faPen);
library.add(faFloppyDisk);
const app = createApp(App);
app.use(store);
app.use(router);
app.component("font-awesome-icon", FontAwesomeIcon);
app.use(VueKeyCloak, {
config: {
url: 'https://auth.toking.de/',
@ -25,6 +43,7 @@ app.use(VueKeyCloak, {
store.dispatch("storeUserProfile", res);
console.log("res", res);
});
console.log(keycloak.idToken);
});
}
});

View File

@ -1 +1 @@
{"version":3,"file":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C,CAAC;gBACxC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YAC5B,CAAC,CAAC,CAAC;YAEH,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAEtC,CAAC,CACA,CAAA;IACJ,CAAC;CACJ,CAAC,CAAA;AAEN,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;AASjB,yBAAyB;AACzB,+BAA+B;AAC/B,sCAAsC;AACtC,wBAAwB;AACxB,uGAAuG;AACvG,4CAA4C;AAC5C,KAAK;AACL,iCAAiC;AACjC,0CAA0C;AAC1C,uGAAuG;AACvG,mBAAmB;AACnB,oCAAoC;AACpC,QAAQ;AACR,aAAa;AACb,wBAAwB;AACxB,+CAA+C;AAC/C,wBAAwB;AACxB,EAAE;AACF,oBAAoB;AACpB,0BAA0B;AAC1B,qEAAqE;AACrE,cAAc;AACd,QAAQ;AACR,sBAAsB;AACtB,6BAA6B;AAC7B,4DAA4D;AAC5D,kCAAkC;AAClC,mCAAmC;AACnC,SAAS;AACT,kEAAkE;AAClE,mBAAmB;AACnB,wBAAwB;AACxB,mCAAmC;AACnC,SAAS;AACT,oEAAoE;AACpE,iIAAiI;AACjI,mBAAmB;AACnB,8BAA8B;AAC9B,+BAA+B;AAC/B,SAAS;AACT,2DAA2D;AAC3D,iBAAiB;AACjB,mBAAmB;AACnB,mBAAmB;AACnB,oBAAoB;AACpB,EAAE;AACF,6CAA6C;AAC7C,MAAM"}

View File

@ -1,10 +1,20 @@
import CreateCameraPage from "@/pages/CreateCameraPage.vue";
import ReadNameKeyPage from "@/pages/ReadNameKeyPage.vue";
const shopRoutes = [
{
path: "/admin/camera/create",
component: CreateCameraPage,
meta: {
requiresAuth: true
},
},
{
path: "/admin/namekey",
component: ReadNameKeyPage,
props: true,
meta: {
requiresAuth: false,
// enterTransition: "rubberBand"
}
},
];

View File

@ -1 +1 @@
{"version":3,"file":"admin-routes.js","sourceRoot":"","sources":["admin-routes.ts"],"names":[],"mappings":"AACA,OAAO,gBAAgB,MAAM,8BAA8B,CAAC;AAI5D,MAAM,UAAU,GAAG;IACf;QACI,IAAI,EAAE,sBAAsB;QAC5B,SAAS,EAAE,gBAAgB;QAC3B,IAAI,EAAE;YACF,YAAY,EAAE,IAAI;SACrB;KACJ;CAEJ,CAAA;AAED,eAAe,UAAU,CAAC"}
{"version":3,"file":"admin-routes.js","sourceRoot":"","sources":["admin-routes.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,8BAA8B,CAAC;AAC5D,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAG1D,MAAM,UAAU,GAAG;IACf;QACI,IAAI,EAAE,sBAAsB;QAC5B,SAAS,EAAE,gBAAgB;QAC3B,IAAI,EAAE;YACF,YAAY,EAAE,IAAI;SACrB;KACJ;IACD;QACI,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,eAAe;QAC1B,KAAK,EAAE,IAAI;QACX,IAAI,EAAE;YACF,YAAY,EAAE,KAAK;YACnB,gCAAgC;SACnC;KACJ;CAEJ,CAAA;AAED,eAAe,UAAU,CAAC"}

View File

@ -1 +1 @@
{"version":3,"file":"app-routes.js","sourceRoot":"","sources":["app-routes.ts"],"names":[],"mappings":"AACA,OAAO,cAAc,MAAM,4BAA4B,CAAC;AACxD,OAAO,YAAY,MAAM,0BAA0B,CAAC;AACpD,OAAO,YAAY,MAAM,oCAAoC,CAAA;AAG7D,MAAM,SAAS,GAAG;IACd;QACI,IAAI,EAAE,GAAG;QACT,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,sBAAsB,CAAC;QAC/C,iDAAiD;QACjD,2CAA2C;QAC3C,yBAAyB;QACzB,eAAe;QACf,kBAAkB;QAClB,QAAQ;QACR,IAAI;KACP;IACD;QACI,IAAI,EAAE,mBAAmB;QACzB,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,cAAc;QACzB,KAAK,EAAE,IAAI;QACX,IAAI,EAAE;YACF,YAAY,EAAE,KAAK;YACpB,gCAAgC;SAClC;KAEJ;IAED;QACI,IAAI,EAAE,OAAO;QACb,SAAS,EAAE,YAAY;QACvB,KAAK,EAAE,IAAI;QACX,IAAI,EAAE;YACF,YAAY,EAAE,KAAK;YACnB,gCAAgC;SACnC;KACJ;IACD;QACI,IAAI,EAAE,OAAO;QACb,SAAS,EAAE,YAAY;QACvB,KAAK,EAAE,IAAI;QACX,IAAI,EAAE;YACF,YAAY,EAAE,IAAI;YAClB,gCAAgC;SACnC;KACJ;IACD;QACI,IAAI,EAAE,UAAU;QAChB,SAAS,EAAE,YAAY;QACvB,KAAK,EAAE,IAAI;QACX,IAAI,EAAE;YACF,YAAY,EAAE,IAAI;YAClB,gCAAgC;SACnC;KACJ;CACJ,CAAA;AAED,eAAe,SAAS,CAAC"}
{"version":3,"file":"app-routes.js","sourceRoot":"","sources":["app-routes.ts"],"names":[],"mappings":"AACA,OAAO,cAAc,MAAM,4BAA4B,CAAC;AACxD,OAAO,YAAY,MAAM,0BAA0B,CAAC;AACpD,OAAO,YAAY,MAAM,oCAAoC,CAAC;AAI9D,MAAM,SAAS,GAAG;IACd;QACI,IAAI,EAAE,GAAG;QACT,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,sBAAsB,CAAC;QAC/C,iDAAiD;QACjD,2CAA2C;QAC3C,yBAAyB;QACzB,eAAe;QACf,kBAAkB;QAClB,QAAQ;QACR,IAAI;KACP;IACD;QACI,IAAI,EAAE,mBAAmB;QACzB,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,cAAc;QACzB,KAAK,EAAE,IAAI;QACX,IAAI,EAAE;YACF,YAAY,EAAE,KAAK;YACpB,gCAAgC;SAClC;KAEJ;IAED;QACI,IAAI,EAAE,OAAO;QACb,SAAS,EAAE,YAAY;QACvB,KAAK,EAAE,IAAI;QACX,IAAI,EAAE;YACF,YAAY,EAAE,KAAK;YACnB,gCAAgC;SACnC;KACJ;IACD;QACI,IAAI,EAAE,OAAO;QACb,SAAS,EAAE,YAAY;QACvB,KAAK,EAAE,IAAI;QACX,IAAI,EAAE;YACF,YAAY,EAAE,IAAI;YAClB,gCAAgC;SACnC;KACJ;IACD;QACI,IAAI,EAAE,UAAU;QAChB,SAAS,EAAE,YAAY;QACvB,KAAK,EAAE,IAAI;QACX,IAAI,EAAE;YACF,YAAY,EAAE,IAAI;YAClB,gCAAgC;SACnC;KACJ;CAEJ,CAAA;AAED,eAAe,SAAS,CAAC"}

View File

@ -1,4 +1,4 @@
export const SEED_VERSION = 2;
export const SEED_VERSION = 8;
export const medias = [
{ key: "kb", name: "Kleinbild", description: '' },
{ key: "rf9x9", name: "Rollfilm 9x9", description: '' },
@ -17,6 +17,58 @@ export const mounts = [
{ key: "e-mount", name: "E-Mount", description: '' },
{ key: "ef-bajonett", name: "EF-Bajonett", description: '' },
];
export const filtermounts = [
{ key: "M1905", name: "M19×0,5", description: "sehr selten" },
{ key: "M2405", name: "M24×0,5", description: "sehr selten" },
{ key: "M25505", name: "M25,5×0,5", description: "sehr selten" },
{ key: "M2705", name: "M27×0,5", description: "häufig) (Video" },
{ key: "M28505", name: "M28,5×0,5", description: "im Wesentlichen nur Astronomie 1,25 = 31,75 mm Tubusdurchmesser" },
{ key: "M30505", name: "M30,5×0,5", description: " " },
{ key: "M3405", name: "M34×0,5", description: "sehr selten" },
{ key: "M3505", name: "M35×0,5", description: "sehr selten" },
{ key: "M35505", name: "M35,5×0,5", description: "häufig) (Video" },
{ key: "M36505", name: "M36,5×0,5", description: " " },
{ key: "M3705", name: "M37×0,5", description: " " },
{ key: "M37505", name: "M37,5×0,5", description: " " },
{ key: "M3905", name: "M39×0,5", description: "Video" },
{ key: "M4005", name: "M40×0,5", description: "sehr selten" },
{ key: "M40505", name: "M40,5×0,5", description: "häufig) (Video" },
{ key: "M4105", name: "M41×0,5", description: "sehr selten" },
{ key: "M4305", name: "M43×0,5", description: "sehr selten" },
{ key: "M4505", name: "M45×0,5", description: " " },
{ key: "M285060", name: "M28,5×0,60", description: "im Wesentlichen nur Astronomie 1,25\"" },
{ key: "M48060", name: "M48×0,60", description: "im Wesentlichen nur Astronomie 2\"" },
{ key: "M25075", name: "M25×0,75", description: " " },
{ key: "M27075", name: "M27×0,75", description: "sehr selten" },
{ key: "M28075", name: "M28×0,75", description: "sehr selten" },
{ key: "M285075", name: "M28,5×0,75", description: "sehr selten" },
{ key: "M30075", name: "M30×0,75", description: " " },
{ key: "M305075", name: "M30,5×0,75", description: " " },
{ key: "M37075", name: "M37×0,75", description: " " },
{ key: "M38075", name: "M38×0,75", description: "sehr selten" },
{ key: "M43075", name: "M43×0,75", description: " " },
{ key: "M46075", name: "M46×0,75", description: " " },
{ key: "M48075", name: "M48×0,75", description: "u. a. Astronomie 2\"" },
{ key: "M49075", name: "M49×0,75", description: "häufig; besonders kompakt gebaute KB-SLR bis 50 mm Brennweite und 1:1,7 Öffnung" },
{ key: "M52075", name: "M52×0,75", description: "sehr häufig; typisch für KB-SLR bis 50 mm und 1:1,4 " },
{ key: "M55075", name: "M55×0,75", description: "häufig" },
{ key: "M58075", name: "M58×0,75", description: "sehr häufig" },
{ key: "M60075", name: "M60×0,75", description: " " },
{ key: "M62075", name: "M62×0,75", description: "sehr häufig" },
{ key: "M67075", name: "M67×0,75", description: "sehr häufig" },
{ key: "M69075", name: "M69×0,75", description: " " },
{ key: "M72075", name: "M72×0,75", description: "sehr häufig" },
{ key: "M75075", name: "M75×0,75", description: "selten" },
{ key: "M77075", name: "M77×0,75", description: "sehr häufig" },
{ key: "M82075", name: "M82×0,75", description: "häufig" },
{ key: "M100075", name: "M100×0,75", description: " " },
{ key: "M861", name: "M86×1", description: "auch C86 genannt) (häufig" },
{ key: "M951", name: "M95×1", description: "auch C95 genannt" },
{ key: "M1001", name: "M100×1", description: " " },
{ key: "M1051", name: "M105×1", description: "auch C105 genannt" },
{ key: "M1221", name: "M122×1", description: " " },
{ key: "M11215", name: "M112×1,5", description: " " }
];
export const conditions = [
{ key: "neu", name: "neu", description: '' },
{ key: "neuwertig", name: "neuwertig", description: '' },
@ -40,6 +92,8 @@ export const buildtypes = [
{ key: "lf", name: "Lichtfeldkamera", description: '' },
{ key: "balg", name: "Balgenkamera", description: '' },
{ key: "sof", name: "Sofortbild", description: '' },
{ key: "spz", name: "Spezialkamera", description: '' },
{ key: "stu", name: "Studiokamera", description: '' },
];
export const brands = [
{ key: 'agfa', name: 'Agfa', description: 'Filme aller Art sowie analoge Kameras' },
@ -198,206 +252,411 @@ export const brands = [
{ key: 'zenza_bronica', name: 'Zenza Bronica', description: 'Mittelformatkameras.' },
{ key: 'zorki', name: 'Zorki', description: 'Kleinbildkameras.' },
];
export const manufacturers = [
{ key: 'agfa', name: 'Agfa', description: 'Filme aller Art sowie analoge Kameras' },
{ key: 'alpa', name: 'Alpa', description: 'Mittelformat analog/digital (früher Kleinbild).' },
{ key: 'arca_swiss', name: 'Arca-Swiss', description: 'Großformatkameras.' },
{ key: 'bilora', name: 'Bilora', description: 'Kleinbildkameras.' },
{ key: 'braun_photo_technik', name: 'Braun Photo Technik', description: 'Kameras, Diaprojektoren' },
{ key: 'bronica', name: 'Bronica', description: 'Mittelformatkameras.' },
{ key: 'cambo', name: 'Cambo', description: 'Großformatkameras.' },
{ key: 'camogli', name: 'Camogli', description: 'Mittelformatkameras.' },
{ key: 'canham_cameras', name: 'Canham Cameras', description: 'Großformatkameras.' },
{ key: 'canon', name: 'Canon', description: 'APS-Kameras, Digitalkameras, Kleinbildkameras, Objektive.' },
{ key: 'carena', name: 'Carena', description: 'Kleinbildkameras, Objektive' },
{ key: 'casio', name: 'Casio', description: 'Digitalkameras.' },
{ key: 'chinon', name: 'Chinon', description: 'Digitalkameras, Kleinbildkameras.' },
{
key: 'contax',
name: 'Contax',
description: 'APS-Kameras, Digitalkameras, Kleinbildkameras, Mittelformatkameras.'
},
{ key: 'dr_gilde', name: 'Dr. Gilde', description: 'Mittelformatkameras.' },
{
key: 'dhw_fototechnik',
name: 'DHW Fototechnik',
description: 'digitale und analoge Mittelformatkameras, TLR Mittelformatkameras, Fachkameras, Kleinbildkameras'
},
{ key: 'epson', name: 'Epson', description: 'Digitalkameras.' },
{
key: 'ernemann_Werke_AG',
name: 'Ernemann-Werke AG',
description: 'Kinoprojektoren und Kameras, darunter die Ermanox mit damals lichtstärkstem Serienobjektiv der Welt'
},
{ key: 'fed', name: 'FED', description: 'Kleinbildkameras.' },
{
key: 'fujifilm',
name: 'Fujifilm',
description: 'APS-Kameras, Digitalkameras, Kleinbildkameras, Mittelformatkameras.'
},
{ key: 'fandolfi', name: 'Gandolfi', description: 'Großformatkameras.' },
{ key: 'fottschalt', name: 'Gottschalt', description: 'Fachkameras.' },
{ key: 'hasselblad', name: 'Hasselblad', description: 'Kleinbildkameras, Mittelformatkameras.' },
{ key: 'hitachi', name: 'Hitachi', description: 'Digitalkameras.' },
{ key: 'hewlett-Packard (HP)', name: 'Hewlett-Packard (HP)', description: 'Digitalkameras.' },
{ key: 'horseman', name: 'Horseman', description: 'Großformatkameras, Mittelformatkameras.' },
{ key: 'ihagee', name: 'Ihagee', description: 'Kleinbildkameras (Bezeichnungen Exa und Exakta).' },
{ key: 'jenoptik', name: 'Jenoptik', description: 'Digitalkameras.' },
{ key: 'jvc', name: 'JVC', description: 'Digitalkameras.' },
{ key: 'kalimar', name: 'Kalimar', description: 'Kleinbildkameras, Mittelformatkameras, Objektive.' },
{
key: 'kamera_werk_dresden',
name: 'Kamera Werk Dresden',
description: 'Panoramakameras für Kleinbild und Mittelformat (Bezeichnung Noblex).'
},
{ key: 'kiev', name: 'Kiev', description: 'Mittelformatkameras, Kleinbildkameras.' },
{ key: 'kodak', name: 'Kodak', description: 'APS-Kameras, Kleinbildkameras, Digitalkameras.' },
{
key: 'konica',
name: 'Konica',
description: 'APS-Kameras, Digitalkameras, Kleinbildkameras, Mittelformatkameras, Objektive.'
},
{
key: 'konica_minolta',
name: 'Konica Minolta',
description: 'Fusion aus Konica und Minolta; Digitalkameras, Objektive.'
},
{ key: 'kōwa', name: 'Kōwa', description: 'Mittelformatkameras.' },
{ key: 'kyocera', name: 'Kyocera', description: '(siehe auch Yashica und Contax): Digitalkameras.' },
{ key: 'leaf', name: 'Leaf', description: 'Digitale Rückwände für Mittelformatkameras.' },
{
key: 'leica',
name: 'Leica',
description: 'APS-Kameras, Analogkameras, Digitalkameras, Kleinbildkameras.'
},
{ key: 'linhof', name: 'Linhof', description: 'Großformatkameras, Mittelformatkameras.' },
{ key: 'lomo', name: 'Lomo', description: 'analoge Kleinbildsucherkameras.' },
{ key: 'lotus_view', name: 'Lotus-View', description: 'Großformatkameras.' },
{ key: 'mamiya', name: 'Mamiya', description: 'Kleinbildkameras, Mittelformatkameras, Digitalkameras' },
{ key: 'meyer_optik', name: 'Meyer-Optik', description: 'v. a. Objektive' },
{
key: 'minolta',
name: 'Minolta',
description: 'APS-Kameras, Digitalkameras, Kleinbildkameras, Mittelformatkameras, Objektive.'
},
{ key: 'minox', name: 'Minox', description: 'Digitalkameras, Kleinbildkameras.' },
{ key: 'mustek', name: 'Mustek', description: 'Digitalkameras.' },
{
key: 'nikon',
name: 'Nikon',
description: 'APS-Kameras, Digitalkameras, Kleinbildkameras, Objektive für GF-Kameras.'
},
{ key: 'olympus', name: 'Olympus', description: 'APS-Kameras, Digitalkameras, Kleinbildkameras.' },
{ key: 'panasonic', name: 'Panasonic', description: 'Digitalkameras, Smartphones.' },
{
key: 'pentacon',
name: 'Pentacon',
description: 'Digitalkameras, Kleinbildkameras (Bezeichnung Praktica), früher auch Mittelformatkameras.'
},
{ key: 'pentax', name: 'Pentax', description: 'Digitalkameras, Kleinbildkameras, Mittelformatkameras.' },
{ key: 'phase_one', name: 'Phase One', description: 'Digitalkameras (digitaler Rückteile).' },
{ key: 'plaubel', name: 'Plaubel', description: 'Großformatkameras' },
{ key: 'polaroid', name: 'Polaroid', description: 'Digitalkameras, Sofortbildsysteme chemisch.' },
{ key: 'rbt', name: 'RBT', description: 'Stereokameras und Projektoren.' },
{
key: 'reflekta_kamerawerk_tharandt',
name: 'Reflekta-Kamerawerk Tharandt',
description: 'TLR Mittelformatkameras, Reflekta'
},
{ key: 'ricoh', name: 'Ricoh', description: 'Digitalkameras, Kleinbildkameras.' },
{ key: 'rheinmetall', name: 'Rheinmetall', description: 'Kleinbildkameras EXA, Exakta' },
{
key: 'rollei',
name: 'Rollei',
description: 'Digitalkameras, Kleinbildkameras, digitale und analoge Mittelformatkameras, TLR Mittelformatkameras.'
},
{
key: 'sakar_international',
name: 'Sakar International',
description: 'Zubehör, Digitalkameras, Marken Vivitar, Kodak'
},
{ key: 'salyut', name: 'Salyut', description: 'Mittelformatkameras.' },
{ key: 'samsung', name: 'Samsung', description: 'Digitalkameras, Kleinbildkameras.' },
{ key: 'sanyo', name: 'Sanyo', description: 'Digitalkameras.' },
{ key: 'sigma', name: 'Sigma', description: 'Digitalkameras, Kleinbildkameras, Objektive.' },
{ key: 'silvestri', name: 'Silvestri', description: 'Großformatkameras.' },
{ key: 'sinar', name: 'Sinar', description: 'Digitalkameras, Großformatkameras.' },
{ key: 'sony', name: 'Sony', description: 'Digitalkameras, Objektive.' },
{ key: 'tachihara', name: 'Tachihara', description: 'Mittelformatkameras' },
{ key: 'tamron', name: 'Tamron', description: 'Objektive' },
{ key: 'teamwork', name: 'Teamwork', description: 'Mittelformatkameras' },
{ key: 'tokina', name: 'Tokina', description: 'Objektive' },
{ key: 'topcon', name: 'Topcon', description: 'Kleinbildkameras' },
{ key: 'toshiba', name: 'Toshiba', description: 'Digitalkameras, Großformatkameras' },
{ key: 'toyo', name: 'Toyo', description: 'Großformatkameras' },
{ key: 'yashica', name: 'Yashica', description: 'Digitalkameras, Kleinbildkameras.' },
{ key: 'yashica_kyocera', name: 'Yashica-Kyocera', description: 'Mittelformatkameras.' },
{ key: 'vinten', name: 'Vinten', description: 'Luftbildkameras.' },
{ key: 'vivitar', name: 'Vivitar', description: 'Digitalkameras, Wechselobjektive.' },
{
key: 'voigtländer',
name: 'Voigtländer',
description: 'APS-Kameras, Digitalkameras, Kleinbildkameras, erstes Foto-Zoomobjektiv der Welt, aktuell: ausschließlich Objektive.'
},
{ key: 'walker_cameras', name: 'Walker Cameras', description: 'Großformatkameras.' },
{
key: 'welta',
name: 'Welta',
description: 'Mittelformatkameras, TLR, Kleinbildkameras. Später aufgegangen in Pentacon.'
},
{
key: 'wünsche_emil_ag',
name: 'Wünsche, Emil AG',
description: 'Magazinkameras, Laufboden-Klappkameras mit Klappmechanismus, Reisekameras; aufgegangen in ICA Dresden im Jahre 1909.'
},
{ key: 'zeiss_ikon', name: 'Zeiss Ikon', description: 'Kleinbildkameras.' },
{ key: 'zenit', name: 'Zenit', description: 'Kleinbildkameras, Mittelformatkameras.' },
{ key: 'zenza_bronica', name: 'Zenza Bronica', description: 'Mittelformatkameras.' },
{ key: 'zorki', name: 'Zorki', description: 'Kleinbildkameras.' },
];
export const lenses = [
{
id: "pentax-zoom",
name: "name",
lensmount_key: "",
key: "pentax-zoom",
inventory_number: '200',
item_type: "lens",
name: "Pentax Zoom",
mount_key: "a-mount",
aperture_max: "0.0",
focal_length_min: "50",
focal_length_max: null,
focal_length_max: "250",
autofocus: false,
manufacturer_key: "",
brand_key: "",
manufacturer_key: "pentax",
brand_key: "pentax",
description: "Langer Text",
year_manufactured_from: "",
year_manufactured_to: "",
year_manufactured_from: "1980",
year_manufactured_to: "1990",
price_purchased: 0.0,
price_hisotric: 0.0,
price_historic: 0.0,
price_current: 0.0,
work_done: "",
ligthMesure: "",
work_done: "Bisher nur kleinere Reinigungsarbeiten",
light_measure_method: "",
special: "",
year_of_production: 2000,
year_of_purchase: 1980
year_of_purchase: 1980,
set_key: "pentax-set"
}
];
export const cameras = [
{
id: "pentax_19",
key: "pentax_19",
inventory_number: '109',
item_type: "camera",
brand_key: "pentax",
condition_key: "neuwertig",
name: "Pentax K30",
buildtype: "slr",
description: "Langer Text",
buildtype_key: "slr",
description: 'eine tolle Kamera mit vielen Funktionen, ' +
'Bildstabilisierung und noch viel mehr',
year_manufactured_from: "",
year_manufactured_to: "",
manufacturer_key: "",
price_purchased: 0.0,
price_hisotric: 0.0,
price_historic: 0.0,
price_current: 0.0,
work_done: "",
ligthMesure: "",
work_done: "kleinere Arbeiten",
light_measure_method: "Mehrfeld",
special: "",
year_of_production: 2000,
year_of_purchase: 2022,
set_key: "pentax"
},
{
id: "pentax_20",
key: "pentax_20",
inventory_number: '108',
item_type: "camera",
brand_key: "pentax",
condition_key: "neuwertig",
name: "Pentax K50",
buildtype: "slr",
buildtype_key: "slr",
description: "Langer Text",
year_manufactured_from: "",
year_manufactured_to: "",
manufacturer_key: "",
price_purchased: 0.0,
price_hisotric: 0.0,
price_historic: 0.0,
price_current: 0.0,
work_done: "",
ligthMesure: "",
light_measure_method: "",
special: "",
year_of_production: 2000,
year_of_purchase: 2022,
},
{
id: "pentax_21",
key: "pentax_21",
inventory_number: '107',
item_type: "camera",
brand_key: "pentax",
condition_key: "neuwertig",
name: "Pentax K3",
buildtype: "slr",
buildtype_key: "slr",
description: "Langer Text",
year_manufactured_from: "",
year_manufactured_to: "",
manufacturer_key: "",
price_purchased: 0.0,
price_hisotric: 0.0,
price_historic: 0.0,
price_current: 0.0,
work_done: "",
ligthMesure: "",
light_measure_method: "",
special: "",
year_of_production: 2000,
year_of_purchase: 2022,
},
{
id: "agfa_01",
key: "agfa_01",
inventory_number: '106',
item_type: "camera",
brand_key: "agfa",
condition_key: "neuwertig",
name: "Agfa Click",
buildtype: "slr",
buildtype_key: "slr",
description: "Langer Text",
year_manufactured_from: "",
year_manufactured_to: "",
manufacturer_key: "",
price_purchased: 0.0,
price_hisotric: 0.0,
price_historic: 0.0,
price_current: 0.0,
work_done: "",
ligthMesure: "",
light_measure_method: "",
special: "",
year_of_production: 2000,
year_of_purchase: 2000,
},
{
id: "agfa_02",
key: "agfa_02",
inventory_number: '105',
item_type: "camera",
brand_key: "agfa",
condition_key: "neuwertig",
name: "Agfa Box",
buildtype: "slr",
buildtype_key: "slr",
description: "Langer Text",
year_manufactured_from: "",
year_manufactured_to: "",
manufacturer_key: "",
price_purchased: 0.0,
price_hisotric: 0.0,
price_historic: 0.0,
price_current: 0.0,
work_done: "",
ligthMesure: "",
light_measure_method: "",
special: "",
year_of_production: 2000,
year_of_purchase: 1980,
},
{
id: "cancon_02",
key: "cancon_02",
inventory_number: '104',
item_type: "camera",
brand_key: "canon",
condition_key: "neuwertig",
name: "Canon EOS",
buildtype: "slr",
buildtype_key: "slr",
description: "Langer Text",
year_manufactured_from: "",
year_manufactured_to: "",
manufacturer_key: "",
price_purchased: 0.0,
price_hisotric: 0.0,
price_historic: 0.0,
price_current: 0.0,
work_done: "",
ligthMesure: "",
light_measure_method: "",
special: "",
year_of_production: 2000,
year_of_purchase: 1980,
},
{
id: "agfa_03",
key: "agfa_03",
inventory_number: '103',
item_type: "camera",
brand_key: "agfa",
condition_key: "neuwertig",
name: "Agfa Click",
buildtype: "slr",
buildtype_key: "slr",
description: "Langer Text",
year_manufactured_from: "",
year_manufactured_to: "",
manufacturer_key: "",
price_purchased: 0.0,
price_hisotric: 0.0,
price_historic: 0.0,
price_current: 0.0,
work_done: "",
ligthMesure: "",
light_measure_method: "",
special: "",
year_of_production: 2000,
year_of_purchase: 2000,
},
{
id: "agfa_05",
key: "agfa_05",
inventory_number: '102',
item_type: "camera",
brand_key: "agfa",
condition_key: "neuwertig",
name: "Agfa Box",
buildtype: "slr",
buildtype_key: "slr",
description: "Langer Text",
year_manufactured_from: "",
year_manufactured_to: "",
manufacturer_key: "",
price_purchased: 0.0,
price_hisotric: 0.0,
price_historic: 0.0,
price_current: 0.0,
work_done: "",
ligthMesure: "",
light_measure_method: "",
special: "",
year_of_production: 2000,
year_of_purchase: 1980,
},
{
id: "cancon_07",
key: "cancon_07",
inventory_number: '101',
item_type: "camera",
brand_key: "canon",
condition_key: "neuwertig",
name: "Canon EOS",
buildtype: "slr",
buildtype_key: "slr",
description: "Langer Text",
year_manufactured_from: "",
year_manufactured_to: "",
manufacturer_key: "",
price_purchased: 0.0,
price_hisotric: 0.0,
price_historic: 0.0,
price_current: 0.0,
work_done: "",
ligthMesure: "",
light_measure_method: "",
special: "",
year_of_production: 2000,
year_of_purchase: 1980,
}
];
export const sets = [
{
key: "minox-set",
inventory_number: '300',
item_type: "set",
name: "minox Set"
},
{
key: "pentax-set",
inventory_number: 'B-1300',
item_type: "set",
name: "Pentax K30 Set",
items: ["pentax-zoom", "pentax_19"]
}
];
export const assets = [];
export const accessories = [
{
key: "stat11",
inventory_number: '300',
item_type: "accessoire",
name: "Stativ"
}
];
export const inventory = [
...cameras,
...lenses
...lenses,
...sets,
...accessories
];
export const sets = [];
//# sourceMappingURL=seed.js.map

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
import InventoryItem from "@/store/classes/InventoryItem";
export default class Camera extends InventoryItem {
ADD_FIELDS = ['_light_measure_method', 'mount_key',
ADD_FIELDS = ['light_measure_method', 'mount_key',
'buildtype_key', 'media_key', 'year_manufactured_from', 'year_manufactured_to'];
_light_measure_method;
_mount_key;
@ -18,5 +18,68 @@ export default class Camera extends InventoryItem {
}
}
}
getDBVersion() {
const obj = {
key: this.key,
item_type: this._item_type,
manufacturer_key: this.manufacturer_key,
brand_key: this.brand_key,
condition_key: this.condition_key,
name: this.name,
description: this.description,
work_done: this.work_done,
special: this.special,
price_purchased: this.price_purchased,
price_historic: this.price_historic,
price_current: this.price_current,
year_of_production: this.year_of_production,
year_of_purchase: this.year_of_purchase,
inventory_number: this.inventory_number,
set_key: this.set_key,
light_measure_method: this._light_measure_method,
mount_key: this._mount_key,
buildtype_key: this._buildtype_key,
media_key: this._media_key,
year_manufactured_from: this._year_manufactured_from,
year_manufactured_to: this._year_manufactured_to,
};
return obj;
}
get light_measure_method() {
return this._light_measure_method;
}
get mount_key() {
return this._mount_key;
}
get buildtype_key() {
return this._buildtype_key;
}
get media_key() {
return this._media_key;
}
get year_manufactured_from() {
return this._year_manufactured_from;
}
get year_manufactured_to() {
return this._year_manufactured_to;
}
set light_measure_method(value) {
this._light_measure_method = value;
}
set mount_key(value) {
this._mount_key = value;
}
set buildtype_key(value) {
this._buildtype_key = value;
}
set media_key(value) {
this._media_key = value;
}
set year_manufactured_from(value) {
this._year_manufactured_from = value;
}
set year_manufactured_to(value) {
this._year_manufactured_to = value;
}
}
//# sourceMappingURL=Camera.js.map

View File

@ -1 +1 @@
{"version":3,"file":"Camera.js","sourceRoot":"","sources":["Camera.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,+BAA+B,CAAC;AAE1D,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,aAAa;IAErC,UAAU,GAAG,CAAC,uBAAuB,EAAE,WAAW;QACtD,eAAe,EAAE,WAAW,EAAE,wBAAwB,EAAE,sBAAsB,CAAC,CAAA;IAE3E,qBAAqB,CAAS;IAC9B,UAAU,CAAS;IACnB,cAAc,CAAS;IACvB,UAAU,CAAS;IAGnB,uBAAuB,CAAS;IAChC,qBAAqB,CAAS;IAEtC,YAAY,EAAS,EAAE,IAAW,EAAE,MAAc;QAC9C,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC;QAE3B,IAAG,OAAO,MAAM,IAAI,WAAW,EAAE;YAC7B,KAAK,MAAM,KAAK,IAAK,IAAI,CAAC,UAAU,EAAE;gBAClC,IAAG,KAAK,IAAI,MAAM;oBAAE,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;aACzD;SACJ;IACL,CAAC;CACJ"}
{"version":3,"file":"Camera.js","sourceRoot":"","sources":["Camera.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,+BAA+B,CAAC;AAE1D,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,aAAa;IAErC,UAAU,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Camera extends InventoryItem {
get year_manufactured_to(): string {
return this._year_manufactured_to;
}
set light_measure_method(value: string) {
this._light_measure_method = value;
}
set mount_key(value: string) {
this._mount_key = value;
}
set buildtype_key(value: string) {
this._buildtype_key = value;
}
set media_key(value: string) {
this._media_key = value;
}
set year_manufactured_from(value: string) {
this._year_manufactured_from = value;
}
set year_manufactured_to(value: string) {
this._year_manufactured_to = value;
}
}

View File

@ -1,10 +1,13 @@
export default class InventoryItem {
FIELDS = ['manufacturer_key', 'brand_key', 'condition_key',
FIELDS = ['item_type', 'manufacturer_key', 'brand_key', 'condition_key',
'name', 'description', 'work_done', 'special',
'price_purchased', 'price_historic', 'price_current',
'year_of_production', 'year_of_purchase'];
_id;
'year_of_production', 'year_of_purchase', 'inventory_number', 'set_key'];
_key;
_inventory_number;
_item_type;
_active;
_edit;
_manufacturer_key;
_brand_key;
_condition_key;
@ -17,9 +20,16 @@ export default class InventoryItem {
_price_current;
_year_of_production;
_year_of_purchase;
constructor(id, name, values) {
this._id = id;
_set_key;
_created;
_changed;
constructor(key, name, values) {
this._key = key;
this._name = name;
this._active = false;
this._edit = false;
this._created = new Date();
this._changed = new Date();
if (typeof values != "undefined") {
for (const field of this.FIELDS) {
if (field in values)
@ -27,8 +37,35 @@ export default class InventoryItem {
}
}
}
get id() {
return this._id;
getDBVersion() {
const obj = {
key: this._key,
item_type: this._item_type,
manufacturer_key: this._manufacturer_key,
brand_key: this._brand_key,
condition_key: this._condition_key,
name: this._name,
description: this._description,
work_done: this._work_done,
special: this._special,
price_purchased: this._price_purchased,
price_historic: this._price_historic,
price_current: this._price_current,
year_of_production: this._year_of_production,
year_of_purchase: this._year_of_purchase,
inventory_number: this._inventory_number,
set_key: this._set_key
};
return obj;
}
get key() {
return this._key;
}
get active() {
return this._active;
}
get edit() {
return this._edit;
}
get item_type() {
return this._item_type;
@ -69,5 +106,65 @@ export default class InventoryItem {
get year_of_purchase() {
return this._year_of_purchase;
}
set active(value) {
this._active = value;
}
set edit(value) {
this._edit = value;
}
set manufacturer_key(value) {
this._manufacturer_key = value;
}
set brand_key(value) {
this._brand_key = value;
}
set condition_key(value) {
this._condition_key = value;
}
set name(value) {
this._name = value;
}
set description(value) {
this._description = value;
}
set work_done(value) {
this._work_done = value;
}
set special(value) {
this._special = value;
}
set price_purchased(value) {
this._price_purchased = value;
}
set price_historic(value) {
this._price_historic = value;
}
set price_current(value) {
this._price_current = value;
}
set year_of_production(value) {
this._year_of_production = value;
}
set year_of_purchase(value) {
this._year_of_purchase = value;
}
get set_key() {
return this._set_key;
}
set set_key(value) {
this._set_key = value;
}
get inventory_number() {
return this._inventory_number;
}
get created() {
return this._created;
}
get changed() {
return this._changed;
}
set changed(value) {
this._changed = value;
}
}
//# sourceMappingURL=InventoryItem.js.map

View File

@ -1 +1 @@
{"version":3,"file":"InventoryItem.js","sourceRoot":"","sources":["InventoryItem.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,OAAO,aAAa;IAEtB,MAAM,GAAG,CAAC,kBAAkB,EAAE,WAAW,EAAE,eAAe;QAC9D,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS;QAC7C,iBAAiB,EAAE,gBAAgB,EAAE,eAAe;QACpD,oBAAoB,EAAE,kBAAkB,CAAE,CAAC;IAEvC,GAAG,CAAS;IAEZ,UAAU,CAAmC;IAE7C,iBAAiB,CAAS;IAC1B,UAAU,CAAS;IACnB,cAAc,CAAS;IAEvB,KAAK,CAAS;IACd,YAAY,CAAS;IACrB,UAAU,CAAS;IACnB,QAAQ,CAAS;IAEjB,gBAAgB,CAAS;IACzB,eAAe,CAAS;IACxB,cAAc,CAAS;IAEvB,mBAAmB,CAAS;IAC5B,iBAAiB,CAAS;IAIlC,YAAa,EAAS,EAAE,IAAW,EAAE,MAAc;QAC/C,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;QACd,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAElB,IAAG,OAAO,MAAM,IAAI,WAAW,EAAE;YAC7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AI,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAClC,CAAC;IAED,IAAI,cAAc,CAAC,KAAa;QAC5B,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;IACjC,CAAC;IAED,IAAI,aAAa,CAAC,KAAa;QAC3B,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;IAChC,CAAC;IAED,IAAI,kBAAkB,CAAC,KAAa;QAChC,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC;IACrC,CAAC;IAED,IAAI,gBAAgB,CAAC,KAAa;QAC9B,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;IACnC,CAAC;IAGD,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,IAAI,OAAO,CAAC,KAAa;QACrB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IAC1B,CAAC;IAGD,IAAI,gBAAgB;QAChB,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAClC,CAAC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,IAAI,OAAO,CAAC,KAAW;QACnB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IAC1B,CAAC;CACJ"}

View File

@ -0,0 +1,41 @@
import InventoryItem from "@/store/classes/InventoryItem";
export default class InventorySet extends InventoryItem {
ADD_FIELDS = ['inventory_keys'];
_inventory_keys;
constructor(id, name, values) {
super(id, name, values);
this._item_type = "lens";
if (typeof values != "undefined") {
for (const field of this.ADD_FIELDS) {
if (field in values)
this["_" + field] = values[field];
}
}
}
getDBVersion() {
const obj = {
key: this.key,
item_type: this._item_type,
manufacturer_key: this.manufacturer_key,
brand_key: this.brand_key,
condition_key: this.condition_key,
name: this.name,
description: this.description,
work_done: this.work_done,
special: this.special,
price_purchased: this.price_purchased,
price_historic: this.price_historic,
price_current: this.price_current,
year_of_production: this.year_of_production,
year_of_purchase: this.year_of_purchase,
inventory_number: this.inventory_number,
set_key: this.set_key,
inventory_keys: this._inventory_keys
};
return obj;
}
get inventory_keys() {
return this._inventory_keys;
}
}
//# sourceMappingURL=InventorySet.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"InventorySet.js","sourceRoot":"","sources":["InventorySet.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,+BAA+B,CAAC;AAE1D,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,aAAa;IAE3C,UAAU,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAEhC,eAAe,CAAW;IAElC,YAAY,EAAS,EAAE,IAAW,EAAE,MAAc;QAC9C,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;QAErB,IAAG,OAAO,MAAM,IAAI,WAAW,EAAE;YAC7B,KAAK,MAAM,KAAK,IAAK,IAAI,CAAC,UAAU,EAAE;gBAClC,IAAG,KAAK,IAAI,MAAM;oBAAE,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;aACzD;SACJ;IACT,CAAC;IACD,YAAY;QACR,MAAM,GAAG,GAAG;YACR,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,SAAS,EAAE,IAAI,CAAC,UAAU;YAC1B,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;YACvC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;YAC3C,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;YACvC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;YACvC,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,cAAc,EAAE,IAAI,CAAC,eAAe;SACvC,CAAA;QACD,OAAO,GAAG,CAAA;IACd,CAAC;IAED,IAAI,cAAc;QACd,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;CACJ"}

View File

@ -1,11 +1,12 @@
import InventoryItem from "@/store/classes/InventoryItem";
export class Lens extends InventoryItem {
ADD_FIELDS = ['mount_key', 'autofocus', 'aperture_max', 'focal_length_min', 'focal_length_max'];
export default class Lens extends InventoryItem {
ADD_FIELDS = ['mount_key', 'filtermount_key', 'autofocus', 'aperture_max', 'focal_length_min', 'focal_length_max'];
_mount_key;
_autofocus;
_aperture_max;
_focal_length_min;
_focal_length_max;
_filtermount_key;
constructor(id, name, values) {
super(id, name, values);
this._item_type = "lens";
@ -16,6 +17,69 @@ export class Lens extends InventoryItem {
}
}
}
getDBVersion() {
const obj = {
key: this.key,
item_type: this._item_type,
manufacturer_key: this.manufacturer_key,
brand_key: this.brand_key,
condition_key: this.condition_key,
name: this.name,
description: this.description,
work_done: this.work_done,
special: this.special,
price_purchased: this.price_purchased,
price_historic: this.price_historic,
price_current: this.price_current,
year_of_production: this.year_of_production,
year_of_purchase: this.year_of_purchase,
inventory_number: this.inventory_number,
set_key: this.set_key,
mount_key: this._mount_key,
filtermount_key: this._filtermount_key,
autofocus: this._autofocus,
aperture_max: this._aperture_max,
focal_length_min: this._focal_length_min,
focal_length_max: this._focal_length_max,
};
return obj;
}
get mount_key() {
return this._mount_key;
}
get autofocus() {
return this._autofocus;
}
get aperture_max() {
return this._aperture_max;
}
get focal_length_min() {
return this._focal_length_min;
}
get focal_length_max() {
return this._focal_length_max;
}
get filtermount_key() {
return this._filtermount_key;
}
set mount_key(value) {
this._mount_key = value;
}
set autofocus(value) {
this._autofocus = value;
}
set aperture_max(value) {
this._aperture_max = value;
}
set focal_length_min(value) {
this._focal_length_min = value;
}
set focal_length_max(value) {
this._focal_length_max = value;
}
set filtermount_key(value) {
this._filtermount_key = value;
}
}
const camera2 = new Lens(null, "Pentax K30", {
manufacturer_key: "manufacturere",

View File

@ -1 +1 @@
{"version":3,"file":"Lens.js","sourceRoot":"","sources":["Lens.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,+BAA+B,CAAC;AAE1D,MAAM,OAAO,IAAK,SAAQ,aAAa;IAE3B,UAAU,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,kBAAkB,EAAE,kBAAkB,CAAE,CAAC;IAEjG,UAAU,CAAS;IACnB,UAAU,CAAU;IACpB,aAAa,CAAS;IACtB,iBAAiB,CAAS;IAC1B,iBAAiB,CAAS;IAElC,YAAY,EAAS,EAAE,IAAW,EAAE,MAAc;QAC9C,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;QAErB,IAAG,OAAO,MAAM,IAAI,WAAW,EAAE;YAC7B,KAAK,MAAM,KAAK,IAAK,IAAI,CAAC,UAAU,EAAE;gBAClC,IAAG,KAAK,IAAI,MAAM;oBAAE,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;aACzD;SACJ;IACT,CAAC;CACJ;AAGD,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE;IACzC,gBAAgB,EAAE,eAAe;IACjC,SAAS,EAAE,OAAO;IAClB,aAAa,EAAE,WAAW;IAC1B,aAAa,EAAE,WAAW;IAC1B,SAAS,EAAE,IAAI;CAClB,CAAC,CAAC;AACH,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC"}
{"version":3,"file":"Lens.js","sourceRoot":"","sources":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IAED,IAAI,eAAe,CAAC,KAAa;QAC7B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAClC,CAAC;CACJ;AAGD,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE;IACzC,gBAAgB,EAAE,eAAe;IACjC,SAAS,EAAE,OAAO;IAClB,aAAa,EAAE,WAAW;IAC1B,aAAa,EAAE,WAAW;IAC1B,SAAS,EAAE,IAAI;CAClB,CAAC,CAAC;AACH,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC"}

View File

@ -70,10 +70,34 @@ export default class Lens extends InventoryItem {
return this._focal_length_max;
}
get filtermount_key(): string {
return this._filtermount_key;
}
set mount_key(value: string) {
this._mount_key = value;
}
set autofocus(value: boolean) {
this._autofocus = value;
}
set aperture_max(value: number) {
this._aperture_max = value;
}
set focal_length_min(value: number) {
this._focal_length_min = value;
}
set focal_length_max(value: number) {
this._focal_length_max = value;
}
set filtermount_key(value: string) {
this._filtermount_key = value;
}
}

View File

@ -14,6 +14,12 @@ export default class NameKey {
get key() {
return this._key;
}
set key(value) {
this._key = value;
}
set description(value) {
this._description = value;
}
get name() {
return this._name;
}
@ -32,5 +38,8 @@ export default class NameKey {
set active(value) {
this._active = value;
}
get description() {
return this._description;
}
}
//# sourceMappingURL=NameKey.js.map

View File

@ -1 +1 @@
{"version":3,"file":"NameKey.js","sourceRoot":"","sources":["NameKey.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,OAAO,OAAO;IAEhB,IAAI,CAAU;IACd,KAAK,CAAS;IACd,KAAK,CAA2E;IAChF,OAAO,CAAU;IACjB,YAAY,CAAS;IAE7B,YAAY,GAAW,EAAE,IAAW,EAAE,IAAI,EAAE,SAAkB,IAAI,EAAE,WAAmB;QACrF,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;QAChB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;Q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C;IACtB,CAAC;IAED,IAAI,WAAW,CAAC,KAAa;QACzB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;IAED,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,IAAI,IAAI,CAAC,KAAa;QAClB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,IAAI,IAAI,CAAC,KAA8E;QACnF,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,MAAM,CAAC,KAAc;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAGD,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;CACJ"}

View File

@ -1,10 +1,10 @@
import { createStore } from 'vuex';
import authModule from "./modules/auth";
import inventoryModule from "./modules/inventory";
import cameraModule from "./modules/inventory";
export default createStore({
modules: {
auth: authModule,
camera: inventoryModule
camera: cameraModule
}
});
//# sourceMappingURL=index.js.map

View File

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAA;AAElC,OAAO,UAAU,MAAM,gBAAgB,CAAC;AACxC,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAE5C,eAAe,WAAW,CAAC;IACvB,OAAO,EAAE;QACL,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,YAAY;KACvB;CACJ,CAAC,CAAA"}
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAA;AAElC,OAAO,UAAU,MAAM,gBAAgB,CAAC;AACxC,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAE/C,eAAe,WAAW,CAAC;IACvB,OAAO,EAAE;QACL,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,YAAY;KACvB;CACJ,CAAC,CAAA"}

View File

@ -0,0 +1 @@
//# sourceMappingURL=NameKeyStore.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"NameKeyStore.js","sourceRoot":"","sources":["NameKeyStore.ts"],"names":[],"mappings":""}

View File

@ -43,6 +43,7 @@ const actions = {
});
},
storeUserProfile(context, payload) {
console.log("STORE user Profile", payload);
context.commit("storeUserProfile", payload);
}
};

View File

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAGA,MAAM,cAAc,GAAG;IACnB,GAAG,EAAE,yBAAyB;IAC9B,KAAK,EAAE,QAAQ;IACf,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,wBAAwB;IACrC,MAAM,EAAE,gBAAgB;IACxB,aAAa,EAAE,IAAI;IACnB,KAAK,EAAE,SAAS;CAEnB,CAAA;AAED,MAAM,KAAK,GAAG;IACV,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,IAAI;CACpB,CAAC;AAEF,MAAM,OAAO,GAAG;IACZ,eAAe,CAAC,KAAS;QACrB,OAAO,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAA;IACvC,CAAC;IACD,KAAK,EAAE,CAAC,KAAS,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK;IACjC,QAAQ,EAAE,CAAC,KAAS,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ;IACvC,WAAW,EAAE,CAAC,KAAS,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW;CAEhD,CAAC;AAEF,MAAM,SAAS,GAAG;IAEd,aAAa,CAAC,OAA+B,EAAE,OAAW;QACtD,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;QACvC,KAAK,CAAC,QAAQ,GAAG,OAAO,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CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE;YACtD,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,SAAS,CAAC,CAAC;QAC9C,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAC,EAAE;YACZ,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC9B,CAAC,CAAC,CAAA;IACN,CAAC;IACD,gBAAgB,CAAC,OAA+B,EAAE,OAAW;QACzD,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;QAC3C,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAA;IAC/C,CAAC;CAEA,CAAC;AACN,MAAM,OAAO,GAAG,EAAE,CAAC;AAEnB,MAAM,UAAU,GAAG;IACf,KAAK;IACL,OAAO;IACP,SAAS;IACT,OAAO;IACP,OAAO;CACV,CAAA;AAED,eAAe,UAAU,CAAA"}

View File

@ -2,78 +2,146 @@ import * as seed from "@/seed";
import BilliDB from "@/indexdDB";
import { v4 as uuidv4 } from 'uuid';
import { SEED_VERSION } from "@/seed";
import InventoryItem from "@/store/classes/InventoryItem";
import Camera from "@/store/classes/Camera";
import Lens from "@/store/classes/Lens";
import InventorySet from "@/store/classes/InventorySet";
const db = new BilliDB("billibox", 3);
const stores = [
{ id: "inventory", identifier: "key", name: 'Inventar', type: 'object' },
{ id: "brands", identifier: "key", name: "Marken", type: "nameKey" },
{ id: "conditions", identifier: "key", name: "Zustände", type: "nameKey" },
{ id: "buildtypes", identifier: "key", name: "Bauformen", type: "nameKey" },
{ id: "manufacturers", identifier: "key", name: "Hersteller", type: "nameKey" },
{ id: "medias", identifier: "key", name: "Medien", type: "nameKey" },
{ id: "mounts", identifier: "key", name: "Anschlüsse", type: "nameKey" },
{ id: "filtermounts", identifier: "key", name: "Filteranschlüsse", type: "nameKey" },
{ id: "assets", identifier: "key", name: "Dateien", type: "filestore" },
];
const state = {
isInitialized: false,
inventory: [],
assets: [],
brands: [],
sets: [],
manufacturers: [],
conditions: [],
medias: [],
mounts: [],
buildtypes: []
buildtypes: [],
filtermounts: []
};
const getters = {
cameras: (state) => {
return state.cameras.find((item) => item.item_type === "camera");
inventory: (state) => {
return state.inventory;
},
camera: (state) => (id) => state.inventory.find((item) => item.item_type === "camera" && item.id === id),
stores: (state) => stores,
store: (state) => (key) => {
console.log("Query store:", key);
return state[key];
},
cameras: (state) => {
return state.inventory.find((item) => item.item_type === "camera");
},
camera: (state) => (key) => state.inventory.find((item) => item.item_type === "camera" && item.key === key),
activeItem: (state) => state.inventory.find((item) => item.active),
lenses: (state) => {
return state.cameras.find((item) => item.item_type === "lens");
return state.inventory.find((item) => item.item_type === "lens");
},
lens: (state) => (id) => state.inventory.find((item) => item.item_type === "lens" && item.id === id),
lens: (state) => (key) => state.inventory.find((item) => item.item_type === "lens" && item.key === key),
accessories: (state) => {
return state.cameras.find((item) => item.item_type === "accessoire");
return state.inventory.find((item) => item.item_type === "accessoire");
},
accessoire: (state) => (id) => state.inventory.find((item) => item.item_type === "accessoire" && item.id === id),
accessoire: (state) => (key) => state.inventory.find((item) => item.item_type === "accessoire" && item.key === key),
brands: (state) => state.brands,
brand: (state) => (id) => state.brands.find((brand) => brand.schluessel === id),
brand: (state) => (key) => state.brands.find((brand) => brand.key === key),
manufacturers: (state) => state.manufacturers,
manufacturer: (state) => (key) => state.manufacturers.find((item) => item.key === key),
mounts: (state) => state.mounts,
mount: (state) => (key) => state.mounts.find((item) => item.key === key),
filtermounts: (state) => state.filtermounts,
filtermount: (state) => (key) => state.filtermounts.find((item) => item.key === key),
conditions: (state) => state.conditions,
condition: (state) => (id) => state.conditions.find((condition) => condition.schluessel === id),
condition: (state) => (key) => state.conditions.find((condition) => condition.key === key),
sets: (state) => state.inventory.find((item) => item.item_type === "set"),
set: (state) => (key) => state.inventory.find((item) => item.key === key),
medias: (state) => state.medias,
media: (state) => (id) => state.medias.find((media) => media.schluessel === id),
media: (state) => (key) => state.medias.find((media) => media.key === key),
buildtypes: (state) => state.buildtypes,
buildtype: (state) => (id) => state.buildtypes.find((buildtype) => buildtype.schluessel === id),
buildtype: (state) => (key) => state.buildtypes.find((buildtype) => buildtype.key === key),
isInitialized: (state) => state.isInitialized,
getIconName: (state) => (item_type) => {
switch (item_type) {
case "camera":
return "camera";
case "set":
return "box-open-full";
case "accessoire":
return "telescope";
case "lens":
return "aperture";
}
return "telescope";
}
};
const mutations = {
setInventory(state, payload) {
console.log("mutation.setInventory");
const camerasDA = [];
payload.map((camera) => {
state.cameras.push({
...camera,
edit: false,
active: false
payload.map((item) => {
let newInventoryItem;
switch (item.item_type) {
case "set":
newInventoryItem = new InventorySet(item.key, item.name, item);
break;
case "camera":
newInventoryItem = new Camera(item.key, item.name, item);
break;
case "lens":
newInventoryItem = new Lens(item.key, item.name, item);
break;
default:
newInventoryItem = new InventoryItem(item.key, item.name, item);
}
state.inventory.push(newInventoryItem);
});
});
console.log("STORE", state.cameras);
console.log("STORE", state.inventory.length);
},
storeCamera(sate, payload) {
// console.log("mutation.storeCamera", payload)
const objCamera = state.inventory.find((camera) => camera.id === payload.id);
const objCamera = state.inventory.find((camera) => camera.key === payload.key);
if (objCamera) {
// console.log("found existing Camera", objCamera.id);
payload.edit = false;
objCamera.name = payload.name;
}
else {
// console.log("creating new Camera");
payload.edit = false;
state.inventory.push(payload);
}
return payload.id;
return payload.key;
},
setCameraActiveState(state, payload) {
// console.log("setCameraActiveState", payload);
state.cameras.map((camera) => camera.active = false);
const objCamera = state.cameras.find((camera) => camera.id === payload.id);
objCamera.active = payload.active;
storeNameKey(state, payload) {
const objNK = state[payload.storeType].find((item) => item.key === payload.itemOld.key);
if (objNK.key)
objNK.key = payload.item.key;
objNK.name = payload.item.name;
objNK.description = payload.item.description;
},
setCameraEditState(state, payload) {
state.cameras.map((camera) => camera.edit = false);
const objCamera = state.cameras.find((camera) => camera.id === payload.id);
objCamera.edit = payload.edit;
insertNameKey(state, payload) {
const objNK = state[payload.storeType].find((item) => item.key === payload.item.key);
if (objNK)
throw new Error("Key already exists");
state[payload.storeType].push(payload.item);
},
setItemActiveState(state, payload) {
console.log("mutation.setItemActiveState");
state.inventory.map((item) => item.active = false);
const objItem = state.inventory.find((itemId) => itemId.key === payload.key);
objItem.active = payload.active;
console.log("Result of mutation", objItem);
},
setItemEditState(state, payload) {
state.inventory.map((item) => item.edit = false);
const objItem = state.inventory.find((camera) => camera.key === payload.key);
objItem.edit = payload.edit;
},
setNameKeys(state, payload) {
const field = payload.namekey_type;
@ -81,9 +149,72 @@ const mutations = {
},
setInitialized(state, payload) {
state.isInitialized = payload;
},
storeInventoryDescription(state, payload) {
const objItem = state.inventory.find((item) => item.key === payload.key);
objItem.description = payload.description;
objItem.changed = new Date();
db.saveItem(objItem, "inventory").then((res) => {
console.log("DB-Save resolved", res);
}).catch((e) => console.log(e));
},
storeInventoryLensDetail(state, payload) {
console.log("storeInventoryLensDetail", payload);
const objItem = state.inventory.find((item) => item.key === payload.key);
objItem.focal_length_max = payload.item.focal_length_max;
objItem.focal_length_min = payload.item.focal_length_min;
objItem.autofocus = payload.item.autofocus;
objItem.year_of_production = payload.item.year_of_production;
objItem.aperture_max = payload.item.aperture_max;
objItem.changed = new Date();
db.saveItem(objItem, "inventory").then((res) => {
console.log("DB-Save resolved", res);
}).catch((e) => console.log(e));
},
storeInventoryCollectionInfo(state, payload) {
const objItem = state.inventory.find((item) => item.key === payload.key);
objItem.year_of_purchase = payload.item.year_of_purchase;
objItem.condition_key = payload.item.condition_key;
objItem.price_current = payload.item.price_current;
objItem.price_historic = payload.item.price_historic;
objItem.price_purchased = payload.item.price_purchased;
objItem.changed = new Date();
db.saveItem(objItem, "inventory").then((res) => {
console.log("DB-Save resolved", res);
}).catch((e) => console.log(e));
},
storeInventoryCameraDetails(state, payload) {
const objItem = state.inventory.find((item) => item.key === payload.key);
objItem.brand_key = payload.item.brand_key;
objItem.manufacturer_key = payload.item.manufacturer_key;
objItem.mount_key = payload.item.mount_key;
objItem.buildtype_key = payload.item.buildtype_key;
objItem.media_key = payload.item.media_key;
objItem.year_of_production = payload.item.year_of_production;
objItem.year_manufactured_from = payload.item.year_manufactured_from;
objItem.year_manufactured_to = payload.item.year_manufactured_to;
objItem.light_measure_method = payload.item.light_measure_method;
objItem.changed = new Date();
db.saveItem(objItem, "inventory").then((res) => {
console.log("DB-Save resolved", res);
}).catch((e) => console.log(e));
}
};
const actions = {
storeNameKeyObject(context, payload) {
console.log("actions.storeNameKeyObject", payload);
db.saveItem(payload.item, payload.storeType).then((res) => {
console.log("Item stored in Database");
});
context.commit("storeNameKey", payload.item);
},
insertNameKeyObject(context, payload) {
console.log("actions.insertNameKeyObject", payload);
db.saveItem(payload.item, payload.storeType).then((res) => {
console.log("Item stored in Database");
});
context.commit("insertNameKey", payload);
},
fetchNameKeys(context, payload) {
const field = payload.namekey_type;
db.getItems(field).then((items) => {
@ -94,74 +225,84 @@ const actions = {
});
},
fetchInventory(context, payload) {
const field = payload.namekey_type;
db.getItems(field).then((items) => {
console.log("action.fetchInventory");
db.getItems("inventory").then((items) => {
context.commit("setInventory", items);
});
},
setCameraActiveState(context, payload) {
console.log("action.setCameraActiveState", payload);
const cameraObj = state.inventory.find((camera) => camera.item_type === "camera" && camera.id === payload.cameraId);
context.commit("setCameraActiveState", { id: payload.cameraId, active: payload.active });
setItemActiveState(context, payload) {
context.commit("setItemActiveState", { key: payload.key, active: payload.active });
},
setCameraEditState(context, payload) {
console.log("action.setCameraEditState", payload);
const cameraObj = state.inventory.find((camera) => camera.item_type === "camera" && camera.id === payload.cameraId);
context.commit("setCameraEditState", { id: payload.cameraId, edit: payload.edit });
setItemEditState(context, payload) {
console.log("action.setItemEditState", payload);
context.commit("setItemEditState", { key: payload.key, edit: payload.edit });
},
storeCamera(context, payload) {
// console.log("action.storeCamera", payload)
if (!payload.id)
payload.id = uuidv4();
//console.log(" ... with id ", payload.id);
if (!payload.key)
payload.key = uuidv4();
//console.log(" ... with key ", payload.key);
//console.log("Try to save to indexDB");
db.saveItem(payload, "cameras").then((res) => {
db.saveItem(payload, "inventory").then((res) => {
console.log("DB-Save resolved", res);
});
}).catch((e) => console.log(e));
context.commit("storeCamera", payload);
context.commit("setCameraActiveState", { cameraId: payload.id, active: true });
context.commit("setCameraActiveState", { cameraId: payload.key, active: true });
},
storeInventoryDescription(context, payload) {
context.commit("storeInventoryDescription", payload);
},
storeInventoryLensDetail(context, payload) {
context.commit("storeInventoryLensDetail", payload);
},
storeInventoryCollectionInfo(context, payload) {
context.commit("storeInventoryCollectionInfo", payload);
},
storeInventoryCameraDetails(context, payload) {
context.commit("storeInventoryCameraDetails", payload);
},
loadDataFromLocalDB(context) {
console.log("action.loadDataFromLocalDB");
const storeActions = [];
for (const store of stores) {
if (store.type == "object") {
storeActions.push(context.dispatch("fetchInventory"));
}
else {
storeActions.push(context.dispatch("fetchNameKeys", { namekey_type: store.id }));
}
}
Promise.all(storeActions).then(() => {
context.commit("setInitialized", true);
});
},
initialize(context, payload) {
const stores = [
"inventory",
"brands",
"conditiosn",
"buildtypes",
"medias",
"mounts",
"sets"
];
db.getDb(stores);
db.initDb(stores).then(() => {
const promises = [];
const seedVersion = localStorage.getItem("SEED_VERSION") || 0;
if (payload.seed && seedVersion < SEED_VERSION) {
console.log("SEEDING database");
for (const store of stores) {
promises.push(db.saveItems(seed[store], store));
promises.push(db.saveItems(seed[store.id], store.id));
}
localStorage.setItem("SEED_VERSION", seed.SEED_VERSION.toString());
}
else {
console.log("SEEDING skipped");
context.dispatch("loadDataFromLocalDB")
.then(() => console.log("Store Data loaded"))
.catch((e) => console.log("Error loading StoreData", e));
}
Promise.all(promises).then((e) => {
console.log("All written to store");
for (const store of stores) {
if (store === "inventory")
context.dispatch("fetchInventory");
context.dispatch("fetchNameKeys", { namekey_type: store });
}
context.commit("setInitialized", true);
});
}
};
const modules = {};
const cameraModule = {
const inventoryModule = {
state,
getters,
mutations,
actions,
modules
};
export default cameraModule;
export default inventoryModule;
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View File

@ -81,14 +81,12 @@ const getters = {
filtermounts: (state: any) => state.filtermounts,
filtermount: (state: any) => (key: any) => state.filtermounts.find((item: any) => item.key === key),
conditions: (state: any) => state.conditions,
condition: (state: any) => (key: any) => state.conditions.find((condition: any) => condition.key === key),
sets: (state: any) => state.inventory.find((item:InventoryItem) => item.item_type === "set" ),
set: (state: any) => (key: any) => state.inventory.find((item: any) => item.key === key),
medias: (state: any) => state.medias,
media: (state: any) => (key: any) => state.medias.find((media: any) => media.key === key),
@ -193,7 +191,56 @@ const mutations = {
db.saveItem(objItem , "inventory").then( (res) => {
console.log("DB-Save resolved", res )}
).catch((e)=> console.log(e));
},
storeInventoryLensDetail(state:any, payload:any) {
console.log("storeInventoryLensDetail",payload);
const objItem = <Lens>state.inventory.find((item:InventoryItem) => item.key === payload.key);
objItem.focal_length_max = payload.item.focal_length_max;
objItem.focal_length_min = payload.item.focal_length_min;
objItem.autofocus = payload.item.autofocus;
objItem.year_of_production = payload.item.year_of_production;
objItem.aperture_max = payload.item.aperture_max;
objItem.changed = new Date();
db.saveItem(objItem , "inventory").then( (res) => {
console.log("DB-Save resolved", res )}
).catch((e)=> console.log(e));
},
storeInventoryCollectionInfo(state:any, payload:any) {
const objItem = <InventoryItem>state.inventory.find((item:InventoryItem) => item.key === payload.key);
objItem.year_of_purchase = payload.item.year_of_purchase;
objItem.condition_key = payload.item.condition_key;
objItem.price_current = payload.item.price_current;
objItem.price_historic = payload.item.price_historic;
objItem.price_purchased = payload.item.price_purchased;
objItem.changed = new Date();
db.saveItem(objItem , "inventory").then( (res) => {
console.log("DB-Save resolved", res )}
).catch((e)=> console.log(e));
},
storeInventoryCameraDetails(state:any, payload:any) {
const objItem = <Camera>state.inventory.find((item:InventoryItem) => item.key === payload.key);
objItem.brand_key = payload.item.brand_key;
objItem.manufacturer_key = payload.item.manufacturer_key;
objItem.mount_key = payload.item.mount_key;
objItem.buildtype_key = payload.item.buildtype_key;
objItem.media_key = payload.item.media_key;
objItem.year_of_production = payload.item.year_of_production;
objItem.year_manufactured_from = payload.item.year_manufactured_from;
objItem.year_manufactured_to = payload.item.year_manufactured_to;
objItem.light_measure_method = payload.item.light_measure_method;
objItem.changed = new Date();
db.saveItem(objItem , "inventory").then( (res) => {
console.log("DB-Save resolved", res )}
).catch((e)=> console.log(e));
}
@ -277,6 +324,19 @@ const actions = {
},
storeInventoryLensDetail(context:ActionContext<any, any>, payload:{key:string, item:Lens}) {
context.commit("storeInventoryLensDetail", payload)
},
storeInventoryCollectionInfo(context:ActionContext<any, any>, payload:{key:string, item:InventoryItem}) {
context.commit("storeInventoryCollectionInfo", payload);
},
storeInventoryCameraDetails(context:ActionContext<any, any>, payload:{key:string, item:Camera}) {
context.commit("storeInventoryCameraDetails", payload);
},
loadDataFromLocalDB(context:ActionContext<any, any>) {
console.log("action.loadDataFromLocalDB")
const storeActions = [];