0.1.8 - RC-4

This commit is contained in:
Elvanos 2021-07-06 02:39:40 +02:00
parent ce17700659
commit 7b27ba437a
4 changed files with 22 additions and 15 deletions

View file

@ -653,11 +653,17 @@ export default class BaseClass extends Vue {
checkForLegacyDocuments () {
return this.SGET_allDocuments.docs.filter(doc => {
const localBlueprint = this.SGET_blueprint(doc.type)
const docSnapShot: I_ShortenedDocument = extend(true, {}, doc)
const localBlueprint = this.SGET_blueprint(docSnapShot.type)
let hasLegacyValue = false
for (const field of doc.extraFields) {
for (const field of docSnapShot.extraFields) {
const pairedBlueprintField = localBlueprint.extraFields.find(e => e.id === field.id)
if (pairedBlueprintField && pairedBlueprintField.isLegacy) {
if (docSnapShot._id === "e1e24951-e2af-4513-8e4c-50fb93fd94d9") {
console.log(field.id)
}
if (pairedBlueprintField && pairedBlueprintField.isLegacy && !hasLegacyValue) {
const value = field.value
if (!value ||
@ -666,10 +672,10 @@ export default class BaseClass extends Vue {
(value?.value?.length === 0) ||
// @ts-ignore
(value.value === null)) {
return false
}
hasLegacyValue = true
break
else {
hasLegacyValue = true
}
}
}

View file

@ -18,6 +18,7 @@
- Fixed a bug that was causing the predefined select list sometimes completely disappear along with the whole select in the single-select field when filtering (eg: Sex field)
- Slightly improved performance when loading the project for the first time
- Fixed a bug in PDF export that was causing export crashes in case of line breaks present in the list/relationship field notes
- Fixed a bug causing some of the legacy field detection to miss some types of legacy fields sometimes
### New features

View file

@ -10,7 +10,7 @@ export const charactersBlueprint: I_Blueprint = {
extraFields: [
{
id: "pairedCurrentLocation",
name: "Place of residence",
name: "Place of residence (legacy)",
type: "singleToManyRelationship",
icon: "mdi-map-marker-radius",
sizing: 12,
@ -29,7 +29,7 @@ export const charactersBlueprint: I_Blueprint = {
},
{
id: "pairedOriginLocation",
name: "Place of origin",
name: "Place of origin (legacy)",
type: "singleToManyRelationship",
icon: "mdi-map-marker-radius",
sizing: 12,
@ -48,7 +48,7 @@ export const charactersBlueprint: I_Blueprint = {
},
{
id: "pairedDemiseLocation",
name: "Place of demise",
name: "Place of demise (legacy)",
type: "singleToManyRelationship",
icon: "mdi-map-marker-radius",
sizing: 12,
@ -67,7 +67,7 @@ export const charactersBlueprint: I_Blueprint = {
},
{
id: "pairedMagic",
name: "Known Magic/Spells",
name: "Known Magic/Spells (legacy)",
type: "manyToManyRelationship",
icon: "fas fa-hat-wizard",
sizing: 12,
@ -86,7 +86,7 @@ export const charactersBlueprint: I_Blueprint = {
},
{
id: "pairedTech",
name: "Known Technologies/Sciences",
name: "Known Technologies/Sciences (legacy)",
type: "manyToManyRelationship",
icon: "fas fa-wrench",
tooltip: `
@ -105,7 +105,7 @@ export const charactersBlueprint: I_Blueprint = {
},
{
id: "skills",
name: "Skills",
name: "Skills (legacy)",
type: "list",
icon: "mdi-sword",
sizing: 12,

View file

@ -9,7 +9,7 @@ export const locationsBlueprint: I_Blueprint = {
extraFields: [
{
id: "pairedOriginCharacters",
name: "Characters originated from the location",
name: "Characters originated from the location (legacy)",
type: "manyToSingleRelationship",
icon: "mdi-account",
sizing: 12,
@ -28,7 +28,7 @@ export const locationsBlueprint: I_Blueprint = {
},
{
id: "pairedCurrentCharacters",
name: "Characters currently living in the location",
name: "Characters currently living in the location (legacy)",
type: "manyToSingleRelationship",
icon: "mdi-account",
sizing: 12,
@ -47,7 +47,7 @@ export const locationsBlueprint: I_Blueprint = {
},
{
id: "pairedDemiseCharacters",
name: "Characters deceased at the location",
name: "Characters deceased at the location (legacy)",
type: "manyToSingleRelationship",
icon: "mdi-account",
sizing: 12,