Add support for Buefy 0.9.x

or: add hacks to continue supporting Buefy 0.8.x

..depending on your perspective
This commit is contained in:
Lance Edgar 2022-12-22 20:49:20 -06:00
parent 7ccd9ad896
commit 6fbc79fe5e
17 changed files with 753 additions and 119 deletions

View file

@ -26,6 +26,8 @@ Rattail config extension for Tailbone
from __future__ import unicode_literals, absolute_import from __future__ import unicode_literals, absolute_import
from pkg_resources import parse_version
from rattail.config import ConfigExtension as BaseExtension from rattail.config import ConfigExtension as BaseExtension
from rattail.db.config import configure_session from rattail.db.config import configure_session
@ -61,6 +63,16 @@ def csrf_header_name(config):
return config.get('tailbone', 'csrf_header_name', default='X-CSRF-TOKEN') return config.get('tailbone', 'csrf_header_name', default='X-CSRF-TOKEN')
def get_buefy_version(config):
return config.get('tailbone', 'buefy_version') or '0.8.17'
def get_buefy_0_8(config, version=None):
if not version:
version = get_buefy_version(config)
return parse_version(version) < parse_version('0.9')
def global_help_url(config): def global_help_url(config):
return config.get('tailbone', 'global_help_url') return config.get('tailbone', 'global_help_url')

View file

@ -40,7 +40,8 @@ from webhelpers2.html import tags
import tailbone import tailbone
from tailbone import helpers from tailbone import helpers
from tailbone.db import Session from tailbone.db import Session
from tailbone.config import csrf_header_name, should_expose_websockets from tailbone.config import (csrf_header_name, should_expose_websockets,
get_buefy_version, get_buefy_0_8)
from tailbone.menus import make_simple_menus from tailbone.menus import make_simple_menus
from tailbone.util import should_use_buefy from tailbone.util import should_use_buefy
@ -164,8 +165,10 @@ def before_render(event):
# perhaps too much so, but at least they should work fine. # perhaps too much so, but at least they should work fine.
renderer_globals['vue_version'] = request.rattail_config.get( renderer_globals['vue_version'] = request.rattail_config.get(
'tailbone', 'vue_version') or '2.6.10' 'tailbone', 'vue_version') or '2.6.10'
renderer_globals['buefy_version'] = request.rattail_config.get( version = get_buefy_version(rattail_config)
'tailbone', 'buefy_version') or '0.8.13' renderer_globals['buefy_version'] = version
renderer_globals['buefy_0_8'] = get_buefy_0_8(rattail_config,
version=version)
# maybe set custom stylesheet # maybe set custom stylesheet
css = None css = None

View file

@ -866,16 +866,24 @@
paginated paginated
per-page="5" per-page="5"
:debounce-search="1000"> :debounce-search="1000">
% if buefy_0_8:
<template slot-scope="props"> <template slot-scope="props">
% endif
<b-table-column :label="productKeyLabel" <b-table-column :label="productKeyLabel"
field="key" field="key"
% if not buefy_0_8:
v-slot="props"
% endif
sortable> sortable>
{{ props.row.key }} {{ props.row.key }}
</b-table-column> </b-table-column>
<b-table-column label="Brand" <b-table-column label="Brand"
field="brand_name" field="brand_name"
% if not buefy_0_8:
v-slot="props"
% endif
sortable sortable
searchable> searchable>
{{ props.row.brand_name }} {{ props.row.brand_name }}
@ -883,6 +891,9 @@
<b-table-column label="Description" <b-table-column label="Description"
field="description" field="description"
% if not buefy_0_8:
v-slot="props"
% endif
sortable sortable
searchable> searchable>
{{ props.row.description }} {{ props.row.description }}
@ -891,12 +902,18 @@
<b-table-column label="Unit Price" <b-table-column label="Unit Price"
field="unit_price" field="unit_price"
% if not buefy_0_8:
v-slot="props"
% endif
sortable> sortable>
{{ props.row.unit_price_display }} {{ props.row.unit_price_display }}
</b-table-column> </b-table-column>
<b-table-column label="Sale Price" <b-table-column label="Sale Price"
field="sale_price" field="sale_price"
% if not buefy_0_8:
v-slot="props"
% endif
sortable> sortable>
<span class="has-background-warning"> <span class="has-background-warning">
{{ props.row.sale_price_display }} {{ props.row.sale_price_display }}
@ -905,6 +922,9 @@
<b-table-column label="Sale Ends" <b-table-column label="Sale Ends"
field="sale_ends" field="sale_ends"
% if not buefy_0_8:
v-slot="props"
% endif
sortable> sortable>
<span class="has-background-warning"> <span class="has-background-warning">
{{ props.row.sale_ends_display }} {{ props.row.sale_ends_display }}
@ -913,6 +933,9 @@
<b-table-column label="Department" <b-table-column label="Department"
field="department_name" field="department_name"
% if not buefy_0_8:
v-slot="props"
% endif
sortable sortable
searchable> searchable>
{{ props.row.department_name }} {{ props.row.department_name }}
@ -920,12 +943,17 @@
<b-table-column label="Vendor" <b-table-column label="Vendor"
field="vendor_name" field="vendor_name"
% if not buefy_0_8:
v-slot="props"
% endif
sortable sortable
searchable> searchable>
{{ props.row.vendor_name }} {{ props.row.vendor_name }}
</b-table-column> </b-table-column>
% if buefy_0_8:
</template> </template>
% endif
<template slot="empty"> <template slot="empty">
<div class="content has-text-grey has-text-centered"> <div class="content has-text-grey has-text-centered">
<p> <p>
@ -961,33 +989,63 @@
<b-table v-if="items.length" <b-table v-if="items.length"
:data="items" :data="items"
:row-class="(row, i) => row.product_uuid ? null : 'has-text-success'"> :row-class="(row, i) => row.product_uuid ? null : 'has-text-success'">
% if buefy_0_8:
<template slot-scope="props"> <template slot-scope="props">
% endif
<b-table-column :label="productKeyLabel"> <b-table-column :label="productKeyLabel"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.product_key }} {{ props.row.product_key }}
</b-table-column> </b-table-column>
<b-table-column label="Brand"> <b-table-column label="Brand"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.product_brand }} {{ props.row.product_brand }}
</b-table-column> </b-table-column>
<b-table-column label="Description"> <b-table-column label="Description"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.product_description }} {{ props.row.product_description }}
</b-table-column> </b-table-column>
<b-table-column label="Size"> <b-table-column label="Size"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.product_size }} {{ props.row.product_size }}
</b-table-column> </b-table-column>
<b-table-column label="Department"> <b-table-column label="Department"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.department_display }} {{ props.row.department_display }}
</b-table-column> </b-table-column>
<b-table-column label="Quantity"> <b-table-column label="Quantity"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-html="props.row.order_quantity_display"></span> <span v-html="props.row.order_quantity_display"></span>
</b-table-column> </b-table-column>
<b-table-column label="Unit Price"> <b-table-column label="Unit Price"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span <span
% if product_price_may_be_questionable: % if product_price_may_be_questionable:
:class="props.row.price_needs_confirmation ? 'has-background-warning' : ''" :class="props.row.price_needs_confirmation ? 'has-background-warning' : ''"
@ -1000,12 +1058,20 @@
</b-table-column> </b-table-column>
% if allow_item_discounts: % if allow_item_discounts:
<b-table-column label="Discount"> <b-table-column label="Discount"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.discount_percent }}{{ props.row.discount_percent ? " %" : "" }} {{ props.row.discount_percent }}{{ props.row.discount_percent ? " %" : "" }}
</b-table-column> </b-table-column>
% endif % endif
<b-table-column label="Total"> <b-table-column label="Total"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span <span
% if product_price_may_be_questionable: % if product_price_may_be_questionable:
:class="props.row.price_needs_confirmation ? 'has-background-warning' : ''" :class="props.row.price_needs_confirmation ? 'has-background-warning' : ''"
@ -1017,11 +1083,20 @@
</span> </span>
</b-table-column> </b-table-column>
<b-table-column label="Vendor"> <b-table-column label="Vendor"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.vendor_display }} {{ props.row.vendor_display }}
</b-table-column> </b-table-column>
<b-table-column field="actions" label="Actions"> <b-table-column field="actions"
label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
<a href="#" class="grid-action" <a href="#" class="grid-action"
@click.prevent="showEditItemDialog(props.row)"> @click.prevent="showEditItemDialog(props.row)">
<i class="fas fa-edit"></i> <i class="fas fa-edit"></i>
@ -1037,7 +1112,9 @@
&nbsp; &nbsp;
</b-table-column> </b-table-column>
% if buefy_0_8:
</template> </template>
% endif
</b-table> </b-table>
</div> </div>
</div> </div>

