✨ lint
This commit is contained in:
parent
37f539c5a9
commit
784fac5018
|
@ -93,7 +93,7 @@
|
||||||
{...props}
|
{...props}
|
||||||
name={key} />
|
name={key} />
|
||||||
</div>
|
</div>
|
||||||
{#if control === Input && !key.startsWith("_")}
|
{#if control === Input && !key.startsWith('_')}
|
||||||
<button data-cy={`${key}-binding-button`} on:click={dropdown.show}>
|
<button data-cy={`${key}-binding-button`} on:click={dropdown.show}>
|
||||||
<Icon name="edit" />
|
<Icon name="edit" />
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -116,7 +116,7 @@
|
||||||
control={definition.control}
|
control={definition.control}
|
||||||
label={definition.label}
|
label={definition.label}
|
||||||
key={definition.key}
|
key={definition.key}
|
||||||
value={componentInstance[definition.key]|| componentInstance[definition.key].defaultValue}
|
value={componentInstance[definition.key] || componentInstance[definition.key].defaultValue}
|
||||||
{componentInstance}
|
{componentInstance}
|
||||||
{onChange}
|
{onChange}
|
||||||
props={{ ...excludeProps(definition, ['control', 'label']) }} />
|
props={{ ...excludeProps(definition, ['control', 'label']) }} />
|
||||||
|
|
|
@ -516,10 +516,30 @@ export default {
|
||||||
key: "datasource",
|
key: "datasource",
|
||||||
control: ModelViewSelect,
|
control: ModelViewSelect,
|
||||||
},
|
},
|
||||||
{ label: "Stripe Color", key: "stripeColor", control: Colorpicker, defaultValue: "#FFFFFF" },
|
{
|
||||||
{ label: "Border Color", key: "borderColor", control: Colorpicker, defaultValue: "#FFFFFF" },
|
label: "Stripe Color",
|
||||||
{ label: "TH Color", key: "backgroundColor", control: Colorpicker, defaultValue: "#FFFFFF" },
|
key: "stripeColor",
|
||||||
{ label: "TH Font Color", key: "color", control: Colorpicker, defaultValue: "#FFFFFF" },
|
control: Colorpicker,
|
||||||
|
defaultValue: "#FFFFFF",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Border Color",
|
||||||
|
key: "borderColor",
|
||||||
|
control: Colorpicker,
|
||||||
|
defaultValue: "#FFFFFF",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "TH Color",
|
||||||
|
key: "backgroundColor",
|
||||||
|
control: Colorpicker,
|
||||||
|
defaultValue: "#FFFFFF",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "TH Font Color",
|
||||||
|
key: "color",
|
||||||
|
control: Colorpicker,
|
||||||
|
defaultValue: "#FFFFFF",
|
||||||
|
},
|
||||||
{ label: "Table", key: "model", control: ModelSelect },
|
{ label: "Table", key: "model", control: ModelSelect },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
|
@ -25,7 +25,7 @@ exports.save = async function(ctx) {
|
||||||
...ctx.request.body,
|
...ctx.request.body,
|
||||||
}
|
}
|
||||||
|
|
||||||
// rename record fields when table column is renamed
|
// rename record fields when table column is renamed
|
||||||
const { _rename } = modelToSave
|
const { _rename } = modelToSave
|
||||||
if (_rename) {
|
if (_rename) {
|
||||||
const records = await db.query(`database/all_${modelToSave._id}`, {
|
const records = await db.query(`database/all_${modelToSave._id}`, {
|
||||||
|
@ -41,7 +41,7 @@ exports.save = async function(ctx) {
|
||||||
delete modelToSave._rename
|
delete modelToSave._rename
|
||||||
}
|
}
|
||||||
|
|
||||||
// update schema of non-statistics views when new columns are added
|
// update schema of non-statistics views when new columns are added
|
||||||
for (let view in modelToSave.views) {
|
for (let view in modelToSave.views) {
|
||||||
const modelView = modelToSave.views[view]
|
const modelView = modelToSave.views[view]
|
||||||
if (!modelView) continue
|
if (!modelView) continue
|
||||||
|
|
|
@ -105,7 +105,7 @@ function viewTemplate({ field, modelId, groupBy, filters = [], calculation }) {
|
||||||
if (calculation) {
|
if (calculation) {
|
||||||
schema = {
|
schema = {
|
||||||
...(groupBy ? GROUP_PROPERTY : FIELD_PROPERTY),
|
...(groupBy ? GROUP_PROPERTY : FIELD_PROPERTY),
|
||||||
...SCHEMA_MAP[calculation]
|
...SCHEMA_MAP[calculation],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,6 @@
|
||||||
([field, message]) => `${field} ${message}`
|
([field, message]) => `${field} ${message}`
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async function fetchModel() {
|
async function fetchModel() {
|
||||||
const FETCH_MODEL_URL = `/api/models/${model}`
|
const FETCH_MODEL_URL = `/api/models/${model}`
|
||||||
const response = await _bb.api.get(FETCH_MODEL_URL)
|
const response = await _bb.api.get(FETCH_MODEL_URL)
|
||||||
|
|
Loading…
Reference in New Issue