Remove support for Buefy 0.8

only Buefy 0.9 and greater are supported now
This commit is contained in:
Lance Edgar 2023-02-01 18:44:55 -06:00
parent 5f7fa33eb2
commit 8410419717
20 changed files with 1057 additions and 1625 deletions

View file

@ -27,7 +27,6 @@ Rattail config extension for Tailbone
from __future__ import unicode_literals, absolute_import
import warnings
from pkg_resources import parse_version
from rattail.config import ConfigExtension as BaseExtension
from rattail.db.config import configure_session
@ -78,11 +77,9 @@ def get_buefy_version(config):
def get_buefy_0_8(config, version=None):
if not version:
version = get_buefy_version(config)
if version == 'latest':
warnings.warn("get_buefy_0_8() is no longer supported",
DeprecationWarning, stacklevel=2)
return False
return parse_version(version) < parse_version('0.9')
def global_help_url(config):

View file

@ -2,7 +2,7 @@
################################################################################
#
# Rattail -- Retail Software Framework
# Copyright © 2010-2022 Lance Edgar
# Copyright © 2010-2023 Lance Edgar
#
# This file is part of Rattail.
#
@ -40,10 +40,9 @@ from webhelpers2.html import tags
import tailbone
from tailbone import helpers
from tailbone.db import Session
from tailbone.config import (csrf_header_name, should_expose_websockets,
get_buefy_0_8)
from tailbone.config import csrf_header_name, should_expose_websockets
from tailbone.menus import make_simple_menus
from tailbone.util import should_use_buefy, get_global_search_options, get_libver
from tailbone.util import should_use_buefy, get_global_search_options
def new_request(event):
@ -160,10 +159,8 @@ def before_render(event):
# buefy themes get some extra treatment
if should_use_buefy(request):
# TODO: remove this hack once all nodes safely on buefy 0.9
version = get_libver(request, 'buefy')
renderer_globals['buefy_0_8'] = get_buefy_0_8(rattail_config,
version=version)
# TODO: remove this hack once nothing references it
renderer_globals['buefy_0_8'] = False
# maybe set custom stylesheet
css = None

View file

@ -102,43 +102,27 @@
<b-table :data="weblibs">
% if buefy_0_8:
<template slot-scope="props">
% endif
<b-table-column field="title"
label="Name"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
{{ props.row.title }}
</b-table-column>
<b-table-column field="configured_version"
label="Version"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
{{ props.row.configured_version || props.row.default_version }}
</b-table-column>
<b-table-column field="configured_url"
label="URL Override"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
{{ props.row.configured_url }}
</b-table-column>
<b-table-column field="live_url"
label="Effective (Live) URL"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
<span v-if="props.row.modified"
class="has-text-warning">
save settings and refresh page to see new URL
@ -150,10 +134,7 @@
<b-table-column field="actions"
label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
<a href="#"
@click.prevent="editWebLibraryInit(props.row)">
<i class="fas fa-edit"></i>
@ -161,10 +142,6 @@
</a>
</b-table-column>
% if buefy_0_8:
</template>
% endif
</b-table>
% for weblib in weblibs:

View file

@ -59,32 +59,18 @@
<div style="width: 100%;">
<b-table :data="configFiles">
% if buefy_0_8:
<template slot-scope="props">
% endif
<b-table-column field="priority"
label="Priority"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
{{ props.row.priority }}
</b-table-column>
<b-table-column field="path"
label="File Path"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
{{ props.row.path }}
</b-table-column>
% if buefy_0_8:
</template>
% endif
</b-table>
</div>
</div>

View file