View file

@ -106,47 +106,95 @@
:checked-rows.sync="changeStatusCheckedRows" :checked-rows.sync="changeStatusCheckedRows"
narrowed narrowed
class="is-size-7"> class="is-size-7">
% if buefy_0_8:
<template slot-scope="props"> <template slot-scope="props">
<b-table-column field="product_brand" label="Brand"> % endif
<b-table-column field="product_brand" label="Brand"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-html="props.row.product_brand"></span> <span v-html="props.row.product_brand"></span>
</b-table-column> </b-table-column>
<b-table-column field="product_description" label="Product"> <b-table-column field="product_description" label="Product"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-html="props.row.product_description"></span> <span v-html="props.row.product_description"></span>
</b-table-column> </b-table-column>
<!-- <b-table-column field="quantity" label="Quantity"> --> <!-- <b-table-column field="quantity" label="Quantity"> -->
<!-- <span v-html="props.row.quantity"></span> --> <!-- <span v-html="props.row.quantity"></span> -->
<!-- </b-table-column> --> <!-- </b-table-column> -->
<b-table-column field="product_case_quantity" label="cPack"> <b-table-column field="product_case_quantity" label="cPack"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-html="props.row.product_case_quantity"></span> <span v-html="props.row.product_case_quantity"></span>
</b-table-column> </b-table-column>
<b-table-column field="order_quantity" label="oQty"> <b-table-column field="order_quantity" label="oQty"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-html="props.row.order_quantity"></span> <span v-html="props.row.order_quantity"></span>
</b-table-column> </b-table-column>
<b-table-column field="order_uom" label="UOM"> <b-table-column field="order_uom" label="UOM"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-html="props.row.order_uom"></span> <span v-html="props.row.order_uom"></span>
</b-table-column> </b-table-column>
<b-table-column field="department_name" label="Department"> <b-table-column field="department_name" label="Department"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-html="props.row.department_name"></span> <span v-html="props.row.department_name"></span>
</b-table-column> </b-table-column>
<b-table-column field="product_barcode" label="Product Barcode"> <b-table-column field="product_barcode" label="Product Barcode"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-html="props.row.product_barcode"></span> <span v-html="props.row.product_barcode"></span>
</b-table-column> </b-table-column>
<b-table-column field="unit_price" label="Unit $"> <b-table-column field="unit_price" label="Unit $"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-html="props.row.unit_price"></span> <span v-html="props.row.unit_price"></span>
</b-table-column> </b-table-column>
<b-table-column field="total_price" label="Total $"> <b-table-column field="total_price" label="Total $"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-html="props.row.total_price"></span> <span v-html="props.row.total_price"></span>
</b-table-column> </b-table-column>
<b-table-column field="order_date" label="Order Date"> <b-table-column field="order_date" label="Order Date"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-html="props.row.order_date"></span> <span v-html="props.row.order_date"></span>
</b-table-column> </b-table-column>
<b-table-column field="status_code" label="Status"> <b-table-column field="status_code" label="Status"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-html="props.row.status_code"></span> <span v-html="props.row.status_code"></span>
</b-table-column> </b-table-column>
<!-- <b-table-column field="flagged" label="Flagged"> --> <!-- <b-table-column field="flagged" label="Flagged"> -->
<!-- <span v-html="props.row.flagged"></span> --> <!-- <span v-html="props.row.flagged"></span> -->
<!-- </b-table-column> --> <!-- </b-table-column> -->
% if buefy_0_8:
</template> </template>
% endif
</b-table> </b-table>
<br /> <br />

