Merge pull request #5151 from freesewing/joost
fix(markdown): Remove import of skully docs
This commit is contained in:
commit
5d03d146f7
4 changed files with 9 additions and 29 deletions
|
@ -2,7 +2,5 @@
|
||||||
title: Skully
|
title: Skully
|
||||||
---
|
---
|
||||||
|
|
||||||
import { DesignInfo } from 'shared/components/designs/info.mjs'
|
|
||||||
|
|
||||||
<DesignInfo design='skully' docs />
|
<DesignInfo design='skully' docs />
|
||||||
|
|
||||||
|
|
|
@ -140,13 +140,8 @@ model CuratedSet {
|
||||||
notesFr String @default("")
|
notesFr String @default("")
|
||||||
notesNl String @default("")
|
notesNl String @default("")
|
||||||
notesUk String @default("")
|
notesUk String @default("")
|
||||||
tagsDe String @default("{}")
|
tags String @default("{}")
|
||||||
tagsEn String @default("{}")
|
measies String @default("[]")
|
||||||
tagsEs String @default("{}")
|
|
||||||
tagsFr String @default("{}")
|
|
||||||
tagsNl String @default("{}")
|
|
||||||
tagsUk String @default("{}")
|
|
||||||
measies String @default("{}")
|
|
||||||
patterns Pattern[]
|
patterns Pattern[]
|
||||||
updatedAt DateTime @updatedAt
|
updatedAt DateTime @updatedAt
|
||||||
published Boolean @default(false)
|
published Boolean @default(false)
|
||||||
|
@ -169,12 +164,7 @@ model OptionPack {
|
||||||
notesFr String @default("")
|
notesFr String @default("")
|
||||||
notesNl String @default("")
|
notesNl String @default("")
|
||||||
notesUk String @default("")
|
notesUk String @default("")
|
||||||
tagsDe String @default("{}")
|
tags String @default("[]")
|
||||||
tagsEn String @default("{}")
|
|
||||||
tagsEs String @default("{}")
|
|
||||||
tagsFr String @default("{}")
|
|
||||||
tagsNl String @default("{}")
|
|
||||||
tagsUk String @default("{}")
|
|
||||||
options String @default("{}")
|
options String @default("{}")
|
||||||
updatedAt DateTime @updatedAt
|
updatedAt DateTime @updatedAt
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { decorateModel } from '../utils/model-decorator.mjs'
|
||||||
export function CuratedSetModel(tools) {
|
export function CuratedSetModel(tools) {
|
||||||
return decorateModel(this, tools, {
|
return decorateModel(this, tools, {
|
||||||
name: 'curatedSet',
|
name: 'curatedSet',
|
||||||
jsonFields: ['measies', 'tagsDe', 'tagsEn', 'tagsEs', 'tagsFr', 'tagsNl', 'tagsUk'],
|
jsonFields: ['measies', 'tags'],
|
||||||
models: ['confirmation', 'set'],
|
models: ['confirmation', 'set'],
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -48,9 +48,8 @@ CuratedSetModel.prototype.guardedCreate = async function ({ body, user }) {
|
||||||
const key = field + capitalize(lang)
|
const key = field + capitalize(lang)
|
||||||
if (body[key] && typeof body[key] === 'string') data[key] = body[key]
|
if (body[key] && typeof body[key] === 'string') data[key] = body[key]
|
||||||
}
|
}
|
||||||
const key = 'tags' + capitalize(lang)
|
|
||||||
if (body[key] && Array.isArray(body[key])) data[key] = JSON.stringify(body[key])
|
|
||||||
}
|
}
|
||||||
|
if (body.tags && Array.isArray(body.tags)) data.tags = JSON.stringify(body.tags)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add the (sanitized) measurements if there are any
|
* Add the (sanitized) measurements if there are any
|
||||||
|
@ -147,10 +146,7 @@ CuratedSetModel.prototype.allCuratedSets = async function () {
|
||||||
* See https://github.com/prisma/prisma/issues/3786
|
* See https://github.com/prisma/prisma/issues/3786
|
||||||
*/
|
*/
|
||||||
asPojo.measies = JSON.parse(asPojo.measies)
|
asPojo.measies = JSON.parse(asPojo.measies)
|
||||||
for (const lang of this.config.languages) {
|
asPojo.tags = JSON.parse(asPojo.tags)
|
||||||
const key = `tags${capitalize(lang)}`
|
|
||||||
asPojo[key] = JSON.parse(asPojo[key] || [])
|
|
||||||
}
|
|
||||||
list.push(asPojo)
|
list.push(asPojo)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { decorateModel } from '../utils/model-decorator.mjs'
|
||||||
export function OptionPackModel(tools) {
|
export function OptionPackModel(tools) {
|
||||||
return decorateModel(this, tools, {
|
return decorateModel(this, tools, {
|
||||||
name: 'optionPack',
|
name: 'optionPack',
|
||||||
jsonFields: ['options', 'tagsDe', 'tagsEn', 'tagsEs', 'tagsFr', 'tagsNl', 'tagsUk'],
|
jsonFields: ['options', 'tags'],
|
||||||
models: ['confirmation'],
|
models: ['confirmation'],
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -54,9 +54,8 @@ OptionPackModel.prototype.guardedCreate = async function ({ body, user }) {
|
||||||
const key = field + capitalize(lang)
|
const key = field + capitalize(lang)
|
||||||
if (body[key] && typeof body[key] === 'string') data[key] = body[key]
|
if (body[key] && typeof body[key] === 'string') data[key] = body[key]
|
||||||
}
|
}
|
||||||
const key = 'tags' + capitalize(lang)
|
|
||||||
if (body[key] && Array.isArray(body[key])) data[key] = JSON.stringify(body[key])
|
|
||||||
}
|
}
|
||||||
|
if (body.tags && Array.isArray(body.tags)) data.tags = JSON.stringify(body.tags)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add the options if there are any
|
* Add the options if there are any
|
||||||
|
@ -147,10 +146,7 @@ OptionPackModel.prototype.allOptionPacks = async function () {
|
||||||
* See https://github.com/prisma/prisma/issues/3786
|
* See https://github.com/prisma/prisma/issues/3786
|
||||||
*/
|
*/
|
||||||
asPojo.options = JSON.parse(asPojo.options)
|
asPojo.options = JSON.parse(asPojo.options)
|
||||||
for (const lang of this.config.languages) {
|
asPojo.tags = JSON.parse(asPojo.tags || [])
|
||||||
const key = `tags${capitalize(lang)}`
|
|
||||||
asPojo[key] = JSON.parse(asPojo[key] || [])
|
|
||||||
}
|
|
||||||
list.push(asPojo)
|
list.push(asPojo)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue