Minor tweaks to some flow operations (#13996)

* add template to conditions operation

* remove logic related to mode that no longer exists
This commit is contained in:
Azri Kahar
2022-06-20 23:06:31 +08:00
committed by GitHub
parent 58f37fa4d3
commit 2ca92312d6
4 changed files with 34 additions and 68 deletions

View File

@@ -21,13 +21,28 @@ export default defineOperationApp({
interface: 'input-code',
options: {
language: 'json',
placeholder: `{
"$trigger": {
"category": {
"_eq": "Example"
}
}
}`,
placeholder: JSON.stringify(
{
$trigger: {
category: {
_eq: 'Example',
},
},
},
null,
2
),
template: JSON.stringify(
{
$trigger: {
category: {
_eq: 'Example',
},
},
},
null,
2
),
},
},
},

View File

@@ -6,20 +6,17 @@ export default defineOperationApp({
icon: 'delete',
name: '$t:operations.item-delete.name',
description: '$t:operations.item-delete.description',
overview: ({ mode, collection, key }) => {
overview: ({ collection, key }) => {
const overviewItems = [
{
label: '$t:collection',
text: collection,
},
];
if (mode !== 'query') {
overviewItems.push({
{
label: '$t:operations.item-delete.key',
text: key ? toArray(key).join(', ') : '--',
});
}
},
];
return overviewItems;
},
@@ -84,16 +81,6 @@ export default defineOperationApp({
options: {
iconRight: 'vpn_key',
},
conditions: [
{
rule: {
mode: {
_eq: 'query',
},
},
hidden: true,
},
],
},
},
{

View File

@@ -6,20 +6,17 @@ export default defineOperationApp({
icon: 'visibility',
name: '$t:operations.item-read.name',
description: '$t:operations.item-read.description',
overview: ({ mode, collection, key }) => {
overview: ({ collection, key }) => {
const overviewItems = [
{
label: '$t:collection',
text: collection,
},
];
if (mode !== 'query') {
overviewItems.push({
{
label: '$t:operations.item-read.key',
text: key ? toArray(key).join(', ') : '--',
});
}
},
];
return overviewItems;
},
@@ -72,16 +69,6 @@ export default defineOperationApp({
options: {
iconRight: 'vpn_key',
},
conditions: [
{
rule: {
mode: {
_eq: 'query',
},
},
hidden: true,
},
],
},
},
{

View File

@@ -5,20 +5,17 @@ export default defineOperationApp({
icon: 'edit',
name: '$t:operations.item-update.name',
description: '$t:operations.item-update.description',
overview: ({ mode, collection, key }) => {
overview: ({ collection, key }) => {
const overviewItems = [
{
label: '$t:collection',
text: collection,
},
];
if (mode !== 'query') {
overviewItems.push({
{
label: '$t:operations.item-update.key',
text: key ? toArray(key).join(', ') : '--',
});
}
},
];
return overviewItems;
},
@@ -83,16 +80,6 @@ export default defineOperationApp({
options: {
iconRight: 'vpn_key',
},
conditions: [
{
rule: {
mode: {
_eq: 'query',
},
},
hidden: true,
},
],
},
},
{
@@ -140,16 +127,6 @@ export default defineOperationApp({
2
),
},
conditions: [
{
rule: {
mode: {
_neq: 'query',
},
},
hidden: true,
},
],
},
},
],