View file

@ -103,36 +103,80 @@
<b-table :data="filteredProfilesData" <b-table :data="filteredProfilesData"
:row-class="(row, i) => row.enabled ? null : 'has-background-warning'"> :row-class="(row, i) => row.enabled ? null : 'has-background-warning'">
% if buefy_0_8:
<template slot-scope="props"> <template slot-scope="props">
<b-table-column field="key" label="Watcher Key"> % endif
<b-table-column field="key"
label="Watcher Key"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.key }} {{ props.row.key }}
</b-table-column> </b-table-column>
<b-table-column field="watcher_spec" label="Watcher Spec"> <b-table-column field="watcher_spec"
label="Watcher Spec"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.watcher_spec }} {{ props.row.watcher_spec }}
</b-table-column> </b-table-column>
<b-table-column field="watcher_dbkey" label="DB Key"> <b-table-column field="watcher_dbkey"
label="DB Key"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.watcher_dbkey }} {{ props.row.watcher_dbkey }}
</b-table-column> </b-table-column>
<b-table-column field="watcher_delay" label="Loop Delay"> <b-table-column field="watcher_delay"
label="Loop Delay"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.watcher_delay }} sec {{ props.row.watcher_delay }} sec
</b-table-column> </b-table-column>
<b-table-column field="watcher_retry_attempts" label="Attempts / Delay"> <b-table-column field="watcher_retry_attempts"
label="Attempts / Delay"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.watcher_retry_attempts }} / {{ props.row.watcher_retry_delay }} sec {{ props.row.watcher_retry_attempts }} / {{ props.row.watcher_retry_delay }} sec
</b-table-column> </b-table-column>
<b-table-column field="watcher_default_runas" label="Default Runas"> <b-table-column field="watcher_default_runas"
label="Default Runas"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.watcher_default_runas }} {{ props.row.watcher_default_runas }}
</b-table-column> </b-table-column>
<b-table-column label="Consumers"> <b-table-column label="Consumers"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ consumerShortList(props.row) }} {{ consumerShortList(props.row) }}
</b-table-column> </b-table-column>
## <b-table-column field="notes" label="Notes"> ## <b-table-column field="notes" label="Notes">
## TODO ## TODO
## ## {{ props.row.notes }} ## ## {{ props.row.notes }}
## </b-table-column> ## </b-table-column>
<b-table-column field="enabled" label="Enabled"> <b-table-column field="enabled"
label="Enabled"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.enabled ? "Yes" : "No" }} {{ props.row.enabled ? "Yes" : "No" }}
</b-table-column> </b-table-column>
<b-table-column label="Actions" <b-table-column label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
v-if="useProfileSettings"> v-if="useProfileSettings">
<a href="#" <a href="#"
class="grid-action" class="grid-action"
@ -148,7 +192,9 @@
Delete Delete
</a> </a>
</b-table-column> </b-table-column>
% if buefy_0_8:
</template> </template>
% endif
<template slot="empty"> <template slot="empty">
<section class="section"> <section class="section">
<div class="content has-text-grey has-text-centered"> <div class="content has-text-grey has-text-centered">
@ -281,14 +327,30 @@
<b-table :data="editingProfilePendingWatcherKwargs" <b-table :data="editingProfilePendingWatcherKwargs"
style="margin-left: 1rem;"> style="margin-left: 1rem;">
% if buefy_0_8:
<template slot-scope="props"> <template slot-scope="props">
<b-table-column field="key" label="Key"> % endif
<b-table-column field="key"
label="Key"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.key }} {{ props.row.key }}
</b-table-column> </b-table-column>
<b-table-column field="value" label="Value"> <b-table-column field="value"
label="Value"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.value }} {{ props.row.value }}
</b-table-column> </b-table-column>
<b-table-column label="Actions"> <b-table-column label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
<a href="#" <a href="#"
@click.prevent="editProfileWatcherKwarg(props.row)"> @click.prevent="editProfileWatcherKwarg(props.row)">
<i class="fas fa-edit"></i> <i class="fas fa-edit"></i>
@ -302,7 +364,9 @@
Delete Delete
</a> </a>
</b-table-column> </b-table-column>
% if buefy_0_8:
</template> </template>
% endif
<template slot="empty"> <template slot="empty">
<section class="section"> <section class="section">
<div class="content has-text-grey has-text-centered"> <div class="content has-text-grey has-text-centered">
@ -336,14 +400,29 @@
<b-table :data="editingProfilePendingConsumers" <b-table :data="editingProfilePendingConsumers"
v-if="!editingProfileWatcherConsumesSelf" v-if="!editingProfileWatcherConsumesSelf"
:row-class="(row, i) => row.enabled ? null : 'has-background-warning'"> :row-class="(row, i) => row.enabled ? null : 'has-background-warning'">
% if buefy_0_8:
<template slot-scope="props"> <template slot-scope="props">
<b-table-column field="key" label="Consumer"> % endif
<b-table-column field="key"
label="Consumer"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.key }} {{ props.row.key }}
</b-table-column> </b-table-column>
<b-table-column style="white-space: nowrap;"> <b-table-column style="white-space: nowrap;"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.consumer_delay }} / {{ props.row.consumer_retry_attempts }} / {{ props.row.consumer_retry_delay }} {{ props.row.consumer_delay }} / {{ props.row.consumer_retry_attempts }} / {{ props.row.consumer_retry_delay }}
</b-table-column> </b-table-column>
<b-table-column label="Actions"> <b-table-column label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
<a href="#" <a href="#"
class="grid-action" class="grid-action"
@click.prevent="editProfileConsumer(props.row)"> @click.prevent="editProfileConsumer(props.row)">
@ -358,7 +437,9 @@
Delete Delete
</a> </a>
</b-table-column> </b-table-column>
% if buefy_0_8:
</template> </template>
% endif
<template slot="empty"> <template slot="empty">
<section class="section"> <section class="section">
<div class="content has-text-grey has-text-centered"> <div class="content has-text-grey has-text-centered">

