Merged PR 82: feat:アクション選択UIの改善

以下の内容を改修しました。
1.TASK581:アクションのカテゴリおよび並び順を設定できるようにする
2.各アクションは対応イベント以外に設置できないようにする
3.DB構造を変更しました。
  * action: categoryidとnosort列追加
  * category: アクションのカテゴリマスタ追加
  * eventaction: アクションごと設置できないイベントIDを登録
4.デプロイの際、scripts\kintoneToolDB_20240820_update.sqlを実行してDBを更新してください。

Related work items: #524, #581
This commit is contained in:
Shohtetsu Ma
2024-08-21 01:30:01 +00:00
committed by Takuto Yoshida(タクト)
9 changed files with 839 additions and 28 deletions

View File

@@ -4,9 +4,10 @@ import base64
PROJECT_NAME = "KintoneAppBuilder" PROJECT_NAME = "KintoneAppBuilder"
#SQLALCHEMY_DATABASE_URI = "postgres://maxz64:m@xz1205@alicornkintone.postgres.database.azure.com/postgres" SQLALCHEMY_DATABASE_URI = "postgres://maxz64:m@xz1205@alicornkintone.postgres.database.azure.com/postgres"
SQLALCHEMY_DATABASE_URI = "postgres://kabAdmin:P@ssw0rd!@kintonetooldb.postgres.database.azure.com/postgres" #SQLALCHEMY_DATABASE_URI = "postgres://kabAdmin:P@ssw0rd!@kintonetooldb.postgres.database.azure.com/postgres"
#SQLALCHEMY_DATABASE_URI = "postgres://kabAdmin:P@ssw0rd!@kintonetooldb.postgres.database.azure.com/unittest" #SQLALCHEMY_DATABASE_URI = "postgres://kabAdmin:P@ssw0rd!@kintonetooldb.postgres.database.azure.com/unittest"
#SQLALCHEMY_DATABASE_URI = "postgres://kabAdmin:P@ssw0rd!@ktune-prod-db.postgres.database.azure.com/postgres"
API_V1_STR = "/k/v1" API_V1_STR = "/k/v1"
API_V1_AUTH_KEY = "X-Cybozu-Authorization" API_V1_AUTH_KEY = "X-Cybozu-Authorization"

View File

@@ -281,9 +281,35 @@ def get_events(db: Session):
raise HTTPException(status_code=404, detail="Data not found") raise HTTPException(status_code=404, detail="Data not found")
return events return events
def get_category(db:Session):
categorys=db.query(models.Category).all()
return categorys
def get_eventactions(db: Session,eventid: str): def get_eventactions(db: Session,eventid: str):
#eveactions = db.query(models.Action).join(models.EventAction,models.EventAction.actionid == models.Action.id ).join(models.Event,models.Event.id == models.EventAction.eventid).filter(models.Event.eventid == eventid).all() #eveactions = db.query(models.Action).join(models.EventAction,models.EventAction.actionid == models.Action.id ).join(models.Event,models.Event.id == models.EventAction.eventid).filter(models.Event.eventid == eventid).all()
eveactions = db.query(models.Action).join(models.EventAction,models.EventAction.actionid != models.Action.id and models.EventAction.eventid == eventid ).join(models.Event,models.Event.id == models.EventAction.eventid).filter(models.Event.eventid == eventid).all() #category = get_category(db)
blackactions = (
db.query(models.EventAction.actionid)
.filter(models.EventAction.eventid == eventid)
.subquery()
)
eveactions = (
db.query(
models.Action.id,
models.Action.name,
models.Action.title,
models.Action.subtitle,
models.Action.outputpoints,
models.Action.property,
models.Action.categoryid,
models.Action.nosort,
models.Category.categoryname)
.join(models.Category,models.Category.id == models.Action.categoryid)
.filter(models.Action.id.notin_(blackactions))
.order_by(models.Category.nosort,models.Action.nosort)
.all()
)
if not eveactions: if not eveactions:
raise HTTPException(status_code=404, detail="Data not found") raise HTTPException(status_code=404, detail="Data not found")
return eveactions return eveactions

View File

@@ -42,6 +42,8 @@ class Action(Base):
subtitle = Column(String(500)) subtitle = Column(String(500))
outputpoints = Column(String) outputpoints = Column(String)
property = Column(String) property = Column(String)
categoryid = Column(Integer,ForeignKey("category.id"))
nosort = Column(Integer)
class Flow(Base): class Flow(Base):
__tablename__ = "flow" __tablename__ = "flow"
@@ -95,7 +97,7 @@ class Event(Base):
class EventAction(Base): class EventAction(Base):
__tablename__ = "eventaction" __tablename__ = "eventaction"
eventid = Column(Integer,ForeignKey("event.id")) eventid = Column(String(100),ForeignKey("event.eventid"))
actionid = Column(Integer,ForeignKey("action.id")) actionid = Column(Integer,ForeignKey("action.id"))
@@ -115,4 +117,10 @@ class KintoneFormat(Base):
typecolumn =Column(Integer) typecolumn =Column(Integer)
codecolumn =Column(Integer) codecolumn =Column(Integer)
field = Column(String(5000)) field = Column(String(5000))
trueformat = Column(String(10)) trueformat = Column(String(10))
class Category(Base):
__tablename__ = "category"
categoryname = Column(String(20))
nosort = Column(Integer)

View File

@@ -89,7 +89,9 @@ class Action(BaseModel):
subtitle: str = None subtitle: str = None
outputpoints: str = None outputpoints: str = None
property: str = None property: str = None
categoryid: int = None
nosort: int
categoryname : str =None
class Config: class Config:
orm_mode = True orm_mode = True

