fix:BUG541 ユーザーフィールド未選択の際、Contains条件の不具合対応
This commit is contained in:
@@ -512,13 +512,13 @@ export class ConditionTree {
|
||||
const valueArray=sortArray(value);
|
||||
switch (operator) {
|
||||
case Operator.Equal:
|
||||
return targetArray.every((v, i) => v === valueArray[i]);
|
||||
return targetArray.length===valueArray.length && targetArray.every((v, i) => v === valueArray[i]);
|
||||
case Operator.NotEqual:
|
||||
return !targetArray.every((v, i) => v === valueArray[i]);
|
||||
return targetArray.length!==valueArray.length || !targetArray.every((v, i) => v === valueArray[i]);
|
||||
case Operator.Contains:
|
||||
return valueArray.every(v => targetArray.includes(v));
|
||||
return valueArray.length>0 && valueArray.every(v => targetArray.includes(v));
|
||||
case Operator.NotContains:
|
||||
return !valueArray.every(v => targetArray.includes(v));
|
||||
return valueArray.length===0 || !valueArray.every(v => targetArray.includes(v));
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
-- Dumped from database version 15.6
|
||||
-- Dumped by pg_dump version 15.4
|
||||
|
||||
-- Started on 2024-08-26 11:39:23
|
||||
-- Started on 2024-08-26 16:16:09
|
||||
|
||||
SET statement_timeout = 0;
|
||||
SET lock_timeout = 0;
|
||||
@@ -228,7 +228,28 @@ INSERT INTO public.action (id, create_time, update_time, name, title, subtitle,
|
||||
}
|
||||
}
|
||||
]', 2, 1);
|
||||
INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, outputpoints, property, nosort, categoryid) VALUES (1, '2024-01-21 15:33:50.958114', '2024-01-21 15:33:50.958114', '必須チェック', 'フィールドの値が入力されているかチェックする', '必須チェック', '[]', '[{"component":"FieldInput","props":{"displayName":"フィールド","modelValue":{},"name":"field","placeholder":"必須項目を選択してください"}},{"component":"MuiltInputText","props":{"displayName":"エラーメッセージ","modelValue":"","name":"message","placeholder":"エラーメッセージを入力してください"}}]', 1, 1);
|
||||
INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, outputpoints, property, nosort, categoryid) VALUES (1, '2024-01-21 15:33:50.958114', '2024-01-21 15:33:50.958114', '必須チェック', 'フィールドの値が入力されているかチェックする', '必須チェック', '[]', '[
|
||||
{
|
||||
"component": "FieldInput",
|
||||
"props": {
|
||||
"displayName": "フィールド",
|
||||
"modelValue": {},
|
||||
"name": "field",
|
||||
"placeholder": "必須項目を選択してください",
|
||||
"required":true
|
||||
}
|
||||
},
|
||||
{
|
||||
"component": "MuiltInputText",
|
||||
"props": {
|
||||
"displayName": "エラーメッセージ",
|
||||
"modelValue": "",
|
||||
"name": "message",
|
||||
"placeholder": "エラーメッセージを入力してください",
|
||||
"required":true
|
||||
}
|
||||
}
|
||||
]', 1, 1);
|
||||
INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, outputpoints, property, nosort, categoryid) VALUES (13, '2024-05-10 10:08:34.990297', '2024-05-10 10:08:34.990297', '文字結合', '2つのフィールドの文字を結合する', '文字結合', '[]', '[
|
||||
{
|
||||
"component": "FieldInput",
|
||||
@@ -836,7 +857,7 @@ ALTER TABLE ONLY public.action
|
||||
ADD CONSTRAINT fk_categoryid FOREIGN KEY (categoryid) REFERENCES public.category(id) NOT VALID;
|
||||
|
||||
|
||||
-- Completed on 2024-08-26 11:39:26
|
||||
-- Completed on 2024-08-26 16:16:15
|
||||
|
||||
--
|
||||
-- PostgreSQL database dump complete
|
||||
|
||||
Reference in New Issue
Block a user