View file

@ -49,65 +49,123 @@
<b-field label="Watcher Status"> <b-field label="Watcher Status">
<b-table :data="watchers"> <b-table :data="watchers">
% if buefy_0_8:
<template slot-scope="props"> <template slot-scope="props">
% endif
<b-table-column field="key" <b-table-column field="key"
label="Watcher"> label="Watcher"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.key }} {{ props.row.key }}
</b-table-column> </b-table-column>
<b-table-column field="spec" <b-table-column field="spec"
label="Spec"> label="Spec"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.spec }} {{ props.row.spec }}
</b-table-column> </b-table-column>
<b-table-column field="dbkey" <b-table-column field="dbkey"
label="DB Key"> label="DB Key"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.dbkey }} {{ props.row.dbkey }}
</b-table-column> </b-table-column>
<b-table-column field="delay" <b-table-column field="delay"
label="Delay"> label="Delay"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.delay }} second(s) {{ props.row.delay }} second(s)
</b-table-column> </b-table-column>
<b-table-column field="lastrun" <b-table-column field="lastrun"
label="Last Watched"> label="Last Watched"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-html="props.row.lastrun"></span> <span v-html="props.row.lastrun"></span>
</b-table-column> </b-table-column>
<b-table-column field="status" <b-table-column field="status"
label="Status" label="Status"
:class="props.row.status == 'okay' ? 'has-background-success' : 'has-background-warning'"> % if not buefy_0_8:
{{ props.row.status }} v-slot="props"
% endif
>
<span :class="props.row.status == 'okay' ? 'has-background-success' : 'has-background-warning'">
{{ props.row.status }}
</span>
</b-table-column> </b-table-column>
% if buefy_0_8:
</template> </template>
% endif
</b-table> </b-table>
</b-field> </b-field>
<b-field label="Consumer Status"> <b-field label="Consumer Status">
<b-table :data="consumers"> <b-table :data="consumers">
% if buefy_0_8:
<template slot-scope="props"> <template slot-scope="props">
% endif
<b-table-column field="key" <b-table-column field="key"
label="Consumer"> label="Consumer"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.key }} {{ props.row.key }}
</b-table-column> </b-table-column>
<b-table-column field="spec" <b-table-column field="spec"
label="Spec"> label="Spec"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.spec }} {{ props.row.spec }}
</b-table-column> </b-table-column>
<b-table-column field="dbkey" <b-table-column field="dbkey"
label="DB Key"> label="DB Key"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.dbkey }} {{ props.row.dbkey }}
</b-table-column> </b-table-column>
<b-table-column field="delay" <b-table-column field="delay"
label="Delay"> label="Delay"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.delay }} second(s) {{ props.row.delay }} second(s)
</b-table-column> </b-table-column>
<b-table-column field="changes" <b-table-column field="changes"
label="Pending Changes"> label="Pending Changes"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.changes }} {{ props.row.changes }}
</b-table-column> </b-table-column>
<b-table-column field="status" <b-table-column field="status"
label="Status" label="Status"
:class="props.row.status == 'okay' ? 'has-background-success' : 'has-background-warning'"> % if not buefy_0_8:
{{ props.row.status }} v-slot="props"
% endif
>
<span :class="props.row.status == 'okay' ? 'has-background-success' : 'has-background-warning'">
{{ props.row.status }}
</span>
</b-table-column> </b-table-column>
% if buefy_0_8:
</template> </template>
% endif
</b-table> </b-table>
</b-field> </b-field>
</%def> </%def>

View file

@ -123,25 +123,52 @@
<b-table <b-table
:data="new_table.columns"> :data="new_table.columns">
% if buefy_0_8:
<template slot-scope="props"> <template slot-scope="props">
% endif
<b-table-column field="name" label="Name"> <b-table-column field="name"
label="Name"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.name }} {{ props.row.name }}
</b-table-column> </b-table-column>
<b-table-column field="data_type" label="Data Type"> <b-table-column field="data_type"
label="Data Type"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.data_type }} {{ props.row.data_type }}
</b-table-column> </b-table-column>
<b-table-column field="nullable" label="Nullable"> <b-table-column field="nullable"
label="Nullable"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.nullable }} {{ props.row.nullable }}
</b-table-column> </b-table-column>
<b-table-column field="description" label="Description"> <b-table-column field="description"
label="Description"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.description }} {{ props.row.description }}
</b-table-column> </b-table-column>
<b-table-column field="actions" label="Actions"> <b-table-column field="actions"
label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
<a href="#" class="grid-action" <a href="#" class="grid-action"
@click.prevent="editColumnRow(props.row)"> @click.prevent="editColumnRow(props.row)">
<i class="fas fa-edit"></i> <i class="fas fa-edit"></i>
@ -157,7 +184,9 @@
&nbsp; &nbsp;
</b-table-column> </b-table-column>
% if buefy_0_8:
</template> </template>
% endif
</b-table> </b-table>
<b-modal has-modal-card <b-modal has-modal-card

View file