@ -886,24 +886,17 @@
paginated
per-page="5"
:debounce-search="1000">
% if buefy_0_8:
<template slot-scope="props">
% endif
<b-table-column :label="productKeyLabel"
field="key"
% if not buefy_0_8:
v-slot="props"
% endif
sortable>
{{ props.row.key }}
</b-table-column>
<b-table-column label="Brand"
field="brand_name"
% if not buefy_0_8:
v-slot="props"
% endif
sortable
searchable>
{{ props.row.brand_name }}
@ -911,9 +904,7 @@
<b-table-column label="Description"
field="description"
% if not buefy_0_8:
v-slot="props"
% endif
sortable
searchable>
{{ props.row.description }}
@ -922,18 +913,14 @@
<b-table-column label="Unit Price"
field="unit_price"
% if not buefy_0_8:
v-slot="props"
% endif
sortable>
{{ props.row.unit_price_display }}
</b-table-column>
<b-table-column label="Sale Price"
field="sale_price"
% if not buefy_0_8:
v-slot="props"
% endif
sortable>
<span class="has-background-warning">
{{ props.row.sale_price_display }}
@ -942,9 +929,7 @@
<b-table-column label="Sale Ends"
field="sale_ends"
% if not buefy_0_8:
v-slot="props"
% endif
sortable>
<span class="has-background-warning">
{{ props.row.sale_ends_display }}
@ -953,9 +938,7 @@
<b-table-column label="Department"
field="department_name"
% if not buefy_0_8:
v-slot="props"
% endif
sortable
searchable>
{{ props.row.department_name }}
@ -963,17 +946,12 @@
<b-table-column label="Vendor"
field="vendor_name"
% if not buefy_0_8:
v-slot="props"
% endif
sortable
searchable>
{{ props.row.vendor_name }}
</b-table-column>
% if buefy_0_8:
</template>
% endif
<template slot="empty">
<div class="content has-text-grey has-text-centered">
<p>
@ -1009,63 +987,39 @@
<b-table v-if="items.length"
:data="items"
:row-class="(row, i) => row.product_uuid ? null : 'has-text-success'">
% if buefy_0_8:
<template slot-scope="props">
% endif
<b-table-column :label="productKeyLabel"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
{{ props.row.product_key }}
</b-table-column>
<b-table-column label="Brand"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
{{ props.row.product_brand }}
</b-table-column>
<b-table-column label="Description"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
{{ props.row.product_description }}
</b-table-column>
<b-table-column label="Size"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
{{ props.row.product_size }}
</b-table-column>
<b-table-column label="Department"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
{{ props.row.department_display }}
</b-table-column>
<b-table-column label="Quantity"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
<span v-html="props.row.order_quantity_display"></span>
</b-table-column>
<b-table-column label="Unit Price"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
<span
% if product_price_may_be_questionable:
:class="props.row.price_needs_confirmation ? 'has-background-warning' : ''"
@ -1079,19 +1033,13 @@
% if allow_item_discounts:
<b-table-column label="Discount"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
{{ props.row.discount_percent }}{{ props.row.discount_percent ? " %" : "" }}
</b-table-column>
% endif
<b-table-column label="Total"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
<span
% if product_price_may_be_questionable:
:class="props.row.price_needs_confirmation ? 'has-background-warning' : ''"
@ -1104,19 +1052,13 @@
</b-table-column>
<b-table-column label="Vendor"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
{{ props.row.vendor_display }}
</b-table-column>
<b-table-column field="actions"
label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
<a href="#" class="grid-action"
@click.prevent="showEditItemDialog(props.row)">
<i class="fas fa-edit"></i>
@ -1132,9 +1074,6 @@
&nbsp;
</b-table-column>
% if buefy_0_8:
</template>
% endif
</b-table>
</div>
</div>

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -296,43 +296,28 @@
% endif
<b-table :data="person.phones">
% if buefy_0_8:
<template slot-scope="props">
% endif
<b-table-column field="preference"
label="Preferred"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
{{ props.row.preferred ? "Yes" : "" }}
</b-table-column>
<b-table-column field="type"
label="Type"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
{{ props.row.type }}
</b-table-column>
<b-table-column field="number"
label="Number"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
{{ props.row.number }}
</b-table-column>
% if request.has_perm('people_profile.edit_person'):
<b-table-column label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
<a href="#" @click.prevent="editPhoneInit(props.row)">
<i class="fas fa-edit"></i>
Edit
@ -350,9 +335,6 @@
</b-table-column>
% endif
% if buefy_0_8:
</template>
% endif
</b-table>
</div>
@ -440,52 +422,34 @@
% endif
<b-table :data="person.emails">
% if buefy_0_8:
<template slot-scope="props">
% endif
<b-table-column field="preference"
label="Preferred"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
{{ props.row.preferred ? "Yes" : "" }}
</b-table-column>
<b-table-column field="type"
label="Type"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
{{ props.row.type }}
</b-table-column>
<b-table-column field="address"
label="Address"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
{{ props.row.address }}
</b-table-column>
<b-table-column field="invalid"
label="Invalid?"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
<span v-if="props.row.invalid" class="has-text-danger has-text-weight-bold">Invalid</span>
</b-table-column>
% if request.has_perm('people_profile.edit_person'):
<b-table-column label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
<a href="#" @click.prevent="editEmailInit(props.row)">
<i class="fas fa-edit"></i>
Edit
@ -503,9 +467,6 @@
</b-table-column>
% endif
% if buefy_0_8:
</template>
% endif
</b-table>
</div>
@ -810,35 +771,23 @@
<br />
<b-table :data="employeeHistory">
% if buefy_0_8:
<template slot-scope="props">
% endif
<b-table-column field="start_date"
label="Start Date"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
{{ props.row.start_date }}
</b-table-column>
<b-table-column field="end_date"
label="End Date"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
{{ props.row.end_date }}
</b-table-column>
% if request.has_perm('people_profile.edit_employee_history'):
<b-table-column field="actions"
label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
<a href="#" @click.prevent="editEmployeeHistory(props.row)">
<i class="fas fa-edit"></i>
Edit
@ -846,9 +795,6 @@
</b-table-column>
% endif
% if buefy_0_8:
</template>
% endif
</b-table>
</div>
@ -1653,11 +1599,7 @@
<script type="text/javascript">
let ProfileInfoData = {
% if buefy_0_8:
activeTab: location.hash ? parseInt(location.hash.substring(1)) : undefined,
% else:
activeTab: location.hash ? location.hash.substring(1) : undefined,
% endif
person: ${json.dumps(person_data)|n},
customers: ${json.dumps(customers_data)|n},
member: null, // TODO
@ -1692,11 +1634,7 @@
},
activeTabChanged(value) {
% if buefy_0_8:
location.hash = value.toString()
% else:
location.hash = value
% endif
this.activeTabChangedExtra(value)
},

View file

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

View file

@ -99,62 +99,41 @@
<b-table
:data="tableColumns">
% if buefy_0_8:
<template slot-scope="props">
% endif
<b-table-column field="name"
label="Name"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
{{ props.row.name }}
</b-table-column>
<b-table-column field="data_type"
label="Data Type"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
{{ formatDataType(props.row.data_type) }}
</b-table-column>
<b-table-column field="nullable"
label="Nullable"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
{{ props.row.nullable ? "Yes" : "No" }}
</b-table-column>
<b-table-column field="versioned"
label="Versioned"
:visible="tableVersioned"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
{{ props.row.versioned ? "Yes" : "No" }}
</b-table-column>
<b-table-column field="description"
label="Description"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
{{ props.row.description }}
</b-table-column>
<b-table-column field="actions"
label="Actions"
% if not buefy_0_8:
v-slot="props"
% endif
>
v-slot="props">
<a v-if="props.row.name != 'uuid'"
href="#"
@click.prevent="tableEditColumn(props.row)">
@ -173,9 +152,6 @@
&nbsp;
</b-table-column>
% if buefy_0_8:
</template>
% endif
</b-table>
<b-modal has-modal-card

View file

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

View file

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