View File

@@ -3,20 +3,46 @@
<div v-if="!isLoaded" class="spinner flex flex-center"> <div v-if="!isLoaded" class="spinner flex flex-center">
<q-spinner color="primary" size="3em" /> <q-spinner color="primary" size="3em" />
</div> </div>
<q-table v-else row-key="index" :selection="type" v-model:selected="selected" :columns="columns" :rows="rows" <q-splitter
class="action-table" v-model="splitterModel"
flat bordered style="height: 100%"
virtual-scroll before-class="tab"
:pagination="pagination" unit="px"
:rows-per-page-options="[0]" v-else
:filter="filter"
> >
</q-table> <template v-slot:before>
<q-tabs
v-model="tab"
vertical
active-color="white"
indicator-color="primary"
active-bg-color="primary"
class="bg-grey-2 text-grey-8"
dense
>
<q-tab :name="cate"
:label="cate"
v-for="(cate,) in categorys"
:key="cate"
></q-tab>
</q-tabs>
</template>
<template v-slot:after>
<q-table row-key="index" :selection="type" v-model:selected="selected" :columns="columns" :rows="actionForTab"
class="action-table"
flat bordered
virtual-scroll
:pagination="pagination"
:rows-per-page-options="[0]"
:filter="filter"></q-table>
</template>
</q-splitter>
</div> </div>
</template> </template>
<script> <script>
import { ref,onMounted,reactive } from 'vue' import { ref,onMounted,reactive,watchEffect,computed,watch } from 'vue'
import { api } from 'boot/axios'; import { api } from 'boot/axios';
import { useFlowEditorStore } from 'stores/flowEditor';
export default { export default {
name: 'actionSelect', name: 'actionSelect',
@@ -25,30 +51,74 @@ export default {
type: String, type: String,
filter:String filter:String
}, },
setup(props) { emits:[
"clearFilter"
],
setup(props,{emit}) {
const isLoaded=ref(false); const isLoaded=ref(false);
const columns = [ const columns = [
{ name: 'name', required: true,label: 'アクション名',align: 'left',field: 'name',sortable: true}, { name: 'name', required: true,label: 'アクション名',align: 'left',field: 'name',sortable: true},
{ name: 'desc', align: 'left', label: '説明', field: 'desc', sortable: true }, { name: 'desc', align: 'left', label: '説明', field: 'desc', sortable: true },
// { name: 'content', label: '内容', field: 'content', sortable: true } // { name: 'content', label: '内容', field: 'content', sortable: true }
]; ];
const rows = reactive([]) const store = useFlowEditorStore();
let actionData =reactive([]);
const categorys = ref('');
const tab=ref('');
const actionForTab=computed(()=>{
const rows=[];
const actions= props.filter? actionData:actionData.filter(x=>x.categoryname===tab.value);
actions.forEach((item,index) =>{
rows.push({index,
name:item.name,
desc:item.title,
outputPoints:item.outputpoints,
property:item.property});
});
return rows;
});
onMounted(async () => { onMounted(async () => {
const res =await api.get('api/actions'); let eventId='';
res.data.forEach((item,index) => if(store.selectedEvent ){
{ eventId=store.selectedEvent.header!=='DELETABLE'? store.selectedEvent.eventId : store.selectedEvent.parentId;
rows.push({index,name:item.name,desc:item.title,outputPoints:item.outputpoints,property:item.property}); }
}); const res =await api.get(`api/eventactions/${store.selectedEvent.eventId}`);
actionData= res.data;
const categoryNames = Array.from(new Set(actionData.map(x=>x.categoryname)));
categorys.value=categoryNames;
tab.value = categoryNames.length>0? categoryNames[0]:'';
isLoaded.value=true; isLoaded.value=true;
}); });
// watch(props.filter,()=>{
// if(props.filter && props.filter!==''){
// tab.value='';
// }
// });
watch(tab,()=>{
if(tab.value!==''){
emit('clearFilter','');
}
});
// watchEffect(()=>{
// if(props.filter && props.filter!==''){
// tab.value='';
// }
// if(tab.value!==''){
// emit('update:filter','');
// }
// });
return { return {
columns, columns,
rows,
selected: ref([]), selected: ref([]),
pagination:ref({ pagination:ref({
rowsPerPage:0 rowsPerPage:0
}), }),
isLoaded, isLoaded,
tab,
actionData,
categorys,
splitterModel: ref(150),
actionForTab
} }
}, },
@@ -58,5 +128,6 @@ export default {
.action-table{ .action-table{
min-height: 10vh; min-height: 10vh;
max-height: 68vh; max-height: 68vh;
min-width: 550px;
} }
</style> </style>

View File

@@ -42,7 +42,7 @@
import { QTree, useQuasar } from 'quasar'; import { QTree, useQuasar } from 'quasar';
import { ActionFlow, RootAction } from 'src/types/ActionTypes'; import { ActionFlow, RootAction } from 'src/types/ActionTypes';
import { useFlowEditorStore } from 'stores/flowEditor'; import { useFlowEditorStore } from 'stores/flowEditor';
import { defineComponent, ref } from 'vue'; import { defineComponent, ref,watchEffect } from 'vue';
import { IKintoneEvent, IKintoneEventGroup, IKintoneEventNode } from '../../types/KintoneEvents'; import { IKintoneEvent, IKintoneEventGroup, IKintoneEventNode } from '../../types/KintoneEvents';
import FieldSelect from '../FieldSelect.vue'; import FieldSelect from '../FieldSelect.vue';
import ShowDialog from '../ShowDialog.vue'; import ShowDialog from '../ShowDialog.vue';
@@ -75,8 +75,8 @@ export default defineComponent({
// const selectedFlow = store.currentFlow; // const selectedFlow = store.currentFlow;
// const expanded=ref(); // const expanded=ref();
const selectedEvent = ref<IKintoneEvent | null>(null); const selectedEvent = ref<IKintoneEvent | undefined>(store.selectedEvent);
const selectedChangeEvent = ref<IKintoneEventGroup | null>(null); const selectedChangeEvent = ref<IKintoneEventGroup | undefined>(undefined);
const isFieldChange = (node: IKintoneEventNode) => { const isFieldChange = (node: IKintoneEventNode) => {
return node.header == 'EVENT' && node.eventId.indexOf(".change.") > -1; return node.header == 'EVENT' && node.eventId.indexOf(".change.") > -1;
} }
@@ -149,6 +149,9 @@ export default defineComponent({
selectedEvent.value.flowData = flow; selectedEvent.value.flowData = flow;
} }
}; };
watchEffect(()=>{
store.setCurrentEvent(selectedEvent.value);
});
return { return {
// eventTree, // eventTree,
// expanded, // expanded,

View File

@@ -41,7 +41,7 @@
</template> </template>
</q-input> </q-input>
</template> </template>
<action-select ref="appDg" name="model" :filter="filter" type="single"></action-select> <action-select ref="appDg" name="model" :filter="filter" type="single" @clearFilter="onClearFilter" ></action-select>
</ShowDialog> </ShowDialog>
</q-page> </q-page>
@@ -198,7 +198,7 @@ const onSaveFlow = async () => {
if (targetFlow === undefined) { if (targetFlow === undefined) {
$q.notify({ $q.notify({
type: 'negative', type: 'negative',
caption: "エラー", caption: 'エラー',
message: `編集中のフローがありません。` message: `編集中のフローがありません。`
}); });
return; return;
@@ -241,6 +241,10 @@ const fetchData = async () => {
} }
} }
const onClearFilter=()=>{
filter.value='';
}
onMounted(() => { onMounted(() => {
authStore.toggleLeftMenu(); authStore.toggleLeftMenu();
fetchData(); fetchData();

View File

@@ -66,6 +66,9 @@ export const useFlowEditorStore = defineStore('flowEditor', {
setActiveNode(node: IActionNode) { setActiveNode(node: IActionNode) {
this.activeNode = node; this.activeNode = node;
}, },
setCurrentEvent(event:IKintoneEvent | undefined){
this.selectedEvent=event;
},
setApp(app: AppInfo) { setApp(app: AppInfo) {
this.appInfo = app; this.appInfo = app;
}, },

View File

@@ -0,0 +1,693 @@
--
-- PostgreSQL database dump
--
-- Dumped from database version 15.6
-- Dumped by pg_dump version 15.4
-- Started on 2024-08-21 09:37:58
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
ALTER TABLE IF EXISTS ONLY public.action DROP CONSTRAINT IF EXISTS fk_categoryid;
ALTER TABLE IF EXISTS ONLY public.eventaction DROP CONSTRAINT IF EXISTS eventaction_eventid_fkey;
ALTER TABLE IF EXISTS ONLY public.eventaction DROP CONSTRAINT IF EXISTS eventaction_actionid_fkey;
DROP INDEX IF EXISTS public.ix_eventaction_id;
DROP INDEX IF EXISTS public.ix_action_name;
DROP INDEX IF EXISTS public.ix_action_id;
ALTER TABLE IF EXISTS ONLY public.action DROP CONSTRAINT IF EXISTS name;
ALTER TABLE IF EXISTS ONLY public.eventaction DROP CONSTRAINT IF EXISTS eventaction_pkey;
ALTER TABLE IF EXISTS ONLY public.category DROP CONSTRAINT IF EXISTS category_pkey;
ALTER TABLE IF EXISTS ONLY public.action DROP CONSTRAINT IF EXISTS action_pkey;
ALTER TABLE IF EXISTS public.eventaction ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.action ALTER COLUMN id DROP DEFAULT;
DROP SEQUENCE IF EXISTS public.eventaction_id_seq;
DROP TABLE IF EXISTS public.eventaction;
DROP TABLE IF EXISTS public.category;
DROP SEQUENCE IF EXISTS public.action_id_seq;
DROP TABLE IF EXISTS public.action;
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- TOC entry 214 (class 1259 OID 27560)
-- Name: action; Type: TABLE; Schema: public; Owner: kabAdmin
--
CREATE TABLE public.action (
id integer NOT NULL,
create_time timestamp without time zone,
update_time timestamp without time zone,
name character varying(100) NOT NULL,
title character varying(200),
subtitle character varying(500),
outputpoints character varying,
property character varying,
nosort integer,
categoryid integer
);
ALTER TABLE public.action OWNER TO "kabAdmin";
--
-- TOC entry 215 (class 1259 OID 27565)
-- Name: action_id_seq; Type: SEQUENCE; Schema: public; Owner: kabAdmin
--
CREATE SEQUENCE public.action_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.action_id_seq OWNER TO "kabAdmin";
--
-- TOC entry 3995 (class 0 OID 0)
-- Dependencies: 215
-- Name: action_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: kabAdmin
--
ALTER SEQUENCE public.action_id_seq OWNED BY public.action.id;
--
-- TOC entry 240 (class 1259 OID 27752)
-- Name: category; Type: TABLE; Schema: public; Owner: kabAdmin
--
CREATE TABLE public.category (
id integer NOT NULL,
categoryname character varying(20) NOT NULL,
nosort integer,
create_time timestamp without time zone,
update_time timestamp without time zone
);
ALTER TABLE public.category OWNER TO "kabAdmin";
--
-- TOC entry 224 (class 1259 OID 27591)
-- Name: eventaction; Type: TABLE; Schema: public; Owner: kabAdmin
--
CREATE TABLE public.eventaction (
id integer NOT NULL,
create_time timestamp without time zone,
update_time timestamp without time zone,
eventid character varying(100),
actionid integer
);
ALTER TABLE public.eventaction OWNER TO "kabAdmin";
--
-- TOC entry 225 (class 1259 OID 27594)
-- Name: eventaction_id_seq; Type: SEQUENCE; Schema: public; Owner: kabAdmin
--
CREATE SEQUENCE public.eventaction_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.eventaction_id_seq OWNER TO "kabAdmin";
--
-- TOC entry 3996 (class 0 OID 0)
-- Dependencies: 225
-- Name: eventaction_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: kabAdmin
--
ALTER SEQUENCE public.eventaction_id_seq OWNED BY public.eventaction.id;
--
-- TOC entry 3827 (class 2604 OID 27627)
-- Name: action id; Type: DEFAULT; Schema: public; Owner: kabAdmin
--
ALTER TABLE ONLY public.action ALTER COLUMN id SET DEFAULT nextval('public.action_id_seq'::regclass);
--
-- TOC entry 3828 (class 2604 OID 27632)
-- Name: eventaction id; Type: DEFAULT; Schema: public; Owner: kabAdmin
--
ALTER TABLE ONLY public.eventaction ALTER COLUMN id SET DEFAULT nextval('public.eventaction_id_seq'::regclass);
--
-- TOC entry 3985 (class 0 OID 27560)
-- Dependencies: 214
-- Data for Name: action; Type: TABLE DATA; Schema: public; Owner: kabAdmin
--
INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, outputpoints, property, nosort, categoryid) VALUES (5, '2024-01-21 15:33:50.958114', '2024-01-21 15:33:50.958114', 'エラー表示', '指定した条件でエラーメッセージを表示する', 'エラー表示', '[]', '[{"component": "ConditionInput","props": {"displayName": "条件", "modelValue":"","name": "condition","placeholder": "条件を選択または入力してください"}},{"component":"MuiltInputText","props":{"displayName":"エラーメッセージ","modelValue":"","name":"message","placeholder":"エラーメッセージを入力してください"}}]', 1, 2);
INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, outputpoints, property, nosort, categoryid) VALUES (3, '2024-01-21 15:33:50.958114', '2024-01-21 15:33:50.958114', '表示/非表示', '要素の表示/非表示を設定する', '表示/非表示', '[]', '[{"component":"FieldInput","props":{"displayName":"フィールド","modelValue":{},"name":"field","placeholder":"対象項目を選択してください"}},{"component":"SelectBox","props":{"displayName":"表示/非表示","options":["表示","非表示"],"modelValue":"","name":"show","placeholder":""}},{"component":"ConditionInput","props":{"displayName":"条件","modelValue":"","name":"condition","placeholder":"条件式を設定してください"}}]', 2, 2);
INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, outputpoints, property, nosort, categoryid) VALUES (4, '2024-01-21 15:33:50.958114', '2024-01-21 15:33:50.958114', '条件式', '指定した条件でフローを分岐させる', '条件式', '["はい","いいえ"]', '[{"component":"ConditionInput","props":{"displayName":"条件","modelValue":"","name":"condition","placeholder":"条件式を設定してください"}},{"component":"InputText","props":{"displayName":"結果(戻り値)","modelValue":"","name":"verName","placeholder":"変数名を入力してください"}}]', 3, 3);
INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, outputpoints, property, nosort, categoryid) VALUES (7, '2024-03-04 15:37:50.958114', '2024-03-04 15:37:50.958114', '空白除去', 'フィールドの空白文字を除去する', '空白除去', '[]', '[
{
"component": "FieldInput",
"props": {
"displayName": "フィールド",
"modelValue": {},
"name": "field",
"placeholder": "対象項目を選択してください"
}
},
{
"component": "SelectBox",
"props": {
"displayName": "空白種類",
"modelValue": "",
"name": "removeBlank",
"placeholder": "空白種類を選択してください",
"options": [
"半角・全角空白除去",
"全角空白除去",
"半角空白除去"
]
}
},
{
"component": "SelectBox",
"props": {
"displayName": "空白除去方法",
"modelValue": "",
"name": "removeBlank2",
"placeholder": "空白除去方法を選択してください",
"options": [
"前後空白除去",
"前空白除去",
"後空白除去"
]
}
}
]', 1, 4);
INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, outputpoints, property, nosort, categoryid) VALUES (11, '2024-04-30 15:33:50.958114', '2024-04-30 15:33:50.958114', 'メールアドレスチェック', 'フィールドの値がメールアドレスかチェックする', 'メールアドレスチェック', '[]', '[{"component":"FieldInput","props":{"displayName":"フィールド","modelValue":{},"name":"field","placeholder":"対象項目を選択してください"}},{"component":"SelectBox","props":{"displayName":"チェックする強さを選択してください","modelValue":"","name":"emailCheck","placeholder":"チェックする強さを選択してください","options":["厳格","ゆるめ"]}},{"component":"MuiltInputText","props":{"displayName":"エラーメッセージ","modelValue":"","name":"message","placeholder":"エラーメッセージを入力してください"}}]
', 4, 1);
INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, outputpoints, property, nosort, categoryid) VALUES (19, '2024-05-27 18:59:42', '2024-05-27 18:59:42', '現在日時', '現在日時を取得する', '現在日時', '[]', '[{"component":"InputText","props":{"displayName":"変数","modelValue":"","name":"verName","placeholder":""}}]', 1, 3);
INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, outputpoints, property, nosort, categoryid) VALUES (10, '2024-04-22 19:50:37', '2024-04-22 19:50:41', '属性UIテスト用', '属性UIテスト用', '属性UIテスト用', '[]', '[
{
"component": "InputText",
"props": {
"displayName": "文字入力",
"modelValue": "",
"name": "str",
"placeholder": "文字を入力してください",
"maxLength":20,
"hint":"文字列入力<br>入力ルール指定可能。ルールの設定例:[val=>!!val||''必須入力です'']",
"rules":"[val=>!!val||''必須入力です'']"
}
},
{
"component": "AppFieldSelect",
"props": {
"displayName": "フィールド選択(複数)",
"modelValue": {},
"name": "selectFields",
"placeholder": "アプリ選択後、フィールドを選んでください",
"selectType":"multiple"
}
},
{
"component": "AppFieldSelect",
"props": {
"displayName": "フィールド選択(単一)",
"modelValue": {},
"name": "selectField",
"placeholder": "アプリ選択後、フィールドを選んでください",
"selectType":"single"
}
},
{
"component": "ColorPicker",
"props": {
"displayName": "色選択",
"modelValue": "",
"name": "color",
"placeholder": "カラーを選択してください"
}
},
{
"component": "NumInput",
"props": {
"displayName": "数値入力フィールド",
"modelValue": "",
"name": "num",
"max":100,
"min":0,
"placeholder": "数値を入力してください",
"rules":"[val=>!!val ||''数値を入力してください'',val=>val<=100 && val>=1 || ''1-100の範囲内の数値を入力してください'']"
}
},
{
"component": "SelectBox",
"props": {
"displayName": "選択肢(複数)",
"modelValue": null,
"name": "options",
"placeholder": "オプションを選択する",
"selectType":"multiple",
"options":["全角記号および句読点","ひらがな","カタカナ","全角英数字","常用漢字","拡張漢字"]
}
},
{
"component": "FieldInput",
"props": {
"displayName": "文字入力フィールド選択",
"modelValue": {},
"name": "selectFields",
"placeholder": "アプリ選択後、フィールドを選んでください",
"selectType":"multiple",
"fieldTypes":["SINGLE_LINE_TEXT","MULTI_LINE_TEXT"],
"hint":"単一行、複数行文字のみ選択してください"
}
},
{
"component": "AppFieldSelect",
"props": {
"displayName": "フィールド選択(複数)",
"modelValue": {},
"name": "selectFields",
"placeholder": "単一行、複数行文字のみ選択してください",
"fieldTypes":["SINGLE_LINE_TEXT","MULTI_LINE_TEXT"],
"selectType":"multiple"
}
}
]', 10, 5);
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 (12, '2024-05-07 15:33:50.958114', '2024-05-07 15:33:50.958114', '全角チェック', 'フィールドの値がすべて全角かチェックする', '全角チェック', '[]', '[
{
"component": "FieldInput",
"props": {
"displayName": "フィールド",
"modelValue": {},
"name": "field",
"placeholder": "対象項目を選択してください"
}
}
]
', 2, 1);
INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, outputpoints, property, nosort, categoryid) VALUES (6, '2024-02-29 15:33:50.958114', '2024-02-29 15:33:50.958114', 'ボタンの配置', 'ボタンをメニュー/スペースに配置する', 'ボタンの配置', '[]', '[
{
"component": "InputText",
"props": {
"displayName": "ボタン名",
"modelValue": "",
"name": "buttonName",
"placeholder": "ボタンのラベルを入力してください"
}
},
{
"component": "FieldInput",
"props": {
"displayName": "配置スペースを選択",
"modelValue": {},
"name": "space",
"fieldTypes":["SPACER"],
"placeholder": "ボタンを配置するスペースを選択"
}
},
{
"component": "SelectBox",
"props": {
"displayName": "追加位置",
"modelValue": "",
"name": "position",
"options": [
"一番右に追加する",
"一番左に追加する"
],
"placeholder": "追加位置を選択してください"
}
},
{
"component": "EventSetter",
"props": {
"displayName": "イベント名",
"modelValue": "",
"name": "eventName",
"connectProps": [
{
"key": "displayName",
"propName": "buttonName"
}
],
"placeholder": "イベント名を入力してください"
}
}
]', 4, 2);
INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, outputpoints, property, nosort, categoryid) VALUES (18, '2024-01-21 15:33:50.958114', '2024-01-21 15:33:50.958114', '値を取得する', 'フィールドの値を取得する', '値を取得する', '[]', '[{"component":"FieldInput","props":{"displayName":"フィールド","placeholder":"フィールドを選択してください","name":"field"}},{"component":"InputText","props":{"displayName":"結果(戻り値)","modelValue":"","name":"verName","placeholder":"変数名を入力してください"}}]', 3, 4);
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","props":{"displayName":"保存先フィールド","modelValue":{},"name":"saveField","placeholder":"","hint":"対象:文字列(1行),文字列(複数行),リッチエディターのいずれか。<br>未選択/不存在/型合わない時エラー表示。"}},{"component":"FieldInput","props":{"displayName":"結合元フィールド1","modelValue":{},"name":"joinField1","placeholder":"","hint":"対象外:ラベル,関連レコード一覧,スペース,罫線,グループ,テーブル,イベント的な取得対象外(例:新規追加成功前のレコード番号取得)。<br>未選択/不存在/対象外時エラー表示。"}},{"component":"FieldInput","props":{"displayName":"結合元フィールド2","modelValue":{},"name":"joinField2","placeholder":"","hint":"対象外:ラベル,関連レコード一覧,スペース,罫線,グループ,テーブル,イベント的な取得対象外(例:新規追加成功前のレコード番号取得)。<br>未選択/不存在/対象外時エラー表示。"}},{"component":"InputText","props":{"displayName":"区切り文字", "modelValue":"","name":"delimiter","placeholder":""}}]', 2, 4);
INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, outputpoints, property, nosort, categoryid) VALUES (16, '2024-05-13 04:08:44', '2024-05-13 04:08:48', 'データ処理', '指定したアプリのデータを指定した条件で集計する', 'データ処理', '[]', '[
{
"component": "AppFieldSelect",
"props": {
"displayName": "データソース",
"modelValue": {},
"name": "sources",
"placeholder": "データソースを選択してください",
"selectType": "multiple",
"fieldTypes":["CALC","CATEGORY","CREATED_TIME","DATE","DATETIME","NUMBER","SINGLE_LINE_TEXT","TIME"]
}
},
{
"component": "ConditionInput",
"props": {
"displayName": "抽出条件",
"modelValue": "",
"name": "condition",
"placeholder": "データ抽出条件を設定してください",
"sourceType": "app",
"operatorList": [
{
"label": "=",
"value": "="
},
{
"label": "!=",
"value": "!="
},
{
"label": ">",
"value": ">"
},
{
"label": ">=",
"value": ">="
},
{
"label": "<",
"value": "<"
},
{
"label": "<=",
"value": "<="
},
{
"label": "contains",
"value": "like"
}
]
}
},
{
"component": "DataProcessing",
"props": {
"displayName": "集計処理",
"modelValue": "",
"name": "verName",
"placeholder": "データのマッピング・集計処理を設定してください"
}
}
]', 5, 4);
INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, outputpoints, property, nosort, categoryid) VALUES (22, '2024-06-07 10:34:50.958114', '2024-06-07 10:34:50.958114', '半角チェック', 'フィールドの値がすべて半角かチェックする', '半角チェック', '[]', '[
{
"component": "FieldInput",
"props": {
"displayName": "フィールド",
"modelValue": {},
"name": "field",
"placeholder": "対象項目を選択してください"
}
}
]
', 3, 1);
INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, outputpoints, property, nosort, categoryid) VALUES (14, '2024-05-10 13:00:23.958114', '2024-05-10 13:00:23.958114', '文字数チェック', 'フィールドの値が指定された文字数かチェックする', '文字数チェック', '[]', '[{"component":"FieldInput","props":{"displayName":"フィールド","placeholder":"フィールドを選択してください","name":"field"}},{"component":"NumInput","props":{"displayName":"文字数チェック","name":"maxLength","placeholder":"制限したい文字数を入力してください"}},{"component":"MuiltInputText","props":{"displayName":"エラーメッセージ","modelValue":"","name":"message","placeholder":"エラーメッセージを入力してください"}}]', 6, 1);
INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, outputpoints, property, nosort, categoryid) VALUES (8, '2024-01-21 15:33:50.958114', '2024-01-21 15:33:50.958114', '正規表現チェック', 'フィールドの値が指定した正規表現かチェックする', '正規表現チェック', '[]', '[{"component":"FieldInput","props":{"displayName":"フィールド","placeholder":"フィールドを選択してください","name":"field"}},{"component":"InputText","props":{"displayName":"正規表現","name":"regExpression","placeholder":"正規表現を入力してください"}},{"component":"MuiltInputText","props":{"displayName":"エラーメッセージ","modelValue":"","name":"message","placeholder":"エラーメッセージを入力してください"}}]', 5, 1);
INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, outputpoints, property, nosort, categoryid) VALUES (23, '2024-06-07 15:37:50.958114', '2024-06-07 15:37:50.958114', 'ログインユーザー取得', 'ログインユーザーのデータを取得する', 'ログインユーザー取得', '[]', '[
{
"component":"InputText",
"props":{
"displayName":"変数にセット:",
"modelValue":"",
"name":"verName",
"placeholder":"セット先の変数名を入力してください"
}
}
]', 2, 3);
INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, outputpoints, property, nosort, categoryid) VALUES (15, '2024-05-13 01:17:24', '2024-05-13 01:17:28', 'データ更新', '指定のアプリのレコードを追加または更新する', 'データ更新', '[]', '[
{
"component": "AppSelect",
"props": {
"displayName": "連携先アプリ選択",
"modelValue": {},
"name": "sources",
"placeholder": "データ連携先のアプリを選択してください"
}
},
{
"component": "DataMapping",
"props": {
"displayName": "マッピング設定",
"modelValue": "",
"name": "dataMapping",
"placeholder": "データ連携のマッピングを設定してください",
"onlySourceSelect": false
}
}
]', 6, 4);
INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, outputpoints, property, nosort, categoryid) VALUES (9, '2024-04-08 11:21:50.958114', '2024-04-08 11:21:50.958114', '値を挿入する', 'フィールドに値を挿入する', '値を挿入する', '[]', '[{"component": "FieldInput","props": {"displayName": "フィールド選択","modelValue": {},"name": "field","placeholder": "値を挿入するフィールドを選択してください"}},{"component": "ConditionInput","props": {"displayName": "条件","modelValue": "","name": "condition","placeholder": "条件式を設定してください"}},{"component": "InputText","props": {"displayName": "挿入する値、変数","modelValue": "","name": "value","placeholder": "変数は、変数名を直接入力ください"}},{"component":"SelectBox","props":{"displayName":"値は手入力/変数","options":["手入力","変数"],"modelValue":"","name":"show","placeholder":""}}]', 4, 4);
INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, outputpoints, property, nosort, categoryid) VALUES (24, '2024-07-23 15:33:50.958114', '2024-07-23 15:33:50.958114', '編集可/不可', 'フィールドの編集可/不可を設定する', '編集可/不可', '[]', '[
{
"component": "FieldInput",
"props": {
"displayName": "フィールド",
"modelValue": {},
"name": "field",
"fieldTypes":[
"CHECK_BOX",
"DATE",
"DATETIME",
"DROP_DOWN",
"FILE",
"GROUP_SELECT",
"LINK",
"MULTI_LINE_TEXT",
"MULTI_SELECT",
"NUMBER",
"ORGANIZATION_SELECT",
"RADIO_BUTTON",
"RICH_TEXT",
"SINGLE_LINE_TEXT",
"TIME",
"USER_SELECT"
],
"placeholder": "対象項目を選択してください"
}
},
{
"component": "SelectBox",
"props": {
"displayName": "編集可/不可",
"options": [
"編集可",
"編集不可"
],
"modelValue": "",
"name": "editable",
"placeholder": ""
}
},
{
"component": "ConditionInput",
"props": {
"displayName": "条件",
"modelValue": "",
"name": "condition",
"placeholder": "条件式を設定してください"
}
}
]', 3, 2);
INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, outputpoints, property, nosort, categoryid) VALUES (21, '2024-01-21 15:33:50.958114', '2024-01-21 15:33:50.958114', 'ルックアップ更新', '更新されたときにルックアップ先を同期する', 'ルックアップ更新', '[]', '[
{
"component": "AppFieldSelect",
"props": {
"displayName": "更新先選択",
"fieldTypes": [
"lookup"
],
"hint": "更新先のルックアップフィールドを選択する",
"modelValue": {},
"name": "lookupField",
"placeholder": ""
}
},
{
"component": "ConditionInput",
"props": {
"displayName": "更新条件",
"modelValue": "",
"name": "condition",
"placeholder": "条件式を設定してください"
}
}
]', 8, 4);
INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, outputpoints, property, nosort, categoryid) VALUES (2, '2024-01-21 15:33:50.958114', '2024-01-21 15:33:50.958114', '自動採番する', 'レコードIDを元に指定のフォーマットに変換する', '自動採番する', '[]', '[{"component":"FieldInput","props":{"displayName":"採番項目","modelValue":{},"name":"field","placeholder":"採番項目を選択してください"}},{"component":"InputText","props":{"displayName":"フォーマット","modelValue":"","name":"format","placeholder":"数値書式文字列を指定します","hint":"数値書式文字列記入例:<br>ゼロ埋めと桁揃えを指定することができます。<br>使用例:\"000000\" - 整数部が6桁に満たない場合に先頭をゼロで埋めて6桁にする。"}},{"component":"InputText","props":{"displayName":"前につける文字列","modelValue":"","name":"prefix","placeholder":"前につける文字列を入力してください","hint":"固定文字やJavascriptの式を`${}`内に記述することが可能です。<br>使用可能日付フォーマット関数:$format(''フォーマット式'')。<br>使用例:${$format(''yyyyMMdd'')} --現在の日付をyyyyMMdd形式を表記する"}},{"component":"InputText","props":{"displayName":"後ろにつける文字列","modelValue":"","name":"suffix","placeholder":"後ろにつける文字列を入力してください","hint":"固定文字やJavascriptの式を`${}`内に記述することが可能です。<br>使用可能日付フォーマット関数:$format(''フォーマット式'')。<br>使用例:${$format(''yyyyMMdd'')} --現在の日付をyyyyMMdd形式を表記する"}},{"component":"InputText","props":{"displayName":"結果(戻り値)","modelValue":"","name":"verName","placeholder":"変数名を入力してください","hint":"採番された番号の値を指定の変数名に格納する"}}]', 7, 4);
--
-- TOC entry 3989 (class 0 OID 27752)
-- Dependencies: 240
-- Data for Name: category; Type: TABLE DATA; Schema: public; Owner: kabAdmin
--
INSERT INTO public.category (id, categoryname, nosort, create_time, update_time) VALUES (1, '入力チェック', 1, '2024-08-19 00:00:00', '2024-08-19 00:00:00');
INSERT INTO public.category (id, categoryname, nosort, create_time, update_time) VALUES (2, '表示・動作', 2, '2024-08-19 00:00:00', '2024-08-19 00:00:00');
INSERT INTO public.category (id, categoryname, nosort, create_time, update_time) VALUES (3, 'ユーティリティ', 4, '2024-08-19 00:00:00', '2024-08-19 00:00:00');
INSERT INTO public.category (id, categoryname, nosort, create_time, update_time) VALUES (4, 'データ操作', 3, '2024-08-19 00:00:00', '2024-08-19 00:00:00');
INSERT INTO public.category (id, categoryname, nosort, create_time, update_time) VALUES (5, 'テスト', 5, '2024-08-19 00:00:00', '2024-08-19 00:00:00');
--
-- TOC entry 3987 (class 0 OID 27591)
-- Dependencies: 224
-- Data for Name: eventaction; Type: TABLE DATA; Schema: public; Owner: kabAdmin
--
INSERT INTO public.eventaction (id, create_time, update_time, eventid, actionid) VALUES (1, '2024-06-24 00:00:00', '2024-06-24 00:00:00', 'app.record.create.show', 1);
INSERT INTO public.eventaction (id, create_time, update_time, eventid, actionid) VALUES (2, '2024-06-24 00:00:00', '2024-06-24 00:00:00', 'app.record.create.submit.success', 1);
INSERT INTO public.eventaction (id, create_time, update_time, eventid, actionid) VALUES (3, '2024-06-24 00:00:00', '2024-06-24 00:00:00', 'app.record.detail.show', 1);
INSERT INTO public.eventaction (id, create_time, update_time, eventid, actionid) VALUES (4, '2024-06-24 00:00:00', '2024-06-24 00:00:00', 'app.record.detail.process.proceed', 1);
INSERT INTO public.eventaction (id, create_time, update_time, eventid, actionid) VALUES (5, '2024-06-24 00:00:00', '2024-06-24 00:00:00', 'app.record.edit.show', 1);
INSERT INTO public.eventaction (id, create_time, update_time, eventid, actionid) VALUES (6, '2024-06-24 00:00:00', '2024-06-24 00:00:00', 'app.record.edit.submit.success', 1);
INSERT INTO public.eventaction (id, create_time, update_time, eventid, actionid) VALUES (7, '2024-06-24 00:00:00', '2024-06-24 00:00:00', 'app.record.index.show', 1);
INSERT INTO public.eventaction (id, create_time, update_time, eventid, actionid) VALUES (8, '2024-06-24 00:00:00', '2024-06-24 00:00:00', 'app.record.index.edit.show', 1);
INSERT INTO public.eventaction (id, create_time, update_time, eventid, actionid) VALUES (9, '2024-06-24 00:00:00', '2024-06-24 00:00:00', 'app.record.index.edit.submit.success', 1);
--
-- TOC entry 3997 (class 0 OID 0)
-- Dependencies: 215
-- Name: action_id_seq; Type: SEQUENCE SET; Schema: public; Owner: kabAdmin
--
SELECT pg_catalog.setval('public.action_id_seq', 23, true);
--
-- TOC entry 3998 (class 0 OID 0)
-- Dependencies: 225
-- Name: eventaction_id_seq; Type: SEQUENCE SET; Schema: public; Owner: kabAdmin
--
SELECT pg_catalog.setval('public.eventaction_id_seq', 1, false);
--
-- TOC entry 3830 (class 2606 OID 27662)
-- Name: action action_pkey; Type: CONSTRAINT; Schema: public; Owner: kabAdmin
--
ALTER TABLE ONLY public.action
ADD CONSTRAINT action_pkey PRIMARY KEY (id);
--
-- TOC entry 3839 (class 2606 OID 27756)
-- Name: category category_pkey; Type: CONSTRAINT; Schema: public; Owner: kabAdmin
--
ALTER TABLE ONLY public.category
ADD CONSTRAINT category_pkey PRIMARY KEY (id);
--
-- TOC entry 3836 (class 2606 OID 27672)
-- Name: eventaction eventaction_pkey; Type: CONSTRAINT; Schema: public; Owner: kabAdmin
--
ALTER TABLE ONLY public.eventaction
ADD CONSTRAINT eventaction_pkey PRIMARY KEY (id);
--
-- TOC entry 3834 (class 2606 OID 27682)
-- Name: action name; Type: CONSTRAINT; Schema: public; Owner: kabAdmin
--
ALTER TABLE ONLY public.action
ADD CONSTRAINT name UNIQUE (name);
--
-- TOC entry 3831 (class 1259 OID 27689)
-- Name: ix_action_id; Type: INDEX; Schema: public; Owner: kabAdmin
--
CREATE INDEX ix_action_id ON public.action USING btree (id);
--
-- TOC entry 3832 (class 1259 OID 27690)
-- Name: ix_action_name; Type: INDEX; Schema: public; Owner: kabAdmin
--
CREATE INDEX ix_action_name ON public.action USING btree (name);
--
-- TOC entry 3837 (class 1259 OID 27697)
-- Name: ix_eventaction_id; Type: INDEX; Schema: public; Owner: kabAdmin
--
CREATE INDEX ix_eventaction_id ON public.eventaction USING btree (id);
--
-- TOC entry 3841 (class 2606 OID 27710)
-- Name: eventaction eventaction_actionid_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kabAdmin
--
ALTER TABLE ONLY public.eventaction
ADD CONSTRAINT eventaction_actionid_fkey FOREIGN KEY (actionid) REFERENCES public.action(id);
--
-- TOC entry 3842 (class 2606 OID 27715)
-- Name: eventaction eventaction_eventid_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kabAdmin
--
ALTER TABLE ONLY public.eventaction
ADD CONSTRAINT eventaction_eventid_fkey FOREIGN KEY (eventid) REFERENCES public.event(eventid);
--
-- TOC entry 3840 (class 2606 OID 27762)
-- Name: action fk_categoryid; Type: FK CONSTRAINT; Schema: public; Owner: kabAdmin
--
ALTER TABLE ONLY public.action
ADD CONSTRAINT fk_categoryid FOREIGN KEY (categoryid) REFERENCES public.category(id) NOT VALID;
-- Completed on 2024-08-21 09:38:00
--
-- PostgreSQL database dump complete
--