@ -20,7 +20,9 @@
% endif % endif
> >
% if buefy_0_8:
<template slot-scope="props"> <template slot-scope="props">
% endif
% for i, column in enumerate(grid_columns): % for i, column in enumerate(grid_columns):
<b-table-column field="${column['field']}" <b-table-column field="${column['field']}"
% if not empty_labels: % if not empty_labels:
@ -28,6 +30,9 @@
% elif i > 0: % elif i > 0:
label=" " label=" "
% endif % endif
% if not buefy_0_8:
v-slot="props"
% endif
${'sortable' if column['sortable'] else ''}> ${'sortable' if column['sortable'] else ''}>
% if empty_labels and i == 0: % if empty_labels and i == 0:
<template slot="header" slot-scope="{ column }"></template> <template slot="header" slot-scope="{ column }"></template>
@ -54,7 +59,12 @@
% endfor % endfor
% if grid.main_actions or grid.more_actions: % if grid.main_actions or grid.more_actions:
<b-table-column field="actions" label="Actions"> <b-table-column field="actions"
label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
% for action in grid.main_actions: % for action in grid.main_actions:
<a :href="props.row._action_url_${action.key}" <a :href="props.row._action_url_${action.key}"
% if action.link_class: % if action.link_class:
@ -73,7 +83,9 @@
% endfor % endfor
</b-table-column> </b-table-column>
% endif % endif
% if buefy_0_8:
</template> </template>
% endif
<template slot="empty"> <template slot="empty">
<div class="content has-text-grey has-text-centered"> <div class="content has-text-grey has-text-centered">

View file

@ -218,10 +218,15 @@
:hoverable="true" :hoverable="true"
:narrowed="true"> :narrowed="true">
% if buefy_0_8:
<template slot-scope="props"> <template slot-scope="props">
% endif
% for column in grid_columns: % for column in grid_columns:
<b-table-column field="${column['field']}" <b-table-column field="${column['field']}"
label="${column['label']}" label="${column['label']}"
% if not buefy_0_8:
v-slot="props"
% endif
:sortable="${json.dumps(column['sortable'])}" :sortable="${json.dumps(column['sortable'])}"
% if grid.is_searchable(column['field']): % if grid.is_searchable(column['field']):
searchable searchable
@ -242,7 +247,12 @@
% endfor % endfor
% if grid.main_actions or grid.more_actions: % if grid.main_actions or grid.more_actions:
<b-table-column field="actions" label="Actions"> <b-table-column field="actions"
label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
## TODO: we do not currently differentiate for "main vs. more" ## TODO: we do not currently differentiate for "main vs. more"
## here, but ideally we would tuck "more" away in a drawer etc. ## here, but ideally we would tuck "more" away in a drawer etc.
% for action in grid.main_actions + grid.more_actions: % for action in grid.main_actions + grid.more_actions:
@ -260,7 +270,9 @@
% endfor % endfor
</b-table-column> </b-table-column>
% endif % endif
% if buefy_0_8:
</template> </template>
% endif
<template #empty> <template #empty>
<section class="section"> <section class="section">

View file

@ -10,33 +10,71 @@
narrowed narrowed
icon-pack="fas" icon-pack="fas"
:default-sort="['host_title', 'asc']"> :default-sort="['host_title', 'asc']">
% if buefy_0_8:
<template slot-scope="props"> <template slot-scope="props">
<b-table-column field="host_title" label="Data Source" sortable> % endif
<b-table-column field="host_title"
label="Data Source"
% if not buefy_0_8:
v-slot="props"
% endif
sortable>
{{ props.row.host_title }} {{ props.row.host_title }}
</b-table-column> </b-table-column>
<b-table-column field="local_title" label="Data Target" sortable> <b-table-column field="local_title"
label="Data Target"
% if not buefy_0_8:
v-slot="props"
% endif
sortable>
{{ props.row.local_title }} {{ props.row.local_title }}
</b-table-column> </b-table-column>
<b-table-column field="direction" label="Direction" sortable> <b-table-column field="direction"
label="Direction"
% if not buefy_0_8:
v-slot="props"
% endif
sortable>
{{ props.row.direction_display }} {{ props.row.direction_display }}
</b-table-column> </b-table-column>
<b-table-column field="handler_spec" label="Handler Spec" sortable> <b-table-column field="handler_spec"
label="Handler Spec"
% if not buefy_0_8:
v-slot="props"
% endif
sortable>
{{ props.row.handler_spec }} {{ props.row.handler_spec }}
</b-table-column> </b-table-column>
<b-table-column field="cmd" label="Command" sortable> <b-table-column field="cmd"
label="Command"
% if not buefy_0_8:
v-slot="props"
% endif
sortable>
{{ props.row.command }} {{ props.row.subcommand }} {{ props.row.command }} {{ props.row.subcommand }}
</b-table-column> </b-table-column>
<b-table-column field="runas" label="Default Runas" sortable> <b-table-column field="runas"
label="Default Runas"
% if not buefy_0_8:
v-slot="props"
% endif
sortable>
{{ props.row.default_runas }} {{ props.row.default_runas }}
</b-table-column> </b-table-column>
<b-table-column label="Actions"> <b-table-column label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
<a href="#" class="grid-action" <a href="#" class="grid-action"
@click.prevent="editHandler(props.row)"> @click.prevent="editHandler(props.row)">
<i class="fas fa-edit"></i> <i class="fas fa-edit"></i>
Edit Edit
</a> </a>
</b-table-column> </b-table-column>
% if buefy_0_8:
</template> </template>
% endif
<template slot="empty"> <template slot="empty">
<section class="section"> <section class="section">
<div class="content has-text-grey has-text-centered"> <div class="content has-text-grey has-text-centered">

View file

@ -23,29 +23,51 @@
<div class="block" style="padding-left: 2rem; display: flex;"> <div class="block" style="padding-left: 2rem; display: flex;">
<b-table :data="overnightTasks"> <b-table :data="overnightTasks">
% if buefy_0_8:
<template slot-scope="props"> <template slot-scope="props">
% endif
<!-- <b-table-column field="key" --> <!-- <b-table-column field="key" -->
<!-- label="Key" --> <!-- label="Key" -->
<!-- sortable> --> <!-- sortable> -->
<!-- {{ props.row.key }} --> <!-- {{ props.row.key }} -->
<!-- </b-table-column> --> <!-- </b-table-column> -->
<b-table-column field="key" <b-table-column field="key"
label="Key"> label="Key"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.key }} {{ props.row.key }}
</b-table-column> </b-table-column>
<b-table-column field="description" <b-table-column field="description"
label="Description"> label="Description"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.description }} {{ props.row.description }}
</b-table-column> </b-table-column>
<b-table-column field="class_name" <b-table-column field="class_name"
label="Class Name"> label="Class Name"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.class_name }} {{ props.row.class_name }}
</b-table-column> </b-table-column>
<b-table-column field="script" <b-table-column field="script"
label="Script"> label="Script"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.script }} {{ props.row.script }}
</b-table-column> </b-table-column>
<b-table-column label="Actions"> <b-table-column label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
<a href="#" <a href="#"
@click.prevent="overnightTaskEdit(props.row)"> @click.prevent="overnightTaskEdit(props.row)">
<i class="fas fa-edit"></i> <i class="fas fa-edit"></i>
@ -59,7 +81,9 @@
Delete Delete
</a> </a>
</b-table-column> </b-table-column>
% if buefy_0_8:
</template> </template>
% endif
</b-table> </b-table>
<b-modal has-modal-card <b-modal has-modal-card
@ -137,28 +161,54 @@
<div class="block" style="padding-left: 2rem; display: flex;"> <div class="block" style="padding-left: 2rem; display: flex;">
<b-table :data="backfillTasks"> <b-table :data="backfillTasks">
% if buefy_0_8:
<template slot-scope="props"> <template slot-scope="props">
% endif
<b-table-column field="key" <b-table-column field="key"
label="Key"> label="Key"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.key }} {{ props.row.key }}
</b-table-column> </b-table-column>
<b-table-column field="description" <b-table-column field="description"
label="Description"> label="Description"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.description }} {{ props.row.description }}
</b-table-column> </b-table-column>
<b-table-column field="script" <b-table-column field="script"
label="Script"> label="Script"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.script }} {{ props.row.script }}
</b-table-column> </b-table-column>
<b-table-column field="forward" <b-table-column field="forward"
label="Orientation"> label="Orientation"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.forward ? "Forward" : "Backward" }} {{ props.row.forward ? "Forward" : "Backward" }}
</b-table-column> </b-table-column>
<b-table-column field="target_date" <b-table-column field="target_date"
label="Target Date"> label="Target Date"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.target_date }} {{ props.row.target_date }}
</b-table-column> </b-table-column>
<b-table-column label="Actions"> <b-table-column label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
<a href="#" <a href="#"
@click.prevent="backfillTaskEdit(props.row)"> @click.prevent="backfillTaskEdit(props.row)">
<i class="fas fa-edit"></i> <i class="fas fa-edit"></i>
@ -172,7 +222,9 @@
Delete Delete
</a> </a>
</b-table-column> </b-table-column>
% if buefy_0_8:
</template> </template>
% endif
</b-table> </b-table>
<b-modal has-modal-card <b-modal has-modal-card

View file

@ -49,26 +49,45 @@
% endif % endif
</div> </div>
% if master.has_perm('launch_overnight'): % if master.has_perm('launch_overnight'):
<h3 class="block is-size-3">Overnight Tasks</h3> <h3 class="block is-size-3">Overnight Tasks</h3>
<b-table :data="overnightTasks" hoverable> <b-table :data="overnightTasks" hoverable>
% if buefy_0_8:
<template slot-scope="props"> <template slot-scope="props">
% endif
<b-table-column field="description" <b-table-column field="description"
label="Description"> label="Description"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.description }} {{ props.row.description }}
</b-table-column> </b-table-column>
<b-table-column field="script" <b-table-column field="script"
label="Command"> label="Command"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.script || props.row.class_name }} {{ props.row.script || props.row.class_name }}
</b-table-column> </b-table-column>
<b-table-column field="last_date" <b-table-column field="last_date"
label="Last Date" label="Last Date"
:class="overnightTextClass(props.row)"> % if not buefy_0_8:
{{ props.row.last_date || "never!" }} v-slot="props"
% endif
>
<span :class="overnightTextClass(props.row)">
{{ props.row.last_date || "never!" }}
</span>
</b-table-column> </b-table-column>
<b-table-column label="Actions"> <b-table-column label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
<b-button type="is-primary" <b-button type="is-primary"
icon-pack="fas" icon-pack="fas"
icon-left="arrow-circle-right" icon-left="arrow-circle-right"
@ -125,7 +144,9 @@
</div> </div>
</b-modal> </b-modal>
</b-table-column> </b-table-column>
% if buefy_0_8:
</template> </template>
% endif
<template #empty> <template #empty>
<p class="block">No tasks defined.</p> <p class="block">No tasks defined.</p>
</template> </template>
@ -138,29 +159,56 @@
<h3 class="block is-size-3">Backfill Tasks</h3> <h3 class="block is-size-3">Backfill Tasks</h3>
<b-table :data="backfillTasks" hoverable> <b-table :data="backfillTasks" hoverable>
% if buefy_0_8:
<template slot-scope="props"> <template slot-scope="props">
% endif
<b-table-column field="description" <b-table-column field="description"
label="Description"> label="Description"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.description }} {{ props.row.description }}
</b-table-column> </b-table-column>
<b-table-column field="script" <b-table-column field="script"
label="Script"> label="Script"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.script }} {{ props.row.script }}
</b-table-column> </b-table-column>
<b-table-column field="forward" <b-table-column field="forward"
label="Orientation"> label="Orientation"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.forward ? "Forward" : "Backward" }} {{ props.row.forward ? "Forward" : "Backward" }}
</b-table-column> </b-table-column>
<b-table-column field="last_date" <b-table-column field="last_date"
label="Last Date" label="Last Date"
:class="backfillTextClass(props.row)"> % if not buefy_0_8:
{{ props.row.last_date }} v-slot="props"
% endif
>
<span :class="backfillTextClass(props.row)">
{{ props.row.last_date }}
</span>
</b-table-column> </b-table-column>
<b-table-column field="target_date" <b-table-column field="target_date"
label="Target Date"> label="Target Date"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.target_date }} {{ props.row.target_date }}
</b-table-column> </b-table-column>
<b-table-column label="Actions"> <b-table-column label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
<b-button type="is-primary" <b-button type="is-primary"
icon-pack="fas" icon-pack="fas"
icon-left="arrow-circle-right" icon-left="arrow-circle-right"
@ -168,7 +216,9 @@
Launch Launch
</b-button> </b-button>
</b-table-column> </b-table-column>
% if buefy_0_8:
</template> </template>
% endif
<template #empty> <template #empty>
<p class="block">No tasks defined.</p> <p class="block">No tasks defined.</p>
</template> </template>

View file

@ -22,20 +22,36 @@
<section class="modal-card-body"> <section class="modal-card-body">
<b-table :data="mergeRequestRows" <b-table :data="mergeRequestRows"
striped hoverable> striped hoverable>
% if buefy_0_8:
<template slot-scope="props"> <template slot-scope="props">
% endif
<b-table-column field="customer_number" <b-table-column field="customer_number"
label="Customer #"> label="Customer #"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-html="props.row.customer_number"></span> <span v-html="props.row.customer_number"></span>
</b-table-column> </b-table-column>
<b-table-column field="first_name" <b-table-column field="first_name"
label="First Name"> label="First Name"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-html="props.row.first_name"></span> <span v-html="props.row.first_name"></span>
</b-table-column> </b-table-column>
<b-table-column field="last_name" <b-table-column field="last_name"
label="Last Name"> label="Last Name"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-html="props.row.last_name"></span> <span v-html="props.row.last_name"></span>
</b-table-column> </b-table-column>
% if buefy_0_8:
</template> </template>
% endif
</b-table> </b-table>
</section> </section>

View file

@ -296,22 +296,43 @@
% endif % endif
<b-table :data="person.phones"> <b-table :data="person.phones">
% if buefy_0_8:
<template slot-scope="props"> <template slot-scope="props">
% endif
<b-table-column field="preference" label="Preferred"> <b-table-column field="preference"
label="Preferred"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.preferred ? "Yes" : "" }} {{ props.row.preferred ? "Yes" : "" }}
</b-table-column> </b-table-column>
<b-table-column field="type" label="Type"> <b-table-column field="type"
label="Type"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.type }} {{ props.row.type }}
</b-table-column> </b-table-column>
<b-table-column field="number" label="Number"> <b-table-column field="number"
label="Number"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.number }} {{ props.row.number }}
</b-table-column> </b-table-column>
% if request.has_perm('people_profile.edit_person'): % if request.has_perm('people_profile.edit_person'):
<b-table-column label="Actions"> <b-table-column label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
<a href="#" @click.prevent="editPhoneInit(props.row)"> <a href="#" @click.prevent="editPhoneInit(props.row)">
<i class="fas fa-edit"></i> <i class="fas fa-edit"></i>
Edit Edit
@ -329,7 +350,9 @@
</b-table-column> </b-table-column>
% endif % endif
% if buefy_0_8:
</template> </template>
% endif
</b-table> </b-table>
</div> </div>
@ -417,26 +440,52 @@
% endif % endif
<b-table :data="person.emails"> <b-table :data="person.emails">
% if buefy_0_8:
<template slot-scope="props"> <template slot-scope="props">
% endif
<b-table-column field="preference" label="Preferred"> <b-table-column field="preference"
label="Preferred"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.preferred ? "Yes" : "" }} {{ props.row.preferred ? "Yes" : "" }}
</b-table-column> </b-table-column>
<b-table-column field="type" label="Type"> <b-table-column field="type"
label="Type"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.type }} {{ props.row.type }}
</b-table-column> </b-table-column>
<b-table-column field="address" label="Address"> <b-table-column field="address"
label="Address"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.address }} {{ props.row.address }}
</b-table-column> </b-table-column>
<b-table-column field="invalid" label="Invalid"> <b-table-column field="invalid"
label="Invalid"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-if="props.row.invalid" class="has-text-danger">Yes</span> <span v-if="props.row.invalid" class="has-text-danger">Yes</span>
</b-table-column> </b-table-column>
% if request.has_perm('people_profile.edit_person'): % if request.has_perm('people_profile.edit_person'):
<b-table-column label="Actions"> <b-table-column label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
<a href="#" @click.prevent="editEmailInit(props.row)"> <a href="#" @click.prevent="editEmailInit(props.row)">
<i class="fas fa-edit"></i> <i class="fas fa-edit"></i>
Edit Edit
@ -454,7 +503,9 @@
</b-table-column> </b-table-column>
% endif % endif
% if buefy_0_8:
</template> </template>
% endif
</b-table> </b-table>
</div> </div>
@ -752,18 +803,35 @@
<br /> <br />
<b-table :data="employeeHistory"> <b-table :data="employeeHistory">
% if buefy_0_8:
<template slot-scope="props"> <template slot-scope="props">
% endif
<b-table-column field="start_date" label="Start Date"> <b-table-column field="start_date"
label="Start Date"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.start_date }} {{ props.row.start_date }}
</b-table-column> </b-table-column>
<b-table-column field="end_date" label="End Date"> <b-table-column field="end_date"
label="End Date"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.end_date }} {{ props.row.end_date }}
</b-table-column> </b-table-column>
% if request.has_perm('people_profile.edit_employee_history'): % if request.has_perm('people_profile.edit_employee_history'):
<b-table-column field="actions" label="Actions"> <b-table-column field="actions"
label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
<a href="#" @click.prevent="editEmployeeHistory(props.row)"> <a href="#" @click.prevent="editEmployeeHistory(props.row)">
<i class="fas fa-edit"></i> <i class="fas fa-edit"></i>
Edit Edit
@ -771,7 +839,9 @@
</b-table-column> </b-table-column>
% endif % endif
% if buefy_0_8:
</template> </template>
% endif
</b-table> </b-table>
</div> </div>

View file

@ -52,54 +52,92 @@
icon-pack="fas" icon-pack="fas"
:loading="searchResultsLoading" :loading="searchResultsLoading"
:selected.sync="searchResultSelected"> :selected.sync="searchResultSelected">
% if buefy_0_8:
<template slot-scope="props"> <template slot-scope="props">
% endif
<b-table-column label="${request.rattail_config.product_key_title()}" <b-table-column label="${request.rattail_config.product_key_title()}"
field="product_key"> field="product_key"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.product_key }} {{ props.row.product_key }}
</b-table-column> </b-table-column>
<b-table-column label="Brand" <b-table-column label="Brand"
field="brand_name"> field="brand_name"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.brand_name }} {{ props.row.brand_name }}
</b-table-column> </b-table-column>
<b-table-column label="Description" <b-table-column label="Description"
field="description"> field="description"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.description }} {{ props.row.description }}
{{ props.row.size }} {{ props.row.size }}
</b-table-column> </b-table-column>
<b-table-column label="Unit Price" <b-table-column label="Unit Price"
field="unit_price"> field="unit_price"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.unit_price_display }} {{ props.row.unit_price_display }}
</b-table-column> </b-table-column>
<b-table-column label="Sale Price" <b-table-column label="Sale Price"
field="sale_price"> field="sale_price"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span class="has-background-warning"> <span class="has-background-warning">
{{ props.row.sale_price_display }} {{ props.row.sale_price_display }}
</span> </span>
</b-table-column> </b-table-column>
<b-table-column label="Sale Ends" <b-table-column label="Sale Ends"
field="sale_ends"> field="sale_ends"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span class="has-background-warning"> <span class="has-background-warning">
{{ props.row.sale_ends_display }} {{ props.row.sale_ends_display }}
</span> </span>
</b-table-column> </b-table-column>
<b-table-column label="Department" <b-table-column label="Department"
field="department_name"> field="department_name"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.department_name }} {{ props.row.department_name }}
</b-table-column> </b-table-column>
<b-table-column label="Vendor" <b-table-column label="Vendor"
field="vendor_name"> field="vendor_name"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.vendor_name }} {{ props.row.vendor_name }}
</b-table-column> </b-table-column>
<b-table-column label="Actions"> <b-table-column label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
<a :href="props.row.url" <a :href="props.row.url"
target="_blank" target="_blank"
class="grid-action"> class="grid-action">
@ -108,7 +146,9 @@
</a> </a>
</b-table-column> </b-table-column>
% if buefy_0_8:
</template> </template>
% endif
<template slot="empty"> <template slot="empty">
<div class="content has-text-grey has-text-centered"> <div class="content has-text-grey has-text-centered">
<p> <p>

View file

@ -20,11 +20,23 @@
</p> </p>
<b-table :data="engines"> <b-table :data="engines">
% if buefy_0_8:
<template slot-scope="props"> <template slot-scope="props">
<b-table-column field="key" label="DB Key"> % endif
<b-table-column field="key"
label="DB Key"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.key }} {{ props.row.key }}
</b-table-column> </b-table-column>
<b-table-column field="oldest_date" label="Oldest Date"> <b-table-column field="oldest_date"
label="Oldest Date"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-if="props.row.error" class="has-text-danger"> <span v-if="props.row.error" class="has-text-danger">
error error
</span> </span>
@ -32,7 +44,12 @@
{{ props.row.oldest_date }} {{ props.row.oldest_date }}
</span> </span>
</b-table-column> </b-table-column>
<b-table-column field="newest_date" label="Newest Date"> <b-table-column field="newest_date"
label="Newest Date"
% if not buefy_0_8:
v-slot="props"
% endif
>
<span v-if="props.row.error" class="has-text-danger"> <span v-if="props.row.error" class="has-text-danger">
error error
</span> </span>
@ -40,7 +57,9 @@
{{ props.row.newest_date }} {{ props.row.newest_date }}
</span> </span>
</b-table-column> </b-table-column>
% if buefy_0_8:
</template> </template>
% endif
</b-table> </b-table>
</%def> </%def>

View file

@ -9,23 +9,38 @@
<b-table :data="upgradeSystems" <b-table :data="upgradeSystems"
sortable> sortable>
% if buefy_0_8:
<template slot-scope="props"> <template slot-scope="props">
% endif
<b-table-column field="key" <b-table-column field="key"
label="Key" label="Key"
% if not buefy_0_8:
v-slot="props"
% endif
sortable> sortable>
{{ props.row.key }} {{ props.row.key }}
</b-table-column> </b-table-column>
<b-table-column field="label" <b-table-column field="label"
label="Label" label="Label"
% if not buefy_0_8:
v-slot="props"
% endif
sortable> sortable>
{{ props.row.label }} {{ props.row.label }}
</b-table-column> </b-table-column>
<b-table-column field="command" <b-table-column field="command"
label="Command" label="Command"
% if not buefy_0_8:
v-slot="props"
% endif
sortable> sortable>
{{ props.row.command }} {{ props.row.command }}
</b-table-column> </b-table-column>
<b-table-column label="Actions"> <b-table-column label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
<a href="#" <a href="#"
@click.prevent="upgradeSystemEdit(props.row)"> @click.prevent="upgradeSystemEdit(props.row)">
<i class="fas fa-edit"></i> <i class="fas fa-edit"></i>
@ -40,7 +55,9 @@
Delete Delete
</a> </a>
</b-table-column> </b-table-column>
% if buefy_0_8:
</template> </template>
% endif
</b-table> </b-table>
<div style="margin-left: 1rem;"> <div style="margin-left: 1rem;">